{"_id":"@balena/jellyfish-client-sdk","_rev":"4000-e7f01dcd4189d3e14c78a9633268eecc","name":"@balena/jellyfish-client-sdk","dist-tags":{"latest":"13.11.8"},"versions":{"0.0.3-publish-package-3e91814755cf14f501f5584c2f7b8c23452aaaf9":{"name":"@balena/jellyfish-client-sdk","version":"0.0.3-publish-package-3e91814755cf14f501f5584c2f7b8c23452aaaf9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.0.3-publish-package-3e91814755cf14f501f5584c2f7b8c23452aaaf9","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"972db35a7319da0fb93000323fe23c2dc5bb5577","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.0.3-publish-package-3e91814755cf14f501f5584c2f7b8c23452aaaf9.tgz","fileCount":15,"integrity":"sha512-hqnpNWBnH4o0Av9MxA6L5x/QVtxFKKMF8JAMsla/opNRpM7lyQq7SdBMhOifR71ZdDxAwYbwAeTnIOaxXLk+Bw==","signatures":[{"sig":"MEQCIH7DmUPp/uuppsMrNsrhKeWuYZ5X61CIZnOOFoXweCn1AiBlmaPii11Qvi99Z4wXG/LDP5zPuQN36o5lfT25VDJRsw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":107858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeeX0CRA9TVsSAnZWagAAnJ4P/0eVldDOMrQqtsqNHgFr\nGBKwQ8VhPiSTi70H0gXGvwrOc7C8sQuTkzISQQOSrZBia2yV2XTb0dlMF0pf\nfV1Q9C52cvgSThCCky+ay2SmCZ3/uBRxl77gorpAU9QztsOeY85GcWPsNERe\nqm4kXj/adUOWljp/42ITRqqeMAej3yWJEuJ/6iR5yIH9G4m5XobfYNBB97pe\nqy7ayS1ctwfvZXtlewQ3B58eUKlKcJ/7QXHV3BpBpVyoJr2tJXKMzHNS+8He\n66nkPifG/ZaaGMJQzktgxmv1RBxMmc1+0WMjfMiFbkgnPuQF6xfV5qAi6kqR\nA9cQhIXdRu+XSMGir5GSWSZuOi7dxev1p9dy4uXXO3tLzCzRiI6bg0CtF0PT\n/1Ss1k73KSBCdBQ4SzuVGmJPapXdtC/mxQfLVqrUnJwqyGy+7/q+0NAHvakk\n7il4Js6v0JIJtJpq/bwdcO6qJvQB1GS4dLpma/hR7yXglQ/4csR19MXnRUo6\nz+7+Qb6tzyXxwDsUkC1WDZDX53BPcR1+Za/c59H9VUXVvyO4oGNR7eKVNCPi\n3SgkcGxDZ7MzVvJkCIXP0QrdI2YdM0AIlJ8PuaAaZ4CnvklH5YgtTp5igAYo\nUZ1fN7pga3zfzUiUBKkLLjXA2tjzCVzuKqiuQlSlxOs24zVz9IMZRVIep+ff\nN1Ci\r\n=HSwX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"3e91814755cf14f501f5584c2f7b8c23452aaaf9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.0.3-publish-package-3e91814755cf14f501f5584c2f7b8c23452aaaf9_1585047027497_0.361727075796463","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.0.3":{"name":"@balena/jellyfish-client-sdk","version":"0.0.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.0.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"197f84fccb3dd6993d6fa7763f7d5a8cb716c27c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.0.3.tgz","fileCount":15,"integrity":"sha512-jI4oi3qvbxx7V5MIL+lJX/XsHKVTKbPSEtiSK6EtTCyovwnvL8lEcXyLt+uWFPB+xk2HxIfQae/gbFDD6T4dEg==","signatures":[{"sig":"MEUCIQDLVUEelQt9Osl+yK8ugC/EoK6DbK3s65gUWy+EBr8AJQIgN3PPCMH735gRk/J7TXo/8L3hU4HfaJYAwfOHFSd6nRU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":107801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeefblCRA9TVsSAnZWagAAjpYP/jTX7pVHYNqPaVXF790p\nmTLrI+OS4uDmcWBv01/I8W8/t0mr9kCW7sL/g01wdDaCtIwyPXWBPS7XURRN\njBNKUIXsuyQljFCZNeMo/x9SS43KJ+VtKdfE2XXOXB1a/xeP8MvnibgbjvfS\nr0bwqYZ3Oer6r1HMdjOGBicIJCOcW0Fm/XC3Z2j8/neTnJcYUouIM0EYCF4R\nvo42Rzfm95xab1Uk7WGziA3G2nMZ3Tkv9bmcGfQizioAsUDe2q4X2b5jse4I\ndog54gJ9PhH62Gou/JRuQqzg31ZSHB4W63S0wboxIH9NbJ+TLasbL/7QLNzi\n+uc+IJLg5tiSjh46JqbYMF6DkxTtUk6d35057ZYTWlv4xHDX3R9UIF9n8rEh\n6183mRr0RlxnCv9Uijmc7B8i/ZUQGXk1GIX2JdSgJ0pMvLXoKlFD5bzzqQQL\nneWYu1l0qXiAkOal5S1vEhDaT7s6OXFLK16fkPDywp9A4xp+A6xO9H0MRETG\n7eMdQyR6okq9jskrNt0S2rIDD4c/gfhZNP02Y4NbWgQXgYYp3fEyIm81DFX8\nj5UkweLzTzfAVl/iGuByyscSTKhngZbz7ftTn8raqsr1qlN6iIm24aE9hArA\n8Y+JQfbQBDSY0mLmLYepS4Kl8YiBiJ5Pma6ZE4ct+2Zvggbie+rrAhY2K0cv\nS4Or\r\n=vxAY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"ed4f7bf07c5f48401dc8b3a6acba45d2df9433c9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.0.3_1585051364616_0.2012685323043497","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.1.0-update-link-constraints-1135b82dd56b8ad052f1e49af849a1f57264bae1":{"name":"@balena/jellyfish-client-sdk","version":"0.1.0-update-link-constraints-1135b82dd56b8ad052f1e49af849a1f57264bae1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.1.0-update-link-constraints-1135b82dd56b8ad052f1e49af849a1f57264bae1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"grahammcculloch","email":"graham@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"fdd0820af3605587d8af42a7dd09598fe0988140","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.1.0-update-link-constraints-1135b82dd56b8ad052f1e49af849a1f57264bae1.tgz","fileCount":15,"integrity":"sha512-55HugpGKrylCHw3tbnSY7ToQZmdGG/yUJO79bcsp/5uWxidDgJplUaMA87XOBq/lcpnT9VSGLd+og8XoIt3dIA==","signatures":[{"sig":"MEUCIE4/thkZLYo+HadBuFQML5fEXRDGnRU9OcUtM8xKoOTQAiEAiu0IP2IUadLvxlI2S+tr9X0WQvgfLTfPkMlIPGpI10U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefciuCRA9TVsSAnZWagAAgY0P/2Q118Dbqi5GeV+1KZGE\nAM1A8MUqgCkQGDAdIQDszk4Np88mCYj1ccx4XrYZ+10JyE/ZirSjqekAgjNO\nDrD0yI0/2reTbc1a5pCjFMVzTe9wvP7D9aa6ouaca4N7Q1qEYMMULNJKSLbw\nIu6aC6sDnHcvHcBdgceQqeAFavuvmN/jAkcEG+FnElYlN43d2MUjTAGlUYzT\nhzM/MJCthhSeS+cL9GWK3/62hE034om2cZ8MMp4RMqYtm15Tq+ZUIyqVQh2g\nYOYkg0mOn+U9zhQA+NG5DDu21WiUEmjbaT5lRT6LuaoKivf7M6xF04fBnVam\nA0rV++ViN3057lKsvxM39ITD5glaFkLkLkQDtjEL/ch2ayR1FFJasO9mnqXF\nRop5PnRnOv0kTmxwXzh6J2V0pCCqKrCgS/GSGyhTFh9eGavsO69w8zlPIMo4\nJQ20/GfadKapSypQKc1XZXAyglJ3aRLfRiuuWsPJ1HCHDp+4uisduXrXnYtq\nDpO8yE3Uef1NFoTfdaNAywX6xCl12h9+yzSOqU1uO1lsygt/Wps4zfgC0U4+\n/r7gRcmx0z4u81a3BltGEMTemq8NwMn6qLKX7HqyZvdqA6k1bXqHRSrvcNdB\nVJ6teFf6AZc3yCSdWpONMuGDo2SDH6pozz+PHLSdsWX+myBaExBP8yupsox5\niIdf\r\n=KgKf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"1135b82dd56b8ad052f1e49af849a1f57264bae1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.1.0-update-link-constraints-1135b82dd56b8ad052f1e49af849a1f57264bae1_1585301677925_0.975236666485116","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.1.0":{"name":"@balena/jellyfish-client-sdk","version":"0.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.1.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"grahammcculloch","email":"graham@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"cad7c3fdbc1bbf069b1968a5e82ce721f3da1439","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.1.0.tgz","fileCount":15,"integrity":"sha512-+Xcpyer10jxRAMk3lFXRxkfGA3tnK1lp8WDi66lZqJ25Ar5m/XQBstFaqcqL4nRyfoYZH0DwuB8SP9N/tA4oQQ==","signatures":[{"sig":"MEQCIGgEMrPAZp+e5PUG8HhMCG0Rftj4Q1d5sHz3UIBrH5frAiBnh0tYWSGG3tjhHFwG54MF9Rg9D8+J8u7n8dkJZ7+zSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":108411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefctuCRA9TVsSAnZWagAAPH4P/32h+alZcjRqFaf/RDVW\nfgL8r9r6MAlpJQLsFH7XjXjaLz+Ihdj3vkaDZhBWLGdA6Z0/jOYnxLIY0rYM\n6V1GaXqo0dcLJHJ5hewe54MWmr8a7jvBbpnpdJfhlpYE7Zghx+Y7qRmj7uZK\nh+wC5mKYOfA/a4W3oY4BpNbDH/gDP6LJtT0CQyOhg7sGmIec0Nk9OWq9aCBL\nG7MM0Uy5Uuqf3qDUkBTcIg3uGwDdfUumgWyn1XfemwQCWvHn6iADDhsW2Ib1\nH1OKz5WTXc8VsuyDMvf7tI5W/39HHdv1kkFC90U15tZqO+lWSdLF18LJoeKB\n6cxHSen4EBN/NNFxaXerfqDh1Mseo4a69pL12okqYVu/hQdh5LetpWCoHzAw\nRf05Sv6WOPZlJDPvhtr11rT2dV1gVSSTuQXlPTFLQ7mIGHsBdoO+eColoLzl\nPxvW6oeRfYMYIGlKHbI4pRii948RQB6p39QjEu2EfUsp7tDssPKsDu6/vuuK\nvZBreUKDI3yKr24bS8NBR9IZ+plz2VqmH7h+qyV0GOYBwKv0lk4h2somyNA2\nnfDlSlyA2WZn/EhZVY6AEMZHyfInApEtz/rAS6Mjr7uIWkL4/17Qfqcsh+7Y\nKGWQTkGoCXEU43dIHjL2zZ6i2U2sAjxzaE1HifWI2UJ+Dhfp9sUqdW40FzM+\nM+Ei\r\n=9Lqe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"10728f9f2d12fd00e6b149984279f2ed58da4ac7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.1.0_1585302381977_0.39832195518845737","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.0-update-to-latest-eaee3de7e1948a2803c0a87bc3f76ec70bdc23fc":{"name":"@balena/jellyfish-client-sdk","version":"0.2.0-update-to-latest-eaee3de7e1948a2803c0a87bc3f76ec70bdc23fc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.0-update-to-latest-eaee3de7e1948a2803c0a87bc3f76ec70bdc23fc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"cddc624a3acafb864fbc84169a9aabbd565ccaae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.0-update-to-latest-eaee3de7e1948a2803c0a87bc3f76ec70bdc23fc.tgz","fileCount":15,"integrity":"sha512-53itedWr7SwyDENqsaTpBCM9Ht/hNtnoPunMHacgX7Y3AkpUO2Wy2Lkb2eGE1mAYmqQvNXQ7YVwKIaWQF08LIw==","signatures":[{"sig":"MEQCIB3joc9oRru8yJQjyUCc87nPHGu+2OzwTwqaN+K7FKYSAiBc9oLDrl1KS8SEORbuhzFC67AY2ichClVQyGTAf56mxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehwlbCRA9TVsSAnZWagAAqEEQAJiiGnEi4wuEidMeusuo\nIzy7/7mRsNTAj2/nzpKp3DLtd+V9Gob4+AekHoLtdi17GQjJKtgJ06EcopkA\nXNJnENYwLpe1gzf5yFA1fyDQ8NDMnHFLeeAhiX87b/2Vvgr95vu1K0qmpNcW\nlV8GFLAyGVVhA+5hNVTR2pTMEoNVfBWOdeKeiqbB33XCbS6VCj0a/wliTSC4\nd3k4AW+W6GSwfOSDjT3+SBZ4q28VAtf68ICV0UJTCHwLRNM4YzCW+3lmsXsy\nhMjvZ1lyPLUviKd6kxtNQLDwwnRzRgrPvqQAIGcj9FKrrnBtQ4i37Gw8npA3\nsy8g2QvjO7Gmw2pnGHzHMFloY9aEyYyzRtYt0hsOXxEYKywGTSQNBJ9Z1An+\nyTsBhBvOBRPpIQmeB82a/y0t/8Vkc4AWAMZ4H7Ha3p8quZQNplnqSZcOEdP+\nWEZAp4dJ4dD23w3PKtDSaM6gfIBKyXHnWz7s8wuhqHHeZMXhRk5BQiOcX6Ty\nm77+ULFDNwoO40832Z/oSt3ib4CTuXB40LjW0BnOPhTwwWIwrgGNktosGeTk\nOm0T3sw075HlJeJnOxFMb5gj5IsU/u4uIPDQNYaqDW+MdAb9ReCcgcf9pN5b\n9xfJKPUC46E/6eaGZ/azSepcT+cKNwb8Te4ivH/lclEX2me0btqn6k3irEP0\nl2V2\r\n=GoyU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"eaee3de7e1948a2803c0a87bc3f76ec70bdc23fc","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.0-update-to-latest-eaee3de7e1948a2803c0a87bc3f76ec70bdc23fc_1585908058858_0.40578872845567293","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.0":{"name":"@balena/jellyfish-client-sdk","version":"0.2.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"bec947026f3c7db0c36a82831cb6a4cdf64e144a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.0.tgz","fileCount":15,"integrity":"sha512-PO3TDFFEi09ncqXKjstxNk826WeyZFxQRUpvR9FqDWFaxR1FVvT2dXUJFBBCKbynATfIfrDC6LBBM2TUiTrP5A==","signatures":[{"sig":"MEUCIDhjneHS26h2fDu+f06mO8B8jbrxy7S3kGrvjJmJWiCMAiEAiGIIgG9bz8XwiR4tdPNE/taH4v15LXCon5+z5n5rvQk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehwr1CRA9TVsSAnZWagAA2tUP/RGvMBfv5XjECZsRoQfQ\nwbIWfxbQs+Mu9gB3Po8o4Qo0cHl6xQt7hOfRFev/hId+wGiRMl8ca3OGfsAZ\nsnq4y3uoAV2UPMFq0jT03wQBsqAMY9k2oV3vhEceWQTO6rzdCNs3+Rt/W2BC\nyyNLd6OLC8muyOJZlANZ9nvMlDVNw0lMEs6HluPHI3ESDdqL5AMEFPVSqB4W\n/VDxpexv/mCTcszZMmAOLnNwwc5qWxpNgv6dW/2kEu8o9vjV3YlYgV3Riy4Z\n7QnvCLTK62NI2SF4Rlk4KuAVUSyA/8e1ylCYYtBBOvhyAu61dpkI+y2Ih6mV\nqBKZzvMA78eiwZjxIffg9VPRIWAGNCUlYK3ekg5fyuI5QHd8vPOnETr+s3Md\naKVkkJ5bewpQFU+e6YfpPsaLelhOdmRdHCQCUJlS/EUdGUinZFdKUU0ygKSa\nBrRte2rCvVgp9YMmx047GGLtsAFhQfnM+cfvC8xQndCMPIPu2wAAnesZKIKU\nzgiM15BKx3V/B1+QYMVCNe32RABFX23lp0SREBMN1gXVeUTk+5nxfxWqZnbb\nHJRBM1SxIyxq0QHsIgBVAE+fyWFFL+y+FQSCEVjlrjPmvzg/g0CAgljfABov\nzZ7GeKja2a9c8QKltcwr/BLbbkoGXMDDRE2W7RbS10bU1GYt0X4VHIjNrbUZ\nLgGU\r\n=145G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"bc5d1730b14af6004d953a655ba7fd17022bbfaf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.0_1585908469344_0.7068979411803824","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.1-lucianbuzzo-expose-link-constraints-7-b7fd4e8f051a2018613f643ad1a9be0db40b8299":{"name":"@balena/jellyfish-client-sdk","version":"0.2.1-lucianbuzzo-expose-link-constraints-7-b7fd4e8f051a2018613f643ad1a9be0db40b8299","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.1-lucianbuzzo-expose-link-constraints-7-b7fd4e8f051a2018613f643ad1a9be0db40b8299","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"3d1a7cb2c326a20cd205da4c89ce17a1d6903a4e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.1-lucianbuzzo-expose-link-constraints-7-b7fd4e8f051a2018613f643ad1a9be0db40b8299.tgz","fileCount":15,"integrity":"sha512-SfyJ/cvAK2DgqifrSdL1FX6ZjXpJfihPa0QILX1RITvaYobF87Le8QE5TjA66+3OsNO3sgL71AitFJqa7g86Nw==","signatures":[{"sig":"MEYCIQDleAUt7V1faOXjDNR5SJyAWph6wNuSET3kCPkra57ydAIhAKh+XkJH/k7SQcNyPhZjDvyJvkeHZtzal8XyzKe6mjqn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemYb8CRA9TVsSAnZWagAA4UEQAJF9kMejKxoAdj6NjFrK\n6udmF1vm2M7DS/JsIIUK0I1ndfwaC39ay92Qe7AjBDVxLqnJ8dogZpA4pn0D\nq894UoxiMazOEob/tLGCwKiJtma8zAPG7nBhqptXhXjFDiatIyt6DNdp1u9m\nWIqNgTYnqpjbUFXfquRRXNKYHIcFsoL1mc3i+Xe+QGe9mgSnRg13RGmwrJPl\nu1m6mzyMl4vXS4dFgStbEOxjdhatN7V9bKjpiTyZu3pZ54YsNZu5gPlaTmhN\n+TnLCjfVjRPgVWBQLDqcbGoTqgAQbkJBQ5iqg8OQjuPOmUmd21ZulHyoheus\nzHYH+izIv+rN5pFVQh8jGEnJkhOBOcf7k8ALPrngAUnRe3LuUmeMupLdBBW5\nyuPAksw10L4s7Kn/4+je7uU12t3nAIIwKYubP537Cgv7HhSNKJYCMgaDoy4v\n9bo1kfXJMk6omGPafhWdQVY5tH4kcV+mTpAgs4XRSLnWyGsELYxwjqWaQUPN\nrcQlnft2cYeKy1arP98Q6VuZfrgZSM0DXyDrpuABmBavw6DASXdefKJP9CQ/\nUHibB99Un3XupbO9M5qpMN4YPEXu6XXnkb210B1KPIHXtow2LhIB02KqqdSw\nROEC0aqqAOos38lPxGnVby6oBVg27LpvzWpTq2n5Y8gYv8qXWutVscyvp4Wn\nlLla\r\n=f5dT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b7fd4e8f051a2018613f643ad1a9be0db40b8299","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.1-lucianbuzzo-expose-link-constraints-7-b7fd4e8f051a2018613f643ad1a9be0db40b8299_1587119868282_0.5131736353370715","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.1":{"name":"@balena/jellyfish-client-sdk","version":"0.2.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"a1e90111115e600416e4a52517b2253eed04e6e5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.1.tgz","fileCount":15,"integrity":"sha512-D9wXQuflc2O999AGVj2WpUI136o5Xy97w5mXsMFmBMaHpNsuMce6A4/hqn5rr92ssfUMrePdSwmfvwutKG6omg==","signatures":[{"sig":"MEYCIQDFu7DZr71in3rhpcOWcKX1tjnJrOZLOJaKbnM6O07UwAIhAKV2rWyFrKMreXb8XojT9mKk0Anpd385y5hjjEH3TQH5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemYkFCRA9TVsSAnZWagAAaeIQAJeJJ8bFoMQlIQZYbgQr\n4B2N6uEG+PT0rSZKn4tdD+5YQL3ELnFlj9MInkKBVJVRdMSQQXcZqdGmSq7+\n2LekSNH2hy0WDqcdGIcBY64sQYTO0thtTvGvEwyyDLmWdG4AXr0tfVyJ2lCx\nXN+sYHb6qShWq+QMkLMyUqia4Go7jRGHXzBtSMhc3Mw67aY+dbrU0LDLGvWF\nUOveCpeNC3KtaTK2siiPj9GVBjgg9w4aQz5HNs1xXHOBcrNO4/gIwUOf2Itz\nSXw047dm/pdO8HCI62p/rutzbTU6hgMpthMMgynArk5Vkdp/ILz6kMM2cE2I\nnGIb1iqo+5OCTNWYmuC3YUuRDuCGO+Fzj273sY0GBY2864+c9IiCxzcCYv9Z\nhV7E2FJEl3sm2UvuRvg92FJegA2Xz9B6GxMr4TlTKf3wcsBcVh73zey1oxql\nSVns8fngv6aZS8SiEtb09dwcsTKHXa9OveIG/KF9k/pn7Gyd+Ze8hyDuzyA0\nyLkZ9yPnVbDYyL8yqaZMPZo1tmQZ433AbMObGbvgy/bvee23TWKFV6whW5Cx\nuhyOaN1vyVC34Rj7FQr3CbhFkgL1ejkSkZJIm+ASW8/djwFxo7X+wB8ltiSu\nCE2/81Qa5g/yXNOWESzNTyeMegwAl3127oTqGmuPxi0/ydn1oEAXp4eHc8rE\n82il\r\n=nNrx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"376962925881bea94ee190aa23aef578a61a0ad7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.1_1587120388278_0.7921321819429576","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.2-lucianbuzzo-remove-unnecessary-9-db62c0d836bf23fae7cf4d49cd163bab792526a9":{"name":"@balena/jellyfish-client-sdk","version":"0.2.2-lucianbuzzo-remove-unnecessary-9-db62c0d836bf23fae7cf4d49cd163bab792526a9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.2-lucianbuzzo-remove-unnecessary-9-db62c0d836bf23fae7cf4d49cd163bab792526a9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"c7a59493f83e09c6b9c549d055871a85cf1cdca6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.2-lucianbuzzo-remove-unnecessary-9-db62c0d836bf23fae7cf4d49cd163bab792526a9.tgz","fileCount":15,"integrity":"sha512-By4b/mnpYHv1tYz25xx4L6uNPhmV7CYcsUDvBNPiDQe/FpWwifSjb+mwqAjdwvYv51TcYgxhKCk0fpwZBu4Glg==","signatures":[{"sig":"MEQCIDjay7IRHYKEZl2w05W01IqKK4IlwF8mDPSAK2o1RGMvAiAYxksbvTqdsuGJ7oGCkt9NuHNU/hiKep4MK8XsJCIsVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq9qpCRA9TVsSAnZWagAAwCAQAJdUiBr6EY7QZok78fs4\nisZMJz8doFDzFOhAB9IAe1BR5KGhIXa+g9cq2DzQ7/2dxo24R8kGjiE4wRTt\npN2YEqdxOIMFwl7/IzZufhtR4jni0p8Vl96DBRztDJAhi2K0DpLVdCS3tS+N\nuc+1ZiZE1Scf3ydIo/difBnLEYmiKpRxRgT9hKULiMWAn8z9JaXv6QKGXnKL\nz1QED/deUY1XTRba7EQEenvmVu1BXsW4qLctm/5h8nVcm+x1cR0gBeppFrN5\nFgt2Yl33FQkB3LhP7eZPqPyNjS4/9grG2b3zjAiCtt1GfxHEu2Wh6JYupX4f\n6WEr1asXgGHgbSmwbNmxrq+PZLTDtbTM++cssZ+RSIkSR8DqIYgMQWGanj8c\n5hfmCzUPq2ab9bcerfn3orpSeP9jmu56spWzhBTZhHctAgFE7Xgj5lv5dCli\nfNVAlMq8imv257O3AXT6osCQH324oyLDLMuviF9tSfNCi8E6n2a+CL6wlcJn\nPNv/ExPtKlVJ6Y33EVkPrIznz8ED6WgyZmxy+/hPXLrHI5TD5oXSo7Lmkjsp\npTyed42p4clHPIjjX8p1PtJr/9VVmawnbPs/W/FB62VBIrl1OpXcyp2jdhDx\nXX41XoK44HQtlCfOyRlTY115gvJjyL8vhHTgpa6Sy9znHi6jUbrwC5tVMr0W\nqeaN\r\n=0R3b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"db62c0d836bf23fae7cf4d49cd163bab792526a9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.2-lucianbuzzo-remove-unnecessary-9-db62c0d836bf23fae7cf4d49cd163bab792526a9_1588320936929_0.9833656229174523","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.2":{"name":"@balena/jellyfish-client-sdk","version":"0.2.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"9c572414f5dc64c910a8f8d408254411b5bd0fae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.2.tgz","fileCount":15,"integrity":"sha512-8XWTNHRP/NE7Hkh8JcaH1v8u8vS7K+U1LaxD8S82mpvUtXr7vwVUnXqSTh3n7ueeJax133sfKr7LVSI/Ad4nHg==","signatures":[{"sig":"MEUCIQDdKhrg7kM9BOkq8NnVWrppTafrce3l/5YFl5DOL/G79AIgXDUIEIshDkJE3q3IcKm4uzvyeu4SGlluLAKXF/BIxG4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq+r1CRA9TVsSAnZWagAACq4P/3atL2yX41CcmgTRp+Ua\n3VYuw3z73DA/6+cw+3ucZV8RFyigZkWS1OmgTkDlJUNFyeUS7sdMnvNPR2/K\nhEM5aq3JWSPIQ7LP7XrQTDAQwl7gSYEcE5640vN2GjV3YZOw4kxaXZCYq/8E\n0eQ//+hTr4gORaiQKybVLb9t+U1HeOF1eVL9teew9BcAUI4Yyr7eQ6xiJl3v\nFIg0yJZjglFEPmPTPsR4FMPA7SKTfjguDLIzF2Wtdj+bOehkQDjnY7YvLRxo\n5T9j1D8Fe52NcNgUiV7mh/tBoJzzQuUmxHDmit0bYMdLOkdqwxMT3zHnFSje\nFd2wuF1fOfHini8sVxCFN4VBJXv95gr4lQkpXs61q+u9iVfHpCBAlvRZSz4C\nqNbw3xhVaB2x9n8/lSBc9j6NGFYl6obPQHc8hUEfBJR+9HlMyPDeI5sg3ZFr\n/ZanqO7703f4PiGXKn4kiJQuAAN1ThRzpoyIakslfwsOXXmLgnQhTm+Wi9xc\nftVTnew9fQjAJ33yb45gDsalxpnntOI3i+rEpvxyOjP8KG/jJeItYe0QQpcf\nvkU5SNcJyM7Y5kf7M85SBRTDlj3t1/jpG8yLw4yO0WtRgE8rZg+oDHfjYIK0\nC9ddKJN7JFahtLPToCM53NHArVyuUGV1dFgLuERuS+mjekclMASwl32nQk+T\neix+\r\n=QGqP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"4fa8c87c6188f8fe88c8e3622e729f67196536cb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.2_1588325109180_0.676208178229978","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.3-lucianbuzzo-add-required-keyword-11-59b975eab54c4029fcfd3ab67ff409fb60180b27":{"name":"@balena/jellyfish-client-sdk","version":"0.2.3-lucianbuzzo-add-required-keyword-11-59b975eab54c4029fcfd3ab67ff409fb60180b27","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.3-lucianbuzzo-add-required-keyword-11-59b975eab54c4029fcfd3ab67ff409fb60180b27","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"c9b5d8115f187dd1aad60138808ee20cb42ea65a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.3-lucianbuzzo-add-required-keyword-11-59b975eab54c4029fcfd3ab67ff409fb60180b27.tgz","fileCount":15,"integrity":"sha512-Y4Z0NhPLttAFZiTBOJZrnr57dAn94N77SyihIHDdBSv/23qPW0dCPKCM7jTfkkoPhb8TqoBgtg84NydTORcZFA==","signatures":[{"sig":"MEYCIQCJMAE0CVBZV9KerOAWzPd7jGe05B1RV4aB2TwV4ZjANAIhAMqb557GKQPJRzFn0H9On6RixSQczuqjGjEHYKqF5JNY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesTR7CRA9TVsSAnZWagAAHnAP/0zyyqZFPii3u+ZpVJi/\n6OFc0ypWisUiVz0d4gNsmwBXNIDR0QGnl/RlfPE60vStRpLua8c1okGMvL36\n0bSC+qSw7cEYE21Phs/snTa37USeQeOgZAaAmGc4cmyfp9mn8uxNQwhPstWa\n0+oP9+Q3Z5Dfm169Vpsk1lFAw3UN6MzJOuQeloOREeLDbnzT6cglVo14a1/0\n+Yi96CwkeQnizyNCcNJPrr7TMzlMUt57e52nQNUAjMzYdrM0LRhTt1B9fIkc\nGqMKFIHQRuv0AYzptabVeF4iQVWkZTVq3yVtbXF487ZcvGuPdqlzAi5eTJOK\nRBohn5sThAgGJXEvXGz55RoFzKr/jGJ/F5J4q0ZNcywz9tXaw+XV15Shsz5P\nw//2jKfzDJn7piV7AwKdQjxv4sOsueng2gb/vLOa5az5zOg7dYBAggJbcsoC\nU6D+cKIF0BIpACW25ON2PJcylMy2jkUqz0rNrZluuufRVQN3n8K/FCoWGC6I\nd2UoAnkqFQaudJXqELobVnFMUNWOdcfpdOaljETbjpRDP+WT/7Uoz5O/F/C/\ncIMBR4IKynjrwaFCQ1sd7cqh+sU7ylccocjezmB2FEKOXs+bZ3KuqEKdx/6S\n2bl5ZJ00ZErIFZ0E+BeDcB/+Nb8Pw+Dj2q1QaoiElyhDAOCGEEhmxcWICM0l\nW9PI\r\n=ii57\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"59b975eab54c4029fcfd3ab67ff409fb60180b27","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.3-lucianbuzzo-add-required-keyword-11-59b975eab54c4029fcfd3ab67ff409fb60180b27_1588671610576_0.9224503832165085","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.3":{"name":"@balena/jellyfish-client-sdk","version":"0.2.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"3c8eca564bdd4325fb25e139ed7e4af3bbc35610","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.3.tgz","fileCount":15,"integrity":"sha512-zSSIg8fb2j0Td9VOoCzUmd0YdjKf3SHggzKZXB4UfH9sTvYZXq5kknAwhQrp23tSl758YuxE+HO0qez3O1dtZg==","signatures":[{"sig":"MEQCIBA1CBPd+hxxDD2rox4yNmmdEvCq1iBEiZqED8eQGvFlAiB13loAhh4Dzhe5YVXGKBbPWuY0rYfRPPSY9tKUHSqlEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesTcNCRA9TVsSAnZWagAAYwEP/jFmu6iDatYgbqS4jH2E\nevp2gCvLIBd9dHCNO1a8sU1F/l62+a9G2DGxz1Fm7Rocmgb0UQDPw3r03Yg4\nJM36CVP4QU7P04uHJCu9okrYFincdx3RlbFN5e4t5RPmkIJLOuTCH1KCZYL5\n6h69xRAcDdS+9LV3kycP1HnDvMTg3uVy8lRBNApsLWjRQEzbQXfaB69DEijC\noXDGj93rhCkleDe4gO4vKAjy1IXVOBkZEztBp6II1gBThwg3LS9eTIny0n1t\npzHaxZsmmGXQ5kxnWnCPIxoXlxwlmSpHuA43AoNHoM388nzFW4/ziyuORp2E\nTEcvlSt2Rz1AkKoiwheGaSmfRq5mnRwkZQpwV7mPCholvhN3Y43bmQwkU3Yy\nALWsJ0PGpF8OvEauHm5YjpEak7zjpa/M1Spzq2U77/Q5KkcNhI/5zWxh+TSf\nEJIUbIz2At+s95UzQdOBK0qAJ2Wf4N7BBS1jjNzDKfoW07of6G3fwALVzMxc\nBY2t0x3M57Bzw7kZd7UaoaI/6eeTXZxg6q/Jvf9gnIki41v+Yvp2jHD9OSoL\nfR4cfHpZMokcBjXnnPrbiPhjWqKI9nRMnIZI/0ZTuAaROXS0265s+HpXL4WZ\nXI4XLsnPgg+N8Sil1ceANOkl43ENsgtTuZAFJ1ge3+HdQFln+N44EZmwqvom\njaBx\r\n=ddRX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"d51cff14e7240bf83363224e23c89aa83a100551","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.3_1588672268568_0.07858071737628247","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.4-grahammcculloch-uuid-v4-02d8f3eea943df4956d39acff39c785a6cc7d0f1":{"name":"@balena/jellyfish-client-sdk","version":"0.2.4-grahammcculloch-uuid-v4-02d8f3eea943df4956d39acff39c785a6cc7d0f1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.4-grahammcculloch-uuid-v4-02d8f3eea943df4956d39acff39c785a6cc7d0f1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"74c874665110a6255a5ca3024499da1832072b23","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.4-grahammcculloch-uuid-v4-02d8f3eea943df4956d39acff39c785a6cc7d0f1.tgz","fileCount":15,"integrity":"sha512-PdcPOLp7IPdmWI/pq67TtHGOoUoauj7Y0tmxu8S+zhoNK0T9w5ZroZE/qKziSnT3mrYbBElb5c2OecQp2C5csA==","signatures":[{"sig":"MEUCIAM15jlHAnnywMUGR+J+U30m1zxQ5WXcShSjyy9O7udTAiEAu35iUKi1qEbG7UTcJZ987gghDiynWthCmWpwKNgh5IA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes3+cCRA9TVsSAnZWagAA3noP/iuQsosIMSCtyX5hI9as\nJRbH0vaKMTOAwIylqGIUZHAbg/m/MRoOT7jJ8Dya6MbidxhXWt8pCe8fzS20\nhy8MXRZKYNJl9IHXC6vK9A/XsyTdC1gX8DhnzXLb3nFCGmzpAXL8Sj2cclQ3\nTstlFVA8kWIItFI9q3285qSUGCXCXJf0hegJz09m4Q2iTA2bvjyE9vh/JYQQ\nJvtUS+vMZ3/IQtiGN2WLcJcYmr2DuqgmHNJXFDWgzC0bYqpAtSTtZudt1FLX\nnCeE+p0Pb/bz8hPnyzoKxqH8doTcAhFIgIH2366V5o3zH/u/2nWCjkimRxfF\nYKU+lkYhza88GYQ53/pz66XXVpiYGzQBpH8c+Yy4hfAQ6RiRqR8raFWrh6gD\nv0ulw11SMrZdP1MejXg2cokp3PxLFZX6e4YrFzG/hPoQFgQDifDvqL7RSBtV\nNktvkQwxDpr4xSJb65PK4k0GNezFeofjjmhgbkagjwYXGgnRaKObSInvqtZc\n/dl2JGYJclzShajmkgNVkz4xdT5u4tHMlTw/2wGXiCiGxbUWwnVfVfvPMBJN\nMLkkvgpztKNBWdJn8jjsvNPeUIIg9vwUAavIVKTAWxK8PqkaPl017Le3EoIU\nYHWkAVOxlLuasiG0hYWYXip1Su/Xwh0wlHMQOoeFEba/2+lfEJi5pEPNrUBq\n5Rcz\r\n=nFAq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"02d8f3eea943df4956d39acff39c785a6cc7d0f1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.4-grahammcculloch-uuid-v4-02d8f3eea943df4956d39acff39c785a6cc7d0f1_1588821915618_0.891107644616733","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.0-grahammcculloch-sales-thread-ownership-bb03406994bf7d572cc38cda8af8f206140ee0be":{"name":"@balena/jellyfish-client-sdk","version":"0.3.0-grahammcculloch-sales-thread-ownership-bb03406994bf7d572cc38cda8af8f206140ee0be","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.3.0-grahammcculloch-sales-thread-ownership-bb03406994bf7d572cc38cda8af8f206140ee0be","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"ee4eecae0b3faff333ccd1609d3f188b4c591ad4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.3.0-grahammcculloch-sales-thread-ownership-bb03406994bf7d572cc38cda8af8f206140ee0be.tgz","fileCount":15,"integrity":"sha512-wjVbooxFbnrU5Al4+GkXi8OBjKRng87bv0w0vhsFG6AjrwdQe7M5kzZjkhUIuBiqKtdjLMtPQmyA0lIeCEGTrw==","signatures":[{"sig":"MEUCIAKNJGzixuibwuyziHE3UQTJwro8uwrrz6S7wOYEAB13AiEA79cttVks74wZlyTI7m14qmwPxvQGlhrORzLoioChK1g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes4LHCRA9TVsSAnZWagAALnQP/3j9l0IHlrUO/0mzSO9R\ntqPLVwDwr4qVKCHHAqhvkogJ2wvwumBVVhvzigmlzG1dvc539JFu95VSei0K\nPNZ61UzxSTFWFqksdhQzgr9EseCpxFPyq9ebRRyGzRT2bJAXG1nMy62dY7Hl\nY1Q1WMomgNzp2CDaUwvcKmUB5+Lpe+wtYs6D0L1LkWl8VOi5oltmAi6wjbfP\nzlXqBe2kKHRZPuq+44+xGvsjQC4glUxVMWzCFsW7sYl1iLIk/eqi8jCJ2/hh\nMP9Bc0CTAbAPerSekzHXaFoyz5TtXqV1PMfiLRiG5kuPQwRqHvOQxTrT3m/G\nCkn+HRVNBTB80bfiu0RFWEPWiVsQ4ZkuUfuhniPlpel737tNm56l1U0v60iI\n/XlQRptl+T5lz9RY+vYU5J7JL/z+QSz7l+ecpHNxJPo9NNJhYZ6+bb483TMI\n3m4fXuUSjp5Oii5Mdb9gKCZ+Vv7YUP0a1lXwJpvEUWf62NeOO1eszOEo704k\nUnJ+WWlM/agpQGf3coviNr4L/XKke2c9x+kTqbVZbsiYqTqIv9jXuqQ1aLGL\n3tAPkJJRyPz9ZHE0bNkfpfv6+Vo+p/iXyEZCzMJA5pzDYX60wpWTh3EQqf5R\nfYVH5ITxbtH3QCetxyzEnvu6OiZSwPNhjjsLk1VnzqnWwS2tqoHtk2jZ+jKB\nbykS\r\n=F8xd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"bb03406994bf7d572cc38cda8af8f206140ee0be","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.3.0-grahammcculloch-sales-thread-ownership-bb03406994bf7d572cc38cda8af8f206140ee0be_1588822727071_0.39738308530607624","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.4":{"name":"@balena/jellyfish-client-sdk","version":"0.2.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.2.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"4d4bd263fe058c14af458b11712777474e49e94e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.2.4.tgz","fileCount":15,"integrity":"sha512-X6HmUfBoKVakYnu0p9pyVexwixGfMEC+FOTbsKroZowEBOd+moHcyMXyVlHPEx5MxVtmvv5DVDgG+ZsLtt5ISw==","signatures":[{"sig":"MEUCICS8/XBeZ8TUKMjxM14fzF7Kov7wjf4/shU/WaZIkBijAiEAtKWEjyfIJ/uELGj5aVYKlMSj/uT8l1w06vPC5fpni7s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes9nhCRA9TVsSAnZWagAAytUP/2WtX44KACl0QAPaWbRy\nEJuLK3Eg7WkMEUGNTq1C4v5+wAYS1tSPEB7uVNcyZWLm8ba7z8JftWMkyF2O\nrah03jGFI+y8ei3lKFdK9BUo7L/oadpXC6SW9cwDjqpeVmZ6cjTBYWE6XhQj\naqOP6lB/apMxF2yvli0HOwJcN2RJLid4EbHgyhwNCQ2QGpdIYxh0GK3RrSvH\nDDLEk1CIlnwyhD14KK8ikhrll3WyC6V5ZFFlFDWlaHdhEOMd0+SAjnlIRn3Q\nL/19JgVaRy6lnlWj4ktppMsEDOY7RQ/HNUxwVsCrmvwtxL6yz2TjAeafTpTZ\no8MZ17o1qorOfP2TwaPFlVjVXrv+GUCkH5Pu11MQI9OjH9d5+ftjZSBKv7Xd\nuUiZRYa2cz4Ud4F7teu315H07R+/48fzYzko7q9QSzJvwucVpxN19zLNPETk\nMbMklKty6lesVBU7fLTThz4ftYs9W2NM1wn5oqrnmRc8DKbqz122qJmOi9T/\nknhbPFCFBwYofDiiDNF3rxNMR1aXsraoABOnvW1RIJDE//0vWe6QK5v5Pi+Q\nNNF6ovKyXVXvZNs7KyrieLG9XTE8/svJAlNB7nTJzQSSAYFEL4wsng7O6q/X\n691vs3J9NCjjsI4hcD8jLj4imSRw+ozb/fHGp+IiRlB+ixju8iokvj4bjSYU\nhxxC\r\n=o3x6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"0ca8f33f7a3ac59a2141b6ff61b19f41989ec25d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.2.4_1588845024831_0.9421582017129544","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.0-grahammcculloch-sales-thread-ownership-34437fac279b8d7135fc68929d26342ad2b5deac":{"name":"@balena/jellyfish-client-sdk","version":"0.3.0-grahammcculloch-sales-thread-ownership-34437fac279b8d7135fc68929d26342ad2b5deac","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.3.0-grahammcculloch-sales-thread-ownership-34437fac279b8d7135fc68929d26342ad2b5deac","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"da9e65a21b3c93496b853130e8ceea6f05480a55","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.3.0-grahammcculloch-sales-thread-ownership-34437fac279b8d7135fc68929d26342ad2b5deac.tgz","fileCount":15,"integrity":"sha512-UD9UC9ufKmjhyTI2bsXBAQsr07ekvGlr4DJbQ5p9zuLMqsbB2Ss2p9NulUluNllFBUvhq/SVUrxTTO9fTeCxxA==","signatures":[{"sig":"MEYCIQDRTtbmI9xZ0uOF02MT6bhUfnIKcLR9x3uTUDJuX8uwrgIhAOx3jWJC1J8jRCV8yR1jtYcdSYR2KOHtxy5G6vx6nn3f","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes+42CRA9TVsSAnZWagAAijoP/RWybn0yxC4dUJoJtwg+\n+7MMc9bDg3HfsJfMPgDQ3OW4teQcqn9d6oJQxxSywaeVQUpZ+tcPvJQhNYfn\nqXFurDxT74glMT1QzY2+ZByAsvCP7XIHYD2zcc7O58mmSFyatIx/C355/M/W\nyHM9hzO+PqKL3qVz++yE7JboKy11kNVm49L+wuR544x1udfcpW0fHmWlPEf1\noWdUv9waXZ7xQ2q7TMuz3VKfvm1gORuEC8Mg81//FCTnbcEI74uqQ95yzuDQ\nQ6f1z3tybqdYtghBIv0qa1orbgEqwXWf8UYrnRsWu0V80xxR6XOPl0i6SA3R\nwpyTGzfD7CduPZsFP8TyXObToGHhLO2Ds2Wpl9cf2Cg2Qai/c5fiZ7yB0zKH\nfzAhrPL2RcMuKd8Pwixi6kV8cDF/otxEhTTaT2abmHEEOXmKGuEfUZKUrd39\ndo5L9KCWG2Kqm2IXBcI5AZkAgjkbJrnrE8bNfcUGoMmQkr3juP1uTREdLtU3\nKpSlsK7lrngnDZscqON1DxawZ1EJ4MT+UGscj2xNHt39oqcF2tXyk0kSRjw3\ne8SL14Hj3Lp65tqzoVezxBFml8+KIh9RXXnLI6T+Djol35Q/ytXlLATSG/o1\n7SQHkdlZhUV0PLEuEWKt23ctUyib4YJHB6YTOjbpoWNbGVV/hXvHzNd+Iyin\nZsPa\r\n=udWr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"34437fac279b8d7135fc68929d26342ad2b5deac","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.3.0-grahammcculloch-sales-thread-ownership-34437fac279b8d7135fc68929d26342ad2b5deac_1588850229900_0.7743931187595743","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.0":{"name":"@balena/jellyfish-client-sdk","version":"0.3.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.3.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"afb4dd3f32f22e8a14c6813dcb38939c760c8a6b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.3.0.tgz","fileCount":15,"integrity":"sha512-/0HE1p0NhdhzeTiGbprv7ItQ6p/hCYb+TCch8FJ+h2B2/o64olag+VKPkFj1cm59stTPRobwmkVGSy6YIONo2A==","signatures":[{"sig":"MEUCIFsBReI5INz6dlN8ixtvqGAj/95MZHpl57t5R0g1T67vAiEA4gSfA6C0iL37j6NGKBPrbVJdWSxzOt95nshcgBsZC+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes+7vCRA9TVsSAnZWagAAnlYP/2fDwE+yZkjtvyJlvSM/\n7YT7YfLdLWX2Bdu1bpfjhrEMLSf6oYriYBLqBL6FMBaSWPjTRK2+Zwp6e6rZ\nwzSCj9/GX/Y8mXd3/SrHOLUmtQsXH7orOTQcfanQLBHw2u+eDpe3j/2ihhLd\n5o7xvI8NzfG9KM9vBpNuJGf0rpkNjfUxRgPlK4aSSZUH7Fd7W0hLEyeUUjAj\nvYW8M+Tm9zM8JqTnlp6FTNgEGrtIpyS/l9600gLVmzI9Idz0XfR5iy+7A+Yo\nYdvSe3R23BZwljJ3mEMYq/ketifb5nenzdnakbhYv6emHwiIh5zLLr1WTrkr\nKvMkuzK6L9sIFKz8hkoJYnAJTyx9g2RvSVAT5dZef0DQc3NjKD1vqxH/dmrp\nVVFUF7dtr5Xi0DvN9bVMDgGRXl6XCBBlFwB/iIu6hrqKQGMVXdTozIq0DguZ\nsubgxa9CDIvY3pSL2D8W43ZlAFuIorInG1fMVsofwa1x4aukD/hkkzPEQURI\nxWdvCDrhwf0PgOtM2oaX5parjkMpdRyOakf/B6IkQuCMlB/5w5DHQdNwHhNf\nH2lrFKsGnEadbhRLt6JLeOnt2X7sfLnwb1Ym6TgRUrHOxbfJwQRGK/NYRxlL\npsF330s0Shkv4p6J9n4jlSCB02JhhnSbepHdkwUyjey2zJSsppPn+d+maoEw\n9DSF\r\n=x+Pv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"2bb245bb99a07cb9dc5cda3b2850a9b0ddbafe93","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.9.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.4.0","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.3.0_1588850414448_0.2728630881495411","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-lucianbuzzo-define-a-relationship-15-63841847e271c495d7afb4fb515a3ea80fb996e4":{"name":"@balena/jellyfish-client-sdk","version":"0.4.0-lucianbuzzo-define-a-relationship-15-63841847e271c495d7afb4fb515a3ea80fb996e4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.4.0-lucianbuzzo-define-a-relationship-15-63841847e271c495d7afb4fb515a3ea80fb996e4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"eda1bede1734aa6e5a07db242500f0fbc7eb7637","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.4.0-lucianbuzzo-define-a-relationship-15-63841847e271c495d7afb4fb515a3ea80fb996e4.tgz","fileCount":15,"integrity":"sha512-nsJ+gKHl+YILmK+B3wv74MUEpMta1+E7P4az229UOW5i399ya9rinNdAdeA/oBFqVr3/fA2opsICkztGgSEPvQ==","signatures":[{"sig":"MEUCIQD1goNJdppRUaFGN+6PLsWj5/R0aPF2LDIUNkbMYlBOeAIgD7wfA+3YD7In9ytEoJWG5XsJRdk4M6+Y9Aqq+MQ7Plw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110901,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuT5jCRA9TVsSAnZWagAA6EEP/i9webvCOM0GfpTMt0Ei\nPEX08xW3SIZtWvs5W7Qkzt5BseT45TlpDhp7qJcbo9wAmF40LfXKMbYZgLCo\njex9MyCFV2nNLD0crdUtonBPdmwUCHBV5liQNSh6s6IUGyowxYGXzKtFOTnx\ngTmbeJlC/6NowmjUQZqYKaLwnhaet77ydaX1/RgDlOld8/5Wv24S4yn35KeN\n2ASMsXskVIUljSsK/OgFiglput38un17qx0N7Zwzo6qmoB6JwsURl17rdELw\nStUgBOf2Gryz41Xxru6NjYfOFqWIg6kwBf1ejuj9GVFVr6ULzt+5l1SgTQtL\nSow5Vw+mu1ylv1x1+79KuT7D7p343IksgdI+jcxBhh30rBBXXg1H8YSy0wpy\nMymJ2347fKoELecn0LLS0ZrLAwulCBOhjy2XjKZqGIHjz6Q9Y6bQ9eJoZ0DB\nyKsiJuGyrXloZe0lFiEe+h19uNuHP75CPeBTQnvxznebWuLpxqHiGM1OgE0U\nTWDXb9zpOeug6J3I5EiYOJf8U3n4IzX7KGW95eg5AQUPxoLU4aplcjFfsWxM\nWbwObrQ2S+j9v5k8BAMQRmiolg85iem8kn/hMMjKg7XAOPl9JLMvp8i2pm0/\np93FJeW1qzG2mEIvi3sdwk6klrjl/0nqXdHrqwg7BrdQf335iaymhnIztRSP\nAk0+\r\n=Bdj6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"63841847e271c495d7afb4fb515a3ea80fb996e4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.4.0-lucianbuzzo-define-a-relationship-15-63841847e271c495d7afb4fb515a3ea80fb996e4_1589198435369_0.16582380156572252","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0":{"name":"@balena/jellyfish-client-sdk","version":"0.4.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.4.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"c4fa8732f2f22b4663e59891a74ff60ff23c68c0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.4.0.tgz","fileCount":15,"integrity":"sha512-UBn1gA3t8Uavxl2XJXC9AwLG3VGl8RpJ1EYibdAnz42b+HZGhKblI4uP2P2uXw4o55SiNrBP3CwRypvkN6LTWg==","signatures":[{"sig":"MEUCIQDHwrNy3ySS32t6lOcUo0LCoQ8Mn0dENoYWxhVFbtXyeAIgcBQBCZpO+tzK7KYOIN+0oIFDIo3N/pRgAStC96UhpGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuT9cCRA9TVsSAnZWagAAVUoP/1RgAMo/sFoiLz8yPQTM\nWMH1h1aNP2bmOV4OuuaJ4dzDQdincRxg089Hv8QeK0R5iWqWGFlXydvuV+JZ\nGSXr5gLl26fh2SlQWLZXWIEkfNmlpXzJhJMjglRquKflnPxeDpyIBowkmjx0\nMzK6gHk4RmoirN2shubaEKmJMXeKc1ooQoMMQXgGGprB2FYNovqq83WguO2H\nM6mvp00+wE6q9oy/FAU1QW4L/zKqQi+EVm6c446E0Em6OpU9V3Paqt31/V4Q\nsKFD9GG278A9QS/ACvW4TAn/2+XDIYRhCD0PaxzxhYCrdalDqHN3zmbPvYBe\nCChT2z/1bz7Cn9QSAWEMhzflAPVMoGoQIDfDxqZ8/VxRP8+wHUaFVyrTMv8F\nzdeXqB69d/UKKwgEAvwVgPcG5ZPMmKF/bbuAz42p+sY1wyUygo0kpcBX2IQa\n6MSiQ5fRIJVnBYsFy5GefkiM2k4/15Ex6OG1JcORwsmW99ZvQ6agZHAt2Xht\njBhWu8UdqFrybedkO+cSF+qVThsFwAPBz/koH7GwqP2kjNg0/dNaUphVVYci\n1FrR9WEakPLyOrT22jE0s5nGDw20Q5m864lAO8EkrubD63wJGYvFxrsM4r/m\nKIWODk3svudQ5vn/VH4zufNSwME7qdZvNAuYMNsWFOrsY1NZxtdrW8rPay9o\nYb8Q\r\n=Ow/1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"41a74317e15252b05ba897377070b85e5261a958","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.4.0_1589198684305_0.653596977984559","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-group-members-relationship-b1f5853b9a0aab4423b2cfe8c3971859ba5d5c8f":{"name":"@balena/jellyfish-client-sdk","version":"0.4.0-group-members-relationship-b1f5853b9a0aab4423b2cfe8c3971859ba5d5c8f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.4.0-group-members-relationship-b1f5853b9a0aab4423b2cfe8c3971859ba5d5c8f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"6d23e37ef7b39d3938c15e276e665ad82ac2ee20","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.4.0-group-members-relationship-b1f5853b9a0aab4423b2cfe8c3971859ba5d5c8f.tgz","fileCount":15,"integrity":"sha512-seG3IG6fsADmw171Wasfn+kSZMTH8u1jAQrh3B9uL9JWfP4BXUPD5e3OEeRaxUh0wkc4W5d3ZBJESL3RoHIvCg==","signatures":[{"sig":"MEUCIQCWQbDq/Gv247EIIVV/f98NGyI24ruyK587k5Q9U0pePAIgUcBG/fiCHtJ9jizpB4mdKdZ9Zm9xaN4VTOLzzsFaOEk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":110897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJez2X6CRA9TVsSAnZWagAARCAQAInQFiQy0qjEbR8A+R8m\nTscqE2JT1EgQoBx3zLVZqUQE6GCh4Jfr/x+w2JvIlK4m6+aFFpm13rrtAiTt\nJ6ogLT0HXqGOVxypyThW84yJAAIa3+FUFtCoqPOEp2zA/3vGIAdkFXfaRUxs\nrL6dqxNrurJLyQNufY2bgqdaBvzQvaoyt7qrf20viwNe3pWNn2vXMMHm8FWP\n/2X0trxxTQZDnarAogXjOpXlIpIhpeHtXcG+9YcWQp3kLBFRpweL8FNsyvYw\n6K/VGKVDJfMYs+NM7iauweRXxnrqq9U/U/aWI2SnopcWocG2cxKX7pxbNdiv\nkHYYxyj8B5ABMc0UlQ3cBfyXFQqR/BTjr67Igz0LRHnjAgCRRzT5r5768WA+\nD+wJ9jq9kd83YJNWoiApLMZK1w5F3m477V7UipYb3sG9+iF2vQxczhB7BucL\nhwJN1Xrd6B7lZMBeedQyvFKu+AFP70HXJA3IpusnwoAlHfl+q9XD/hR7Zd8i\neT4Xn2ac5nhnQgvPGaUvdJJLbRxeeeg41aXe62KpljUkBbkmc7wofabL+VAA\nX8k3Xr55HR9aCaAuidiYYavuYi/E9N7WU8sUlY7lmS8mFQ6F9wN0LrKJbV89\nJuNANdF5WXawulbbWEsf1m1PRZ0fgt8MSEDWbqK0A8JCFl8k1i5UvrywsLzt\nJlCf\r\n=AXFH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b1f5853b9a0aab4423b2cfe8c3971859ba5d5c8f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.4.0-group-members-relationship-b1f5853b9a0aab4423b2cfe8c3971859ba5d5c8f_1590650361616_0.41608862686374404","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.5.0-group-members-relationship-aa85982ae6eace98eba4abea6e02ce9e67448b16":{"name":"@balena/jellyfish-client-sdk","version":"0.5.0-group-members-relationship-aa85982ae6eace98eba4abea6e02ce9e67448b16","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.5.0-group-members-relationship-aa85982ae6eace98eba4abea6e02ce9e67448b16","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"aa302da79f9451e8c692fd3ea8b0bcb41eefdc36","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.5.0-group-members-relationship-aa85982ae6eace98eba4abea6e02ce9e67448b16.tgz","fileCount":15,"integrity":"sha512-wi+E4K441PVgG4oJtewCrFm6MefaTrqEqy6IACdV4zo/+INH9uQk7lf5wvpUOtvPy/4KGpvsZ0VX4ihrVlWsAg==","signatures":[{"sig":"MEQCIBCTFD4Z1LquIWB8a6yhKeNEmoNPywXNwo9MILM/KZ24AiAxyysbAgOmRfEGLMPunWuDTNVVldUV+BD3g0fkIIn8Pw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":111397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJez4GjCRA9TVsSAnZWagAAnGYP/j+9MvLR8RbeFbAjkdRt\nu5wnvEdol+aPTlrwfsgnos4gTOJhfDJ5cf7GQhVsR+oOjONWrrGDr2b+DiIi\nAOttmyUw2IMbeIKY9nZxKZsIQbqDqPhrjdh27Z9b+zqPptnE5GixdNkqEr+G\nVF+D9GWJ1Q241ZYUM6J1exip0GV4wyhc0EY7Gty9U3iPjJl0rR9R172XQpV0\nZkeeYVorNaYU39r6D3sStBTRB8Qd+TekG8Uce6yMr89uZAxHSE6PEtckuhbp\nBVlxRIK2ybGaWXU1hkqCxfzMtDDXZn1MZo0f6CHcEjmTD6siqdb9hu42N3vC\nUYTVh4hlL/4Lh5K+Cc1XCVLy+O6/IAwApLFXSCPntfzHkd+GKJVJzJpAztD7\nP6WAN/UZChE7doJp/iYwAQt3PIHdj6Ui5EPPED/SLkxJz/Aga4mT0IE++JKD\nDMVCAx+ThpxVuicOet/0GWXiB0p17n9GPUOpStWKUBS+XOrp4QFjHABgfvMj\nY0U2bB4nQd56pGf4x9kAbG3HJgQsRiNX1rjis+xpv031l3z2WgKc1r4iUReK\ngmClPJrTXKP2/AAnNm4veKIzZ6Y6cIY3nmMlS7o0KFVFKuPAHMuPc9AeyCXn\nfCPzqcrKYsfuEQ9Gk91W1l+3i/yr2G+GxmG+H2A28l9BcjCbNscJ2LL1EeGm\n9QgM\r\n=qIVi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"aa85982ae6eace98eba4abea6e02ce9e67448b16","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.5.0-group-members-relationship-aa85982ae6eace98eba4abea6e02ce9e67448b16_1590657443233_0.6411632761631256","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.5.0":{"name":"@balena/jellyfish-client-sdk","version":"0.5.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.5.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"927badf2968cad124936adc644778f6fa1e32816","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.5.0.tgz","fileCount":15,"integrity":"sha512-p8Ufc1qZeVXHD+d5k4d6eaIiA8KnDN+oRerhlXEEv3zzl+ux31DMpSogDZI8FaTwP09yBsvnfjRQ7nqcpZInSg==","signatures":[{"sig":"MEUCIGAOJe+TOa7GjJHAPE0cFQ8hEIgRi593a7InHNZ9i9EqAiEArB0t19n1JQ+TeKUsWmS12oVTpa8AKLg6SQd47IpQna8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":111329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1FcbCRA9TVsSAnZWagAA3WwP/icoM5xoM175Chwp4wUE\nmI9fl3JPbxTYC1u0LAB2wLnT+yxoSi7WRwL+xPTS96ta5FpZXfpoKEu9Bj8Q\nwSvGR1rklSDZktBg5G1XWYB0sHTUuoi1DjhJH4wYw41xNBvjNgP1pLpz1slZ\nh5rDxxbQt0IwRjeI+p4ORwEPvqUmIOWZlFTok/6bXXM0QtsAwbV0zyRkDCrD\nKI8uMRrfXdeVmstZLUVLiJjpyDspnaTBOObB6Rh1g87dQErHB0ztJWolFeT8\ne6ZO8RI//75R/7UlmEXYZT3diTLaTmmi78JMmaU4MGBBtPTBeTB1veRjdQ6L\ndsdz0y9tnO6FUnUe7WChVjFI4Dz39hUto1Z1tZF0qBRCKGawtBXV64jtF0QV\ncn6LIHrx1Cr2ecvPEonsSBR8utH+lFCcUIdD5dQhgX12B+bcWyyVqJwznW9y\n/1IIOsa6S1XBdLA2lkgWx1yoWvZq0Bvqq3C5rZPumt91hWJ4sX9YguYh8RPq\nfEOcTKYa4KUq05GM7y9xaPrLMHKX73ECRYtMEBARzTLcFSiDj7iXO+gOaoLp\nKB5bWfZ3yy6OhByE2+Svf4Hsyit0lyCAO7+d3Rg2hnUx9jTXnCaOjWUso6gu\nhlQhE1t4eXLmFJZ8iPprvKMkJB7aO2A0ZSUEKeKV0O4nJIjn6MJs6m+w7vtI\nJpSU\r\n=qAp8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"87a2a0d10d71d70144fe6bc47fdb4bfac9ee670c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.5.0_1590974234416_0.7796580948182599","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.6.0-web-push-relationship-4fa5657cbb9f6a7a39d38a001397e8bf2d88639e":{"name":"@balena/jellyfish-client-sdk","version":"0.6.0-web-push-relationship-4fa5657cbb9f6a7a39d38a001397e8bf2d88639e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.6.0-web-push-relationship-4fa5657cbb9f6a7a39d38a001397e8bf2d88639e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"7a4a31640d0a26f59e030cace1881a75b99d44a7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.6.0-web-push-relationship-4fa5657cbb9f6a7a39d38a001397e8bf2d88639e.tgz","fileCount":15,"integrity":"sha512-0a8dzEV5JRvrmx5ASjHvvH17Bs7E3p9D3MvWZ+fIeZGbfcaviAwrWLnRSiFha1d5ZRygRYMn4hlAiBYa16KCig==","signatures":[{"sig":"MEYCIQCp1KJqDoTxlaKae+WyWFMOTkOe3QrrxRJ4SfyChim0TwIhAMXMkoqDJyO+vTrFgA3XYsiKzeRvefjwK3IJMLcFnYRn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1xdzCRA9TVsSAnZWagAAZpIP/1i2VxmHrNZNHifFsI51\nIGuYOcNqCqFdk+MXKsB6eeYPPOIGTokOPKmThgOiAEL2p4v3Jg+mfIcqTA/s\nkn3LRJpwHURnDY3Sp8ZhmbNZoLjCn5beSb2u7giOXogabH2sdy0rhtWcvk85\nj68aKpsv6ILOPuxpCkjkOsKY5uLSJxvS+FU77vjTIQD8FvT+Iycb6ydFyuxE\nAFopfaAD/SO/y9AT37drcLTAbOUAZ0flV8rFnIZo/lTxcsUgbeGTrWBsBmkR\nMYvw14FgvbN4RWdm8PvjmyMAFCxjO+tK+1YofwE4BZ1/yHr8hM8zgDokZ4S0\n9i/K1qSIH4Ee3GnLk0lc53KhAkB9h1Ficl/gPvE4hh9q1HrjGcUjzMERHJwS\nVj1cUZLUbcaXdZa5tFzKSkC+qegPKhb6m+0yRvtQLj6YokZ+vRigz9KJMprX\n+Fdyaf8wR4W0j9T0sZbK8gec3m5xIhtuZnye4Ki3MqS4LNZbX8uMJoQ7pym3\nWi/hglX3Wh0iZiJSy1SYIjG1lzSfL7Ds5lKvsNDbbU13O6E5tbO4CdFx6cN8\n23N4Il3Z0UMkUf0s9G3LtIMU4dAj+8J3F3Kw9WMLT/2Q912EX5GGbozWCTku\nnZTS2YYpnt8Jk+M2Z9EVuHyQloO5Jw/05aJnnG0YJSZzX82ZgQHgYAuWyAjQ\nDSP1\r\n=d0pr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"4fa5657cbb9f6a7a39d38a001397e8bf2d88639e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.6.0-web-push-relationship-4fa5657cbb9f6a7a39d38a001397e8bf2d88639e_1591154546567_0.724292773029356","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.6.0":{"name":"@balena/jellyfish-client-sdk","version":"0.6.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.6.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"5b07e1a9834ce3d46facf602c5bed87e02e806aa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.6.0.tgz","fileCount":15,"integrity":"sha512-EPTL4pi9AHA5Tdjn0hXtGZ4u2u9IAXbHZJDzC+lPXECH5L3KzLTT2i12/qorsB1zkvIxFoS3W+CNOhwTXD5xmg==","signatures":[{"sig":"MEUCIQCzfDzgQEPM2aF06P+9GWMA+yeVvMYkO214BRbB5/A7tgIgTm6eDWESoTyHZDUn++LivTwHk95YmBgg7JtRzuX3Uzg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1yAiCRA9TVsSAnZWagAAqD4QAIQzPxALJ0RzSeK3a3FE\nUXiarxfUZj/szp+XZIfiMnqufYP7iUXVhhUKw25XkSSUalllBUFraYhxx9jV\nxnSKhzqf59yjcw6a/71wCpAdV3iyJ7stjHH4QHoN8TEf/k5phs/UOj9pUMU8\nknShQW0YsrF8plnn/DzBJTuUaKTNwz8t6v0uOZ4RTRMCeZjJ97xjivT26chS\nJWuked+O5TEljeVXD/7iCbVeJ5AXFRk4syU9atdY+RJ3KpfPNA6A77sPqMXd\ngKvTS6Fk4RSAC7QOrtJrwKx1jFsddPDsbQj/LOtcsf4IALUb9tLtFc/PyVzh\nZML/upiihBbHhZ4+nPj3ZoyB+vHsD+x2ydHIZTZar8cq4yE3yVv6RLrlJukj\n7QC6YSMxdTGK7cNrSTVvtIAXrUEPn7D0QB9BMhBaW6wZ9B+bT8eEfw3H+ez9\n3piZM/5bwe38eKG6wQPg7lMc2pM1MWLzzK3wkghXtsQM3ZT7P65s6LRpTANJ\nRhyaz8TCcTGIb7pJ9irUj3NpVGitURIdSGeLXubwHHxHPf5nRWsdWyAAy14N\nz42FJie7iusVOfKwKs+YBCfSrJknNAwo+4hubEecTNadQ5m1lefn3JEAxtrd\nPlqY/iM9iQEwMq2cRv1U3HYTdGypjyJvWeBRHOloF6R5gupnJ0MsZaV7mUXq\n39bX\r\n=8dhR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"e332705bfea5167fbb06daeb6a8cd5dbc17e96fd","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.6.0_1591156769752_0.254021746302868","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.0-summary-mark-read-70af36cb319cabc7ac3f874624ac9f551eac1238":{"name":"@balena/jellyfish-client-sdk","version":"0.7.0-summary-mark-read-70af36cb319cabc7ac3f874624ac9f551eac1238","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.0-summary-mark-read-70af36cb319cabc7ac3f874624ac9f551eac1238","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"e5b5e34648bba6dd8678b7df25aaef3487f6370a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.0-summary-mark-read-70af36cb319cabc7ac3f874624ac9f551eac1238.tgz","fileCount":15,"integrity":"sha512-h9C507dSjiIyKhY/Km4dyHoFET89lrUmw8pnoU7RWZzBH8aV5vhfdI9VEqoU/oBhae3sUaTN9YgV7BdicDhYpA==","signatures":[{"sig":"MEUCIHCmMzOGT6N4xG7lRrqf2V9n2CGddGvy7ZEVr+FdPG+jAiEAg0vVLBWUT0QRxl1xjWvpUA4b/ksvKC6CO5VmiNQUdt4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6G7sCRA9TVsSAnZWagAAx5EP/2WK0orRd1Zrdn1mrd9A\neavdw1CC4wdZGl+sgTgU3zQHamlJxDdgypgo3jT9WsLxRjXP94wJJtpdYkE9\nDUWtTH0Ebzh9+giPK1w/eRQVaG4L7D4layHq9ca5GL/2IPO70EL5KjTPzFqn\ngt+iN0tc4e7CadKg3P2ErlP1g4x239jVYaRlQIlyMGTbFzM7BKVEU1wqLc4u\n2QWWGu0MHYBNDR/JHyOhBMfsR+ZMdKXO7T1MaKKnFLwwvTR8JZCjYCNjR1t6\nqYnm9AuQcHnaai687Jg8cbQTn48hDzPl5orMOirbP0wCqpBze1INUTK2+ekk\nDVSA3HKrQRkVNfidF/qKj4RHR/CZ1ZOKsntHqNib7f+TA+amGnjijrTFgLZi\nLNifRWZOrodMjUj6VMGzaE+hk1gNS6e2EAyg+D6TqtbEChjh1PysqkZ0CUww\nz0fWXALlu2Y5Xo4ajUd0O8urcX6ILyxPrqdmZK/sIoTH/ioh4HRXHjL5HST0\nrSiWBdoTVZH/FO0AFZdzyNHK2ccgPG0J5lQEZ08oeEPl33AR3i3kW1M7Db/+\n9ZDxfilXSYdsGmIwe50pC+fSrDz9mXlESZovroxj0CmLlgMTIeinjUD58DG0\nEqJsOphwvL5uthEKDrQuX/QnniDIsRZb77+CTdKR/WLV3pNCOnRn8z12haW/\nHqNM\r\n=atrp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"70af36cb319cabc7ac3f874624ac9f551eac1238","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.0-summary-mark-read-70af36cb319cabc7ac3f874624ac9f551eac1238_1592291052218_0.028251999580017895","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.0-summary-mark-read-0cd645d27ef22665d6e1ec97324ae8ad4542e590":{"name":"@balena/jellyfish-client-sdk","version":"0.7.0-summary-mark-read-0cd645d27ef22665d6e1ec97324ae8ad4542e590","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.0-summary-mark-read-0cd645d27ef22665d6e1ec97324ae8ad4542e590","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"b357060fb4218f53b881efe8a8c70e70d3854802","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.0-summary-mark-read-0cd645d27ef22665d6e1ec97324ae8ad4542e590.tgz","fileCount":15,"integrity":"sha512-NX6qcG3b4P/Oqj4jSk56+os+aIayuUOmLva2mMrEsEXilqRkgxf5QKQAawtwAarqKwukSjmjoIzgx7uIg3gFyg==","signatures":[{"sig":"MEYCIQDfyU//TKiILpWhU25vOWHmBMv0guDTPDqGvdwtM1A5sQIhAItNe6axKttIVUtA0KHBqQ+0YRG2Zy3swLxq2TCNNJeF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6HHbCRA9TVsSAnZWagAAPFAP/2Cnsx3De31KRTvYOZKx\n3cDKcVlidtpFfvTNr4oCpglRIknkXrPPdvInpItUmf3g+H4waz4VPGRzAm1+\nZ+pstdxRWR5FP8CSAFlEWxtKnWFHCWE06tXdkZzwczVMtFc2oUYAl6dgO9u+\nXUrgqkD2HTNdGQhjgT/bmpaHb4yqEtCv2VmoGF5/dtJ+8+/8rqwZXsFCDYhb\n3uSPnlvGQMNNCsa6pgscdeluH9VPiPLgMoXMWzzmXZaSOBk4WGpmAmHoLG5I\n/iKEPWBZYjx5AsQW0MCCJAlofHqNAVxUlLbA0pZQMAWulfqhTWEIYlm4XnnS\n8ecByU+EfnLuI7SVBlU2zP32qo2dEaAa5r8CeYX7rQvxdWUdINIV/QS82nVW\nPHR6H6R8VM9qWBD0kERBul4RgDs9tzhebZ2u0kxFJoqe7W0MdNIz8aThmYAp\nh0wEsNX8Az4PaeEhlpwZq6wW7F0KHPtcjEI7ubAEXterTP+eSr4FDX6XS/6k\nD8gOQaG4fGyAwWeYaQHT8mpFxtOpW7XSF7Fg2hh3jiXSgaOpdMd/EcSubguS\n9i2l1YB+0RIi8ckXeOHBqSrC4BvH50207DXmYQpBuPXrLxlGbkdhyTBONZs6\nmPFSw7aqGXTQogLdZH22sM79czQMJb7z4eAVIJathlYG2lqUgBGsI49ZNacK\nXBoT\r\n=jY5N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.remove(fromCard, toCard, verb)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"0cd645d27ef22665d6e1ec97324ae8ad4542e590","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.0-summary-mark-read-0cd645d27ef22665d6e1ec97324ae8ad4542e590_1592291803439_0.5456906327789719","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.6.1-fix-minor-readme-issue-8d6834e8c50b335351c501e8c19edf2253a564d1":{"name":"@balena/jellyfish-client-sdk","version":"0.6.1-fix-minor-readme-issue-8d6834e8c50b335351c501e8c19edf2253a564d1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.6.1-fix-minor-readme-issue-8d6834e8c50b335351c501e8c19edf2253a564d1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"261f2aa161f60cf11ab6bd818e52c27d3d6d7351","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.6.1-fix-minor-readme-issue-8d6834e8c50b335351c501e8c19edf2253a564d1.tgz","fileCount":15,"integrity":"sha512-7gYUnMlw3xVjmNrzPdH2q2vgvXJ8OCrDOz3Pdnc1EvhoFbvxwZqdH5WtsjDuGsSXW0pQoyfzI3FPXcvCbiC7eA==","signatures":[{"sig":"MEQCID+lqK0lcJX68H901mfehWoa3OiKXMEOWSKr1TLBc7xBAiB3gPVH6XdPyrn15j8tk/5MhagFy8xk03LWMeyzNt6dyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6WNJCRA9TVsSAnZWagAAwUkP/AvmHP1mXWHeRoOeQM/U\nwioOFss4ptRlQ5WXnXY8Zk+sAsWjplqfGv5n0BaPZ8BCAqXMPXD7UxK8YlOE\n1gAl1TzY4nwfZ7o/h62Bdgtxds3aPEnboXJhLaiMvN3szSF7xNFgUoZ8KhxM\n9CoAwtM0fjXOa2ndpGWskySichmQ+V4byJfH52RQMHjl5DN7I3fyt0piXMG+\nfXqCCwcS2Z5Agn5Vcvj8S4gAlFiK+6oO9+vsv4iNxLAaUOlmrExDCkCpukRz\nRcIsu+zGsWVD2E0yCfVJpc6FeGItf+U4vSABv93BkPXvsNI1YebmmBhVVODK\nq6IBv3ivsK2SSOFwd/LjubfDYL4pjACdhqbEoMOaEY5DzAv3Ovt61S8jNUv3\nZG48YLoq3jDEoZkXEjeEQbnHIl7anhvURaY9LbM33d/+Us4EyHYhhtkGIhmv\nTkIcGv9ZQLrNaSbMqMTpmuwI2pa8o/+Y6wYbspDUD+aMDcnK/vdWiTh0wpG7\n7l2e6w/REnZ01y60H+Eu+hCm64XGCnp3YIPMOWOpqJwl3TPbC2aTlj9VOioL\nfCIVxgpjeiYsXf3JBqlV7kHRv53OG8TqH8L0KjXAZyDe0b08soQfw/2bBuSv\nNOvcDHa+KOdB48PmlkmEUxQHauZIgBImJCX74ff/bsUOIvcC6GLo1pe4FEtY\nTzbd\r\n=OaeN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"8d6834e8c50b335351c501e8c19edf2253a564d1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.6.1-fix-minor-readme-issue-8d6834e8c50b335351c501e8c19edf2253a564d1_1592353609223_0.8419427089263467","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.6.1":{"name":"@balena/jellyfish-client-sdk","version":"0.6.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.6.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"94f1f44378f7b71414537fb0c45d23bf35eebfb6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.6.1.tgz","fileCount":15,"integrity":"sha512-uG9tCjJ6GX9/qk1oa1niB77QBCo92KTgfbb4v7Q+xeM3n7OkRfPc7NdDEsk6/c6vp88hLHrrveKpQymO5c/PFA==","signatures":[{"sig":"MEUCIBs9aUBAmz4kK8rYFaY1xZfu94odLLzvflHbeby2X3ycAiEAvzmAYDk0nMyAS4CnkHdEr3bVOpOWuUdtBNNsYJ418e0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6WkUCRA9TVsSAnZWagAAWu0P/RMtEfkmekNY3MSOxPpa\nxl7fA2/cqFZUwvEW/X6L3Gg+ZrkrjoMj1qEYfNsx5A1A3S0B5byHXjHQsbFn\neIflEq8ISCuPLsnibG8gJexLXGPZwAYg/I3kmqmIS37OEO3HGEYdBDNwEQLm\nqbr8sWP3A9Jt+e3laslPDwN2zhgMVY/Ul6yW9L8V5vsuspbDyYWSx4TAUOnZ\nuwk7Bi8I84lWUDL7z+HKIWPcNNMMKy0WZMHGWZ7MOpypZrAsIeb9oBjIQweK\np3lwNxVB1tJQyuj83E4CRPfkMWGei4NlfgRGp5gvRblxRpiC2FE2r5vZqHJ2\npx8E5DLXtmRZoHG8F3yFj5qcK9l6V/jvblE3RAU3Ffvny6TTAybQ/y6e6ZzU\nmy4xhPNV+cHrCG+vtbGf/m/8CucHkRHIleAYn/XUkURLETuLjQ7HFQWZTQbi\nnW5TvIfbMOTfCXibT/LGVCeCBR9vkEB4nq5dtB9FNwzYt4uOQwGuzAi+XWCS\nTq4ID0vOHYJY7q2r39xTrYO9fkWqywAyVBN012RAmcoGmTQMI5whoBfmsDD3\nhsH76OQVsY77fAGUFw/33EPFrgpNhClvHRvygNsGW7hSyQ5F9W18SE5uUN1r\nUSKID9HIq+9Mu36xta7oU0hBmhuxXWimFqJcW/UNsi4bn4m2/6ZzoHIQ01Aj\nVgUZ\r\n=pzxT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"ab69f2b01a8d72d3b832b34e41c3392b164b4612","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.6.1_1592355091846_0.8069839897131392","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.0-summary-mark-read-912eb7976319e1781476c5716b6ce096eed07e43":{"name":"@balena/jellyfish-client-sdk","version":"0.7.0-summary-mark-read-912eb7976319e1781476c5716b6ce096eed07e43","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.0-summary-mark-read-912eb7976319e1781476c5716b6ce096eed07e43","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"845e6067eaded9a49cd80c99f855ba0f8cc9d9b2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.0-summary-mark-read-912eb7976319e1781476c5716b6ce096eed07e43.tgz","fileCount":15,"integrity":"sha512-pO/oHOFKMsDCHygvuw3KsOAAcfzqutOFLfvU4jqvGdcYCPsLc7pmYPWCTlImUP3okxZkJEIp9Iq+7koSEWzqMA==","signatures":[{"sig":"MEYCIQDnrMXHgtQdes7O2YfFM2hS4VMfyEZUtmymf4gVIMrYPgIhANOiRtsMhTlgI0S1L6CSM+IG7zi7wa3juDpvrO77Yb0B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6dglCRA9TVsSAnZWagAAy94P/jqz3s8vX3DlCq5VTRu3\n1j4gzxXlp3Cwb3O7TJVHU+oJJbZIJUrcfKBB0l6d0o6GFNKrfKZtOuL/6w9i\nn1+tDDMpV7tGzMldTWdb0gXThWNmIXQL/An1EsEbrzGlm3KSrOMWzxNYDwPP\ncW2/VPa/cCZdeZ/AA7OAbhkSVHYHgnwyrQtVQhM9Pzw1SCbqQDFPORNrr3aB\ngZQFdJXAgvfajXHsY8oLtdyL2bAFJNw9aSuCUCTQyYzJHstocMPGsf7aAHXD\n6palBI4WyEz5p2WO1ZPqCtVzfNdFYmZUNEx907KymGfVfrcpIBsC0h3vGFcU\nwK9Q+mG2yDZlLCsAb9fPlFBxxuwZdto2wK/f0ukU+BVMo0xjyE2mlkiZ3qpj\nOw+idpA0BMwbJkjeojPWBya8FXwM7MSgO5GZRVdVrLpquDzDujzVWx3nuUVu\n1i2s+pCiKAuWxRWaNfvsKxZxRIV9NJg9nhV/PmukRA9u3HREOX6/kycKqM2J\n3hCvCohsisF7L9g1zDBqsA1YgdBgIGbVBTaObofvRdwDdFVO/WIFPfuj1e7v\nvvtLxEHynSr25i2IAQIV5nO3Xw3I/fNeMMTuOx3PgBPf9HoqGjRR/oseB6r/\nqYsY4k/xmER+XSoj8eIchj7/pIE6KyJA5oN269imHzJGgFp/obqBbOc7xWLT\n2Zz5\r\n=bU7n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"912eb7976319e1781476c5716b6ce096eed07e43","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.0-summary-mark-read-912eb7976319e1781476c5716b6ce096eed07e43_1592383524264_0.20982534725680724","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.0":{"name":"@balena/jellyfish-client-sdk","version":"0.7.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"fd91504853b0e3b08e84b8ea44b753de3b53d965","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.0.tgz","fileCount":15,"integrity":"sha512-6LIFg9jqfqC0+jeiQrY0iDUMDsEe+ewfWWT0LQUHUNsTXs3gZCuoXHa9Aol+85kKqMOAWAEwuRxYnvS9kdKuuQ==","signatures":[{"sig":"MEQCIBVyezmmf419k8XoxGlMGHHLbikDOtCJRXsR3cKUhwmnAiB6pL77Kd7bt9nfrlVQOFfL2D3GTp+PXxrmumfAf05UrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":112235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6hbUCRA9TVsSAnZWagAAoi0QAKNfZeZzIx3p/dTxKzMP\nncE1Za9S0c+fKWAzoRJpg8Z1DFA2xbyR6nRICFxPfATo6EWMCssQoG45mDJ1\nnPvrflzw+l8jlVgypFh4T/2R5zBMuNx6yDVkoiN8YdFmRmiNvAp/smzjEF5X\nAaKsX38tAyboYyglZT8UZFjtLkIXpTRTuryPQGTdhM0FJYBvdV+QLeGkaX5H\nE8y3lYQKK8EBn9Su/7Y4YdwbfJihx0v7XJn4Rj+F3Do5h1quEpnO2HjJJjed\noGItCV/pyApGxEWTuSQCPUXeuxL+W3Lztnj4mZOz1MCXIOSTbvdtpU5mixwG\n3gl+UpOw0igN6TzBlN895Fd5jETULWoIQyJbrYDaZq1J+LjnngexMXUxb2bp\n0LiOnpPOtdH+lWw0JCvTI0ysY6iurJi92AaP2Qu2gsJGcothSuHcmwoL7YVY\nbmc1jAQ9OKt3PCPyx6wpN6dnFRBtQzcuKCIQKWgFAfWBg7f6/31RNJ6cjLRz\nSViwxOJFWZ8xaWK2q7t1rDXzBzU6o47C8r5h1SCA65yaxB3CzuxTsOinOeT7\nKM89fuBhNOFMkswSRNKHtADvj0DZhBYYYaChH1Foaz2TJxbfFrkDSzYqjVWx\nCUYzzh52FSh4ETz+Jbt5VTAntwXqGPMvYeF/t6rZRNMrFmPEu8xQ7WWHFjR7\n7YHz\r\n=ybpI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"ef83e1bb66ca24d570d8b944f934ee7d3aaf6c86","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.0_1592399571699_0.35460254665264124","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1-getWithTimeline-query-options-9874bcd46f42aa72df4b72c97af75c10eeff7a53":{"name":"@balena/jellyfish-client-sdk","version":"0.7.1-getWithTimeline-query-options-9874bcd46f42aa72df4b72c97af75c10eeff7a53","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.1-getWithTimeline-query-options-9874bcd46f42aa72df4b72c97af75c10eeff7a53","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"6d48634adabd5f4008ec482b4538efea230ce66e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.1-getWithTimeline-query-options-9874bcd46f42aa72df4b72c97af75c10eeff7a53.tgz","fileCount":16,"integrity":"sha512-niaw3vc8QSccBqyt/6p+shaYFwocWRmWuMM4Wps1qFf1m889o+rP54w/nPj+p9TwlMXZnh5tc3UTeUnwlJAAyw==","signatures":[{"sig":"MEUCICYKRt/CRW+/qTB23A8Hs4Ns13FzLT2ilYpyUch4/O/tAiEAuo5m6IlAw0+6NsA9HbfawCDs+FOzB5v/sfXUBSNJsuc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6pqTCRA9TVsSAnZWagAAiowP+QEFbYuEEHrFKic/TU9K\nz11dkpiSOrymTsOnu8Qm1tKyWt6CU12Fs/adA7rc4zmVkGAmTAwh2fOmV5cP\nnmYJkYdZsp4QMf8EPCwHnO8fuLxDFId38sp5ZGVivTHIfLUDZ2isf+fr2g/K\nGZR5NPf8Zt7eYxDln66qZAnfOlgMlc5HCTj9FXY0D+Lic9O4ZYK4k4RLf2Uv\n/wJa5F5e7jTzt5Oay9irYjXBQ2XbfqFn8VXFJCZ7kKMN0Kte55KM2C9ofrF/\nUNK/+S+ekzPEihGNbGJUf1ZPPlAaMhJ7daoHpYu8OPf/PYICcZL2waTJX4i7\nZNWQwbT2tZMwLOCmMXOJxSZemB2RAIgbONJnW5vkiRolij/1Xs6JROuXO5Vm\nSjC0chSjy3RglhAh2xOPhHVG4NIR7qRVMxKXw7CSxGOKP0BuogeauoS5PYhT\ndsY9a7hP426/uHFvxdWJ/Z4aa3l+ACFkBBkdjN/7eLCPUiT4nO9HgMbHzbKR\nqXFtpkDhF4xzSf9ObtYQpvZhxwLct9se1wbbKDxi33PsqW++tb1WMGXOH4OX\ncLdwTzGymRqyX1mOn6fySCMJ3ItTRzjmiGfOFE0+0c1RQYNWBEllXrfugMG+\nbR9IFcWzvzFgIZrUtxBT6WB5pb+jJChYypFttOx0ErqxLzemzht+Z76jeRAF\nZEUT\r\n=8Tpb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"9874bcd46f42aa72df4b72c97af75c10eeff7a53","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.1-getWithTimeline-query-options-9874bcd46f42aa72df4b72c97af75c10eeff7a53_1592433299458_0.2930980367031548","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1-getWithTimeline-query-options-3f60dc12b35577e407f2973a9d639a2c5a9e8fc3":{"name":"@balena/jellyfish-client-sdk","version":"0.7.1-getWithTimeline-query-options-3f60dc12b35577e407f2973a9d639a2c5a9e8fc3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.1-getWithTimeline-query-options-3f60dc12b35577e407f2973a9d639a2c5a9e8fc3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"2af9852cc2a6e2e86634e04deee7ac84bd777915","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.1-getWithTimeline-query-options-3f60dc12b35577e407f2973a9d639a2c5a9e8fc3.tgz","fileCount":16,"integrity":"sha512-nDlfh2utlIao05aGSKOnOB+kcSZZiWISkzCumvsMnMMhgr6wu7bLX54uf+tbs/UecH5Yyeb4VZe+CfJUfWM0Dw==","signatures":[{"sig":"MEYCIQDph/L6wegI9BbB5srIm9G0aMojbpujUZvfNlxQVrjLzQIhAOSjZYwVSJ89std741Q6X4gduVsT4XJGQItSmcFjAPj8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":114998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6p2cCRA9TVsSAnZWagAAhdEP/jeFaiMbxteMcVzkZERj\nDrEszhus87BN0BImiElDr8rM0XGCW/Eqs1adbWAX7fxCdCgd/oW2KrLqHUFz\nPv9XcgIkj3uH+kTbmLUktSlbyPnI3S7NOEzFOnZAWNBKmnHyfof5/m3rpOQO\nJ7f6KPP32Lu0VlW/00tjfqvnDHDhvrOcYM4ronHa8MMmVBTq/45lkUDW7aW8\nwFtsLvQ2Ru/oGN5lvwB+0nDu9mi5ti1cyqWFyMiDzEH0307m9LROhWZnjnu9\n5bTgqu5uPR14vb52DIYL2gnWBcYBDVG852OhHFxj/rPsloJ2AFWfHIqMgqlx\nKd9DuqMIC8s17L9cIPLtai3Ij+gDEf9idUhauSSSPHAs0XTg0lz4Nky6fZUk\nVkH9l4kaMKmTTGDcLvr/xfPgiyqlEFHJIr+R3J3kUF2CTPJWrLRDsxNZXMUD\nMZl9eGYuFkAVKrHmiQ5gw3cOa1meF0bethXzKdkhCmFnA47MlUlsOkwIhm0G\nBK+iS1x4cvGo4TCfr8Akf2K6DnJTtEx8eMbhsE1i26f7dTKrxd+6+kbSReNG\nK7fjSJRvDFoQLb2yEi1/QKymiwwZehH+dHCOjxH5C8pTYv9pIQVKVeLgiljh\n0dd71C2Fxo45RdcJ48eV39kzC0CPj3h+QJCj4cddiIat3j87zuiO8Tx3ZEsz\n84a0\r\n=33B5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"3f60dc12b35577e407f2973a9d639a2c5a9e8fc3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.1-getWithTimeline-query-options-3f60dc12b35577e407f2973a9d639a2c5a9e8fc3_1592434076263_0.9336946879167647","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1-getWithTimeline-query-options-5ee3620dbf6523793e3b84eab2de1306141dbe63":{"name":"@balena/jellyfish-client-sdk","version":"0.7.1-getWithTimeline-query-options-5ee3620dbf6523793e3b84eab2de1306141dbe63","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.1-getWithTimeline-query-options-5ee3620dbf6523793e3b84eab2de1306141dbe63","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"82fd5ab414f547af21d554b9a638e0ec8a8561b0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.1-getWithTimeline-query-options-5ee3620dbf6523793e3b84eab2de1306141dbe63.tgz","fileCount":16,"integrity":"sha512-orEokBYVAQJXs5dw8VFr90NaqxX9p8FLlmAmBn98s8H885SCxUT/kCU6lk30uWoDZjYgNhLXMqpNoLtTtyDpiA==","signatures":[{"sig":"MEQCICA2vu34N402xzvnYyf4qS42mdDTpYBfSsuW3a6jUlxPAiAyAP9+RjIs0cue7EefhoLxOfmYNROgnheixSN0qxKp8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6p8yCRA9TVsSAnZWagAA2a0P/jVMQm8192VIrCnjR2y4\nU3uf4jzBiqMQvQFPsU/YBAs7SpPo3caZDQ/6Kvy65MpmUav4Ef9hD7Fo/Sep\n0NVMjkiHtBpJiP0OtqrB7VnOXZ/GCJHx+8A36eHfLUCqYagzIqznmJ2lA0ax\nZHG+6U+NlUEAhkoyg35Q8jTSz7WsKD7PSyeNhY+OOGpz4j1QCCd2Mx5e+zSB\nFBUvuURy8AVwlaBlZbePGG6AmaTZ9vlnt33ZCOCW9RuTDPToamFJOSfsLiOr\nnnfuMx1hKa5p0oFfJ4BMg2Ps2N1aZnZVvV8CSpE+0/yFojFj/kUkQaQjW7Bd\n+v6qTfg/C21gW6a5bOZXpLjIqcjw00tRBFlk6oheJSidkCp9Ux+50x25rJLs\nMbXwuPLU3OQiWjMs0BlTVcVPnYgi09WW92PFG4u2CnVwAzBpNLYssN6AOmmt\nqGVrDF3yxIPrTTnpXcKahfagrakN4aLoXj7K4cDR0db8u+5TD/PXtYadTcmk\nKzubKobd7LqwosMbQV97uZAHw5G4++2n4/7mwxFPUIa64Hrzb3pIJZPgEnwF\nzA5hj1igi+1Zq1rAoPzHIMwUCZAS7R3eU3d3ws6ygfPaHLNVeyTF9eHknYp/\nbpwAaL+1BNdhAQckh+NSvjfsbgC0t33FUlgwVwG2jX1I0qhdCGJHZVCktgRn\nreIc\r\n=UeeO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"5ee3620dbf6523793e3b84eab2de1306141dbe63","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.1-getWithTimeline-query-options-5ee3620dbf6523793e3b84eab2de1306141dbe63_1592434481670_0.8905974735704407","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1-getWithTimeline-query-options-a04d68b365490274df330450a9c3bc4f9339201e":{"name":"@balena/jellyfish-client-sdk","version":"0.7.1-getWithTimeline-query-options-a04d68b365490274df330450a9c3bc4f9339201e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.1-getWithTimeline-query-options-a04d68b365490274df330450a9c3bc4f9339201e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"b7c489e4b47506afc4160ad77b2f918dd9725bda","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.1-getWithTimeline-query-options-a04d68b365490274df330450a9c3bc4f9339201e.tgz","fileCount":16,"integrity":"sha512-fh6557b0Wm8/1G05fxmyy8KeGoRmzDus5TmPcfdMz8J6wKjWMxx9m5KlFLYHHTA0Am4gMs9SgrAXlqOjAYAZbA==","signatures":[{"sig":"MEQCID1N/DZmt2QBYHJf5yPhgVLVTI9J0HTtswLhZfbs8T4/AiBnES8s+E4HKYgLkrT+q0IH9To0HhgSz0w2wQUHqvM/BA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6qDLCRA9TVsSAnZWagAAJUEP/RMDCcXVB6kbwJ4WCNyH\nBy2caLuXNtQOH+6hnuxXQLsLDsRw/DAHArfC83+c3cZcACVtY+fFA1+R4kHg\n3bCOj7wiC/YqtbGQLnvQ1iWpSP90NBIXt+Xs155/foLDXmUfeXSsoCfP+fCY\n2zi/l5Uell0vJyhK3U41VJxKnv1JtZXU7yIBqb2ZEsEBGiUb9bkwQlfnEwlP\nmQQ+TASNbhUcu2ujmd8fddD5u4KdOSdaLqRiUeaA9sJu4Yl3iDyhqmaqePtz\nujP1Pln8vQhOrCJSZUjElYyUyt+GWZG3QG5OMZAgf74oiMQMlKT2QgeFkFds\nD7XkYK0VgcaZ4hwoYIf4lSV8Zs7Gt8JnH1HM1QX884I+nrEzAfmUu/T4dfwx\nYP9sjKh3IsGbqktsQGMoY+bUR6MypgR5wuiR44VjY28FB4+P6oZ1KtvPRJ85\n0ZwMU5Sfc1N96vFrE6hDMv/kjxOi+Pba/52JCsKas+o0v0GJk0w+wRUcx+Nf\n/810AaGYAfcFBZBkixXztfb/xZ8SrUG49tQHOPdb2CP1aHwXKPz7PMtc9pX1\nanwIP4BIqtd7oYWQ0V5GaVcfpZX27OaRk1pvAWZu/uQwXbJGBT+BK+L7oK0X\nTd1CMFMC3hjIA8oMZvm0oE3U//2unxoqGTzXnP8i8XyIbg8E/gY20mCMoey2\nvy8U\r\n=OelF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"a04d68b365490274df330450a9c3bc4f9339201e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.1-getWithTimeline-query-options-a04d68b365490274df330450a9c3bc4f9339201e_1592434890707_0.40031779715448623","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1-getWithTimeline-query-options-19336c2cccd553a691c879303b05764432cd7cda":{"name":"@balena/jellyfish-client-sdk","version":"0.7.1-getWithTimeline-query-options-19336c2cccd553a691c879303b05764432cd7cda","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.1-getWithTimeline-query-options-19336c2cccd553a691c879303b05764432cd7cda","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"2657dfa6ff538e095346419951f59647b74a75a1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.1-getWithTimeline-query-options-19336c2cccd553a691c879303b05764432cd7cda.tgz","fileCount":16,"integrity":"sha512-QUFQXsbPANwOTQjfkKwexOM1qcxvePNJWjC1l5YWpUHiwoHSQcOlDkk+4sw0OgEzvdIIcomfNfzCsZaMKBGhBw==","signatures":[{"sig":"MEUCIQDemitpjx7CNxhp2M6VWdyDevAEwZT/yfbvvv5+//e+cAIgYp6S24EI6KR//Jz5PkdvCIUCePVUE4bpujqVWNERzsE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6qY9CRA9TVsSAnZWagAA/esQAKKKQs6aHcPaQpTra1nG\nJ+nhz1Ywbk2PjP5NL7UyR3pSJyWhAyhQUvU6w3pziU5LKsolaAspfdaQOBxU\nJY9INrTeeZ30b35oQht3GqVGK9iFwbb8YMjBNrxtYvUh1tA2TM+gPyrSXfJS\nO8qTlMP1FFeTjibKmjRiN+T2P7Oy4Fn3ROGDCR46T45KfW2zBJSVbsnwAhwz\nFdBvbU6XsTZeawPU4sOEMqOCDW3Ud6Lpvpk2GRTayssdG/vFfYpI7mPIu6r4\ni7DUmPPdxZihusQuawZu5PgRb1Ki3wOFK7QJnvR8nMFOdmUSKlLg+gyTkO4Z\naX3cPUuD2NUQp2yz+RhdBNuNHtF2xdm8+pSD2Veq5/WsWm4BaclrQnJEJjLr\n11VTKkZODw7LcKP7L9T0/itof9i2zmQpfXxZL/9tYuzZs5mPyQxu5X+ptQS/\nll8QswQVCNqGc+Wgd8E0AEH0ME1Rrvq5YbWM/hCmkDsjbFIEqCCCyAVaPlbI\n+wj6RnX2O96yrWSbBzBnhamYm1+fEKvVnwsrZlI2A0v1KNpnkJJ1Ke0Vc0/F\nx8jLd08rs3VI1iKK5TH7fVEveeqx4sery4FlnOQ2cuOHgEieXI8wmC9cKOIv\nO6uCNrMf4EAJ0EDD/KybqPCPBUu9v8y8v49PamhsqCaySb2on0kNDlw7qH4r\n9os8\r\n=i9tQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"19336c2cccd553a691c879303b05764432cd7cda","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.1-getWithTimeline-query-options-19336c2cccd553a691c879303b05764432cd7cda_1592436285107_0.3175491540302189","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1-getWithTimeline-query-options-130d3468a5ed6e7492fc6c0a4bfd17d1b7710335":{"name":"@balena/jellyfish-client-sdk","version":"0.7.1-getWithTimeline-query-options-130d3468a5ed6e7492fc6c0a4bfd17d1b7710335","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.1-getWithTimeline-query-options-130d3468a5ed6e7492fc6c0a4bfd17d1b7710335","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"7b23fcda516c5363f7a432750fc7c399f348cc5d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.1-getWithTimeline-query-options-130d3468a5ed6e7492fc6c0a4bfd17d1b7710335.tgz","fileCount":16,"integrity":"sha512-2XVtM3cp2gN6kpImrKuS0R4jeaWOcqYe5atZclRj2iTJzyhAYT5G8oPJCg4TmljoXVsndW8Zwc0q+y7Fxf3btA==","signatures":[{"sig":"MEUCIE/A+zwPdWCyd1hUZyKP1cqtJYLjFKq1HJ4qtM0l1RZeAiEA/o3O0YOPM/CdxUHsewi7ajFDB5bwqYT+4KgrNhtGB+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6qd+CRA9TVsSAnZWagAAkMUQAIeVZanIfpNHQy1rWKdV\n4ddEcG6Fhef4eZJW+4QGzFzPhzmuvZLMqh7jlt4/qS+Bv1Mm8T8+8DP9kZsu\nFL2rXhWG2fTAX0FunuC0TBNqJKb8QcIAIR6Ql52YYSr03d8g/SYv7qZUxcnF\nIHETJGCUN+IiexCXp5AKgmQGgC+XTIMzWsj/LpScN5MOUetuNDCxVDRH5mxw\nfVWNeAkZrR+1kPhYwq7ij1mFW+QavdTEHDUh/OOcKsObanZ7yxm5wlrcZYpV\niWQnzaucu+ROuB/msMO5Sh+izr6tXowP6wEOt+dS0QlLZ3jn5eoOaDm3fVnT\nq/1Kb1fjkyekLESKAyY9umgeE2UR4mN6QSqa1ekR2seAaAtdyKFvPqkxqW+u\n5gL28o/TMO3Si9uwvM8VzmovTlJae0ZYZuJ7ksSw5KpUGRQe9ZB0e2I9gkFt\n36Pixl3eb4MFarCEoovSDHCXq6yYKs1g59YdMoguXER0ZVzZgdQdX58BzNQI\nQxcSiDpE6Bxatqs5iYtwnpOxS7bFkOx6aGSSC9AX3G35kGW/tEGu2XnP0yQC\nBKCuhcJgWHZcZWIAppk67DRco10wx4ZUvlIuAMQflTSeAh0/9qM4QHuuZyFx\nV3YrlIpYe4jVTBzendzq9uq9gFsi9COXd17DoGD4Fl2grYf2IG5aiZAETZsF\npcTJ\r\n=iSib\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"130d3468a5ed6e7492fc6c0a4bfd17d1b7710335","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.1-getWithTimeline-query-options-130d3468a5ed6e7492fc6c0a4bfd17d1b7710335_1592436605827_0.7217793075843149","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1-getWithTimeline-query-options-edaa075f293cb28016caad83f30b29e92b418ad5":{"name":"@balena/jellyfish-client-sdk","version":"0.7.1-getWithTimeline-query-options-edaa075f293cb28016caad83f30b29e92b418ad5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@0.7.1-getWithTimeline-query-options-edaa075f293cb28016caad83f30b29e92b418ad5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"fab3e40a91f942710635d5e24ff9e103cc6f6e19","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-0.7.1-getWithTimeline-query-options-edaa075f293cb28016caad83f30b29e92b418ad5.tgz","fileCount":16,"integrity":"sha512-veyg4A2nzWgFnbMn/zxcrZVX8G380+ks4gGHKN4BeJV8kBEMeZkigI9XCMO9yTfNgX5s0qyI73073m2XvAovBA==","signatures":[{"sig":"MEUCIQDZfgWwV8bA062a5DjyWchc+UZVD1XaNnCIF3a0Xeg45AIgfb3lRRTJ9B4vguLCpGaW34qzgISMFjE0v76rDnqv6hU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6qlpCRA9TVsSAnZWagAAJ8kP/2kR1B0NuS3SQpAY3hPf\nBCZjW1Tkv2+VCRshldVTdkTiIVKkHG0UGRDfQAuJaxUs9OAMS8H2dwH2vjr1\neIYQ8pTn0nXnNnATCp3t6IEPqVVO7JnVf9CnZ0DU1ob80pttM21oD9BKICc9\nY+9B4QSNK9DLmm7HLnPr0kEZNDQzd6v5okBOPb5gcP+ty4l0fyjvfCYpPQdP\nDDhR3oMc4pdvt12rsb91SG2QZcBhAxaFu7lPKE07RyInlLltwH63eR0jDW05\n5qYd/6n9JenqM2sKW1TVAtXi7PKDXbSia1gJiU9WGHfVQ12zFzPOJKzBz228\nefVLSSkhRHlX9njMRHMXRuVBpLoUuD6PqKVPtV+X69O/z+KmeW6Zc88qg3u6\nwZ+FNsxh5z8K+AFPHjS6ZNV1qw45jCJPHj1IYY97e6HofLslYPlbl4/mwTCS\nzcIqZUGjjREa5vy++n3WHmhzz69+jMXcEe9dslTcHc4Oo4yO64x39hOo6Bp5\nadd3gAVYAzBnuSa5rxT7OkTleWtLEubRBIlY67NbvIa0aPG2DNLI3jGv7Hv+\nFT1ycWu/WC40R3FjySaQlRcRSbdJzlu01g21WHg5WCSExSjMWnUxFyp0qSLs\nECWjhxdqFWEzf/BjWQsYEZFqi4xoSuNCm6WA5pR8zf8R9BlbgURXdIx1GMWS\nuWqn\r\n=BV0K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, cardOptions, queryOptions)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, cardOptions, queryOptions)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, cardOptions, queryOptions) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| cardOptions | <code>Object</code> | Addition options about card schema |\n| queryOptions | <code>Object</code> | Additional options passed to the query |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"edaa075f293cb28016caad83f30b29e92b418ad5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_0.7.1-getWithTimeline-query-options-edaa075f293cb28016caad83f30b29e92b418ad5_1592437096703_0.1373458631690232","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.0.0-getWithTimeline-query-options-3df2f424a73695730ed365625795e635321374a3":{"name":"@balena/jellyfish-client-sdk","version":"1.0.0-getWithTimeline-query-options-3df2f424a73695730ed365625795e635321374a3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.0.0-getWithTimeline-query-options-3df2f424a73695730ed365625795e635321374a3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"b2e9406c4a5c4d88f992a83ffbc0a27860a76cf5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.0.0-getWithTimeline-query-options-3df2f424a73695730ed365625795e635321374a3.tgz","fileCount":16,"integrity":"sha512-qbRTbyMjjLbGASAqgnAO3OhCF4gurnG40mD636ak6rfZwh1z9TgGT2egLMnHGgCJqoI+XlkKQgi0fJtQjgBbYQ==","signatures":[{"sig":"MEUCIAE+qyh6bnVnkWoZchvhsjQyke2KXPGnBPOL0Qf2LKkQAiEAn1B3XKsXHPjPcPpuZpHM9w2X10wzeOMsUtTcfR4YrGA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6trOCRA9TVsSAnZWagAA4t8P/Ao4fiS4A/TJha82fg0n\niDMEpDujiDWhIi/EH7jrjLurL+DUM9l6z3YdwzHq+V6OaEtcuftMGvVFnYUW\n3Tf2XN5idegc0ewh2Sz7acCGRi9RyyD+73RG613rsqHnkoR0KL0+yDedOmLo\nbsK7n+eF6bvxv0SrFx3rdwQC8QZ/APlQ8aUkkn/fUhHKVza3avq2WcN1Q0rE\nMcorhIYKqOi1bZ1G7mcqvxv4nAIAw78Frq6pY64FJrIrLi251kEllrgFj6ow\n2KRabK7sYpql5yU6IJancXan9Z2Q0nHk2J4T2D3cSPPHzSyXAY18+6NtEsOB\nc3k56Fqgb9uwHsi27e7qZQ/buCpx9Y1dpiN3SSA6ROXUZIlvjMgPLLcWMqdp\nL2XIdyGZrIDowdOsvRSFylpENrdzSupafFdo/eEFsRwF2cUt0hg/J6sL3HSo\nXyjwdJjTYrpdEAGDqbCHx9QLqreMwthMHL/MAxiInZhrrUBYb6kgJkCZXzcy\nt6/qYEWOQyUwFtB0lIKSYbhLP0SBUbQd/vVJHWsT1gvT8tZeJJcma9xP9cRA\nz9Ld3+00HYlqDwwZD0mmnEvcA2ebsFzUuvkanaj7vBSsOa/ndBBLt6bocgFv\nRV15Bi08ipyL0jSwTgvYtG1l9zFuodUcqCfPfvjlPHZ6sSFox91josAT2gpB\nOphh\r\n=bGni\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, cardOptions, queryOptions)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, cardOptions, queryOptions)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, cardOptions, queryOptions) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| cardOptions | <code>Object</code> | Addition options about card schema |\n| queryOptions | <code>Object</code> | Additional options passed to the query |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"3df2f424a73695730ed365625795e635321374a3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.0.0-getWithTimeline-query-options-3df2f424a73695730ed365625795e635321374a3_1592449742260_0.47770769546610015","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.0.0-getWithTimeline-query-options-e96eb09b31ddee60354f6a3804c748a986050ea9":{"name":"@balena/jellyfish-client-sdk","version":"1.0.0-getWithTimeline-query-options-e96eb09b31ddee60354f6a3804c748a986050ea9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.0.0-getWithTimeline-query-options-e96eb09b31ddee60354f6a3804c748a986050ea9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"8b096db6d96ceaad80e68b34239b95748a72a9db","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.0.0-getWithTimeline-query-options-e96eb09b31ddee60354f6a3804c748a986050ea9.tgz","fileCount":16,"integrity":"sha512-0eRzY91fezDIvcPCRwrRV5WA4dHXZgVF9mWXunF+VcKpgAl2109M9gaTegvfly4118iOYR+9RCTfJ/8ls6YetQ==","signatures":[{"sig":"MEYCIQCFYtA5eTg2x1BEoT/w2r00G/y9Gr/M2EdKOBbNh/z3fgIhAJGQCrSNoLg0assuXSeJsaipOPrxaPojZd1La2nFzdmk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6tyrCRA9TVsSAnZWagAAYi8P/i/dpqinmLfTi5HfbXiK\nzBTuVm3gU/6loNjG4WX4XkZIhJ6X4HDgzC+Le7rwNWXI0y1bQFPnWESdBpQg\nIWXhWq5DFEI8FP2YwJAaJSiC+7+XBhmgyr+dhFn9GYxv7nGFe3cNieFrWq3t\nWSYLRubDX8DLpwKy/mdxVTtNPYhnbKdslRnIKgru691jM6z1eERGlsWHsDcb\no+YCYMrfIsqMxP1qhY7DEAB7dPyBg1hIRKMy/Z4P6Xf7dfP1I15iBVcXfU9L\nvhcdV/5Hv7jNrwQvXAqSTnYqvXWS/aKGmOJODvB6X0uoZaMZm2iN8H3wxJZ+\nO7Ch2H0YjFk6BaoQrn5HMLP6+4cR7tps4Yz8/Jl1wc4VxFi/JXKnQUU3DvmX\nXrOoH/X9X1UCKEw9QehnfFXsYD4yCVrq4T2fW4vHGD+8PFTislUDU+hpJHBu\nGUQ9ZQpLzAqFFpFbW9cLYP3vbij5aY1aRzqkztcdZHnJXYOEnCXQgj1kD0fY\n3ZxAy3ZScMJo7JDB17nWiatLU+avyPjLpTTqUpXRXRNd06EWhTEfYTXPr/G9\nyk6jWetbReuymaU/nVH80//Hy7ZdMxthoOS3JTWf6covqEw0f5ijyYhpgOPB\nnBA/uzPTMQWU9H5SEpO2MQaXirbLmZQz+N7kVtZr3wka/d0jEdux3h6rYFgL\nWVo0\r\n=frVj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Addition options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e96eb09b31ddee60354f6a3804c748a986050ea9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.0.0-getWithTimeline-query-options-e96eb09b31ddee60354f6a3804c748a986050ea9_1592450219276_0.07496033803717062","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.0.0-getWithTimeline-query-options-3b3bf7ed50e44cc06f64ead436512b7fadeebf20":{"name":"@balena/jellyfish-client-sdk","version":"1.0.0-getWithTimeline-query-options-3b3bf7ed50e44cc06f64ead436512b7fadeebf20","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.0.0-getWithTimeline-query-options-3b3bf7ed50e44cc06f64ead436512b7fadeebf20","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"005a9b90e5a6e34c7e3c01ce1f6a068b36dcc040","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.0.0-getWithTimeline-query-options-3b3bf7ed50e44cc06f64ead436512b7fadeebf20.tgz","fileCount":16,"integrity":"sha512-fuipeVWsn35iPcKi/olBy6sCbYZHN6Gfipiut91PQaKf95xzX4DmNqZ+n9uci7oiYKKakmIgW0HQHM0DWTMNvQ==","signatures":[{"sig":"MEUCIEZxSKnCTkby23yby4u/T8/fOp5vq7c80vHqGrj2NiyaAiEAoD7J3D8MekZEU1jckdSXUayOFzKFl8KjBD/WdXdOY8A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6ty/CRA9TVsSAnZWagAAjy0P/RlYvB/6OJDEQVSskou0\nsDc0EEE7uOyuxoc4YukdyoVlUb2U68My0xnM3/SV6GXLYAbt2s9Plax7iTNw\n3LK5/6yiKcYJ6w17skErTrpVdEB72jDIAKxKbtaueiCkxYH7XIJTen/wGUxl\nsdSCLDkJ46AVU9ZynvheBOPkjqIOE0Ojqf+BrYUN5q5kHWc3FnSIujVjWat5\nJLszb59Lse9J2ImI/CuFP4BuTlHUIFx645O2UF8/hGNYzNe2/AB84OrSYl3Y\nwoA8nwtX0rqcumc3c6m6Ia5Mz2aAN1g2ijXOvR1i5V/prmOO2x7NwyyehMl3\nL1z56LyMBqFkyW8IB7lL5U6njaABlSjW8ArNoOOTH2FYp3euGvX+qgFCLUNX\njUCxtKuYMFv/nKrBRq09cEa8fab8e1FQ5XRRSLKEjO4KaUECOCJtIY2mPvDB\ne4XtdjxbXfXuyiVzXDEglsfkkU4si7xIvIP8GQ5rcdIKvLxK9mj073ojIpq0\nBkVDSqmckbdq1HAgEfbpwdWTz5G6tYAgrhAPhJLe2ptWSvMmZbzx3dJmltRX\nm8iHJ3xyAx46Z6IQcl4w5nfljWxGMOMHVwyKn46KnSrR8L7Jze3m4b8MjdHl\nNklt3SgrA5XJCDDUl7bfZ3aZv6zVS9gbBUHc0JwgbptxK93DpFleA/ZdiuKH\nGjDX\r\n=NxG2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"3b3bf7ed50e44cc06f64ead436512b7fadeebf20","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.0.0-getWithTimeline-query-options-3b3bf7ed50e44cc06f64ead436512b7fadeebf20_1592450239029_0.2744897975859295","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.0.0-getWithTimeline-query-options-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba":{"name":"@balena/jellyfish-client-sdk","version":"1.0.0-getWithTimeline-query-options-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.0.0-getWithTimeline-query-options-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"2aeb6f779676ea83ec410c146f28e4eef847a6f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.0.0-getWithTimeline-query-options-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba.tgz","fileCount":16,"integrity":"sha512-yn8czK9yOEdHEGdIa/PMEJvX0iBdjYmRZUFqnPIw5o5AKn31E0Cb0EFsfvjxegkB00x7QIHGIamEB695DKpCCQ==","signatures":[{"sig":"MEUCIQDcaVhO74R4ydAIOi9MDYJI6JoaUH2LGim0QOndzmB6AQIgKjxE5oMGXw7A7P3LSCgWdQ1LU7ViTD5BhXCqY9/aiCw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6t31CRA9TVsSAnZWagAAdoMP/0A/Ojm3oUxetssUYrRJ\nfAbXC3WdcTGRH8ichh7X5R3MDXvaTbIrfNocYw287KT/l26/Hs9IkoUFIZdT\nZCnQHMW6EtCGYOAu4p0m6whJf6IveO/OIACbo+xg7IqQ4uN+H8z/ctlTuOdv\nserqGWpHVGZ0HdvKK2KElFk/fBGqANVWFYj16n3WuCOLc2DrncKvMW4mrZvX\nAV+49N49X/oDtHDs1n8Zsc9Qr9h4ahLXyW+457KWHVdVvUGgvDOfB2XS+JcZ\nuPay9ZWHCUK9NDCKjOx4eryrCoBiLpKrU5PLijn7bHdQvhd5bEpYO9lyn65v\nSeevh9Ex5TvVsj1rQIJvXdphFXs13plScidwWSu5WkG2qvGJL9OkTdZAqioz\nch0NfZLhzAL7YAru/PSru7K80kNMFNARufzv6BuL7LH9euocr+yHUf2ta3rI\nyIMi8qyhVvuxhLT0vrvsqczptLqhG3TspFpIAroKKEet86Y1qhXeWUjwzQfb\nL4j3Piio/PUjWHgkxW3SFiO85TpuNXWHsABeVZExyxT7WoD0ydSVx1jfw6gy\nJCRY8TSvo1akIW7gIjYuvrxCUsvS/Dq/kZTYxB2Nw/xxnungLdyM9RC4MjqP\n64Vz5fntkev+roLt8p62x4QFdbiJld46r7BiLUntveLojaZ6wp1/3NXyCG8H\n4Y+i\r\n=sTCW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"88beadcba64fc86a14f5c6b49cce3fa60e2c5cba","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.0.0-getWithTimeline-query-options-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba_1592450549089_0.16733156274819172","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.0.0-getWithTimeline-update-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba":{"name":"@balena/jellyfish-client-sdk","version":"1.0.0-getWithTimeline-update-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.0.0-getWithTimeline-update-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"c234de500b2cc8880d9655434d8cab1f7b7ae357","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.0.0-getWithTimeline-update-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba.tgz","fileCount":16,"integrity":"sha512-daEc7MneUdQxcV/uft2L3K35glCE8R52hIAx6MZlU+P3/nqMOU1cYvYnHHXbYVvOVR/Yw5xnJtjPjmqv+vcskA==","signatures":[{"sig":"MEUCIH03w6FO9dm/7dnthUsL/OfA/I0P/gM/FekDnUGR8gieAiEA5B9J+fOoZSMTs+N/sPOROlngO2jCjueMYEgGkbd1kio=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6t/6CRA9TVsSAnZWagAAWfQP/16aOHSIIQIwLr9LoexA\nS7Nm/gc+0rY9+cpC48qQnb9QWfazccQwESn+MuOpce2uIwil3eYUIiP2ZdVL\nz9UNkZbscxRkbuYpZ36NXNOj0jAQVJj/EeNWkfk4Rw3E3NZ6NkzOfD0bIjJn\nKeOJPM6RnN5GzY3Yc7XijKjNoK3ixgjVN4LGKssvPQUbCZWSmdkXp9ZyvV47\nxHQgtOVYi1L9ErmS7TmxfF38TX6DxWJW5bVXgjI0A8V+eEzfGjEa52/4gJlT\nBlbsbxWA1veMmadPRyF2qElwAslKtkIxULNHVGJRGpbdGuDsCb0tB1gCvMTt\nXztkP9xx+xB0bCbihZX9wz7qtExtjbxsFPPR5p9FQqmQ89NZdLhsou1KTW6b\nIg0QFv8a0Vmcir8vd6TSbl/842d9psNuF5IduLEhgpa09zEaF0J84F+mQ5lT\ngDKKQsHBRWVLMmnGyI7PNus5bEWwCSLz/z5/sf2S3bqNrQwOjg1zcWHVELtm\nMfUD71o1/T5FOmI2TbJkkhj9cDe4qkmf0huz8UwCWRvcTco0ZsRa6ypzv0G9\n/4OPEfUWK0NWA85N6RAEUuLLejO4k5KeR2x7umoBJIf+QFeZridrnnjTmW3Y\nIc1VSvkBXMVbIJ5iOjGTySc00mdXdSY6EeB9AZOIxTgshYwWF3OzoDuaNqM3\nDN4h\r\n=kcan\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"88beadcba64fc86a14f5c6b49cce3fa60e2c5cba","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.0.0-getWithTimeline-update-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba_1592451066432_0.6674599879019738","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.0.0-getWithTimeline-update-8029d85dd226a1ea9518d4c422ca8a9d17b19074":{"name":"@balena/jellyfish-client-sdk","version":"1.0.0-getWithTimeline-update-8029d85dd226a1ea9518d4c422ca8a9d17b19074","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.0.0-getWithTimeline-update-8029d85dd226a1ea9518d4c422ca8a9d17b19074","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"6c907c11f6645ac19a44477ccd4ff47d6b099e19","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.0.0-getWithTimeline-update-8029d85dd226a1ea9518d4c422ca8a9d17b19074.tgz","fileCount":16,"integrity":"sha512-EX4l8eGP8js4Dgl8eTzSWi7H04MQNJM1xsABPAEvnDEXiQ8EMVnxzOuD/l+OqtnMhmNoVKp+dTGMxDh2FZenuQ==","signatures":[{"sig":"MEYCIQDYhqKxFT0mE/zTbXv9g65XUtjXAUD9TbkIcuvguPhjdwIhANhBnzclhUnrF01HhyHt9J7k63lXwownFjM8EvIoHIjy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6uC7CRA9TVsSAnZWagAAZYUP/RjSDbaqNdEG5TQaubge\nveHnIFhnYAxDX9IJ4X6oe/Z+zNLzOEzBNm5xRu7SuvPYwq0NPi0KjToZxKm3\nwpvR48KchbyleEFu5LSdwCtyW1jjNCpQlgSi7ayRtSCBpRzLaNickus6Z5Ba\nc1DAfugBS1s33OfYki1UVDLsCD9cidJj3LmkglbSYqs1GZNdJnej7/WeZKB6\nb3WCuVrgwW09bifMJEgKTxazgTXR2CkGdm3SZpCb5Qkpk6lFspi50BtRY6xK\n4m/lVS4P+VU5q3IYjtNKpADflLQFSR/zGI2Vw3rhaSO6S4cg71tQBocEFX4X\nsNuWbj9+vTZ3hh1lITHidlVlAZjM6U2daTRyu+QC3C7ISuh/OshU0Lp0N8BC\nIMT655JyAZFg44Rs/2M8b7XS1d5JMXzysVaZHYEDwqkuYbUKwDj+Hke9JVlM\ntqWWtcPuON0coqSYWP5Pxpq0sS6SsJhC1QIpGIVfW1YUjhsBsiAOFyr6YE3B\n36iTrGTgonZs0n0xoYz/8CKTTIZdNF+qwOfeBy798GfpHGwuTTQAqILgetRX\n60A9cXG8mcYKd2MWBqHODnoGj+AtdYNfwkTHSsTquuND9jUxOtHJyjHTzkfO\nPUrckjGl12jq0vkqP98VD7m96OY0zA1qS+Pmoxnf9kKKQcDBFs3GSanUfe1M\nxEoN\r\n=xzHJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"8029d85dd226a1ea9518d4c422ca8a9d17b19074","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.0.0-getWithTimeline-update-8029d85dd226a1ea9518d4c422ca8a9d17b19074_1592451258707_0.2862675204408993","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.0.0-getWithTimeline-update-d0840bf182638b26b4a307f5bf5027da57aa28b2":{"name":"@balena/jellyfish-client-sdk","version":"1.0.0-getWithTimeline-update-d0840bf182638b26b4a307f5bf5027da57aa28b2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.0.0-getWithTimeline-update-d0840bf182638b26b4a307f5bf5027da57aa28b2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"b5c50b77d6716a57033687ece9ae35bc90342563","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.0.0-getWithTimeline-update-d0840bf182638b26b4a307f5bf5027da57aa28b2.tgz","fileCount":16,"integrity":"sha512-6N0KlY6rwwirH1mI1zy6K+VQHe/PskwLV21egsFBFWsJFKGOnKLchY1xWIddNkSkB3ILjxIlrn63O4dqFfA58A==","signatures":[{"sig":"MEQCIDuScEeZLxnhZBsTeMJG9v+hiNShdcq3lj3VkG8ZTxBpAiB5/UbWzU8kEW+SoUHf9WWUqow5JZkWbpCTOymA4Bb8ag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6umRCRA9TVsSAnZWagAAQ/kQAIB1gN72HwHBUw/uNct7\nVbb7T9rfrOe9qWOjV6m+sX7Jzfq+06+ThxUwtNbQ4oZNH5rQB8mAszXVr4Bk\nqv86wMQJS2AaJOtAd+ncbWIJFt2QSqqm1XnNvCootfUu33E+TjbbiR6g3Oft\nHG4yT3tvuAn/3WWz3CTvXjOzKj2/77cOgOYdfY+mkIEY4qrdN7kh5/mHcYo/\nupo1DLmIQ7QnZpe9Sqw6i1JM6g/PcgZowRkasUFsCWU/98tK64UJHwNn2/92\nyBwwnmH8RNIAwpuY/G6zryxSinrGUxzGWN3taMuCqpICWAfyiFHgkFi552/2\ni7Vi+nKv+zzJZpEKHDy/+Z1spZ1gGyQ5Oyv9p0KZEJXyJXP1EjXIiyN4M5vU\nmLoUoaz9u35DIXNW2M847DhKj96EXaJj2YC9crmd9MsymCcO3tG2U1ldDbJv\nthN8wRfFn3R85g93qKXqHG38lcmEzFspvyL9SHS9oXHpE4do7MHLFI/LKr1I\nXWCPjDGtKfQXOcIoetUaLi9ak7vLJHnzq0j2GGQxCxL5baO1UwpVWe69zY46\nZkbbREhn0jLEVklxynq1w42LfHY7QYdx0ShuAnXhKVOB5KcdeFsEwR0zy1J9\nQaEy0QcIdf3v3l5KN62XTo1FFMK9eiDIihlbClaaRdJlTqW9q/czPeGy9f6D\neJAE\r\n=/mhz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"d0840bf182638b26b4a307f5bf5027da57aa28b2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.0.0-getWithTimeline-update-d0840bf182638b26b4a307f5bf5027da57aa28b2_1592453520919_0.6134480729515719","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.0.0":{"name":"@balena/jellyfish-client-sdk","version":"1.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"432b9b93c08ed3a82a824092bbf6336b38db055a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.0.0.tgz","fileCount":16,"integrity":"sha512-GqkKLlT6m08fnAHo39EKBRn3TYCVvYcX7JFxPBgdY6uhMNQIzBQqH9BHMdiJvmAE4EykO3YgUMW4kVSJOdKTbA==","signatures":[{"sig":"MEQCIANWP1tz0ihjWNMlTO/c/cpTr8t9ys5cm+0Dihke6VKHAiBizJcWVmLokDrwwagitKWIidMgEfoUwmR3MFC4Qn0wyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":115689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6upCCRA9TVsSAnZWagAAobAP/1SohSTd1MgNkUdiaTjy\nTGzNHhxhxUlSIZtYKwROeffoXkFM7PLmbuPhqN5S/6XX50qZYbi4j9v6+cDG\nSgsQfcTUMGzr4eMIDlu3j0K4AczBwoW1a4pJvq0VrDy8VHAoCnHPcA9DceeG\niWpStUSHB0siK4LFv+vxqvButMJ0Y8P+vDZVO1+hAKDFUzb8ExC+lNKYnwdK\nopXhxgzne3+vipR3MTX7sUTeXTf9An9T2UFE8DJFjWyGnGRyWtbDVCpChE5d\nlxp1JFTFY2egx4ehyH3opFSB5Jfch9N5ctW4FhO31Y/88uhUuOYzY02sTvSZ\noecYnqaspPtwgodrm/YvHmUwGaq1UKSPydwsgLGfI4X10l1yMkOElPeOXMhA\nMn65pcFwbt5TV/o/CdEQs+3UMSbIyDxBb9+OfdETIfPUmNigiFQod5QKhM3o\n4JoNoOcDKIFtd1W6qVtsnl/lnKZpo8Z5LuiVfyvKP1OvHmp6t55e8RZN7l4N\n4wvvVQIDwKt+FnlhcbTz74MuooQg95Z2/sH/M/PJULtPchix94tvuXQFZK+7\noUlBZba5u25kzh7NdfOOJtLyeFoASwdeVxJqTQVFPdlTEb8zLCLV/BoUNakO\nP5Lbvf2F8lJ3YKrsg7FLCbEoRU3R8jD7ydVR59nyCuG+U/CMCGQKDlpbw4s7\nvofA\r\n=yw76\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"62c9ea0c550aa7fffba2431f63b726827e0eb9de","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.0.0_1592453698071_0.9785645562066749","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.1.0-markAsRead-mentionsGroup-a2344b8c385cc6e1a0b85e35eedfbe6c1d11e69f":{"name":"@balena/jellyfish-client-sdk","version":"1.1.0-markAsRead-mentionsGroup-a2344b8c385cc6e1a0b85e35eedfbe6c1d11e69f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.1.0-markAsRead-mentionsGroup-a2344b8c385cc6e1a0b85e35eedfbe6c1d11e69f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"a79389b38cb99ba9032577681e6d0863993b856c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.1.0-markAsRead-mentionsGroup-a2344b8c385cc6e1a0b85e35eedfbe6c1d11e69f.tgz","fileCount":16,"integrity":"sha512-+jG7qg0xkPx31QwiS/Svaa4Ll4EPIfJfSHUeSmD6CRRaq3+D4EpsvidPAmHzgABH02kwVMoFBNIWhCPEc+pUHA==","signatures":[{"sig":"MEYCIQCrbZIxO1Ft6S+u/f26mbLC1qmQLx140JTwuRBQUvNJmAIhAO9/EeYWAU1hvKdYtTbm4dbBURnfPDy6K49mPraB0pYn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":119836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe65wBCRA9TVsSAnZWagAA+IcP/j5WXXZf70HihlpX1gZV\nDYT0e8nKHfLfrENEqjpMHoTR7lGpqCw/zo/QKQUg9tqb6tV8wYr7cBJFV8nt\nLPjuv4sQU2N2zzkXtEzgVDSxv6kFudQ5EvQgJEN5mEEILdMB1U351C4uuXUl\nVPbkhphTMNHH36lp8uvrxY8aFe+wO69vFBgI8CEPMU4jba7AYbBVy1FHsp3s\nvUMjPuvGw/Tq9AnJcdoc5b6/p8phPw1PdfvZNaaTy+QGLEMhEmhgmHB5Q9LD\nPjD5kCLDWJK7Vx9oq/652L0OXChz8Gv01D/we4D6SWOGKSYbTJCixpeUctrH\na5ZdzfBoNiVciClMxhzdBNPNvir2ZssDR1lfOxdiZwvvptyZgl8O99efEfc+\nYtUupSlHbuJVbFiyrdqvds64uoxjG53uYSD1nKKGolP5l1jH53PVDuKOYbAu\nXVywbbg1eZCzXBZixoXmldZ8kBK4NkNkmKOPEO8VjTkzaJrt1H9KL1dAWUHc\nLtJoPdJ8t8ZKlnQQGaF2mZaVfpxSvln9H3FKjQDe9mnvMfxVz7piy0/Z6Pr9\n9KG3DLmtGlYQMGRnNh9hNUV7Zo3gPfDVVB9mOrcpC+DeNsRjKWGm8S0WiF0A\n0LYjUDIsGTW3fe9cGvYT0YpG5/6g83xCZGbyLB0reRGmRNmG3+Slpcml8qj3\nif26\r\n=/Owx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"a2344b8c385cc6e1a0b85e35eedfbe6c1d11e69f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.1.0-markAsRead-mentionsGroup-a2344b8c385cc6e1a0b85e35eedfbe6c1d11e69f_1592499200343_0.5588853201128487","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.1.0-markAsRead-mentionsGroup-647d8041988dd6b7c5e19341f2e754e02927ccb4":{"name":"@balena/jellyfish-client-sdk","version":"1.1.0-markAsRead-mentionsGroup-647d8041988dd6b7c5e19341f2e754e02927ccb4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.1.0-markAsRead-mentionsGroup-647d8041988dd6b7c5e19341f2e754e02927ccb4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"3153155e02155d57714ab78c2199dc0f84418d0f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.1.0-markAsRead-mentionsGroup-647d8041988dd6b7c5e19341f2e754e02927ccb4.tgz","fileCount":16,"integrity":"sha512-TSVr6ZhxrRInqJLoR9gUlGzH3U8cFGOY3xHV4heR/D+X4K5dAFk0ua/nVqeVZZnC5RcbIx7VGM2W/kvU49KMSA==","signatures":[{"sig":"MEQCIDqzBiRMbQLEOJHoOaLe+6EfSqVoXGIqFcqrITEEy/PxAiBX3ffAGgrbal3KrffeKYYi6yLItQzm81bfD6GkwfOVeA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7CRhCRA9TVsSAnZWagAA4poP/1mhzSz/jPNbS0sL7GRv\nXfXRawN4/ibDEIwjwgiahfpO51qGEY1eITowwPmaR+uYKTxkeMvnbkzKX1Zn\naTzAm55GG8306xBgvazfq4o5mTnjSCU722Jjq0esecmzALC4KCGeLF2cql8C\nuQwKSlZZoDOl1WUftfx0razBojotlddkvA1isdCeACelzSoGCoAXAM7cA+nA\niLkIBvf0E27qBPCWeel7qTcY0FezCroCtMgFG2mGNQWrwh7MaLz16TGGgmVy\nNcP2zxCAT63L9TJCG9dVgvKOR8dMerS4ezmagDTh7MxXBP1/jNC2PGp9WCkO\ndEZJ7ARTyJTfTMMoYD/BbkzsGq17pEcZeIBtzt32yCNsQZ6o+hKIlgNzcuZq\nB+Jv9/40fWmNX9JIggi2511JmNZAcKn/QvxPmFWHVNdpOeF133Ph8GWC7f/K\n4vagSgCWSWUxtb6ij8cdiOrFji5Go5zbbwPPejja2qA9vAos+JSbVybgdWvx\nImep5ow02qrVV5fVjqBC5XL3iZe/lLIpTm43Uzzp3E4KZqtG1DBTGLZtudHV\n31s4aYJqe2dy9C+TRk810ro8EgntPhGlpYqMqnWSoCuN987j6OMaWZRcrEXT\n6fxetPUlJ61emDBdfroAtpqxNAIyruYBA7cSWxiY7lHso17L7USXGqJ/YO2s\nWLpp\r\n=urmr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"647d8041988dd6b7c5e19341f2e754e02927ccb4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.1.0-markAsRead-mentionsGroup-647d8041988dd6b7c5e19341f2e754e02927ccb4_1592534113056_0.13036720673805546","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.1.0":{"name":"@balena/jellyfish-client-sdk","version":"1.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.1.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"fddf48d523026d15d15f293bd1e5896e3cc9e7c9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.1.0.tgz","fileCount":16,"integrity":"sha512-CvkZ1+YD1mGx/YBmgOjLCxxwvAJ1E7t/hZjWv4Q6ChZizzUgt4x/ozoqtyr3FpVaY740WqVug1aXue8p3/+wpA==","signatures":[{"sig":"MEUCIQDSeztyCCQy7WjJn/LC8POivB21GtKTluTkY1kJvMbVAAIgKtL+EOchhA3WuL7kdWfqLa0IqV9LRXCjRMD2y5/Nsh4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7EaqCRA9TVsSAnZWagAA2NgQAJemNGBuwbg5w3tdbNtl\nVbSXUSOsHMjofZqFWxyY1zAw5uzeFT3fUH6Li41NmI93/x1E640jZR7dTATN\nLDGWZNzygQhm5wC2Km5QOxHCQOAlMdXXDdvAziO8esglyDxcflecSR2g/5Uq\nLI6m49VMwvSdo+FRaaDO6rPhEBWtuJhyHFtVs+ZlCEF6MaiLlR/xlxpIjnAT\nJnQlcQ5WxjodZj8vZjb6szDXBYSVdO+YWvSH8LeJ1T03nZpUiVB5icLEHvm/\nA6Fx6XK+bBPpmQlzPxY5Va9sudRHV+DKqia9T3KlZTOxBUlxDtpgFg8Jwj3V\nNRjMzaVFkCRmfDfnpFsLVu3TWbnd0PRftYJAsrFzBXMzH4BxICvLcR2E3qIx\n9ZMfmTfOihgjchkCWQCiAWIY5W96xn+KZ0Xim0Y1SMjg1hqz/qrYcM0y/AbP\nDKtX8WBK0k73e3nUl1ShCMBj0KVWhhBXKnJDmMKf6184JnVLcUZ97X+IuuoW\nvTp4VEKV78fvOyuxNGD2DA/5Fbhry28fEtJbK+9//q3QfnbmNPdvGRJ/umfy\nnK/WrLdWncl/5cmJWfp+O9MQdJxNNeMJIcmcgJsAQ43ncPqxLFQJFUTAUZBj\nwQc0aULoiJjK3XYrF6J3OWbjfHgVlG1oMY95JtJA/wSg9jljDpVvqvCojIXG\nGlJ3\r\n=k0/H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"61d7c417371edddd1c6754c4e3efef340c11705d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.1.0_1592542890124_0.13624854584225976","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.1.1-form-response-links-1dec8273905dcd1f9c3f057629b2450aeccd487b":{"name":"@balena/jellyfish-client-sdk","version":"1.1.1-form-response-links-1dec8273905dcd1f9c3f057629b2450aeccd487b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.1.1-form-response-links-1dec8273905dcd1f9c3f057629b2450aeccd487b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"fcbd7c139377de106fd65b078f4bdf4d89a409b1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.1.1-form-response-links-1dec8273905dcd1f9c3f057629b2450aeccd487b.tgz","fileCount":16,"integrity":"sha512-UnjRbJBxkIM6WjEHueTOmLuFuHf3X/H7zz+TvF2BxtoCjXYNz9R8TleO+RtccVKMaA+ci6sIAQVhv0Mz8M6RXw==","signatures":[{"sig":"MEQCICuTWIgRlpq1QW7aFeL3QKWWdlBDTXQMb4Zy/uYNQCFHAiA5HlcMRku+MdAFfCg1oHalNSIFsP1l0TuGmAPXMbqUAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8P6lCRA9TVsSAnZWagAAYSYP+wTf3C8uK34Ppvtmmtxh\nsX+jF0zP/2hRqOu5MPwrt2jvHv311ueGDvdGjwxGuDOM+10aCps1hu383qSt\n9/RU0U5pQgEkK+qdUlbQTHpyVL6lIWGApjPqOsrzRBNhNspBVdd8P9hfhqYz\nk9aQbfqYTJm6QAv5MQcQy+uX/vuJWOI2l/nysfuz43PuxJFEExpnPIN/pBsU\nAGcZNFpCTSM+UDyvmWhzrsstPzzrFgcpRpUgFfBBEVSQZwigImxhGBsnHw8b\nZHBF3ze+4I6kRm1S7k4U0NFi53E0Lcjfyj4h3l/N6+7f4h2zepKnjVFdnKXT\n9aJKSmlejudMjN3FHZEjg9Y4K0Hnyn89yqwaPlx3yaNyQzMiHGOUtOS4V5OD\nILmDt9mxbHhESb74O1Cx4/TvgC/dkrhjLldvYNpuYB+8OAs+gx9CHL0I/mzq\nWPUGn/N0fC4C4ytGVBrCGWs6z1LLHH4MkCagNjlujMg6gmQVOOnDXKhNSzG2\n4FNQJ4uUFtLH0R+OsxEl4UyTmQyBulxPAENbYXtWM6y+XrACdioQN7dVFJ/k\n1I988vQtsWmpEzs80XPlmMmNR1/g23oYKI+nXV24vFI3qdK4xnM6zUdDZs+y\np7/PwkA6ZL0fgg9BZOUnQ27HSiLTXg4TRXmLZaR9QjnKcVZMOP2NPkqDNbqp\n67Bg\r\n=zQeb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"1dec8273905dcd1f9c3f057629b2450aeccd487b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.1.1-form-response-links-1dec8273905dcd1f9c3f057629b2450aeccd487b_1592852132414_0.30279399628726966","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.1.1-form-response-links-25d0b3f8f701f09cb14ae109a412dcdf562a77fa":{"name":"@balena/jellyfish-client-sdk","version":"1.1.1-form-response-links-25d0b3f8f701f09cb14ae109a412dcdf562a77fa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.1.1-form-response-links-25d0b3f8f701f09cb14ae109a412dcdf562a77fa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"7942aa730e297ceb84be96529813e2e34287496b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.1.1-form-response-links-25d0b3f8f701f09cb14ae109a412dcdf562a77fa.tgz","fileCount":16,"integrity":"sha512-ebIztvF+2llC3FRl1dFHeIqdrGGA5GpAwX/PJilZFG1jN8FaGXgo+g+cbUM4e4gyYthEaq8G4jtcqSor9ywV8w==","signatures":[{"sig":"MEUCIQCyM36aFNbCrcoOdm/mzvkZBvrCm3R+F35nXyO/3OKvjgIgGyIdxZsJNNYWKQ9h2ARUsN4ke5NIl9HZZ5YBNmdbJn4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8fsKCRA9TVsSAnZWagAAAVYP+wYvuSlef9vde3zzokCy\ntnlZOCCqMSpYTKJpNedb2e6vCHrG4AHMkcjAhJsZ0gUCaJJu0jIxdgklNCn/\noT77lxxYjXyxXSUXMcPOpDPBOcvc2ZVuSPjpleIo/hESalB+D0t5bXLx1qey\n/xHyrBdLzPEFAaikG21VXRo80/ET+x3NX8IDyZBfo7q6mePjxfJIoyFX9jo5\nXzj87Ih/6GXNu/2fDpP3ovxs3OnQYa5xl8m/XaFKvK2fibM9YFwTn2LI1swp\ngLQTvhNR3oG3zldxKuwstgmeB59HhVTSVYc7+DFwnONEEJxqtG8nqSzzu1DW\ntJMlPMiH832Ly0KLosXY36Vs/LzYpRrWo0cpThYKVjZrLt6QPv8IT95Eb9Um\nBNu+9be1LDtf86n+P8UE/zGY8SGVmrIkChLXyGZs6t0pGRkYhTNP7GytJ7QR\nu07yMM61g+03VJ2XqOBAkxxWBwtbeClGhqatz9ulcOl87sL6Nk3E5uONYdhA\nI3F2epp2IFcMSnNNuVbeev7LyMuIkcXi23zORLzn62b5cS31fmS1u4tK9F7s\nwtV3cklo41Pbc7k3RB1EzRr44wOFz86BMplHT5q2ZbRfPF6DpuTrG0whh5UL\nFkPCvhNyLfhTc2glEYJ20mxfA9bLg2DuQcsmQHkoamDH7ZzQ1Unrl9kb7Y9O\nOFkB\r\n=6wu5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"25d0b3f8f701f09cb14ae109a412dcdf562a77fa","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.1.1-form-response-links-25d0b3f8f701f09cb14ae109a412dcdf562a77fa_1592916744956_0.24650141760532884","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.1.1":{"name":"@balena/jellyfish-client-sdk","version":"1.1.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.1.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"50edee20d674583ffbc4fdc96cb5abf8abaf07a1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.1.1.tgz","fileCount":16,"integrity":"sha512-2Ri6rLQr9/wRV19bBj8E5UZJ1mdMP3MAW+O3e9EaeAOCzAmzSqJ5bcrmb2PsmmBviMB6efeRJkcYqBg/KFstSA==","signatures":[{"sig":"MEUCIQCWUlQHzrrdVP3JnUof1ghBrHhC+8Ste4h4jdJ7GFturgIgA4nws9sxp3xyaHMeWuK8QFQguGG26cMp1zRscT4HkGE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8nj6CRA9TVsSAnZWagAAwToP/R11GVfYg389DV6TXGK7\nNJo4QmpxaZ6QEz5MapMIz9oXwVmWMQEOMjz0MmEsO1Jslf9BFz7hUO0S9O8R\nBPV6A/ylibDA2wV6NLI59K8SYc6TzbsnvR6YuGCMVaEiOAUaey0OhbZdz+s6\n2tKlSZxgFfiysiNgcl9PRkd7qaXZfpXgQ7t00+EK56uxbGS0bugYgHO9eq5L\nlaR9CXxjJM8R6KsuzTjbJO/QANYRE+L8kmxVSlF567hG+vpTN5iTJOBqJRrj\n/gyC1Gr9Zs/pUneZr2F7Qzk5TbnG+6TzQAJjhayaBvjqQOHvMuC120KMozPS\n02XONxonxVqvU/qLuP9kvfjt/K9oHeBELM0BOaKc/R3HSukyaLgcBwDMjItQ\nowkrvyXHH9Mo8Ie71m/tRC7KcHenk561QS6aowVl16kuSaQNhAEIGuSWK91Y\nHFi86FoqoTqY0AwlYNg6ZUcvjqW2GSG4rVkGYEFx3nHqHa4bquyqP9tosBgn\nqmppYZ+s4MfJPI0NJ3KJEqvn+sGBhslyJEA6t6Bv3bOPRew0HIEr1kpIH5Sh\nZqA+zmedZlad/l0AaxJX9EidxWtpkoTmh2FWF2nm7VAyWkg0Gq25QcakOyYz\nSAhFMe+jqQ/Fq2K8vxJCZjwDHcL/AiZyogLNqxJjCqcJd9Zn5BlyYsefoT1m\nhhYL\r\n=Ggg8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"ef6579c8bb7b21bdf40f29456a5f78ead1206c8a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.1.1_1592948986116_0.42569480360219014","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.0.0-rename-support-issue-has-attached-support-thread-association-e26fcf978bdcbee115de21c7b5cb1c3454c49d31":{"name":"@balena/jellyfish-client-sdk","version":"2.0.0-rename-support-issue-has-attached-support-thread-association-e26fcf978bdcbee115de21c7b5cb1c3454c49d31","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.0.0-rename-support-issue-has-attached-support-thread-association-e26fcf978bdcbee115de21c7b5cb1c3454c49d31","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"09b5b219b243985c1a2115502ee0111db62aa54a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.0.0-rename-support-issue-has-attached-support-thread-association-e26fcf978bdcbee115de21c7b5cb1c3454c49d31.tgz","fileCount":16,"integrity":"sha512-pStSQdpuJjy/HJSyX5+h1z1LMboz9rbg/9SsOsTE8iiyvXD0UPF1K6ZBMWdtdoMaD40PjG7zeM7o17WKrryLOQ==","signatures":[{"sig":"MEUCIQCa9nHoqGL+DO+JOBr2ZFr6t+2im6sFYcGyNIZlOHB10wIgc6XsGKjHjHR2U8T2OMaQ3aG4fm8zfpzrTKAI24ho8gE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8oyhCRA9TVsSAnZWagAAlyUQAIYQNjdhgPeXkVm9P5o6\nJC+f+psydNory+uQPkXo+HZ8JxUTP1VgPVfbwMJzRsX+PRdh+aY9dMCAOk70\n/2+TyvrXx05y+ZZJEU+DJMXJUuZmPEWB8AQ+mrJvOHJMyNHa9/8fE12woqob\nowje5Cyrxnygf2M9L5ZFWTE/2jh8wlK1Bu4RTVmjOmmDaTMsbTNCJKmHV0Et\nl+AJ6nOW2p3rpel6djvQAxXcrpq98xqUK5pCRj3sV+In+yI3AkZ4lqYWZwSn\n6S4geM7ltQQUzc4R82SwzzjIHu7cT8vGYDguCoTRqhtMWabgAuISEBiotbA9\nYjYfCigHmdMfhSaH1lHCCovqxpVLABAlcSQyIdXnISmMjkC1oOR0CUuVrM/q\nPy1fmy7XNHqdPxx9wj48Fjuf8665HPjEzjvQYft0PGING/sNFMuoh2UDGNtR\nJ4QzO895mNsqaTipYOMufgRWxvotERaP27s9uxBJrsb655jYYbCb+v46V4YO\n7eqK0DvSizJprgdNtwW4WTKME2esezhb6PMh/YgCrCXxkjao2fil7Fsgm/xk\nNa73r5Q25tXiKcgN85wnPS4AN0lYXfzwCF6f0czak62q/Iz7gX7/3PJ+NhGm\nSAy5OuuuegoUyUjdICfk+Oqa2QsZC+iFED18qawRWUAXGW7uLLGThtpCfVGV\n2qHx\r\n=EYy7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e26fcf978bdcbee115de21c7b5cb1c3454c49d31","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.0.0-rename-support-issue-has-attached-support-thread-association-e26fcf978bdcbee115de21c7b5cb1c3454c49d31_1592954016458_0.13756011958083225","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.2.0-mark-as-read-1-to-1-b80ad2bcb736f6a75ba6dab62b7d3a300313baaf":{"name":"@balena/jellyfish-client-sdk","version":"1.2.0-mark-as-read-1-to-1-b80ad2bcb736f6a75ba6dab62b7d3a300313baaf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.2.0-mark-as-read-1-to-1-b80ad2bcb736f6a75ba6dab62b7d3a300313baaf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"9c72ed7b0772395d8ac3efa4313996922e32d294","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.2.0-mark-as-read-1-to-1-b80ad2bcb736f6a75ba6dab62b7d3a300313baaf.tgz","fileCount":16,"integrity":"sha512-ilyPduqn6BZ+g4uR/bqiAO2X+wHPu5FVmqsPfOyOG4bGFDwnbMqNv/AlZV3rXHqcnDkIOANUPHAmtskjY7hllg==","signatures":[{"sig":"MEQCIDWmZYhsxZ9CESyrA99ButcPMrdfyLNvI73TLnEuo8p9AiA/JqRiaM/xGESFXoNg6l0Ck1KJhU9hWG2Hlvp/tc7S/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFQNdCRA9TVsSAnZWagAArWMP+wSmmNNJwQmDr1yCkqhC\nUj7vN6DGyPLRKd5VKrB9PXgHxMQI8kf/OQ4InDKe7jHhW2czkLL2+F2vraTY\nrBSYARIwU2zXgiUO6OedYXkrkiQ3dkUgzJqYVCbjIKTysMSmg09W7SSUJPHw\njwOgnasGlkx3b4ykBqM0FcMsKmfngFEAuHhxYSetSQ8mbYcFrh3bUZD8aF5y\nFtjj7DgKrutP60DJnj4IHiscHjpZHxmIZTtKbGm3YqFwkm5MFWH975b6P2Ee\nY6d3E7AowNMCClDIoWILcLP8p0wHADVZriZGMiiuTKs5Rha25ewuwoQ5Yjrg\ndpFRA5ny8+lqgJLAjZL8hFzKenuBEwTXxIDOW3BfeEkNTmo8VpiEEv+axniD\nnlMqzeGvTeAHmRDzIHTvtPQgXqv2pmOtyRhoFlKa8msxoXp8/aLjX+unOcIb\nCxmQQOE7cPUVsMKLPW58V4g57skt1FLbUDTEA1GdpPO0BBPzfHqchQVSD/OQ\nkQH96WHigY8IRm5qHv9UkUIA53c+DFBbE4fMFp7iSA8hdXjuzR7F3xZP7bWG\nipem+Hfha5yoeZ0aKuJf2ppZmbDPnMSo0HG7vekXxb8IjMv9qB4sGa3vc2Rc\nEROxdRO6Qr94L9uGFTC0rL9PZU+MyZO2lQ2esu6gJhxHDIEmaTjLOg4Dy5C4\nCwdd\r\n=0jAQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b80ad2bcb736f6a75ba6dab62b7d3a300313baaf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.2.0-mark-as-read-1-to-1-b80ad2bcb736f6a75ba6dab62b7d3a300313baaf_1595212636596_0.2257310301155595","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.2.0":{"name":"@balena/jellyfish-client-sdk","version":"1.2.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.2.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"4709f8304b98bd7425f765523aa1af0b6881d3e1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.2.0.tgz","fileCount":16,"integrity":"sha512-Kb7bDPihBvujueC+7dZguXoRGHu8hAWd/q4LC734dnISgSU6Hsd1j5ge4ggxlb24pH1qKlc2lsGyhijy5LEI/A==","signatures":[{"sig":"MEUCIQCArzd5ENGZncdrZk82BB065+w34TWPVkxzf5LCjXxUcwIgWKRpxvJdDJaKerdgeMygOKGlX3ESFVjWe1F4r+F0FLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFUerCRA9TVsSAnZWagAAKvQP/j5lrKMWvGgJYAQGArG7\n2oQ7cfqhtEEDqmAtyjtMMOG2AgUKNHcX3ndT1ACJExA5I1nELP53NhcMZMcH\nhUHLPybqtATaAmpMWWmzjVy14I03niZCMUUQPPH3xF/p1i3w+O52wIt87s1f\nubDt45Snta9h574Wwh29YXVyn2X1JQCrJYQbWrDUZPsPBRJTrOH8sVSHdy9n\ng/LAfzk+3S3aliJ3fzoHTVUV7j6KXMLtV/SNzo2wQcASjaoC2/R54KDnSZwP\niazE8p5mRtgaTjqpf1qZCUwL/t/4YLUhUsYL/DjSQv5u5C3Wanzzo/lvuct3\nyavToTVUSfPTm/zrn46n9qZtpBVRCqSeQsJFbiYLBXIPbtP/DPHowbF9x4jg\nj/4qWr6Ry840pcdGN4HNGaqy53K00h8rvedNt1h2hJugHV9lNt0BYPcbJG4v\ny8TrQ90fRIpIgLjTS4VEd10wQioITsb/L5DVnbJrL4nvOhdWfHA8H8SXn3W2\n02QaSKkSm0QsmJ6R4t6RfWo57aOfPH9dMx3BDtk28mLtjerQi8P0/aZVHd+4\nl+yIQIOcq01mH21IehpDGu1o/zLHRKUTnlATk/iUhKUvB7ENROaO0KDOODeK\nb4Vuejc7Q2SARabB1DHO92GoSIPub+Dy4l2S276IMwz6o92GUzyV+kumjWc/\nZt6F\r\n=M6CE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"9ba8775f14cf9019e3fb2610015704c8881de6ec","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.2.0_1595230122602_0.870902380224174","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.3.0-link-support-thread-to-pattern-e664179c5ae87702f0f7f5e18f45cdf51b41bcb3":{"name":"@balena/jellyfish-client-sdk","version":"1.3.0-link-support-thread-to-pattern-e664179c5ae87702f0f7f5e18f45cdf51b41bcb3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.3.0-link-support-thread-to-pattern-e664179c5ae87702f0f7f5e18f45cdf51b41bcb3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"0b3ac6226a6a8b1a070020c74c4fc60bd0e84726","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.3.0-link-support-thread-to-pattern-e664179c5ae87702f0f7f5e18f45cdf51b41bcb3.tgz","fileCount":16,"integrity":"sha512-fZx70lqM6QvdiHL61OaH4i7wHu3iKO+3PSWCnicJtehGhZv8mFatMiwxZZ8Su7Sp2YImVKEbwkWCKWq1c4EXsw==","signatures":[{"sig":"MEQCIA1BFmz9vHEq77wyaq7DTUsVep1VQs/60d9szIyfq8SlAiAi48fFHB+J0ry44BDkLGSER6zEGUQWg8k/o9lqpiEFJw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF+EyCRA9TVsSAnZWagAAnL4P/jFqV9z9fpYFgcz8148e\nmH8o8BNTrghhiNZa5o/3WPHTx1oWr03udozACOM+BXLDR03hgY94I1sh45Ik\nqw3rgCun6efGIsacGUxmQ1fKWRp219mOia4Q80n8BFiBFnnwFqp0Lox3HKgS\nay3dBUXMV+mNLcVO7PR1w3zamfHOUv/LBGW+Cf3ax1GsG/ToyxdCU9rM/cYk\nfVK6X6mU4Gs61qi+J72AJ9bGeGJ95W3oCZt3Aqyy3FMoPnujo6Hu/wIyTWR7\n8Nr5zLpPi1PIhG14RpqKIaCsfcGXr1F8vddXCycbSLhXof9tcvtsbfDKJoUb\naWy4vcqxQUVhdFsxeO92PubnqbZI0d8p9QYKeBgIE6SdG6t9oQsKhpIX+61g\nYpIqgYhKAq9sTSW1Huymaur0bBsUfzk5bT3G3+VwKnUzUcW2ZKAPq1dF8OBn\nK9N1QCOCgxuKwyoJskHipxdooxYumb9Y3r/AYXuSze5pah3LqJKE6SFZsJys\nIlO76Lf9+2WoRk8znBgtGifDrGeqYR2ww7sFyZPlP0836xmUdFA57ZRTfJX+\nASQPGsswoeZx9I+zu0lUm/KWSxFrox2H1ktlCb3ABMwP6qFr+wXHEbxOIIOR\nNZu3xLey6HhoWJXcG6E4gyT8mMiOQnvBFxaM7MBTzLnGFDxFg39Tusohw8K6\noTRZ\r\n=wnRb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e664179c5ae87702f0f7f5e18f45cdf51b41bcb3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.3.0-link-support-thread-to-pattern-e664179c5ae87702f0f7f5e18f45cdf51b41bcb3_1595400498050_0.40165189490275277","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.3.0-link-support-thread-to-pattern-4ecf0a042b3d74091a131337ba73e43ff0524030":{"name":"@balena/jellyfish-client-sdk","version":"1.3.0-link-support-thread-to-pattern-4ecf0a042b3d74091a131337ba73e43ff0524030","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.3.0-link-support-thread-to-pattern-4ecf0a042b3d74091a131337ba73e43ff0524030","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"a168d60c0c16e3a00e8a0daf0efee7355bcc567e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.3.0-link-support-thread-to-pattern-4ecf0a042b3d74091a131337ba73e43ff0524030.tgz","fileCount":16,"integrity":"sha512-9uo75dFkGWo3YRQvw/a3RelVRr7AAusXl9SenBMk/5bDaOj5JAgOEbBtYcc58QgrDv7kCFEoOspTXnYUY6HcBw==","signatures":[{"sig":"MEQCIFy0RVQZCqcy/MKSJzSVo/kAXnyTbhTy9dC62Qstj+5MAiBGuHAzWYGf+p//YL292Fdz4T3fwJzhv5+pTCjcANOUYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF+oICRA9TVsSAnZWagAAJfIP/j3fjL47LZRuOHDpp0uR\naSK9kD3SxaoO/qnKeSRdynAhl7hlvBW+MUqhQd9uw5esgrUwIt/QTqfyJk5M\nDW/g7nJhn66pnV0OdYnJLz1UJvDBMjCwsm22ICFoH6FmH2HzTGkmamuoMaXc\ntsJ1CCr92ZZItCms95/9Mq+jz/r+He82OgWyqnFxBUTbOtPqtsy/9lVO40l6\n847xIl0JNpY6+UHThbrLmi8jjEQfSiiT+KoChzo9Jl+W/a40tr9PDxDcEx1o\nx+63PhcJK4uNyx3jZ5fRVI9pgdcyQWfSRG0QqRt7N/Sp4+oc2kDHVphF/jx1\nJHCXf2ob/HB8cV871zeAf9q7gG3PGbps51hT4QoVaCe+D4r/xU85Hw+xCiqS\n91gnrQWYVxwc5XrMNruxtmWUUrki/c6d18kEK9Rb19OILfd25Im5CzKcntfK\nX1w5LcoJKtv6qn4E6QZ15/Z7r3ihZsYmqjzHD1erOwAPimFHuktoCtRUbtd/\nQ20oWQu3G0HAvivlUhc80Sf7RFcS8LBoiFr4ii1ypZesrEc8Gn9vx2LYB57r\nCBfxtQe/37TYjSo5AtUJVM5r+HKNzU/cPc45zkaw8e2znYKTh6z3O1h1lUxg\nUdNoxF5Jt1VCJ056MSfLLkKMDN/48MzCTdb2CM8P79I1lHhPlljV3VMYxQW2\nhiKX\r\n=x53I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"4ecf0a042b3d74091a131337ba73e43ff0524030","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.3.0-link-support-thread-to-pattern-4ecf0a042b3d74091a131337ba73e43ff0524030_1595402759804_0.7316487731635108","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.3.0":{"name":"@balena/jellyfish-client-sdk","version":"1.3.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.3.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"38c101d5ed2015f56b6ffdd58a8dd172d71773a5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.3.0.tgz","fileCount":16,"integrity":"sha512-Ex57HaI3/xB0hM/tRuEwUY03A3aIqDnx+byovCuuoS3RIy7nsGjIaMD1ejTP9VMfJMdSVjnecCor1xBlaUseTg==","signatures":[{"sig":"MEYCIQD7ZxH0W67evQKLPNhdDnFIjbPSNqYdBnFZNNrZ6tgxngIhAO+m1NRuWZZDlvnHLI40Y9n/vNQXk2T5JDixWVza6cVA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfF+xzCRA9TVsSAnZWagAA8tYP/jOMvQsI4xZvxPdJNAo7\nzT/IIvG+XDwHijSRlA+fZx2f4sv5VlNYvAJRtXlPhtHtPNq0DWzrPNv6gSSm\nun6jjJ6KSwI1Y0IFAzaOrmug6z0ztjz/XRr4jexGPGY9NrN31orTqZ47HtM/\nAh0GjjrRwFSSMnvaeu1gtjkofy8UUscxyLGzUsI0BCdFMDRuUvPG/ryyi16X\nzgfJ6h85KyRd6g62we3hMWXtwxd0wDXcEkrqj7D5PO57j5JbT6q/NiBj9gyp\n5k2RYWf+kYhJn+PQTatmQ9cgUSOX/jBRV29A28uxUnTH1qBYqVYIHZpoBblp\nvk3mTGYsF4gnnBTqTPeKDHwHb3SrS9mzMkBo4dJsbUgbBXrRUdGKPetS+pbr\n2/KUJhdHj2eG0QKtfmTHCUSV0wTROGa0xlT5y9KBZkiQRASieNzf3bF6TC4d\nyhDCmpiogqRWCOdFuPmBk/TLAuM1R2kDrPTvYdyDdIa7ed/96oS6mnnLHSJL\n9Mf4aw4Lyxr2BsNSPn+ngCYJ7aCisZyOeNzL1SLiY2RsO3MsW+UkA0344P9k\nZ+CTLA9Pb1bWpgm1G5IF1UpgLq9WkpUUyarh5GgBkDftXddSpWD+iSkLdwSm\nNqbGmEcr+OWJsRLzWOy5TlrK8L6BEP4jtwZCcXEV1aSyrHkt24US78b1iOV1\n5tmC\r\n=+6Wm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"cb0c663a294adc478f9fcaa4ec5ae73de6615290","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.3.0_1595403378702_0.8302112641807822","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.4.0-streams-options-fb3a9f5185b722a5c9117b9a40ee7da324ce5448":{"name":"@balena/jellyfish-client-sdk","version":"1.4.0-streams-options-fb3a9f5185b722a5c9117b9a40ee7da324ce5448","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.4.0-streams-options-fb3a9f5185b722a5c9117b9a40ee7da324ce5448","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"8ae7a5d9b644f7bd04cf5e60bc48e908977d882e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.4.0-streams-options-fb3a9f5185b722a5c9117b9a40ee7da324ce5448.tgz","fileCount":16,"integrity":"sha512-yqY2NRPQQhojH+tEzuMgpFXK+yrBfqo5LtCddpp55OUHVmU0GkE25adPWxas4V4d5krdbPTPxv5FG7joPdBhYQ==","signatures":[{"sig":"MEUCIHBVaM1aaIsFwuKLuEORZ3lh3tMlQOMNUBg1MtrtI8bKAiEAwt+ykzU4iTHjWqTxwb1JqbTlUfPqNiMJWUnSlbCTE7M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGob2CRA9TVsSAnZWagAAhZwP/3xid3V4vd5DrTqTdxnz\nbS0ANerJY3erMFPg38WAQbP3nSIJrsAl7mVbHuf0nHxiJXOW93I6h7/neFbK\n3ZROw+fh80WHDxtRBibO0DcWVx4WI1KzVvpPfy4WMPcZMFn/HcwDL+ENjYW+\nvUbdm+eh15DVTHhj5Rm71jQ//EIvQ5I+C30Mp23KZv0DEhbo4c01ge5m2/vG\nByFmIuyw+7Rnxar6s5pOtZCy1Aqxcps7t66mL5Dn5HqLBdRhEjezW6wkrGjO\npM1i1KWtzJyM5+5BQN1R3J3inq9DfpHV3kxEx0NmffRlKYV87vCmmu/utiY6\nQ97S+YjuOLBGD+efpS4T2AeRw1vfhCsbRTXFeLaZJjQraICoAnXNml3h8Ea+\nLVv8hK4qZMJLY6x67U9X8xnn4c6GO1TlaSCi6GKdZRfI96Qh2kZ2GyV/vuCU\neR6izKofDEqxTOD9ll2gkas1NhUbvQvSJgkz4qNoBJmCSeVWz3campEgYHRh\n9EsJXY+QJXS7HJiYlBa/i2EbQMxQQAnF/Tt89gNFSviLhSgLBsStOCZmkPyu\nzweA3DbgY+hbRrkxgOO5utUVZI0Dxa3ZuelXSVDDdZfti26Oaag5gQaiHbWb\nkIFNN+0OiuW4ntzu8MJodl/3ToJs/PHkoZDnFQDtfsvK1oXqGHyzJiFKECZT\nBjg7\r\n=6m+w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | A map of options |\n| options.populate | <code>function</code> | Perform an initial query and send        the results as an array to this function. All cards in this array        become eligible for the `unmatch` event |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"fb3a9f5185b722a5c9117b9a40ee7da324ce5448","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.4.0-streams-options-fb3a9f5185b722a5c9117b9a40ee7da324ce5448_1595574005716_0.5999499220175639","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.4.0":{"name":"@balena/jellyfish-client-sdk","version":"1.4.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.4.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"0f22a8f583f5a4328683d687895f63373abe5d68","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.4.0.tgz","fileCount":16,"integrity":"sha512-8DLB50/fP73SUnE0oZsW1Z8cOF0i+KhowSSBo9L2J42HNRysbkkVBG981LuLRfDDHpNg7X1lhAKm/kLLgbRzOg==","signatures":[{"sig":"MEUCIFDTPHlTvCEBF56cvB27dvfIBUtRDvvcPLAs9pevjcNWAiEAtAjcKqkbkJ/b2WJhRS9MdGZtLUqL3QyJtPvqM4n6mjw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":124941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGogkCRA9TVsSAnZWagAA3v0P/0GKSH16SPue/f2v5kRQ\nblBDAMHTAZefeqJ5D3mRB69eh2KZp5AyzE7cNF7AUk9oYQXix86T2ZXunjXR\nv8bKQaFhLe7ZLiga4kY1ewXzOGhT9cCVtehygcz3/O7g6QC6nuDZo2J9He0C\nI0+Ef0MxLkdUzUvrPMQslzXQWfXKfapsfbEK+i8Y5KA57x7WCLgdObrLhYTJ\nYdmfmi0BKyUX3SLC34R+5dk/2pEst0zdTGz9ScXcXrFwMKGdscNeOwT/jKuB\n/oTZUeUGidFA/KcS93b4lYJRPRDa5dpGLzdhf2ZnhzxcLP7SxOf1BcLCPUyo\nXd41tdpL0u2A3M/CIECmcdVoZpFijPlfnoB/pPzsEC9II87qTkPdy3WSLEHv\ns56fz2IcyIa4w0iGkhiPEsiMaQrPTmWrdMLnKLE94MKh/pEpusYtpKzk4tjt\nYyU0hQE7F0jJ2TdjeY72lviOb8lPp1ANXO6x4Hy/HxrwOGSfrjNMc3a59geG\nxQHPkWyDO1jdDRV7Vg67g3gharoXw8HVx6/SW8ZyBS9kPTwQFhHARRMwdTVk\nIU69mmjtnA2qlPCQb1IgrMxY8gK1qDjRmvSGP45dy0RAVfzk5PwAfP4AFuie\ncdEa0DhahCpbAvPVCZa/HqsekcDwQPO3PHgFLvjTVi+7a8EQxc6AElSXsD+n\nVBp3\r\n=WQrx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"ac5dc5bf38ce8830b0c5adac5daadc2e175c42da","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.4.0_1595574307763_0.6818179684634842","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.5.0-pattern-has-pi-c218f8a494c341fcefb031a7972eadb252642644":{"name":"@balena/jellyfish-client-sdk","version":"1.5.0-pattern-has-pi-c218f8a494c341fcefb031a7972eadb252642644","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.5.0-pattern-has-pi-c218f8a494c341fcefb031a7972eadb252642644","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"aefb5c08c43e595ce8886a374da7a41aa1c20a60","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.5.0-pattern-has-pi-c218f8a494c341fcefb031a7972eadb252642644.tgz","fileCount":16,"integrity":"sha512-B3LvWjfkbP3KyaJR1mLQm3lypx4ybt9IJb7U2KcX3JxQm2MipYlBJkDB2zdUmVztrxJx2wtMD75g1MnKt7C2GA==","signatures":[{"sig":"MEQCIFqNEtO+QkkZ4AZedBlbzMfuxclMM2XnGJ9wA/jR8CLKAiAzTOE+rGwg/0YnyuCzsZrat0Hb2Y2af41iE9JnKJ9Zmg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":126067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGrWRCRA9TVsSAnZWagAACLkQAIvJM9tHp3obo6SU2BHJ\nyxfXzRGvn/Fy5R+IQB938zFz8h7PNz3OOmpBAZEPJCjBOJOpR3Zn1wYnl3yM\nztaqGEgweeRKlNQa3Bvpz8ohKEVtlWbmJbIUON3Ts6gAP062iIBqWxMM19pE\nT8gLDQ1ZWICAd3wuv702EAq9DdL7e8Vfsi8/jR28kIpUpG9dsHtMmkuv5nkl\nxHxia+iSLGbiaQWA8dz8NxHxLYbqfXMalHltlXHxn5bGPnjPYcaJiczy1VZ3\nWYZf8S2JCFgVSF0F3QOcESDLf6oGdkulPM7qxuFW8sZHnvSfkd5Vv8QrO2lE\nnIw82zcPM5Zc1WUTDdcw3PZFzhUdVeL0C/T/NfNrdS3uFC79ltswijGNaTt8\nEFW61YOJoMCPmsd5k6ZBfXYZnzCiHTvEJCf35Xv4LVFpUAZGaRRClv34VDdC\nx13Cjb/m0l3RX8hWD9tKO0TVlZA/4oO75fOqRRwvq9PeL8LWUaCTL3L3m0fd\nBu9JqEOVHMkj3pF04ymFXqGpASdTf9XiWoEK/is2M9FS89RiEcBXoWuLw/cb\nd0pGElrPo2eiwJCJHLgjGUuQDJO60b+OO0Q80oyDgQXva2526CUl4HBCiiC8\nUgnLZo1rIHdM4KrIThtBzJhQu40sWbRFjf+Tdb1u5RylJkjrS+215VJXmJ0r\n/xvB\r\n=3SFV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | A map of options |\n| options.populate | <code>function</code> | Perform an initial query and send        the results as an array to this function. All cards in this array        become eligible for the `unmatch` event |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"c218f8a494c341fcefb031a7972eadb252642644","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.5.0-pattern-has-pi-c218f8a494c341fcefb031a7972eadb252642644_1595585937058_0.46062798367456637","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.5.0":{"name":"@balena/jellyfish-client-sdk","version":"1.5.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.5.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"23286e06a94290e4865726fe1877f841581927f7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.5.0.tgz","fileCount":16,"integrity":"sha512-BFhqxxwQzdP3EZL3TxH99rUX0UEQ4smLrcb/NTiGncb7HDnN3brGE++VGIgRV5C+oMvtFbDQKveujpwunsaC9w==","signatures":[{"sig":"MEUCIQDmU2eHn4MUyRcFGeMBKVuGEsDG8/HMhn9y/Crn3tYz7AIgBGjp/IcHuhtjgEOgWt9FNw7Ulxtg7F+EtrnI0Y8DzdI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":126011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfGraDCRA9TVsSAnZWagAA8oUP/RTFFUbctSEQT0UE9i1M\n4KlujHH1hEfNutkfpjwWBSGU280kLBINsIZRp9d0WPJlcqNdWUlPuAIY/ldE\nCE/vjPPXtbTE03ZSwUyq1W8mu3ll21zwNRrLw58pgBip+AEEh275YZATMfZT\nIgN2x9u59zfC8DxsFt6GMw0L9BFHUKsm0DAomakRsQVcKgmGGKWc/HhDfvWM\n6yIClbnGfglr326XcI3+zjqfoLoMVA9B5s+EoZDUbwSGvcjiJAPx/jSh8ekz\nLrdRLXN3HaRpAeHzqhT44xYhLFTaPcMnSaM1T326ue67id/gnpZxUgMOJUKo\nFrRk1xyXwO2QmTzz17IEjoGIgxKqYCoS7Vowj9U9bWOct3E00+nN0/cZqCJg\nwKJcQWhRRcbK7BP++9UxJicn9ryg0UhOIJdjkY/qol+T+x3cBotdHyYyEP25\nGMBjsHV9buGk38m/Zz0qMLIeUF3dQyQuK6R/+2aIJNcA0rAG5PY5oWkGnS0E\nkWYkF8G08Qvi8B722ecybxVlrOuTgR1F9u2z5WmBjlvB29IHWCRU998Qbaxm\nlMqVJcldWn3B6sorbxb/P1S/iKAmhP1UQkd8vzM5UlczyPiAP2piFYMO7zhP\n31taHYV08OyYHpFiPiRYBIwSYZojyxZqsPLFHtf68SVEPJHTR0sz4fYODkk/\nOBcy\r\n=dZTY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"e1c34f8f2fe9501ddc253b2cc04cdd28b05f241a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.5.0_1595586178575_0.6202698288652244","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.5.1-form-response-gh-and-pattern-links-e2f177714147b541c12a2840cee2b244bbd4c558":{"name":"@balena/jellyfish-client-sdk","version":"1.5.1-form-response-gh-and-pattern-links-e2f177714147b541c12a2840cee2b244bbd4c558","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.5.1-form-response-gh-and-pattern-links-e2f177714147b541c12a2840cee2b244bbd4c558","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"6d254a212bbb1e048ee64fc90ead93afe618fd9e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.5.1-form-response-gh-and-pattern-links-e2f177714147b541c12a2840cee2b244bbd4c558.tgz","fileCount":16,"integrity":"sha512-ELg/ZLyQvmKRMzAfDJ+HnP1ptA3sg0LTECPAScAg4kVS4wyqMOUsoHT0VOh8+FZVm7+v1z7Q6btpv/M9iQcsYQ==","signatures":[{"sig":"MEUCIQCv0hmTJV+gKW+44AauLabn+u4p9A/iY1SCgx2h4BD9BQIgJc455ELLOqsqn/tURL/eo/sf1nfQotSbDmmr8dGH1Sk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIob4CRA9TVsSAnZWagAArX0P/jsJQ1Y7bSljSAUUMMrO\n5kT4lW030YVdpNzgZZDLRm2flpSKe1Eg9PHJfupsfYodqemZu+PgsFWP07Jl\n2LrESkNAtis6G1lbinETEbwxGltkhkQWhGC3oBGi6RX6DxUnyDJKExOhPqa/\nS5YT2nzl0tW6oG2EaVyBXu26+K1pX3rMPqA9gQ2O0I3H5ytyh83xOjo/yqCA\n3b7VIbg1xEYBXaBFmCQjbK7/XlUa05CINZNK5tGRcbKulkNa4B9pFDRhHVbL\nbTDv3FbvQf5glQ0ZJqPREAVePf62Tn/OPUWPydGoUZ8zQC/GCUDW6C7Fp+Mq\nnXuJ3ExY0ghPnPi7QLbiSTgzVndEi1w6E8er8JKzOBt0OM0WRy72qPDVvOH/\nBlMARmS3oNiyRYHpr/H1hRK+XRDLuFD7TyzaYlgnHp80ev93ibM23DM0hnLf\ngdkl9VAKMgfLtzHGfQaUxOb2E4menzarRBnnFp7VJ1cCzrUH2ih8aGhM5NMP\ni7ygN8mFXZifV25qtUQ6ShohMim8jcqw390h/6tpBBmvralkh7g0rmS9zGkr\nPhljaEOgpSRcXmt+lINvvtrykwo0XsUs46XeDPdwcBRs/wnl3cALfG9TO5IG\n+NQHgAJ0rTjpRTO4EUYd9P+vRzkFJq4180JocyYxIUrCHZZHElkoI2xRd0Af\nSHfR\r\n=y9Sb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | A map of options |\n| options.populate | <code>function</code> | Perform an initial query and send        the results as an array to this function. All cards in this array        become eligible for the `unmatch` event |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e2f177714147b541c12a2840cee2b244bbd4c558","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.5.1-form-response-gh-and-pattern-links-e2f177714147b541c12a2840cee2b244bbd4c558_1596098295854_0.5315321862269906","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.5.1":{"name":"@balena/jellyfish-client-sdk","version":"1.5.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.5.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"4afeb4dcaee355c68fb754e45045c0f212664ad8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.5.1.tgz","fileCount":16,"integrity":"sha512-6b4OTrL41BK1ZMxyd81kRaJaGUG+GnufDeeBrqtoVenhdfc03yS3GJwhkNjelcROcLF9hTBHlJvJP9kuKm4Fpg==","signatures":[{"sig":"MEYCIQCK2RtZYxHVz+u1V4EfB2y/OBfj00FE9lV0xb5Myzm5gQIhAK6hRhkhAqlirp+ihYkO+rjinYWDUw3NfOdv7iNHizfy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIrHKCRA9TVsSAnZWagAAaEIQAI1cqTglEjlxmuitjtEH\neH4ypOSVG1Jg2PLJnY+Mw8MZlv7+8SAXLj+DTZEqQL9WpKBxh02rEvIG6jyp\nRijr1HuwItHDkD2c1/CrTZvTFIAo8VDLk5Uh65blTupwSM+o1TwlqzHL/bbG\nIMyUk+fzwmJzdJWcavxpUziZTTaxwkYEJ4b9F1W0R9w+Ac0glbgzyyGS3WpV\nqhPpPAMiFWoIgl1mu05fjX7qQPkOCvD6qslIjx3CYvGLPzA1StgxmA8N/lSz\nHqnbyJqF+3aspAd7q4edH4BlyRxAD6xAofIFW4w2Vx5Eic/zcLSn+PSZK54K\n2o/mVHOkAKIYX2inPzzOxhE+vYLG9DMJMTZjQnYt/z1Bagb8979sOPPKKf+A\n0YcXFn2yfDnV1cVvAqSZRP7Qek6C0BYuUqWaRT71UmKcfxbsRYyl97QeUmkZ\n6c+5mDAi/LHjjk5gBkz5bvOsgXapWbPrTTUSRm1xrNJW5iKvTKZVfmdV+Nxw\nPySu2ofXCL0umc/kc3xic7Q10o6z3YQGupUFBRyF1tDbTBxpkgwausPJZfhj\nuIJbrg6lt5y1tKLE5ogMnSR8fSjSkfY47WXgpz0GRGfsiA0UPkjJoRdBZDKo\ns3zdcovqcI6I2dpjikRjQ/7kGb8/+q4pRJ1WtNcCcHRjz9Q0EcKO6Tg9QCTq\nr3bB\r\n=IP0E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"8353a8b8299a0dda2f79940248fec41db362d025","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.5.1_1596109258023_0.2373430923615245","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.0.0-remove-stream-options-342a7ed63037367b1e0fad9a91e3f945fa6cc4ef":{"name":"@balena/jellyfish-client-sdk","version":"2.0.0-remove-stream-options-342a7ed63037367b1e0fad9a91e3f945fa6cc4ef","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.0.0-remove-stream-options-342a7ed63037367b1e0fad9a91e3f945fa6cc4ef","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"8ffcd84215d1f3a4845397d50bf6356e94be69da","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.0.0-remove-stream-options-342a7ed63037367b1e0fad9a91e3f945fa6cc4ef.tgz","fileCount":16,"integrity":"sha512-zBqDlz9UlRryWY9e7M7+5D3pVV+us7CBjri/M0rCtK9eb1OYX9dTTbDHW8AOujZwcVrbmd5AjE6Mdivcbxz1NA==","signatures":[{"sig":"MEQCIBOLd4MkP38k4tJaUNC2BgLuusVb1HWHpehf6vhxxKC0AiAGm8hfaDYVqMnWr6b2qNk1gzUSNYfgbLzFycZ/3Z4s4g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":126419,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIsHTCRA9TVsSAnZWagAAggMP/391/H76BYKZj68/l9Y4\njn7IKASJTChPMNWPhSWRGtux0iaUZtoGzRR1z+U1TtbB6iGrnKCcpvaK7I0f\niuSLNwKA270nutDIsbmaygpzq3L46Kd1M0B7JZ6S5rcVOa91aIHA6B6Kau3t\nPmmqVeqKcz3x3cP8BQZFqvqz+eMxCk+xpqaUmAWCiduw9Ss4BH44ieW/71J1\nzqt/MQmCgm2O2tQBHj+5yNmYPsGZvIcGzh6LvpcBfQ5w55TkZSO1uwwq50LT\nWTJ6NfH9vYHWhFRSsvPCwO9v+LSfWX0t82dRQyRNtp83QeRJUfoC331upRIy\n5ilrj3HL2b7fSi6dNO6vJmu2OukJsTkL3QgkO2XOg5KXtjqk5oD7bPND5GS6\n6eS04dFo5s9+mWlXgodIkWYOvtZAeW30Drg84iqiZFRhgKDiTBttPe7S4o+V\nMeEPpfNX26P8sRA92DTZGcudHepINSauWyR6mbozV0YW/QoHo3Z20hZ/87AO\n9PUB0sU9jKQkwViY5L7wG91HE31rbGjK6xh2iGGbSeXiBQDZm1uQE9wQCyVF\nyTihEJRURIrXcBOBYIVshSRIxmW9CxfbqgDerKrIjBgZ7qy501zejggvezlZ\nFRUhQvnRi/Xtnf8279lcdj8SM4eycj9Lk+TUq9aTvyQGS8HGxCexagpK5fiu\nynJd\r\n=gqKU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"342a7ed63037367b1e0fad9a91e3f945fa6cc4ef","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.0.0-remove-stream-options-342a7ed63037367b1e0fad9a91e3f945fa6cc4ef_1596113363423_0.1978812803212664","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.0.0":{"name":"@balena/jellyfish-client-sdk","version":"2.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"df29d32fc859ee698eef43288fa1809bd5bd8b08","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.0.0.tgz","fileCount":16,"integrity":"sha512-ZOUIJcA5ACo9RdOFhzxPqoVvpw74Gvzjla0vI5pt/rNWOme1NpfKdHOAbpbbU7iwCxgb3YBCTNAgmkYbl1bYgw==","signatures":[{"sig":"MEUCIBJFdFjgU2GB1aXaORBregnB8hABglhe8ff1dhEKojVqAiEAu8z1RN4uQccnPzgiU8PjKswNtEFO/Io92tiqlq9Uo/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":126356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIsKSCRA9TVsSAnZWagAAm6wP/1i9HSAr7bfPnfgVrhsd\nwJh+Ppx8e7IseIF2sHcHEy8bnNLImHIlyU12wgQ/pYD/A2JrjbN7W66XGCKp\niITQzf2N/TKKNFeHMlSJ6R0aTOrn/EVy0fpVnKvntK4CAdjIbOH43irw2yUB\n1ZH5qt6h36r5463NlSy2p10Y9lgDmsI0zO5G1AeF+3evmcDd4gjRwxYD4UUT\njMinIxOaLn7LdhDZJdRRp/1zo/qTQEE1yv8GccHYvbX+HxkFYPqBDHoTmICJ\niuk46vVhsh2NrOYvQlbZvFpK5yDyKa1jSilqkHBIjQQlH7WWcMhNCs6Zkju8\ndTOUPIDlSL0Ush4DL8xOIV02LpZ0nrmgTTI2clBJtEocuRr9ijljcjE9MtYU\nwNQZfP4zsm3tZW5QQN/iq74fPFVj02qYB9lusnhKsLVZTv1KGqzZKWBDJha4\nbLeS4nCVdxARxNZ88nd5H2iUFpVfhX4Km5sUaC0e/3LQFlC5+irU1YaeDpSo\ncv9ANiA4IjdCiJU1YNS6f+wSZzVl1JAzyQW/5n5bEUF+JaHtGF2yhrqiU0de\nDdGGon0iz0GAfgWLXXmUlBoidHbr6tXmEh4xf7nY3FZBtyhx7APmH4IusFBR\nMzwmLGCtbzOajPpXQsyetng8t60kQRTu2LmoBkKuQBn4aPco0xn39JroKQaD\nEqHX\r\n=IQKp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"57f0545f3e11b47d1b294ea824bb2f8fe8ecdcf7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.0.0_1596113554348_0.8321606580568459","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"1.6.0-loopmvp-link-milestone-to-pi-89421f2d8573d052d85a85b626266ee519482290":{"name":"@balena/jellyfish-client-sdk","version":"1.6.0-loopmvp-link-milestone-to-pi-89421f2d8573d052d85a85b626266ee519482290","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@1.6.0-loopmvp-link-milestone-to-pi-89421f2d8573d052d85a85b626266ee519482290","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"93b3155617c5d86740025aa0b9dd4f8fe20bab9e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-1.6.0-loopmvp-link-milestone-to-pi-89421f2d8573d052d85a85b626266ee519482290.tgz","fileCount":16,"integrity":"sha512-mYi/NnX1IdFYEs7EM/EIBM7Pi5EH4+8WGxoj99gVfxQ11UEeXzk7N/gwFrsFoJyZOCwt79QGIF9SaqyeWW+DiQ==","signatures":[{"sig":"MEQCIFs2+s6eduYbGEqr1LOZo2Glow17GgvyIlf+MXEK/UCkAiBe1NUXU5PanQLDomf8iPuaLQJftHFrc7DWc7zkscaYVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIsf3CRA9TVsSAnZWagAAINYP/0hy7KUengydEoONsKmd\nP0TuE+kIqgU+mSnuWcZ2MQML1QH3YL4bC9AwCtMsBrnq6q5qlpzwwaCftvY3\nrvrINVUGtj0TuRutllstp8dUF5wFmQ+DqYjoSjvzIdNXM9ggh1iiT623ShGi\nOqkeyCT8a1Sc7R0fdNrs84cY5UftaLoN784rBfvpIeP2jSVkJRiK6Fg1OITi\n6d+fiNEhcdy1EHZ6AxgHhaQGc9kTOkzFdR9SckiagwP2zpojP4BiVxfIs8dv\nK+AipesFxSHX180l3EBYBmdFMwTwD1t5z5+oCxBjsVna4hzze4l3ANPc6kvM\nJeoN0p9gAS8Lrbm+rzIDvmuiJQLBYDu/aInbJKpqO3v4elI/JZnFXuwz8GzN\nRRmMTF0fqSMIoc2ftvQ/2a9YkH0UagwsrEbkoeCOz9M7bm473isydA8na9sA\nVNpAmGgw05LhtqrISDcV/Na5lITYEnLwY8deOy2Qxx0DwM9GCa1lq6LKf53Y\n1zBfUYyQRt1dXodn3ByxmMrAB6lFZStxlMWmGH5MlfZ8ZIaBHCFMskC7qdtv\n6XdD9ypQLO9DnuBNJqnSQdqduI4/K5w3ExqEu9k4pJxX70fWkhVHghf1iWys\n2jw9GZd54EazI43fUb+YfmxTAL5odEywn28qHjuvdMKxXGJZENTC8qbsA5cr\nn+Ps\r\n=VUxY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | A map of options |\n| options.populate | <code>function</code> | Perform an initial query and send        the results as an array to this function. All cards in this array        become eligible for the `unmatch` event |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"89421f2d8573d052d85a85b626266ee519482290","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_1.6.0-loopmvp-link-milestone-to-pi-89421f2d8573d052d85a85b626266ee519482290_1596114935085_0.8693350820296275","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.0-loopmvp-link-milestone-to-pi-1b6d16287061d19fa071069ae79f3badd03539ae":{"name":"@balena/jellyfish-client-sdk","version":"2.1.0-loopmvp-link-milestone-to-pi-1b6d16287061d19fa071069ae79f3badd03539ae","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.0-loopmvp-link-milestone-to-pi-1b6d16287061d19fa071069ae79f3badd03539ae","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"be7dbc053a9b941b897798868eccaf0125819eec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.0-loopmvp-link-milestone-to-pi-1b6d16287061d19fa071069ae79f3badd03539ae.tgz","fileCount":16,"integrity":"sha512-oG/p7tvmTcZnAGu0HtTjXOdTKgN9ziZ5OjSbaLUKouP9LPSSsUyAvUbAap7/3/MebRZV7RqF5VIkbiUwlHk3Cw==","signatures":[{"sig":"MEQCIDNduzL6H0NII9Pyk71+uvT/9U6e45hjLQG0dEsNr2DiAiBpN5e8owvENPU6L+gaMCX423IkD/dPM9mVYiYh4fT6AA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfI+/tCRA9TVsSAnZWagAAo+cP/3PnBq9ME5cr83hni3IX\nHPGSV58pP2x7p9Q/G8UIy2RL0aGhw/e/WhNgE8RNmuPZdM3rfeYoP1mZKsvO\nCr0FV900NiOj9wX/Ae7vbTXk6HdS3/AGfiyVphR0ytU9JYoU4xLAU0b3ATi3\nTd9ACht/jrG4315N9F3b4g8QOkWbP8n7bQpViObcNbJ9tQpkrmOpYu5yGxCk\n87WHJbVNQa3XUYNvqnG4NLSXvifUgsqpwpsTxRr9pvCry2/qUU1P5GnhtGP2\nKieoVaOnsYJ359Pf7UnjuP48ecfiyu4thOqF+qjCsnNGWkCTZyJu9p9ZQGH3\nG5pXrCUeQBER9BzHGSXstaGVcYHkK6IV5wf4LVeufOwCDUiGsRXefZIjnKDo\nf0HI/LeYQEMFywDkQHar8T1As48Lahu0PrmePkdJvcQ4fC6e1MkqvJvoGt5r\nyV35SGafk4eoRhj2p+AcNJ1k36yyPAxyd0+FzD2sRgHsCz5CI24n1kPootqx\np4+xWLnk2j0L/V6mBjH0/078PqYBOQBViyIOCMP7bgrxBNOZoaKD3Wsx8dYo\nLvn5w/tC3seVNeqnZ5Qq0VKfciOoz4t5jFmRG5V+Vawtk0n3rcI4yaI+564e\nlkV9R4yClz78szeuaQBMMP+xbTdtso+DYqUNBiTjdfM11Shxez5AruKx4BSJ\n2M0U\r\n=W+Ex\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"1b6d16287061d19fa071069ae79f3badd03539ae","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.0-loopmvp-link-milestone-to-pi-1b6d16287061d19fa071069ae79f3badd03539ae_1596190701344_0.0953477779486398","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.0":{"name":"@balena/jellyfish-client-sdk","version":"2.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"d6b127b62b6ddc9ce992794eb7e3eb395d989ccc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.0.tgz","fileCount":16,"integrity":"sha512-E5VWpzSEupZ0RmF+EIg3KjNH7dZSuOHQPuRsGr0A/wtxzLSZcSDNe/TMIoquXF6Fw3Ds/JdRCDvPlPUM82s66A==","signatures":[{"sig":"MEUCIQC9L9ZG4mAPtNiMRM0fujvsxY6C3R24h1LRpNiTent1jgIgLBV8OxaBHClbmMXCDdGD+b5wst0HiDhZ0jwslbDzbms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":126976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJ2R3CRA9TVsSAnZWagAAAgsP/1lzbgjRSNfAhDRO+XCH\n9D5v3h1onkppDnUN2vZEC2h484WKWIK8giwgYJrY5OX58R04wnC1ZVRHtHam\njqdD6RmAnu6WkSLpiRT8FM+Xdg+aVwziF+8QzJcFH1tLYMdU2QQ6TmhiuBvN\nM7bRFVDjga+dXCUBS/me+FbZJd2oKx4fUDIlaucWQ8QDZ6ClcRIrZEq9s9XQ\nZ4Z45s09Y32AekImKxW8rYA7787OUOc6uhwaFPQRBU1MI4/sIFuPkuZ2tS10\n5dRq/ie0Fc9yLhKWNkoQsgKnQp3e1T/9S1IXieHZUgmKQtOg0oOVTYLjxS+A\nQdhk8HpYB0HPW6GUDiz0PeVY7mMyTTdDBhgt+vGnN94Nj1ZjN3AGCnxo0YON\nj7nQvRjYThEAiHvXns/hddwK2dVKrq3rfPGZBjt2I9eKrVCKx+I4Aw0JUDzp\npolnQPehEcgmAURZLQZg1iL7TKDYsXXDvRJrhhul/+1ajxq5JQTWrdknHdpE\nPcmFDmv/0f5OvmBwIQMndIdpxo0FXaSTg4FjaEbzowP2GLpvVx6520UsBege\nSSd+z3CdNiSuNFSp+RXLHwPEdDwzFyG6h2+N3//vu3170M/okRN+9w5ATkz/\n75NNWW4Qr/IR1cbp2gw2cZ9NDQp37131Pjcvmo7xXabrpAUTzpL/DT+UsDsd\ntDqX\r\n=kSGi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"0ecda2cce10858e695928299c82eb0fd6af50530","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.0_1596417143052_0.6638980110772283","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.1-lucianbuzzo-markasread-function-33-52dd7b886f65e7a583dec20c4e859cb51c02ffd4":{"name":"@balena/jellyfish-client-sdk","version":"2.1.1-lucianbuzzo-markasread-function-33-52dd7b886f65e7a583dec20c4e859cb51c02ffd4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.1-lucianbuzzo-markasread-function-33-52dd7b886f65e7a583dec20c4e859cb51c02ffd4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"afd9e5cdda6d196a9b047a9c6f0274bce505f4a6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.1-lucianbuzzo-markasread-function-33-52dd7b886f65e7a583dec20c4e859cb51c02ffd4.tgz","fileCount":16,"integrity":"sha512-rA399a5fjH6j2rj9yoGtE5j8t2zbc5+1t8F+Bpw1CC0c70zY5IAXa8JTs4iFu6n6IPVij9TQKxd7ypUtN30cbg==","signatures":[{"sig":"MEUCIEhVaUF6FC1S8LHS7NzT6hiJFXIc10eqNiIKfPn/1vh8AiEAuCL1BeoE75A1u+kAmpWWYcOQIVNRPOXg2LXKTuSEQYk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNqOpCRA9TVsSAnZWagAAwg0QAIKd9yuIEJFYKovJ2mCD\nI0YxNtMLzTnkNogtiAB1/HM41RUbk6RXkn5Z2gMM9tJ1FMc0U+NYqsvUqlOm\ng6fjnbiKF7GQ7hXuTOYQj6BAFkY11Y34OzVSt5ZqfxnKzXC2biZn7ZEz3iCf\nT0Gt1bmKisVrVk36oED4EZusGaxvdu5g78qgXFGz3uXh+58WMMNWors7PrZU\nNybh0pvevuKXfxgF2Hjt32WYAn0ZnrD8n0ixN6x+sqY1/s/q4ieoJmxrE4pa\nwQn6utH4Tjk5Aa2gRLgdu092oDihZt0ULDbW7cpaeXhFGFfmHbJATcaShD+I\nrGKsPbJa03xZAM6X6m5JYO8j+9x5KTKc7Xw9etFArbghbYAHZaCNk1yzbUc4\nC8+1MxlG50GgAcwPAlVVt6lNeJl+1O3j6VtypEwVbfNNiu6mZm0NhreHF/d9\nyvfhZsRBFKQwflag9B8ndL1rlMnLEPllwrvd9/kQoMRmN8+9RjuUH3I5slIq\nCZgIKcbTchbcA8a/yg43L2qhKWd//uwd7jmbKc9Jgz6xSlE7pFRPhuT2Kn0c\ntNsFbtdtdI+5FM0ir9TCgG5ydTOYkNMAOtmH+anBdUmgg4/cNj9SaszdyOPv\n0NF2rlK7nPZ54HMfb89+aJgAazdJA8ZQ75OIObHvM1ywZkWqSDftF9sG9jvx\nQGtu\r\n=AqPr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"52dd7b886f65e7a583dec20c4e859cb51c02ffd4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.1-lucianbuzzo-markasread-function-33-52dd7b886f65e7a583dec20c4e859cb51c02ffd4_1597416360764_0.5313507325639275","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.1-lucianbuzzo-markasread-function-33-80b229c77a492a039b8f6e14a5d20d4241bf8316":{"name":"@balena/jellyfish-client-sdk","version":"2.1.1-lucianbuzzo-markasread-function-33-80b229c77a492a039b8f6e14a5d20d4241bf8316","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.1-lucianbuzzo-markasread-function-33-80b229c77a492a039b8f6e14a5d20d4241bf8316","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"a0f8fb8d5dd5318f4f71a2b557dc705216c8ca83","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.1-lucianbuzzo-markasread-function-33-80b229c77a492a039b8f6e14a5d20d4241bf8316.tgz","fileCount":16,"integrity":"sha512-i1VKV3eVWEvmc2p7UH44MaDjIWYnZL6DZv558QzlrfESsIjwa2mj23wB4/rPpLJ7ILJsUFkdMevKehArAwNGtg==","signatures":[{"sig":"MEYCIQDVwdDmm3zR7h2XNW/6QHAxdiQhAmLvSWvBS6RbF7BjggIhAOBytbUxx9upvSjUHvK9b+p3N65mwiia7ZI6IC4tu8Ak","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":130024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNqUjCRA9TVsSAnZWagAA4awP/RLkIbA73JunwsjhfUsZ\nCdYWsJgaqIoyeJ+XyOmKupKOfIZusLCd9mJQ/hQjCSh/NwkDZwkIOxMp4nB+\ncGKTW7gAxLwl2+HVxZbq3ZkNBHdBCbqBWPESnYKNARB/LHI1pRy2g6s0uASl\nYnjL+xSWHcmgng7ttQdsyxqhrZ9TOv34zU9vndiAPq9J9yKhEFhPSicHUuUg\nypzBthL8U8b1DMgi9MMNdBFZ3at1db9M4koD3frAq7EqSfVxjPWIAg7CmwH4\nhadxNwJW3claAGj0hDh4JWjq5vSgIhO/mVKHkwFo/iVM3Mp1+7Pl5QJJJ1hK\nZEswdiziUclViaX17DJGtsPy59nzGZ7KsWLYspueCikKIwXnP+GTB+rYTgG5\nNFFieQfwNu22JpS9lpQQwOdrwNXKtgZj4QbkXRFycUggbHQOnbF9OSkqxR4K\nLU566q/8XEs/Ky+GeeHYfcB2UiP2WMVztOhTrQuCVUtJ0fFMFtnjv7zN0MLX\n/ESv2/VhRAXciUtqlyqo7PeOS+tq4HbIUTTCPW4sfoFuI1d4/P3V3mhzy/fY\nUEwYTrAoKtc+GlGedHBF9eXmMYUrggzuQKcm8yofOpz1lkwKm7Fprm66GgkW\nfJlxCJtxlRa+TcjMEKXjxhOXpSvUeGAH242aNPbi3p3wCt3/CTirz1UIf4gW\ngmwG\r\n=UH17\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"80b229c77a492a039b8f6e14a5d20d4241bf8316","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.1-lucianbuzzo-markasread-function-33-80b229c77a492a039b8f6e14a5d20d4241bf8316_1597416739074_0.6916196216035866","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.1-lucianbuzzo-markasread-function-33-a5e6c805e0b1e7327f14902524fdb4b63f7b1e92":{"name":"@balena/jellyfish-client-sdk","version":"2.1.1-lucianbuzzo-markasread-function-33-a5e6c805e0b1e7327f14902524fdb4b63f7b1e92","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.1-lucianbuzzo-markasread-function-33-a5e6c805e0b1e7327f14902524fdb4b63f7b1e92","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"51677bf2e7095178d3e73d73a63bb3a850347e41","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.1-lucianbuzzo-markasread-function-33-a5e6c805e0b1e7327f14902524fdb4b63f7b1e92.tgz","fileCount":16,"integrity":"sha512-MLfiQL9CRA4nBvkkJcDtI/Ag45q6UM9GfNZ60cPP98Bre34bhHR1nWyFaN6td6WtZGZ29f8YJiVW3A5zKZCnXw==","signatures":[{"sig":"MEUCIQDJfOOnWSJtsXftu6gTudYtHbjxa5TN5gFX94zPS/XYSgIgM4oBn9B3j/l7BzrshJgVFiUnQLV9kXa/FjE4WGWk5CU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":130056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNqjiCRA9TVsSAnZWagAAKdkP/RuFvsDfaTBHW552f50+\n3EBCoB+3k3GuOOAob80N3GbbPq4hWlvLDPPug0tMRwQnnfH/pS41oj4PeEkM\nVJfd293d61+Pl68LUHBSsfE5ryJvUFS4DlWQrKpX689VJR1IeuJBJO7kR5Ep\nc88p8MEFBBT5Kq7ZE594kNfACROqhPBc1ctb5lXknzOcoYOGY4mqkJiyRY65\nsCJsHYyazEEKuVdVfOg7EFyPSB2KwFvbNwGAV5SCORpOsBWV2K82VI9J4ZMj\nJVJkcfLgm83wai2hsJq/Wh+s+MrI4snZhglYWYISjWXEk8hzHMZax2FtGmXU\nmphww0so4qIUSdaYhsyvBtrpERXqYIdRSDNMOYI9tyQWLnKmjXx66wRspxwv\nLndcwSsmHWp+VvABq1TDyuC7nM0TNkCSEVSFkXl/omJvLNj6BgKhCwarvV6M\najTv14iJ4JlFfbpFr46gTojkcZoY5MQyF5AyKAuWAHzUkfndd3e245wLw//C\nESYDX4mViwaN1xT6wTm6NnYPo6WI8hfPZaivKyMXhYrFLhhJO166WUfunG+D\n5pf68PDAmNVcGblhbhvFqXxO3qZx1b+liwg3zoA/ZNuHbt6/90tcmPBtpc4Z\n6Xgii7AQ9ZIUbSSLWSVzcclUcaBeF2iwyVmkXglazVhBAcD9ve1sanzXH07b\n30bO\r\n=PIzR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"a5e6c805e0b1e7327f14902524fdb4b63f7b1e92","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.1-lucianbuzzo-markasread-function-33-a5e6c805e0b1e7327f14902524fdb4b63f7b1e92_1597417698178_0.44590000047818457","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.1-lucianbuzzo-markasread-function-33-581ace32365d1a4ca0211a5e88d137b37d67e7a0":{"name":"@balena/jellyfish-client-sdk","version":"2.1.1-lucianbuzzo-markasread-function-33-581ace32365d1a4ca0211a5e88d137b37d67e7a0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.1-lucianbuzzo-markasread-function-33-581ace32365d1a4ca0211a5e88d137b37d67e7a0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"0df4e26c7901e52ab9a2e52cf7072185c5ce7872","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.1-lucianbuzzo-markasread-function-33-581ace32365d1a4ca0211a5e88d137b37d67e7a0.tgz","fileCount":16,"integrity":"sha512-UUhoHwTAYAqFYZY8w3rw9r1pCt4SCCdXUInKfAvjwtPrXQuGzfDVXM5NvCrN9ckMQ1IJ0ckuoNJ5ee5iHhVQ3g==","signatures":[{"sig":"MEQCICQWg29pztXXeMPK8V2Go2ao92WBHvvLos3AIEDZsT82AiA8t+sYVsLf+iorBO20fIpDGprvAy+4ReugYAJbUTZnAA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":131552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNqvCCRA9TVsSAnZWagAAay0QAJObQBt6+i608K5FSXEP\nJ4sUDWlhgaJEP8zHq1egr3zR5Zr5CPN3dut46RSnQIl7oeEdtn9Oq66n4M+b\nShe+KyrQ2BY1iaunUxHTnpnAxVkYKSzWChI3YJWUOsPl4JzGPgPchXEdAmdD\nDomPSDcrEfvs0AtONHdqp3BGY3lk9VyG1W9Nour1vuV0u7Q+qqHQfdumK6pW\nB3c2M1LwihD6gwuM+SJfeHcjwbwqB9+bUbf/x5kc8x32fD2o1M91SvMl3yHe\nQZ9xWNcErxRVvjZe256ZKq1fvxz9g3IXj0ACHaGEL70ALpSG9VEwY1pskVgs\nONqOQygOOsCLF2X6MKXH1+PZK+uKE3+Yw6HtawuYGjMqfgi+WCz5NV+/+ZBC\n6gphE39KRh2arR4vOaBBHeIB/jFjilqW3Da77ZU5k7tt2NEeofPJ+yclSAv1\n/5p0FOqMAmJ0h4ZvAkkVoOc+K1S1PkK/2rE9e3vNgJFZc4dcHUoZM+od4eUz\nlZbZbGld7CsIyRV+wrVWrWe32aFV/A42nPFvrMog2c7llDhWJJKSYbU0GvYZ\np/c6c0k/qFUbq3M/zDdjzuckZzoGEP/ES7zOqa1gjD/s4lQQvyeHx9CvrICY\n/mLIWtUvmwkt1pvRiVGYNo3zDg58bZrZzgDnIczQ5+ONeaaNvjuaBsbuoBR3\nlWGI\r\n=QDu4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"581ace32365d1a4ca0211a5e88d137b37d67e7a0","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.1-lucianbuzzo-markasread-function-33-581ace32365d1a4ca0211a5e88d137b37d67e7a0_1597418434087_0.6231661142997325","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.1-lucianbuzzo-markasread-function-33-2b9aa67e40e2efac8220a959a55981331c3fdbd1":{"name":"@balena/jellyfish-client-sdk","version":"2.1.1-lucianbuzzo-markasread-function-33-2b9aa67e40e2efac8220a959a55981331c3fdbd1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.1-lucianbuzzo-markasread-function-33-2b9aa67e40e2efac8220a959a55981331c3fdbd1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"621c1b2c75c7a9bcd1e33c1f24d311c3bbab3808","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.1-lucianbuzzo-markasread-function-33-2b9aa67e40e2efac8220a959a55981331c3fdbd1.tgz","fileCount":16,"integrity":"sha512-wiAWDfTNMNOXXtKNchfj0UhvFPNUR2GI0bAIpjDoiy3G/CbMHijYq60ZN3N6oUU6Gg/EbYOe2X+NabnUz7lhOg==","signatures":[{"sig":"MEUCICOmBOhWc3gL6TPy8QgJLUY9cLU72+c7tPfPhMgmLSUzAiEA5+kSyHOnOH25yFLLGh1KWt+pGSkCiIksPY0XzhLJmRE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNrG+CRA9TVsSAnZWagAA1ooP/06rYpB+c5aayND3LTEA\nPSp1D6EiG/alnEwYc9dvI5xyHoYFWcLQpfQeeJL3/l1uLMT6dduAe96JyIa3\nnaA+Eq7uNeBB4S93Prp3AOcAGXWo2Iatf/mXwrUuIJTU2vjzgKiEJKX9RkVS\neHgx8gYoTbx8xqg6MiKVbmmhYx9GYVM5Zp0YHZYxyseWzecZLtIb7BK7hmk1\nyky9N/yV+joiNOJAzg480Wskj0tQjs1+z+5joCXViWGQwYlc9WdEMKTtvq7W\nifZab4letOwtVXAVjXb6fHg7806dqdY2Z0Csn6e6/Kr8juBprdawDCRbpvVR\nzVsy7tUE5iK/AsxpitSSdtxjS6cSw1zx0lR2IEKjiyUIwzasz7lzidRpwG1f\n4I1FG7cLHpklMsVfyGW6fwj3gg36uTch3QjQER8m6RS+ZCqF9dg3pP5aH9Ux\nwrTU5bFGPrKkoXF6UxdVlCLsHtQG9gYGNmAk768DTw6hNhO/5jk7bgK1gIQV\noPSqZohKevaXzmL8ojFtF60XsE4LKFR6ivfYSyfPJfL4rMEKtOjSf5BIKERa\ng8VJuCay0GK3STzPCJdVSiqjAT15gZOX4Iy6mn3IcOj7mRItRmZmstPZ0WPb\nVPKj+IWCTp/B56K2vqPaIQfutEaPu0fqYLAZlC4qGUWWpL4wybeG72bX76W5\nJYfk\r\n=LKfC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"2b9aa67e40e2efac8220a959a55981331c3fdbd1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.1-lucianbuzzo-markasread-function-33-2b9aa67e40e2efac8220a959a55981331c3fdbd1_1597419966346_0.27126026589069796","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.1":{"name":"@balena/jellyfish-client-sdk","version":"2.1.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"3b7c2c45459de53e586d285473e66676f1e0d722","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.1.tgz","fileCount":16,"integrity":"sha512-QmSOCs8eWt3FlDHKCkBIgadwx4ochswR0OMeEq0u5JBtgDwpsqOPSOiT3sxeJMxoJDCmuUHTMpYQJISDQ/eBuQ==","signatures":[{"sig":"MEUCIC4+8/pVHnbUNo5zOxGnzANjUempUSyF3FX6WQqs69HqAiEAgRqMoms5TbCgWQfoZjoCSffmFUhMSivXfIw8GEnFauc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNrZICRA9TVsSAnZWagAA8DIP/RKpW79MXVazHzy/kSDr\n+7tQobVKF5MoWvEi7+LdFyC7PXCcSsR+8jlUC1M/rpRgO6z7SYjYL0/WTzoE\nzq5YUlhqyfvKnoxlyDI4nmL2NLaCWUr9DISRj9cZvYeFQgY/1C8jletuuDZh\nHdofjRqBYi019wxsO6uM3h0pAv2S+TRUCqeDN/HSJzYm+EVN5Uoq1uMwq9sl\nXuYt56epJxmthY0sIfwBB3cy2DAfbBIBcj10ub36I8UpGUou0Q2n/9SCX3ry\nvkafsut1PV2L9SBNhkM/Yz4fF+d2pkfqqOeEOmKEpc0uLmWgQmOpQTpERb7/\nTR43f5pnkBh+3yMBZpLgduChl9PAqvYiocGeFm7v059gxVSUNp54afrI8jat\nVey0e1eLBIgDhy9pRVIdUZDsoFxZuAp+3syd0EyTV/4qW7nhk/45jdiQvfsP\nDwOVoTzYwmRg7zZa4w0chWL0X7fX22Ik1wACR2N+uEVJK/7TmDQzpff4r3t5\nh6O3+LNh5INnm/Lb0Vn+aGVT2NNUMjDblUHDzfI83undjjSqfx2DoiUgFJHP\nJJCr1crn3+pIb2+pfgqqh1sekWa262e5ehXDeJrPG8nKjcvVhTfzOdc7ahLr\nXS41OXP4wQeIlAcZVCz4NfoLN8yT7CjfgRlvK/jho0s6cQL1w115b9TLCzn3\nD1H9\r\n=bDVt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"1e7ab823698f7a6ffa72b3aa146638e27c63d94d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.1_1597421127670_0.4843413606657434","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.2-add-renovate-config-cc55cc7b77c76b043bd8be8504777790cdc36127":{"name":"@balena/jellyfish-client-sdk","version":"2.1.2-add-renovate-config-cc55cc7b77c76b043bd8be8504777790cdc36127","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.2-add-renovate-config-cc55cc7b77c76b043bd8be8504777790cdc36127","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"a93c371c5b684a12177d6279063864b089e2f0f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.2-add-renovate-config-cc55cc7b77c76b043bd8be8504777790cdc36127.tgz","fileCount":17,"integrity":"sha512-f9XifdcJAnjw9i9I6T82jdHf4YsyH2sBAvry8VfHopvUqHjnwVH3GBAfNNJ8HeK98scqta+YAAuaJ7ZBBW4EMA==","signatures":[{"sig":"MEYCIQDDIPhOwvZHmNxITNmgB6xXxMbm15BT4C8GXnZfq1cPSwIhAM3/pfgXdrbu8I9lONK5dU8NfYjkTEGVQfhL4DwP8PeQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOSpVCRA9TVsSAnZWagAATG0P/27iRYQzo2W1IWWv0Hqj\nQWHyHuhHX+OockwJVg8mswAErQ8I6RD2p2/65GTGKrPjj2xAffVc90MSMa9P\nFRt39G4hswhC/dwjPa8/OI9Oa2X/cGsjSOHL1GyMbjU3P4me/30zPbmWxSwm\nVUOM8gmvQl24xo4RsTySr2ohCngrsnXGgFnpPE7bYvN6CPywku93SdeqgOWi\nw61Xoh3tqErmVzlSGLOSo7eHtZipXPJCovc3doa7Wu13r2PXH4BNz36H61KU\nJ2uz1Po7gKvS5C3OwmU3RMLyih9xQkVILYk56s/pcaDjCiScy98qaGy1ojVX\nb1E+zuYRj4kFZ7KZz9E7Yp4eVAonfJqpz7daKUUdvAvxodVevjIgPX6vsITJ\nEZD6qM52c/k9qpB50Q74BbokDf542XF6yNjnaBcCYTOAURlhdtIC52D/W1wc\nGpvJQIJgrLeaE5EmDenk2nP3yhILGD+PSAckVqJGUoMzgc/7mrIRM+S9gMab\n28KiR7MoSkR2Gh48ZaJ0Ud4pNYou+5LfuaMh7bBEVKWJCcr4Qt3gtzVOZz2b\nF9tWzWETXeWLvKC3yNl5gwI64PUTe42Bw6MTzv5LqTJEqVLnboaFfPxMGhyW\nrNKB5RbotkRcI7rYWgy+cW3e9TYusdjxhE7XGK7FS1H7fnjp79o58UZuEOnh\n0wUJ\r\n=Sdji\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"cc55cc7b77c76b043bd8be8504777790cdc36127","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.2-add-renovate-config-cc55cc7b77c76b043bd8be8504777790cdc36127_1597581909267_0.6230400783336023","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.2":{"name":"@balena/jellyfish-client-sdk","version":"2.1.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"d3729e8c5b3d62c09f8439d1d5cbeeb346ca8183","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.2.tgz","fileCount":17,"integrity":"sha512-32+sFH6rnO7lShzxf49+Ezpae6EWKev7obJAe7eynU0L8maC6YpNZOkm7wg8E2+qvUM8vZFMGbv6Dadp7vg1Yg==","signatures":[{"sig":"MEUCIE3V+Xh76cLWrboYAia6myECjbsq5T6sjEfLrtzaB2evAiEA6b8rVRR7ywgSWpM4KGfW8wfkzEVm0PPh7lm5RRYAmGQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOdgsCRA9TVsSAnZWagAARVIP/0kqV1Wh1AuwaeXVC4xB\nJq3AzLPSFgc14rWdGd5rZU3iznrhkQnVyLLlBePgJjuxMoAYH4lDDXPOGADs\nlHDoOjaDAjrYkfRdV0yCJreE/KKmZdBCVeMPplu1LXjp8Wfn/l3Pc7pInbFp\neXCFczEWcZzQinBhndaDwFmtjnBYHJFNNtDozKybNnv7hvAqRy0rsZG4i8eM\n53dyIqs5Nns+UNq4zRF4nfaMyw93ymCXcubo/NCA6bqQ7CqinAKl1Lwyq/bS\n/8up/C2s4oIS9kFFZBw97NHvSKeGXyETnA9OammnwdGiRezPAIFIPnsI93aE\nXInc031OVvjThHPPr4awC4xATWLHRRoHH+6H1mURaD3rIUK7NmRJEWNnxoNt\ngiJZv7KNdYqhjxe4XY+K1YW0ZtMf2HX9WkcnPETYlKRPBd3JUhK08KPSTd9w\n3Iut7ONUeW5zf/pyxr4A1wGA70qOzzOF8vSjG96Gj5mjfnUBg8F7NdmN6LjU\nS1NWFTlQrr3GTqtyXSNFKs79EuClaEO2/6s/iUme71qF3Um9SkS7QbOO1lD5\nu5fQcG7a4xywCz0nz8qBCFYIXRUkVGuSVopQuNoCcPEegc7wmtPpi3LuE5wH\nEZ+jKlFobLWVc17YZgh2ZxxcnTHm7FOjoiEURL+Wmv47SQQJ3i747I7FVjh1\nxOXz\r\n=5tvZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"4ff59b3e12c837022e87411539dc1596815359a1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.2_1597626411834_0.03594388101521906","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.3-remove-dev-major-5affea240a212e8750a771038709a52082b90063":{"name":"@balena/jellyfish-client-sdk","version":"2.1.3-remove-dev-major-5affea240a212e8750a771038709a52082b90063","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.3-remove-dev-major-5affea240a212e8750a771038709a52082b90063","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"06b91da7df1957e77adc4531a0af8101a8103a7e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.3-remove-dev-major-5affea240a212e8750a771038709a52082b90063.tgz","fileCount":17,"integrity":"sha512-xwfYig6TbR0/yu20zyJz+sGdDUlkfGg5j1BWOUplpGN/CcZ+XmLRXvycmodK9MbzDUBpl4WhTCHkvYKOM+ZlEA==","signatures":[{"sig":"MEQCICEVCxMdrR0anJ0g72pRxXlaIc8OUh2w7Dva7O5EHf0pAiBflQWRE2XOrLUJdgrlAUfJCAzKQ8jWCK6GVQbNy0yzZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOzKJCRA9TVsSAnZWagAAG9kQAKFnwSO6hxIRyX3tCi4W\nJ3WJq4qaqwYde/Mw3zoHZbquDCUHyhJkzoNkIW7ULVzIhThOXrw0AeRLBPsl\nuHx+yfZp00HJ22gX54joE6v/YIhVtGveLHQlxq6/17AP7X5pXFIaHb8yZEAW\n1S61lWvuEJ/4SqGNLUFOuByfdR6IEWyjXeE8KEMiSNZ53C+n8msBhmwRG8qX\nzo4V5PXMzQerfOVY/rSpoxBKutT6zZ82Ml3HkxigngI35LYtGo7DYuIhmb4B\nF/Kkh4G/pToisq1mBgIK6paLrxpiac2DV1DadnxvOIg8Sa4j8IikxSuwP0mW\nwW0rJH8C2wgJPMLwSu+EFmTeV/uA910nDHhbnt+e2c14jr4yO6BLT8sZ8t1B\nMa0hBHcrjiXqqRgWscGX+tW+HyPAo3o182BCSAY4CXdcz/b+w/zS723qKp5m\nuidueIqD7GO1HUeVdf4CjHOK9JtYPvlgTb1mB4PKvlu3p410ss9NxEWW5b1y\na7GUissQ4s0ylALSv1HHAOjPhJX4NRsgQR2sVLKF813M/YYV4Bl2pc/PuIIR\nwxqgnAfeJ68ZfzfEkomtMC6lMAJj0IccTNGFogeKLMhCscGV9yQsHNr2rVnx\nKTNhZyOp05xwJHgvHRAtmgle+DW6UMocAydHDKGjt0jjNi+E9FVaDpNXmA10\n3gQK\r\n=f0nA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"5affea240a212e8750a771038709a52082b90063","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.3-remove-dev-major-5affea240a212e8750a771038709a52082b90063_1597715080878_0.6360013714460389","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.3":{"name":"@balena/jellyfish-client-sdk","version":"2.1.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"78dd9468b6f2f793529a5b9d3575e56f886bbce0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.3.tgz","fileCount":17,"integrity":"sha512-VBoVAd9cOsCdk0lK/fuKpuLfgwH0/If2diDOFfJfweubSJY8F1MI1upBI0MVVZJ2qPrGTgsAEp2+eBIArC8eEw==","signatures":[{"sig":"MEYCIQCN/6Rqjzg6DkAiDDxd4kK8UeF9rhkSHmvWz9M22FAjYAIhAK+1aPQmE/a17tfSbUxuJOe9ouBpeZl9JNHUQzl2GsLR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOzPHCRA9TVsSAnZWagAAewkP/3Yxewg5lAcT/gjKHN93\nK5H4MvGtCS4bwzS+jym3c4kC357lc7hjEznV4o/vA64uCDFNGgptRWJD0FRC\nxeTxHai/yUjkiFVW3vi9FyEkrkKg0FwuUAcNgA/Vf0ImXUlM6UE2InlfMZnV\nD6Waxzh+pUUjmvIWbgwxBaVFI4IwEzVRWcplxZkmID0kKdF2mfihG/GGQAH6\nFLS/E+A/xyEW6sZuetT+Lt09bOpvAhAYbau/FxrJmR9LxmUu1QfN/CtDKkO+\n/EiPtLVLR08txlpyp3Jnl3gIuUzAHMQx7c/9TuU6At+1Es5clWNX8y/YzTqV\nlC0tjJROv61MJDIi1caiOscjR+sjBP9Or0BFHIIpAwgbzZdvvkxxrni9IIno\nvYzWkFHMAAoLt8eun/0bK8hG4BsaCOW7XwCgcLNqMwu58srwJqZ8zUZHKIG3\nkWZSFMvI57z14UlqLlfff4lIwzKDHlHuCrF9CqLY+FggCaj0hCXpssIDgiZJ\noDAMr+O76O1ubYrlDAf8Hm/elACzjYUU8j+e5A74SrAJsPDIkhAcYGH0tigw\nF5b1SsgqEh0EnCAGdIH6z4rZ/AakOa3+q6JX8hoUJrZSw7fbC8KbLhckSna0\nKiRGf/pfbBVck785ap73V9DUXEy1Qbv2b0jQGFitdssW9H+keKnt2iXogP5m\nJhzw\r\n=5IQN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"42ec0a36a86095cc08e93666a921ac378ba0d144","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.3_1597715399278_0.18891031998893038","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.4-remove-debug-call-3e93e73e46de944ca8b0019bb77f7741ff001008":{"name":"@balena/jellyfish-client-sdk","version":"2.1.4-remove-debug-call-3e93e73e46de944ca8b0019bb77f7741ff001008","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.4-remove-debug-call-3e93e73e46de944ca8b0019bb77f7741ff001008","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"e1a33c89f84202ad138ebb16a602a18e19864513","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.4-remove-debug-call-3e93e73e46de944ca8b0019bb77f7741ff001008.tgz","fileCount":17,"integrity":"sha512-E5COheedjRbR1PznyOn6dNqJ8SxD2dwQ3AUTFk0W4yRgXAIofeoOGH3jga3fxufGTXoeQmIKXS+D1VREH1J67w==","signatures":[{"sig":"MEUCIEO3Vj3mTLE/Ro/KMiruViu9rKfXBLh7vPpIL4jAeTMVAiEAzowDKQmgHkT7YYwSsWf6e9axwP+zOPkTDp0XoVqZKL8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPcztCRA9TVsSAnZWagAAuZMP/00aWJ94mvx4Wy6C3R/6\nXkpuXrWXri9T0L97X3/ihjlZ8Xwh5iRFtmxYaxhjlW193g+esmSzO739G9/k\nj50zSZX6LoSeG4AdZoo6gO/9kKRumxX0aMdPr2aniyjN9HyOZsSsmZGYChGF\n8W888YxiW11lFRRnIVK4i/yoWHpxt/VpeY6xyf68z/7YyanhmaToa1vX1lJt\nGcymS6a5T5B5uQcWY2nAG0vrqjPxApxiilrm6otvIIk4ITSCyqtBBrWopcKm\no5afu3GlP3yXyFFduin4tEJa36EihFBcgVEGlZoO2WSPlWyD7HT4WCGK8Hqv\nt0QDpVYAbnQAOpqbxEYWxy9X/0WCFjJ43gNi5vtOHzaKg7+M2AwZSQoU+6E1\nqxoxQ56CQHxsHFIkrCteNhXsQ9ea+BTI3fQYSPTw5rlVzGg7grtO1AIbbjvt\nAaar8wXWARNBWkn7AutN8lf/0VgIPPopHqnRRhm8xwGQ50aCxqwB0Llp3yYV\naLoFFCBjB1CqHk7ip38BtNuyHEvJW2Q46SLldKuds7byxcDi/QAXWQ7Qjplo\nl/tyybSwUFP6EfBo/6NLkKGCQ3898cqP/iytNoEvhaTEMTuJfEOA+aTyMXZl\nm9AloFFyYaTobcbpCcmdmjiC8Jfva2PdyDxDDXR8bHpzExljPn1pRdw2i1kH\npARn\r\n=E79i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"3e93e73e46de944ca8b0019bb77f7741ff001008","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.4-remove-debug-call-3e93e73e46de944ca8b0019bb77f7741ff001008_1597885677341_0.42717439346316377","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.4":{"name":"@balena/jellyfish-client-sdk","version":"2.1.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"8a58ada03c589f1ad495a65ef408737ecaf1833d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.4.tgz","fileCount":17,"integrity":"sha512-8swOhmdO6VpQBHw9Ivgo2qqXAhAm8pG+dCdlZJ62PeGGd8ui/lTR+a8RMssAOrC1ULASApGUFpQGaO1KH/T81w==","signatures":[{"sig":"MEUCIQDr09258spbvzxGyvaCvJaTIshOclEGHDE+UKlplp7iGgIgDl5nOFCQAtRTbsDvMNDWFxZE39rcC1Rd+gMOETJkNRc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPfD3CRA9TVsSAnZWagAA0AsP/0+0Q5cdWPbsMd/Gpglp\nMv+zopatjx/SaM0TrNRvr6YTem3bx/baEXJ8o+NQAwo000C29KnhWTn3AAhz\nPd920mn087eMTL+GeF2DN/QR+9hr3b+P0dc86zNOrpbYdiM2rtllBhno3FNS\n6efHgBB98nJUjT5ktv7Nxdf/MUcYVROCX7pLFUk0mBvHsXvhNHcoZSCclDr7\nEY+T2VW6NawdR9XJAGKsgRf5cWIRFTM1Ykb2fpZwFUbdbaz2kG2cz+Fa15r2\nS6u3fUc23dnMvLOJ5FnZwArWVdbtXhCUne/B4lW8qiMX3SReLruOhQM/s4ry\n3jSPQHV6Ra8eCoih+MxlYVJh3Zkp0xkwHDce7iL0WLMNY677xFkX/oZro2/7\nB/+o06DnEcLdkJ0c15afAtpQcQcMuskLOWjD4ny4YNrp2OrO89btRKTIgu+K\nGolDpHSHI11yTwFE9XBnHsn9YPKGJzNtvPdo83RZzcS6tK0IPmBYZh5Pkufh\nf6T8G2hiCkYU+nPgRhte9iBOicwP22pb3OsirCN2FfOm+iu+hkn5Wa82D8KO\nDtdQearKARFVqSnHul5XGRxTWGxIdpKqWa76TEn2VzzO3dXiPBRMA+r1EHBb\nmXHaDikGuYyVgIbWcLYu+ojF3lAbyF3lr+v5yM7D7u8eM8NlLwS4rW8aNRH/\nx18W\r\n=dXJr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"fdb4dcaf371838fec57c2b39990149cbfa6ca8ff","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.4_1597894902608_0.7087849462150857","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-eslint-7-x-decf8bfab409ece7b283e643a425749f08e4ebc4":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-eslint-7-x-decf8bfab409ece7b283e643a425749f08e4ebc4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-eslint-7-x-decf8bfab409ece7b283e643a425749f08e4ebc4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"c3567d9bc66b739f21491970d8667af99d2e491c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-eslint-7-x-decf8bfab409ece7b283e643a425749f08e4ebc4.tgz","fileCount":17,"integrity":"sha512-SH0TaITsX59WI4AkxawjsBoUlwR/o5PI839LN8qiqFvYgXNZwy17jFvsW/KSO6iqhxmn0AQunpLIMBrAguNC2w==","signatures":[{"sig":"MEUCID/xcY96lVPQwcLfbyjEyI5dhO4cJblY257wcHGEJmoSAiEA2ZEr8lcpn0cKQytJ+EtrFa201oJAtV/5HzHybhzYpO8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTgSxCRA9TVsSAnZWagAAHzIP/iF92e7eYwrIcJkMTfvO\nPqmUYo4p3sEL8SfAvfPKWrdCZne2RP9J0GtcId5IdiK1yyrpVEr2KGOjHI0X\nrvxO1UEAg7igBaGmImn2obTdHi4QPH1XuBPdEPumGflivcDElZNqTRnOQkvj\ncrhrJHElny2oYoBjtnucFuaf4KWMk6e9qY+rEh3kyLXw0vHu/rGJpbnycRwx\n6U9GP9lktEjbWocyzSap6rxG62Vw0dKQ8mKxe+l9fMdBDi0GGaNYvmowS0K7\nVPV/QtQ4wLQowf8zG11hAUx+e4PnL/UmioNfKiU/T96nKTk1J+Dlz4xJTZ45\nW1ujlnQWDdi0DG70XC4Ia/qVujV/z4fZKEziKUOnt2jsU5BWpYo4WCBKdU+E\nCeiVbWzoEPJxRNShyWUwz2BOm3bnMCM16sg6B9hzdlapi6OJ3uHfibfXRVCJ\n+giA1JdpdsFA/eJqIHVkoFAPQl2f4wIGN74iF8pKGCixfwBOFZYa7xA0opn6\nOjE1e9pqSMxHi8Zl3MJeNi+W/Aotu2WJ0EC8UJNaEnQAstYzwsRxjL1ZvkZ2\nBM/Um0A2+WcDvGWV05d8r7JJCGhbGaMaFZF2LBlVs0WU6KifNA12+6YjJ4Vk\nUs/8dqXAzvmLQVYoQkHwOQ3eCpxyTmOJEKPkeyscEefSAsIk7XEF6+S4p7+U\nZ1JM\r\n=wiqa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"decf8bfab409ece7b283e643a425749f08e4ebc4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^7.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-eslint-7-x-decf8bfab409ece7b283e643a425749f08e4ebc4_1598948528646_0.08860390846543109","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-eslint-plugin-lodash-7-x-069266b286404040597fb30d8634f4f7e3dd0533":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-eslint-plugin-lodash-7-x-069266b286404040597fb30d8634f4f7e3dd0533","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-eslint-plugin-lodash-7-x-069266b286404040597fb30d8634f4f7e3dd0533","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"07ef43f649c2508bda42f4d28a7dae888ae66714","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-eslint-plugin-lodash-7-x-069266b286404040597fb30d8634f4f7e3dd0533.tgz","fileCount":17,"integrity":"sha512-rcOnrB7HqXaap7tNxqFRiHsAU6IRFJgyVCB8foQybfzGoRChNoFCQeqoI9IKGRgbXZRfLcuE1kjtUybn0NfMDQ==","signatures":[{"sig":"MEUCIQDkhrsMnyLSlMLrA6APBvYa97VwtjDz8BKLasMi+9mgoAIgEOZN5mwEUlew5LAGsdPabhj/X3ZlCA7Q+aPXhfzbD+U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTgTvCRA9TVsSAnZWagAAz2IP/0RPLcCly/EexC16wkUf\n+ICNKnmkr6h2YornfAueMIWmyexiLmAitmARPx8qJyS5376W0sdic1NtQA9N\n0mt8U5HYK+jcucXhMxzJAaZmsl4Jt91Ev1iHxgjRxIx67aCnhrkQWkMqNug6\nSsuH9kS9yFmdG9YcZAJKFbfNt883DYj696z1gvJCTYLW33TqmFZ8hHW90hS8\n/EJPQQsBauM5whwVR4FqGcdxdLZymROgs/bJvaIgvY4fnlAn15dVMoqWlQkA\nqVBJLNXxJub9efWRBvzkbzolSedNDsm7YmD0KmTgqH9JZ0Y+Jza1kFhUE+If\ndzVrgQaGbBi3V7au5VRerLYlgfq7tSyaOT2dQizB5p9BJk0AGCbb1lF3ENx2\nxkOpfE5sWMZ5WLV22k3YPhQR/X6KnqFjWJD72S6Jni+aTcmuGWrmnrVgnAt8\nLh/I1JYIZb6lNxLhsGKhcn+6u27XnaCNxCu2/SscYGEZ5vvjlDcyAqe3GAjQ\n9jhzYdTYIDbIicGq91360uLqVvz4XXnTMDX5R6Iz1Zwmbd/Rzy4Y7ocghyag\nwf7rqnaHXJZq+8xaMb8yHc711NK01DrSvTHyXKWeyks9TQO4NUxq5ZumCPOx\nv2ak3Cu0wYZqcMFiKG71MZXoWIQv6BqMCdI9w9Pj38zTMdByp9euueDeQEKJ\n3r4n\r\n=BbFw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"069266b286404040597fb30d8634f4f7e3dd0533","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-eslint-plugin-lodash-7-x-069266b286404040597fb30d8634f4f7e3dd0533_1598948590843_0.1478760103228769","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-eslint-7-x-abdfff83a1332d8802c7345565e390fc8463264f":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-eslint-7-x-abdfff83a1332d8802c7345565e390fc8463264f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-eslint-7-x-abdfff83a1332d8802c7345565e390fc8463264f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"66876cbb983620da3abd2c934ff62b072ffa8456","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-eslint-7-x-abdfff83a1332d8802c7345565e390fc8463264f.tgz","fileCount":17,"integrity":"sha512-uXb+fbZ76E19BlL/3Akch9/Kx8iImlI6Pa6Jlx7eLgpetVHdRvrtGkP7PXFGnmVSPLgtL8VfB4hV7Zvn8GUtQw==","signatures":[{"sig":"MEUCIQCnNrRgFZwlmcIz1vhU8YGAoP3VkcOZA4vKY/5wWE/QWwIgbJ0uyS1oIp2hQfqDyUbnztn2cIQeis/NVQ+0Zh2vjBs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTrSSCRA9TVsSAnZWagAAvYQP/i5YPzZMJD5mdqeaOOL9\n5yFoLozCLOLj32VZBTyCzXJbc9n0i+jukp40gaj+hUB4NBrgY6EbREsSdr0S\nSoRzsCXSU5nHBwBTDEd0/ea21fR/rn3cg7gbbHIJRrY5Kpir6Xg9nxP1d2wu\nAdiA1lOJTBkCCQnCQ/aK3faiTOWMiSzWmECxRJCilIktaxqGp1naGhCAtE9s\njJA0no7yn3h2MG3rFmkonj052YedVqjeOJoiPqloMtNb0jzV+2jl9WA3vPef\nSoGb1HVJZCbaI2d+mgHUTDWdWlviGqngnnhcRj7MRrklrdm3mfCEQcXZsnPK\n1uzxhwB2s/hSph2J8OSOR41Ea8cT3D1aT3ZRDt7WGtt7vgobV3MnrFrljjL0\n30ewDTN6hUKCOUooHdGhWD1FwiPcGBuDs1txsnqblhk8jB27Yv+9HtSqgAXb\nkQkf/BRlvZfI+IK3LOzEd+EzcFlPiXT5XKs14jEgJSxVRdH3lGQVlAXdj2mT\nd3UGYGCjA+Qgzl2jGlpNhIkrK81xbuyzIBoXFEj7BzPo7fjUolG6tWhY2qLJ\niQDTIQ8bJyBkJfGj4qOPZJamVyxKBVfq4lOBYHMWu/iVNvf4TfdpMJAeq70A\nSUDMaWsGvIzzQpVQkqRzhTPqXeks/NGWNeUzjtrgZGIvUxvpLr3gFSn3oDBz\nLj8h\r\n=oANl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"abdfff83a1332d8802c7345565e390fc8463264f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-eslint-7-x-abdfff83a1332d8802c7345565e390fc8463264f_1598993551652_0.47653330896594004","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-eslint-plugin-jsdoc-30-x-4b873dd7849cc976e74f6072d3d26f0952a3985e":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-eslint-plugin-jsdoc-30-x-4b873dd7849cc976e74f6072d3d26f0952a3985e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-eslint-plugin-jsdoc-30-x-4b873dd7849cc976e74f6072d3d26f0952a3985e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"c6554195fdfaed0607afd679c46487e7c69d793a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-eslint-plugin-jsdoc-30-x-4b873dd7849cc976e74f6072d3d26f0952a3985e.tgz","fileCount":17,"integrity":"sha512-uyQvnmPkYSBVWPs1zsaD8afMZeXnD0AgYV49KiF9z5LnBMZ91XfHV0ePg8akgTm4upH95oBjM54wcTarfOeF0A==","signatures":[{"sig":"MEUCIQDrPQE35TOlDjlVeh3tFSLdKCQcxAy649SXsfXKwFfwwwIgauQlLBgJ8BTikisg/PzogqbNGVcc19WNDk6oS/536Kg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTx9iCRA9TVsSAnZWagAAOwQP/R49BJSGN/Xojsfpd6mL\nPpmEW94+PjkGxH2rXYRI70ebLU4ssgqvPmnr6TXO+FLk5MRkOTTnj8s/nJ2D\nzYCpdCwizc/6d1pqoCFVmDqRYYXNNDTosXbf/ao6ARh+/8NPIo13NJ9R9Rzb\niL88L6H31M0b/O8QapTmPVjGLfVyruvyWoWeBPDJ6o5tHNAZ3Vbw5/3SGXuo\nS78hF1Z69kgxHaOGp+xi0F1rBPAnwavguo6aDx3pqZwfqnb7jaWyCCo3EEZa\nfgcBeg0d6HBcnA2Ha+7M0H/GAZV6PtDX/JWRlOVwsdmQc2fIvRw2RtfdkxGE\nszyppjHkOYo/PP7ijE54gI3U+OLysWqXjF4Mf1V1vDWopvM04j6++Lf05tFj\nRyqb7jQxdqA2qXArdCT6ajijmVcEzCPXPApWkJW2ppDGJOREElJQIJAyT4dI\nKmrbBFpPj50Ew9yjrnY0P1qXR/zEJrK4Nc32ynyhGSdo6fDWjZFzXRirLyBO\nGr2udoD4zP1djmNPjQJmTOIXXsiYkN+Oi8X4YFbiQpzGyzxQtwwC6Gyoaks5\n5DAoPw29CzgnCjqdOiP+koAGegfMl7XJ4IAEKDtzMmG+pPNBzgulaYJrslN3\nKMHBJObUYmpXB2VlG/HqHuOeZ95QE4VXcL2DynbLNCrBPQ93dN6TizYb1xdQ\nYsCL\r\n=phP8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"4b873dd7849cc976e74f6072d3d26f0952a3985e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^6.0.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-eslint-plugin-jsdoc-30-x-4b873dd7849cc976e74f6072d3d26f0952a3985e_1599020897425_0.6694467321767901","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"7e75e4c70654745342e42960d27fbf130322c8e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5.tgz","fileCount":17,"integrity":"sha512-JJzXkS+zUy8uiDsTT3amLLc6OIfPm1nmJswnA2iP3nuFHtSV6c9Hbk7vEE80RBcysTbB5IPJYvRtIC62iVEidg==","signatures":[{"sig":"MEQCIHutzI+GRyGULcH7FAOhculHnjZrgeJlum5UUMI6tLCFAiANOOwzfYn30kCPBUiBHC7gmIa8sBLeQhdGz0wONLjPyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT1x3CRA9TVsSAnZWagAAhXEP/1q8EaZc4M2l7deI8pra\n9io3Y0cQ1uFxdMRBAx7XH7nUySdNubkJiIVvBKjBnYvl4pcjnZyAbuhhPR+/\n2UeqyrBYdTuUOH5NwFWTOL6d6sMIWgwXy5PLOxxmjHxRWPlhUCIs2AXXOzBK\nV4t8qlLF4aPsikAfbtLn3aazMulquIdOUseXD2pDx2zkV6Ae/LLwDHFEPKhV\ntmGK6Q+23zdehEGbctd2KWs4Fxx506VLR5jySvHPpWTepxAUL44HAvfTz8NT\nIsEI6WLiXaN1DNMwimusYCOJ2ECWHqabethSPZDB4dfoujR2kUl76uqfqb+C\nhmRBfngchceM58+fjZwqzn/OMHLh8yWzQgf604csj64WZC1JpzMvyDvqpqWA\n4PdU2WTI8lbg2ruu9nSssrS3XrtJWXHRyzZU6bkaU6+RyrJxntuEUFdggrFm\nf8WKYe+8T4sGps2Jash3QiV5EJ6I8vSNzk8LUWebSixEDsjc0QTrCVyW5K1i\n8xqskOiF2eZF1Zen1BuOV2Bbe0AxQNgSlHMN5rnxo6rdAya+cn+pdCPgyz0g\nKf0QVfPXLWmW9OOEBo1Ynl00yKVtV5W5lv8IjZY7QDpzWOAamGTNPoI4AZyv\nq7N0FuMhvPlhorCx01vfHE4PK7bGJTQTIDRepeI5UZDnIIVgugYCfqYLNn47\nltj/\r\n=MCE0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"a5082e5f1ee387a282ff71df69009e942076ebf3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5_1599036535260_0.9791044251453584","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-eslint-7-x-b52e51b8286e31a8a10058b27c96066d5c480f96":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-eslint-7-x-b52e51b8286e31a8a10058b27c96066d5c480f96","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-eslint-7-x-b52e51b8286e31a8a10058b27c96066d5c480f96","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"640fffcccda2bedcf8e858a796294a517a6e9605","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-eslint-7-x-b52e51b8286e31a8a10058b27c96066d5c480f96.tgz","fileCount":17,"integrity":"sha512-Tgsc8K+EDr/fqFVIEfdI2dNycnDeNT25H9uupvD+SGYXplwiVOJSVcNhntALszGEmkDwjiyGAFxTv2+Rp1MbTA==","signatures":[{"sig":"MEUCIQCXbXYQMh+f6J3oFqT+xkechJiEUgywHGJ4QUK1zvBhUwIgH480GQOC1jLsYP+8no9s+0RJ918FuqvDMYhaxoTAFJo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT11lCRA9TVsSAnZWagAA5YwP/38hiijjmUlGJ2W8DXC3\nQbX+p9fWmMxG6FIfVxu+4l1jT0G3MszCMiriqt2hSYYR5ImEEzRpYiZvgxKU\nuVIaOy2qhuHnbUTgX5KWPbIcQbTlHweIcAteUhfvEYm6rKll/wLD7SaEvDBT\neUN5g6jePJ1MjBTXhVKDSQi7e8GUc8xZpRs4v6nDzwD7MjJQvVWUrXYawOf9\nFvAG//ZKFRh6yUHcqspwf42I9XcJDn0j+jjPKiJj2iKmMZfZIb4Xhdkn0hbQ\ngRhVQuaTVpS/4GwssZE0+fTc3k+z1mFfdDKvmLDKGqvecWyLnr+oqcfB4A0x\nNZbkMIzQ8b6xt6LMzNtafDTBHsIFmHtJl6VO9ZmVGGqd7iQl5LTs3PSnkfW7\nDfnuqbbMFFR2mkcyKKo/D/QTKacdofrASRk4apk5ieWvs3OBGujXGMMhvh5g\nnrTY/FyrvrGfcfU/jc39yZg0WBaMdaDoEbsPZ3e+QIWn3LchXNRRdYwBHL3o\nq9nDC5KBbfjDUMmG8ptD13Lqky3HYOVzlmymqE6WLPSgMKIKqSJd7W4+Y5Vy\njfYAoigMHXPjN0/PLarSk9FcrD6CQsywAYlN7csykkMJO3+EANLZW1kkVbfV\ntn4sto3vWzAhCWFxNNqPrGwO1WXl5l/2O+2ED87zeNIrMMmmxohPY3mPZMZH\n6Lvh\r\n=ZKbO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b52e51b8286e31a8a10058b27c96066d5c480f96","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-eslint-7-x-b52e51b8286e31a8a10058b27c96066d5c480f96_1599036772682_0.7464990644902336","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-non-major-b733d073854207a8797cebbe634c1d95b9960d10":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-non-major-b733d073854207a8797cebbe634c1d95b9960d10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-non-major-b733d073854207a8797cebbe634c1d95b9960d10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"4063121aae682f7be362ec8abed35479435273dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-non-major-b733d073854207a8797cebbe634c1d95b9960d10.tgz","fileCount":17,"integrity":"sha512-/Quqcds8PO+ruwwqd94rqXqgvN8xhw256NCZCd7MKNyfEFE+TQx+hlUY8ZLv6bHPO9f9DUOTAkz+KeXLCkmdmw==","signatures":[{"sig":"MEQCIFhUKoEbzHjZ8lFh1Lc+8Ne9JsfttuOV9AiMGP/+aUCYAiAbBERxfBe9ZUZh0nIoAZsvA48AmYyUaD3Fetc4LZFNIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT11rCRA9TVsSAnZWagAACIIQAITa+qqHw7N/Gz6lkfCe\nQucYfZMccvxQV1x+wlHRgGt189QleNJIshJxP0I4ABNs7+OFyIXjpbkREdFB\ni5Had997/Rmb61m3SzBfhrNEap4sfoADvmT4TxfM9hnu8zhovkhJdhakNAZ8\n81t/h9Zt5i5DRaLHoIqECRtEytN5UYE1DCXJVD3PFzTw22ynof6uN3+MJonX\nr4mzUWbQt5sn95jDElMW8QL+KdxxjtUfn6eZdgrjH2EL3VYkONGQMLCZYqjQ\nAC2LtbVLWiQ+vPXeniaPBW9YJWDii+orWqUcGHahplEM7xINGMr0jBmJuWna\n+IQ7RHztNsCIr0AiiMkcutjRIhCS0Gbg2n+dTrTKGtZ3iYXkJovEKZBvMWYq\noVyNx4rDIa11ihuIgsWRIDi7nr+e2k3NjwzoepS8nw0yZ0L+8VcuLNf+UHCt\nsXpyoCLzCf84otDxhogxDUhT2JSMuWmOTNK5T2zBNPRltPEh9T5bGKTqgowD\nz7Rof+Kin4w28ttZJ938mrJ3rx6W3OJRiz7izBErJ+3lq2GUXb0DnDEK/yaZ\nquIvRz2aIhv3kmWZsknzNIyRtRSYChrrdEag6QY2i1AmI5BerzylLN+jlM/U\n72CmlWisfxaSG2hh/o5KdgrzvhU2zgiebXBp8+aF1/7dMLVd8mk16/+ov2fs\n27Ox\r\n=x9zu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b733d073854207a8797cebbe634c1d95b9960d10","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.3","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^12.0.3","sinon":"^9.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-non-major-b733d073854207a8797cebbe634c1d95b9960d10_1599036779083_0.40692805664686604","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-eslint-plugin-jsdoc-30-x-ac5d31f33be306a154ab59836aa246ad782d8277":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-eslint-plugin-jsdoc-30-x-ac5d31f33be306a154ab59836aa246ad782d8277","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-eslint-plugin-jsdoc-30-x-ac5d31f33be306a154ab59836aa246ad782d8277","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"0c808c4225b831b9d2186bcd2353979d1e3f09e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-eslint-plugin-jsdoc-30-x-ac5d31f33be306a154ab59836aa246ad782d8277.tgz","fileCount":17,"integrity":"sha512-AvIiVf3oAvu96iSClEduLXNJnsxiM2Jc5TFopByS5WTx58G8lH+af/78Lq3JVsLE5pnpPKcE+V8TCx2N9fS4oA==","signatures":[{"sig":"MEUCIFA22zkUsc6eAQUj1Y3BhzmVSb0Hc6BIEqctSrODqmU5AiEAkuNK8QhRHW88BLgEiJu/47zPxzVTHc0EIka61tj13kY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT12sCRA9TVsSAnZWagAABmUP/05mQB+qoZ+p8BvyzsBq\nCK9KA7msyiY9ekm9LDJXJyT+AJZKhtCzTB9QyAz1Uw90pvad5AWvxwH5SFby\n7L1KrQ3gyhjHG5jsQoEHsfLKueqPr1nz3t15c5KD4xgd1Vt4+fejz0polRe0\nLLMXguspBzp2wVqb0i4CU8q16Utt2/A9DvRodZVaPvmlWnQSwyNgkJxe2xo/\nGGEyzgghxBr+6s/grlsdfYznJ9llrtInJIW0swg6iBIX2WT/wqJX6mITHSa+\nBuxFgsjzloQlVi1vM5+jGLsdskNpj+PbU52PRSGu2wiCyTwxcPTtDANQKmkL\n8TU3s0Ub3ocLmxVu6HzT2zTVV0SBFLp1J0uYgpk0mtbw8VFjJ0P+OLAo0yOk\npU2a/P8b3nLAy5QjnNOKPGdhb9vyFss6MklQ2yUSQNB9QvrAMp7j01aqDbvt\npnM2mikeu+hCd84m+igt6sdTkQvhvHfmJk8ojjD9h2OBTuDIobPLuP+YNfsx\nW3+ASeJhLRtqef6IO3fC3ERKj2qBAYFQ+IgosotJUNZyB8v87Qt9Rwcs+5Nm\n+KJ9UOsFyfZ5qduPH0zi4YJxqo4Xd+egpzZkaxIaJw03MHK0Jg6bbN361t7T\nudVDOaV6gC4YnPLmn6ejvHVFrv+xatwsP/xlWYIGJr2dGLQmUC57gALvUUxj\ntVwq\r\n=i0r6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"ac5d31f33be306a154ab59836aa246ad782d8277","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-eslint-plugin-jsdoc-30-x-ac5d31f33be306a154ab59836aa246ad782d8277_1599036844031_0.10807586644528722","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-jsdoc-to-markdown-6-x-7d3b6995d61f1414a417053c51c297aa3e7ffea4":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-jsdoc-to-markdown-6-x-7d3b6995d61f1414a417053c51c297aa3e7ffea4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-jsdoc-to-markdown-6-x-7d3b6995d61f1414a417053c51c297aa3e7ffea4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"dd02cdc0f34b51eb13fc171cc246c698be4b00d7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-jsdoc-to-markdown-6-x-7d3b6995d61f1414a417053c51c297aa3e7ffea4.tgz","fileCount":17,"integrity":"sha512-xacTS6KvqgQHHCCwnDeAH0+Wwht44DZmLm9sUR/0VjBtc5n5F+3v7nDxrHqAaddkqJgd4a3TGx8bFvLkOfyC1w==","signatures":[{"sig":"MEUCIA+J/ILbxX36Chc8QR1yJG2vepNnSpK8/6kA0FFAWVL6AiEAqU77P/lHYoLyk9QwIFzuFbK+JRih3FmU7U+FGNbTsJc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT127CRA9TVsSAnZWagAA5cAP/3HOIBjoC7uRZBABi6T/\nA50CTQUBI5G7f7gp3wPWu9L79FYjDkXE/OJ045QEb9Rn/UxEwIkD2g2JMWCS\n1y448gcBUfaA/ac+CtoumWbRDNVKlMTVFDs5E5vubbImo0Y3cZSGJgH5njFS\n5n2l4Fx+ELW4wwyh3JFsq6bN4Bevljj+1z+8d2XPfTz8Glzqk2LjlSn1Ih+g\njb8v0Wv3jmp3d82U88GlB2d9UhHbK/mmi4VFtfwlG2gv7eHWGqD9wlWHvBfn\nqYN3bZ8IZ7Ci8t8efMXxRLPkHRRxx7dqk444eV2rQAxu7hEsTp9IpFka2ARL\n9goYwN9PlOJZAXeORq7Aqum9TTTfi3Mp5M3Vn2tQ4aLTNyg7KhOeN5URO1ww\nr8NXgcjKg0z+UkG6OaZWk0GqhjDgiiE3IOTUcsWNnV65GKvOo/cUTPn5PIM+\ngDfdL44xEpk4fIzQEqxSPpM+RWzu+hMWrC3qjxswssKoF8HIHURUebN7svkj\nGdN5v2fbvYFAxyn5vD3zaFBAJHNzNEOT80coKTGLxZjeKuudwGr0Hj7ApZYI\nuk5hEzqCczgft7DWetg5g2bzi3LdwVRqSmABqRvxMB1GWSNa23LxjVrT4RO9\nrcjWgWq+yIP7lNnnkL43TsJyIsvKT4lvsHdU7eLj+K8dgmTvwYXnQnqeCrD3\nT09g\r\n=6yGR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"7d3b6995d61f1414a417053c51c297aa3e7ffea4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-jsdoc-to-markdown-6-x-7d3b6995d61f1414a417053c51c297aa3e7ffea4_1599036858714_0.08490341773438348","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-nock-13-x-b54c76e792b82d055d50cf6a019e0076393629cf":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-nock-13-x-b54c76e792b82d055d50cf6a019e0076393629cf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-nock-13-x-b54c76e792b82d055d50cf6a019e0076393629cf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"72972fb330a20fe38ec57c32a9b5f59553689e08","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-nock-13-x-b54c76e792b82d055d50cf6a019e0076393629cf.tgz","fileCount":17,"integrity":"sha512-wiyJbtCTgm4jtbpqg6sGHvi4qmVTcgpO+vkQctyKNMOofWGsoze+dqQIWyzqUwgsgmuLGQiylzXVEMBxBIVWPw==","signatures":[{"sig":"MEYCIQDTSbf6mGm4yebR4np+IfXnK0K3ukxwWyR1VfWb5bAkrAIhAKFNdPYeRFTyg6rboWcGVwWSqC5gFEVleO2Pc2hishIz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT13jCRA9TVsSAnZWagAA9uUP/1ujnRScVq9RC9dY3mR6\nHPRdc3SvO6/0OtIYRjz6vhKkFEZBFPN9ChIWJSk/UWltT1uZ2LzzNbhJbMYe\nA2PwY0dt9I3hqhONFzcwRnl64dGMbAFOj0F6qFdvv0bOa/wDmv4gmifxah+X\npaLaTuJsb3fvZZpBT2eaNSC7PUOdekS5rbiZWbMBBpFSurvc0IR3LcmDr1hK\nbzWY5F3Gbl/bP/qBgicmTUwHzpk0tO3MA+qiPCY73AvTXr0osPwRhrrq6Kz5\nxwHkjk/lwrGYMpE4egfS+FBrYp6aEjznUHMfMr58qysdASn7GJOHTYLfhU8f\ncGrVxRa6cKckOI3WrSYoyzuj9XZ/SYoHD5ZBf2nkwSH3PRBDyUMpoFrhpT0J\n5zsjUVcviBD4+JL+ZyAHq8JZlvT8HQh/plhg7PVAeNhJJ5zAETnpVC6RyP0R\n3A3g5LqJfuPeO5OFuUU04+9JNaLejCXZxVUhq3bjZ4IMN+OY5nOrnKS6NHQb\nzhfxKMv4/PJcgiPfcwb18Q7yH8CwbDTm50EbGpExUKgRfh1U7PEpLvgGzuee\ndKQ8puPKTzMVNZneHsmNVl3vY9xg218uRW5Hj4ue8oU8YptIsvNtDT0NEPN1\nK/3P0MBTwELosRHC9xUp3hvkPF0olDSqEj9spuW3nsysC3SLafnJtucHAmAx\nQecv\r\n=BHmX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b54c76e792b82d055d50cf6a019e0076393629cf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-nock-13-x-b54c76e792b82d055d50cf6a019e0076393629cf_1599036898633_0.47576401670811364","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.5-renovate-uuid-8-x-4f1feaf16e4d3ad949845c5fbd01f34967bb1c96":{"name":"@balena/jellyfish-client-sdk","version":"2.1.5-renovate-uuid-8-x-4f1feaf16e4d3ad949845c5fbd01f34967bb1c96","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.5-renovate-uuid-8-x-4f1feaf16e4d3ad949845c5fbd01f34967bb1c96","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"107d4abd718bae589cd443ae60819037aac245d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.5-renovate-uuid-8-x-4f1feaf16e4d3ad949845c5fbd01f34967bb1c96.tgz","fileCount":17,"integrity":"sha512-17eLBisaI4jBAhkok6R8aWi5UIdx8QF3T69WD8kf5X3ieJnnwMOmqPOamDXHpxjsufw5hgEGH/rVJlCgUqC8gQ==","signatures":[{"sig":"MEUCIQDJW9ANGeV0QgEGwTe2BXTX1oDsWdu4ZKqS56h4H5RzTQIgeWMktHz05kfr2v4nT3eb7tgInx98okx54nZ0jRNjZMs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT130CRA9TVsSAnZWagAAgqAQAJ+3/tjICDz4iy2Y/RQm\n9kE9rH2kZJ9XfkWF+iR23mDOZExAib2b7kMeZMxa4bR7xmAk4ILNKqivnw6E\n1qEORtM7ogoFeWmH/lzSVcMXbqbfQHk4/HBMYHkPhJrTvsioj0INmbo9Cd/U\nOeJmAiCFKbly3KckBAgPwOx014VrMX0E33KA8Oc6sMJbDfoGCtXwapnh5dyi\naxrG6pBISZti5rIlWifYV4qgKLjQII+4AKGFWoyj7GC4kqxCiHnWFy/NPakF\nYCpdsqMO90MGR2ywz0+9nHGSwhT6ajWeroxNNvSp/K9D4U9qaAvovgqzBooX\n0IRjdQ3cTX1hcn+1J9NZ0ko8MzD7PFk9GYlCo//JSpsHfknrhf5BaLMKwTww\nXdWNcjlW0D4VHghBxSDycfU+FO8m0+BotEt4P4g8xTdWwJi+bvYG+dg981u9\n6Lt050R0VRdB73zdlXmwjbl0wqFaoMaixaGbWf/2Wf2qI0VYVSRezE8Acwos\naqSa1w1xo3DzM2g3YeuVZGk+Dz31zosVutZRuWsvkEBhNJOx4ig/9ADoriR5\npydNHw16SrjQszXqXvI0CRdRs6laLOss+Cbh2I3Tzl3aNjhhGybR9hVALt+M\n5Of0fQMTOZ77xS7ASXASPIbiLXe8tC1kXDBMTgDp+eLViAFO9wkETIXUsmZK\nqZ9j\r\n=pCVt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"4f1feaf16e4d3ad949845c5fbd01f34967bb1c96","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.5-renovate-uuid-8-x-4f1feaf16e4d3ad949845c5fbd01f34967bb1c96_1599036916093_0.03758355461831653","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6-renovate-non-major-2bb04a2d43ef0b61b7dc1fe434cb57acd34fd2b4":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6-renovate-non-major-2bb04a2d43ef0b61b7dc1fe434cb57acd34fd2b4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6-renovate-non-major-2bb04a2d43ef0b61b7dc1fe434cb57acd34fd2b4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"5c699125c8b3d402eb215ebb526b48b9af553cfd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6-renovate-non-major-2bb04a2d43ef0b61b7dc1fe434cb57acd34fd2b4.tgz","fileCount":17,"integrity":"sha512-poRJRmCQdJQX73padBZBHPkFPVtTPVS9iwZozQeEN0B4jkrUodR1JOk+JfhJ0Qp4XKnGdAl27yILuKZuqBdhXg==","signatures":[{"sig":"MEYCIQCF2RpFGWxM3NRWEgaY/afMRWDr3XkH7XlPJfjUN+A6QwIhAMast6AofGC6HXaKgomDS07uiZcrzyt2VjjwIXs/8DSr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133529,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT15cCRA9TVsSAnZWagAAl6IP/1sOCuYH+BnK+Y7JZPml\n6DUjYXhO29bf0YqQLeA65kcv3UZP/aBFHLCwZ7EuaKWgln08/vkTzeuhcxqd\npWAfN4ShBTXS3Ni1DfS+OJmAkwuGzKyodTCm1aBe4Og9yH4CX2vEkDhfUq4T\nxSnE6EwzGzw9ktUx5MK68XimNkI4HLiTYWNAOHu3Lk5mEo2v6u4SW5Ys/kng\npTjyn8/cmdK+GG9vO77TxET1PuiajeBZHre/tCTW2tueOapzzJhxy0mMxXV6\ndf4H+TITLVoOhKYtkT4nYcOasAybujApM27gR8S50FDQWegcw+oSwo94Hi45\nGnslUN1gmH0NwCjIm/WF3MBhY8kQaPnGNSUDOH7JEgXoL7U+FMhH2yTR4vBi\nWU4BlU0hn1R+BOdQcOXsFKxiUlNpfyUQmLM+3Zie+4xAZ3IE7rvRXYNvguv5\n+pOs1XXs8A6tYdZmQ/1dJHWfTQvfL8olIWnyVRLCi42JBu9fD2eh48LHxWTU\nbq7HpehZOP0Cwyen5mioeSicrUA3rRVZQa1DZTS7uVqOw1LCSDFso1UIGJ+l\nAgHai50vLng9iygFI6dKkfftCkGpd/+RXlLX5ZLPw1YBxL85+Z5c+myFAgmJ\nbGr70M4YyHjtSxMzt5TakB3QHmWx38FIqEcOg3fJ67ZLQ65qAA3DyTiXpImj\nGfbW\r\n=6c3b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"2bb04a2d43ef0b61b7dc1fe434cb57acd34fd2b4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.3","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^12.0.3","sinon":"^9.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6-renovate-non-major-2bb04a2d43ef0b61b7dc1fe434cb57acd34fd2b4_1599037019844_0.047728401670043885","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6-renovate-eslint-7-x-f6c14bdeac09e1a68dcf86066d2e48d32371de83":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6-renovate-eslint-7-x-f6c14bdeac09e1a68dcf86066d2e48d32371de83","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6-renovate-eslint-7-x-f6c14bdeac09e1a68dcf86066d2e48d32371de83","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"f9313cccf9b76b3578754186c167db817913b562","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6-renovate-eslint-7-x-f6c14bdeac09e1a68dcf86066d2e48d32371de83.tgz","fileCount":17,"integrity":"sha512-4Mb6HbDVSPCA/XCiqsQIPoJQd8DmK1gDI5e2yeqIIsi6+jfAF8R0Nx2i2iOFQ/iJ60IDeCiuvqGAXopYMsR2vQ==","signatures":[{"sig":"MEUCIQC+lcnwVuOphIWP9s+ihylaiOKuPV8qYmBj+J8QJElPwwIgUSGeSWrgZk3K5IDoRwrF3D3cxF7BwamOIF5LrtNjiB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT15rCRA9TVsSAnZWagAAUbIQAJIR8Z5zUvPphcsLBMJD\n+wYAE4zhmlEcKyYNGTuhuS/8vHuTSXxDyTUk6OOBX3zCnnZB/HRzOZRCx9Ug\nLVkmeHIHl61dMWsmHW02KRg2BOANtQLhhq/7TcwCpcuzKKVe0/NYZHTahdEa\nvLagprdmM7c0ec/PzbqWYGq8o7NmzRlqfw72aBrtDoLviZUuAvDfBoaouTwJ\nyg1d0QtnpZ3hudJkpB3JvfF9StZ3K9+IOzzIDAkEnZb/O1CgEWlAIt6rUMKz\n1N6SGiMTTjb3x6Pv9KHaTOjBNzDLzjEcDiS4Z3KTb+yf0/rCJqPigHQwBzhm\nQBknzVHaYiHP08DKWNJfbAAKDQPnPVXX8y2zLkfDCHShBV+EMW7wXZQELoNS\nSgWzLwShV5wpPHEYz3ZplLu/RFDILY2G6c5MUx4ARzu+5uO700OX2ntIrLLV\ntaAlZEP9MIUno76xvS7jQOCzViQv+aqRAmc84zHfnNcd6V6rfW3GQhfI2rnv\ntv1Z1HSJTnZwK/W5HEErxZo1dJZJITlrjyvnLGFUm+SSQ0kozaZw68ViHDgA\n+qElJTNdBP7CtpoJMEzR0Ns9+eOz/7kNW3x6pVGQ4O+HXk64vVpMhWcwls60\nvdT0k2NGKdFsUM28pCC/MMboY7gj2t5HBvn7x86tEK8PZePoFKvzyyMwYTns\nYsgw\r\n=uP2m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"f6c14bdeac09e1a68dcf86066d2e48d32371de83","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6-renovate-eslint-7-x-f6c14bdeac09e1a68dcf86066d2e48d32371de83_1599037035379_0.9064931738305604","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6-renovate-eslint-plugin-jsdoc-30-x-78e5fe656451e3d16b43f5f0d33f5499188c3b66":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6-renovate-eslint-plugin-jsdoc-30-x-78e5fe656451e3d16b43f5f0d33f5499188c3b66","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6-renovate-eslint-plugin-jsdoc-30-x-78e5fe656451e3d16b43f5f0d33f5499188c3b66","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"8cdd981f9e5999506563c8d778bf092039da097a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6-renovate-eslint-plugin-jsdoc-30-x-78e5fe656451e3d16b43f5f0d33f5499188c3b66.tgz","fileCount":17,"integrity":"sha512-8DkqzR9KEwSvSBgfbqhUSIc5kzNzrI7wcDD+skqLzEF+nTolzgsIJYGTtlJ3EoYSzto5q4lFqMYsOSuYbttHWg==","signatures":[{"sig":"MEQCIHyal2VEs0zmrf0qVnjSQ9kuoKPhzEXbhfDV+uVpdotFAiABBvGOppgboLyMWzx9fxPH0Ad1rInU4LhW1gDHvvwT9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT16jCRA9TVsSAnZWagAAXeAP/27fVu0kfhO2SSFqRsSI\nIJS2Q+CYGzpP/OXnqKAY0JGAJ+E70rR7XTjs1bQUSJvwpIUpLKwEurTFqr0Q\nQtwL0QldgPwqOLCFj/YYV3/E6mJE89DP9m3N5c1vMutjc8K0kk7COCToGN91\nHPJLqP8Y12+5Ug8tz66AR/npeuv497g45M4smhd468CmcNOlc6Icj5navYdx\nNWcFh69Dlmrv8S4dkboadO+7KpA3UwaP/WlBPBTN9uSbG6KGNhWFennJWsms\nC1AAw8WKOcEiSJDQaJNGHIybMTXSyiBuqHxN/hRLdAsh56zvMu8z5+EFoETA\n3WpZQz6+B0Av5J/BRZu5vNJadBs/uzG2Qro1HvTw7VFtBxiVkY9wN9srWd57\nGW4RvGt6NV+LzwjF0flhKCzOF9WYerhfV3pGDDe+jrV/1nax59JsuP9mlEBo\nt9Yb67OG78kTEclN0093FWFc4lTiFfZ6ROp8TUb+xKKzTQukfirx5b4R8VqS\nvhEJrXQe4sb8lHCuzE9VKAOamjkEFyoGzmiecPaEMEY7wa61+8cB2GaGpcPK\n83px4ksm9xsFVI4ryT0Qw07Y8DwLn2cGnr4zK8VqIAtZ2brRCQ2+bTGi2S2p\nWDVjmC5RBBBjJDYsNMhRs8HVuI1PVB3bbRbRBfyM/2HStafnIYKgiuziGa+H\ndyGe\r\n=93Fw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"78e5fe656451e3d16b43f5f0d33f5499188c3b66","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6-renovate-eslint-plugin-jsdoc-30-x-78e5fe656451e3d16b43f5f0d33f5499188c3b66_1599037091038_0.9352153833204624","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6-renovate-jsdoc-to-markdown-6-x-d2f7dbc7daf21c4f0a3b73047d105b2480a9c3d3":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6-renovate-jsdoc-to-markdown-6-x-d2f7dbc7daf21c4f0a3b73047d105b2480a9c3d3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6-renovate-jsdoc-to-markdown-6-x-d2f7dbc7daf21c4f0a3b73047d105b2480a9c3d3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"4705e5a2aa61fc5a31c0b0fbb6194c8f74baca54","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6-renovate-jsdoc-to-markdown-6-x-d2f7dbc7daf21c4f0a3b73047d105b2480a9c3d3.tgz","fileCount":17,"integrity":"sha512-Dq66XyAd6Ayy5BX+PHs+Yu+3U3m0+lpXtNSLCFBCk697xKRK0Nh8Us3iVfaXT32R6cL1M3gX1oBLAYd1o6mgKg==","signatures":[{"sig":"MEYCIQDsldfGzikAg7C6nk0yRA5WXoEItSFWdlAbwXFFxP0mHAIhAIEasP1z4qAoE4Sx9zhPq4Rb+izXU1E4bvwJUfr7Ebm3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT17lCRA9TVsSAnZWagAA3MEP/1VntnEiA0YMvE5QBX+E\n07EXC+uF3SpJEDjVSj6cLqVLB0ME/a0Jhsd+sokjDCVIeBq17ZnJeWarsMdU\nU0heTQLrGydwbETmG+wFq/QThSf5FsUdqnCDBcT70IIFkF5GDRLVa3MAugMo\nkVPKo+wVmnCGLusc5ibV+b0FnwfOUsjUeNIOOQl1ZLVclpaFjw1FqmAUS/Oa\n2XAf5IcWGClAb5TupjLmuP4Gz3YfxlzXZS0S2y5iSFWoyjXMkLr9WGui3ljG\n2EvAzSF+NY2RTt6kaxY67UVUl+vSODeqTlHNVGaHpjv4/utxjqCQFFMAXeWN\np0OrwynsjTJkNCYVzu8zDlQWqN4ILTuHnEHRyh8NHEhQhVb2BHSnpUspBLMP\nnHifJx9uV5Bhv+DQTXFPlBi1v3kR9cBte892wtG/45ML2hcDlGs9rMoOMK5u\ndkJNSJVH69SXAtv6TFFaGCGWyM6Y7mNNsNvQMI5ebwpwNrb9LoRI4C6chSex\n06U2L2od+6Ec3VytLnkL4gj95rdtCXwKgZtaN6XqH6NzSFFOryAl4KleDg1v\nwJnLcxQBnEDwHrXuKwnUB1wjZr5UXVdUjlxhFApAF5ScRpyrs0piATR6fnlp\nOACFQANyP9PkgQauPSQ83Qo6e6qqjYmnVct9QFccfek0zrpilW31NV629ONY\nrGnX\r\n=boBy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"d2f7dbc7daf21c4f0a3b73047d105b2480a9c3d3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6-renovate-jsdoc-to-markdown-6-x-d2f7dbc7daf21c4f0a3b73047d105b2480a9c3d3_1599037157449_0.20218921534709056","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6-renovate-nock-13-x-f99513479de9d9f9d7dcd674746345822acbdbe7":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6-renovate-nock-13-x-f99513479de9d9f9d7dcd674746345822acbdbe7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6-renovate-nock-13-x-f99513479de9d9f9d7dcd674746345822acbdbe7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"4aacaf62494d9bb4af0563016c4c7af1f10413c8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6-renovate-nock-13-x-f99513479de9d9f9d7dcd674746345822acbdbe7.tgz","fileCount":17,"integrity":"sha512-kKyZ+O/epBalQ+Z5bgejfy9XPHzvfF2SKSAUXOZInYIdcpbae/KmtxX82q2ScVgBPqh8r9aSEMAbPytJ6xywwA==","signatures":[{"sig":"MEUCIDbr5QLCXoESV3MnTuIlUTDtRqFezIeEx8Pg7lqFkm5NAiEA6/3ggy6XRTWX4Sz6DXMtPQSsxtPMyALePIqm0ts5nGE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT17vCRA9TVsSAnZWagAAEgsQAJXVeLHZR/8b0mNt1Xei\n5YbL1bOmuU6veMppDDrNX1L8W0o/TTUa2RjCIk78jjI3j4/nXXPnUdR7Uhah\nLXdCP+29SUill/kMwtlImQwxbx5NPm3nxM9wCpQiKmYgVGr3xq4aIvL/dZig\nsqYISwdYmT4bwZL4CvaU4N7WcI89ySfE5wIhf9Dq40i6Wl0dpG2JZXCNYT3g\nXqSqfh5WjSDmJG16uUYjhXoe1W0uhHsdZhW/ZOuOL0r4V8JHWkDefn/T5gNk\ndCBGhhbl4AqYXr4oCeDZmMr+kppNJYAJXj3TmK97b69Bb0gYQmyULgzVXgGK\nLBm2mw0iZmlEAPkFXwhwblLiVC318BQSSBZuHPRbvkbjnp5/LRK3j4iUKURZ\nVwPhyLvEbFuZ0v+GkNHEBnAiWti+2YHZjzqRVvijL5KBnwF+etK8RNSwWUX3\nXkQ9mJ6jJ+DDxohbTABJ6PiMaeoEg8jZI6QZgl7WtN6bhKflvx3CgfFm064q\nlpAenaemsKGF10oJa2zLR1TemfuzwY/JtRlgoSp6Kp+P2Lv2PtzVpHuuxWD6\n/+UzqLc0XkZVw7WPZCHtUfb/pFW6bGwpMltMzpbhkwPkBwtrg9fyH9VAWxwf\nOjMSLSqkdLMWV+dPXccoljEo55dwEGA0gCjxyVrMT1+fQe6XUD+5iJF+HS+y\ndHl/\r\n=wuBP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"f99513479de9d9f9d7dcd674746345822acbdbe7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^7.0.2","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6-renovate-nock-13-x-f99513479de9d9f9d7dcd674746345822acbdbe7_1599037167537_0.528890745182836","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6-renovate-uuid-8-x-669020239e091c264ad6936f83acaa470a1435d3":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6-renovate-uuid-8-x-669020239e091c264ad6936f83acaa470a1435d3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6-renovate-uuid-8-x-669020239e091c264ad6936f83acaa470a1435d3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"b165d4114d62fb3e063fa6e315f3bbf84796045c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6-renovate-uuid-8-x-669020239e091c264ad6936f83acaa470a1435d3.tgz","fileCount":17,"integrity":"sha512-FFUNHLsFNgIo1MKwrwX818HfzjHKCo+qhsnmDAjvOsuxo7PJEAx916tUM+rUWSkollamfdB5pUoiU4GoIZsUbA==","signatures":[{"sig":"MEUCIBc9Si3d9SxRLiQS1/ggvJbxwJRexVRZPYziXsssr3/aAiEA4O/jIImQs31MyyH7cF1jjl0fscSrWgTifHBpwRPg5Lc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT189CRA9TVsSAnZWagAA5c8P/0Xspkvq5bWiVQpr9q6w\n9Dq6XqKpVxHD+r4U8960zUE/wkdlkV3JQE+RxkxJ6jg12OE9VavQ6Q/PDGYi\n00zD33UTC/G18fxeT6Je/N6H5XUrqRi9zxyDTOLfRLWagm+JvSgIKS2XrGqC\nS1PJojs2lrGpZNwGUKNrFUjiaajBDQG5RidUI8rUc9gtmluHaqMZyQl7t20i\nw5NvN3Nj8pH4q5jGYlk+Q7zoZJdPzWpUhTmzlxENTJF5t3qDAaeVsoNkBSLb\nN3ZjLHp79TJB9JxhoWGGkHqbPWY3xjYEcdbqgEvTPskGZpAXmhnhsLs+b6hR\ngWnUykhmA6AjcCA7otgoZZ8XEZJ/iGYDQIrtFRWx38vrMAIGD1s2f3E0DlBT\ncNsxun/3QvCTQvb9468Pm55qRI9diLsMq5W/gEEUo4bzpmGynMVZa9LjwkSh\nMTaSKB0gbbeBSTA3b7KrcvffhfK58joighKJU/8+bnkRP8kXT2bN+Du8iFv4\nvxp+o4S9nY24wZaKNvDcrR+IJrCzI9rWuFvwX3qxRrizVBQWljBxmhA5Tk04\nNGvRy2QBwCLIp6dcj2b3c0+GACFuhwmOl9WzYvNRfkVYR3MEBplSzJuSgtIW\n35gS9G8LzGEl8ii5CLf/8LB+T7ZRuXgM5qiKzTwh/fJqSwbLfArY9yVEVHXF\nfE1J\r\n=+tBh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"669020239e091c264ad6936f83acaa470a1435d3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6-renovate-uuid-8-x-669020239e091c264ad6936f83acaa470a1435d3_1599037245201_0.06538564490064913","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6-renovate-non-major-02c46d9cd879d4166253042be8e0eb06535cc0df":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6-renovate-non-major-02c46d9cd879d4166253042be8e0eb06535cc0df","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6-renovate-non-major-02c46d9cd879d4166253042be8e0eb06535cc0df","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"e57bf7499942336777f0221aeefb94f8b069daa2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6-renovate-non-major-02c46d9cd879d4166253042be8e0eb06535cc0df.tgz","fileCount":17,"integrity":"sha512-gXFimgRnNlnh3uifx/XX3Wk4p/P6E8bGRoV/8TTpH40BOjYi3IWdwqUT3PBhie/f8hvPseDxs/tJhWkVnK2e5g==","signatures":[{"sig":"MEYCIQDezEEwBkxIwKPIa3DhkY8tycD+B1du9cPjwCJsZ8OLhAIhAIRmtbrppznMtYHx4uXZDn3dErGnZxT5mU8Dngb4XhKx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDbbCRA9TVsSAnZWagAA7ywQAIxsm86UjwwLGot/Zija\nUnCp8VS8XCpyI0MolyGI3neBmwkSsdTuibbWOpCo0noTCl6KNC/2fOz8ZYwL\n2vdJVhwqj8yrF7TLNbiLI/s3//sbfsKNaw7qvjnrCwRfVBQzFOKQjgh5hfmV\njkHdu92MSDjpxDm1G05CH8z82Nn49tgvX6TDvPsFRE6BQLgTOI/enderEmYV\nMBRUYA4Ooi1rvKmX7CdKJK7tH0FD2GSYqBWd6yiY5Fu3Mld8yQwD1KrOV1iM\nqAxIt2b0c2s/xyUz3NQjdrJoHxgUn24glmoQnvnuACRELkXg8oucoK8yR7c/\na5XOGHa4+jgOIs7uRnZ6J8ZvJUq6wfvfe/lhL/OfvQNaEHrcVFiybss6rbVb\nM8RujrzGwo3BQM7+7eaFAC+9Ch2ppe+qnwwgRSzWB9Y+urYv0cmiqXfvCbQl\n+uac8qZYi1IeyvB2JAa6ELTMgfuQ1dan4RW3e27XALlxVFVpLyPV+MDCXdnj\nBXdmUYCpDktLmoej4K5qRG9Hvwq2a+lTKcDToCdmBLjxueEVdipQhXZszMUR\n0uurpEFGUYc9Wcqgvm2Ne12GGG4CEhaWkpadvEfjVo3G4gbfOAtWy7qzfiFg\n5DhGjgiU+WGoGrEifwRNCodXj8VZ/B1MwvsGDYz+UjScCSkgCPJobcHsfDzc\n3LrX\r\n=aMJY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"02c46d9cd879d4166253042be8e0eb06535cc0df","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^12.0.3","sinon":"^9.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6-renovate-non-major-02c46d9cd879d4166253042be8e0eb06535cc0df_1599092443071_0.5259242727841307","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6-renovate-eslint-plugin-jsdoc-30-x-0bcf16265f571f31a007ae20c344bd7604aa7781":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6-renovate-eslint-plugin-jsdoc-30-x-0bcf16265f571f31a007ae20c344bd7604aa7781","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6-renovate-eslint-plugin-jsdoc-30-x-0bcf16265f571f31a007ae20c344bd7604aa7781","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"425af99945dc1c384f1d9cbec46ced351353b010","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6-renovate-eslint-plugin-jsdoc-30-x-0bcf16265f571f31a007ae20c344bd7604aa7781.tgz","fileCount":17,"integrity":"sha512-0hECX+XkcdWcfY6UL0fhW/Tm8j5f9Fu+nY478kbjrlbbwBLKIorfszJCRqVDPu73hYRRI2jM8u+m5v919uWpfQ==","signatures":[{"sig":"MEQCIFsTwtazVWJOv/DkuDUBd51wsvc7kHcK9Finix+bXU/IAiBotJYXhtzgD2q99ZOAZx2fQ7dDD3cNHy0YmQkxK0nfwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDcWCRA9TVsSAnZWagAATCoP/2X32h1DHquhiamhs6jh\nROsPq4wOLRxasjTtpZjcr7Kpn/4XtmLtRneEDkC7kQ+ekksLqDRnwfpnMgpJ\nAXAvvmzVglbhkAqP/GznZBI1obx+FElfx5t25v84QTqT/aCO4YiLjhaGLYPe\n+Yz2hdasGfKjTFop0Oc+5JRIL9IPzjgxXxJIO9d2wRNlOwXU39TzxRNU/xL9\no2OBHq/m4sF+FihevvMb9+9QhBj1PmqDTHzIkKgyzyhVUxsWCAyg812M+0hG\nJAxK8SdldpStEeDWN5kG82qXyIaKzr25n+12qHOz0XTYvgRq2/Cssk+oiEk0\n4pJSEgmBjTEFIHkq9PSMPohFT70W4k9TLVtjQc2bmKwFaBxeOucuvA/D1cTL\n3J3fa/u54S1FKwbpAeacciZ0dzMcUsczYOYOzKuFwpOeCd2dte71WadjU9ts\nBTmvVtb6mZyHns4jLmb+RRo7LBLhhxIDeBeGB4jMFZubAa3F80+PAXG4DKjg\nMpr8Um5mqIcLtD/62GJQNJ6hvxwHpRiAKcs9EzaGGJsHoqRgWy0TWMQhp3tm\nN7kXRKW9ZfGFNo8qrnfqlOwacXRJ9KIxQeyjkXDjvRqcvfmHxcag0loXewqJ\nBdjSxDqb9m11Qu1yObhRopToyQKo3W/1I/2B9gFjpKE5gZRDEtn2sX2TLgkZ\nJFJO\r\n=aLkq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"0bcf16265f571f31a007ae20c344bd7604aa7781","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6-renovate-eslint-plugin-jsdoc-30-x-0bcf16265f571f31a007ae20c344bd7604aa7781_1599092502395_0.7846734048142625","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.6":{"name":"@balena/jellyfish-client-sdk","version":"2.1.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"31f5bbee718b6d1a7fa77b5a919e14f4f2cbc887","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.6.tgz","fileCount":17,"integrity":"sha512-BJHkjJvg9wYDG434nd/v+AURLaJGlpiJQn0UvGFKgIW4BZZjTeQAkYLg3tbDze6XUP88DSN10lG3YdhGs4PltA==","signatures":[{"sig":"MEQCIEtCd6VElM0GHPmIIHZR5APgHzVxRkxCs7qRB/25hILiAiAzBHlhyXVw/4fW/9InfqglbjbJ+JonUk+dZmm4d5TKaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDfrCRA9TVsSAnZWagAA/hsQAI2yw0zVCElcRFVv52yW\nWQbpE21gXSzDKKmR3pbNebJsfHZeeTz0b2S9e1bwpD9EyG2IB15b7nEHWzOq\nyRxhBv8bv4MEUTtlWRYS2CSURJ6KcaQiKx2zGf9eA5idVI+8KF+UDiHGAflb\nC/5Cr8C/ZgXIzEoirltlMYWjNd+3h6Q/kG1lG9uuLAGQj6NSO3GdmWJMONT7\nr02XA9NQ5xeSznu23GIJ/jmHFAsDmLYvSh49EVBNC4n25iuXDZVcFxzT78Gw\nI9CRaZeFybq+1sToCk4rm236Z4o2IH3UT0h4pLEBtxeZu1pOTld9AiE33GRt\neAXOhREUuu6Ro09KBbHC1m5w8mZE31KcTHfBBrRpwpTAcVFzYKFaKtWXnsQ1\nGTmKAJTTpEwCvnt6dNqNpev8IafKjaFNo6IuoGL4eGA97itzVm+Uca9+rlUn\nPxqqtgx4n7rOM4YzKa6xLa5D16BSd+rmI5Bm4fyd2nd43GKB7kL4J/7rny6Q\n5EXlYpO0SGkkb3T9yl8k0p2DWQuiWdyio+3ceGNOnyDH9EsjCLaHe2uSP8fc\njBeUbyN8n7HEnReQyDZqV3KrNNmkCiaPrExzzOvzYWXDSuUnI2GplrmfBZRV\nQsJW8/r+NqiEHbUZ7R6q6sewTmphmqLueZLoRGVdwmSKPcbqWlUuL4K5KJKs\nHPKi\r\n=41zt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"0ec29b53bb84fea38f01646d24a7d27ff1abc453","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.6_1599092715192_0.15459531112713232","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7-renovate-non-major-b2548cf5fd03be49c0b7022c14d7f19352c76084":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7-renovate-non-major-b2548cf5fd03be49c0b7022c14d7f19352c76084","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7-renovate-non-major-b2548cf5fd03be49c0b7022c14d7f19352c76084","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"bdf9c3f2c075661f755c75da19eaa55119823d83","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7-renovate-non-major-b2548cf5fd03be49c0b7022c14d7f19352c76084.tgz","fileCount":17,"integrity":"sha512-Giq0qn21olYzFffZyAeXPyYrP/a4YqKhlt6fYmRp03eWqo9QzvieJloG9WvNIuQ4bddfKHGUIa/ypCQ72xWwow==","signatures":[{"sig":"MEYCIQCup2a7lnKSCAJAV67GTEl1JCLFaLb2XPHWZRxagciRzgIhAPhbuHcIHOqBhAsjisRb4PgHGSQDHSBOOGTZtsvD+rSU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDk1CRA9TVsSAnZWagAA5RUP/Ar2l5sDef+B4FQTqMg1\nWZJtdgNpcTnj2k0qmu+7ZdVGhvSGRIbaUmlBIAyvT2GoTVjEEqh8EiE56x5p\nSUqnjtfKbZ2ZXIUNjbZBZZ/VSCWZ8VlEXuDXyu4BlQknIerYnlTJ521eCiOM\nSY6mfC0nu07wPmkCNcC+LwEL2YGaX/oZWYHcYMv6ErMjE2whVKoCs9y5Dk0f\nw9My8eDmBP/cnijkg4rF3iV/WZc4KecCklGPeWPk2C4QbMiQVefygUqFHyFZ\nU0cKz5JixaXa2DI17I3QvPpCfS95kAmpBdrHiDJ9/f8pXI2p5ckUyxs3+tTN\nSq3Gs2pQ00IjLlQptCm3mhquzg2xWcyp+nP5jwpXxZJEruWCNIahAgoAgEQB\ncKYLgeFLm4UPOiWflUCABlCF/l/zk5iN667CNxI0LK2ffTdQnF3E30IxJ1Vo\n5MgVqz6xv5mTwjflRURcIQeVXPVteoAdiKL4C7KbKW5mTeqrhOuZHpjZHRr3\nkFuIFXqNRDYc+uc1ffmRGm71Qg1zn6hu7VTtKSyTC1wTu0iV9ucaoIqONHfH\nzk1CRsaMU+gHQ3JyFUhBtInxZIdlfqw3/ceK48Iy3e70ys3pn3RbX5uibCaI\nEBxnY/MYaPWZg+IIRU8S3/Nefx4F5b0KUhk/n7tUEZ6gtvBhyeXTWH3iz4tQ\n2JMl\r\n=SKlN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b2548cf5fd03be49c0b7022c14d7f19352c76084","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^12.0.3","sinon":"^9.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7-renovate-non-major-b2548cf5fd03be49c0b7022c14d7f19352c76084_1599093044818_0.6062999345759856","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7-renovate-eslint-7-x-319bcc8a18047204b2142751d49218c90062bbd6":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7-renovate-eslint-7-x-319bcc8a18047204b2142751d49218c90062bbd6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7-renovate-eslint-7-x-319bcc8a18047204b2142751d49218c90062bbd6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"ad0d9840378fd86b5bc5aaf292b9fe15714115bd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7-renovate-eslint-7-x-319bcc8a18047204b2142751d49218c90062bbd6.tgz","fileCount":17,"integrity":"sha512-kMe6SSGB4bixYMEBuJlnRKa18ltysvn655U+TAkKA3gWFUcLJnU6voYzLy8eF1PKsMNIzt2EZQEMPDbik18o1A==","signatures":[{"sig":"MEUCIQDeHLeHKwiJvAThUZ9aIko5FexqnfcQx8TAYKls4LoYCAIgbezY6ND6eGqzIiixqQI+3/fwNgezl0EcTcmzJQDHytI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDlvCRA9TVsSAnZWagAA/nMQAJwq9Xt3SOqOlLEUxW62\nxUdbQ+F+oInkoJblJl/mOPiFO1qNcYDqsggM9KPQDQwJdEPyd+UfdVOHK1vB\n+s8bceAEtyZ1cRZp0Df3ovndiOc6TmsByT7Y7+TuS3lD6xCY2Rre3ydWk4qM\nigP4rqRG5FgRBuxs+Hzyt04bwusakPNXkZH2ezBWhMbezLtJTCZwv2mK67Ry\nA62zbNWQQ2mzh+Wtzd/KbMrjf/yX0NfxC3xgxhXCw/HDfoXoj/gJ+Q9y6CK9\nKRL4NJpKv8knpJ9AfSYqjYdR4erC+NRykuKfkkoEVYQZa6woa/be0sthvdZE\nvTfVJpS6VhewdCn1rRxq5mUsRjEP9fsZ+8qjx6zkenWV6v6tQQcyw6eQC3qi\nudah1vlilgR08O7T4nryHXVDKLdVZB7p5BfWDBQz5PFW34YhR4d0CQsR2BP5\nrgIPa/zW1960e4ApkdqE8GcsNWvA/Fq7HH6WOfJx3f+OkpPE2BFZfhefGB8v\nAJ1HSiJDrvnsdOVHkQp7n59a7ZibjqC9yncEZ0TirFRzvm0oXdmt38sEa4Yb\nite+7Vf6kmWbQX9rLBXLahEH0FPt505CDzeGdq1N7rgdeEcyzC02MiRSE0BS\ninjZsDoxP9aew9uheNjpeM3YgyeBqIe0yWPUAuWJfLmPVIz1eT9wugF933yK\nRNGM\r\n=2Pih\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"319bcc8a18047204b2142751d49218c90062bbd6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7-renovate-eslint-7-x-319bcc8a18047204b2142751d49218c90062bbd6_1599093102646_0.31386412808325104","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7-renovate-jsdoc-to-markdown-6-x-b85908aae4f6ec0d0c2c7cd848ffa969aa7316f8":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7-renovate-jsdoc-to-markdown-6-x-b85908aae4f6ec0d0c2c7cd848ffa969aa7316f8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7-renovate-jsdoc-to-markdown-6-x-b85908aae4f6ec0d0c2c7cd848ffa969aa7316f8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"fb48434a982718834ff8e4c0f20bf11943e8ef1f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7-renovate-jsdoc-to-markdown-6-x-b85908aae4f6ec0d0c2c7cd848ffa969aa7316f8.tgz","fileCount":17,"integrity":"sha512-XEQ6EO3BZi9RFL8pMjgDDaPG9yCtmlHdzNJMGTzempK8aWI6Q5ZpNi4+dIUZe9HUVbWMQLkdl/9VazEZVglDCg==","signatures":[{"sig":"MEUCIQDpJStMMSfR9DLJuutwgvDtuJ9v5Z/OByLm3ITwntEbyAIgAl+5lUNuU0yAd/DwfsKfhphzFt3M+Qle5fpPExUqTN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133645,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDmuCRA9TVsSAnZWagAA300P/36jGuFHbMaNusvTMwfu\n9Pu4fU5XTq8Mii8mCdoPUuf4LlgmG/xwJp436A23LZbUQDzbF1e3dQavc/4j\nlLPLgJa8KD9AeTDVtPfsQdQQcIkM5MjUf0dikE7uswZGBVzr57QsskqrUR3A\nDhG+iyi3miRfEj2vAQU0Buyha8/mD7zsJQdC2tvXfwE1e7vl76wc3pwskC+f\nYmvJE1jojsf9g9St2QCWUC8MBSS4KJNlBsye5vG/8XfM9dKTB3WHZY15y0lT\nIbvggIgqirKz6qr7LKF9k05VHpG+SrRbpbDvCva7AyDnKvoUkkbfDf6S2m2j\noZmw6/je6eepWL76Tb7NcbkIt3XCoxM+7KMuBPAMom+Rg1656k5zm9/YcNwl\n69QIJCCA8oP5V3hAs1CZH9Eg9mkvXmTzHRqHdrV9Tw3MOSUZMesBKJ3Aqk7i\nDSvEjvoffoIKDh6tuNOayVR/5GIYvIDin4jF57rTSW62CREqRTMYz5nh//TF\nkCeG1+yeDqfHOOvcdla9pMEbAyg44vrtAbak8qNUsIXV5/1arsIrliyvNYZ+\nmljPqcldWtVWeDvaTxXBUavbYfCGAjOTjWLvgZ3zm+ukrJAwtSR5mP/AjyW1\nKvG4UviIPhklP52yemGL/+pwHSv85nOTCVt6npZGibAgxEn/g00iRr8hY1y7\nBfto\r\n=8srz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b85908aae4f6ec0d0c2c7cd848ffa969aa7316f8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^12.0.3","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7-renovate-jsdoc-to-markdown-6-x-b85908aae4f6ec0d0c2c7cd848ffa969aa7316f8_1599093165628_0.9423897137515402","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7-renovate-nock-13-x-c8703bc5f8a80f9a12755b57e19699f18fb73df3":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7-renovate-nock-13-x-c8703bc5f8a80f9a12755b57e19699f18fb73df3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7-renovate-nock-13-x-c8703bc5f8a80f9a12755b57e19699f18fb73df3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"d7503927bae13c09eef78f9ddd92ae35f2244b0e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7-renovate-nock-13-x-c8703bc5f8a80f9a12755b57e19699f18fb73df3.tgz","fileCount":17,"integrity":"sha512-cdYnlSE3w4u6k+l6ZUr/rMxGyEBVUGbVDKqPbYiGqNWkE88JwBDkjl7c9OT8lbWBrDt+DKKf5vX0k1gGGvbEyA==","signatures":[{"sig":"MEQCIAJiwZBM2WqK92BdJ1Lgx8ArQMIARi+jazz+6e9/qsLtAiBNAKLrcjv2LeWu5cA8nndMfNdG7HIPQa0o7Djqydp8gw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDm/CRA9TVsSAnZWagAAh3MP+gMkrxlp26oCDMYf71YM\n7hwdgeFg9oFfiHR037dwOqj55Ta24Qml4c8QhZIfKLT9TRqeSX1MIH9ClJKL\n2F/kyJ3XsxAP34hlrLRibD2U1xuFB0aefwUkusTNL6HrImbLvMgfjbvofmbQ\nl6Ik6PX3zjoRRjIPhLGrurkxqCiuklWs5pNeEjHEYQwc9YZzP6y3jfwTfv6m\nmw7HHjy5PglXjS/UdnYw4dz1yvIK86o1xaKWhRgUu5HCM2EMQmT4Beg2IcdJ\n//fGxh/r1nWikHW42ocbC0pVmiqkwZtMV/7eFqXH57+JUN5Hs6queEMBgwZu\nJyOWALBOVNX/TvYOsViEzwwb8FjZPJGiepj9LJgYKqMGRmXKGxJke4BxQ5h5\n4cizabPHMEVnjXNa500YC21UN1gDQSrjw7RczMG7bb9UqFPhPp4WpV2G+ssQ\nn7bEqPIaqnljpe4SwsiKN+zPBGMGz/28uHIbLhfl0XdfKhwxVDMtlSilNFan\n8bAmNY0DnmAnQ3LlUs7QQDkRgttCC0GIs7gPLfUOE3+geA183vMEifXbjmi6\nYozTEVUmzJtESTKNByS56dssnaJoEuVnE7PBVT4rQyk/abWYXeUXk2x/7dTA\np0AZDayvVxANW2i7+78nm4iYWJLDLOflmqDiDwg3UEM8nt0i/wmdjk6I5wX9\n08NG\r\n=/O+P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"c8703bc5f8a80f9a12755b57e19699f18fb73df3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7-renovate-nock-13-x-c8703bc5f8a80f9a12755b57e19699f18fb73df3_1599093183141_0.6667142200474905","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"8ebcaf13ccd4caca1992d23e58e6294f273ec3b2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7.tgz","fileCount":17,"integrity":"sha512-M7TYpSZHTeSpSSJyXXqZUtJX+IDM8B6JNGnoiqCVeZ9MsiVRauJeTBHqQk7HRxzxvWQO17kRCco2qOy+xlldYQ==","signatures":[{"sig":"MEUCIALiloDSfCyHioU35YijoNKhG0EL/yc78rwR14LzFS3QAiEAxQ8ipIczRayAjBkwhA6HdoFGXpHJ8Vs7AAt8ISpxt/c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDr3CRA9TVsSAnZWagAASuAP/22ifzm12rt3Vdc8GLgv\nKbT/TjNAUHQHmLWgJetTBjXPtMzAwdiatjevTlaXT5Mms7oTsRm1ZZmsExBA\nWpl4jc63Gw4CAUzoWnKFxAv26NiQxvHiPhYWOIjyZ41Y/wScELiHxN3rhRuE\nByNPUQ98LESpK91yqtLnKlUnJ3nGV4Pc5NKwbfBQqEVI/+lNMgUKEvA8KQS+\nPICf8EijPvMpVNyMKfVxKLN2tZw7iDdgrFlXgzWpGg0EZxmi9rr41EJabj16\nEgFfDehtcdcijLr3TXMJKI4XIh+Weog0bDmzWnvd23GFbHtBa2TrWuSN7NTL\n4Tz8prtAQc63TpijGSNKQKdTHCNFIbFYRVABv7jR/tNOQAELO8z1I7+PfxT4\nPsSxcWVOyoetWeYFbyyNbYdqoDiid2rWsjM5Se0OnAFydpOEjxSvSO2/Hg9v\nQonXCC/JbTpKvE5NKubYYlEdwOT6fNy+iVi7oqbyk5/UfswAZ+sndncz1Pp3\nSXnNHvAU+CCzDyVzA8LT6Xqm56An3kPHp5nVnts8lUnG5xax2qMMB7ubrnR4\nGsvQ7QQ1F09wzpVH/OGhWcXoBibfGfkLP/91LiXgZxqpSzq26CXY/YMq9L94\nKhZSnUWfFcFqe0Zln1m4cqeMvA5BDUAcR5Q5FpeqAMew8p4dQtMiqKlZPRf6\nttY0\r\n=7ou0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"c2615f67087aa0b600f5348d22313090884d7da3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7_1599093494848_0.03090279735137136","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7-renovate-non-major-28ba8a7d66d7dfdb9e1e4b8181cd6cd2ec59ca63":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7-renovate-non-major-28ba8a7d66d7dfdb9e1e4b8181cd6cd2ec59ca63","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7-renovate-non-major-28ba8a7d66d7dfdb9e1e4b8181cd6cd2ec59ca63","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"105425098970baf2ce65b18e66e661513d62294b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7-renovate-non-major-28ba8a7d66d7dfdb9e1e4b8181cd6cd2ec59ca63.tgz","fileCount":17,"integrity":"sha512-M0eXdJFeMU3xhxR41CzXemQ1PFsGVtS0kLVhAAa8XhHtEhAeXZZJSpy2zd7hcKAE9kp0I+mReMibkvWFVT9mrA==","signatures":[{"sig":"MEUCIQDDLfFyKDBFbapUkFp/h6W+3nvuaRRP3wiF4dP0qYYfwAIgTQ01o5xYi8icDOrD1iEJlhBfDVj/EEOzgls6P6+sD6o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDuLCRA9TVsSAnZWagAAQi8P/0ywgZeQFDmdvONkq7Mq\nplJvMOOuLK+v5UFK0BUnCVAmndq6nIbmqdDU+mGqGh3uawbXuOWFfWyTRv5X\no7KmaEG+m7KTSmutT2gNom55nrpgKRKVu2+3QaqFvZ/zbrYk9hCVYkQAkRSY\nlj6JyXZkltDWuTbRbs2eP3eC6BiyTGs5C8v/NwcXphR52zwwW1WyFblQHosX\nuIgvqK8qHB+w/sQ7KUA2dP3SOPZgx319pY9OVBR308I7fKIZxfj7DrS5NtCj\n98hC5zauEfhfVGqaX7vAUI/Qsz0Q+0XLMmxGBM+QJirl+Pu5FWB7ZjAbbaph\ne03NluFypAopUNeh9BWCCNmvPogbHS9Y7mJElN+tv8GsHkJ9J9zw3pq4TkDp\nlkKqlduLvdqfGOeBS+rcqHO9v7qn6t40tiKAoxDRecDtAmlMCg1Kv7sifGze\nrteS4658yxGNOoi1Efx5KJtPp0YWWL7RizoMjkvSai5TU+Xx7mQmBRfdA/dl\n2jXbQInBWELZXRh0uX4AbW3dCQvcd46dVuo/3b05lSCMqjm/rkMFqvcIWFH0\nXLAOZzgUdxVxaYJz8QQQtnOwH2twnrYhgr3AVLRvO1inZUUANYcaV1DgL9Rt\nhDMhGFPR6C+56ZrpxQIF/PuiwRWTlwB8kOKExXyOABWr2x/HNNBTHy9mNqkq\n9YVk\r\n=Xkth\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"28ba8a7d66d7dfdb9e1e4b8181cd6cd2ec59ca63","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7-renovate-non-major-28ba8a7d66d7dfdb9e1e4b8181cd6cd2ec59ca63_1599093643249_0.9070079454203779","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7-renovate-eslint-7-x-dd093dde3779e2f116cf89a6c8dc5f446e7f3126":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7-renovate-eslint-7-x-dd093dde3779e2f116cf89a6c8dc5f446e7f3126","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7-renovate-eslint-7-x-dd093dde3779e2f116cf89a6c8dc5f446e7f3126","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"920e38af840f15ddf2c636d5f08c4bb450f6269b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7-renovate-eslint-7-x-dd093dde3779e2f116cf89a6c8dc5f446e7f3126.tgz","fileCount":17,"integrity":"sha512-aeIhzdcDCuMfkyKbjMnEhSX+6wdtFMD6EMzwfqCi8NgLN2aYMu4t5jjEmg2dHiTRdgzyDhFnfp4JCy1YkVSTbQ==","signatures":[{"sig":"MEYCIQCyE9xR0a8uj7mlVDhxIcoNhpjfvXOj1HMdfnRYCMwo3AIhALi9Gzirk1Y4cZZtM11HWo1BYRS5KuTjMHhWiq2Zr1RZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDvRCRA9TVsSAnZWagAABpkP/0Fp8hRQrwVPEj3+RaPD\nN1jo97oH0rn10tjk1dWjBUzoPfCJAXydKHN4VhtJrWZQgGnJEmRfGqYyhj40\nCA8AyfkN8NXvNb5FU2jV/x2Tghzl/7/enHGzaOi0EEtPhoDR0wEZFtWGgs0b\nbOmK+oc3Mj9rpCikKuG0iSBV180ZeKrPbyasXlQkom/jun1q9igbBjhOQr4z\nk/VT7uj6npKdm8F6LTCw/aJedQmVHfF1uMYmS/cgFt8Bg8Jt2mdkmEB0MlW/\nul8mmJ7/C5uar09bH+XPtwkcJzucypm2+GLNqPDDc9RBK/T6rpw6xgaSEAly\nVoejj+TutLMsHfJSS5YOgfWFNdTH7jisnqfXhsLfciSf9fOaFNiQfEP/i8Gl\nzoJ9HSAZ1cvjTTFetQk/5fm+9+/6wodFtVgZxayHUsp8n66fUY9vAIO7kTC+\nyFhPSk5Nonz4AlkglMH+zZ1sc7cxGxa65nUJPLx59PdDcMeW6k4MdJ+r1u26\nXacubR5GWp15MgKDWvfUGVbr/mfzcRmnaeezakyXGw+hIqO90DkHsCqrrr1g\n/Sf0agF1QixnXHVeCusd/G55MJV2JE5DcM+lX4wfRxVACuHNbe3pEZ8orIUf\nyoeIxX2qaOxTJLbq74TQwmNh0LsdCpK8Uja4WPsYYOql9KKqNOH5PN9DyK6G\nJqk6\r\n=I4zT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"dd093dde3779e2f116cf89a6c8dc5f446e7f3126","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7-renovate-eslint-7-x-dd093dde3779e2f116cf89a6c8dc5f446e7f3126_1599093713082_0.1539027641370352","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7-renovate-eslint-plugin-jsdoc-30-x-29cf8f4a3e1a7f13f717a20e15e074758ca3c39c":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7-renovate-eslint-plugin-jsdoc-30-x-29cf8f4a3e1a7f13f717a20e15e074758ca3c39c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7-renovate-eslint-plugin-jsdoc-30-x-29cf8f4a3e1a7f13f717a20e15e074758ca3c39c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"e2c3b31cca501be4c71bf1c12ed8e02c7d583392","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7-renovate-eslint-plugin-jsdoc-30-x-29cf8f4a3e1a7f13f717a20e15e074758ca3c39c.tgz","fileCount":17,"integrity":"sha512-XCCF0xk1wGdMD3+sCRutc34w0LVs5IczV6grKNE3ZWvDOImNt6SPHk3FK1fGE6K+eo6BfFx4JxAX8XzaREaiaQ==","signatures":[{"sig":"MEYCIQDO9kPEAxj8QimQfqnvop+vgeftB49rl20jAOgH12XYuAIhAMoSi94rxAoHCbABx9JFkDRRs6pzyimdCAGUkZQ+wcr6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDwACRA9TVsSAnZWagAA8zMP/iwrFUC8Np18XR5L2DIV\nThBODzG5IRezPwA3m2Dqx+7/w7JNfXQs2s5/VloTE/VQrPDuoVdhCi//A/jh\n3+ceL1WC/2jJIGxjBal6ejh/zEsWsUPUUTZh6lONmWZNRvBOG7VQryBTlzoh\nTC0q8R2tX164ivUHx88IP2THHXWXIP1X6oG4Xd6wMTVzH0gY3Snl9oCkA2Yf\n7oPVSaVAxF6dqj8OB2uY0vjssKejOp+kuo7vpJga4ez3Vgzpmqa3Jk5c56KN\nBUg2N+8xDTlz/P9h0YXsZRJrZTGb3F1vnu5/Y0ECeHSjqTLTFOmMAqti9efE\nptZ9tBQFWI/mqE89nCD/QbINmBrnvu8irC7HIfg/UHPlmcU7N94GKdU/0be9\nIrCB8ygab8WR2PxlDojVCW5yMNQMtalmJyMJuavuQGQGNLJW0hkCidIQxTv/\nrqEHht5BBC2pw+wwoThy5cF0Hp2z4rDebiAUEYo9NMsxhbXQvz2Y3K14wiHK\nS3WG1I146q/sO0TLzToAoehCNVuNNyqmevuyyPCWLSCaf3oFovAzJ7OyZR2N\nBTTWokLo40yAndlmvRe0E4WhAzrbqUIA8iA/Ft0Cas6aoShtBv1fChK0GcPM\ndpTDvov6XkXFUZzuEwkBtQjQ+9TH0xnQnKqnvBNWhkgykiWYrhvMaq/LjT+L\n0P9d\r\n=050O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"29cf8f4a3e1a7f13f717a20e15e074758ca3c39c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7-renovate-eslint-plugin-jsdoc-30-x-29cf8f4a3e1a7f13f717a20e15e074758ca3c39c_1599093760473_0.6008475912564388","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.7-renovate-jsdoc-to-markdown-6-x-6c3a3a0d18e2f27d38161b81df49a9bf5cec568f":{"name":"@balena/jellyfish-client-sdk","version":"2.1.7-renovate-jsdoc-to-markdown-6-x-6c3a3a0d18e2f27d38161b81df49a9bf5cec568f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.7-renovate-jsdoc-to-markdown-6-x-6c3a3a0d18e2f27d38161b81df49a9bf5cec568f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"1caa858046aa48fc0ab9a267213ee79b07d2c7a4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.7-renovate-jsdoc-to-markdown-6-x-6c3a3a0d18e2f27d38161b81df49a9bf5cec568f.tgz","fileCount":17,"integrity":"sha512-K2FhwbdhC6rVL5X5dQOQ2ykHITHomrMo+rRxtSi5shRoBA/sDN8IdeIkri1tJK3Fnx9WqetRuyHcOESlbP53fg==","signatures":[{"sig":"MEQCIEtQxWO4BsiyQXY4JkXhEIMrFZdHKTMR5ZjLz6WeLgNPAiB3IWU/EitME/pO3PA7rSno5+LwHFH7bVfzkjcMc0sRRA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDwWCRA9TVsSAnZWagAArdMP/2LLt4ohbzCJwHoGHLhn\nvb0b0pLYhOhSQ9l7iMs5/gya1C5Uh4ZtvWPukRrCqvfe94U0o3285mcVbwlF\nOU+8MlOLziF5xT8r2U22GEfTMmbrsqjvtxcvJgk06oLPfvQCoGxlthVzI4ew\nU/UR8CW2bNqcxUyVfkvKJI54+1orrXQcn94cm3JB0jt3UBjClsCpU+ozR9Kh\n1wwKaKdlUEj45dZqnsIsVK3i9wG1NTJn9M3D71C/X1LRsKdQVdfIjGEzvIwc\n3cuFpg7g9jg9/7vJXim70W/U4rgR76cdvpd3hsbN+8A3mbmj30veQGHM1K3O\nGIhT3sEhKKiHT8DpmEhEz/NTgJvow/jr8OsMBG+4ryUaas6YfmZ+/GglPCww\nZsFupOmaE7HpYWiyXcnPmgakLvROkCRo6ZoMeOWzZSB3t7UsYpUS2bEXzebC\nWCiXw9wqRe2D+GnsuObfgesxEW9cKxFiW/0k82dAmdqL+I9YbtIzQA7NDlIM\nWwvVcrdOGJpTzJlZSF4PyaGbk73iJqUgydQfKhe21gG6ZJOpRpmi6BtV0Fhy\n++gt7QG9U83JNYpB8iPevGMNVua1ilBrlyFaXDOIsP36TPMwbhEEbP0aNsxD\nIQUSTTdiWCmXEdT5dw4bwGc5m1WHxWd8Z3J/ATdxwGzSrZnRftXcu+Wvcibw\nNEBP\r\n=Kl2w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"6c3a3a0d18e2f27d38161b81df49a9bf5cec568f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.7-renovate-jsdoc-to-markdown-6-x-6c3a3a0d18e2f27d38161b81df49a9bf5cec568f_1599093782045_0.06494090965098409","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.8-renovate-non-major-5f942f83f0caeb9799592537a55ff68a399bbb06":{"name":"@balena/jellyfish-client-sdk","version":"2.1.8-renovate-non-major-5f942f83f0caeb9799592537a55ff68a399bbb06","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.8-renovate-non-major-5f942f83f0caeb9799592537a55ff68a399bbb06","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"bfc802d35dc5bddc1cf0d23ec1cc227b437ed546","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.8-renovate-non-major-5f942f83f0caeb9799592537a55ff68a399bbb06.tgz","fileCount":17,"integrity":"sha512-jeMKQ9dl6UJnogG6eMZSyWJyAHrk+QfTAX9IMImPwMKpKjEqziaT2AQPtL2sDZChgI+c/gjhVaYcZatWzPmcbQ==","signatures":[{"sig":"MEUCIAva/bWHgGKaf0q8S2dgAPJelFqDSkTXXZmVYZ+P2qo7AiEAjOGN3w5aSFqnWZgjhWMfa5loRUbWGgfhMTspp0TSij0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDyNCRA9TVsSAnZWagAA3oMP/R2R3fzt1xDQv5xqYe4G\nLRqGu7Qn7OP9C2/tTRgOmyJqKrXrv2wit8wA468aVhCuyWQqXVeRk1VUXK9h\nYwJxVDmK6V9T7qOLlpND1BjvI23yPHgLhlyLFrl7/EZCsmLc+jLP9MM04K/I\nGxAOUT311IlVKootTNmZKGosuY8L8xyu3S4cM50rP6DJOEZMOlahDpwToHXk\nFdtuEprLIan8AE1vFkpQhdz08hwedOsYil9gX1biwCBoEdoN+Pc8NFdCpZuE\nlf/4S4LNJvlHvBx9BSFYacwQkKB1Y3fbFc5Dpjcwe2upNA89zOfoTUS5R5ya\n9y7RRFQrzuuu6c37DxBwuRXNKXoKTOYk290DH2ep8zJvTDi1c0gv4HPWwfDV\nwxyG2iKP0bOIBag5ztQ8bDF8nHqXVVbZaLCaAJ9e2DCe2wS2yh+L61k0ESSc\nvcTS/XTbW2WMivVbhoxQVwsoMG9QxUEKD9OD6ssPZyVbEO3pX+rZczc72OGm\nDbz4QWyk/J8aRfnelGxzkoMniFzuTWn6sZjSjLvKvZ2ih7eku56uPV6mDlqC\nZpX1VldUOrROCPhQnCC8iFWtAvcLbKal5YB0ymXp1pOpC5tx9BoyujWWeulD\njbZ1req6wrMDNy5XxCAOAj9+75vd/aEPHoLR901nlwhFpAUBD692wVpRs3nW\nV8nu\r\n=Up48\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"5f942f83f0caeb9799592537a55ff68a399bbb06","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^6.8.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.8-renovate-non-major-5f942f83f0caeb9799592537a55ff68a399bbb06_1599093901063_0.5393896390423683","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.8-renovate-eslint-7-x-c13e8efcce66e6eb601fd379e9a63af777b6ed6c":{"name":"@balena/jellyfish-client-sdk","version":"2.1.8-renovate-eslint-7-x-c13e8efcce66e6eb601fd379e9a63af777b6ed6c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.8-renovate-eslint-7-x-c13e8efcce66e6eb601fd379e9a63af777b6ed6c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"24165263b64aabfafe3522a3cf27b500ae002bbd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.8-renovate-eslint-7-x-c13e8efcce66e6eb601fd379e9a63af777b6ed6c.tgz","fileCount":17,"integrity":"sha512-c1JZIUWKHTc4cLEKhQ/cxZNhe63Bs2HslDEj0aIt1AWuvtfXBD+eQyprC0m+W6wONN7d+SPYro2JkbfqwPhCdQ==","signatures":[{"sig":"MEUCIHCPnTjhZku++7IKvoyIXq68JoFdQEtOUZY9n9f52umDAiEAk6SaIsoN+CmuriNnzJqV4j7YGZMl0LB8y1gBNFmydnk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUDzNCRA9TVsSAnZWagAAlw0P/1GANNU4eUo0mjHkOoXG\ndDmhwETk8630KFmk3Om+OZyK324K9fhyiEuvtgD0snOA/ZA1+DolDAgabHgO\nvENcNLoZkinNcSPw2GUIooqM8PAtbK8dFXcfc+reULYntnILIwGxpmyxd0Ob\nNsxukORvY/Y8MWqriU1E5Tib0ONIPsiZ26IJcp92ax6XfeT6v61Vp8NTT3Kg\nO6A6802xBdFCyK/6itGqwxTZS+za0A5+YpKJPDcDtFtronhkHBo0uw6wrYkA\nxIA10YxzvwF7RG9/dh4i6UFQ9Wfv+fj4O3K7jwQL7eMSlZDvjmuK297WGsWB\nhN+BvJiQlouI7xJavzG6reOPqD+kralwCYmScXMt3063UcWCnVIq5zb524wf\nNS0E9GiYWt+j6XLfvDB1+tomAv/i/k64PrBfIA79JqyL3hPyFGWTXF5BOtpO\nYpyX7n3BG7NuBeJRsqP3TWB3tRg1IUfokeLDUS9oFDq4ATwPhioXXHiA+ZvG\noBPlqKGWkSnPPukovR6U706Hqrpz4tuVNtaLaDNtOqQA42h1TSS2X5LexZ7k\nsORztJt1sKxKXWJD79unOg9YxfjknWDMmTk/zoBbufk1jDR39RAoZeHGU372\nsWoKp369JV2JrUsKOWZbGUiT575Py70OJasbtd0KgXWAglFMpTnwKTY7KEoX\nJoKv\r\n=4X9x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"c13e8efcce66e6eb601fd379e9a63af777b6ed6c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.8-renovate-eslint-7-x-c13e8efcce66e6eb601fd379e9a63af777b6ed6c_1599093964926_0.1540301758748115","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.8-renovate-jsdoc-to-markdown-6-x-85e4df6c7203b80184c5663c3d777dc8090684a3":{"name":"@balena/jellyfish-client-sdk","version":"2.1.8-renovate-jsdoc-to-markdown-6-x-85e4df6c7203b80184c5663c3d777dc8090684a3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.8-renovate-jsdoc-to-markdown-6-x-85e4df6c7203b80184c5663c3d777dc8090684a3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"8cb0f4c32014ea3cb68cd087717e31e1d4ed3425","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.8-renovate-jsdoc-to-markdown-6-x-85e4df6c7203b80184c5663c3d777dc8090684a3.tgz","fileCount":17,"integrity":"sha512-KFff8/9u9dvcuF/UpSsPS1Z1B6vJh6Xg9bA6iEyGM7+75OB9JCC/CZWEhmxwNAInYdcHSgldIpNad0eGS6AIZQ==","signatures":[{"sig":"MEUCIQDA3EMc+CUkUjwflLU38rjdd9g7NK0WIAXKy7ma/UNbWAIgXd6h/C/be7EhEpNAnO4iMgVvLBiPbwENhKBdOYxh1JA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUD0QCRA9TVsSAnZWagAA67oP/iR4h9uMXrT4SOv0s1BD\niM+KssX+rs89wo7GfwbMnMkKrAAH0hDfKAi+bGzapXOe1/LFAyDJp/uqXU2u\noBlActgumfAfMaeOPUyII9j9mfQakf6bYPzRpSITgkwFN040u3XVvVCebJpY\nb3frHzqp1FocuPFcHX/orIaNvCnfqngvtZS9zP7fffPI32ZJpAW/9NyvSEdA\n9pPsTSAiAcFYJyuEBQOVkHdjXGqQpFTqKDInBLJMVbxWzuDQ74I759/RBeyt\nqCTZN8avO/RkiD+MdMa09ng9WpW2UjUUqyQ9shzPQjPoT2sJphbokp3qUt2Y\ntzce/y10tFmqOBaXsiATCZw7ubMuVMAveQWalQIRnlVX4Su6iFf6MKPecKG9\n64V49OMo6PLHdOG/MzvrpjrH8KaLppCzNX2Y7MXAovLtwVxZvhH3UJWEwLGJ\n9lNrEK310HPtlLR5NYufmYAKHcE5RYttlmZON05skJpd1LIckHxA+Qpes0Qn\nDjMvP26e6gOK7ZXaZ9vgtnuWHC4ipy4oRfJ5PTAWaJKDDofWn3jl3fmsxR9A\nWAgHFnxBGhzU3ot/ecbIdHorSsIhV+q90KiJJ/saqVgyqu4sALj5eqB640i4\nllZY6sNRTXBqhS/J68XUJLzJUsKw11LP36ELmbiZOIcrsuOhUCxcrXgRQrNg\nvSCH\r\n=4Dfq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"85e4df6c7203b80184c5663c3d777dc8090684a3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^6.8.0","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.8-renovate-jsdoc-to-markdown-6-x-85e4df6c7203b80184c5663c3d777dc8090684a3_1599094032000_0.2990150011580701","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.8":{"name":"@balena/jellyfish-client-sdk","version":"2.1.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"1718d1284254ab623ea1dbc64a64785d3bb0cf59","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.8.tgz","fileCount":17,"integrity":"sha512-LhbvIloq4cCf4/iXuKYw8/58kvGL0cEVGeb/IDdZ6bH6DDTylKKTTtj3LhtyizL3UIihtRpbyy7VTWjOv843JA==","signatures":[{"sig":"MEUCIAnjMoIy+H/GrzzgSDSlmgJDNpP9zL0n5f2INZsg3eIFAiEA+bb+S3ZvypEXpbOVsV2nxG05+w8fz7GACQNps5QcYAo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUD9NCRA9TVsSAnZWagAAg/4P/AmPbbbEoLM9oxCBk9p4\nKjIAjMUq3QQAJ8jm8PmFKT9o4fvWQ+Cb2ufBH5uy0D6+wQxMWKiZqvkREMLm\ndzJUEewfqStlbMRht+h+1en7EomZmPSbbaYVPnd6Cf/WMTmlL7JDx6g6Udgi\nD7zRrQQhIxTGHBYkvjgc55NsAYNFElv0rCa4LD9KlKaFfhvFd9Fr4p/YwNJo\n5e0ZDlcGAv7+c1sX44LYiCOjBaWG3adS1NUq6f5G/c8wAMK/CLVJWmNdDwPM\nVGJJ9fWKi0C6/Bp6cFSwYXKEAS+xu/QvBjKmlgvOkK3p4DIuxY4lf2Rd6ro0\nRh3X+LHXHh8MLtxIzfrO46lwy1de0zE38JgUn2wsewqodDIrAEnJEQwB+kx+\nq4PAQgs8cHrTv9NsHrJqwQXF0ynctbKY7tEvrRExcWPuRE7CcTWiFKBNHpif\nolnJY1ZuoqCfRnoTkwwQVo7/jv1nBaxVeFbTGhAEzAv5T6wBQGfT91STYxcs\nch5ufc1A4BVvNRUXWweO3yMh84C4mwDsFLLQyxcjx+yTTTvgVbVYP1p7kaGl\no7nNz++nOI74qACcn1f1qqgBcQCCHijnfnfboPKlVfD9neHCGRKgyrkFxDtn\ngrOUwMk9anIGhQbP+eo8BoLMJAtxggtQXSj+n97sWTuNVHO++IC43oO1O1eF\nzY9Z\r\n=kkhp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"96f4138e3da309e0cd9facb458d32e0ca8b1d414","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.8_1599094604843_0.500031816701872","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.8-renovate-non-major-b6358aa8f8edd5eb9bdabdbfcd4d9604c7de984a":{"name":"@balena/jellyfish-client-sdk","version":"2.1.8-renovate-non-major-b6358aa8f8edd5eb9bdabdbfcd4d9604c7de984a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.8-renovate-non-major-b6358aa8f8edd5eb9bdabdbfcd4d9604c7de984a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"7c1fbbdd5d77538276849d6c04748feb8dd18526","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.8-renovate-non-major-b6358aa8f8edd5eb9bdabdbfcd4d9604c7de984a.tgz","fileCount":17,"integrity":"sha512-UaWmEocOOH+n1fo6q1rG72Upf2jUEybZO2fAClbCStxto37XkwV5VzC3cNA+kkW8vv9nI9sUAQndqGQXoxS+vg==","signatures":[{"sig":"MEUCIQCGXdTREKMLQM9XGwS4jY4cuLImthCX5ewnMRSlOdrlSgIgCJtRXakYYP9rEu6iGa0qXcSVVahOluw9J4qD24fzj7M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEAZCRA9TVsSAnZWagAAAtEQAIevwyjU8A4qMgFBTgCb\nWRXkTbmJxRms2jpVx86Awi57evi8TPPirdd2DRKGZRbsWS4C0O63wPmqex0v\nRAZZIMBPn2YZswS0leVfvSndrabqWQPkoyNQkuh2pUF0ZZbTSA/v1q3qF/zP\nCp6bRH9hfJvW4G4aK+rwfi6kyiAMrt8CKN1eVgWB1ghv/Js2PQKEHMQQVk5N\nMfUrFHI6FAk1q/X4GqRFIkQcec+4Pl+RZC/L8dWQieKlepXJJwgOfo5BKaGJ\n4poOVh2CLV+snVeQ2NpEhrtLivf6+dajwirPPOQz7yGt9yPnTrEP2uW5GJ8v\nDOkpHbXZoyNUvzha9sApnlGYyq259s14AK1GZVfWbmm7BEkfhXTbmqrd3djy\npHWObuwulfYHWdw87h333jwjPdKnWPOQQFAbwnArFMQJBpyOHZD16c/+Sj2A\nyJhXydmflOrePCUhPLRBtmk5sdo6LepLZ7xeyK+1gPNjxcBSKmM9xybREDmf\niRVRSuZht1Kzvu8xj1h/2EG/HgUdgwmJV5UwX/Wr8I1m3wWyve5ofxNFMyL/\nzZ4tk1dCvowP6VQmfAO2E3Oeovi4fC3y6+vyAtlvlz+nIfFXnzYyrShsEsbT\nhim0cFJktRYC7TYFv5mNG+sX51HWeo2+iPYis2rVx8dnwQBzrYtDG7L5ptAM\nUXCV\r\n=BWnb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b6358aa8f8edd5eb9bdabdbfcd4d9604c7de984a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.8-renovate-non-major-b6358aa8f8edd5eb9bdabdbfcd4d9604c7de984a_1599094809057_0.8550043647155761","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.9-renovate-eslint-plugin-jsdoc-30-x-ed4d34d14395dae8bfefbd30f9ea81d2e3d9ae93":{"name":"@balena/jellyfish-client-sdk","version":"2.1.9-renovate-eslint-plugin-jsdoc-30-x-ed4d34d14395dae8bfefbd30f9ea81d2e3d9ae93","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.9-renovate-eslint-plugin-jsdoc-30-x-ed4d34d14395dae8bfefbd30f9ea81d2e3d9ae93","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"a38305250a1a710b5668a3283c21b9395d94dc78","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.9-renovate-eslint-plugin-jsdoc-30-x-ed4d34d14395dae8bfefbd30f9ea81d2e3d9ae93.tgz","fileCount":17,"integrity":"sha512-0go7+TNQBekQcA1aJ/vqOkvVXIuCzay0bYdRlbhb4XPtAecFP8fhjr2DDZCT1UXS+W/kd/THRBJ1lrrLe2DqxQ==","signatures":[{"sig":"MEYCIQCYvylVGMN8Q0cK4z4Xlh+VogvuVj+Jb0JCRYZgY9McJgIhANwTp2GD7iIn8kq6U9/VVt06KG39I64yNlo3a7kVFsAq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEB9CRA9TVsSAnZWagAAbysP/ihi8nXd6gWWt89Y/PbL\nSDRbQ07GosgHV+6Z2bUUZx1INq54ywCAMA3DpvUs6V5NR88zrUAPqWJ3hOnx\nf+lBcr1iXh2XWdE8lGIvyyQAbNIMvsqBotTUk6V6ZVTQw9xPA+x+drWNLc8D\n9HIUXo4oEieRujL+YvEQsQeXthiELFqeb7kPJKWJYHZDHR4khWhYl3OUPVQ8\n3lyWq6sIlH8+IWDZzLrrQ63UXFJTPUwSz41gtmOWoegSPsbjIepnxUaV/xNO\nXwGk7UkQ+q/9nazdZGuw9KrFQuTDE4xUHKiNzXLNkFY6O3UMmna5Hp/kKz55\n+nxl/x572m61DLJ/J7ZdpbqpjKbE0UKrOktb2rVCiUckxhTDIpH0mr1Rj1Zf\n+DJrPPlbGnp1BFBIOVgXUzb8YwyJ4DWGpZBWRpYbtTBNkYN5A4vLKmvEkv/Y\nJBz0jq8HH+wowTImyL8hx698eAkqyzJshhSsnGJYdZi9RmV6D6Wb4WmywVVT\nw/ZQQPCNndF8YRV0wdD1EXpaEb5JtoqGGcF5m3yuUQ+SqvDF1m7PQ5Kgf4F9\n7oLX8Lld83TomsO3dvfqfdH+evr7Lsw3aphDYUG/Nr2MDyXdsniqDm9molvp\nOi38SWFjAdT5MKBSkkPHW7W0rK2rChjdtPC8qPOt++ZF6C1rS/KXGunr6KhF\nXypQ\r\n=i+Fw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"ed4d34d14395dae8bfefbd30f9ea81d2e3d9ae93","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.9-renovate-eslint-plugin-jsdoc-30-x-ed4d34d14395dae8bfefbd30f9ea81d2e3d9ae93_1599094909430_0.8220697936733425","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.9-renovate-non-major-51ce5c4723fd0182a1078531651a4142f8eef959":{"name":"@balena/jellyfish-client-sdk","version":"2.1.9-renovate-non-major-51ce5c4723fd0182a1078531651a4142f8eef959","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.9-renovate-non-major-51ce5c4723fd0182a1078531651a4142f8eef959","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"b3eb7594c21e2b6612eb67f31bd66c4132c4f5c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.9-renovate-non-major-51ce5c4723fd0182a1078531651a4142f8eef959.tgz","fileCount":17,"integrity":"sha512-q6L9D0jv00vHPS/j9P0a0eJIBvEeOdNgdBxiwGpMKvU+JsC3WR2pnoz4GCO+nPdMO6yg+Ia3HzpstizDKyoWDA==","signatures":[{"sig":"MEQCIG2K18nU/0+jKjrQRDMfKwt61Vr8uMpj1zYKEITkVoHpAiBltDzkTHWPKfO2VL3is2LfJpxEhDgBRO7JWNJVq2u90A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEC6CRA9TVsSAnZWagAAwEcP/jpZz+9pJuf6sK0fqc4c\nPDEElpKJ5JyaF3lMJCPNuDbzthYT7yTvhhxVO0WjA2ErNIbe3DlgeNm/mDe7\nXnxmaeOJL/FgI08xXkgb/+s70CS4YPOAkeZW+CYUzgt4FA5IUsRqxgDwr/d4\nix1gx2wHQh+lvD/TsNIBe8cTRFYkYySmFVda9Ie4AgKBurokyOSUGp53CiEQ\nt7Ub7d4Bch8toNb7TVJ2/RD3rRmy6ncGeBeaeBk/ue6hS/t3lnpjj9GCLu2u\ntuUY+pqwg2YCye1pgYSu6bO3Lowds5qxfbYCyM5XNiG4Vxg9IyhRmUJBxRI8\nlQRNCU9lr7N36LKzFzL54Hr9L1h7XKcgqfxxje2KUaaWSwI/8rYGIsrLtQ/1\ncPXgvXkbeYKe6bIRbwFqvTLkGt7IftKJE9ZyQDZqKdOp8WGr7nwF3znpBfix\nN74KY6xfXFwUg94aygo4a+n9WLjZrNievp8wQOEFwyYf/8VZ6KCaDwPZDDWg\nCq4G1ybKlXffH9jDq3XvskhmHlobXPlGQnFkSXC7VccYt8otu2c2GizAZTCO\n0eFCON8+PjQSBFmjJ3X/Of7aP4U+knuep7rmmNSdZkc5u4nmRVTce3EWULRY\nUdbFM/hva2E0y8hUp/S+HmjYHRMD8w5TZ5yrRewx1UPu2bTwxjyHArlwfp2u\nIxtR\r\n=2Xlj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"51ce5c4723fd0182a1078531651a4142f8eef959","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.9-renovate-non-major-51ce5c4723fd0182a1078531651a4142f8eef959_1599094969912_0.4679446218944048","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.9-renovate-jsdoc-to-markdown-6-x-663b22ec06781464d12881cd91621bbfde3efa8c":{"name":"@balena/jellyfish-client-sdk","version":"2.1.9-renovate-jsdoc-to-markdown-6-x-663b22ec06781464d12881cd91621bbfde3efa8c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.9-renovate-jsdoc-to-markdown-6-x-663b22ec06781464d12881cd91621bbfde3efa8c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"844487e9904cc06a8ee1de270c61e04efc2b9e30","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.9-renovate-jsdoc-to-markdown-6-x-663b22ec06781464d12881cd91621bbfde3efa8c.tgz","fileCount":17,"integrity":"sha512-OAe5I+32eG1jIL18Z9VCjachsa71TuNXl6QlHHh+PBcJdQ3AiRwjwFVIO1GWP4ajvCx0SWouta+Ni15vUpA1AA==","signatures":[{"sig":"MEQCICmYUQRTEYUAucFn7gNl47Nf0br64RZh4TGMURmbrauwAiAjgJq/87Q/w4X3zn2EqX5P6pjC44V+5g7S0XUdGAVDNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUED9CRA9TVsSAnZWagAAyZEP/A/lrsUG7oY4KHoTVqhi\n5qpXGz3A2yuQ+7BI0DF2LYdpi26MONk5rxyJZtU6goovWbQllDukzhD2Al32\n3abiKioOiRf/ZafsTk3dxfgQfGmSX2whYQ7vdbHVMU5u3y4/Pm9P4hoJJwFx\n+grCNCKRIf6RrqoiXlItzCKh6W/TOzI3IdPMe0skJ67JLWLhB1PDIMhgzEbw\nej2v8tgs1mZRqR+QVDUi8YSXCXeOTDbslctFmgrRPhuem37aXYi+tcVNgOX2\nmDL49gP64+sPs1tk6KTvg7nvkhENekmrNeOqw5hJMfB7mqS2ww/eaXRmsuFZ\nWFwIRHxbHbpKW4RkFS0AMNrUwHF7418XYgwBGhTA+QpLtDXNTBx90plEc7RR\nvzdGOyn+bjv/ACpDNXtb4ExcGW6Iy6ZAEY9LUIMtPi7jutJyK3LhUJVoBgC9\nU97Tfyf0ZFQZt519srQPBtW3miYFrTre8GUKcukkp6qt0CI53JFXkhxtenKt\n+CzWBf/Hq5uU/9e6LOEGaJIutavyGDreMvjIotrHgOz4GR8ewZweLS4kdkC0\nFGV93jaQ8IvgedVBL0YCe6KI+KxdeX/87Hz1Z/cvEFQUWUD6U9jn9Dplh2OQ\n+tAa5VM48gJKrcWdcZoA50F4fHefkuvad0DK2w0e3QgohSa6PG+/uwb5DzIk\nunZq\r\n=5Oam\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"663b22ec06781464d12881cd91621bbfde3efa8c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.19.2","isuuid":"^0.1.0","lodash":"^4.17.15","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.5.0","nock":"^13.0.4","sinon":"^9.0.2","eslint":"^7.8.1","catch-uncommitted":"^1.5.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.0.0","eslint-plugin-jsdoc":"^22.0.1","eslint-plugin-import":"^2.20.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.9-renovate-jsdoc-to-markdown-6-x-663b22ec06781464d12881cd91621bbfde3efa8c_1599095036935_0.7267076309710483","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.9":{"name":"@balena/jellyfish-client-sdk","version":"2.1.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"ec8fc4463504720175e516d9a68eee0026c5204f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.9.tgz","fileCount":17,"integrity":"sha512-vkmZP+GOSYle5pB8e8MMmW6cMFca1lwRkG7397qmChNASq7yUO744moGs1rXJrrLhvMVDHSUjxlMV+qOhj00eA==","signatures":[{"sig":"MEUCIAl8ib2SZ2GhKb3FaNnq1TMtBqWj1eL6osT1sIMAEPFoAiEAsbe8zAMHnOH+dwzeT/S8rSaVeUu5wNmh5NjLuwq7wQ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEI4CRA9TVsSAnZWagAAR9gP/1dsNKrwFciPXyqJxYwU\nh67H/TUjsqmOHNF2RnoBn8gyAkOtFazYX/GfM7xQVrhR9yAcDQtbJ8qE8EOK\nxP+7oPXTJZBUngbiVYcru7NFar7xtgDEGGDPV25qr6SE3Pg8CT5+tbXkM2ae\n4MPoxCdwSkvqVOENLy1DXTEjrt/KC1SX2alXZqr2IhGP43C4DobgYftYz5hn\nDlnrYauIt8KFBZyNB28CpHJAMrzGC8tQUFhnTHd/h+1TI6kGosPRChAtscO/\nNkWhfkgx5Mla+jSHXb3CvdtTt0L98r7kHCxp54VXQcN2f2mIMiai6cau++tr\n+wPhWW4UAtA3hQNi9M7xulCRp5pb67K6JVIbl/Y+J8BEC/JfeYctHg0lgd+T\n05qKgp90HK+fbw2hWFkx2QtIsAPRlhU9+hqdCC9zmhu2IRc2VT7cC2jDflkh\nhyWjF4A0TkgF9X1xnhkAYh1Bpsj/XPM8ZoRV8PaVcID/x+nyGEr072+c9Dj4\nCVzSoIHCwS2U7TiIvls1IxGwEIcorNiufiiT3PMtxACaymUaFO9WMSCJ1+3p\nmvgKKEdhJQxznG34GbXSQmO4isTYAFrlL265/LPd3uAPpxfyr9crybCatK3V\ncKoxhQ5Qg5OYTGqn72mWOqsoSCvJuim0yLfoHW28a25CYc91PoLbf69SX+L3\nUPIt\r\n=+Y8B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"8bd4203a1535976693ea7202d6bd531d1febf3a0","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.9_1599095351520_0.5310778369655857","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.9-renovate-eslint-plugin-jsdoc-30-x-6ccd75ed0f42abdd21aaf06cd8ffc2aad497274d":{"name":"@balena/jellyfish-client-sdk","version":"2.1.9-renovate-eslint-plugin-jsdoc-30-x-6ccd75ed0f42abdd21aaf06cd8ffc2aad497274d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.9-renovate-eslint-plugin-jsdoc-30-x-6ccd75ed0f42abdd21aaf06cd8ffc2aad497274d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"596756194e8759d41cabd7edd29dabf403190339","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.9-renovate-eslint-plugin-jsdoc-30-x-6ccd75ed0f42abdd21aaf06cd8ffc2aad497274d.tgz","fileCount":17,"integrity":"sha512-JsXNpY/ANoTaiXW+B5QdwJKiEzEHuURYyCH783RZxkRduTRNdYOQ5QdmYUvh4YrsuGJRI2kiGe1ayOIFHWfrxg==","signatures":[{"sig":"MEYCIQCH2pmoPiC5cWo5DI0Ukd1EC9cT7d62o0+CwAQjxMDIlQIhAOv6JX/3M+28dtLFI5Rk0ez3m7yLVFVEHFSa8mCENGWw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEJWCRA9TVsSAnZWagAAAUQQAIAdr2t6Ju3bzVWpPOoH\ns2IvWn+qmvPi0HyAUIvGz8DqENE1sbna2g3i7RzOT1LEnhEaMMBJbPaRB+G9\nhOdyafntETy9uVvmXd/uCShXoCcoisIqBcD59SzDbK1m0dTbPLOvaAqsX4l4\nUQawJUTZpEv9O2iQA5x9HIgnfaOC79At1twWd/vw/plH7tFw1vuTaB8gfLtp\nI5s39oajkVVUaIGIYsEATsDD8FAmS8CIFLAyBHs6Gw0GV3G7P2ImO/v9Wrzy\nn2gjss8hNRfRQaIPlAz6qRefMnWOFVD+sxOi0wkwBiJTIMRasyPRCalo+CWP\nb02pCIv00A2nkk0Rr++m3r3JttBkCFlCd1bj14MExn5W+r3SN7br8W7zFmxp\n1ePrAlR0J8WOOqYD91cLBVHJDx/nuyPwgKFFz376Zsr3guq+d5lHRQeOynDA\nJPUvpQr/40WsYqXcf+niQHYZnQ2+CTWeh0j/oBg6ntDMAZbws6sy2rIA/Hwz\nzoPCNjZL0BfkhwOAEfKr/MpiLKz+bVVbUHH/QfVjwxgdfjqVVuj4flxnrhkg\nzl4ZnadlIlrkobfBWeDUuLgzZsxkg4tj+4qLBhZBxUdGb8PafU0xS+WoX+J1\n7fcJEJPZHn2V5GNGWhdr53lU3ZygKD9wqFzjwrfKgESqcMfwQdbXbiUCfCAS\nGOQU\r\n=/BUV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"6ccd75ed0f42abdd21aaf06cd8ffc2aad497274d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.9-renovate-eslint-plugin-jsdoc-30-x-6ccd75ed0f42abdd21aaf06cd8ffc2aad497274d_1599095381930_0.1813432104153303","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.9-renovate-jsdoc-to-markdown-6-x-bfe26d2eb019a495ec8f0fa6d258c36c58f69c35":{"name":"@balena/jellyfish-client-sdk","version":"2.1.9-renovate-jsdoc-to-markdown-6-x-bfe26d2eb019a495ec8f0fa6d258c36c58f69c35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.9-renovate-jsdoc-to-markdown-6-x-bfe26d2eb019a495ec8f0fa6d258c36c58f69c35","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"f01d45ab72a25bc190c0abe2f2c7a1bff8d71c86","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.9-renovate-jsdoc-to-markdown-6-x-bfe26d2eb019a495ec8f0fa6d258c36c58f69c35.tgz","fileCount":17,"integrity":"sha512-yKlh+9HitTnU+16iUENG89sH4qY5py0Nve27mBgg7201blUMclsLsi6ajhCoHSNhmJL58qwODreSavT0QoZ/ag==","signatures":[{"sig":"MEYCIQCXoOPSyKe1a2pmLwkpTq+PPZ/YhN20DobJDbg+pdPVWwIhALM7wF/HzBYQR6OzMjgrl31xSemIpP8gUUKH76dj/bEw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEKMCRA9TVsSAnZWagAAWfIP/1q+myXQOQQUDOviOdWO\n4LJMjVitIqbXOSz9y7jKlsmnaSkQZYXIfKtVk6I/otFfBgHuhQC0PExwHRTs\nOWwGwq9lM//oQ5hFIpRJjltX2FFBR3whxj71lcDff0i4SKth5sr5HOoCCY2u\nHTeh9zVlj1kf1W8CEqUtKQuOLMBTuWtqEEJXgn2r1MgX19fd3jGoSpAiLe95\nPD8akIxJanyUebe7IBDD8lOy7Q4jKkABqBhoLPQU5/Fuawl/0+fQGzvxXe/9\n0hWBEWJQz/WnhhkaH2RxQ/PCJrRozCGDMbxw3U/AD8YAuaPiwWUBwP1ObIfR\niL7eCPKslbyzekwKmBrqgzCWjMXOyMxCBQ/I6FFUXZFWKStOf8Bz46VnHLF6\nszvQeKvdtrE3B+tBmidw1EtTSNn1xTft93qho/o6KcMxeZdZA0nJXr8UzPb8\nGm59e/4G1AZc0X6opGO4CdO1EjFxEPWfGzSf1kfSjQeG119jKKt6F3tclsyU\neygDMTMoEpUf2tefyXNpKYszwE83uFfvw1yMUgrgLV4qBI/i549UuoYgrvGQ\ndtO74riLhr4EuuVMGoA2mdvcAUb9ZthRTpBDTpGXQwLc4Hjios7MbxQ3ko4P\nuhKdBjhiK0PWexhqVVz7SUMfv3VzXqeFkjP+b9bRwFoCRfRSSqIkqsJGjnOb\nFwAK\r\n=SHao\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"bfe26d2eb019a495ec8f0fa6d258c36c58f69c35","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.9-renovate-jsdoc-to-markdown-6-x-bfe26d2eb019a495ec8f0fa6d258c36c58f69c35_1599095436420_0.277496538783941","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.10-renovate-jsdoc-to-markdown-6-x-5558f66d60f8474e834a74e31b93de9a40e6eb8a":{"name":"@balena/jellyfish-client-sdk","version":"2.1.10-renovate-jsdoc-to-markdown-6-x-5558f66d60f8474e834a74e31b93de9a40e6eb8a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.10-renovate-jsdoc-to-markdown-6-x-5558f66d60f8474e834a74e31b93de9a40e6eb8a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"2c4584a5ef5ea5b89f2d099aa520bc0a8f92cb1d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.10-renovate-jsdoc-to-markdown-6-x-5558f66d60f8474e834a74e31b93de9a40e6eb8a.tgz","fileCount":17,"integrity":"sha512-vcc1Hh4nKsRqPGdT8yzmm5Hfx6ggjcH3ZNzbyd1ksBSJky6qQdoe+LW1cCpTKnAY6DwJtp52momvDmotUC8gqg==","signatures":[{"sig":"MEQCIHUDyTzfNaaNoczAyL/iro36zSnFwg3HWhaZn9tnL+VvAiBGUuUlVW3auxewOAJ4P/5Id+aDU0UJXwW6zVrQsPmn6A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEM8CRA9TVsSAnZWagAAqR4P/0wEWa4zQA7CUJxWFOn/\nYOE2NHbhPIT+KLvEAwhWrkGxt2uYXtyd5gx99GB1/Lw0OkZWzoU/ZFOXMeKx\ngMbA4cIMB+A5dvyNIMaNp+QJNoqBmRrSVoty/eu+WMpHroiMgUtbIXLRZ0eR\nyfmOFs2wMB/9qL2Ni+TvPStH1tT7Ehqlc97nm3nlSjf6G35TgXIKv4VhWLab\nOhFSPqn4Z5nKBN15zwbuh8rEfA/gAFDxmlV4FF5LAnXEFDIX0v7dBOioguaK\nZa8cMh81qYiK1W48La8DnEncsVxvkG2INMrLWbdqjFw+cu5T8P1zztJFM+lP\nWEdlOwnDiU9unmnB8AT16oOjmOlEHwb8tmwNb7AcGPRlDe/RnlK0sJhbvu7X\nsUSeIq+TOr9BxO/FAr7eoZbdcp54DEafV0efnDUJC0kjG63L0pymDSHxlOMj\ndoJf2be7PyikDaDggomCI3HfI5OEwmVS3pEqdV//3+0BWIyQt1l7KkuHhewZ\nysNErj/7Obk+Swo2pNOak0oSCMtiINxkNkV6rMNv6JW4QIYox37YbMgmRcKY\nIUEc+38Tp6wG7MabJBsVrQm3ci3nCEbFkHDqlJnvLEJjsEMugscE96yH35uv\nO8lZGMsPijj27wWOUVwx8llHhsd1JBOcvXdNVK7awvj0vCCZQIj7bI6ogODX\nqcil\r\n=dBcj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"5558f66d60f8474e834a74e31b93de9a40e6eb8a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^22.2.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.10-renovate-jsdoc-to-markdown-6-x-5558f66d60f8474e834a74e31b93de9a40e6eb8a_1599095611956_0.6825575473157486","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.10-renovate-eslint-plugin-jsdoc-30-x-bb0ff8da87c32488343c9a70177f2360a2f2aae1":{"name":"@balena/jellyfish-client-sdk","version":"2.1.10-renovate-eslint-plugin-jsdoc-30-x-bb0ff8da87c32488343c9a70177f2360a2f2aae1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.10-renovate-eslint-plugin-jsdoc-30-x-bb0ff8da87c32488343c9a70177f2360a2f2aae1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"19fac74f703019d7387509c61ae0ec8ff326016f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.10-renovate-eslint-plugin-jsdoc-30-x-bb0ff8da87c32488343c9a70177f2360a2f2aae1.tgz","fileCount":17,"integrity":"sha512-Jn0y/JB/zJb5Hmi8tj4poh4zyRLfVoqVdRpAYSOkXqSt3XBPU9R9xbLnw5se1m02AaaXLU7AK76Lj300WAF08Q==","signatures":[{"sig":"MEQCIHpCeH/6Tsgxwlv8pOGmeR3SITGqtNOtzmuq7ftUCAGUAiBpi2gIbDT0ehcTywM2X7PNwqwcEid12oTP4WV9XpPdzQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEmGCRA9TVsSAnZWagAA/fgQAIR58/sV76YkMIp1eC3t\nMJGGK4EA8DmragLMbdQMBBUQE1zRuzu+M6R3Us6zcuXqOD1omM3+v6C0to9i\nQnPO5g1uxUEF96C5UdUd9EJEjlq146buTqU0O7y54BNUXNWciZA/IRgGTsJK\nHjTZSW146WCoCI+CuJlbxeFjgWvcG2vJNQ5+om6u9AVXRLnKRhiB2GWZ86b6\n2CbCQ5uN8dCVugmF37PbRI2VXvHG5e3UNY8qUChXI9MWiDZuk6GsxfhRUZ1U\nJxjTmuU03gzrZR8lJnS8nowaWJdaMc4+LUNuBJxOYpc56mnQ7xQzGlRSRi6v\nnQvvm5zM1Anp8f5VDjufDWYF0q80XjFvXoNj5azKuXG4xUNDC4qF1XiATaEj\nG1vHFyW4cQPw6xeX/ycPi79Vf/V+CjWzcaS5WJAtDApP1Wp9Y0zdlmTRNZjL\nfn2v3Ouf0mxReKze6PGf02jRnMGyj7KELWayuT/yaBkWvHhBu4zLTE9xbJD3\nYmLF5AFIFVpFy4L9s1DZyPi/40QMgPrg3Lnt4Yk/5XUluejxQEqbFFGGuGFW\noIIONQimFxI6QeHaCvRKDeggYagu6oAgcj/F6sHtHIPwSIiDqULnLBp+DxZx\n68SWmIxo1BqeLf1+IulM9w6MWoqS45bvZuWF/7uFcML7OEBNxHKiqmoVo+nD\nKm0Z\r\n=L7U/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"bb0ff8da87c32488343c9a70177f2360a2f2aae1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.10-renovate-eslint-plugin-jsdoc-30-x-bb0ff8da87c32488343c9a70177f2360a2f2aae1_1599097221860_0.7770633019374646","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.10":{"name":"@balena/jellyfish-client-sdk","version":"2.1.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"fdc1c4905bc29cb37beb703361dcffa8557831ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.10.tgz","fileCount":17,"integrity":"sha512-GdkQ34u5GcaOFU2/dLVIBSCkNlKMIrTfjENGUSJZOMfa9CZgEeilidhUTLtGK23ODZ0ANgyIXiIwngtH8NVE1w==","signatures":[{"sig":"MEQCIHMkihfbRSJuqkN6prwC2ZUkuMlLsl7DyfGxWe5zjm47AiABXpz8YzFtTmuoJKPXl6iYo6ylCD4WAoonicQy3JCCZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUEpYCRA9TVsSAnZWagAA+SkP/1tI+80KeaAE523H0sxa\nraD19FomkTBRCNdnrgZ0XblpTgJOgSNaGquYWh96SQEwMzFTYT/9SH30zltm\n9gqXv4xo+jZAqiPJLXWPkU4+Urgu7zQ5eRyYFsy/N8w9x4wpG6o5nhIBBkam\nQiEltPEBNroM9OA+bKHLrrH4yEMSyhKjhdlQRXnjt1aM20Q/sE9UheFMbNt4\n3wh0K7Vz3voM08Bt9TAiCXf/Mfmd1ZWeKANx0GrYIBGhemc0O4Vjkb5uMUxK\nUCxS+9tU/S6dBJyeGe0Pe8Xa9+UxZClab1TXfrOI/Fg1QNamZjkn7vH1WiWL\nYAUZVYRTIxkGuYA9RNGR1kLEN/MUxhdiZEDPmT/Y7g/h2rV3Y1ZkTYDlUADL\n5TCHzE/lLHZQs9kVvdjmwEht9eHa+rj9SUA1K1kc0cM9VNdJB3kFnp+wUsRm\nCK5aaM/v36SgWbHhFe4kHoYYNT6zY5sM6aZ4G5P1gyECueeDp6H1OAAu1X2H\nuGFXfprLjQOWm9yJLFjgZ9B2i2tXL2saVNbmMYCFFblWcbsj9E1tKBYXbJ9f\nilKkhlFjk60jDZpBtVIB6G52w4jdV0mdSZDBidBBdeidF1LUwuyny1OAi6W4\n8Vm0YWZMeQG/Gf4SuEndRqFsVc6rQRPkSZqQYI1R2usbDEZDFZduvatdKP4I\nNdka\r\n=1nkc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"10725a03addc0fb9c908a4c37673e80952f2434f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.10_1599097432486_0.6983079064106332","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.11-renovate-jsdoc-to-markdown-6-x-b451e791362e4f220b3d51da9dfc61fd4ebee2cf":{"name":"@balena/jellyfish-client-sdk","version":"2.1.11-renovate-jsdoc-to-markdown-6-x-b451e791362e4f220b3d51da9dfc61fd4ebee2cf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.11-renovate-jsdoc-to-markdown-6-x-b451e791362e4f220b3d51da9dfc61fd4ebee2cf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"94f5330f3b5bdd4f810bee8475af96097897dd77","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.11-renovate-jsdoc-to-markdown-6-x-b451e791362e4f220b3d51da9dfc61fd4ebee2cf.tgz","fileCount":17,"integrity":"sha512-1rjF79sazUhYZq+Eeov8UdOB3IJuI9L8ao0RNnmGq0fw6l8DRxiBLhSPMvLow5PyxGm4eyQdhCkbCQyx9PCAdw==","signatures":[{"sig":"MEQCIHFbnnBnH8xPaiik0wyuCN/5fs+JH67qQcLHcyAlCgxUAiAQzVpgkLDKwEQxSIuJL0Go7B59sBqCF5HlVIXsP015oA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUErqCRA9TVsSAnZWagAA2W0P/js+nkPoffZ7yTqEE1pe\nfmcBkuexvedhoT1K2qpo0N4WoRHzDJoussjNAsdw0BZuiAqF9C3OjS2bzwFb\n9qEeRixmXJ0p+BHx4wLFi8po6xfSxXL4RuD6Eak9Q2RsOSeQL5gPGaGMTLt1\n/vquZ9L2qURw/591bEa3rwR9cJLe1rSjD3ZiLbFH0saT3PI6I4D8mJFfmWjl\nZRb5u+Q94DZdveIsQ1OeDNeb1ZfOEoioAZje1THO7jBYyWHiTC7WPAk5hC51\nU+QxHafMEA7pGSolU4jECsZ2wKREYmsb54aMyh5bXeCU0fMc0GWjsQ4ffrWj\n2MTOr+NUA4a+DF7Sy4guYxYiNSaort87xDwaxNkC41mgGLLfg5g72pZJPIro\nKSdmOxnjYgEQOBSxfpUTrYMQbiWw8jfKOqCnx2mu0wfdifmu4rb7EObK4JgY\nCsX/E1fYaWlh0cW5i0FWZw4/pfTpEDayq/ilCMmKjlTXZ3dQTup2hNhzqdMo\ns4jO/6yueLfb3nl0Kj4yTSoBkn8epvBU23oP2Rqoy0YtD9NUU44OsYTnB730\n5YGXhV74ip6ZODPJyAchhOf/RnHxG7TK3TuiC+86sTb/bqDO3yq14gmBWNvd\nDEVyz0M9uiEaEndPYnTZn3rD8Xd8WiPkan0gn2Y9tAyJQdgUqVuDWueAC+1f\nHOm4\r\n=g0i8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b451e791362e4f220b3d51da9dfc61fd4ebee2cf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.11-renovate-jsdoc-to-markdown-6-x-b451e791362e4f220b3d51da9dfc61fd4ebee2cf_1599097577581_0.17048149285025338","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.11-brainstorm-call-brainstorm-topic-a86df90a60da81a7c5ad02088a149374e295f0a7":{"name":"@balena/jellyfish-client-sdk","version":"2.1.11-brainstorm-call-brainstorm-topic-a86df90a60da81a7c5ad02088a149374e295f0a7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.11-brainstorm-call-brainstorm-topic-a86df90a60da81a7c5ad02088a149374e295f0a7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"61a2e96a6459ad44f37ea9e0933b713e0912c21c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.11-brainstorm-call-brainstorm-topic-a86df90a60da81a7c5ad02088a149374e295f0a7.tgz","fileCount":17,"integrity":"sha512-Pm4n9PBdStudbRSrZpByT0asxg9KuQgJSLccLJ6RbYFgSYQTNNtQv69Br3QyhhwF3mjNPbMZd7U56Xuo2aClIQ==","signatures":[{"sig":"MEQCIFrnh+bJTeu+oaL1anRIXNcsItcPqjl4MkI5aAUAPFEaAiBeRoJbd+zLCzbSN4lfYWLujUkflwYaNj9PElMnXd7mRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUMmtCRA9TVsSAnZWagAA8YkP/j1FhmxF5ZqIKeJ5+srx\nwKMoMtA1gBRcHPmh2peAV1G6jMhxzN6y//Dl/4nSHogTJ7v1aQ3TPwozDigS\nj2Re8iOJjZAp6BTeV41JugvZ41e+a1F6O3Dp2swTErSMIldhcVHnhSYec3ey\nTp9tPOFp8Powo8q+EOj7DBUPaT23tJyCbd3xX/fFCPROwQas39+liQMU720y\nL+R92VkqdSuQ/wkfbK/Hw5KYjpussMTQ383sw6wkcoa3C9x17klVYWsJlFbO\n90mjlk3vaEEPlOwSMLdk5XVpBMH5ktLtikuM5pwWlvtc13kYJ/NfMBjoySrl\nYNCYVKMXcaXm1StCCNWJOasxH/DmxcZsZ2fIkDn++LysXC868JxxdfnaWH14\nmoMU3qGD+iwJpvm0q+M9P/nBKlXbADxh3vjU7+uLsXpg2Bwic75FGF+JKFZV\nOeASbjilveAFNIPqVUTDYjz1bpwLIQSgzrMDdGjB2zKaY0swjN+1X8aKVsQc\nHXwgXEZYemIX9jz4np9V3S6PzydFp7881ZFQouFov4IUAumH0OqKZs3HG5Ep\nSZ+3X7DkDdNCo5QKfRUXPnOX4077fUU0x41XAt89lb0n1if6QByShZx41y/N\nRbpcUyGs5glUqrXxMovVtihgyxqd6WvpQWakFC2/TN7SreoWQEAjSgrJD4Lc\nsSSx\r\n=Aqs5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"a86df90a60da81a7c5ad02088a149374e295f0a7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.11-brainstorm-call-brainstorm-topic-a86df90a60da81a7c5ad02088a149374e295f0a7_1599130029542_0.983036628013713","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.11":{"name":"@balena/jellyfish-client-sdk","version":"2.1.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"8c2fd677f6aa2350c62fd7ece2eb4bac4994e9b1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.11.tgz","fileCount":17,"integrity":"sha512-3tfK7hNgKROWmsJbKxbvNrMJXz1pEAiIfDpGWVt4ue/eMhW8oAFxUPuQpnojMeQ6OhQOdPeom5L3M/GcDw2UCA==","signatures":[{"sig":"MEQCIDHmrjXgtEvjGbMmQSse5LLEoi62AJWfXtAm2d7S89ZBAiAyhvKn/ePWPQ0VBwHZfA4py0H3ggDtk4HexafR9l4Z+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUjUVCRA9TVsSAnZWagAAXNUP/jzNr8UJ4XmmULn+1JDn\nzGHIu77pjf9HJ5CCPrgb61PBRtd+xII12QxtpkShg4s0agIqLVNlG864NzXy\nBjAoInC9aMiHYJdj/Wf/Hu5RTr69y2tYkQKjPupz14SIku3g3kEEDuxMAgwv\nZ1JQj+nz5kTQ0AkTVtdfhecqGEhSIam/WeH9Z4YoDPK8WOOXgUR4fDJpPXih\nF51mtv3EFN7YuujQFnQCpF5GMXzj6yai6G7cRp/xn7dmio+xn0OX/nn/UCl/\nzS9hMGCxTusODVwrR50feprQZyxc/itQZ4Nqqs4lAe3qNwC58eYmlHpb4sao\nkLT5DdEOeXPQmo1+igRiYTJIAvRj5AneslSs9jafS/R1280r3e1+pwP7Ir08\nXoxtckdgR+BhTLOdM7X86FS28XHJpLWfAx5qLZzfsgKy/d2II0alzRlzvMtz\nR25tOK69WxdqY1lPu6Pbj0ntgWjAn7t34LImfQiNVs/feIFP0A1KOpBD0AMW\nHsiRLutwyvhZ91mYLNvfeaGEOcynBstoMYuG5WWtG3vI0y6A1+Q77yMe765I\nd/yks0ElJVvSLS/mB8pO4P0tNnQodKL+rKHGJXmIm4JWl3Nfe7w1AGnnaYlW\nDqhk03YYDvBDHmdSD5ypg7YSFZEz0PzENQUEDcTawiNjpJnze0EIOrMltKmR\ndijJ\r\n=1coG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"f99af544ae3eeaca37f4279b6cca313e81399b62","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.11_1599223061451_0.08776847186313708","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.12-renovate-jsdoc-to-markdown-6-x-f09e437a5ce1ff6753ab81f5d0a4d577a12736c3":{"name":"@balena/jellyfish-client-sdk","version":"2.1.12-renovate-jsdoc-to-markdown-6-x-f09e437a5ce1ff6753ab81f5d0a4d577a12736c3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.12-renovate-jsdoc-to-markdown-6-x-f09e437a5ce1ff6753ab81f5d0a4d577a12736c3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"847e6c7303ef69202f8c6b7a0e92ed85a068971e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.12-renovate-jsdoc-to-markdown-6-x-f09e437a5ce1ff6753ab81f5d0a4d577a12736c3.tgz","fileCount":17,"integrity":"sha512-TBxnW5eBzpcjNfzQjkIHtqkhg5L4j84baqaeDd2pGw9mIFF1eOO2Y3gCXxMFjZp/BaAotilLR1q1mWRHmxQdfg==","signatures":[{"sig":"MEUCIQCiAEyttX1IBLR6orBslCCx8+lO/FYQkRqg7MPtDcp/SAIgGUJixHd1RsMa1qEib5A8z23PzEKJQhZtuKUqNouw8A0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUjYqCRA9TVsSAnZWagAAbGoP/3EbrRpHq+xgOk94MKR3\nCxzCu2x7yeFWzGLhy4n4yzLmKm3iSPE/tsGR0OJadHYqKRV0VMunzPf/WMjA\nUovBMqmDRKeX2eC8ok7u2wsFKJzSbwiDonp9RuWD+xmTd3/SKrUtx1FxXoq+\neVKCLPRSfqB8iiV4QWKKzBdF+8yc7o8OuUp055SZxIm+RGYQhfKpItyhUmrP\nAy+peBRDbjw+EJttdvhbn5HDHeU81clQJ+jv2uC/FFaym28+vJr6qU1vVUX6\nI/Y7I7B+8SN3bMalkM+7EmuGm7dMuUKICBoFKg9hY8XPadU1RmNHR60+uFh2\ndFnPqlgVTWvz6PeTyB1pDjABKt4yohM2bWka4VcgxXpYReb8rJ6slEUPaAIg\nVOIwXKPkblmLxsDtEpoEpVjQkYRcEIzvaNvTxDynuiAFXnn+1/JkLdU9BpWK\nqJ5L9rd1DSdaWZMFRfLduAfpwbzJBaievcDW0FLNOUJbPMbmmHWgD7wbtl2V\nXYdPVp4IZzPcY6sfQJzajT8BR17L0c+Y4f3YEKpiVj71yJ3fielrW8qjwwrK\njEYaDpRyEXPUFRKALXEZKRopu8HW+M9eCfDRj+NsLVpB1k6mi88mvQO3tj78\n4txcPHAaahabzTQI4LzfkIGrTLt2NxWpUsLsJbSTL0phKV0hmAJJLddleQyF\nPBA5\r\n=Uq5w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"f09e437a5ce1ff6753ab81f5d0a4d577a12736c3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.12-renovate-jsdoc-to-markdown-6-x-f09e437a5ce1ff6753ab81f5d0a4d577a12736c3_1599223337775_0.01145374703631119","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.12-renovate-non-major-04b70337e98368cd034f0b934207d2ce0045e712":{"name":"@balena/jellyfish-client-sdk","version":"2.1.12-renovate-non-major-04b70337e98368cd034f0b934207d2ce0045e712","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.12-renovate-non-major-04b70337e98368cd034f0b934207d2ce0045e712","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"859ae263e7625cbe0e88e8cbe349d3bc121653e4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.12-renovate-non-major-04b70337e98368cd034f0b934207d2ce0045e712.tgz","fileCount":17,"integrity":"sha512-L5rrqh6IHLjj5ZfeWuTj40FrraACO+ZC6LfPHEdDYF0vW+o3gPC+7TK90VjALfk8lyOC8JxHM5FqEXL7fTMisQ==","signatures":[{"sig":"MEUCIGdytwxx2R0ON8Tj9Df8MtusORMXnJeJ1gw/4Gt98gOyAiEA1Tli780tqAQ5Atzjpo77G47iiNZd9KJr//eeavLiIdo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134216,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVEt3CRA9TVsSAnZWagAA+JIP/0H8GqIivcv8CC1owhBQ\nZ22sVNSfdBeF/xvWiEffTWVdKFqNPWx2aJWpxNodp8loNFcFL1z+f5sv/sfz\n94BE04cvoQg7W8QDh3MsJPdHaJA362YqrFIoYs/bpQ2rvVS7JbhxpD9eDrPO\nYmEZCSHn/XAYFdoIp8eX0CdN40vTArqSj5Nj0aokb523rd4oAf+hp14Wqlc5\n9eMbpmX/W+VM7rAq+fLqe1QrkaD4iTjGeeUTLnh02Rnqxc/NuZuNhsw5g/gP\nLev3fCQ3Htf2XHjw/jWbYYg4Z65SH41bw+/u/1XhO/B1O7+vZwQrxFYwPUxK\nVTQu/s5lfmLZtVWMXJi4NXq9CHuSTFkPNsWm1uSrCpLUV/0R5J0lj0lH6e5Z\nySHbWb+KG4rRKSQhJldM9Kdb/EpbpNCQ/dngWFiKX1no0P9KDyN3kuZy8fSZ\nuJEg8t7n9voBk0EoE2X6jajlW5EnCpM1bbC6gZm+5qHB8V8GuQvrTRVx6ze0\nse1dFzBEjROxzfPE9lTL7sB4jraywCFycPuroJiObRPcB6uRO635UbR3rbq2\nTHt7r22ju54cpiQrQKPB69lBKBxOIbkfptlJsZI+P4jGSdu5EchQh24LjVzA\nIalzuUGsOaGuhJNQ4UPxP0zjs42jRMHq2r3aoU/B/khrrKk1y/lQknRe5gbu\nZlMo\r\n=IvOn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"04b70337e98368cd034f0b934207d2ce0045e712","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.12-renovate-non-major-04b70337e98368cd034f0b934207d2ce0045e712_1599359862685_0.13013370910477695","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.12":{"name":"@balena/jellyfish-client-sdk","version":"2.1.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.12","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"0dc382f444d60a2e5644704011a0c6ad2593ec56","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.12.tgz","fileCount":17,"integrity":"sha512-H6CMeDHNGysuMswrjlsgD6v0K5Uz1ruwtnJuODXMsO4c9F+Q5Fh+06IePWOEcpaBUnLQTcUHjGqd7MY95054iQ==","signatures":[{"sig":"MEYCIQCZKhlyFSGS8vY2jONbQHRhJ6HSOeYAVrQNXEFtNKFD8wIhAM23rxL0vDXDDSfewAvchJ6cOO4ku5lmjBAS5VJoTwNh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVExVCRA9TVsSAnZWagAAlzsP/AwwLJjw8KcN6b9dNG+P\n2N7cfTKsoyI08khSeqiNEFA9JCCT7NXIMGH7xLKKWvvbTiofj7okgZCeGl7z\nPo1YWv1O4nv4ASdyTdR1BSVikzwBkZRaJFFydI63PvVSAGlSDXGnDh0tUx0L\nsiZjsArLWyuiRCAEA/6OhKoRG4hS7c1nLGJWXdtOmwfvQO/TV0ud8NHajYCt\nIxpzqek1TG4fnDjdqBnBm3gXmjAuOC6jYjDz70/hJPmpi1AxRXIJhzCpF26e\nq6+6F6pXblApgDYnVLll5Rr01YJKXDN4gGq5OHnbmjydClL0IC5dE6twnaj6\n6gWVs6d4Jz5lNnvFus79p/dx61NDByKgmihmlpyzHDCX+CpXJ4iAy7jMrbp5\ne/Qc2lE07rSXv2+hA6cwoioWsWoXaP1lETJJDweib0grPC0Z/xBmaZp3+fmB\n4lLmVrq9Oe6Gtp94qZEApplAXBVPn10gvtblIwJECqPe63eAC0RtyPHC/mvE\nw/fVWr+5FNHFw25e0cpnMk0a2/oSFdZPwrF0F+mOfePLOp0OovsMX8j5OaGy\npPKaKigajV0NekAQnes0aUk21vrj1npxkH/mWeRX6qbX9w4q8QELOZA1IMzH\nfHANQ9B7stabG8Io5bKMTFuMf6927dg+A+syI57QVrM27a8Wb3GfRddhrn3g\niPWe\r\n=b1Zi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"20663d9b8eebaaff7d286a54d134b80554056463","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.12_1599360085264_0.8017919440025081","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.13-renovate-jsdoc-to-markdown-6-x-460ea3ba6b06881647bd21d7e4e220c6ce36c26f":{"name":"@balena/jellyfish-client-sdk","version":"2.1.13-renovate-jsdoc-to-markdown-6-x-460ea3ba6b06881647bd21d7e4e220c6ce36c26f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.13-renovate-jsdoc-to-markdown-6-x-460ea3ba6b06881647bd21d7e4e220c6ce36c26f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"695947c8364ecae4a4bf7477105bf46bb5b7419b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.13-renovate-jsdoc-to-markdown-6-x-460ea3ba6b06881647bd21d7e4e220c6ce36c26f.tgz","fileCount":17,"integrity":"sha512-B5AbLsA1zrMNlRYQHOF/fHmCjkRudHNtVFkdU9vBlGMfMVP0Ley2GBQ9EQwzHkctBRZrL9HhQuu/dkfoCuLShw==","signatures":[{"sig":"MEUCIBqLJ4d9QilCZXZaFK1g9U4hne8+KQXYseA7NDV/YvURAiEAmBas0AC2GdLXsZoOTVNGYW/fmKDFbHvZXeSmwuvvV40=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVEzPCRA9TVsSAnZWagAAwkwQAKOo9HyHroBl6XskVu3L\nDigtWW6qnAJ3kn02zLTozv9orV9vH4Drlllf1kYT75AQjVfj9YfHutESuY/D\n4kCZ3A0Pad3Yy5QmRJPtE3U5ONoCbsNMrT8tomCjb8V3XkZt6qCE3C0bQv4U\nTRRPK0ovFUCL/hhKdNUPqGo89ou5c572SZz1ttEXmyLljcj4upLwnUQNChrm\nIeeqvgVMGPRv+gD48OtoSQ8cr8iJeTDxUAsy5Mg4Aw1M0EqFGMCSJsLwRRRf\ncciNDrAzruYPIkK0aYR9g9IoCo6bxLy/c52k0E1FypIirx3h54pA+mTtzRcX\nGhsqB20W371aP3q5m31KzwablMy1grlGsF3No60hleGJE85oaHAUIFa/wZ3q\n9nPeZhZHHO4v6UsCJxDaQ5V/ClrhQ0+eqOBRn2hCRqG7Tmg6vDdOihd1xN2H\ngLxPtB9fLZ/aPH5MRff5V2jvFrWffV6wCxG+3vEjXqU8kRxSrstznbd5lKmt\nmz7HNda/Nt7caPfjqRtpHuN3nWa2U3YljxSj7/1p+sfW0UWHn8k3fwd6mgSF\nr705u8tScXnGHFf4HRD7Vr9Q5KrBBiODlOw/KLHhytQGzkX1A1abc4R2knbz\ngg5gMHWuB31YaA0T+pMiA+4K+a18nGdi/zlu8klSk/a7w65ToYsJtZEcR9t6\nnMXS\r\n=2/Cj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"460ea3ba6b06881647bd21d7e4e220c6ce36c26f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.13-renovate-jsdoc-to-markdown-6-x-460ea3ba6b06881647bd21d7e4e220c6ce36c26f_1599360206802_0.6875759387461899","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.13-renovate-jsdoc-to-markdown-6-x-f4353a763b4d8b779329e821010b5f23fa84c6a2":{"name":"@balena/jellyfish-client-sdk","version":"2.1.13-renovate-jsdoc-to-markdown-6-x-f4353a763b4d8b779329e821010b5f23fa84c6a2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.13-renovate-jsdoc-to-markdown-6-x-f4353a763b4d8b779329e821010b5f23fa84c6a2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"ad72fdb2d20a3241ea4785eee83fa32a070ff6bd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.13-renovate-jsdoc-to-markdown-6-x-f4353a763b4d8b779329e821010b5f23fa84c6a2.tgz","fileCount":17,"integrity":"sha512-un4sAhiSblAwv2A+eQPXHjt49biaOt+hkJT/qdhmlkXnKVsPVQHjQGwAvWXodX2NRSP19QSJqm0BwGVHlznUjQ==","signatures":[{"sig":"MEYCIQC9Qo1lJCs+WsozFIPwbbS0EJr+Rapognzf7+/bLBfibAIhAO2So5ruphK0KWn6SenH/9GC1xh4QuPfRjRM2Ty03Pz/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVE2OCRA9TVsSAnZWagAAalsP/RSfYAM+U5rV9WcJJf3n\nPfxFwZtUf8BKjyQ8vUcaVrLC/bqlib8cUYlOidcr393UguSFPllp4v/8Ldzk\nQ6YAdjecH4Bzn4S44rOJ6X5wu3wrJCENlPxNWiAC1IJFQ2RdfBSMkw04QOBa\npBpEyZtGfKQu29RwRCbYSIziwVVR1hambffyyL9Kqx/J/wl0frlLeSBAUBch\npR8MPXitdmIEWGamAFA4Fga0k2SoVAqSv6nmAW56KiAqMj6jKBzBS/JzaoCM\nzFVFWXF0NIfvzwBZw6dP86zH3Z3Nzs/i2VJr7AzdNW+eCYDMHsGv+edj3Nz0\noh6Hw6PDGUdOFpZih8C9dh5+GI5s4ZuI9KRGDsQi8uy4l17xdczLji1bi3jo\nN1BlICXINLI0ug3zCW9wuF5/6CYVblBNUUl/t+r5BAWnHs0U+uXYzjRk7YEQ\nQSURA40zUk8CLiZ9PmU48CAhV6igqwFErwzTHdvqtNcPwzVOFM7TX/THlDqn\nXu1jbOpboJqs7qTUqlaoYBZJj8TxrzNiybIklFrLY+FnchN06l0Q7humngVr\n2nDJwAzSiXUlKxPPQrBCVzXoRJf8iV5kLxwlRKA4jZBGuO4feWoIq5sjBrQA\n2T4lbG0SzDLOrKv32Y9mEWmh3OkqGa1Ci3lDUI8ybHzEJvdmvhLOdA0Qrptt\nnjLP\r\n=2lGX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"f4353a763b4d8b779329e821010b5f23fa84c6a2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.13-renovate-jsdoc-to-markdown-6-x-f4353a763b4d8b779329e821010b5f23fa84c6a2_1599360397712_0.6251106323479798","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.13-renovate-non-major-c6e4320ebf214220f95ca24138c12d44f344df35":{"name":"@balena/jellyfish-client-sdk","version":"2.1.13-renovate-non-major-c6e4320ebf214220f95ca24138c12d44f344df35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.13-renovate-non-major-c6e4320ebf214220f95ca24138c12d44f344df35","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"6f00ca0c699e41387068daee1202eaea99c2661c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.13-renovate-non-major-c6e4320ebf214220f95ca24138c12d44f344df35.tgz","fileCount":17,"integrity":"sha512-3bsXF+ba3L9O02RM56qqM+x9jpwOfXoDmjCxK//I1EQjkdOPbu0+7qvaSH47GUhvppy0xVH/4LpuRI8T8iA38w==","signatures":[{"sig":"MEUCIFgBquL+9OvSL6ousO1BkCK4VDTzhqMEsUWWqYy8CQIbAiEAqg/SS9hcaKQl50H+Zunrhr9UwCJxk/jIDRTY2Kj2+D0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVh2ICRA9TVsSAnZWagAAYa4QAJebT0t48WbOMyv754fy\n5DdIyvoS2hxGF9zCCACg8mxSIhp8rJ9pUcgre8RYsMeYVfCCTMMy3g8JHeUN\nnjEBigagwZVIZxoFo3BSgg8HZFuqtF7yr7tawxttmES5nQaNUYDwFfbsocNw\n4LgVDlji2GFv/B8HIsF81tRsAqXG49s3cFRNYP1OMGUpuVx8xoU2ztK+c6cn\nJP8agFbKVI8cFq4Kwqb1d3PGJxWL+3rEj1LL0BUqIiajR7SpRZbJd0XccSbG\n4PXDbZlXvh4vBVP2PMxWYyZ9BWCEOwiCKQbfDjVzVnUaiVmOSaHYlVUTK2oN\nyWaVyzL5Zqb8XwC67oTwCTGNWggtMmfLy6WQnx4jofHI7jnKb8ehQpjafgci\n+YKSyUhUYkBtGiSAfX1IcwC+Nxd3zMsfL4iwg90dMf+8QVJhjEwnyO1R9m6w\n/cRXFDhx1cPHHYyPxUkmBUYA3WIl9lyMCnX79OmuBhIOdHjrIlpnX2Wu0/XI\nOA9tvRgI4p6iZiGqS95qQviFoMNv/duSzYtshWLhrdtLmPY9RwXp+91FZ9Hx\ncyi/b+RLXMV9AiT0LZHhotguJcqVnSaEOzbIdV0V7K42KXh2zORMRbRDtEbT\nvcWaz/itgDkTRBsckM/12k7K62syqp3OGaxntdTA+Wkwb5kU3O+VWGYmklan\nW5yq\r\n=h9Si\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"c6e4320ebf214220f95ca24138c12d44f344df35","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.3","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.13-renovate-non-major-c6e4320ebf214220f95ca24138c12d44f344df35_1599479175882_0.014058531186893264","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.13-renovate-jsdoc-to-markdown-6-x-7df1c1ed4812467bfd2935eeda4f0f39db780bbe":{"name":"@balena/jellyfish-client-sdk","version":"2.1.13-renovate-jsdoc-to-markdown-6-x-7df1c1ed4812467bfd2935eeda4f0f39db780bbe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.13-renovate-jsdoc-to-markdown-6-x-7df1c1ed4812467bfd2935eeda4f0f39db780bbe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"edf95b794799ce1e5569c38ec11a9e702a5c2411","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.13-renovate-jsdoc-to-markdown-6-x-7df1c1ed4812467bfd2935eeda4f0f39db780bbe.tgz","fileCount":17,"integrity":"sha512-MC0oat1YTP4Bj6ZqtT2xEgdx0NwgflG16PskYLB30v+jzCAfRXWpGYd8AbHdu5+NlCiDnuFvFgaxpnCGSNkxBA==","signatures":[{"sig":"MEQCICDxX4UktmYfENfCPDBdnthGNV2C1lzVzULrfyhuzCIOAiA6aAfkJiXbQTE/aTnHMJKIAv0QNMhXU3W/xDWTXOj1ug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVh8FCRA9TVsSAnZWagAA4pAP/jd5vKZw1NpEWaPEfSTJ\nrRUKKTaTw2u88PmOuNDlUg7RmPNP1BJw9uscVL+HndBGMZo/fv+aKWnHzFBL\nZhG2e1ZYTsD5bi88uJ69QVfq9uUPSkEpjAWW81/bnpxYg9Gkmk8OEBzhOrmF\nYkY22gIJhin+cGIBiCIuq6aI62mS8PfljvYxopAskK85YZgdSek7uez6ZEvY\n91dobq62MMa5h0YIqCPqbNZ5/jjG+CE56CiPgeNUtsKj+K8XriA9mhp+/Y+d\nHUXamhDWitBlbEUFdTBQOckr0WxffemlmIy4N5x0F6PlPY/QR4UVUkqosg/S\nej7NxaJJ0W76XSVIdzYcupnfWIzv/vnlPOD0SHnO/K9+DLUV8vQobveRjblN\nlus5wGGSWO+c2MEo3NDCEKOr0R6I4SDnz4ynw7NWHrdvutV1Umr4HAx8jIdQ\n7Zb3z3hpfSQh21VCu73MHe6B77NlTf969HLNnI/WN9botHqVb3MM9rltw5NR\nn/UCVe/9NyEp8SJtxVLieUH/HaP923zTb7RyUM045VVwxyOGcje2IuJxaWZd\nSFa4IKHPZS2WzA/49KBAQGS5nZBD+79eEMJgD6hZINkE3nekOYpdql9K5fU8\ni9tqTo+TvhzOAjGJkg03GJUX0xcsySrLSEL09skq5csFW2baMXRp8W9XQQBq\n7YAk\r\n=qAjq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"7df1c1ed4812467bfd2935eeda4f0f39db780bbe","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.3","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.13-renovate-jsdoc-to-markdown-6-x-7df1c1ed4812467bfd2935eeda4f0f39db780bbe_1599479557060_0.13372372652106557","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.13":{"name":"@balena/jellyfish-client-sdk","version":"2.1.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.13","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"09c4ab6403016a7fc353af4639fca346b8113ecf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.13.tgz","fileCount":17,"integrity":"sha512-wMG+v6D6eFCcUZgty7SmmBpPt1hc2GjHkrsFHVsAkAoEdp48Bu3rliayJl74HVcWB5EmJkBk3xU4OY570ylYMA==","signatures":[{"sig":"MEUCIC6Ou1sOOZZH+ecUrDMybxNIw/mp3ynni4WCIsuWUSAeAiEAxk+hpnVDkm8Uodep3H1ruR/ytxxhEtMuNJetjCDkQlc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfVh8iCRA9TVsSAnZWagAArkwQAIO4VHZxhWAgrK5ed8H1\neWwEE0l6R8Uu28tXZJxb/8fj6m2xeQrnmuKDvTHk8pR2t8PV+kM9kPSVb5Et\npSrXSmWIqIR7IQfdOUOXyWcaNk6AnZl3Qc8JmNb2ZbiMfIrMz/J1esIb7C82\n0NWyne1TuKKAJMAOAd8Xbnjx2E4Ci6uyf+FHLmpI3ukb1qTsA3cPEJQ+L8dU\ngwYHBOt3809mvcvSb7KjBSy1c9F2M7xF87+drxQ5hBAk/2midBsC/mp8/OIj\n6sUGOspA2BuFipJ68WAMS8rWQPxIwUEFiKstjw5hgrCID8uzG282pGUKEqQ7\neZB6Jk4f+9TNg546LCiQ0UE8aZwiv1Pn1Ut/bn1xXPU9mmeRT6Kw/0XDHhNj\nWSn52bhjZErABlo5Lw93jVjSaR1o8lWk5ZGqctxX00Nad9YbCYQNVaQNr5rv\nBL1eCHEss8223JsFXE0X9WOiBhoZU4ED3SxLh5f0KOLw5MJgJ0r7LsYaJ/ag\nnPU0XQAplZOV0ubV7N78DNh7F25paHYOSkIT/4YQq6gN8kUu8VxxSmOP3xIs\nh1xsvHLg4lB7dWy4x8UBUuDPvKc0jCQoGBa/EZd7dvYCVEZFE+NKrj/F9FNF\nistMx/QzmeSjB+13QFcoYIrbAKGs0llRHNxLAaVLEPsNeqNtE6Vlrm1/9wmC\nxUlj\r\n=MCHb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"02f8c163249a615121d14b153207f69b946849fc","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.3","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.13_1599479586178_0.4800348898213542","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.14-renovate-jsdoc-to-markdown-6-x-26cdfc22450f2f958e5155367e3b6627f411bbab":{"name":"@balena/jellyfish-client-sdk","version":"2.1.14-renovate-jsdoc-to-markdown-6-x-26cdfc22450f2f958e5155367e3b6627f411bbab","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.14-renovate-jsdoc-to-markdown-6-x-26cdfc22450f2f958e5155367e3b6627f411bbab","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"petrosagg","email":"petrosagg@gmail.com"}],"dist":{"shasum":"148f8e96b79e84b806ef9a77dffa1a8cbcaccf25","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.14-renovate-jsdoc-to-markdown-6-x-26cdfc22450f2f958e5155367e3b6627f411bbab.tgz","fileCount":17,"integrity":"sha512-oLDP9DqGVkE7WPV+6zVvXSb2mqLVwlEsCCAJx2EcVYi7fcIq1/tG0hx2jlyRlwU7gcgJCGaZmi3mjWh1KMbpdA==","signatures":[{"sig":"MEYCIQCAY68UFKW9euCNToyKen3us328izPW9n8a7tlbfhO1DwIhAOWpIQdxVRNh014SmM73N9XxtYbAnObmjLSxZOj9nrAI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfViCkCRA9TVsSAnZWagAAcagP/2pmdqeeIZ3MjGryhWRG\nRuap877n2co5zS1GfK1lEkAGTQ0+dLMpxFWBcOkbi+4zFukSBBdgZygCoq4u\nKNZShUX1Oc47O0rAMOFdGEmorXSFxExHPfKJtblvWB+G3z22EKYOX+z8w2nx\nyVvt45jSzaK59JwGtiZY2ETZO1dh+QopKJ/ggJuS7lqspKWKxb1sBxqMvF2k\nDyuz/4eVDUrdAYCf4MBK/su4nVMDhGnlyjKrN0mjvamng7jSzaUAZPDVICTf\ngXTBVbQRPg+O5+cdAXYvJA5bmZlSaT7OyAPkU9guYSzsW2e0FaiOOQuqBtwN\nfG/xzRzrgIchNLOsKFTJOZ3r8dmVl3rjwTJZiN/4EGq+WfRKUgMC/LLj5eH2\n9AVgFWKU9rMgZ1mUmUOepodB6PXL7cbl6+/viRqyNiWWvXYt26vWWdl/NduP\nYF9jSXEQc5GaQZ6MWn+oRgRB8SLwAMlF0qRNgarMtUTA+Ja6ADOu3nDZzK49\nmbpORrUhPl1do8YMTm2eWsP9/V8mWTVUBnpLEp/Yn7CrH4H4jiGw8xLjnpbB\nd/R/W7el06DNHsD7BpNeiJbZP9JHBZyYwpapgK6qP6afhr9/frQpAfvkU7z2\nEWMlcc6xCB7gw7ouYfZkkihmEJ7upaEiG1QzsCIWJNEGWDA8m1tXUxhufrv/\nHbjX\r\n=ZpAE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"26cdfc22450f2f958e5155367e3b6627f411bbab","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.3.3","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.14-renovate-jsdoc-to-markdown-6-x-26cdfc22450f2f958e5155367e3b6627f411bbab_1599479972128_0.2101266003517166","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.14-renovate-non-major-6120c4ecfbfe33411a07c15e3c4cce63bccccb7c":{"name":"@balena/jellyfish-client-sdk","version":"2.1.14-renovate-non-major-6120c4ecfbfe33411a07c15e3c4cce63bccccb7c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.14-renovate-non-major-6120c4ecfbfe33411a07c15e3c4cce63bccccb7c","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"ac0c49ce732148b8516be71a218df702b07d421f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.14-renovate-non-major-6120c4ecfbfe33411a07c15e3c4cce63bccccb7c.tgz","fileCount":17,"integrity":"sha512-6vhl62GO3YdGBL9T8MFwSBzQdihN9blYQ+hdxJUBmrbhGQIPs3oqdaaEEyA9Ef8YXqVqzRN5F9L5+TMep1Fhaw==","signatures":[{"sig":"MEYCIQCoJUf0RZerBIgIwWdiBya2+czmR8OwFwZCvPtpEYoInQIhALHPV4M81N4TfxU+HC+JCBLdwKIap+QAqI9y91wUD3Vf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWCbmCRA9TVsSAnZWagAAlDUP/3L/BiHRfYgsCDrEB0/c\nRAcl/0qhW1ZCxaX9BIJ9PpTn9Jc3G/El3s1Q1oF35Et8RJ7oMaWZvzzrtTn5\n2lnEH8eLlnvmCkZ3wnCmfyHTAQvFjsRf6W0em41XUZNv5MDf1e1IrxU7Gfwz\nA4lCjz3NWS6md+M7EvfDnQJdxlIXPCmIZu6yTjdf8jCc3iI7zHTKgULp1bvi\nXcjP2w3c5d6SnszjNGWXIDHNKfPPFJXk/AiNXnAAOlfiQKUJCNeB4c5szjvq\nBg73Fyc7A8V0w2y0NICAUH06VUTQ2kxi1B9U0ztKai6hO0JVlVG9SbsPgvKU\nuTHEcCk3MxIrcD43FdLwnYnC0t+oWyxjFkEONEUrvPvgAyUH3PAZxweCdJCr\n8rIe5d9KOcnCj8U2xMkrs5HNtjhSrjEKLvNANIf0NFIy3C1Ze84n/TyE+3Gr\nCkrzJyHJAHLZGs7o767Bj8fMLlns1X43GKY46JgdexmVl2FFSUCxxnwzO/8D\n6Wok51sCpB5qzCv+Zfgi5MPW5gnwYFet1IY38I+obHNFIClA5agRnIVkBmgC\nJiu9QbuoqR2dRJ3RBcAO8jFWLNN8cLbHPZYLNdP92SP3Dwf3jcocjjP6EfJa\nB4nkbrh0XvDDPZoOpuwW2G8At0hqFFtJb1AKXk1CdUD37ek8+Ahx6f3/Cbyu\nbh49\r\n=X1IO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"6120c4ecfbfe33411a07c15e3c4cce63bccccb7c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.14-renovate-non-major-6120c4ecfbfe33411a07c15e3c4cce63bccccb7c_1599612645647_0.7338774117658344","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.14":{"name":"@balena/jellyfish-client-sdk","version":"2.1.14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.14","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"e9dd32af87742ed650194ef574551cec438fa724","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.14.tgz","fileCount":17,"integrity":"sha512-bdygZOcrhR6iY7eiMUviydkivg8sivRj4XAK2HXeKIDIaSxK23k37GvFUvFxBIsCFbDJB9UmsLdTe3TY/wE31A==","signatures":[{"sig":"MEYCIQDU8z3g3EzMu+w1WnbVBTYchqyEGo1LIYx4QKvErDzXowIhANLfDTbcpPeh1Sq1U5aCnXQ5/OtbEh1jpzK29MZooHck","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWCf9CRA9TVsSAnZWagAAaX0P/RVzmYANr+TGnJugcsl8\nkBQSjp14ey8ZNeGssBh9N3h313EtO26iiZHP5ps9Kj0zwRF39qgWLPgN7kAw\nRxaxRizgEbGdrXlOD5xTAqS6AATS3YDaBSnZq7k/7qkscP+DYq23hj+Ia9Lb\nzDyvADJhKHR8QT+TpJ+NgtoedK4knbF2ZhCgrBz0szfpFRmhbgzaH/P5No6S\n5MWdbzGn0u7kVKxCgwX02UWr747DbFm6YG/GtPck77L5DTps5/Cto6kmYiRw\nlx5nKpvQEZuAkfBuVo5qWaZTkBl3fG+KVQtSddKnodwDKgwLwH3DgOPbW6Uh\n+x6+PhAqjKkvwKNb7+nK4whZtiz55A7E7pEbdBCGq7GFxUDqSebdvvZTnYn4\nvB+J6/5L5lBUI5Wr48EMFLrHtulq2gv2rUyRt0yu8y5h3MwhiD1H8Rosw/LE\nEHb8Ijt71BD3C7eUiK1GT4M0gWRT6bAgYtYg7l5YM0KYpLHbMAGghDmg83n5\nbJyiP3OsnIhM2lHjjP11UiVMXanMJ1b+SYMpz80dEy3rKuaRnikbTBY/U8T7\nRxWJ/5kOELnMw1LRMFl409EjGeSYBedJxUUFSdPqsyl39rL1rKEWMYIwk8Wb\nY4Yb/mdtAB3jt0LOltf38CATOnXHXM56n4hTlOsO9lsax+dzWEwY8BdEtbfn\nakJU\r\n=kHQ4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"ab7fa99f137c193614b83894098991d25089f26a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.14_1599612924634_0.5341432031668147","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.14-renovate-jsdoc-to-markdown-6-x-98cb8ffa43ae79f9f2333ddaf2c1d0a7ab0d5255":{"name":"@balena/jellyfish-client-sdk","version":"2.1.14-renovate-jsdoc-to-markdown-6-x-98cb8ffa43ae79f9f2333ddaf2c1d0a7ab0d5255","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.14-renovate-jsdoc-to-markdown-6-x-98cb8ffa43ae79f9f2333ddaf2c1d0a7ab0d5255","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"5e8e5485383eb7585bc63efedee4929250fc6b85","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.14-renovate-jsdoc-to-markdown-6-x-98cb8ffa43ae79f9f2333ddaf2c1d0a7ab0d5255.tgz","fileCount":17,"integrity":"sha512-OSIxwKZBHLfKZ80B/S4ZtZSfZnHk9t0xFc0s6pg+hSXkIsGCwwJAT9MQKWjsFjU6Zy21NKvurqklv0+oUE7Inw==","signatures":[{"sig":"MEUCIC5sNvLGHsBHQyzb4yXAkvAJ0L5WHUYzh2dBZ+V1JxwXAiEAjnBUwas9GgkX2rNYJJPepXALsYwsdt8Z1zbt/l7V8bs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWChCCRA9TVsSAnZWagAA8yIP/0b1V5qeqdwyQVP1nyta\nMUFX35uOIwfK909hOWBH7TxOK5QB9GyPW0GXYXEliXhZn/ZkfDKn8j5O5KC+\n20AhgDtF8HS4v9oBwrx9o6ld7HkBTVXStUFoKzdbGNVCjiKHTAMwYeT/7SVh\nCt5Tdz2a2EEfPW5nSe3UQXDcYIQh2WzQfbx3jGhVWf+Z6IneCHWCC15z6z7G\nTItUu7kY49eKbXFHeE4duKbBZzO6mn7iLkhAFMYM39sC/TTNafRxDxwJvMgt\nJ66bBckzY7RijSWFlD77RWpwE4IfjobTqxpNvJ65gVxgvNNEC+u4lj1ouw+t\nZq5WBnIGOiuwUVUUrbQkW6z/1qHn9h+OBaqH3u7SIrmnCRUUdBHyZxqffI4E\ncrOlcPQQStKZ55D7CFF3r7V+SnjjGiIlAUjDL10vJ/NEo+bFoQYHSgohoarl\nzufpq20O8yki6WcqQdB6rJx5dsjeMihnEMrUZ8aoYn5Jd7D23m9bOu1P1WwO\ngzZlgehoJXOXF3cku3viKRuuOcB5qZdPCHjFpBDKe5GzhkmBlPKtvuq3sucO\nEJlnAPIZZhyrx4vF+7QWikjjE+wCLwcZbDntCsnrkRxqQxa14HdI08PTZzPE\nFNYAAc8R8+OVhNJAXuQF1BKl0xOihycoaDHZl33brslxLFxHd2OqZoqgopA0\nYFbi\r\n=apAU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"98cb8ffa43ae79f9f2333ddaf2c1d0a7ab0d5255","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.14-renovate-jsdoc-to-markdown-6-x-98cb8ffa43ae79f9f2333ddaf2c1d0a7ab0d5255_1599612993913_0.03624063474465666","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.15-renovate-jsdoc-to-markdown-6-x-87ec73baa4eaa7e85865e89420c42425571bcc69":{"name":"@balena/jellyfish-client-sdk","version":"2.1.15-renovate-jsdoc-to-markdown-6-x-87ec73baa4eaa7e85865e89420c42425571bcc69","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.15-renovate-jsdoc-to-markdown-6-x-87ec73baa4eaa7e85865e89420c42425571bcc69","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a9f646f53a8bec2db6ec3395a7ebcb4930a5bb16","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.15-renovate-jsdoc-to-markdown-6-x-87ec73baa4eaa7e85865e89420c42425571bcc69.tgz","fileCount":17,"integrity":"sha512-uKHddPVGYKtAN+nC3kSgyI5cyVDmFFB0O6G6KOkJ9UlQbGfn493jORVJfztlfIfClE7GbpttmNN5H1dBFSaegQ==","signatures":[{"sig":"MEYCIQCIZA2EbhIZx+n536GUM2yWD6+g/nBVJfNkv/vVP6B6vAIhAMhgTJL+Hte/Q9LmhWr96m67yatDqYeMdn3LCwhDiWPf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWCkcCRA9TVsSAnZWagAAwxMP/1hB3UvfhN+iQJDcCKKf\n88Us2zAmOWQwdTvtaDa5JVI5e+nChAdYjODPqQi0AU2FhWLhDeyeaYmRPOF/\nqe3AAihdhc0SNPbACTG5+8BUEgv/2ySBpOwy6osc6O3ye/tKPdSF8Prizh7V\njmYVlbEzSwoKtexMAjUEjiM58Gc53kfwEB7j3dokfUwPPUyoaa56E3BrtT60\nxt1egLz74Cq4fco5WCPcxY+dTXgbDwAHbzrO3Je9KCZWqQuQA+vIUQ9uZm3e\nluNXDCvy55+0ha9VssBsqzvWIS82VX/IqQz2dcx/Zv3dXsE2XkEE6MYPNucr\nW0Swj/8pnCWV1nfdD1LhtVptdtnxq0mOkDcfJ1PSI+PWvsTOZHieKXCsBBSk\nmMfOTCa8Ka7JwMnRpzfwPMkT6eDc24GtPJFZye3T4Wj0loXeGTNfgicdl1ts\nRtDhAJ5mprFGnQcKDzc1qT/MLPxeWFUtophFcrW5ugAMSufsshxQp+HZLFpb\nZApnS4bn9/OnIX6OrD8WFhWzgSaC/zPN//TGfltLhfx2OG6ZaMvHPlF3KYqD\ndF/U4e46xfPT9Vq3hgIDmxurRPPqxdyL+m7UaBLBCwJQlXeaHV6RAq3wlFWF\nKxyxdBLG5y2ZawzRNKb6lf1ErLs2Mt6If/zA6kZMCMvamGQ+hWVZfQD1nYMf\n1E8j\r\n=bDAK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"87ec73baa4eaa7e85865e89420c42425571bcc69","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.15-renovate-jsdoc-to-markdown-6-x-87ec73baa4eaa7e85865e89420c42425571bcc69_1599613212067_0.7428358257788981","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.15-renovate-non-major-d4ecf802d21bc524a3f539425bb1279500dc7318":{"name":"@balena/jellyfish-client-sdk","version":"2.1.15-renovate-non-major-d4ecf802d21bc524a3f539425bb1279500dc7318","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.15-renovate-non-major-d4ecf802d21bc524a3f539425bb1279500dc7318","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"5ee0748eff9eeffed8886dfb8a73eccd51b25224","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.15-renovate-non-major-d4ecf802d21bc524a3f539425bb1279500dc7318.tgz","fileCount":17,"integrity":"sha512-zsqh+vtSYmdbdBwZzUTv3b2EuNvgviMEJ7eG7VgiDfaduM9pjbTI5W3/6REv5exoTI7kPDnhNq3bzdrMfjesbQ==","signatures":[{"sig":"MEQCIBHp5K5zmSQlOCTSQu6IxvqhwmrOnrdx/OSrhoZy//7jAiBUnSA6Z+ebWSm4+R29EslQZLOj7mJkxUFaRL3IIWMIig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW8NoCRA9TVsSAnZWagAADT4P/Aq+cNe8FU5FAtfl+6KA\nZqxkcyOotMe9nuPJ5jc3vSPTbuPBEfqC8rjDXxTP1ZA99naMNtHvQ5ZK/s2q\nlhE0uTV3eXocq/ZvJcGXhQ1uzqGzS00Ztq7DIIUnzpZJr0Y9QXdKP4LGegbQ\nPRirKcTgnzArGK8OM+O14qjELS1gyEmepjd9NTBJ24t5H5d5dGIKbh+2bAN4\nLcLkt87lSuNzx/zhw7aDSmK/JImEjStUrSwZEbviRUia2n2FmzcWyaAN52Nx\nS532+xmUqauhqAUpLF9RfjqJQ/JQQYJxcSVZ+w6OoaeSf3xSf5bXYBvAghSO\ndZGwODibokC6oD+a6Nj7z1OMJcz0UtALOOp4C2VjUOjrkp/STp/0sLEmpS9I\nibc8otQ3osdXj2jOQ4SWdG53xhuOA9A/XtvjmJleU2TE8hvNtPlTk73Rv8ga\nbxLDPFJfI7x/0u7oRJue1FIvQXKajUaBkQ3T8Dd6WYdzRjgqDZLvt5iM7I3h\n+nBdpNA6E4APhij8XsG6u/ZQ8YEEnafQ24Ev3dDOOD3cf1YxK8Mpk0RtUM4l\nO0tzFkCHQj6/oeqKVHBiKihVrlZj8QCeXc67WAlvQdIHAdUPiqQPuehkncm1\ndTN2OGtVLA68+8XbIfXy49Gs2NlatdrJmrwL5ZUE68LrBvh2Eh3axOyhqFkt\ni/om\r\n=04IQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"d4ecf802d21bc524a3f539425bb1279500dc7318","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.15-renovate-non-major-d4ecf802d21bc524a3f539425bb1279500dc7318_1599849320315_0.4544580445531443","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.15":{"name":"@balena/jellyfish-client-sdk","version":"2.1.15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.15","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"b25e9c1257bde09a54fc5dc03e2ad47c7a0608c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.15.tgz","fileCount":17,"integrity":"sha512-SAcX2fq9pwfHRX+K11QEowtl8zcUs8iJQ1Qb5eubTaYsFz+TKZkk0hMoctkKu+FovvubsbkI609RB3OjpWWQNw==","signatures":[{"sig":"MEUCIQCbNn9O2DJN3qKbZh0K7+GKeGN4bcLFPIxpQ0aPnBOz+wIgBR2KTqCvhvGlHLBLVC3i+v1yR6PqydznCTbkSkpm2T8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW8RpCRA9TVsSAnZWagAAgcYP+wXbYYctWWkzuMU4LVK4\nzeCVGfcHGr98/G5F4NqhFextxLsX+6nBXyibdk2wPeCGEesHST5V5w1P1FT3\nYuwb2T86ls4HWT+XkL75DccvIMOk1brd1b+U90Jj10B/XATTS0JIrvNTYm3g\nz4L+uNS1EY1nvlPtvSoG+FLz/wvy+1Co1d0n18M8L+kvp55s0HiSjgW85UUK\nyXkPD8HEJ17GTwM/g4i2dNx0hjCVUThhikH2pWLE4JCoIfcL7wgxwY7Fdcdv\nN98r/aKfhRJI67mX6MLiqxprMi7Miooq8yBHCT9mUQegsNshnU4l2i3e4Zx7\nJi89FUGW8pKvb+iS4WHpOKyDI9XWv337YXlmbVhB+BvUcS6sCuxIUJJi/86w\nMYTTsNjXA7nNtEtpRDmrSrctZiFZ6WskXea8aKEwXpj62sT0qwptUc9QIjUC\n1POMyMreMY+XXGgT1DKWW4k1UGLA/QEq0QMEXLH3r8UyWrm5//hPrsIOF4pn\nqvaECpx0vEhrOZRLf13FslTwzzGDRoLyxvxVYxrxFL0EcfbCCMwy4HzJi5+d\nSLOLoBfuW31ufLykgsHL77Ir0YIjxTe0ieBUxEsFh4hg613lPdPSoblIHjwk\neOa2q3joU3PufvTqz3X2ET5psGs/rQtB1ZtLvV/dNriZL9t6m5NuJ8DWoFaJ\n1/Ve\r\n=uGvL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"190a292da67ca7962c1966382e6247f6b8cb3560","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.15_1599849577168_0.3118865342978716","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.15-renovate-jsdoc-to-markdown-6-x-39468b22a0c44d6f901633bef3db64c59dde8b8e":{"name":"@balena/jellyfish-client-sdk","version":"2.1.15-renovate-jsdoc-to-markdown-6-x-39468b22a0c44d6f901633bef3db64c59dde8b8e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.15-renovate-jsdoc-to-markdown-6-x-39468b22a0c44d6f901633bef3db64c59dde8b8e","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"e1e620d9f40d3d36140671e00befd0afdc0b0bfb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.15-renovate-jsdoc-to-markdown-6-x-39468b22a0c44d6f901633bef3db64c59dde8b8e.tgz","fileCount":17,"integrity":"sha512-yIZBjY0fcbfMcSEqDFtQZwhpB5mygejoOofy6zynZaHoLHnQ6XN0vFu771gmg7U+YmVLxFzpquNETjT1HSiWZw==","signatures":[{"sig":"MEUCICHWKGCXphIwSOiimTP4uen3udGTRlFKnw06cMVGv13yAiEAj/rkTeYrN89WZv+nELt7KqVVZwczLNfAM7EFrvnhVYc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW8TECRA9TVsSAnZWagAA4ZsP/jUX5XQH2Zj/lCwuaJ5B\ndhUC0bl8fxH1p9nSsqiAvpDc+FjqrBz2UreSpsGrA2sNb3Vetsj46YxwVMRW\njOky/k5T6P6hiNLFYbxpUYAe0DvUF8cLRQb0nCLwc2Vcp3O3btKBZiGafYsk\nyOAMZsGfEXMh0wY7mSVibdGgQeWu1gU3MPMHFUptwAr/t2had4weOR6DzF1G\nD6qCp/qlGycyuCqnlVS5GzqatT9LnYf3aOP3Id304aUjQcazWgy8a4LmS92F\nC5MLhyi4dCC4l7rUeIR5Ydtznqj7y/rWgsFpV4vm0sNBjfz05rUG1zVbvKIf\nToAiOGWyNVdVte+4iu3gGnvDQK93w/ltGNvFip09mPODGL0sVKSBk4v4Sfwn\nuJt/QNArKpYHpC2A19uaNK1/D13INO8+cSUPXbVGEcksiFh+VxfRng78ET4U\nX/QpPwVlygP/+cc1FbikJziYMJAw8qLFaXakLzM5HRU95Bf+AtbRXdxEWHmX\nXNCgWjB0ezT5o+YJ/2+grZ5xTZPprjVtJnhfZ/f4ANjbcNkLaA8T3BVUbSR4\n19yTBkjEQDCwj68iL0JfEdIzdwupplo49Q16NUs6RlIJfAsqwVu7gKRGBGDB\nDnp33w+c2EmDF1qDy8mUVq9X4FLsfY/gRKvbNF2erEfzyygITb6BiVVQgdjC\nYIKF\r\n=S2+8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"39468b22a0c44d6f901633bef3db64c59dde8b8e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.15-renovate-jsdoc-to-markdown-6-x-39468b22a0c44d6f901633bef3db64c59dde8b8e_1599849668104_0.86084140146098","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.16-renovate-jsdoc-to-markdown-6-x-22663d748eb8afedaa36b10c6739d0fa7e7ce893":{"name":"@balena/jellyfish-client-sdk","version":"2.1.16-renovate-jsdoc-to-markdown-6-x-22663d748eb8afedaa36b10c6739d0fa7e7ce893","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.16-renovate-jsdoc-to-markdown-6-x-22663d748eb8afedaa36b10c6739d0fa7e7ce893","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a9a134443771542c775f28537a392b2d262976b5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.16-renovate-jsdoc-to-markdown-6-x-22663d748eb8afedaa36b10c6739d0fa7e7ce893.tgz","fileCount":17,"integrity":"sha512-m9Hz5o0TINi2JPMuM7Z95t74pM/T7jvnbCAqEHntS/ynL/8nb2oCR77GaEW9aMSMTXmrkiEMaWlr8Wl3XF4LsQ==","signatures":[{"sig":"MEQCIHKXk8oW+jJirbjKnXpuPiFyMDr9CimlfzD1Tl66lP4NAiBxxh4k7VweKBV2JNSB193u76WrJDf6ZWvbv7q1cZhlCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW8WeCRA9TVsSAnZWagAAU/8P/j4Grt7GJl/53m4ZbeAA\nxuBFN9fiKlTBB0rDta3hWd3iqO1h/qGnvHNTtaRI3DHWqrB7cZ+5n66gilyk\nVtM1R1m4sIz5Mv3OmqliTU4QRBCOA9U/qFXBR6BGseoc9pDhJ5LnKJcXk5yU\n0EoWWqZzkp3ByLRAQuoiw42P+MBa7QASjCtQhLZnB4m3BNzD+4n6GthQT5j4\n2ycZSOZtoHVK5veKMrSTDzM0j3Mv3RM7KSCLvC4uHb5OQ9FWiqgutLndT7uH\n9TrG4oyeZ5gJHhv2YD6N5t7MvCKQYk99BkYrQxxaT8ctwYkUGLLz/25FimB9\nrXkywe/3J2GykchZtSMchVZc/UN/gC8q2yDe+AUknGLhKaypSFrzbUXSE2sI\n0/YXTw57SBKEnhsZNX9SaF0SZ12O/hIYQfiK97gqbuEJRDgqhGZEYNxFp4j7\nGZJw8hQN6hEW+ta1e0fAWTDOg6bZvGuVAlowvovfgqLQFPMz1Zn3MPkyyh6q\nSQr6zBjBgc+zqiN94yL8ITUQQHxzhukkG4rnkVp90Z+grQcXdBxyVlvQD+/e\n/Q7m3s1GqVML+WwpTsGUHnN1LbQDocyfRZs2zhuzL7gNzF6P23alHI46FEeb\nFe6uCuo6onNSOkwTmI2O2Y+Xlvr3MMyutyJZSM4q5i1MNJmmYpRtA2hWIKo8\nemW/\r\n=VTkC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"22663d748eb8afedaa36b10c6739d0fa7e7ce893","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.16-renovate-jsdoc-to-markdown-6-x-22663d748eb8afedaa36b10c6739d0fa7e7ce893_1599849886022_0.9186205013172373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.16-renovate-non-major-3c918321074767e89526a1f22ccf3165e74b837b":{"name":"@balena/jellyfish-client-sdk","version":"2.1.16-renovate-non-major-3c918321074767e89526a1f22ccf3165e74b837b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.16-renovate-non-major-3c918321074767e89526a1f22ccf3165e74b837b","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a1b3ca0b1e388c21dd5a4a7a39ea2abf36f4439b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.16-renovate-non-major-3c918321074767e89526a1f22ccf3165e74b837b.tgz","fileCount":17,"integrity":"sha512-+qlKloQBzckGl1N/QpxjvWvg9PS6TNl9XKQJ6UwA01PLCfjs0bkN3o8ItArILz0lRTPbMeDjMDwRl0uKEHYecQ==","signatures":[{"sig":"MEUCIAStlEKWCcKhgBDLlYd7YWHgAeuVPiw4EBOPSZUDOFnaAiEA9mion7p6Le5eF/SnGFzGuoNiQlWmzMmPjFJ5cCN+6yM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXLAoCRA9TVsSAnZWagAAQPMP/1i/5IUYmbq+ok893IS0\njLBZyOKZU2JS3z5JZxs4ig6w99W5xPpHDI934idvZXpkaegYoWm213n9WEoG\nn9mllPg7b88KGLVEy6N4o6rrgq04cm/ibsh/7M1GavGGvMJcjFu6OcSzMDpR\nFEaNIyG1alQnRtA1wXhtdbUZZtVB6ml7/CJG+/oxrI628AqCIQQtHejDwUql\nBHputHXp++Xli3iiYYSfli97/zZjqTUGbVAchhW2JdaThuMGxt0vZxtQ/F5A\nnlSY5Yw/HKCMC39756T8tFpJpeoy/mj2uemjBKLWnx4nR3ZNMI6FobXRqlm/\nzuVSJ1zaNTV7rGcxnOCAd9Id5kgy0mzz/fle66Sw0Zx1frgmu1kgOtQhOvKQ\n6vlezrbtC0aY/EY2Bpr8719ZS7QHerZp+uCj4iSdYvhHW//0th/VOAhay9Ij\nFeBiH6n2uQYSj0aakaRrrgjgD5gqg10WjUKfU4D/cxx3KVfIcKcBbgQwTzAJ\n0VVHBldVhCMGs7l6lFCwtQliOJRMKqO2ivSkvRfsUs8Cu90IuCW3iDFFu4bg\nCDTmp87w11NpO+Adu9zTc7asAo3Wo61KZe09Dgac1Wve9hUUnU33d3pPtJFQ\nthPX+UyeeuZCpKQSgdL4Itjzrb8iWyD+gF/apR5ciVQ07ukz6v15Bj8AOIm7\nXM5p\r\n=cDe4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"3c918321074767e89526a1f22ccf3165e74b837b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.16-renovate-non-major-3c918321074767e89526a1f22ccf3165e74b837b_1599909928516_0.4058745895576381","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.16-renovate-jsdoc-to-markdown-6-x-3690198e7e82ba015774e467e49d78974fb04c3e":{"name":"@balena/jellyfish-client-sdk","version":"2.1.16-renovate-jsdoc-to-markdown-6-x-3690198e7e82ba015774e467e49d78974fb04c3e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.16-renovate-jsdoc-to-markdown-6-x-3690198e7e82ba015774e467e49d78974fb04c3e","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a699fa839f0c10e5294563ae1a2088966f80bc41","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.16-renovate-jsdoc-to-markdown-6-x-3690198e7e82ba015774e467e49d78974fb04c3e.tgz","fileCount":17,"integrity":"sha512-gqoJ80WmRzFk2jhC1mxOvUyZQ0tBJCXtyAgopBEnICquYZm3QxpU32GT+mqHRrxR3j/jFWlm1IqivYcFQTX0MA==","signatures":[{"sig":"MEUCIQCakKVJ8lP1sCYiDfAcFs4Ws7QKcHQE21NQYwQ2/zZi9QIgEe6miPKDTD8T1+0lLfUDGANS7wcn4QNAe0PSLqNfKRM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXLFtCRA9TVsSAnZWagAAwtcP/0PrUmXfPng+jLRoqClx\n3nKktk5u8mGasxODHMT1PuvTHkg5N3T0WX0syQOkUVMtT/WaskQZv3w0h2O0\nuzB4wHhdv8Zu+J9ZvO93B+JMcOh9QD1L8pRcHyFgmXGPcZjIG6ZMoofF1StI\nkUPKWGEWS2k7MsSulhi3SFuvnEV8U0HRMHTlI46erD7Vlxy95rzVoEU3tEeB\n+NBIYhyqm8wXVjHLz7CgViJBKRwAilVTTZK254HknKbV7Gf8r0wJz45FWYhA\nNUeHHsDvVf1lY//aua9nEQyR8YUc7oWvKIzicMH60igtcMKuxr49C9FIMBUZ\nI3T/K+AuVTPa2eDgEkD7SOu/CbBVNGL/NYxcNAE5tl4h5rY2hK5LX1AQnktt\nhQv4b6K/1u+B3WwQzLcF7tlBwI+KZJD3JGs2iISkYJ98qma3Jg1ba5TJfchg\nEUHX99OulEZ2UVdOSUrIbMAIdlf7jUOj11XUhEx4dYDXpY4ty4+gSwIwfdaG\nKz7AK0fC/5pBdRqchmoKBhEDt7oF89TLJQBtYS4eZH6l331ZFE8iU8b1OFh2\nkyGMmdfBQgh1U/hNtCWf62M8AKW4d+EH3i4al6GSJVXwMq0fczrC6cN/pm1s\n+a8C2/IrmvW6LEslo/tI0DaXyj6dkS8LWmC7UF/XAFTnAiDFYxyHwC8JR7o+\n145F\r\n=dDWu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"3690198e7e82ba015774e467e49d78974fb04c3e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.16-renovate-jsdoc-to-markdown-6-x-3690198e7e82ba015774e467e49d78974fb04c3e_1599910253202_0.4069507864233195","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.16":{"name":"@balena/jellyfish-client-sdk","version":"2.1.16","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.16","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"eaae6e11ecee86472055af66ccdb5ab5875683bd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.16.tgz","fileCount":17,"integrity":"sha512-pmy3ffsIH1mnGvOd3EjxwRJYddYEQA6T7H0ZW1pIwm4PttdhDLajvgChP/zAGagk3jSPT0ohuscqz9zLCXNU4Q==","signatures":[{"sig":"MEYCIQC3keOGzzQj6F7MoIK6VTB0xsZDDHUOsO0bnrchLaV1mwIhAKHD7+xjvo9xKBNb8NFUiBMTm5sYlCjMB3LUtmPTi2kR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXLFzCRA9TVsSAnZWagAATOMQAJ/hcaqmh4e900nq7cpW\nwA5qZeQvLLzxs3k76YAr320j3ZM7N7Nyt8q2SZqv2kOc97WT3+MLSNxS7W8y\nsdgnNL1VVMbKKQZh5MDN238Sr0hAsZ6dVHffMlX9AjYqfvC34E+QrmPAWaoJ\n3hNRWwnO6ShCC2fhUDtkcODSzxD5SKPBeYq370Bb77+/syaT9uG4JZhlqrOQ\nmkFXbLJld5JzqdEtKzQX+WPAsmcWQsGEiIrTmPFhGqkSKmNghm4rvOwSsLJY\nBDrrbo67+PN5kutRMZIHsFE4ZNnDYhLYH7qN7sQk/u/j2YTR40It4/x/MP/T\nEkgL1YkhTgKQ/uHCNOY3/D7Oihf4yjSKZ0w+Bb3rrtP3VNWnPtbpI0Syu8uT\n6cvHp/5ydD11XAWSy7mJMLAJmeZGSf3t8IAg8kb3D4rUc5Y2hP4Mt8jjf32P\njBg5ByWm39gaO2lid3XGc/isTyJ/DXgajVZsGMqvrHETnMPrcq20cc8KXc4m\n8f+fmLxc5UwXgNJxc7Lx7GYcIofMDvallt7v66AO+boB5v7+xVUkpX+uIh4I\naWq7oUznqeb+eR241CWzgsk83QKpAqH8Rkacjfcie7ibKkuyCrq0iTTeAcGi\nPUKZogUkFjJ3ZTpIes1l6lhfzp2sQsMJRaKLf2hTR0mj1PkXQMoQoBRMO+lI\n+Jn9\r\n=rKwo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"fb19c40caa104a7a48408e7d300e98702fbadf62","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.16_1599910258748_0.20525977592215594","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.17-renovate-jsdoc-to-markdown-6-x-f15a3ba45fc59e181cf0243c8d29f0f2884633ab":{"name":"@balena/jellyfish-client-sdk","version":"2.1.17-renovate-jsdoc-to-markdown-6-x-f15a3ba45fc59e181cf0243c8d29f0f2884633ab","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.17-renovate-jsdoc-to-markdown-6-x-f15a3ba45fc59e181cf0243c8d29f0f2884633ab","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"68fc8d9d6c9aa736d7042ad045d40926488ffd78","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.17-renovate-jsdoc-to-markdown-6-x-f15a3ba45fc59e181cf0243c8d29f0f2884633ab.tgz","fileCount":17,"integrity":"sha512-1QSgUl/m48Q2QohYAQk+D7V6NcsmBsS2VQTmo54gpe5NeY5AUAQaDP+Jxhk9HkGvXgm/dvF6gOOzbvO/Jvd6Dw==","signatures":[{"sig":"MEUCIALQ8rtlq8ru3VrEmaQQYYl+V9lpJR7+vgesLkGdROkHAiEA/G4EyYbLNMRr8yJTZ4tzQ6xWumuOxnMuLkUPU8M6XKg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXLKKCRA9TVsSAnZWagAAILQP/0fx2sAOFBhx5YyfBXNh\nNtjEXazGAEdtu/3wTccBJr8sXfJj2vTDN+yceac9DYebL4W3IW9MyLxJzcF2\nmy2E3n7e1p56vK724+rcbGEHx6180LrTlDLfcGlhSH+apYTtZPKNU6gvdhKn\nYWOaYTHMhwd6clvTqiL/nu+J7jCueEmzt9x+08JSt3409t5Ec+VNRnAZjmpY\nQyYH+w0MZKIovjxQGfqkegQKaiZxNhL/9yjUWikPcCeX3gyFS0CogA0yr001\nrwdSgAMLwzSK7KTw2J8ipqyaJn38b7G5YpKCq01huX7czcLuv8VKwJCvmp37\nMngPQsw4HuxpAK6k1GYqaRF0Np33i5W/FN4gaMu9YS8HoH9yB4sgtRmLY4kx\nKK3pdNqr6zfg7f9U3iwnkPTDOr5m0CKVI57ya4yWyCSvYVMX/DrTNcHR8mMF\na0wfQ9SrG1bPYuAnHXcjvswEIGRKzjAxDh2i5EXuJaL9QAlzb76fYJ7genAG\n0WepKwwLfW/UmxIB9TvHFY7WCOO+CRDMT1Pu7nBBuXOdGC3ME5YXIK3wqvAs\nDiBfOt22k+9xbCG4j9nU0wxrjT2MQRGr04WIUF3Paf4eAt0BKaGoJFrJKQ0L\nZZDBpwWaxLQbDtjCE/rX0ecElMRefBJB4BbgGDp1yLti/iwrOS1ANTQwM4Xn\nErMz\r\n=5RAz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"f15a3ba45fc59e181cf0243c8d29f0f2884633ab","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.8.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.17-renovate-jsdoc-to-markdown-6-x-f15a3ba45fc59e181cf0243c8d29f0f2884633ab_1599910538147_0.4268255063972204","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.17-renovate-non-major-b48120f1150697b486cfe03980d5d1666f497fe8":{"name":"@balena/jellyfish-client-sdk","version":"2.1.17-renovate-non-major-b48120f1150697b486cfe03980d5d1666f497fe8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.17-renovate-non-major-b48120f1150697b486cfe03980d5d1666f497fe8","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"56f69149a16a014ade58489e7c2a637f9e37537b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.17-renovate-non-major-b48120f1150697b486cfe03980d5d1666f497fe8.tgz","fileCount":17,"integrity":"sha512-N2KzTQATVCn/d4R2LO8/kjRjvv1Bz8vmNicnN7D9yzx/n4xatP/wtEJ5R+tCfeST1AvZkxu983u7TpoYUaFWVw==","signatures":[{"sig":"MEUCICvLHm1AR8P/3zIt/gscvlsjkwpeZdA08PZUbOhsg+URAiEAgGWK2OMXi1O4uzw4EzAoeM/5cNbcKG+vdB01zwmYCpw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXR0jCRA9TVsSAnZWagAAP1MQAJZAwmbSg6yp3z3cf6HU\nSv97Ych7DgA7XUNacvsOtyhxcogsaDqaRsIDFUCWBI3L9fUBQOyJm2ds2dhr\nV0/+F4OlsQ0YaoWYe1WgUck7U3MAOjd6jpqkhSoolHgU4Gj8P1hzdlLc/F7/\nNKf3E0uarmb3YeyqcyAGKYFWtjeLCsnR23zKj+4JiBbU5/mUXvjK+HIUK0RD\nbernLjzqK2AaVH8MpsPQqquZZ+kx4TNZciUUbqoRm/XnzWbTPBIQ695Vb1wS\n9Zfiqq9RB6LGp44pd+YSItSIeKuTGREjsGc5uoB8psauvU50/uMJGZgiiMa9\nc83yYufyix2iI+5e3Jj/hYySfMGK92roAh1VVryXSsWt/v+t6dMDVguqYvQC\nVQxqUslY2tiu/RtrhyxLrpWG6aPWT7P5iyKHx2xecyErQM8YRbAi9+q581Nl\npTRfkOK5SQwc0tsk0ff/xb93wyC6eeEKZoAUPquGGDuWiN07b/JjBPl4HdyE\nyq+Zo9GZe1HtPKj/p6NAu4BQOQZIhqSQGwIwA5n8r/pMUop8RscGsRPHcjDT\nT6Oxp2140EkZgrrdLWKkROGcWWenKEwNDpXxENTl2XEBeYJtPx+n4Pzib10W\n5DEosfCRKUZ0NkLZZhIL6fu/IYarMYIh/Yel7Rei99mhydGi4gB5P9IOzCnN\nYYeH\r\n=4nwr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b48120f1150697b486cfe03980d5d1666f497fe8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.17-renovate-non-major-b48120f1150697b486cfe03980d5d1666f497fe8_1599937826799_0.1336760773832717","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.17":{"name":"@balena/jellyfish-client-sdk","version":"2.1.17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.17","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"4b96e40c4bdfd5d417f224748afdf9f501b900a6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.17.tgz","fileCount":17,"integrity":"sha512-za1cSQ0tt7MNAgICZe5NUN8aGMPVMDcyrGHOhQw41xLcQIKEI9PFXCu1qh3emJp04dL8zmV6EeJ1YwWRhIqJ2g==","signatures":[{"sig":"MEUCICeAxklezDd+pJ3whkp13vKiu4Ko6TWsqpsMgcDzJqjtAiEAvkjHzKCjKmyNzURdAgHGs0ChGoYoAW/fNdULQq0UwJI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXR3FCRA9TVsSAnZWagAA75AP/0wVRvgBBPGTwh/XWTuJ\n1Li3Dt7ORm0rnCZyXxWL2njpJTz9zahxFtTKZxNw4pHSMPcpZ6pNHo0CA3JZ\nk/zKZ9L/dml+DvgmE8IlEAbzQCrmCRgNYGE6DLHpRwINHoaZaRZ5OWIl2bbD\nZcmF8qScgVxpwCD0JCiqQmI12fbhmyiwrND8mJk1uRFnTUUbUwZjicHi/wwF\nzP5ekhw7DiUeOqUm8oj5KyU4KVPujT4407grrlo9CumIOHCH/yOF5C6gSee0\n7aglcgVoLqhjKrHIZCiubm9onK8EkZkB/j8SOKAK8MaHJkqCHGcYxmy8oJoy\nRoSPRt8pM5AEceaIH5gQtdne514mkeO1SG6IQNIjsQME+gaDLPHFQHq+9S0e\nBHw6CZ9BCj+LCPiMLCuJswzPzsPKiUrc+GKT8xGS1QfkN6IVTvqT/1YI7+ZS\nMAqxgE/GhR+jUYtKOavH1gNnsyS9uhYd0IIf1LBSbXi3bnSZ4GNAK06pVbXA\nMcY3xUh//h5IInm12n5Zy7eJ8Z4IprAfktcBKJw/R4PVp1/3O/nXjz2ohrGv\n3gXCcMr1pxrQFZpp0paDhlUjTsBp8Ub/el1/rCrw+7zqbDPAgMt1XJAUQ7Lx\n6P92iCLfSQNrVCt7DRw1prZxXZJC1ktUK6qDOT9c6UoI773ILIBFmos1nND2\n2le4\r\n=0NPE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"a7a041d8546b5a7fd6b428056e374eb9bfbc433f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.17_1599937988767_0.3854043058415555","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.18-renovate-jsdoc-to-markdown-6-x-292c9a4ba2b7f618bbe04d9f6429ca3ed8d1499c":{"name":"@balena/jellyfish-client-sdk","version":"2.1.18-renovate-jsdoc-to-markdown-6-x-292c9a4ba2b7f618bbe04d9f6429ca3ed8d1499c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.18-renovate-jsdoc-to-markdown-6-x-292c9a4ba2b7f618bbe04d9f6429ca3ed8d1499c","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"ba18f0c7836c194bd2e695aa9d067e89d87361c5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.18-renovate-jsdoc-to-markdown-6-x-292c9a4ba2b7f618bbe04d9f6429ca3ed8d1499c.tgz","fileCount":17,"integrity":"sha512-obbXIAocYTjZvsLEJbdz9J+cLwCf2N9E4FzSPWuqtzWu+I0LhBZgVkqv5MdLl5KhcnlpwGJUi2iFL12Dj5V6Kw==","signatures":[{"sig":"MEUCIDOq8153lneLD840v8DxXnGeAuTIc7eOr+3nFPVFhOxhAiEA/Hf0aFY4IIP/5vDJysx4EIFetsPBbG//kEJd4PnTlXo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXR6ECRA9TVsSAnZWagAAMZQQAKJ+83YFZBpdQD4ONgLg\nU9p6igN45xRZKZQlPsSsaSeTwbXkDkudjBaFMuxVkuj8lO+TmMTWMyHLd23E\nqVow0BXtvyYkB+JxM3+WUmmR54qZ8CgaPF0hwRpPiGxg+4yyUx7BHk2VAuj1\nQOTSpA+TMyM3CH3G3Hh9dVMdS89X7XwCkrZEYNZFJbMkrQ4S7QNbTJzy9y0p\nafctGpBV+WxA74EwOiakxK2XKtWp/nwxl05/j8rqGqug+Ft03mB1/3AL+dB2\n5psFnDPBjPDxUEWvOJqal7f11EBFPNMxImwAHGfCilncsQ1nWg7cG2zPbqwG\nxRMbWLcXUW3bEE3MrMhnUBHtuA3k6KM2Mk/7dyB7YEQsLzKh3GsZToyijabP\nIH7rkzi/0xJcTbqlhWPoyjy95XahXREYZdngXBEiE9Ccko471jaNktfdKrez\n0+yEZlIXnL7L6p1y8NgzWhKKRU9VQTCvYN9Cmtbu+AVyt2DjZEn6+D2Y4iBp\n/Yx7+zDm4cFfLeuanwxlrAhUmPQXBLER3wjSgzGwyAw/1TIQixPUzgvDDjww\nMJZzYS752odoxwhsQ9iGyusQUqhVeEGPbJxTDlYxnHzqgUNymOdHG+3VusIi\nSqCXhEeyz73c0JVbUMmVLR/+wtx/FlYiEOZvL+4+umw/k0kA9avab51Yu0mh\njYAe\r\n=Ku3Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"292c9a4ba2b7f618bbe04d9f6429ca3ed8d1499c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.4.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.18-renovate-jsdoc-to-markdown-6-x-292c9a4ba2b7f618bbe04d9f6429ca3ed8d1499c_1599938179832_0.6487623354713852","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.18-renovate-non-major-9adf1c92fc8400112a74d39d4d1ee5c211a4e5f2":{"name":"@balena/jellyfish-client-sdk","version":"2.1.18-renovate-non-major-9adf1c92fc8400112a74d39d4d1ee5c211a4e5f2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.18-renovate-non-major-9adf1c92fc8400112a74d39d4d1ee5c211a4e5f2","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"6497d313510e43f196bcacd94165e5326c908c29","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.18-renovate-non-major-9adf1c92fc8400112a74d39d4d1ee5c211a4e5f2.tgz","fileCount":17,"integrity":"sha512-KRNSYZcYPzC6iLgyisKUE4nBZQTz9LZbi4T+oKu5B8U3kcX9+YdVMppwPlOPeHgqY8dSMs3TFE45e8QMDLobuw==","signatures":[{"sig":"MEQCIBSLvrejSeOeQ7eG2FxTlkLKksronTqV4jj7GWmIFaCxAiAVGrhL3uAAyTsYYSXPLv2lFQ4p1OjUB+K2gKgk+ihC4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXyWsCRA9TVsSAnZWagAAk14P/RdYidYkSMdWtBnMz3w1\nIX8g6x+jPZbp6QtsWUOkIK20/JmnHbgC81HEWfZUvg2ehaDIDl4OI/Y9DJu0\ncXD/7Zy2SDeuHDrNelUnTh9N0A+ksCa1uTA/VkezcDWOJFqrPmLw/cJMbbYb\nsA2XX03K6wDa2WBBVbe0hPUXSDlPfSJ82V1vaEMoPfispt9la4HQG2ZIWjcR\n/7CI2vXK4sYhsNIrM64KYC6jbzyJGiA7rfNJIJvDb5gjCWwMIfMBKPFH9dDO\nAxzTtkqzdWZiNQEJ6MKSw8GroYeMkMstASNMNpe12Yl15v5SfYWqriGJHBlj\n1mfD6CFkCKMaFWzxUHgfAO/UpYnmVmnTZnpv2XgSl0JKIGXo6rptzgZE7k4f\nTwEHPQvxzGuZqnuP6jD9Clq/VYgMJC/zKvGxU+FsIfJQPzPmKbRHe6t51kp9\nE0dtRO4Wq8l7G6A1c9wLgd6ukcQanGtJntwrNdNOPMgFYFWGWoLbVwprvTCy\n9lvaGtuF2kqbHJYps6H45R4B11TBzX3msBmANsErzDyX0g/oh0smCMNRKGRc\nCVXVnfVDEonXRakQLvlqHSEKcOF+czzKta+MCpngeGhMquzBLIpXiYmBjsQa\ngJbcynxXmqfi2bO0njWWQTGBfhnb9VdCo4nkj5KdxjIOvbqHTDdwuj40R797\n4Tru\r\n=Q5Oq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"9adf1c92fc8400112a74d39d4d1ee5c211a4e5f2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.18-renovate-non-major-9adf1c92fc8400112a74d39d4d1ee5c211a4e5f2_1600071083560_0.16240213921673874","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.18":{"name":"@balena/jellyfish-client-sdk","version":"2.1.18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.18","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"38e9f74eda809c2f5fcba5229faea7dcdf7b3dd1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.18.tgz","fileCount":17,"integrity":"sha512-DmD7mP7ADMdnRNLp4BLIVwMlx/7lw53QI1oZSozQyMPPLB7+19dm2jxKgFKRufw3aHLxkZeCJ0KooBr0gtkifA==","signatures":[{"sig":"MEYCIQDAjVxjQzSP7EoMg6QfiwR91cZcalMVygyRf2hbIoLQXwIhAN8TGivEDu3eS5gdXiGfd3rS6m5MDPSgDad1wEj6V3hY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXybnCRA9TVsSAnZWagAAOnMP/3OGWfvPoi5fZ1U70etK\ntjkd0edhpXf+Z7O2malvMoUdjWe8ZkHcMua/w/Lg1HeMKwcbGeIzxx7+7wG7\n9H0XiO3nY19TvbyGvxThryqfDIG2xlKRcVzF8jUqw/V0qpRLMtKm33xQvwKk\n5pM0ufZZgrhBqCIrmpBQwr6bdUpGTIKOcNb1BpjcS7dltNXPejRltvrEDn4L\njnYPPHQYCYRbdCfHhiQRUCegyZz3gYv3if6f0dFQfRui1I2vGCG4HTjnaQpH\nMaIiddYjeu55EOMzTxI+PfHOyWePXcGxJxDrWbPwh2Q35DonEB3UEFvdfllF\nl5w4GLOoQQ31Q1oiSGs5/JNkX9dzMuY+ddlH60ORNoiP5IfGuR0OYw8GoksG\nF7uA5mZrHvguv79FeliOi43q/NiTDJgZMYsEArmQakkLyVRvYfl9XYJeiQai\n9hquTNn4sForIqZyvVNFNHF0vnY3niBFNJeHO8AwaYScYAHT3scMEP41pOQ3\nuXGWW9clDyOgRXELWudFlbUtsO4yCbVns9mAv5LJET3m2vkdSqe7SI3pAaRI\nVYoTaVSXNdyYATFfxYiEfhKeivT4AABC9O2zl+mer1PjxBt6zBEXpBPpS6Mz\nAP1Lmn1xNyiz2solL2YXgrYJABk2z9el7+4q74Uum7pZk7/ofyhuC1OOWxR6\nn3sw\r\n=BX84\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"a87bd775e563e7f053d33bce53a2f762b064ff21","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.18_1600071398693_0.8422556575648961","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.18-renovate-jsdoc-to-markdown-6-x-07859aa5683d8351281f35fbc111632dcf0afb2f":{"name":"@balena/jellyfish-client-sdk","version":"2.1.18-renovate-jsdoc-to-markdown-6-x-07859aa5683d8351281f35fbc111632dcf0afb2f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.18-renovate-jsdoc-to-markdown-6-x-07859aa5683d8351281f35fbc111632dcf0afb2f","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"892ba5ecbea1051d5aeb89e00ca8051e7fa645a2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.18-renovate-jsdoc-to-markdown-6-x-07859aa5683d8351281f35fbc111632dcf0afb2f.tgz","fileCount":17,"integrity":"sha512-nPolZ8YwVmL5PwcyUqe6BWsNtU/lvqGPsuMIavvJPg97YpdwcGmiCdftVaDceqje95w+5974jnjKz3dt22GaTQ==","signatures":[{"sig":"MEUCIQDCVqgd5VbKIKnEdO+IOknagrGtuMkZDrX58nAeyE3FuAIgRb6ge8aWOTsJ8dlyrTXA2Cm3voT8U1eA6yFmafqGVFs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXycPCRA9TVsSAnZWagAAmLIP/ia2sZdVVYKqDK24iycy\nZz5oiw8egnddD4cI9PyhLH9bWuAMbMCj3E1ZVBlG8KRMjfJinWvUby1u6bP9\nuj+XCxaISCjqHzMOkQqGy0xPhV50Xwiz0H/5TKVZm5/Fl3epcxM51QKD/nJk\n3HuPCBau6G9gNFMEv76TuYRKKhq3WiG6UQImOocI5rxAuDBBSTkzUBFH6SOr\nFc9XmcnclnsD/tn2pM2HEunI/ytCuOOlnlgVeGJdTaBvnQGNANROeminW6Mz\nQCq2iE2FDU39Qb+1iVYe0rdsFXnJ6RFGviEHGByHllyxD61Sw7EPEtCl784S\nvOHnzYqtZdaivux44cVXsCYXV4hwcX3++FgwSaSDI0SZVw5Q4fVrux2f3NAA\nSz/TFfxGLOcA/BCUPQXAdj6Co94eu6CMufNPUtPPGxmPYbFx3Xtf7R2XKJC/\nkbISQxAgxo1vfVnsBBTSO10t1juuoqelmE+1aMQoPYrzfVVtG26eIFTvDpDq\ngRTd249/8db0xwxqwHIL9bK5+tGT8088AVij+Qsqi675SR00Og1L3kCMNUAy\nVPdYMVAM5dBhUbUj0iGsXjzF0w7K1tESIG/wlV1/uAIxMESyXOpA7aLWVtPn\ncfl/jitxXOTDXDKd2VXfsHHCjspY17ukNYct07VYY+1GYfWrZ69fPMZXqsrh\nr7m6\r\n=Ffrn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"07859aa5683d8351281f35fbc111632dcf0afb2f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.18-renovate-jsdoc-to-markdown-6-x-07859aa5683d8351281f35fbc111632dcf0afb2f_1600071438945_0.4911440013857502","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.19-renovate-jsdoc-to-markdown-6-x-ad2d984d68c164233cb9e74e0e72823bda582b2c":{"name":"@balena/jellyfish-client-sdk","version":"2.1.19-renovate-jsdoc-to-markdown-6-x-ad2d984d68c164233cb9e74e0e72823bda582b2c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.19-renovate-jsdoc-to-markdown-6-x-ad2d984d68c164233cb9e74e0e72823bda582b2c","maintainers":[{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"e8ecc2b59c12a9b47af25fa3d78b3117d02dc0e4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.19-renovate-jsdoc-to-markdown-6-x-ad2d984d68c164233cb9e74e0e72823bda582b2c.tgz","fileCount":17,"integrity":"sha512-0+5nWOf8ko9MZa741zcGL0+MIdve71pb3ThkqX06zWULAU60zCJFLj29YyFeK8qdj6KVxyopUqSgopAAbOKrwA==","signatures":[{"sig":"MEQCID6E1aFsyx6aTwNddIaJJKytf72ezd2UDj0eQxowvUZpAiAp6q5gSYaOmuTnyGDzUs44qy+VG4qHSuCgWLXciSDFYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXygYCRA9TVsSAnZWagAAPEgP/j0MbpeB4mzUWbgwh+tR\nxYtGS2gSAF8I2HJpSCCYagpCQV9t8vGiVFaE6WT9XKu3mdsS1wqJIJ9rE9xq\nlShOmU5ghp8UlwX6gTm5RZpiHveAu8gdqtlALA+r1NDYD8xgWu772jXmUVhJ\nrVjJcZh5ZKv6Q4q+dq4eRGuPOzts78Ef/5oXvZ9VtSsmLaaEK8Z4MS/Q2klZ\n9KjfyC9uFsOTH6PidPoF7FLiy2Tt3MkhvO5Ymz7JinGg4LhmmPOSGnz2w78j\nbSZpANfrNo4qF7kvFS0QOJ17hNgaxxVeqNz2nHHgjGrNdmKO5S2PJRGQuIWN\nKXIL2AzvQS0g5oOLs4TonePsiClHuqRNcW5wAykvMrmJplHrMd8cNcx0EC6w\nHWzCWpibTJTVKl+HV2NxiA0Pal5iNajZ/DcUeSUov4mlampiuuPFWj86TbNc\ngP6LM8Ag+16Fb1aa8jc1AKRnJ5jGwYvFXKLqVoKn1xvKomgjh11ofXFFTS9G\n9X4rfoAAL5t+wXaUXbVIZvFLVabRyLVvbgFsT70g195wS4r6UdPdgbNXh2mo\nMXEqQCGbD8AnlnMyjMYygyPOafSW3vACmhBO5NS97Dhhcfe2eAuMYR6ik3Xy\niPk98NR6tP+KuGwK5636eSN5rTqV32g9hzyn0BhUdo6dr7Yej6F8oLPhUWXR\naD1J\r\n=BCbP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"ad2d984d68c164233cb9e74e0e72823bda582b2c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.19-renovate-jsdoc-to-markdown-6-x-ad2d984d68c164233cb9e74e0e72823bda582b2c_1600071703860_0.8526827333758147","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.19-user-feedback-links-bb81af97431ceeafc6a2eb8ae493e0574e3a72f9":{"name":"@balena/jellyfish-client-sdk","version":"2.1.19-user-feedback-links-bb81af97431ceeafc6a2eb8ae493e0574e3a72f9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.19-user-feedback-links-bb81af97431ceeafc6a2eb8ae493e0574e3a72f9","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"400d9bdb1a10f4f85722265a8734bb2b2f99da41","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.19-user-feedback-links-bb81af97431ceeafc6a2eb8ae493e0574e3a72f9.tgz","fileCount":17,"integrity":"sha512-PhZK1NVsu8/9Ze78GlAjyjPuzA6AUT3rVUMN7K0vJMYMtcl+DU2fOb4oTOpQO6Py6R4CTgc+DUEp7NIONkQ8ag==","signatures":[{"sig":"MEUCIQCK/UBQIQjUBMHmTrnYE5P9mFZOdVwGUn9zXF+uuG7C4AIgH1V9TTuZyHG9G0rgQk8tJYaaGZxi2mPWPpKiBtjMgsw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYLvsCRA9TVsSAnZWagAACTsQAIhySZsUg1YWXhYd07aK\nQtpmBZ7NNWICypGryJcYM9IgAJWYuXh7mlEXg8apNwjTNhGhc2gslMhhvYi3\nRKPFi3AiQyPRmWecRDsLrWJWT13HqGI65sXvnUVf9iiWYWdrsAtLA+pFoNa8\ndFWl6j8zBjnyPQJzE5WD1DUVvzvJa3A6zhkL2ujHbJFgUNt6iYSn5NISXsKN\nYvRSPsbO8loLbi4j1iXh/tkWxnHKVna9q3yL/IdcXmhZxek59QK/9mCZDZ1X\nd0f8nXcQciL9qHn2veO0AmjM+LHcqOvrWHnu6s9ssZvHNPG950LP6OJwxnPm\nPPHE3HaM7hN5Ev/yEVcFhgMOFFsfVxqVUHAcE+2lj7fZorGvP/E+XH2qFnVm\nxiu87pecvVprruUnfUxYHSHv+j2wB//dK3Td4S6feFeauFpG03r2hYyUM9js\nhy26retCj6rSSk088ieAG8jXBj/KLrXp48GxMxLCcP5RwH8FgJGRyIbkCX7q\nwcks2krpD/sMw7ez0Xf1PhuCzV4eBGNCOXupOYm1+bNDdQCfTQ4f5KpeZ5Le\nOzBBk5DdHxTcDHeG6mB/teQWEnSIyQflKrSINukFqzjMOQeVnT8q08Yc8HHw\neNwBHrHBgtWKE3LMYDRIa7BAXhf+X10lEWdUdkFpvvCcwStKqnTZ1UFP+7P2\nno8H\r\n=0n0L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"bb81af97431ceeafc6a2eb8ae493e0574e3a72f9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.19-user-feedback-links-bb81af97431ceeafc6a2eb8ae493e0574e3a72f9_1600175084330_0.050867111492056916","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.19-renovate-non-major-9bbbbaeae4b0de7bde2597e24cd0c8d290fb36c4":{"name":"@balena/jellyfish-client-sdk","version":"2.1.19-renovate-non-major-9bbbbaeae4b0de7bde2597e24cd0c8d290fb36c4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.19-renovate-non-major-9bbbbaeae4b0de7bde2597e24cd0c8d290fb36c4","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"9595607cb81c9387628db57c79f92c3491ed388d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.19-renovate-non-major-9bbbbaeae4b0de7bde2597e24cd0c8d290fb36c4.tgz","fileCount":17,"integrity":"sha512-XTwM5avAFEEG3aNcSQ6MrsN5IfqYFv/p5RqFonQ9PNOFN/cK92UzhZP1I9Z38LI5ytJnupBrH8QuC4JN1DbmEg==","signatures":[{"sig":"MEYCIQChrFTzgzgYPWz7A6ya+amyeySNz6uPGKV5q8teqYzrvAIhAJu3zFz7IxpHrJoiDCzEZd8kOmqlBA4S4/hWisE8kxKc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYV02CRA9TVsSAnZWagAAa0wQAJJ1JvJis3OJV4LgznYn\nv34AZtCb0iFzLdnq7AIoEd2yrj0K33w6eoi/oCfZ9QK7NFlhjeY2hEhMso9M\nmGFTxJB6JaRGn2PF5HJqstq88eJDBIHWBxYcgbO9rA0dh/oWlsDgVGONrs1Q\nWL5HzS06Px+tUEU9fCpNa2Oj1tjkSpkZ597VKsX52oVybr0M/zy4AZNWovdM\n6LN3S+QdQ+urstx0pUhJBXTn5j95LNdGh6SCA4DDwbBAoQbXJAOoigf7QJUD\n3a5FQdzJNjrTqefugwPBC1crOgZpfBZoY3PrLwkR7HRrIRsV2cqWzTr81U7G\naSPDp0hMXfKRLsx8y1woM10nOh918kLKoBacQDO+HmAQS24eMvrgn7B/zcKf\njXzvyUVC508PhRoUIatBfcBcwmOmgc/7RwrzLlWXf6UAbQPaEEITnjZ4kQPr\n0QK483u2rdwktQYc+4HLNmkU22I/CGebSHCWZiZaRTTN1m5oPtzL6waXoKu8\n3aBVgwEwhyxw7aZbdge6NTrU6+AElLbrDqHkuR38t0APl3ExHbDBlQPItCC6\nLrbT/VBOlVVuU7K2U9EC0Gul/QfEVzgLmFgfL/gwOhl76a2RrW7zW2DAULt4\nZQex7RdgiLxP20r0IFor7g3lpBDX3hphLOmFMFKIX9HNi+lKQbocq7dm3ubz\nebxC\r\n=DzUt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"9bbbbaeae4b0de7bde2597e24cd0c8d290fb36c4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.19-renovate-non-major-9bbbbaeae4b0de7bde2597e24cd0c8d290fb36c4_1600216373747_0.7427238682960176","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.19":{"name":"@balena/jellyfish-client-sdk","version":"2.1.19","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.19","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"dd3b2093ec37c95833ae8c3a2118013694dda04c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.19.tgz","fileCount":17,"integrity":"sha512-LVcZN5fK2oPfm5OAVgc7sVIEMLafXTX7FOImC3iSHS9hjhIHP6S3KH+cUqt517BJueX70gt/Z/WcyclxbHDDBQ==","signatures":[{"sig":"MEYCIQCkt//D/JVwcbNQAxQ5hgl9K5pgxqEehoh/uEsLrSSeDQIhAOW0YauooH7sJ0QdW/jyFU5b9ha7u482Z26XzgLab9II","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYV4WCRA9TVsSAnZWagAAXsIP/1vKLc8z/Xzl4M8eQoof\nHNZg60lasW5a2fq3+La2L5w8mlp78nzmWDg3oj/RbSWaMjHlZ4xa14hkbqzq\n14q+9RRFHIJuDaOUXw/u4x+xUo7A4Jdue7J5GSfOHFkJkCJkCbUCGmApr2Nn\nkgwXzSbbRbGqDxUlqc3LOniba2CLSn++lBVIaX/lMMHMDC86gNHX+WW4Nm6l\nd10nn5/kHM6DmVY4gC7lHCNzRi/uvIjIbe/63JUkgDVVha7cXwprl7wIv043\nzzuNdfDp8TMeC9Tq/WbsAxCph8TgwNfni+gnE2aswGFiJAnHVtVgHn/NwcGX\nqMyRkxMQrWK57MgwZIKTb8BWwHZ88qn+Cd3LYC96cU2wBPjxO0GUlBtNM2++\n/mq4I3pxy40f9C2dp+3qY+vufg09XJGJxcRiz5PKwOvypqdIH0FtbNuMazkU\nJYfpYLjy3Oq0wOsTzoXcmLzK+wQi+7c+sryI/bbpOgziOLrpZv1mEmO+WHBL\nLAKuNG4FWFNPtsZtmtpu4uc32NvuD24LevPefOqDB9oPy3jDp+xpzP+1G6/v\nzUlyHgwZl9yM08dem7ykMNd7tMZRNY+RJwP8MmJpjkq6g13nMeiT3unRHkoq\nZ+yNCypejMZ/q+aTr70lZNphaNCQModY0U8oPh3d+1Hu0y8W1Zkl03uK/cI1\n8u+S\r\n=HEWa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"042b876c96e301b6cd7def464f58918ee28ae508","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.19_1600216598225_0.9364447956208481","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.19-renovate-jsdoc-to-markdown-6-x-4c06c0f5cb442f9b23eafe4505650d6d28ed5e6f":{"name":"@balena/jellyfish-client-sdk","version":"2.1.19-renovate-jsdoc-to-markdown-6-x-4c06c0f5cb442f9b23eafe4505650d6d28ed5e6f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.19-renovate-jsdoc-to-markdown-6-x-4c06c0f5cb442f9b23eafe4505650d6d28ed5e6f","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"865b26c32dcbf9443bca77f27602bbd56bdb2656","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.19-renovate-jsdoc-to-markdown-6-x-4c06c0f5cb442f9b23eafe4505650d6d28ed5e6f.tgz","fileCount":17,"integrity":"sha512-YxiEfq2PVJOrPdCth6koQxDTrSKwKli2C/KTAfRm+fcVds17Kp7hSyeXIGVSiSv4fKxvrWK75pm6FFOinBGz3A==","signatures":[{"sig":"MEQCIHGv7KAvmDiNf0i9bXKMIdq/fz4cf/kokmUaHHQDrBE2AiBuitIkhbvCbDEozxwF/9l2H3cPlTDyMDpft5ARp4wHQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYV64CRA9TVsSAnZWagAAiaYQAJTH5vWcSAZEm83NojK/\nqYC/p9KYtjm1ZHDGfQE9PCQ+0v82X+WIHGYp45T6ZuHSNe2jS+RdkdBnJ7De\n7CXsyWhZ4TJjO/HxwI7i99JUU656EIz8SMNOgOcZkpQKawbcU3udNwtu10Rm\nlCKOCpIKzgYzlB1gzd4yWJpStlBBBv7XLEmf8fhnO8iRJW8oK7m3j483elMW\n4Fk+PE9h/pQ/0pqucooA07a5nAJXxXHR26cK6J9b+45140R+6HEdNUrh8038\nqaVUj34WgZOaZpW692lpAyav9eeYAeA3fn70xNDfnvkvg68mwTgXUDMB9sHm\novQVK52xDjRA7/bcJKQPxVBiEn1cXPCtdfZapdFpWTZQNmbYs88QlJxUl7xs\nyeL87Bt70k3/4hJHPa+05epKi1jViExa81fyTv/lgyPiUq8cn+hO+Rq9Z8e0\nkywLHwkwabk1p1eKgPzeTGf64s1gt4IcLyQSgGUetqhg4RNY4Mj22zI4jzb/\nByAiVX2rrZJJ/gyHXbOblputFVAVyFZ/wqYGb60lyhO7TdleZlMZjsnj1U7c\nLPmgUX6E/mhJL5LVi20eaEgf4YM6xLxmT88oU02YO8X9BQ26fxl0RtGWidJV\nyQKvCYOxKc82V4y9TKZOFFp71wqiV4rg/YmfzNcLme4Jq6XrjqS4MCmn7sUQ\nK5QX\r\n=aNxz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"4c06c0f5cb442f9b23eafe4505650d6d28ed5e6f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.19-renovate-jsdoc-to-markdown-6-x-4c06c0f5cb442f9b23eafe4505650d6d28ed5e6f_1600216760161_0.4736122261417435","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.20-renovate-jsdoc-to-markdown-6-x-8f461f98e6a4856afe007d59abafbebbf6f1da97":{"name":"@balena/jellyfish-client-sdk","version":"2.1.20-renovate-jsdoc-to-markdown-6-x-8f461f98e6a4856afe007d59abafbebbf6f1da97","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.20-renovate-jsdoc-to-markdown-6-x-8f461f98e6a4856afe007d59abafbebbf6f1da97","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"4c5a5c5a2c3724f2e9e672d91bd64910178405a6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.20-renovate-jsdoc-to-markdown-6-x-8f461f98e6a4856afe007d59abafbebbf6f1da97.tgz","fileCount":17,"integrity":"sha512-pY4U0kyWzxMxgQx2UbsCpPQrreRx/pcqMdxc1LEihcKdPrUvq3yhrEP1dtP1mrdZuheNcSK4WtTE6PkPkQ7gww==","signatures":[{"sig":"MEUCIQDdyiKmvyVm6VDIQeN11qx4JwA7ags5MGhOGJMOoqUbmgIgFyvdFuT6k3JihBJ9I6ECrVM62AFSpWX0jiXQ9f2j3P0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYV8/CRA9TVsSAnZWagAAwVAP/jN1k9R0vJTLuZx7TcDH\nQfswPY18buiEMUcrO74+HGWSZWwgkv7JH9KbaFKrULcn8Aldj+oPwW2NRPC1\n3BnH8DXmTeEF/G4IVtcvLG7rzuLT9501I/MEVf3efWmmO9Lrwkutb8/qnD3D\nqwVL2jNtTRi5yWjCpTkMZ7y0AtUUQUKrCpsUlNn1YqO9MrIKXfNzuzBMkX5S\nsB7zTDDZhCriT9P2T4ovu1/IfRc6xSgl5oc63PQ6xaFbaVQ9pVz9qCtugrCE\n2mFGR7G05urVGpzhsdmRrFt4CIHczXkdcGNKg/0iMpH/TgCvo/gUAGHe1Xnu\n5l9lOyCOzKOWdxR3KL4NrmUNrmIL1uB1Lm0qwB2lxE9+Gx3FP4vzazChs3+c\ns8adqSCJIW9CckY4Uiwd//3ZBvwL8CeQIPbO+neC5NMfcSB5t26wrGEsNKx6\ngXhC+zBc1ebyXnghq2InoQG0A8D+hp3JZ8f/iXdzfneaV4dtl93yuElJoWfZ\nSUeUHmSti+PTyw5wlryvjIOzLBphtQQZB1xPYIK7m1N7H8BPjzLs7YipfZDJ\n0UHini94/GZk++imWWHCpJ04O19ULrAj9zxmn7V/bWR9en7omGUh5bi/W31W\nF0GlkXqT565sm8608iK8ITOjQjqu4oOs0T9MMw/JiWFE/CJIjRXShgcZSE+3\nDL6l\r\n=ohGo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"8f461f98e6a4856afe007d59abafbebbf6f1da97","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.20-renovate-jsdoc-to-markdown-6-x-8f461f98e6a4856afe007d59abafbebbf6f1da97_1600216895148_0.3536881466579278","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.20-user-feedback-links-147d0f55b910aec06a5f1042e54048200e8a443e":{"name":"@balena/jellyfish-client-sdk","version":"2.1.20-user-feedback-links-147d0f55b910aec06a5f1042e54048200e8a443e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.20-user-feedback-links-147d0f55b910aec06a5f1042e54048200e8a443e","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"4c8ca72d5a899257b46ff804c3cdd252e02fa27d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.20-user-feedback-links-147d0f55b910aec06a5f1042e54048200e8a443e.tgz","fileCount":17,"integrity":"sha512-i/sXqm+4d5ZlyP2JZaZdM/CdddV1N8Eb7juHe2Mtx4tk/I6N830F3eECW1Ijl0fPDfRh50pCpLh5ICeWXTetpw==","signatures":[{"sig":"MEUCIQCWLBcTEtf9B84/VRxSUh1w67I+9ua3gzxOP4q555+OVAIgQzxRqKKd/5YKSqu33YDo77hSeoCQXXYDo3OaA/Z8A48=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYWOnCRA9TVsSAnZWagAAKs8P/36WKwZl+yF72Y7R919Z\nFYZVpqdZwQNAGAp8ehRVO/PuU9m2zDFvRZ1b/mTE2kz+spPicuk7VavrVo5H\no4UDmn/KaulJRSnxPfNmlFLG+pqrKhfUbGWSxXcrbP1itoDbVuzTebQjDD7B\nJszc+8ddnzOjyEkCX2ZnUDKAUFTxIllrGrpR8NUaFNxW8Js+uv9n8ybgHLdh\n82jGZ1q2srAtMVtbeOmYmuCIFfUHXLOBsbnyyem15iV5g0JhUJSXF9OZ/GUr\nvmHsRHWxxZgoZiWU4SsUSZdwpXOTOcKmtIWnbNgKIvMtgxb/DzWL87flmNel\nUrd3gTbcFaZJSryo8XcRM1mRfeLrFntVyOhgcsCNaz3JOsUgRtMxgtUC4HqT\nublM3MAjsDw3w/tfQQs1LzZIMIvE40T2zsrp7j2cYLUXIlM4LQ5/tOdE2AQP\nBG2JYOeluYAsP5NUYhcokxslUIGXjp7+PqlnZ+ciJgnfSDCcDbVzFvX3P6lH\np2BOaRw0fYBkhNzWymkKtnneVYRrwCzK9j8slX6fB+G6E3A/hwq/J1NrcIHQ\nabDFtXFy2DMsMl+OlGp6RfOO378FcBeFLMi92jGvA+6a1XZYlKOgVrFODJ3O\nPgXDaaltCwBMJY6x8MwF/YVd6eae2AqPdoyuylgMgdhWTcAjSlX513rVEKSN\ngz05\r\n=cVDO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"147d0f55b910aec06a5f1042e54048200e8a443e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.20-user-feedback-links-147d0f55b910aec06a5f1042e54048200e8a443e_1600218022847_0.3882423060768605","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.20":{"name":"@balena/jellyfish-client-sdk","version":"2.1.20","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.20","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"f4ac792083ab2b83413b9c04d4451b59474a2943","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.20.tgz","fileCount":17,"integrity":"sha512-2MuRC7wZ75+xmB0vmrfpwz593PI6dnHQO1HaUlqLgaUzZ2ST3Tkvk5qKrrVe4dZ+sKlfHTbTpX0sKeAdx5JcyQ==","signatures":[{"sig":"MEUCIQCoK60PVONppzfkhJ7PtbueZnt2ZwXlUZlbnG02MwN9YwIgQMSb49JHyDaDojSLULNjQphi10wObrRm6KgfhOC1nus=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYWRFCRA9TVsSAnZWagAAPeIP/RP473pbQ59649yhof5J\nkanFcgOYzSa2xAgsbkHx1P1LkqYoL93th2wCiKFqzMAyStr6l5HuCNOUtNzX\nAeTNH2VGfgMKL176kAuNLHAlSpMWOG/MG+FgRPOAY3ZeTZOCzzNAjBNcrgXY\nzJpwZ7z1cE6NlfWCO+8uk5urQVLflozyrqrJCyqxQDLZ9sm7TlpMI655rs4y\nhigbt27dvS23Pnkyd8NOvcQUHsI8IcCAPhitaC4kNcVnYtsBzHuhJk7wcvgO\n5qiBDoF+E6apmBlfWiGKobot2LSxZjyDY0KCqiyP6cFpUkrOOGPFHIT0W545\nEQJq5DANzq2zPy8AerrT/IzDSMmHv7IOXhrnT4cVFGM7D8JKzq64CNgmAbW6\nHLmUN+6ulPkMIX4YuFzylPibLVdPzVPUHhqF0xj6S4MYGV2ndhtpIv/yNV8i\nYdHDSedkRFwt/3xSzu3W1JDyupNKCX6npvH8DGNS1BpPjzfxYStnfcpDIjud\nWQM1Zr4S84T1wzY9zy4ZiXGUnlKHSaJNajFJOaclfKQLmAtXobydxS/yT+Ue\nTOBcZzP7vrLD0Q7jzGre1xCDW9CW4aslZkYuJL6UsV+wtL8zUHnOEdVcIra+\nohoC/KM8y9DVqpyrjw1DoZBY+Ox/m+0K9WJktc1Ej25X7Flkf959K0vONO6u\nPLe3\r\n=75Yt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"21edcc5f44b1dc6b01484a85e286cd1cfe17231d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^5.0.3","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.20_1600218181363_0.43078254828641716","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.21-renovate-jsdoc-to-markdown-6-x-1f9f5180a602dadac7f0b605e477cd9b97f2d0b3":{"name":"@balena/jellyfish-client-sdk","version":"2.1.21-renovate-jsdoc-to-markdown-6-x-1f9f5180a602dadac7f0b605e477cd9b97f2d0b3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.21-renovate-jsdoc-to-markdown-6-x-1f9f5180a602dadac7f0b605e477cd9b97f2d0b3","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"0919da406bff158b696ed5ef5f3dfd4e40e65272","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.21-renovate-jsdoc-to-markdown-6-x-1f9f5180a602dadac7f0b605e477cd9b97f2d0b3.tgz","fileCount":17,"integrity":"sha512-zHRvRBPblN5nvphULs8Bk3f/o+7/5uiF3q2sDQhNEJJsMWgsg5L4GHkWUWI30+M/5Hk4ICRB7hwZOHGwqNaRNQ==","signatures":[{"sig":"MEUCIGuSJC/PhcXljz0FUP1YZs+Im6KoB26TTE57KuhstvDzAiEA4APb2jyFenrod0bsDVBNu2VLPNFhT/H/d0gDsYY+4RQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYWVqCRA9TVsSAnZWagAAWmsP+QFJ8COyiaLSCKHn4lS5\nvofiFgi3eG1HZKviMEIyZMx6Zt1psSiNssWzo3zHKTGRL1zcrseNKtld+Gsk\ny6nB7uA9ky7z74/H4knNz1+AHLmEFVDNYQakGTNW97aXc9Q/0pGWcaoe0XaQ\nIHZM7NqqayYn8WsE1oVXNa4zSItxE+9NJqP3UfaJ92iWlen+Ry6lEZY3eHIT\ndV3Ywo15D2+CzctmlzsLF3grcX8yHarAWEjAeyMihPZuF+ySa/WKFCkgohAr\nFgCesyJNPEtlXlovqcUsahfKJupGEuUKdjFdA1NeiYMnEusBtao1iDBCZhhQ\nnTeBHDrML1mBfuvxlR1xOdTAJ5m/cdNA42B+tpbsRealLTkN7LLsKhbT4Vzm\n0Gyo98Lx6ir+Ho7DNn2siaYgH4byemeItPOB7YSUPsRdXnY+RJbCUtnbnqdY\nUJpqUuzZ1eN43whZ5zIpyF5s2hblRLXgsFTiCdYEicdfELT9fa8Wx+envvPo\nMfPa+68rzza0buzTRu3ZOz2cOyLPKnANPq6+74ss226UYYgzOcLjz038qjIm\nxFDswBKX9vfdpmUF7qQ/D2lRBBP0ZzWwCHJXf+LRJy+Bi2EK4FiBqjf0luQD\n8sNsCOwiqj7MQ9ST6mY4qFsxqIorKCjO1JzjRhKbC1LKe1NHAt5udOFBnR8T\nXAI1\r\n=kBAN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"1f9f5180a602dadac7f0b605e477cd9b97f2d0b3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.21-renovate-jsdoc-to-markdown-6-x-1f9f5180a602dadac7f0b605e477cd9b97f2d0b3_1600218474231_0.9849004594325173","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.1.21":{"name":"@balena/jellyfish-client-sdk","version":"2.1.21","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.1.21","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"7f4ba4032ef51c25c0652235a0b9d306021e5e52","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.1.21.tgz","fileCount":17,"integrity":"sha512-ZLN/vhjBaVTaAcfgB0EgdufEXqDLONOLOVSsLZl7hri5uaBSpfVFGDS4FQtIAhIoY19Qfkd+z9FOJgKUgfhbuw==","signatures":[{"sig":"MEYCIQCUeRRnqM8kk1mIMSdkVaVVa3r76BvlLbfae6EARAQCNwIhAOBBWBq4DtqvWkAuRH0keLM4UG5Uro0XmzgthHCEb2+9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfZcADCRA9TVsSAnZWagAAoO4QAI80ZsnlrMa1L1ZyaShB\n6X039lhe6rMO2c/MsMHspxw8nl7Tp3l61ZDPLQoAp/Ef2TXrhet/bJvPuzZc\nX725yxYPHXczAgukad6fRodccc0xXTsKTVsYJUY2k/wg8ZcuhaWNS5kuqBUk\n23J2Il4//vYUnMgHbqM7nxo5PK4T5JMIbPpg49+cm+kEunAOI7TFwlaP6Te1\nVPSxrz447Hi0Y/02B/BpjNP8Dp6tzY9imix3K1ESI81dlgF1zJLI49Fja7YJ\nrwKPQOBfue7nnCDvRIfCZoqde4fmh2Hc1Zihr5KYbzm/7b4HwpOhIIToAy0y\n+CHd15zzQPajevm3xxWDfQHNOhSmmy6nwhTY6LmPOdKXApHwRrELLrdVwdUI\nC5H6bi//yJQ6gx5LE7iSQPj7cxj+cL6hlt445L3Zt0DCMkK3i6jA5jdih+z8\n3KpeU3DonyaDuUhKuj2CbPq4iDhG9CqSifWGWcI5P6EdYr046AuHKk7n+4Q+\neTaazibWBVXrVRTNmEkHZe6S0RN7aS7nsaKX/9x2qBPObWnHtiSD5BPLf0dg\nvCEqDEGzx9YIFlppcGQMtOVjBpexKXveGR6T0whH7la27apZ7hfFo48u67wH\nAwWvRZo9dFHVUB1zfJ7MVTcSP78gcoHpVOH+jqpgP6kD9mC/jjygeGzEySeP\n716Y\r\n=sJRJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"fa287bf5a32753a981e92c67ad5ab9d9c88c32f2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.1.21_1600503811247_0.3503827004929725","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.0-ui-theme-relationships-e50bc6366910741a3328b325be705645e9014aa1":{"name":"@balena/jellyfish-client-sdk","version":"2.2.0-ui-theme-relationships-e50bc6366910741a3328b325be705645e9014aa1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.0-ui-theme-relationships-e50bc6366910741a3328b325be705645e9014aa1","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"cd704734f00e4b80d7ca3d398dd678965a86435e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.0-ui-theme-relationships-e50bc6366910741a3328b325be705645e9014aa1.tgz","fileCount":17,"integrity":"sha512-Lj9oD30e+kKWPvSyjbLi4BoYkFpV39YpgHnhyYoSPQ0fL/2JdngJC+Kc36waf7Sn3j1Xf+zEbbKt7LqT8bdx6Q==","signatures":[{"sig":"MEQCIH/q2SkH0+uEdL3Ru8bw2OAVhZE2keuMjMynARqorAgtAiBrjwutctocBNckLSOUD2xZQcC+8pDOBGt3FB/1O6Mzbw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa/mICRA9TVsSAnZWagAA+t8P/Azp1ygSehx2w6YbreaM\nfNXzx2typAVHc4PaL4aOtCxIYhcz5Js3TigZuWm5b129bKxl9igAaUz3lTlx\ncYCcNVKlx0U1/s11VP+SpdUhF3N4Hn0T+Yo8VrMlLC2qFeM8MhxIYkEu46Ru\ntWAB5FYQC7rIN9sOAu4YtNp2je6VubhaNNWPxTVOQdjBGoujKUVjwX5+GsTz\nIcNn10ahxmsUnQ0cD5QkRXy2P0E65GMt8n+eFBPGEHX5TdZLRIaujYC3vKmF\n1+yFmE8DwsPzJDHVXmvRK/DVLWUnoCAJbce6nkMUkbkDfeg8c/4BuIPtV5nK\n5SQBbfz38swwbMeIGDR+OidWO2iMwijUzbVWsYudJIpNKSGEDJdSHATlQPng\njjpzT3KKNA6GFn6EO/b8+Nl82hhNbs9KzTPNpgNLcTOJRxnPjd1wjDEWxW1T\ndJz9NCXjCwGNidcDSMZDSGJORb05hx5Jbsh15NnBhWe1DH8N4sIKXdL7KxMc\nPJv6HZm9dniiosfdT1A3AushQqVk+zHcqhCBiITzlpJR6A3jrcboM9ZIs5Co\nzQL7l/4V9SxiRNFVZmBbdpv3iboU+VxQvHxv8ATvWnFoQmlAkHvhvORx/ivg\ne/vIiEvsBZNxz0u7whQxjJaxNYXLwHl1JzAORgTDqzJvPEO/E/jyNWlFwlTa\noB6s\r\n=wLVJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e50bc6366910741a3328b325be705645e9014aa1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.0-ui-theme-relationships-e50bc6366910741a3328b325be705645e9014aa1_1600911751726_0.8311448659479685","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.0":{"name":"@balena/jellyfish-client-sdk","version":"2.2.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.0","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"65b7f4af60c8683f8309e8d45d2b5b33f863c784","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.0.tgz","fileCount":17,"integrity":"sha512-xT12VPpVBuuHYncpwMQryPgEtTlDLRJxeOFbJI2VyKGaFyLvgZcmIFocFQ5i7bf/q/5imuWg9+2dj6q4cpkw/A==","signatures":[{"sig":"MEUCIFobA0Yt/Ta19+GfgFdM20nUGH9hrPWZfTc8+F6tsBEhAiEAu5OGiFrOEuQcYogjwN8RqyHghhiGt1mgPF/k0VJcWzE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa/0bCRA9TVsSAnZWagAAuAwQAJRX3P3G+hCqwJD1M1gG\neRFRQASQkyMkUKry4s+V2v8ZRq9tJBT7CmHwJqPyTRvjkGK7TSPWYuFBfg+D\nM7LqsuLEwVMlgiAbujFeR/SLEMw/kBrnuXtdLtMZrPuZ8pVLp4nPKr/XLn6M\nrd6T6rlxWJ2RZYFgkj2V7MyRTcnKwo1gCk/ZTUR/rgZraA0AGXZW7l1c4J/l\nNXh0AfWJIstUj7ncDGXYqP24RlerBngfaM/N5k7AhYzhEi6+5yV8w3yZ+7/e\nbeolEOY5MPOJ1ETYoFve1a97E7tk9StnncRpD/cltmMsE234G1G0DVIaI+F5\nWhMyAWU8QempXJT56u/ouEyfmVV3v8aH2Hi3Bcxc4ELy2RART05JaLMMqVNw\njXm4K6hvW4RnMfyq6IK6wNsUjwiFJ1Hg2+oE4QrQrO8uquAbHEAt3Nvh1jTZ\ndI6f0ymQoIFL9ozH1zzBZUJF3fw80WEHINJSHcVhIl57cqHhAgXEhixjHQAg\nhywomXUSlDokHrmqyma8sXEFZF2mqjZybY6kkK13gd7uNnCRLAVvmeapgTNc\nGA+4lDsb0F/MilpB93g2nMgXk0aXbbbJYPZ51BpIFZVXRUsBfiIvUIuo8r7g\nlkYtEVu0ITcTWx2+fSwZFL+g2sQdUPEemKWF3ckHZq4ad3nCuuz5beZ8tPE1\nSo2/\r\n=K6RG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"c2b633834c9c4f4753c38f1743ce5e3f9b9e02f2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.1","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.0_1600912667129_0.9665107239402608","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.1-renovate-non-major-2cde5528383f25c356bb696b465e620051aedeaa":{"name":"@balena/jellyfish-client-sdk","version":"2.2.1-renovate-non-major-2cde5528383f25c356bb696b465e620051aedeaa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.1-renovate-non-major-2cde5528383f25c356bb696b465e620051aedeaa","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"698386ddb598d8e86c561c4dd3d4c10827c59421","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.1-renovate-non-major-2cde5528383f25c356bb696b465e620051aedeaa.tgz","fileCount":17,"integrity":"sha512-+1/kUohlUqmil1PfHB+1JAKVLlbRWkhJtFDtsS5DNKSW3lNFDMnORO2HYRzVnp7qLZOcDvqN6TFMjGLKRbgNJg==","signatures":[{"sig":"MEYCIQChSMKIfShZey5OuVYdEIcNGwMd9bRb/JxC1xMwW0zoiQIhAKFPGZl90bVSRPRfXxUm4pRvuDo436a27ZUYYdM9U6Kp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbdsqCRA9TVsSAnZWagAA3DYP/jquDxufvlZCf5yIYTJq\nHOuVcZNkD4laqsJznsA8QM+KprCsLYI1/mW0JlPyqp65eyxDNBfTUz76VJ3u\nLuRxxtUE7878p/wpP990fh80bNMr3qEcq7oDZsPPtYoowv8T6wTtvtJjf/u5\nLM8coejwqlDM54GK7GYd0HqTmYjj8PjtyqeKAhT8gVg5EIv5D/+YF4eSrV2y\nGFbMPfcxvDEqlzsCw9UZ1aj75eh8hd9QBxuuAT5KEcZSgOSLfJt4NNIsxF9D\n2EO4rbbJvBvJoTbk0wyyjdKIzYJk3apUgCReYXYzWmZESidvK5wD3KuLcDsB\n5UjnYhUnrlQk6CX7sZ79dK78MfzSQ196uA65Cz/52JLErH+6XOSZgUNwVInX\nlZClLU2ILeLFj8C4KMB1wq4CYLhM5y52eECjB55V8jBdFtKCbQkEl7Wz4cHo\n3T1dyACleG38v1HN8/yZ8VbkjAutH8Wk/HZ0MI6j4SHa9TWP3SuPdqw8SP3S\nx2yvqoP/gcrwF0BuUUL5XIMIJvR8oB4Iz3CjAxLRoyKqBHxy+6qzqpCsqwCz\nYkBHNpYAPlkiWnqPf8+NBP5XQ3XlqHwAXoXCFMOj5/1jVTA+LXPcSqtDymz/\nWUacO2tbgb8DKY2r3m80j3//G8aqbXtMJDDB5qVINW13V1VidjbLoEDbrUUx\n/Ek4\r\n=ykJX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"2cde5528383f25c356bb696b465e620051aedeaa","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.1-renovate-non-major-2cde5528383f25c356bb696b465e620051aedeaa_1601035049976_0.8325623786433378","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.1":{"name":"@balena/jellyfish-client-sdk","version":"2.2.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.1","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a2d2ce872f8078252e51f8678ca25921b358529e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.1.tgz","fileCount":17,"integrity":"sha512-mgOVKkItZ/gMsnel2/j+0SsRzVk7U5Twcojh0MAdr9COrxak0xwIRgNN5OYYiajRDEY2bSozuqBWhrwNKEiojg==","signatures":[{"sig":"MEUCICJ8LE+F5zzLGeeSatNaCJdQyJZvczsUv+QdcLAe6hU9AiEA+XtLBtFIVPnX/TJOpZ6NrK7Pmtkaqw9ikMcXEuroNdc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbdydCRA9TVsSAnZWagAAbs0QAJ9McmytjbOBCwJuu0R/\n7eAK6QBgXdS0fwi/1aWZFn2F9Pb2iwTDjyQZ1irFxGjIi7UYcSqjvyDXJtCt\njNdC1qFdpmHswCy7Co6iA1G4D0vPqtB/zkq1dk/1EQZjSy+0RLUOWMFVlb8m\nBDye8nboZnPjjcq9q/KvUo1Yb3iax1LrukEJXL4k9dyfzUimS20MSWlYf+Qs\ncbgW3BG5PzqZh0zFWtGSxfRnal3cckGFShx9uvdLRJOqvimG9y9GyFBwvFBJ\nQPdIoBSsStSvDO8VDiaoYf1EOthXdkzBYZ4BFF2ZxTfHTVIbg3UFcltAUJU8\nUNQ78jfyzMvdgN6HebyqEjAA2WhA64kL09WWnxSarPd2sdESPRJDCtf8TzCZ\nUxJZk+cy75lyzl/vL9zcUDa5hc1pvlw/+cHGOWQyjuNw9GLRqqh+E+V1Vrf7\nuSvqeFsYOWosAQUR0dR0tqaviCkIGczh24hBUTFM1RrDqWWhiVRcCNm5R+Ye\nS0w2zZbcefWsq75l3yc6yFlksPyeHo8hPW2wdQ3EHDXhPqQQNfU2UO2z1MqD\nLFpV/Swy+6nTrui5QbNtpWblnoEpW5dye0aZsQGwrf7hIu1Xww5SL7R6gQVq\nOpDfiat/bi5JKj/qM1tZbYOU5CAjx4lbd2MJFT9+QdizMFMnNX7tryHgSplA\nk3c1\r\n=7l/a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"89e45762ae4e74920a08989615e3f6a161b81062","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.9.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.1_1601035420860_0.3575271060937788","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.2-renovate-non-major-0a0536926764c9c026e448dffe7d1a6c9732080c":{"name":"@balena/jellyfish-client-sdk","version":"2.2.2-renovate-non-major-0a0536926764c9c026e448dffe7d1a6c9732080c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.2-renovate-non-major-0a0536926764c9c026e448dffe7d1a6c9732080c","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"1ce04bc07b130338f23a0a2470520bd62624956c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.2-renovate-non-major-0a0536926764c9c026e448dffe7d1a6c9732080c.tgz","fileCount":17,"integrity":"sha512-8rJ3aB2q5QUu5QphkUpYaaVTZTGdc4hGkEF1a22AqR2EsPEP5P5wJOMm85/e573rlVYe6OnSaj3F1OhFJc1Xfg==","signatures":[{"sig":"MEUCIQDo41UVjvB0/FubcCEwZSmkDtvXEz3x6TRfkc0F0ea/jQIgUnAp+0FzPafc2g6HGAGbkptLaQnK/pmx5Pcpb/i/XEI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfb72ACRA9TVsSAnZWagAAxe8P/29iQbs8ZgW/IpHsXl6O\nXxaZcOHiLGr+H63kvuc5ytYThbSOvM5kKzkFcgSojBFCcF/eYBqLZQ8J3lt5\nfffNDU2wahCqYE3YXRZxeR9HaluUoNnP1WKcSLmFIFElO8CZbyluVUwp/axH\nFz2pUDs9oaP91W9hVGH0Puh3+cLzJ2x903XMQK/LmwDyA6zbDP7ojCjn3bXc\n3OGV6MpbMWkqXcO6xvvqXssjUwIYeQtfCm0xJQ8C7stxjh/HFkWxoWXKMBK/\n1doPams6qSNw5xlbahW3h+uYYFZYiHu6V8QjJ6/cQqruYTs24gHBqHHi/GY4\ne0Cxq6q9i9dfKVvwianm6NtCT/NaQUHdIi4fAyUnL9BXeyVuwV+u53ADqrgc\nPVkh+5qI6IYNNhKGJ89IfiPsIboX4irWXAdCdep0Yz/9PiFNKri3Se+LWaI+\nr0pd1XeZ+o7aq20jDJJ5pc4SFCdnBWGO3UGuxxvhLtXubZzcMCTHwQXmXv5t\nEtRfFPW/acY8+ptU9O6190JU9z2md8S2HtM+p+4kvofXrRDIHx3KoLYPHkx2\nWUPRg3DSL+ZEIC5RpJCoGno/GWjUVEdeVbA7Ee2Huu//GieUH3y3lKQ8tke/\nvgujg2OE4wyHsdUnZiNjcKvNc8bIDNZMIZoHwAz5LDnQWe3bympwCfLUlfpW\naGA/\r\n=3ehm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"0a0536926764c9c026e448dffe7d1a6c9732080c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.2-renovate-non-major-0a0536926764c9c026e448dffe7d1a6c9732080c_1601158528337_0.35831176955756483","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.2":{"name":"@balena/jellyfish-client-sdk","version":"2.2.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.2","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"7565988243de8635f3c69f43868585b9b1ac4f79","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.2.tgz","fileCount":17,"integrity":"sha512-Nfz4/K2f8q6KR9sK2ZZk5gXNMGkfxwAbYTdg4EQs5z9KLyWwRSA66xdbKnpRal+/yTToJIWx9m7oelSNuINtAg==","signatures":[{"sig":"MEYCIQCwRj9nydWF0VAI2IpLV8KU0AqHXF/56L+gCX+GTClPoQIhAOiCNMKsrqRDNV+m8RwMmt9zrK2hQbV/0uNyqG0CdwX3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfb76FCRA9TVsSAnZWagAAfxgQAJOGm2p2DCZpT9Uaf7so\nvMsIXfaOHEkfi4ZoJkgUUKp7dr8sMN6ljDYR+uiSxUp4lwz++wAaEGPJYMhS\n4TBCr3LT94Hj1usPUn5HhlRM2l7pEZMB/tx2trZ/SAEcu0sT/LjRfZi48e2D\ns3/5qnP3LsxR2kLX8w0+Z1a6NHQPqq5tno2LZwQiwbVnOsaltnRXKGL8C31J\nf6g5o7pMmR4bHZJ3nITzZD9A36V0Z2vq5KK+W6jYx2MJXxHGDn6dkqR1qW1j\nzvI5Qc7oXDVH1faO+0bfw1m7+ABrK7YdxDXVsYW8Y0u9PCOFi/xFS69Q4XEN\nvenB2tW7rjDR2/avFJTY5nlX93Qi0ceFrP578xvea8SbUYDgMC64RtYkJd4G\nEjkP8QzjwIS7vq5KvOrjWwxpHmv91o2DQ681Z7v7Xqvr7UrpPuyJdnGeQjJC\nrp8JD0IajsRF7BoafDaJphI2KP+MWZ4/hc0JiyLONaHuxi9idIAZHKCk/grl\n5dtVg1L0wJbJjKAvBleRQuhnDsSDT24peLBMAoXP828vTXf53czi4kVUc4cb\nBho1ND4W2h99FoGXL8ZjzeFpcLS2A8bPNBy3VJaxfdWX4c9uqHp0/L3jix/3\nzVCCClnoNIkL3G+51v59Iu84P3dWOThcT1uSQqwJN80ZNBwSPYcz66DwKEyo\nWwQg\r\n=E28G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"4f8e26e6c08b2ed79734d5f70da6f4995b2dc124","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.12.1","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.5.2","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.2_1601158788906_0.31945446504336483","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.3-renovate-non-major-c3e3976badc4300e31d79bb50e93605a5030c262":{"name":"@balena/jellyfish-client-sdk","version":"2.2.3-renovate-non-major-c3e3976badc4300e31d79bb50e93605a5030c262","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.3-renovate-non-major-c3e3976badc4300e31d79bb50e93605a5030c262","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"f5549cce839b68f143914c4043dd33e3dc71fa5d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.3-renovate-non-major-c3e3976badc4300e31d79bb50e93605a5030c262.tgz","fileCount":17,"integrity":"sha512-ndKS+NKkA6ofk0RMMK7pqKg+hwB3IC8nvab/eGCJYjUhBwN/TvzlXN1Fc5paVyH26jynzu55pIVxsdglU7c1zQ==","signatures":[{"sig":"MEUCIQD5p+mJwQ0x6AvqsyHeukfvEUwN8sY8Hj0va4peM6eYyAIgdg2s9SJ3+rLwSMjX9fjP9jGTEPYJbNUujsw2A5qfsNk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcLNxCRA9TVsSAnZWagAAJqgP+QDsLv/iEfrkG4qVwYZb\nYUUvpWCJFtlshQrm8fEYhxVpbCP2QBvIK6PzArTzoIQKNWW1AesDlEw8LdcZ\npvJhaC6fds1jIZDGAUmTTa4CD4gZqwrpZwOeZAv2PQz6NlkLdayRdfkLqFbA\nmWieHZuYe6tHu8/mVZtwObqzOa09PRXHLeG3qDDplTEj2//TjtjO/fxBTa6k\nOJsI0fLU+IE+16tRw8a87Eqj7L3iHtZgb17wVaPL/Qsj4di2gXsGy1Kj1jUG\nc0GkcoNmwF5Dya4QcAwBIYhvH0EY//4sjIGiFKPRXNHVJPt7cJB+EAuVid9i\nIWjE/+y6EmickRxKZczOY1UrzP8zyhCaoLsTHX3YHM9e7Bi+cWr7DkLd/+Op\n4i/ojjXJjUyFqqOaJtGkpW1smqsws+MTl4gWuUVXM7AkcC2XQXAEEFz9pRfn\nZIA/1xGRDacjudW5m9RXmbeJyfO9VdjE5G9Ye05oYZ5vPnhZztrJ5/HDnPP5\nAngjJMOu+8kLZKxFOCxae/2M35XsrQ76za/OhZjgRNaRrRwzItUKyLF56ysE\n39Tun8AobmzTNAReuZhrtRyhlFVyhk1mHcUWYrU3XEwMpRNq5TH+hdlLk6AP\nZwDMXFBBc6ZlKOvJfy1CqFTLjVsfIQivxvKqS0pqYKp4UZ13C8dUI1PnICN0\ncKs5\r\n=Rgbz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"c3e3976badc4300e31d79bb50e93605a5030c262","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.3-renovate-non-major-c3e3976badc4300e31d79bb50e93605a5030c262_1601221488475_0.7315768096264657","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.3":{"name":"@balena/jellyfish-client-sdk","version":"2.2.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.3","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"cd1d803ba43656ea57e07f0a264fa5d4a2db96e7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.3.tgz","fileCount":17,"integrity":"sha512-8Tb7ZMGQJG6pK5o/R7REYd0IOv5EcyUzDi7ZsR1qgiaBn/NHRzECPEnBMW2JWy7U/Qrle2etg6DUwqw3Nwtqhw==","signatures":[{"sig":"MEUCIQDisvM3MN8HWkGRMFBEFGgnwUHwtMF/NshEqdlsbW2VlwIgHE8NtcbqS1W5MbgMCszW3byVjj/YnMD88rbiPG1zPu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcLSfCRA9TVsSAnZWagAAvPIQAInjaXpFppqO0kY0MGn+\nUUbG9gqaAAl8aAeJRZonUjmtn55mGjfrfXwiLYjKShbp1ro86hyhwqRWmFV9\n17EJ08Ht/2kylG1D0tlzJZu5mOyAgW2M6LKjtA5HkMrRrHbLOqmUzaS1uo95\nLcqK7Dh01TEoAWbijaLoAJx8XXVBhOeHH/HNwx2ktxvvKKs0NeZ5YNu/hgUE\nkxKDYQr8qJ5uUg9/lgyHfvI4GtPiTIL5f91eyXppFQX3rHc9rnc+G+4q3J8Q\nENVE0UtyZ0rSUbfVYQzMvNfn0zsh//On92gVYJ0D27pbpij9rMkF4VDx/8mi\nE2s43gxHKEF/li5t0iHV4e3RrQ+1/J67iKkxqfrDk9WMcTm1fVUjOpJPQeiG\nI2fZB0Slav0tbW36GViK3/qjmm049FeQQ9wk/VteUIIJN3MOdzHc6OTCDT1t\n7A7iYaxe0fhLNNVfKjGea7lnX5Nx/1l9BVrkMs+ZV5UY0Oi9RCl8LLN63mbz\naE5xmMr7dkBCyC/tr8i+6N5PRAV2ynRkIEs8l5xZKiEYE+5WyOKsvZ19MYCI\nVIQwmbaEaqKPH5QsBOgBZ3LePUM/nFC06uYtWybiMlcJJwn+2iXSscvNlvmM\ne7T7LteeO/+Zo0Pv2ri6hN0+EZ1EQfeK8zOjCPdH1+2cnjlkYzrDGEOSOuYQ\n1eTr\r\n=/hz9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"c3abdf94ba2e72c87bc665f2c1887b8971f76bb5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.0","eslint-plugin-import":"^2.22.0","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.3_1601221791128_0.2583044924130198","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.4-renovate-non-major-b654643ebe6ba6543138ec6485fc1d3eccae5107":{"name":"@balena/jellyfish-client-sdk","version":"2.2.4-renovate-non-major-b654643ebe6ba6543138ec6485fc1d3eccae5107","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.4-renovate-non-major-b654643ebe6ba6543138ec6485fc1d3eccae5107","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"becd739e62e45fd8980eb8dac805db8b84deb01d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.4-renovate-non-major-b654643ebe6ba6543138ec6485fc1d3eccae5107.tgz","fileCount":17,"integrity":"sha512-YiW4vQIceqaDFtvzx9ds4zBplMXu7ftk+U5jr6CcVb06H2BX5J5wK6aT4Wo1d74iaqF5cFLk9cuVwr9QaiOTyg==","signatures":[{"sig":"MEUCIQCnNb9MXe4M80FtRn9zHKRp28wafJnQFVfrxJPiGnny4QIgSbak1QrY4wWx87vYaJvJKSgxsseupIWOqTE04DOk2LI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcUCzCRA9TVsSAnZWagAAgPYP/28iaJZ5AxQhBN5EDppz\nOKGMzdYK8K64pmYadhF/5WA1+ZNKLXq2J2G0gixOd5XKZ2uRZ9m70WnhJIW3\nMhHOZK/FxQrXEa7EeWcuA0Swx4bpoSlLIG0Ak26qzhvCDNNbyEqxdJXWucAq\nsY8T/oezyv7edjYnt1O0b+qvnrMyxICbyUy8tiMubSSwXOG87KxVbdqLDOIu\n+6+V3H5EBr04pM5hu65SHiqd7uaix97EiAoPFkjTOxo++xRtXAQbQqdxDQdM\nVyAUSeDxKx+RZ3bhWkqSIl5bQMJnDuypu0v+MVfGxFoF/YiSQACAOTB6Omh2\n0DPAfp/E35RwHgGqJznykGpNxNb5JkA+X+Af4i/FfcusqroCk5H2uv+wiSsO\n/qMiE6fPeB1aIKwiYjBZ7FDEY9QNRTF9ZYCMWA/u+zKYk1pk0s5VbUtQX5Bk\n7kXXZ73LQmX9GuLPmzLv1Myl1w+qjx1IV6TwvwZKj4shWfylVCwOP+CQgPOj\nc+XAxS772E2+tPMD+92ROXeJM0ou1gRRVEVUAjK3CTPViTlasldJZ7ja7B7e\nbpgJB3bT2/V7L6JobGEDuqi8bjT877EzQdsA/7tSc1iv7OIMj8YCKgcTxZis\nyJJsx50mO/ThV7nHCdLpUlq32xTV2kI43/YOQqDZNf0cs2KpZYbN1Oeb8ABW\nfN+e\r\n=ngCY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"b654643ebe6ba6543138ec6485fc1d3eccae5107","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.4-renovate-non-major-b654643ebe6ba6543138ec6485fc1d3eccae5107_1601257651390_0.06904500946786651","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.4":{"name":"@balena/jellyfish-client-sdk","version":"2.2.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.4","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"97335ec689a3d3280bdb2f02cac3db970501435b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.4.tgz","fileCount":17,"integrity":"sha512-/Wjzmf7iXyzoBwO/lm1Qm1vketoDa6I4v0FsewHCUxMiFds5dcFL4MVBS7Ux9kBHU6yo0hR/NBKA+uZlgMcGkA==","signatures":[{"sig":"MEQCIAbJkDhUXRd+IcjgumzSUvLaiE0jSIXnQTkTQd84u4AMAiBHl9bc89QGkgGHj9V951TN5eC0s7CLcuovuq9Y9/Fhpw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfcUFvCRA9TVsSAnZWagAAt+QP+QHdoe6Cgdzh9FcHNxBE\nzR9cJFk6REbv+AzGBdLvVGmDA0b0VmDw2X5kzr3kuuWUD033JT+s7d2hhc5f\nEu0CamAyNmPPds8Lf+iy9oLdLJG9JWdsES+ylnnIvUp4oRZ4/qdthB9ZdIA0\nlr8v6zfGfLdIHeKBrh074TxZcNee9ZGcwidyUzwoRte89eAD07JPcW0YA77g\nfxQrRJquJPSYS32udmq0R/Fp45JmIgTdfBzTOzsqyVLYX5S7+btbaYHg9B6X\niI+rFklV2Nc2BJ/AbxS83b7pjna39xriEUUtq9pGVQjsAAeiolYvyur+On9/\nLw/KY3mIXfqKbKW0Cf78yf4F8Fz2jmSBkmz0vSHElaynix2Uk4kxR7cVVAn4\no1/8DdkUlwM5+4JICIqsrh8I9nD1uyb82er8AqiCQ3EBl5e1myr02D7Ja8Ad\nMDs/jJds7dEKKDCKgAYvj+Su6v3ErAk9Q3UEond4Nb9lHWoztemJILj12+Zn\nyLa4SYWR0fLZDaSXf5EXZ4OdrepaVnFIQL7YNEZ9k7oFrcEl+8g/Xe0n97mM\nNQrxBtSX/g83BWBxaF382ZvsJ9qtwz8f4i5k2hJU7ntL2JqfrU90aRlAvEpx\nudDxVvBvsr5UT99apQOaK0UuQ6IKerXO/OTNm8z8K20OSVFyKeY6p9Drp1mC\nrHWN\r\n=p9OV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"c86eb56e6f4f791b29b8b9c18af2aed50a50c687","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.4_1601257839172_0.8162851099827502","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.5-renovate-non-major-4e139a261cd530b1d29b199a9f6d6432624f72c2":{"name":"@balena/jellyfish-client-sdk","version":"2.2.5-renovate-non-major-4e139a261cd530b1d29b199a9f6d6432624f72c2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.5-renovate-non-major-4e139a261cd530b1d29b199a9f6d6432624f72c2","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"f9d69ed04cc1d151d5e9a27fbd541660124032f8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.5-renovate-non-major-4e139a261cd530b1d29b199a9f6d6432624f72c2.tgz","fileCount":17,"integrity":"sha512-ni5UUJwEdDErsybSDSwd6QCar7fb+PxKumDGmQJ0BuOTEX2G3POycgE3/cF9dYBGiqWNgnLlXZKN+2VOoTJRbg==","signatures":[{"sig":"MEYCIQDQG72mGuDY+lZQlITL+EXkdWD51hWjfULxTdvPgromjgIhAL6/rTWBLQDVTCP1b/Nls4HSkt6syEdcQFv/AJpmXIvL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfceAiCRA9TVsSAnZWagAA+VUP/jIpzEvNl9/28pGz42Rq\nPX8nmDoaSf6LToAldLEFbVzFQlsbWq1FCngg8l7uCvyK6rTqMHJxBOSw2lzQ\nZhCP8N4CLClGIkH/yAm6wWE6shDQG1E6/Xcozz2O+382pNddS+zxsvQE0oWG\nD4lsxdvR69SIO4uRQ4htMtsov9xsHBUH3bUqXUQHOBnZw/DhO/1QxHBCqQ6v\n1Fs73WeQN5BlUG3kciGjnVjiYgqoEsGZpOGjKZCZQ+y9y62vb9Af+xjZSnlI\ndhcx4zvjwBiMYZ+fTyKvf6vRDddm3CWxqLLopTTxZ/r1JMSgVENjvCc8M/QZ\ni0woCG2z/OBbfvtpUmFXvAIM9Ez9w7QzjiKRzGhve6l8kDPaszLVHpia+usI\npIaCNbMss3RaXiZOp/TCckp7glPJL0tjcQc/MzVfevtRhcmUkY+V/3yk3Fkh\niUmSkn0WoIzAJMuLiNitkf4E9LNjhdKjtvmRZyXsUL5GkI7jPZtvo+58pI4s\nR8q/FyfELaRT730iYgLVMs2oJQTjeuKs+qdcyI1KbR4vnYMy+zPKB8JHvIjj\njrwinhceSkGRUXvo8vnbCR1RiADUVUAWA2KAvZOF6cU4LffFWnONA2KMGuuQ\n/TmcvEZ4pK9jfhBs3VhUEZ3gbLr3kKphhTisQYNOzvCleQSf5jPg1/6XgLRb\nMyoP\r\n=3CAb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"4e139a261cd530b1d29b199a9f6d6432624f72c2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.5-renovate-non-major-4e139a261cd530b1d29b199a9f6d6432624f72c2_1601298466124_0.6351669361206032","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.5":{"name":"@balena/jellyfish-client-sdk","version":"2.2.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.5","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"7fbce987d265e745a0b5b65851e2391e616c5e7c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.5.tgz","fileCount":17,"integrity":"sha512-oxlqFR6OBT+mTpAmv+jluCv7z1nGIoBsdzPSnEVaFN+iG8frcOlgfdkU2OPuzGUabj/HpabSwYpvIa6lcUCRLw==","signatures":[{"sig":"MEUCIAW8EqKnJO1IYtRjA9zHLDPuCPx0iCT36B2Tt1YllOH5AiEAtj9x0MLuBjfpt/CwRJQxytlwkFKqU9H5ddAvGTui1r0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":136974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfceEnCRA9TVsSAnZWagAArZ8P/3G+OzmmPFaCKnAJ2ZlJ\nJtX2YEO6hODTapqIJoeurF+LlSTRKkIQd+L+BBAZuXJhuyYysNygW0Ab1xWz\n/2N5xt3tT7XV3xVHLuReSRPWMfphEnFtOfzsPTJjglbxL1cJ40A1Sd1LOqL5\n7aJ9LtcOP9y5ffGRhkY401QOYuZiqjUcXRZuNtoc9IiLDvt2KXMNxD/g6HEP\nwiarRLT1B+G8511komhcCKnnW/9QZ9fJwIAV+ijs6zbDHYOttAlNEtjWF7US\nFxKg8ntKs9TTIWbava2FmP/csRS4wtALkjHFaQWWG78uktUBFNShrPoT1aWU\nwWnkyeYqiNOwQHgbBCePnUJzidM62tYsf3n1G3o27QZvPbEC7/AkhW/F3ePE\ncb1Oc8cWem3RfeqQZGSMN6DFRWY9miJTRQEZBrybrq/BFr62CmtQ52Ad7P8H\nd7smsjrLpUKY8UgOeXVsKzZmJxKk+8mIJ8A36nb6NPxfBAVbbfXQ12xlYjOu\n4C6lfjd0DWT0gDEdJrp3Zc2QQhkaU/zp5pSrWr9Mm6saZkcwvfCPpmiWnXE9\nk0D+ZSg7dxC7jOvRL8Yg7qEpwMNSglPgWv/j/w+07pJw77TdioeZXsjpofrI\nD8ipkTqosRzRrH7SAlJlT4HcaoJsnIIv5ffPqQghRux8wOcrUzh2hYvJYJ+O\nNUO7\r\n=Cote\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"aadefbacb605ece2bffc322c8d6e702ed36fd64a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.5_1601298727086_0.29295480695056053","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.6-renovate-non-major-21c804bb721487976781c5dc63a4faaf73c0553d":{"name":"@balena/jellyfish-client-sdk","version":"2.2.6-renovate-non-major-21c804bb721487976781c5dc63a4faaf73c0553d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.6-renovate-non-major-21c804bb721487976781c5dc63a4faaf73c0553d","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a818cbf92862d904df032692ba3ebe5e93b677ca","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.6-renovate-non-major-21c804bb721487976781c5dc63a4faaf73c0553d.tgz","fileCount":17,"integrity":"sha512-7opvBEqQPxIgulA+hT8+Hhy5Md8DLpIbqLwoMynMDgwGmuTIxZVr1HirYlnUesztB890R8VqibpBFLk541tCTg==","signatures":[{"sig":"MEYCIQCU4Gz8kP2YdcDpYcsbQPZRm5lYXdb7R8ZEn4WnNHMVggIhAOvNwb5X7mpOObU9UNf85TIKc8AGbDul5m5LcG8Re3FC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfc1jsCRA9TVsSAnZWagAAd1wP/2LvBGNjaAfbrBGVaTmC\nX0StSe1ZyuSfzNTWzmcdzFNMl5FArDV2QmpkcdHiOBailhFRzBE3ZZYXevzK\nFGHwzRDgVYNiN+Udd7IlOTCsYFVOwsmXVkFLz79mzyiJETyoN4FsLkxBizIx\nM/CisRev4VTxk6ntCocq566Twc2qSLOfFiqZNwryEshsiEy8rHenR7WuUthQ\nUGdbXGPHQAHVnxS059W0ztbaoG4P2BqPq8TFmBTCk7RqWg+o7n6fFROpiBNF\n1lZ1GuVosms2hdJ3WR9EagvzvCQv0/hmxJZAzcuiI41VyVjUOxWVJ+qOphVP\nL6RKAp624ZgLHPeOwanTcP3qQ+WWzqly7yqfaq5gOFEIyX82IENNqvsKvXMb\n/WLEUl6v+6nbKZd/6O+wG+DYq3is/VbmIc6oclH16OhsH936FqvMi1wzxRgS\nXoTqnvKCJs7OL3YVeRVp+XA7QxvuJyr9wG8h617Lz4VyLpK/GEWb3H5v45gl\n9OV87y72ZV+JlTmV02sN1nRCnXos4P0NmMYHQN00r/EKAIFnRV3lQcOzlg/U\nqBOqaHXVFJqslB/8LMVQFdy+WX2Qn1/L1EQBd4aKUdlbBTS3DEN+trLBY4a/\nmgVhLCwtXq5UVDUH2p4J9wP6GFKCw+LoXFLUnOWICkSvH6dWfWMc5tTeM/pi\niy9z\r\n=yD7V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"21c804bb721487976781c5dc63a4faaf73c0553d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.6-renovate-non-major-21c804bb721487976781c5dc63a4faaf73c0553d_1601394923413_0.5656585106929566","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.6":{"name":"@balena/jellyfish-client-sdk","version":"2.2.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.6","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"6af6a6b341ef7c3123c188c687a82ea622070030","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.6.tgz","fileCount":17,"integrity":"sha512-YHgnQHiHCl8La1npI/HceCWQkGmV/LX4j1H6ueMExJaWTvB38s0zta9erAvbrtE2Kjq3h+QKSxIz+RJ1ALfdgA==","signatures":[{"sig":"MEYCIQCZfh+Q9wf+rRwcMSsJktFFo6M71C3Rqnkb17X8THq6ZAIhALKBmQveFLWUdIKFdhO8pwrkO/gN2eOfwdpsKhG/Qr59","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfc1mPCRA9TVsSAnZWagAAkEoQAKIQmtiXx4qsPga9oBxZ\niwAgN5RF5RcI/OW3ch8d+NBhBlfTAFoB46hXgTItAN6ArQA+K1DdEV0oCxfM\n4B9Y/OcOpJ20bitqXKAtAYTnIt6c+nroM2JJCHIthqT+9+D6K7RFtU8nNcKw\nYbg/PXfrRXci/9ey3keQRVFOeAoFK+WHXzg3Pv6W4HTKoUYcE5iFOFKvpAKG\nYMS+rpoCFSgvMzCJQXfKsKvvm/U9jGiux82RngRWifpFwsnamKqsLffQjD8l\nMOUefjUjrOz65XtFIUgWhSMkLNfCzMxuy7TL3RHHSASD0jU2HTwnB3SzLkw/\nYnzJBeMPH+yEq4Ke+NBXUPupUo4oCTh7mzE5NnAIoPi1KZPI7MoJBWRu/KDa\nqE2DJGHFqcp0NgV4Uei9VRbkGwqapcDGqrWLvJ+Gx1xP/yJlJX/1PGpXK7k1\n9mlyK/pKwMl8evfgu6m4zV9EvP1Xnr2XxvE2972lAdS4fgrrWeJXOzacfx/3\nlzKwh81lPvT2lbX8yoU5mU1qHeaq6+MzQrsxY4bDzI/qWVuwICyENYzJpFIC\nv4ySheOPIq/gDYwJ8U3p2/1VBRi/70DT7NNU/Q/+WfBHaS+Sxb9382hxwz3h\n+QJx7/iNvl0LVpH2Hhfyo6faN+l2blmQwJkar04T1S7XosWWsoTlyzL4RP1O\n+kek\r\n=ljHR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"c5b5df9447a7308d8639333e6e8934392336246a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.0.3","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.6_1601395087463_0.055805290710914335","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.7-renovate-non-major-534d4b914b81aa3b63c067e38f83d11d32889278":{"name":"@balena/jellyfish-client-sdk","version":"2.2.7-renovate-non-major-534d4b914b81aa3b63c067e38f83d11d32889278","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.7-renovate-non-major-534d4b914b81aa3b63c067e38f83d11d32889278","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"9e44e4001d3f01d30cf8ffe3eec4d8183948ab68","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.7-renovate-non-major-534d4b914b81aa3b63c067e38f83d11d32889278.tgz","fileCount":17,"integrity":"sha512-hGGhrDT6k3Q9jyoP9HwDttSanX6peohffEAIFHIvs3IjoMx/7g97AftjkkNYROtMzRhM/y0XMzJlAdtHYcWQGQ==","signatures":[{"sig":"MEUCIQDzh1ZElqpHdRLZAgRwnY4lShX7wtGqzvMAYgvki8zIGQIgFqBuUDgAWxM+/7udJGgS4SYi266/WFgxojyMImSK4bs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfc5y1CRA9TVsSAnZWagAA60EP/izlULXfAEu2wQi4AvYZ\nFcoC4mxVEsbndfe77D5IwqlynLPyzmwGOcfLS9X0z+2S20hRq1QeX0n/hq/J\npdid9XFJFSXqvaU0LyKjxCN6kQJB2mmEfapk3Zy0e4nHKkMTpYcmWWXpUsAS\nfDXufpvK26c+R+ylns2AvVrIntu44O2alHA7SLh1BIRWY07A6DKNSE+t5Fsn\nIZiWuqImDaXxkCsozlfrTck77X/e4metoAHjXopvA7/cEF18JMQZzzdIr7iz\n23svwZZy+Z6AxY3vyOyTI2p200JlY3rpbulE/sodq/GIFUl1iZgileB++1a+\nVOz2+GXKSGtOb2IJ8tIlhhhc4NFP/pro2pTDEUIE83L+cda+0Ba1XvKj5Gde\nBynKhpLnRNljd1iUxJkx7lc482WdB+7j9GtGH5ucPWhLHUPxdhaHhGfRAZs9\newrHxZRSR6MQs+fy2oT2Gnxj01GZ2jdbkn14WjwFjbARKnl1dBzHGmIG4lWF\nMb1Lq0Ss2oFq721ge4FN2qlR82b7hdAdBipUUwT0+EUBPx+Un+lpDKkmk7hJ\nV2m9//u/kX2xh3sftJLM6n7C4y9Km0x79ATJ8ZO3iRI2SFEyjhFhdkHvvtCl\nf/IjCMuTiFnLHYXfPZRFz5AuG3cn1KZ1A/YzxN4cnXDc1+htqEoq1eIe/bjf\nvGjr\r\n=VA6A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"534d4b914b81aa3b63c067e38f83d11d32889278","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.1.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.7-renovate-non-major-534d4b914b81aa3b63c067e38f83d11d32889278_1601412276436_0.7554017843021243","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.7":{"name":"@balena/jellyfish-client-sdk","version":"2.2.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.7","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"ac300b438fcc9527ed25fa7e2ab99f5d3f65088a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.7.tgz","fileCount":17,"integrity":"sha512-CctBnlJtpSza20SEHG8I6saoSXzJAQFG+ZlMwyVD0fyEhd19ZnyXVIUD2GWoVqfS2O9CBQtLY+XU425Byk5y9A==","signatures":[{"sig":"MEUCIEz38S/i/78SnBgOzKGeXxOei6+7RrF4OWcGoFiHUP4BAiEAuOmWPInkHsEOSt31mbSxt52W4e9WEEZpA8WdoGTvrrs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfc51mCRA9TVsSAnZWagAARmsQAJQwrfnevwQpD361uh1u\ntwE+WLoYRq+q/iJliGTga/clAUIclm5wl+Wc0JEJXHL+1yk1gAm+AqvjlUcE\nVPaYKoEAGRdeBa8mNU2tTtVLQvN/qxChGEyCu5DvJQ9pGWUf6IYrU650vg0w\n97UCGgtBGQ1955pUAxTc5jJu4HifNiX4h5cdHG8LUVPkoKHwIWyAzSFGvmMh\nQBdSaPN1uNFuRRbI7I3bGdTaHXNPl6EvM3hJsZUQURBkpiGu0M4BJXcp3Ckd\nonCGjDH7AnGj57aUjhYA6u5SPAK93ggatUSOB6auSA+SmhOUxWAIwm7Zciha\nfStnkSEWNGIlxIhvcewinDmrpNfhP19r8zmfnjLZVPGsm6ZY8FQJxldYOw6q\nnEO6Ugp4TWYPnIQf9cPFwJLavBo05XQsngD8LMWVukwemQCfEY4B+OP6oOTh\nwFCyVmfrkFnZN9bHUqFblOWtBBMPWH0+Irr4SiXeVjgM5GgtdjCgNqtJQeWk\nQMrtj1t/lHgavMU7HhYtcrey3+lSTo+oHTITrcNhUVsjkIqJAHLY90VTVP/A\n5O9+ra1Pp6Isv+FyBU8nS0dX445PlTClG1ITTPsaEm70UyjPsHkN0IsbaqOB\nx3lX0/noTus4iexsFPvhxUwQk71WLodKirhbbnVHmbKq/+GN5qLJKDJP9cK+\nkkvy\r\n=/uZt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"02d24b83cc18fa11889af861c633f4433c013fee","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.1.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.7_1601412454227_0.430917413579877","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.8-renovate-non-major-bea65f17ac0ff4737bad80be615566bd14a54461":{"name":"@balena/jellyfish-client-sdk","version":"2.2.8-renovate-non-major-bea65f17ac0ff4737bad80be615566bd14a54461","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.8-renovate-non-major-bea65f17ac0ff4737bad80be615566bd14a54461","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"e2878f77700528d37c811279fd92c5be770f1b3c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.8-renovate-non-major-bea65f17ac0ff4737bad80be615566bd14a54461.tgz","fileCount":17,"integrity":"sha512-tmvGbO7o9kemSM/qJA53JNpzBFHupICiGvf81CftnOCUHWpKkGNmeC32B2lCwJPHsYwyZmEq9zT9AaSk8fN1kA==","signatures":[{"sig":"MEUCIQC7nH4UizOQ96mAXS4Sf3CuR5JA1cQ8btQ45iIcDvPF1QIgDqP16eM2WFESk25ts0BwwPJjD4kuhnQKTnkDKDOQ+GQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdLU+CRA9TVsSAnZWagAA3AwP+QAHv5nnwxrwlfkfHeO8\nq4ERmEAge/IRx4zpM0q1/+wQCqAYRwiLi76Lnp2mMDQgBuKe9Y4iQ70fiJlz\nsJmLXl656PyS7RcHLorQo6lWPfTxkNnbpF7DalJkXIKo4duIMwyMZsHtUoiN\nb7SaNI2hJ4gYsodCc52D/qGoZmaYK8OgWL4TZdn8CV68xj2vGSqwBfMiGCWU\nxURZ+YBsI8JtK4orqB5sUpiLPuVYzZs8IPHG3V2cbrCgjuBy+m45j0bD50iR\nA1afk6Y+fqQrvUp7K7y4P/td8xtzi+5Zc5oHh4J4dKRzqw3LmI7A51a0AALH\nZDOkP5YlPq9/lIs/MBTihFxKUEOn0FJMwdclqJwc6VWr7vMThy0gN3iuMj4Y\nlwVdpUFpPvWYeB7s9EDFobslNFT7SSmOOTIzVrakQvBaPAs+Dwik/4sjiEVT\nU/ikvzVqtqamnA6tLGKL4pSRuGhW1SKUA4XpLDDH3AYY6BnVETjo4LNQYoj+\n3LUKBdnt92q49DO1zdWxM3nyzH9MoAel1FwdPog5rHJFDPdPuY6KRDyXSW7O\nNUvRiF1nAJxkXZMJGGALDPf5igzUR/U3GFesFOsmu9hD2+kh41TZHSWf80kz\npj1NuuIPOlEIjBOGvyx5L5x8CiTChR8g4SrUJ53WbzlXJJAsc2EMitXu+F0k\nDB3J\r\n=cWRw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"bea65f17ac0ff4737bad80be615566bd14a54461","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.1.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.8-renovate-non-major-bea65f17ac0ff4737bad80be615566bd14a54461_1601484094109_0.1269152346058322","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.8":{"name":"@balena/jellyfish-client-sdk","version":"2.2.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.8","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"47e665c7377f76824e1f7a02d48a791a94feb709","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.8.tgz","fileCount":17,"integrity":"sha512-ZtO0vo10js/EFr1vcr+naP/ui27Wmi3UO33TCbmizqtjNl5ReiEAUvaSSfHalDX3byyEqpz6uT6WUgW9t1989g==","signatures":[{"sig":"MEYCIQCy76m9rzwZoe7xcWK62Juuz7qR2ZotRN72YgLSJQRDwQIhALrkmnaXaGM/IEJT5Xehm6s95hbZpwzG9XOh8BUNBq3g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdLYBCRA9TVsSAnZWagAAQoMP/0wcLoUd0/19wUH60IpV\n29zt3xkcb+r2YVgq7KpcYTXlRHuVNjV9MScC//wk1VPJZKsxMjQ1Zgisu1dg\nq0xl/eQQmByuVHEoFgQRE+wyRk9yNdsNlKIeGay23V93jLdORV0+mzta3TVw\nn/wrnSAmXakzqo0wt/5AkrpZH/kkeoyYkyIj5J6znaK+GJ46t4T0ImXSO+Qr\nqln/RiJwmotYE8gVEaJ8uO4oWExxyGFywzCme3eHCgpAVsAQ8/QKJYDisNko\nl5xQYLpN21N6WvFVgSbdXFMstz9HqmTTrpFWIwvJw14+teyOqSWpAyI1XeZX\nPOJZekZ9inIwDK12xaLT13NhnaL0MLiihyLu5Qn4P/GdRmIQU0zhydCIk30a\ncR65DEVuOc6tkBKQc6MM/kcCprji37yYZWhpBoVwnRiOTN7YavPmrVbv2lB5\n+ZGPgcgx4EgSgXywIsJuxXvAnn6Qn9hDKVLMxLqA6Hmr4zfb6vGEbaRe72cn\n2arWX3A0WewYDH4WJiUrsBJRK0gy7HkDs5nU2+kWkVVi1DQrxA0/5SxDHzxF\nnlQVnZ0W0t4OWdNBfex+L8nIpEoEmbw/y/UdjzJMDy3L8mIYRWdFzXxrJyHQ\ndNb5/RYIEe33hYllD4EJ8vyD6coo0IVXTCwSjSyHPas/lZUi8irBH4bw4jo8\np99M\r\n=MHsH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"acadef37e5f96c48b434f8cbc3cb054d6c8bb729","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.1.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.8_1601484289116_0.8245149748537344","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.9-renovate-non-major-f52aa3d872a08d236b903f54f69175fbaca912bb":{"name":"@balena/jellyfish-client-sdk","version":"2.2.9-renovate-non-major-f52aa3d872a08d236b903f54f69175fbaca912bb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.9-renovate-non-major-f52aa3d872a08d236b903f54f69175fbaca912bb","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"c98ab145a6128cfa4a79de4563f89d71a5dfd5a3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.9-renovate-non-major-f52aa3d872a08d236b903f54f69175fbaca912bb.tgz","fileCount":17,"integrity":"sha512-wP7TUS0RRJgKIGzkQ5Wnic3CeiTYcP46kW8VC6D6AfUcV1mnHlkZ69XkLD+M+kpA92QDAcfbogLP/Zs8TOriUQ==","signatures":[{"sig":"MEYCIQCPRggjEeip5ySWQ6/sH+re92INuVQTvKG7W2uMWLONsAIhAK0L5CkahvQz93G+23RzGUFinGcvzxggriDz5I0m+ZmM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfd2AICRA9TVsSAnZWagAAK2sP/2KPBvX1HOggGbbDy1tt\nilA95SiFUIk0W69DbXLg0GnjjOc7h0ENgw42PzI4/6vTYrKZC+iIjk2ibqxl\n00TCvEIRbyTRB8qXLo2rBk6KmM+WBC+DFcX4YdAT8we+teBhVXoKNeFPND+o\nVIqjwnGpzT1tGiWYx26cgdwoBkZBCw1Ko0GHaF+fs6zRbzow6/ubeIGcMTQn\nfSfrO8T180qVX6aYj6dUJyambmJkalmEeWN4xn549tLYHp+fUPBYmwIFveUI\n2Dk5ua03V37f9QmTMnRnIvh1M9nD0qdMr/CtklvL2ErO8WvqKzGHlN0NLnC0\nUzf14A/LKweLGOM5v2yxx2vjAv6q0unmY1PNfJJN26HPB+2f7vRra/t3V0Dm\ngWWTB7H2vUioqqy/sqWhc+aS7H+aSAlOrHBuNr/9oLIyrtL5al5QnNgbs/g2\n19Q91UTnTcdTbOt4qTdmiR+r5479T8Zc4yJD5hTxoaWP/rGgo7XqUxTSmm9T\nuPpaIPl360vDf9oGxfG5KTAbYzLVhZEXiFCHPVufOKILeiO9Fra9yax2swWB\n2ujPRRUUQ91oYOfy3VTUp2vi4jbA8MXmDaWBFPThdM34d4DYmkQR0+CIZK4j\nmGKamFp3iuqxMceuJAfCF3rqQEuzQsYVWUebY9dZvY9ifhsPytlkRcqeMp9O\nhA+P\r\n=D3fZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"f52aa3d872a08d236b903f54f69175fbaca912bb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.1.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.9-renovate-non-major-f52aa3d872a08d236b903f54f69175fbaca912bb_1601658888407_0.24525630559345335","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.9":{"name":"@balena/jellyfish-client-sdk","version":"2.2.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.9","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"019f1c1246cbbf58f0128c722052a559069e9ab3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.9.tgz","fileCount":17,"integrity":"sha512-w6BPu49eYosQQfDYrEhHXLH5M6ABvayy3Wpfv5MSCqkxp51Rtmf77Fe4UkXrd/YHvwDE5xAcTzYX9mRR0fk6Ig==","signatures":[{"sig":"MEUCIQDLJcEEXkDFinebqbIdwLQ9ZdGL4lD3fxhPnVnQj/bhHwIgKCEq2w5JolObUe3e3iqj8mSwnaOMo2Dih78AVEOtKlw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfd2EXCRA9TVsSAnZWagAAe4gQAItCVJ+E0lbjtLsPDmzY\nn3dgCNJNuXWu6OpCFvsC1kf9i+PykdeRR+s4lvLvwz9xyEVL9btOgbJwaU4L\nJXjQ8yh9MSNuRqXyCK7Tkn/btbhImyuYwpWwKEtT3ivVxtBvxF8FHUjd4jDU\ntHeC81BdSAn8RJgUos0nxF6Eq4RH9kt0IJwWvqg1BkJ0xAbLmFeU3847lRzz\nFPlq03Bs34nb/1NQ6xfzVLjIkXCsH6Nv4UGFz8gpsuOXdvNY78L9aWxquh4Z\nz35HDeXOi9QvzohDMfFsp6MpEq7rUCRKbMw+Fb+nO6cO87CIoLlfL+mj4ws8\nvKPqW6g+5V0kXUM6QWP6/looYhZ7SLyAavLZxtkTkVSyEhWqpA7W/RiB2Px7\nC/TxuLNP5M/ZBSc3CJNUycB0hb3jdSgP7INSwYqVWN0xeW/ETnkneSr8eWev\n5y4rij3XlMXuwXQaEmb1N2BnQQRtEzHsIqqsQ2TtqzrAHswHXSNv2jnR9Kmx\nVA3gq/sGXrLi3ChtgpHuzqRYvNq3THdPr2q9nDjDmviMYw8iMDVpZEL9cGlk\n1e3ThEVmTSNRl1VFFSNjnDLVshwvhWxoe1Gks3zPdb0z9k0cwjE90GknpeXf\nq+q6YgUN4FJbg5X4ElYeSkaqLTRT+1G0pXlRUj93TqxP/lVzPsu5AvMEH4n4\nvF+V\r\n=TEeB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"bc4f0284d8b28065a3ab5b3bdfc64a81e17e1709","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.0","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.1.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.9_1601659158563_0.8612632211278715","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.10-renovate-non-major-334bf05560609bd50e83ed4ab6107152502a9e9c":{"name":"@balena/jellyfish-client-sdk","version":"2.2.10-renovate-non-major-334bf05560609bd50e83ed4ab6107152502a9e9c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.10-renovate-non-major-334bf05560609bd50e83ed4ab6107152502a9e9c","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"2ce6edd557c3341bc6a1fac8f2f98e81b84a578f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.10-renovate-non-major-334bf05560609bd50e83ed4ab6107152502a9e9c.tgz","fileCount":17,"integrity":"sha512-vCx3dzRwve2LbtkAh3zrJ+Z8ausejdwdstY+lLkxeomcjPORGOrkO4zqpyV3ozJZB8V+InHn63kKEwrUPQxueQ==","signatures":[{"sig":"MEUCIGVTwy7lRADZjpNsG4qE1dD1aFHI2NeuMJFXRTySbPG5AiEA+c/TUnPEjHGimxbM6VmDMeZn+bASFMl3wrEZkyd1eys=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfefBlCRA9TVsSAnZWagAA8uQP/1iFwqXgJce/cP5GIXJZ\nh7k10zQsW33VZWxAidNX0DfyoZgzao9+afNoA6QBRnZwlbE9X+k2KE7uCm9I\nAylMUjKfxc8zDKbRH570VYzeRa1q4CeFMsuWzkVNeGokirJp7Kd1ZiH2ap+V\nuiY7vNvKPx+X1nNJAllGP58dv5+bbayFknRrxBXIAd1TMlaW2+Uut/n//rc+\n2mgrQe/6Rma5hTJ6YFSiuI6B/WWoYy5eCkUrYfSIie684TDlpqVayjl737+T\n+QXg9AFulZ8gLbrlfiEKcCO04wBmo/UMIoKruMKaAiHaLMqufN8G1Z7AYQvc\nZMXFGZ5MyTJx3yi6aF8RQkTAcP0nMrM5NNEVkfk6QxWLsAOlz/S4ZoGFcHk6\niu4dkBM6DiQVZhCPOxBqhjEsOxVUOZiV+OmTSsXU5zII147L8jN5NQFjYJIr\nIgw0ft4YRZBthfIg1aYhPEm2Fob54Nb9XtwyWWYAjuSQbP7YTgr24NJYAfRU\n9AiAY5Q5BvrmeX8Y2jULTw9PCfKy8m/wxjJMWYtXGHsMgsBjqPgdVhHn5yl4\nlNpdUz9ijX/JsIAalgxV+LrdJKZ6PzTUpi6AkJ7oZL2RiCZruqueo8GpRfwP\n/ZyRDfg9mGWSErmOYjHALmKSB6O3lQvyXIfGWSnGiIl163L8gyudsbPwI9fE\nysHt\r\n=hQLX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"334bf05560609bd50e83ed4ab6107152502a9e9c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.1.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.10-renovate-non-major-334bf05560609bd50e83ed4ab6107152502a9e9c_1601826916821_0.8529863029873137","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.10":{"name":"@balena/jellyfish-client-sdk","version":"2.2.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.10","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"6dfd1f0bd815351751bfb0e242e6eee0d8b03722","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.10.tgz","fileCount":17,"integrity":"sha512-clj+cHu7aDTdZRWuQByYxiOev0eRu2VCA5qbz2dm9gr9HuJRb9J/7Ai1NATu6+w+RwU/h4QdjiPuvNILFuwuFQ==","signatures":[{"sig":"MEQCIFiZqznpual/7BXf08PNgYFS0/Du9BBahG0KgNQtzG1cAiB8ftQN+BHPZenx0uFoivZxjxgnTqCpqTDwxGwv5UC+kA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfefEXCRA9TVsSAnZWagAAtOAP/2KwNrIE0T1NaXfHetZu\ndN3agCcO6jAtPkku/sV2j6pi8nCS+ik8WQdsmjYX13Nh62RVLl1MtPAZd6dZ\no+zUsOSQe9M5842LXdwSxg7pWXzizZduB4QlGLVHzg/XUR25C/Qi+pMbOcF7\n5Ld6BA4T2cOf0CuYWoTVgYA7lB9MpfFhIX4GOWxC6spxgkO9rRYG7EXXqZ4I\nI5HU2+eOiEweg+UzAc7UkfeZzwPKUjyG9EhLW48djoAN4PTn4kEmbye4cwsB\no1089hf8UWftwg5Ca1AX7Q0iPJM+0AF89cLsfPQn5jyLeHKblGARwwaB0afi\nw3oM5mGQoC+VSHckaL310FvCV/hjV4YwzLeyrGqFSPdMCRB0mcy9rPJLfwqb\nmodOyQ/mSNohLgLdLN0OwQNW5Nu0H8AgdFZz8DckHC7LWgVrdhIOG97afDIA\npmNQdkYEN9d0dZkqBySoaK9Md0KxC7/0Uco6rFUHMJe+fl74NW8q2BFEbfkk\nTfbbNlpq2En2mHejU5Avmu+T2GpcInbxT7raDdqKas1ZwxwvJ3tnpGdW3YTY\nHIiUEI4AeA/MgYf/O29ZWj6K0AdAj3Tr1eWFYOdaBIGu/+u5jX0YWoEEW05e\njUJsYRiNLhF/WeNDp+C3JC2SZi/8apfnQD0qhU/JU3+kfd1BP4AMMhyIJyFE\nyZpj\r\n=LYtz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"d88ac59fb5c5507cdc48b7aa2191cd0c359e4190","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.1.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.10_1601827095432_0.06751827769239327","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.11-renovate-non-major-e1b3ebbc44db3e7ad4707152b00e08fe8f1fd338":{"name":"@balena/jellyfish-client-sdk","version":"2.2.11-renovate-non-major-e1b3ebbc44db3e7ad4707152b00e08fe8f1fd338","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.11-renovate-non-major-e1b3ebbc44db3e7ad4707152b00e08fe8f1fd338","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"9d9e9c579af0e8ba0565c9e87027e4b1f665878b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.11-renovate-non-major-e1b3ebbc44db3e7ad4707152b00e08fe8f1fd338.tgz","fileCount":17,"integrity":"sha512-C++Qhl9nuSV8iFHJbs+xXTn6V5F8BvBdD3Y5zA/++IcfDs7Clr29xA7A/MFHbiD5y4zb/9L8kIiZLWPRHuFgBg==","signatures":[{"sig":"MEQCIH99k6kPq3+5X/bw5uOt2CTEaUhtMapy/Gbz97JrxOH1AiB+EMIe75pdYPDIVDEc/uwsy3R7P95Tc5Nkt5w8+bbKoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffMMmCRA9TVsSAnZWagAA8XAP/34a+PhNV5kZu5mUjd7P\nhnfwqYG4dobDXhb0Dkpu6BnwbHrsgm1f73TpBRe17see034J3EClm3tjSeOj\n8ApUh9T1iCgkc0bdKXxb6tPgatX0dtpu2O0CxSoHQVoktS00DaP7a/0segoG\nSnyydZr8HKxqkdD9h4tXJ/W05lUFmYiXflKKoC+7Z4KzUVuQ8WtG0YZq/bIJ\nAN6Pp9U+5rtwJtKDV9/3b62psGaQSkjM2b5JKH5D54GdLPMJ0wXjnu1/HOjK\nm0Q3+xg0TXkkT+jrnYWfC4s6bfPQ2NqHyjreMmRv++hY8Cc++P5oeRHT9RwT\nDJWsG/Y0N22jjw9uWrD6OH2mB+kVUiVi8vYW7z8VNJuBEfCn5DFQnhEgFf5Y\n/DgVbdJuAzT7qUOH+IjMAzpECozKclHyLUrPtNO5SMy6X39lMy5vSoHlHaiS\nEyTDPiusZGEAfYeLHpWJL9IkG2wLkxzVAfPewBEvRHgGEMVuNp1E6B4v3L8X\nhxLxEDcNBnzgUYfuY9cmxQE+OUdRsTBVmcMUMGXh1onceA0OSfD6jexd7Qhd\nuYDF0Mh2eFBGhf6BbJ5LtRTVbaac5y4ItYbMbpKvc3+sfR/MkL/jd+ynuPZ8\nrAEOcPBbnh/aJq9dDer9cR8QzjCXADkuN+YeiydQtp2iyobU4IE9YB9lP5ko\nTz4h\r\n=1d/P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e1b3ebbc44db3e7ad4707152b00e08fe8f1fd338","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.11-renovate-non-major-e1b3ebbc44db3e7ad4707152b00e08fe8f1fd338_1602011942425_0.4723135212227876","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.11":{"name":"@balena/jellyfish-client-sdk","version":"2.2.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.11","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"83d9fc2ceee40c4ad08ac98a315a14c07cc6a648","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.11.tgz","fileCount":17,"integrity":"sha512-I4VGKt/ccercHbIkzjtd6g+ynbHISYKm99DvG+Hoqm4WalKeHJeW4jIjq0UFjo5ij6Obf7//wCi3QPi3YnUuTA==","signatures":[{"sig":"MEUCIQCDPoRaiLqKbgx8GiyaWYgHKrpsm02JxzYXGECLj+OChAIgLar+IahCjzYYZ5KHo+cThXHeikxNW5Bl+SLgCnhjjRY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffMPqCRA9TVsSAnZWagAAFS4P/RMq33zGh6mB03sCY9Ng\nML9egfzyQhwKRGyGRT/538lbuB3zYUT5Jk5M0YIvpkXfrGCYYMm/h0GuF+tb\nxTWCcxOaSkGmaQdC2+3TI5kaEm6jYwVlYZaJlhoQlbXDYH05uLFerKhHdwp6\nndGCbl1WGLRBYwGo6bqq++TSr3ch4uqibRq2ZNkcDVgFxxaP+ApnG53yod3Q\ni+Pw/8hgOqwJZ3IzK/YLstP7sFmtxAYdAI52v595O2narbhShu6mrU4v78Y1\nDBsWUFHjSusnbngivRUsYBmcTy182Zc6r0lapbOXM0t4pNBZeYQB6acM+ZUS\nC53iiEYuJJZcLESr+g5IqcDrSTAVV+2M8JTHkOZluLAXxhpRPDZ/zTYu59yj\nvK31SR5AfSrb71t1dhAmUCehQnS/WP/zUdcLlKol3TNcrtWsiy9P8pQue4ZA\nbj0gQRtuJTECs8FzZTANQw6kRIWRPfkGaND8H1Uuc43bPpmH3yKjUZz6JU7X\nfRiXw6qsdimp54Ns4zyQTMQf0Kc86neophGM6vOqhxZNv1BYCWh9N/ueLL8V\n7XWckxZU6uE5D23WkyRZEctVE51q8qfNTfjIVyJOKbjcjbkT6FY2Pl71Mo0Y\nEqAIFxA2cJSlDM8AKC1Kl9iwf+9NL9OGrIs+fdb1TO4IElId8yF2gsCCZJbs\nYiGj\r\n=2cAo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"00eead8520f33d927d1b5c2579889302fd43ddbf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.11_1602012137663_0.7134147565676667","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.12-renovate-non-major-fb04f850ebcd01e4f94d9e06b084176739b38c9e":{"name":"@balena/jellyfish-client-sdk","version":"2.2.12-renovate-non-major-fb04f850ebcd01e4f94d9e06b084176739b38c9e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.12-renovate-non-major-fb04f850ebcd01e4f94d9e06b084176739b38c9e","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"54f148f2a78317a3262135b6498020aa5a83d533","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.12-renovate-non-major-fb04f850ebcd01e4f94d9e06b084176739b38c9e.tgz","fileCount":17,"integrity":"sha512-I3uU/0i59tI9Lnk1olvR0L4QIvt3ty0MbWaej8Evz5cBzFaKXRpQFJD4fP3QSxO9K5CUUC6N0HQkfD2WgRBmPQ==","signatures":[{"sig":"MEUCIAhqTuD30pSp+uNo6lu9l2RlLLh6FoRpR5jTOHoluIVRAiEAi9COFgbkJaYlgant0yYtUC+YD7In14aeQWTvY4HoSQE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff9G1CRA9TVsSAnZWagAAWVUQAJyJpaBV7jzTOilu1Vh5\nY87UWWXnG8oRMDuwoWV4arcUWC7zY/xPq8K4jbOFIlMsN0GSayegb7+Mvlvb\n3cz0CzPBvUntHvOUxY0nBsbeu9elOEvQHstaSz4cmfp5lEkzYE3RBwqEg+38\npUsKuAz0S+qi/fnMD99zZI37chi5mmKACeH79oAoT05mZUFXfOI41lG4/8FP\nyf7EP9s3/sqC8ByTgMG1Yln5fuj6UYagM3+LX536u3sxJJVb6E/EsOxxXCo5\nRPUrMcu00Q9KGsHX0OTWnz0Iw90rR5rCRT/R5B05e7KEnJ5/cQNxTAv9rYPu\n4ljV7zGgsEzgeeLb2qNyOvNy9etWq5NvCyo4myTDSrvGokqaegGlJuRQp8Ug\nsfJc7N149BngGX0m2eT2MTW893D3/NojJTE5pU13V1pXahrh5yDftxrPikst\nKL8O03/fxmLqFLJxO/p1mVRTOgOmVqUIOzfbohlss2Y8XTvYETxDMOlsJ4Ub\nqBYKfyhFfoNhD/JIOXlQiPjbkoJn/oxmNBSKIX4itEdo4m88JTmYevIZulWM\nBYU8PyLJ3OatbhQqWsH34kn4ZXpjEJw3t7a8ZuaNKD8idhAoUqFm1X60A430\n6VF+hbzIow06mfBM4KGnj100WYTai2K9PAE6xtxmOTwJnBWRGep7ReqoMHz3\nG7/8\r\n=KsTy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"fb04f850ebcd01e4f94d9e06b084176739b38c9e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.4","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.12-renovate-non-major-fb04f850ebcd01e4f94d9e06b084176739b38c9e_1602212276651_0.7509779139101993","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.12":{"name":"@balena/jellyfish-client-sdk","version":"2.2.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.12","maintainers":[{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"87955f7e11d8b7313ac6f2385fceb3072268c977","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.12.tgz","fileCount":17,"integrity":"sha512-0RDKj0XrRU3igQi5wUtoQPHfIAfVwrTotAS9PEtMmpCeub0Lb+vWoBL1Bag0wDrkKlQC2K4MuN73Kbd7jYjIHQ==","signatures":[{"sig":"MEQCIDad5OAYiHnvYhr0eonSqwiWc3j/yIxFCBeVDOmhbK/1AiBOK4+0bdv3B5Zpl2YIpcexoP1EndPu98SxAR32IHEucQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff9J5CRA9TVsSAnZWagAAeP0P+wR0ek16s3DKW4RfDJ/I\nF7AGQkkKMHXruEaT5pzXPEXYOvaHZqByOj7lqQChtdBUio/Z3fYYftjqrR0E\ndoJ+w+nBMxlzSn6Hxq6a4aHMWQKcHk6Tn5/Vz3foeD4AA/YUx38qzbwqK2JD\nJlT1z7Dqfnu59Je8xAQcXJKFHuGBNfDc12QgHP7wZAt1U9jb1fjIjqlvRdFb\nmbdqYBu4viVblSUNQ87NNhaoCljvg6Yc94hVzdneyi12VnSukn+2IwKHiLBi\nJYAYZnY6zBtJLmhFWRs+1YVG8kAzsMM1NdPDF0tjhWosFfYhOe+7ZfoH/G76\nP7T48EfFtxcAy5QDD9ksLdGYHh/Z600Df7LOpSJlMEHxinLb5/RaKI91tljP\n44rBS4eOh+sbSopjzEMAscnKCQNTszYLyyx2HmQNwo2gr5DEsqqmc6Vm/8fP\nwy++vEELudTsemodtTZfDviGNCqK/muzwoTmQY1ShZlsLhmYHbkX306vpU3g\nYE8Rq4hriS4IZ0gA3YaBJKl2pg+DJHGVvJ5YSVw1kKDpCbtYfSiKby+aDQ3T\ntDtYcx+XGRGQwteKEK/H8H22jLp9f2un+1VPosdGA4RpRVCyUzMZOL3Xul9s\nxT0SGOFXQfGZwPa2ASgQ+Mv1Tc8AqVrO4H42xIbcRpFnPRLLDOwXBOnKfyj0\nedR/\r\n=JJ7K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"1a9a079db3658a287b44ee1b3c299d7053215277","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.10.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.4","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.12_1602212473058_0.36314705547622883","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.13-renovate-non-major-54f65514ea9c64e37f57dbdc93eedd64cf406996":{"name":"@balena/jellyfish-client-sdk","version":"2.2.13-renovate-non-major-54f65514ea9c64e37f57dbdc93eedd64cf406996","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.13-renovate-non-major-54f65514ea9c64e37f57dbdc93eedd64cf406996","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"98d4f9586db74eafe55d75d84e3645538003065a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.13-renovate-non-major-54f65514ea9c64e37f57dbdc93eedd64cf406996.tgz","fileCount":17,"integrity":"sha512-tV/Mr7Uwr+u6a7dd4AJmAJI3aHRsh5z8/642Kaw1eBupjGJd7OtZQlEvT6khYM+AAhjUHI9Ovi6qA+Ut1zmCvQ==","signatures":[{"sig":"MEYCIQCoAk8+baAo8rsqUM+4lg1WtyBsKOsXi4N78+bB65BztwIhAJ2o75bFIot6gPjgR3VJJyuGWyMHiew+tiXnZIdUkleh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgMipCRA9TVsSAnZWagAARl0P/iDKo+ezfZZfVt6EGjLI\nzG9gP7WXuE6Iq2AB7342KqDN3i51JK4HedCRZJZGRvlghxMRBbf02sHoOQoT\nXe3RP+0WicM8J3e0hHdJQZBHI53+2Bwke7cUG6UwFNYCQwKG+JgjOA4f5Fwe\nFriDKFFYBro3nneZIZ1vJdZYVJxAQcHkDQhZkXtFkr8SlIa12vUziP9PIs98\nEDuCJwuzsKXyNHwvsu6vy4NLv5VrJ3+Tv3Cfe78mSXKKH7mohEWN+y5qGWuZ\nl3xiG/0I/45utb5r9DrQU0L31BR+GuNxG+yWSE3UaGng3q2YK50GZQ/CnJ+P\ndxpld8YaktDI7Nj0eqwljuYOdNUt1nTawzMtvsgjLJD6GwePtLZ1qpeeIHit\nYNg7zSWTYUneSPS6I4l+aM7PVoDsh1LzFxH5Dg0RNlNfO+DywQvtr23f6EcB\nsnp2iXw+QxfBTiNSoIhD1up2ISWUbK0PiMJdHsKjJmXir+4WPsJiYCS1vyf2\nlHl5L6p8zfZoslvdCDB68QX630UFs/ZQ5P8DOIrekqLfluMNYlGz5MIGzxGu\nJRvLsjlj33GcyVCKsrg9OU47dlsokips4rb13BAwQqHBTEVUPBLgyaHr/AOq\nxhorlHAq4aIQVd8eWK24+kO7X7JHnxXSALhhZjzE9Y8ypr4f1mYrM2+siGg7\nsAS6\r\n=7mnK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"54f65514ea9c64e37f57dbdc93eedd64cf406996","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.4","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.13-renovate-non-major-54f65514ea9c64e37f57dbdc93eedd64cf406996_1602275495928_0.9521115109492178","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.13":{"name":"@balena/jellyfish-client-sdk","version":"2.2.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.13","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a08f1a4d573980ea06ce5fb84e15a3767cac41b9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.13.tgz","fileCount":17,"integrity":"sha512-qEpokp2ACvRl3g7tSNg249QZTGs1v/eaRpV3GSArua2L4FqcYPtNJZywczFQnMRNkKNZDXv6A090MwBLdAkQvQ==","signatures":[{"sig":"MEYCIQDwj6pb9WecYIfe0JJ+3uAm4KSsSiKrCtWbjdFoFx+TvQIhAJUmqD/FFupP1RTf4gahyFdhFO0ocoUqVHQCYfod9rYN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgMmPCRA9TVsSAnZWagAAuZAQAIp0rTjQzK9IiJ4hsmg1\nmSyS13otXC5EGaN9Q3lQ3glVdtA/Lg1So/I0QRs6AXEpfv/RwV8ZZFF3KWDT\nsMCTjE6TTUENfBsQSw8Jb5fzcfGYyQK785bftBJEypm4qLV0NDKC4176JPxt\ng+5DeqiuFORKqcGMeEfz6gu3zNtQrdfqcWWFDclayOblkLHG26r3Ka4gMC3c\nEqfawvz5wteHvHvvD3m2ynVAaIZJihsHUAkQ1v8UyC3jNn9IFZsxpPj9tpKt\nj/uIj81sX0jGPSiHbiRqh1owM4Ir3yqWAPTcXhjs6MUmhysCjP2dttsivhQ0\nk9JmPRYevHD7Xbcny+pJY+0kVKXILFJMzx0ukVZOyxquTyMMF5AWphHczJWS\ndCds8+1Wr+LEBZ4G3hBoz4GpLI0jTJZ7MorW/0NUBp9qbMOeR4sbFM7919GM\nW2Ep0Tz+xWwXtXtUL6zG60/m5z4omxdbNawn53mhzOxtCTDYaGnL/onpr12d\nrBGH2QfYbwjSC6PbJoPk23MAGzNwAZNLceZISe3wed9i77+o6DzzmI7A8GYH\nM9M3b1VoOR6AFwgFRYpVDiNpsPWQgh3CvUVpX53Wxz3KCeOIkGCryQo0M5Ew\ncvBE4dvLdazjfMF+GpREWNfDBSizGGBZFNrCNSy0Z+9bfvTG9fN2xeflBgiC\nJzKs\r\n=tFFO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"02d0ccd922bff165dd9007c6872d31d11cd40c1b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.4","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.13_1602275727474_0.4837926505021435","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.14-renovate-non-major-0b9705be102c2918e1ea6d4942d6a76bc9c701c5":{"name":"@balena/jellyfish-client-sdk","version":"2.2.14-renovate-non-major-0b9705be102c2918e1ea6d4942d6a76bc9c701c5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.14-renovate-non-major-0b9705be102c2918e1ea6d4942d6a76bc9c701c5","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"08b42845876ee884e840f58d52716d7f03049eb2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.14-renovate-non-major-0b9705be102c2918e1ea6d4942d6a76bc9c701c5.tgz","fileCount":17,"integrity":"sha512-Sxd7FWwXql3MlNaLc2fHgiNm1F0Z07AAvcgSUpaE3o1Twf5d8F6YhO/qFaFKUytzfQEOnYWDo53qA9D1ft4uww==","signatures":[{"sig":"MEUCIQDlsmNo5Ozzqx4+B7S9EZ0djUFJBmEeAL6lbavz2KG48wIgEHUFnzBYXCjVJ9/CyTJkGTy/K59fEhVZRtENJcKSlec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiiPlCRA9TVsSAnZWagAA2AUP/ji8tD4m9uCCia/8GLAx\nqAqBtde844hPc/mRzY+UlFBUcghogrogTPDqRsm+kDIMwi0QOJ5uRtTPKMHW\nfcsmrstXmfOdonHH3gbmNECFEREO3LwbB98XnXE1NRvMNV2klF+qrUjLt7p4\nP069WxMFZRd7IYd1An8W4kZfOIlw69CtuIDrlvLeN87zTc9SSXzBgiOTUPp3\ncuMCIuJ9veRA0uuhD+HmvytVJZOBFqH5RamfF8XZwnkyBWeGJvgnRqzF5Pnp\n2Qa0QmOw3srVFYnfj3DOLRcQGcQtPEzN2Wl71/fOJ9uOvAffsb4fVXWFdEi/\nINqPJzSIEO9UixhOQvF2ZlAwQQFBaDGEcflStJtv1t2genIz10gzgIQpd0bF\nAhey5o8SuKHyV9aFp6kzs4j6GR/IjMEMW7cP6tMcnVQQRLnps8djc9PYH3nd\nUrabqkXSX7Sc2vkCh96dYWf51cLRKpTLYQo3i8zRSyZVzopcD8if6+iqCCis\nFbLQTr4LGepFDnOMgS9QyQ5tPLbF2boczxpOeYSkq4AOyIGB5nxNG8cJlnn9\nXNOA1rtjJ0X/fjWchAHPkHeFI/DXrqistJb+My+Plk9nBDCOao8hhiOioJkR\n5buO034R1Tq7iQDbIsBZy+k9cVQjtC9NUDmOPlixqe9EaTd7sXoLY41dM80t\n0L6N\r\n=P+We\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"0b9705be102c2918e1ea6d4942d6a76bc9c701c5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.6.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.14-renovate-non-major-0b9705be102c2918e1ea6d4942d6a76bc9c701c5_1602888676547_0.8617828763568862","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.14-renovate-non-major-ec1fa9d85a70ca364f35054fbf8e98469f47984d":{"name":"@balena/jellyfish-client-sdk","version":"2.2.14-renovate-non-major-ec1fa9d85a70ca364f35054fbf8e98469f47984d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.14-renovate-non-major-ec1fa9d85a70ca364f35054fbf8e98469f47984d","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"509358b47028f7ea1c73ee3bd72081067865c861","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.14-renovate-non-major-ec1fa9d85a70ca364f35054fbf8e98469f47984d.tgz","fileCount":17,"integrity":"sha512-ecBXAZzNflAHve0zNmByCtq4RhA++TggHhaE8LHdi3osdVS4MwuvYz87UXBdyQ1b5a7m1Z33lBNY/YGH1SA9hg==","signatures":[{"sig":"MEYCIQD1jInWfzxzLdIr5MvJWjzwcs37fjjOpX4g+vTEurXkggIhAJiVmduYBvafj/8M6VV5fThc3VH54CJ5d1u+lKd6/f0S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":137950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjaZ+CRA9TVsSAnZWagAAIg8P/1IYf5mJHxJfxZvBzMBI\npeQYZe+Vz+oU8+SULc2ymKH6iBzKnJFDUKJvblTNQj5+jb9XTjGm2W6l7Q8Z\nf8VHWHCw5avfeJcmKzo+TARF3XJubtFKRzofsUHTSUFFNyu3T7Okfc5Rs7vd\n3OqRbedS1nE/vDo3LUEk8HqMyDrxi8KPKd7P3w6kQ4QU8c8NOOxP6bfID7qb\nbq6wsXkOnXwjb/XBIuSp47WsPUHOg/5J+edMJ7NjuhtD1/mSm3ANx8DRTC0L\n2shE3mFCyZmQwlGuMx/v8bTSArsLwQ2Orly8p46KbSbW1uRRlFDyghCSxQOs\njIQLaU8okVsOLJgeUVsvxCQdyQNNKJbBsdCA/iH4qDuE6Pmc8reGMsAdCyNO\nL1bj2JwriBHxkoFGXYmQuVBhU/cDHwwo8nbZi513f6iZQ/FnmbRdsMf8gvn0\nBGPElImU8hpTjeLEWwCXR2AIKI7/DDmqC+VR2aR8JhaaL6dGr/rA2XMeql+s\nzXzpa0KLFdwPqOs4Ol1hlw78867L+OOBKGOHNsO1ujgDEX3rJK3z6mnEiuGH\n1Hny2+FSVnU94qWukirntVMMlrCBii3r8oTK483bGWMQZJ9HXk4x7yoqNbZv\nZIyiyCDDBf8tJrJ28gmGCoXt47ukMrdD8dUeLkV0DOrbV6+Sm0JhAVdS8MGe\nRtql\r\n=/zoM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"ec1fa9d85a70ca364f35054fbf8e98469f47984d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.14-renovate-non-major-ec1fa9d85a70ca364f35054fbf8e98469f47984d_1603118718405_0.8821996179355034","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.14-renovate-non-major-21bd58ef41efce6ac0cbe0afe0fea62f59bb68af":{"name":"@balena/jellyfish-client-sdk","version":"2.2.14-renovate-non-major-21bd58ef41efce6ac0cbe0afe0fea62f59bb68af","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.14-renovate-non-major-21bd58ef41efce6ac0cbe0afe0fea62f59bb68af","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"edb4c9d3c0f213e781a6320a814855b84e623cdc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.14-renovate-non-major-21bd58ef41efce6ac0cbe0afe0fea62f59bb68af.tgz","fileCount":17,"integrity":"sha512-XGU/Wq6T6wVjezfw2nLLjmlThSXOMQA+DTMobLx3At5c875lNUBkfHTK45+p0wFnQMrTO4LDnHJz0Kjh88SmYg==","signatures":[{"sig":"MEYCIQCdLUiz0DV/AUMBd215DuXFLaArdKk+gv74/YhdLLh3hQIhAKERXniM7IhenFtnyGxJi8MN7W9oEw8BXLXBy/v+3qNb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjawOCRA9TVsSAnZWagAAdGAP/jokd2ACZKnsjK0BjXTA\nmb+R0ccR514gqam4hygpCOHqa2PavItCTDVyQp+o16KaHH9m9JvpxSPhPEjn\n6TZOJExHU5FyYzv+M3sSRkKZVJobTb8A2XvyWPlzTTeGwr1m46UWSUG1bLau\nIyCd/DsbyprAZczgTKu6qQ/ezAJu7oddcQeRymAYVYcwR/njNDaYIeQ2sIpq\nFhJFF3IDABE9XWM0XQSks7J4197hfD4loZTNvjDKW/dVYo2Fk4BB1k4sjz3v\nAYcd0kHnDyl6pOQfzS73lf1PthIL8Tm4s2n9kPov/zwhsImfMRMXjlCxYv62\n+Ij7n90bm8hBAel0oUhjt+HCOwPWDnb5TM0snuiq7dtWMFqxx6yp619B+uMe\nwZpNulQgI4XKEQfci2sTNCKYOCpE0Xb38wGs1SYT6Vm/J7w0GbYRuSEjxkG+\nHIsMcZIdwLoeZDUXusypTf8x87iYzZd3lf6xK084Hi7E5phgKfRPtPqWIrWF\nhNP9jeR/w1u9Il0WPNZdVvb6h0vdJdJqqbyOUKV5PQNQGCz88tFtAx+XLnd+\nmdIzENjsbt5d0TvFqUBYl7sa+7NI9sf50gHkCbd16/VTKcO9ISeYw0QMF/E0\nSi8rQ1zwen/QgXKpeMe2eDZyKH/4P9sbucre6h6ANFOsPZIrhOiRQ2JCazwo\navx1\r\n=bkD+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"21bd58ef41efce6ac0cbe0afe0fea62f59bb68af","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.14-renovate-non-major-21bd58ef41efce6ac0cbe0afe0fea62f59bb68af_1603120142100_0.12036129530863904","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.14-renovate-non-major-d99f255f81ed781f8ecd8b0f124fcfc5316c5927":{"name":"@balena/jellyfish-client-sdk","version":"2.2.14-renovate-non-major-d99f255f81ed781f8ecd8b0f124fcfc5316c5927","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.14-renovate-non-major-d99f255f81ed781f8ecd8b0f124fcfc5316c5927","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a461b4f61446726875a3268786ff29362a059fd4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.14-renovate-non-major-d99f255f81ed781f8ecd8b0f124fcfc5316c5927.tgz","fileCount":17,"integrity":"sha512-vsHmMAh8H0oi7x+sNMGZwzoJdcW125sS5BeZJ4L8Gd5UOBatYsg/jaJQPUx56IZI1qv4S618yjNelKrN8JnZBw==","signatures":[{"sig":"MEUCIEqMm3dkZqE+k3TVWgpLItLPxd4tx8uegDlUv4iTvQkvAiEArMu40WTAicxeB3EchXRsVrlC0YUJwbYi/H+AW0nDz+I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjbpQCRA9TVsSAnZWagAAVqEP/3MzpaxANc7H4ECl0Dvl\n0BI5tHdMwCAd4wfIbwKAmk0KKyteCVc41Je43N0lPdvtgsHXEEr6HBHenapf\nVfFg0Vs2Nvjb6psWq2nZ93NM0f5BqVCCyaFOF/AraQHu5qBuoYR+pWmqAtAr\nuCNSOttyiXJ0BvesLoLXYsCkLRVZQR+7+oxOH+Sotn1tFHQVUAxpus7R8Nx2\nMlIY+bVJyw8iwiZApAQP8R7KU7j9dg5GbcrxWjUjr8mhM7WXbkXggJ7Kvx6K\nDMaLIay5pLRunZnVoWavrCinzILNxyP625ZQGD3S2Fl7IVufELj9rOTo+G3M\nHF8Hnu7bCMVGAUnA3/tPZzj5UU3gRVm9fYCmzvdyPIq/rPnajUk8BGupbq2q\nzdoeJ8eV1UTr3nemy0JSBP2yv51uy6kOLb4eXPiJgOBUy9oNQ6AmkPq37BT3\n1RjImFuPUZUpZXGj00cir+DGuObQcXPhCzDfND+GWDuU8ig9crKlqDBsL9ba\nyIks2hDh9Fw/7BjaGD66YsvNDjC6h+7+NqQ51JUu2eFrNpshtK+8wG3BPi7O\n/Jt589RqRQlr7Y2EkfuFmhN4dv9K7mr889EfLkVlXb/xEnmbomCMXi6Vsn2a\nikBH9qWlH9Oyrl5Pl4p5XCpFWaqPJIvf4SNLATc7nGiBlPmhUiia47I1WCsY\n8bpe\r\n=0zZE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"d99f255f81ed781f8ecd8b0f124fcfc5316c5927","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.14-renovate-non-major-d99f255f81ed781f8ecd8b0f124fcfc5316c5927_1603123792026_0.8364628995142189","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.2.14-fix-socket-drop-0ecc816991660348cbbf147bfb2ccc35bf29138a":{"name":"@balena/jellyfish-client-sdk","version":"2.2.14-fix-socket-drop-0ecc816991660348cbbf147bfb2ccc35bf29138a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.2.14-fix-socket-drop-0ecc816991660348cbbf147bfb2ccc35bf29138a","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"62447b3e18f6b075ec9bc6d05326ba2ac19a9c66","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.2.14-fix-socket-drop-0ecc816991660348cbbf147bfb2ccc35bf29138a.tgz","fileCount":17,"integrity":"sha512-fLFNkZpi7u+U0KrUnY9J4KAPXHziStgSj4hxafqONBU1t2e2CgFl1bWdn2UNhAGmdk0oASwE+ZVczd3dMf7phQ==","signatures":[{"sig":"MEYCIQDiDLUf09hQto3zKE+1N82J3e/Bl/EmW1BxG4btsH56KQIhAIljjaZNj+MO4uu/CxQ9qftxZEfmfabe1ZS8TQgmlJuK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjrDHCRA9TVsSAnZWagAAUycQAJbYyP5f6q+VZ8CpAn2a\nHBYP4DK6kZ0X0BzQVQh6CwPvJfvacV90CKyJ/uvdTTDXYxYMd4Z16hnHxFCX\nV7UHLHwsBfKszeD7VTxk4398RAqdkl857UChNmSo1dSZuHXO5oDt17Js/1rd\nEJA1xy/eYt8t/g7VoFHS2u3OlQS9M590exCksjn62UONSbuZpqgWz3OwoBgU\niX0dozHeg1nM0QQsVzrNFAKuXlsM3u/fbiwZmRPSORYnGDDcBZFGpOtETEiS\nS6Q9NdAHhYxi40FPg34VktVLJe60G0zcU+OXxblj8B6NpJjrG0uDC9+obBI0\nTM7/ozNSNJKU09+2GjR5KZhkpjhC0xrvTlGBlnHFgB4BDNby9g32dH6IMkPi\nH2RyTnke+QjnA3+437ckZKL6SZaF5WBjx9v1SkT8imT0gkep7IUhQ3H1FTTu\n1OU6e0ncG1bWFrShoymGbNcBrRnR0NFYN9e8kOzpIsa0nlZcCUc8sJdUwkkR\nQhhQxdBzhxG0BMjkDAm7XewyKo+ERp8XxPeHNoKqNzjkUdbCcG8PKhJst5De\n6jK6oLE2croI9nagDUwaV5EX7+hSDMRQwW6pNrU6oJBZ57Plbo9AUHnF6UEB\ncdSzOfEmU4Z56ferH34rmTNo3mS7PsrCnl8FpeklvnHfuz3MbBC7z6zX8dkE\nUgTm\r\n=4biP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"0ecc816991660348cbbf147bfb2ccc35bf29138a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.2.14-fix-socket-drop-0ecc816991660348cbbf147bfb2ccc35bf29138a_1603186886520_0.6783744461841197","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.3.0-link-support-threads-to-prs-d881bdf8c4c07bc60747d28f3256d3ce6bb6b3a7":{"name":"@balena/jellyfish-client-sdk","version":"2.3.0-link-support-threads-to-prs-d881bdf8c4c07bc60747d28f3256d3ce6bb6b3a7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.3.0-link-support-threads-to-prs-d881bdf8c4c07bc60747d28f3256d3ce6bb6b3a7","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a9e9cbb2a1a18c3c0fd5cc07704330511b15dff0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.3.0-link-support-threads-to-prs-d881bdf8c4c07bc60747d28f3256d3ce6bb6b3a7.tgz","fileCount":17,"integrity":"sha512-eTJBdD4CXRjcdk7Gt1nTDJNHIMQC4/hqPMlNaSqOdsvImz576C26MtwJLawIUHp7HjGE/Y/Qf/UUGQ7hiJadFA==","signatures":[{"sig":"MEUCIBa3BeyIq7TcVbytN8YyXTNgJrW359QAnhPMRcBkQWjjAiEAweO/3bhUjE/gjpQCRN2/+lJbPAJLS6RDaBwhLjQLS7U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkUGrCRA9TVsSAnZWagAAlQMQAJA/FdAYOGaNNiQZ4we/\naOJkMRLg6zvXAv0b/cibTPBQU1xi+niGcYxJ2ZAWoWI7FIKddrpp+C5sCpVB\nN+HhaiL/eGza3HGAjXlDK6rPlMd5aPsDx04rciT+O67mce9QvphTDIx+a7Ic\nTNQ2imdPsYEl0v878pmJPpMAByw1cNWD4SMjR8BwcrASg8hlyvn3YCiAHhhe\n+azew+o4X3E2bY+meGwKdVIyGxtK0yWFONQ8q2zF7q08zP11kS0cZkDJwQhJ\nNkSuwGTDaSGTzzstXhu4ylpTWqyyy2CHC9+qBJi2m0kLRzCNlpkoPzyxGr9z\nJ8wqrZVtX4SKvUGZ1DpsMiHjiNnFdNPsrD+q3xwP/btLJht6/1TKSfbW/ixu\nYf6+EtwXp6qBhCtQIXWIl8MUSrpVxetYPyIFArfcxd2+PAIicd76cgy46GKY\nbcMAAbX+0sj5BBjJBTG7ZXKIi6FW9tQLgn67sYEYoVf13DQeWhovm0GZKNL7\n9oc+H2wJHlwAKrTBne12FMp1WiVumfGnQ6djTT51CUXO5bqFbRxTNE6+ydnZ\nBm2X0BU8W8SklbIwuYXPzAHHMVda4Pcpv6+YbqJl/v3hqoZubNFEov7A5z/V\n7PP7cfLJrn6qP7AiobIRndajWvNDN5LUPmn3zvLLW5ctOTSvOtyv6aujuEha\nGjpj\r\n=1MVo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"d881bdf8c4c07bc60747d28f3256d3ce6bb6b3a7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.3.0-link-support-threads-to-prs-d881bdf8c4c07bc60747d28f3256d3ce6bb6b3a7_1603355050773_0.5900925839367996","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.3.0":{"name":"@balena/jellyfish-client-sdk","version":"2.3.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.3.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"f69204a7909bd50ec99484227dbade584cd1c29c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.3.0.tgz","fileCount":17,"integrity":"sha512-+MmQqb1qi5Kv3BKLNifo7ynq7p/EEbJD1zD2aaraDHs15lGt1op1H0eCM5L7VfPnVjvqsVL03oGiM31AqzT6Gw==","signatures":[{"sig":"MEUCIQCKQNnFlPr4nsc7UveTGE6sBLxuBpwPYhnGs2ZVbFpfvgIgNyrvwSYxyL8VSkZlZbMA8ePgX1PU7Yp4Q2YgiQD8eZs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkUjiCRA9TVsSAnZWagAAXnQP/3ivPBGpYBXUZBV3yQJ2\nx63i7pYA56rRSAse8Kjgf6HISGq7Qt5ckKhxyV52ikHfVCrz7TVmP6yI8eEJ\nl2+oFCmHYtWiAoVrAPB9670CynPHw2nZv7/52Bi2YoP8ktYIXlEo3NreVRdv\nmUMn2B1gJEIQgvYVQ7zRpB6fFb0QXhBhlCR9rsfKYMYhCe1fEmcDDiZp+oTW\nz3YTyxNs1zCUgYjV1CvHAnKf1UVG0lzghZwFYRBuNkYw0Q32mZRKpbaz6Mxt\n4JF4uH05wOQAW9PH2hsok/+cQCAcoZszhoU+od2G3oZ9QZJe22llI7UiKo3F\n2JP2kRQKJvRa93gwLr4A1BiP40s68Nawn6Nd/J++kX4GnfZZYalbVB+0XrNz\n0+uh4lswV2FcCl7DIzNp6hzLGdq08u5Vco7CPeVohXf89yFu1wDm/HZoxJ6M\nIMPZ50rMgPbyQc93Tyhzd+FsetxnDRBgUEvEtzZjKg1Gt8b7t+u5TP7OPl8Q\npDN6oyt3YFsnZriGQAojBtEdaJQKtzX0WmZmw/0GU29UpQ9jLSk4rHAqvVbZ\npLt78PVszadFaxytuksbQX8fxegh2++qcBrxtCUr+Xf+dGLHFV0OTWbKcmLK\naYOsG1q9KDjPMjBvM6vKOqD0SrXNdneCEHY/ALWwnzUsdgiA/coo9BDlD4Gf\nJ9rV\r\n=MF9q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"2f01e2b1375ef7bc74bcf3f943935f22fb8d2f8d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.3.0_1603356898307_0.36984539880180867","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.3.1-renovate-non-major-e4243441ed040e6b503033fc74b7ae3252cd2405":{"name":"@balena/jellyfish-client-sdk","version":"2.3.1-renovate-non-major-e4243441ed040e6b503033fc74b7ae3252cd2405","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.3.1-renovate-non-major-e4243441ed040e6b503033fc74b7ae3252cd2405","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"4a2a886ebcf3ce75b05b905470ec40b5578a5e27","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.3.1-renovate-non-major-e4243441ed040e6b503033fc74b7ae3252cd2405.tgz","fileCount":17,"integrity":"sha512-o1gbE/n002tWNpdYkvVKsxjVO9nEcYpDQl4+MbK8EVoFjgLFmZFnQNKvyOdVg8ZZxvaEKROxml46Pa3TnMWs4g==","signatures":[{"sig":"MEQCICOIdtc5CQs1c/MPlo63NzwNLjRzboslQsfq7Xr4fTB1AiAkmjmWyoKsNNwa3j9CdPIL6xIPxWyNbptfc1wCnhpgmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkUpcCRA9TVsSAnZWagAArm8P/2f29wbkZ+yji+kfnuGS\nKTo8XcOq4Mss0TufCUfgENzuZwvIRlNP/xBNrdT/ju4yBcB1APZt4vkofHNU\nl5SpmKbpMVpvnyHXItcC77e+Cyox6acQaHZGd6yVwfHz2BnV1dHpw8/v3TWK\nXTWjcl8yrBi5bOQ82faLlGrSgOkrrImEIcwYxMGHD1iYQ1WpXaBn41gNTwDQ\nD/6Zx+PEzfdbsqdE0c8vx8CNszMX9eSnS0G6t5aYQZ3DIzUiXfAfIs0cZnyz\nH/eYDEwcWYHsV+rU4cYB6eGiNZ88uz0X5WXQy1GfP8Eh6iPZIjly8w3xPkal\ndO+AQZpfobpcR+kssVGf2+Pwjiw9ttDSX80G9C1FJq1/Lyxm6/pQqkZXhv3+\nx/EUbC2DUS2uHi+r4YBBU49N6Dj8rIhFynlihFuVO4mkij2I5PvgzA2hVYu2\nIzTY3905C1PW7Qbge/z2Sqk94y1CcN99nvLSfjcaUgXErlr9eLgo020CtGCa\nxX2eVzmRqu7rNqt3O9aZzwQAvDvUjLKPC/rZ4+D6XTqRxNvf41NR2DU93326\nQRKAEtuQ0NszwVgorIQGDjM5ZxNpP33kNEqDlaGqEeJorocc6ns3ZpioX4/y\nrj5GwONVjcPYyeRHAVeU6upAwDCWB6VLm0aH/wbJFi0SN+M0ZM1ErlIxUZvt\nPKKo\r\n=4bqQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e4243441ed040e6b503033fc74b7ae3252cd2405","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^14.1.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.3.1-renovate-non-major-e4243441ed040e6b503033fc74b7ae3252cd2405_1603357276159_0.6319164063876299","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.3.1-renovate-eslint-config-standard-15-x-5d455e353daf29ac2363dda8b999d8ec4d1049ae":{"name":"@balena/jellyfish-client-sdk","version":"2.3.1-renovate-eslint-config-standard-15-x-5d455e353daf29ac2363dda8b999d8ec4d1049ae","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.3.1-renovate-eslint-config-standard-15-x-5d455e353daf29ac2363dda8b999d8ec4d1049ae","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a056493829a9fd3081cf97cdb2d55c57f02a639b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.3.1-renovate-eslint-config-standard-15-x-5d455e353daf29ac2363dda8b999d8ec4d1049ae.tgz","fileCount":17,"integrity":"sha512-ayXuQ6c3Yhknq5wGDB09OJOiuZ14a++psCoMJPQKpsGKCoqAFlR9YihMU399/zhVu1dN5NU5sSRzmLQlDgiM9A==","signatures":[{"sig":"MEQCIE6bU5skaF1XTY+51nQYKAvXQViCmcTyfJb30tSI2ok5AiBMKlFSoyUGgGFV8BG4nCFZuJevPeFW/wCOFXq19qjdWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkUp/CRA9TVsSAnZWagAA0NYP/0LuUS6D80nLrbRoJHMH\nUmnkhrl1aHhA2u2U3vfGhMSG57NTuArWeWjfyqt1nCbvoUD6xbmR9jyhjqps\n/q7FAZeyLn/7L7jX600IGx2RE84zYdABeUqe6JUBF7ayK2lW2kL7BYosn3NG\nbaExeBRUFmKm/WXWt/vhT+D1k6KeDsKnAHF3v7SRWwJWUOWIJGA7gcLZWLEa\n8znETF51ETzqvI4oEu6J1fik2eNJokmXcNn3uhUtTVHyBSstHmu/d2hO8uPe\nkEm9Qj/rurv7jYylah2Q44vwpx7cczjEys90Ej8foB7Qw9dnPi3JcEvweyHU\nngiJl8OdiPRX/XjL+ia5lN97m03b5+SQ6onzIdq0hVFZJoNYGKZQXB46DcvA\nuEAAiijUA4gA/ByHdDpdg2v671OAWpuFRrecJqtvvrkYUm0CUYCZg10gAnxd\n2qtR7caiXCMuiDrJI3MyyxPr++qutBn5kvpHvRATKX9cfY4AuSz1/YSZaa+7\n7obbMcAWi6ytEHjbH1aHlnvbpJ3uYdj332QZaNa0RyGwZR2uLZPUTdqGGwVQ\nwSbLUqU/QAA4TKhwObXMQOYz8TlerLg3IMowC5hmjcXD/HjuH6KED6tkts4Y\n+IuT+JlFJ13Su23osdKZC/Q6RCrzO+mf+gDZoxrmIxQbcrun9CKCmN4Pe+nk\n0GUx\r\n=YDDf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"5d455e353daf29ac2363dda8b999d8ec4d1049ae","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.0","eslint-plugin-standard":"^4.0.1"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.3.1-renovate-eslint-config-standard-15-x-5d455e353daf29ac2363dda8b999d8ec4d1049ae_1603357310993_0.6930349103438209","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.3.1-renovate-eslint-config-standard-15-x-893a22401e4e3dd2e4985ea3421df2cd77b04ddf":{"name":"@balena/jellyfish-client-sdk","version":"2.3.1-renovate-eslint-config-standard-15-x-893a22401e4e3dd2e4985ea3421df2cd77b04ddf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.3.1-renovate-eslint-config-standard-15-x-893a22401e4e3dd2e4985ea3421df2cd77b04ddf","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"9d25954d5d462ca382db6297428b4075ce58f6f2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.3.1-renovate-eslint-config-standard-15-x-893a22401e4e3dd2e4985ea3421df2cd77b04ddf.tgz","fileCount":17,"integrity":"sha512-x2n+sZQYXoQIUDf+aYm4ywD1e7gG7wEShb709EhJHTxVczivpPygsHJ/Vligx89ozNtzGlyWgHQ7qLsb2IBstA==","signatures":[{"sig":"MEQCIHV+zAUy4o4cctz4qb6d+7h4NdMt5z+lgp7pw7k/4OJlAiByqZCPnAsVdil0Bul/l2lczIEsYjGuderqabXRiv239A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkUwFCRA9TVsSAnZWagAAPiEP/1v8p8H0/N5UQfC2ToI3\n5KGtoNEFufXZAKPQPHROPyWKEfNdwhtSdczDwWs3CMjwVNzmg0jG+EDcBNih\n4jSctSq0L4HzOeFv3lEY4ttXXJi9aQVxwx++dxjFZ9aFiUDa14nVOzvOVoCm\nce199e+I6gN60R2TffMflEUrYCdNxBWef1AGPmjH4aTn19WUru53QlgDkrCK\n3APmpFbiLfvw8xZ7MZtMQ/12lAwX6E5gdxT8Ds+2ChMZ6kFS6tgXGByLvDkh\nA6PCRym3u+sQHekimHrhemmbOelKRIcRQqznxShr0ubRWzonRHDsoLYfKgqt\nu+QyJBOx31LnWH879ahlYHUROG1KDHWisdk7Z6y98ugcEtrV3SSDX8fsIIb6\nAr55GOnYFFypilc07/LAr8Bmo2XU9bySLkBROljRQOGT8NPTAB68Rvgb1sFU\n98Umf1tpAvL8JP3aIjQyhLLcYsLJlxtuCfxkPl1dMfq5WzdbJNi6DCf6ysbk\nWEkYjk77KmNEHF2SL/q/VMefa8i7OgkS7G+fThKXWUtyxVC9Nx09yRdA/fuI\n3ceNhgGErcygpgexZMahoDqUPgkd/2VdHPOnPHV7uwL/xBKiHB+SUAMHea2I\nF5Y5hse9H9g7vf3oxs+1Z9CG+AyHeV194B2DvTgMLf5sRjbPFieFASPVQK5y\nMy6k\r\n=oT+H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"893a22401e4e3dd2e4985ea3421df2cd77b04ddf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.20.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.0","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.3.1-renovate-eslint-config-standard-15-x-893a22401e4e3dd2e4985ea3421df2cd77b04ddf_1603357701088_0.07724830670081495","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.3.1-renovate-non-major-5d266fc52712af952dc2c9631c1ee9d11d9e7a60":{"name":"@balena/jellyfish-client-sdk","version":"2.3.1-renovate-non-major-5d266fc52712af952dc2c9631c1ee9d11d9e7a60","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.3.1-renovate-non-major-5d266fc52712af952dc2c9631c1ee9d11d9e7a60","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"2dad81fded235895be32dde802fa53f3504f02e5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.3.1-renovate-non-major-5d266fc52712af952dc2c9631c1ee9d11d9e7a60.tgz","fileCount":17,"integrity":"sha512-s5zgQbdUlUHiL6iNbX2ScA/dq4jG8pWa82PDa2Bm+mtFH7uhMwUzbb69wu+lhWnqJBkHQm2rni9sxIpO2G1qWw==","signatures":[{"sig":"MEQCIA6tMI339TRTbv7KSgYmGf5KAMgSfIhfhlL9OwUYxW1BAiBz5OA2O4W7rN7AC6Ul+1ppVJhqOkvYuVL469/+Fs3VCg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":138995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkx0TCRA9TVsSAnZWagAAJvMQAJ8uaFjSHWP8xdeNdCCm\nMA8mLzG6KVLm+7GAy3H9gYX8CSfyE7kLZ/hPIzxNQ8rMLypudUzLwccctdpt\nB1+JHWAxOtieEeNfWyFyUc24Mw6QARXUkLKbv+k+rw6aS4rJPVWJgxk7Xaxm\nj3wFoY+utUiVluxoesxv5sPEM/fQuTDqTTK4+asRw2Ur2QPFsXR/pbDmTN80\nD0icoB7Zj5bntN2bbjvwaT3rBPAa7rALvinhk/2jOxJTrDzhsT4pLoVEjMvY\nsKqP4KTbfCgiQlAL0Kdv6AGbAJMkCy1+Sezsgz6iLcwmTcxLE9DyxEY1MnDS\nBb9wF9DKGAop/m+dffcFa+DzIf2pN8e5BnJYwOmaWqUWVe1+r5mDPf4gkzeF\nfWFcI9KBJsGKwdqS9TE2MNhJ601MtwT8y2ViymKh/X/gVWM1d2UwUAPQH2bj\nsE7nAaU3sQIwXWsD11W+Fy1YZztB5Jg5NR6b6RsyWSyZbkbg6oWdo51oA9FR\nIqQ9qvjxux60O9gSQ3k7zb9IQ1oxDGlcIFKsJSYjRAhS4FDEYuUCSkscofOi\nbVoTd5qkXOGgTm2llqV7tq7rrvuhK2Hn13B155wQoXAaDK88FO+LNiKYjdFX\n0uE8eEB07/ct+7+3MkfddmuhWxYpG9AsH616MMn/QPgBib+AWI+dSFvDWhJw\nfslP\r\n=Qs0w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"5d266fc52712af952dc2c9631c1ee9d11d9e7a60","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.11.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.0","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.3.1-renovate-non-major-5d266fc52712af952dc2c9631c1ee9d11d9e7a60_1603476755359_0.6081041536671401","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.3.1-renovate-non-major-3cf40e7de50b06418678e6597f4a78956335e40a":{"name":"@balena/jellyfish-client-sdk","version":"2.3.1-renovate-non-major-3cf40e7de50b06418678e6597f4a78956335e40a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.3.1-renovate-non-major-3cf40e7de50b06418678e6597f4a78956335e40a","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"dabf61e528c04d784ba2b14fb83a90d9c37d9665","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.3.1-renovate-non-major-3cf40e7de50b06418678e6597f4a78956335e40a.tgz","fileCount":17,"integrity":"sha512-hT0Ff6/XDcSVmOLyX9S85Lt/xhJmk/CHvVNLqk6bU3bh3s8fUvAGUkyaL5p6bFrRval8/DjytVQ41acZFfPqsQ==","signatures":[{"sig":"MEUCIC0ORQFwFrXKYHCahSZBnjU4fpPzMflmyEJWWuul8eSIAiEA3fnBlIAwUwWTxmO26XiWdt8aKYGcDGUqqP0UvaAsOxo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfk50qCRA9TVsSAnZWagAA0BMP/1j/4yjimBlF9/4TIfbT\n7YC5cDCTEgRO0mslB+l7fKQwbKsWD+GSPOdlbgI4531RF3e99xF4UDyzsVHS\nfdKo3J9d38DVT1nBdj4NWCLmtOUnMhM2C0ZxDEOIy4kY3WbsKDpu54aB9e7V\naBB1UduWrtErha73wKI68xJFrbN3r8nU8LtTa2rXU/FQkqD9iCjA3Ttqezrj\n2crXzc2G2UPOEx8qYWnU18zc9Cfo32dX4Tt2w3zhseafZB0KwfERuNiSGEIu\nYYoBlgEbEViWsa8whbug+RPM6ZBpojWeIgC+BuYZDeQpf+CqRaxddYL3nsAE\nXiq5ftMiMCr2yEUrgHdQFxhKjYnX9rV6mUpeNvVRqpLiD2r/Lyz+yB5v978P\n6PmAzbGQuS9Nk0S5aDMPJ7oj3UC/cZGLhO/Ba7ehDYY7YRXqCfg0f1xkRUJt\ndWr1ScxAtBmCNJvELvo85Vk2sDnsbJ25fDpDwYOAZVdt3EgZqLL4DkGKlj3A\n2qmYOZRcvAjMdyK34llPqc2Mlv/WCbQqAmZCbr9kkWVJUCjxVAiDSjxiHUm/\nhpdo3papLXxcLcJjVJnHtDDX7bAo24jeGU2oEoPdecCP1osTT/8iKnxLADu+\n4IPFVSyUGZW6gKE7z3MeLSUt6jAs1dh3M/x43zpfR8EumykAUyPN9wZyNEl0\n76m/\r\n=GO61\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"3cf40e7de50b06418678e6597f4a78956335e40a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.12.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.0","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.3.1-renovate-non-major-3cf40e7de50b06418678e6597f4a78956335e40a_1603509545719_0.09788415217585733","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.0-create-link-constraint-support-contribution-score-is-for-user-4da9bf2bc7f90a16459924d9d93ae6c23c764227":{"name":"@balena/jellyfish-client-sdk","version":"2.4.0-create-link-constraint-support-contribution-score-is-for-user-4da9bf2bc7f90a16459924d9d93ae6c23c764227","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.0-create-link-constraint-support-contribution-score-is-for-user-4da9bf2bc7f90a16459924d9d93ae6c23c764227","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a735fc892934337859a60f01ddca9a9d09d8fe83","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.0-create-link-constraint-support-contribution-score-is-for-user-4da9bf2bc7f90a16459924d9d93ae6c23c764227.tgz","fileCount":17,"integrity":"sha512-qfsP1kXRu+eavD3i0JDoIYVTAX7crzx1K3qRbtYPf38oQhJlAGGKAIbTnAjW5lhvOUunhNALW/5I+VECSOP3ow==","signatures":[{"sig":"MEUCIA5xMG8ygANBh2qqbvuCxezxA+MJhj3vOayUTgkMBFXSAiEA5t+0FJIfMJjFyfzh7bmpXNDTNIX4HGyLmtR+o9hUIfQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJflrnzCRA9TVsSAnZWagAApFEP/3hhr+SlKlpZ/ZExzLyN\ni/Z1THO2QojBY5T/1R9ls9uOOyt898CozTiTCDnM8ZOdPHIdR1mn35WnxDVe\n/qHhC+9yniFkO0Jz4YAU7l/rVex08RBoU/nK4thPDRKyvKV8YruEn0wxq9B6\n573M5nnOff/E5PpT69x9GjYSm37ZShb/0bbaeVJiDwPKgIRlWQ/vosjuoGIt\n1aqykX5vbM7BusuETw6ICA1/hEQ8jq/oK294hJ2uO8ZUuM89QUBPWRFO2rn1\nW6Em0nIiGGDLSzFdrwMG5HCHULSdU3KG1s7mZl/toWLCp3bkLugVZO02XQew\nxG0LYsddTFfjvRWUUy9qM+VbLHndh1JFH0RP8yACc3jIqk8ZKxCPRffdwb3k\nfuXItbNkKbSBhf8Zy1C3ygQv4ntP+H6B1gDnkd3Wni9J3CF05D2ItSZfaaw9\nLYznSDk5L2NHY+I/cR8GmWSFsAy6ehMH/c8npeM/oB91wIBpqrtMp1NQhYTZ\nftwhaXsuP6BoSA97qRI6jjyfQXudtjuV/LTSpolbekMTxLI2EHzj/4049067\nLHUv5AhlUntFyz85YZr1TX3ROfpemGwGsbvVkGfMign6djcwi6IsOUYKrARf\nlZSebv90rs3nLVlM8tPGiea3W5k/1zIk674tgskJWFCTg0Opw0MxOWHkSFA6\ne/W6\r\n=spzJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"4da9bf2bc7f90a16459924d9d93ae6c23c764227","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.12.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.0","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.0-create-link-constraint-support-contribution-score-is-for-user-4da9bf2bc7f90a16459924d9d93ae6c23c764227_1603713523017_0.7160702753248944","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.0-create-link-constraint-support-contribution-score-is-for-user-0829172f31829af4a9915adf74960c4330923631":{"name":"@balena/jellyfish-client-sdk","version":"2.4.0-create-link-constraint-support-contribution-score-is-for-user-0829172f31829af4a9915adf74960c4330923631","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.0-create-link-constraint-support-contribution-score-is-for-user-0829172f31829af4a9915adf74960c4330923631","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"9f1c544441393030a24648b911c06d0a35ca5a4c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.0-create-link-constraint-support-contribution-score-is-for-user-0829172f31829af4a9915adf74960c4330923631.tgz","fileCount":17,"integrity":"sha512-hqgWQ3W8cCf2mK/fJOlk9nb41rbhNNkhjXZTGB9ZBHdTtpQn1G6XfXj+eGx76rg+8up8BWW6tmI0GFYJt6xXtQ==","signatures":[{"sig":"MEUCIEYKTkZzPxzxpPYGUfOcih1vSTwh0UlcOE/QKNeVplC8AiEA+TGmAKqMAMzKvVfeKUJDoRoHJT4C7vS/y33NcLJMX2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl3rvCRA9TVsSAnZWagAA1KQP/jgCPBAvpG0YUhwS7dNb\nFSJrkix67mA540oZiIGZMw1fgm4AstmvsteIYH3XR5O1W3oQ48pXBb77NGww\nQjlw6rwJfEd33Mx3AB/idn1rBO1L7QS1Ua9C4Ff5pcZTrw9rfFf8ufzBt4xY\neDlWptlrQEYc70LM7Q+B9hvNFNYdEGlU5pUozeIc2vybnLlf57ANXwOk/jOa\npwwXsVZVUA32/vzmGIJOoUu6QBB1GAHYVUSW0dfaRuqAzcxlyUIJ9fPmtF8T\nHUMnWkXqcjlpBe5RONO/sQXK5YhEJ6hm61/xlC+bqpwKnlCfZouyjfMyGBJ+\npxI7dO9FrTribbGafjEF1IUPPdtJ/XH7kJPzFN/DjL/6qJVMqqHNnc59hVQ/\ntExOOi1HbNqE+ERNAC+3otJllxFI+vxCOPEpxXX7BJQbBF7hswPaHPAa/kHe\nx+u75mqOako5ylr9KViFP6jXezJ7nD3KhvXeK3C7rNUW6OSOf2nkpjuomZS8\nqCuruvXf1Rrw1T1u/jNCLPljeKi6VdjciSaP9081hLM93yMi/zsJcJhPrkVi\nC6Fydn+n9dOp8VOD4eJvZvO9jxkbp0HdvH903s9i51XVyq0wnCvigaOfhC3M\nHKeDviPx2M/366NOuekIlDKqVKfrUmZqy31ZP94k+0lnpYdyV/yVSGKLTylZ\nzggg\r\n=8Cq0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"0829172f31829af4a9915adf74960c4330923631","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.12.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.0","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.0-create-link-constraint-support-contribution-score-is-for-user-0829172f31829af4a9915adf74960c4330923631_1603762926650_0.7537117004163063","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.0":{"name":"@balena/jellyfish-client-sdk","version":"2.4.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"a578cfd8718e127eb1aa3a08117703821034f5c1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.0.tgz","fileCount":17,"integrity":"sha512-0vbGcS5ACXrlejtiH0tWDtdJs7pdX2J+bwCdE7AHN4yrfC7uvX8Igufa7h+fxDQBZGMkgL0bzng77h7VnDBPuw==","signatures":[{"sig":"MEUCIQDloAEcqkmdUOAjTmc5Kg08MsJO9p4b0sbsZ5JjRjnQ4QIgZP/xXFiTynPjlxGbp1itPMprW9KmsFAv8nvncsihUZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl3uZCRA9TVsSAnZWagAA2tsP/3fjkR+KwlI65myMcPYG\nttgJaJZVn8Lh75hRI9ppO13m8j1caeTX7nbb9lgVSV/phsQAZC+meN66JCBP\n5ytaOsv+4tXHskrFmSwt/KTWrkFp2CSsfJXfYiO/SRiR5s6flW4MU07F2HJb\nzkpYwvwkXikt8EfVT+K0uJSG4G/Yf+Xt7F2j0mzlDMdjzFZj6L5Q/STEsWbn\nNfeEha6e8TkazZgL1/aG6IR82HapsOrovz5w9AVmaJF5JpC9lGn6mOaywFrx\nbBWnpdkOCTj7AhbabdctJEjtZZPTrkBwDKjKwpUDAxLXRUt2rzHdi2PH4MQw\nn3JBrVxSG9ood7VYzYZ3XcIUCVhgaTZLiamBntmmU7T/C666d+sdEKIWA/f4\nULMXpYRrJqobtgtEyTKNEyQ3bzFEAcizff5T6Hju1OYZVXjho265b9efATSU\n38glVx/wm9gKWRhRnPJ1j1em87KUDUfiq8DdcaKAn2FebTui3iAodmnxY0nA\nnnxp0DNeaqENauryslUkyW4cpo76mbn/CQfAxVS73N1C1JTfexLpxNsHhKgj\npZdmHZ5rkwoHjp2vMBaUHa7yEMKY+mbIZh7jeCXU/xcsG0Ot3QDF8Kr2NNd6\nOh/A2OPNQ5z3wMTEzcorBJsve3mSqxtOGQ8C0OFj4yMPswYqQUQd8V0/fhgc\nuQz8\r\n=VRaw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"4984dd5b56a6b8611f775974aab61cf75a5e0cb9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.12.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.0","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.0_1603763096477_0.48087371827825764","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.1-renovate-non-major-3411a34b0fc445510e83d8ac6b0b33a0e894950e":{"name":"@balena/jellyfish-client-sdk","version":"2.4.1-renovate-non-major-3411a34b0fc445510e83d8ac6b0b33a0e894950e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.1-renovate-non-major-3411a34b0fc445510e83d8ac6b0b33a0e894950e","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"bb9fd5b8fa0513f5b8e823215d042ae3261071ee","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.1-renovate-non-major-3411a34b0fc445510e83d8ac6b0b33a0e894950e.tgz","fileCount":17,"integrity":"sha512-ih45T4bQ+5/br1LvigtK29GPvHF4iWn8V7s81d0WFode1VMkCqh/03q6WqcL1QyWc64H2px+5pafE4YmT9+cWA==","signatures":[{"sig":"MEUCIQD3ppOxTDBtwlyI08/Kji63LGIckN6n2wc424gtjJQl8QIgd8ZpiKyPLuOjp8X160nix6k7YqQTSUsoFp9MmmjexWI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl6p3CRA9TVsSAnZWagAAWbcP/jqZlT64JR/iEM0Gg8cw\nL7WHNpI/C0cpZ1xKVTIGRlFbs0XL6nc+k6qWaj8F5aYUX9r1E/3oBa/RYRu1\nqqEptr8ixIcqpBoZBwSk9uX9eemhc03PHns+H2WJWOq9uNBL0Bc00mIehzPb\nyhKaurpQlzCWcil//4THIroSr+hW5ezi7HmlODw2eQjJPNSQ0URabWns/Ld3\nUGZmEkZZeZw0m8vas7QXxjUfuIwDtPwcWeKinyPMZiloGLEhkmPyB3ehpW2Q\nlbxGk57se3D48jAIpuITCfTreCg4M3mtCP1lF5Qd7+DUeRnmxurhfImHQ9XG\nrGPsgQj0t/1VeGMv77Gdknqr0F9yg/9MLmePONs6eWwBqPLh+fgiuT54WUsE\nT7m4c14+7AtSIDbwZPd4tV0Plwh2I6HQef+18CiHWeSuW3Iwt8sTquAeGSAO\nu21gRAwCAorZ2hya9NspwlrBH7K8uYfg//vwfpm4SgiU93AK4oOis+jVcEz2\n6B4sSMnkISrt5JO3kROzv4ImlISnjxw8o8ClsKHJLFJrIE1o2o5Bn2N13DqQ\njMArj64LK1r9AylxBbOck+mHlE8cRHXHNkiD8HysSTVewiano1uKW/EjKs4+\npGHhrZWhYObJkYaMU5+PmmUvNxfK8h1/iWLSH/zO/WjpfDqDi7XJ1iMNsRdA\nBtHP\r\n=WRv6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"3411a34b0fc445510e83d8ac6b0b33a0e894950e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.0","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.1-renovate-non-major-3411a34b0fc445510e83d8ac6b0b33a0e894950e_1603775094647_0.3421091111460932","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.1-renovate-non-major-4e11b2af13ea16182fa74e0d29818c0554e57e67":{"name":"@balena/jellyfish-client-sdk","version":"2.4.1-renovate-non-major-4e11b2af13ea16182fa74e0d29818c0554e57e67","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.1-renovate-non-major-4e11b2af13ea16182fa74e0d29818c0554e57e67","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"8b3ad0fa978b20b70d66261a15dde0992dce2afb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.1-renovate-non-major-4e11b2af13ea16182fa74e0d29818c0554e57e67.tgz","fileCount":17,"integrity":"sha512-bMDANsqxhE+G8dcJdJMyglT7VC/FiyHnaqGOl5neC1hAEiIGBRcC6Y9dXCEt+vGEmEL4OYNdzJPPIF2HuLHvyA==","signatures":[{"sig":"MEUCIQDo23pRUaim0nzVPp8hS/8witbA+cE8KhY1l9EMCrNCKwIgfJt2igxaV2M9MtPd+e3SgeUJGz8KxEXZGWjXeqipxFw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmPZACRA9TVsSAnZWagAAfkAQAKNL8opkjsM0xJdE8YWq\nH4/PnL7kjySvUECYkrpLHANGbHH6sA8o4XiQqvvDqoo1d3kuudMMYJFDuD1n\nOCZjoyXIQjXzrhAFvmkgdRhGwM/mXTgrRS/AuOE63tewBL7kQ+0mYkXb4yL0\nKPGzPShb6YROFQqLNxBOGb18ftVn1FCwyhQborCvTcrIh71BwD2ib1fe7oZz\ntS0BLXipmsECao81gig4pw5a8N+ppLHkMjLFZHBAIlEislkkD9rVZzWA0PFP\ngEgSdo4tiAEft6TybaJl/8pdtlND5n80YWVp8FXPRBdF00ryvb/jmqT8Esjk\neLCfmeJuHxKEPAA5bo6OWiznipb/++w1kKctRG+8TNAp3r5so4+UFTBGnzth\nTXVWxURHc4878bzQS8UKOCTNZq8rkNW35R32lYh1hya9WRm0U3uViCs/G5rv\nUnaX6eCIWXperJ/LSWRkrf9PUXxW3LPy6X56ALEG/su1SY540yVUsJ/lSXCr\n+JHMy1fkVZjVCcqpgadahvhMMKABggbnNQpIQSKHlUicFmW3ph72w/zgFAqj\nUTTXy0lv6tnXgAmInL2da6YbUphDEIfDLSp3TMlkkjq1oY9hFU5PSMjGhhPP\nevbK7EFZd+CaJuBDlQyi+D7u5dhTtR7f/dCEAd+tHGxGbrcS2bTeWZ0IT1Xu\nbDd8\r\n=Oaru\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"4e11b2af13ea16182fa74e0d29818c0554e57e67","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.0","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.1-renovate-non-major-4e11b2af13ea16182fa74e0d29818c0554e57e67_1603860032014_0.9034922407964572","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.1-renovate-non-major-ce09c7588500916932eaeacf5742e0d1e16f9ecf":{"name":"@balena/jellyfish-client-sdk","version":"2.4.1-renovate-non-major-ce09c7588500916932eaeacf5742e0d1e16f9ecf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.1-renovate-non-major-ce09c7588500916932eaeacf5742e0d1e16f9ecf","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"4a4eb6c05ec85f7a370b2c8b7c9a52a99865d3f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.1-renovate-non-major-ce09c7588500916932eaeacf5742e0d1e16f9ecf.tgz","fileCount":17,"integrity":"sha512-Gh8QY9n4pkWjzfcl0pS+pDB2hnDC9V9xyR0YlQQEK/gRST3HnfAwxdXnwtGLz50QJP5Tah+lPI6m3jrY4K9ngQ==","signatures":[{"sig":"MEUCIQDENGqHiLQasdKBDOfIdFfNxv4P240lbCEwrEpemTrj+gIgSqiUOEft/iBJ4J/ilul3SRI0iPfu8Z3Vlnhm3XCTUSc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmTYXCRA9TVsSAnZWagAAta4QAKMrY+V2CzARDbX8nTzF\nluzc8ZdC2Mth/GJXtQDGnIeo/mK8Hi1dt/gE4cWRAlANWIPwfl7zr9aCilUw\nxZCiTurhJyLfkR4Q2scrWm2lfAa8sebxHc8wsqNYd1XjSx9NBP+vPsCElbgy\nUcEkMSe2nkXy+LxZCyK79TlOL8V6wfweM/9FX5Zanjo5kazHjTTyG1OvnIbB\nrTa4GQs1aA1FMpM/n9i8vnAw44kJaeBV25D0j7jgFPEuMF0HUTyRvv1nqina\nhvvcblkDKBnYWgrvjgXak8rW3eeAGaGIr2xzG1766K82syyW9ll8ruKhUZBP\ntBt+O4EdiS2dLE/94t18vDiT5JhDdxh0d8bUmMfnDo0Bc/fZVyB9g8NxKs14\npV2H0KEgYIHIz4KFHra4LOanbnVSO9AgpptIoeQH9HXnuiW+mbNcufOBKxZB\nh0wgR+SapGy6EX1JaCADacny+4cds6J2UeEi3MG5v/WLa1H1O/xytS3pP/Z1\nrJNpuMFJadiHO4014YWrWq+qDSgaLIwsTzAGuslRt9iZW5HuBg4IK6tFLDJp\nI7MnRqSfhvS93TSIaUiJwWYYdhLO6JzKwF/FMxaOalsNm+3TUZeanMiZUaUx\nAQFz5/ZfshJQiYCOUXb7sNzyIfo3TPZpb/hqojKpvhh2Zi0GoB3IqQz9nHSp\nLPjU\r\n=4MQu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). Its meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"ce09c7588500916932eaeacf5742e0d1e16f9ecf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.1-renovate-non-major-ce09c7588500916932eaeacf5742e0d1e16f9ecf_1603876375131_0.6190133241668125","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.1-update-readme-1a3281504c4fccb5c3948162f35b057c199023fc":{"name":"@balena/jellyfish-client-sdk","version":"2.4.1-update-readme-1a3281504c4fccb5c3948162f35b057c199023fc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.1-update-readme-1a3281504c4fccb5c3948162f35b057c199023fc","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"823583bed31004612550128d1e6eca0dd6a1c8ec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.1-update-readme-1a3281504c4fccb5c3948162f35b057c199023fc.tgz","fileCount":17,"integrity":"sha512-TcGbU8TKyu4Mb7Z0hfnyUE+YzPMow2gwHO7nyBXlDoUoGGCninzR3WFaYrzdlT2lPVcvqJaMtlkTC5UyIsZVvA==","signatures":[{"sig":"MEUCID0Xz742atcr3NhNvuBa/y8VNESaXmm0EwrCskosK+JiAiEAx9mrCW9SlI8tFYarrKv/LAcdKs6rWL54Y1JyAJl09yE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139879,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmTfvCRA9TVsSAnZWagAAcTkP/AvXLV4yZM1X8mjp3tEN\n8LwF5nKu7XvqFx31KxSHj5/7xZlijoHb4Eft6AMPmIhvkxsjzDojgAYhBJps\nKNiymFX0kDsBAxzMZncYHwpHFOfM6BgFXX02Hr2Cb/BU77JBmThOJQcmdTSR\npsNPfCTTPPMOClB3eOyueZr29eakvBYtbenrHvWcypWFo+sRLxeRigO7JHuC\n0q3v7BwGUhbDwn1zuOFLp+98PmtTZ+LYOZSWcMX6Jlafp82+gYyXH2saj+W6\nxRqIhv4h7mzrCvWyZk3NLn0m+3VzyovpW8RrJJUsBfbLC78ZfaPX2Q5ELXjo\nHxRuZp3VGhcdckWIoUE/saZBiSj2jL66UPV5BFZx40BvBDPjmgO1kDXp80J+\n7lalb52vwi+qPfxaLIe88mu4WAlMUSRrcE/QsaBn8GRfCLlcScSO9xeBSZ7J\nG/h/vJcrbLCBpAvIAgsFmNljW+GdQLFzWWrrc7KC8B3Pc/Z2dSM0O0ZPhU2X\nmxxfwhJkhSCV00M64Jm3Sj8Il4ENDk+EDUESyLN+I5TimjnPG9YwO2dNSfwD\nh6Pv9y8CaAYsUv1UwM4x6nTRU0aQ0MQBjPRZWBkdoOSSmw3UsAV2A5wWUMzC\n61QFnZi+HPm2PfcHArmzwwpVi1J6Oql7ako2mAzBKMnJh7/vjOOyJfI+TNxq\ngizY\r\n=EH8C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"1a3281504c4fccb5c3948162f35b057c199023fc","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.1-update-readme-1a3281504c4fccb5c3948162f35b057c199023fc_1603876846627_0.18134758782937932","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.1":{"name":"@balena/jellyfish-client-sdk","version":"2.4.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"53b44a711ae31e247e2b0c39dba28ea1aaeb7491","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.1.tgz","fileCount":17,"integrity":"sha512-UewOCcseuteMk34V5z923wrIMWd+dRItCKcpthRtJn076HPSe0HPMVvrlKvqg9jQZofHui3iiYtkYwm7lK0YmA==","signatures":[{"sig":"MEQCICY5lhY8dnVdkopYj6Xn9Tn1W813M2dkxqJMC2FFV0bLAiB2t+1VnpDPhNBaKoPlz2PJxdrBqJD8x4uskOQ7P/WaxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmToaCRA9TVsSAnZWagAA1dUQAJsIw6MjLcQRSJMLdylc\nryK5Woq62cCMpdIWtGDxZATITrtV2RS5v7pKTDsVYArwKfVwqVySJpho0ywE\nZWZ2AM0zMWgn4bV4b8DaD4ZibNA1dOdleAScG4pE5NOPtDhe98eljCMsUUp/\nKULp1jbV68hfX+sc+woJeAbcIzw+3QElwFBYhPr8AU80z7TKp6hJpjK0lmjr\nRz25hOxWnogMYxqC2IYubDhcnPj25NuHlL9QHFC11hwFrkGKpopQ44wFj3CS\npPGRsUn+rSLGOqNqUJGI9OLnIru9Q+FnBzt1YRC7lC89q6fZEx1rX4qLUFB9\nJvrkKf3rcF2O9nn2EJ1Uzh16QKnKB/Bexe3H1HMHBRTMIVYX4cqlw/Ab7CAG\nqSZPvte3csh68xMLWIRvgANtJMtT8daeFSsWzVNclCoOGwmmwEuBvuSSUwWs\nwfKpEXpcjEGIPvIvCPQbXqbO8ScH8QTIqHkKrCa34dlb5GIDe1CqdqoCWjfK\nZ1qS1vziE3wIFd1HiNQ0lmHVL9Z3GLLeUV0uxtbysxW21yFfH7ZY6xR0T5sA\n73YWSooXUh6vbA5sLqhS3cvYesSs4aPkF3OlHm+5q7csAUjr53h+BMfWVpg0\nBLp6SFBGxqiWH4W2GIRMyMQOYKJ/AzD36a61gc1uL7QScg0BnJNL/PKqkgz0\nOIHn\r\n=kZfO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"bd4a52ad384eabf6659cb0dc7353a65c0683231f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.1_1603877402223_0.42107742640517487","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.2-renovate-pruneStaleBranches-d6b3620225e06996afae26cca373bf7b3c21bc8d":{"name":"@balena/jellyfish-client-sdk","version":"2.4.2-renovate-pruneStaleBranches-d6b3620225e06996afae26cca373bf7b3c21bc8d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.2-renovate-pruneStaleBranches-d6b3620225e06996afae26cca373bf7b3c21bc8d","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"22d38655fb793e5d973c3e5c9a289dcc7a38761c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.2-renovate-pruneStaleBranches-d6b3620225e06996afae26cca373bf7b3c21bc8d.tgz","fileCount":17,"integrity":"sha512-mE+NKtSGq93Oz/mlet6ARfaR2pWZ8mDbaLFdDBNcKp1zt1+TAEgMqFUKwU3vbXByr8VLjPeP7ryZLzJzV5ZOmw==","signatures":[{"sig":"MEYCIQDeiqwsJI1iTksIM5EUByyZwmH0zawt/1cl0XYAijFKqAIhAMpyuxKa576p/eH3DmzfztciGDkx6LzKzZYPIxu6k28T","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmVzQCRA9TVsSAnZWagAAcOkP/R66PAxJSi9LpGjx7xvZ\nUILG70HSONyfsbgILbVgiHthj7LRNxK/ue6K/s5KWDFo3pAi/Q7IG1uhOhiq\nBSgUomLqN+yaF9D+xCVE9Swd1XRPW48jqK82/N7HlqP66seESiXZGjnFTl2t\nOZ4oO5HEuXCYivew8baTz2EWrdhzQVbp0a+n50ag/4Bqt8TA0yByrU7Pj2Zj\n2RYGSaqzFWUPdeL8VUw9bJgh7hE1usDDQN7SVqNjOp1nSu0M8NUSfOl/ridc\nnQOCdVZdkj0HMCzqeJsav8/khfp0OwwdweDwNqrq1dMDfYT+oxZTHimC7jmq\nELutIJ2S3gMhmD7zBbt92K8x3XIX5EP7paAvpsuDwuLOa4hMMTlgLmaXGJnx\nC3tO02LAIFr0QZb5yzN4RXnhhtPxF5tIzpIYpGECSqYt0EwonvBDwNd222b+\n3/1rQNLLdbOKW90vhyHTdwGSEkSQWn/b8WeWzZfSJD8OISZfe6p6GEDW+2kj\nJlbNNQ/shODzD4LFXkSkC9hQF6q5hJG6x3HDH2fDZDyyu2hGlDSd1rwYbbmz\nRKvBMrWVxqKIvWJXJKV/8X+wCJrWf7FW0pZuShZpIQH0642X6GU2+CNliqbA\nNRVZvOb45euXxJSD1DuhBje22lbU0BWey8By05u5ryzJJgn2nh90eAdNJFXg\nvTye\r\n=96Sv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"d6b3620225e06996afae26cca373bf7b3c21bc8d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.2-renovate-pruneStaleBranches-d6b3620225e06996afae26cca373bf7b3c21bc8d_1603886288228_0.3467990823090017","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.2":{"name":"@balena/jellyfish-client-sdk","version":"2.4.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"b610cbcc139146d52478d5a455f2e856211eb404","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.2.tgz","fileCount":17,"integrity":"sha512-7nUtRiv39K8LloMJxiJE6aOWXzUv9IeHa4r+q2kWD7cQnEoYM3JFmNbqzJO8OPg1WpOItf02oiqV8ZztAczmBA==","signatures":[{"sig":"MEUCIQDLlVWmb0GiXr8kQKmv1k0UHYWpjZOi1OusEzNe+SKvGAIgd+yj5lSb0WFe6xMHhsiSK5vW8EeL7WAvFGjZ3lFeiQ8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmV78CRA9TVsSAnZWagAAA3IQAJRLZoqnHEwmPXBf5ndq\nq3DHYPbHLh+eKFUgN1SYqaK+xM4xm9HEjJFK9ce+Nzpy43PlfQibf2SGEsfY\nFf9SnC4MfacONLwUUV7kyuM0CGTjsbNuM4LyIdWyvVoT4EnVqf1aJmfY3ZzH\nKT8hHY15KIJpGyyBd6gLKBwft23bIXyiU8IoIHUU+iC1q6NHpU5iddzmPnWy\nVoaWht+Pkczx0CNXtYndOOyq6nndSiNzBtgoHQB9WNYshn+cVjOcJrsBk881\n6hXrfN1UzA8uBQnJ5/1jXBmtKb59CRAEswI1oA0JFbNfbyxtzwdYJHB6XNUl\ni+vj3J/aqavZzisvAJhj9eKZXTRzlSWPzFwyeovu1E7IBRS7pAmZo+OR5gOs\nGC35cowiPa66tk73k5H2csY8H9od0N9SdPVQ7Rw0mMB9GOd2xv9TPe2vhAyu\nnaUvb/bCdVSlS7y5p8vnCKQFdesVYcby4aPEe+GKbDYiVwOrwM6shotKxGoM\n3aWIB0TrzL8LFiSWGhucRE1w51gB5Pykm9UzLlaAM6iZcwA6PXaHC89bKkkE\nBKDsZeylLnRrJ2ActpdkFmBGhaf5ZswzMffdK2vD9k/RrBeGpvrrvXMP8Njc\noDxQNYDJVgGr65EwdxMyaF9QrbmmVqq43/Nxg1GUMTBErjo1WQ16lhxdVRPO\nUuME\r\n=weXz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"8d4f6355f08a9f50d72bce2ac6e0e0f419554fc2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.2_1603886844549_0.7531191152595316","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.3-renovate-eslint-config-standard-16-x-bf02a8d17dfa0a11c43ad7ec7b98a0fb3d0aab17":{"name":"@balena/jellyfish-client-sdk","version":"2.4.3-renovate-eslint-config-standard-16-x-bf02a8d17dfa0a11c43ad7ec7b98a0fb3d0aab17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.3-renovate-eslint-config-standard-16-x-bf02a8d17dfa0a11c43ad7ec7b98a0fb3d0aab17","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"c846e0c0adeb9c1ac77ffedfae218e2987670d58","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.3-renovate-eslint-config-standard-16-x-bf02a8d17dfa0a11c43ad7ec7b98a0fb3d0aab17.tgz","fileCount":17,"integrity":"sha512-fmXKcVwGGZF9l89XtnwcjBlmrYWB1iPtXu1u8KvNjwwM8UjhQ/G2aiSxwsbEmhrSVubwuxE/1u/8nHgAMKRYRg==","signatures":[{"sig":"MEQCICH2Jkh6hbDZUhkZOr9V49dNH1YNddNFRztomtUM6QtyAiBLZf65IMCHp/2Cdw8ze5ivXTYNknpAXjYhk14k6rU1NA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfml5VCRA9TVsSAnZWagAAk58P/0LgX13QYuE1+nyu3RgR\n8k/hv18p1fa/ZhSg2k/rgsuOrZ7vNeif5Kadg30INIjnWdb9cWexNyGcLq3j\nhsNHLyryrihkvfWF1BCP/JlDjCSzHJZOoNAKrJDU99/UlEjkIpEvMly49mvG\nbHG6MratAku0uCyXnwyCINvA7hHLK6qkGofFbIxFYC3C/TdU+zTEwwi6e5QM\nQ/AKTsDcmNT084zEYD656McqK9TUAcZz6/wYI3tBj96Tbhb7wHDDQJ4JCBzX\n+ksWmTAx4nMyNeKIx7nsYBye5q94TGQf9f5wNLr4v5g3+4Od2EKOTuzMDU9r\ntt2W6E/yAHtCx2Ncm9J/6X8r+qNTPj3kT53KjaHZUWvCSHpOSq04jRn9tgrn\nM4XhvAf7Agcz1rwIRHONbkuEyFs/etLTOpxEJfGpd6talFsqumOfDWHj6Wvq\ncX+LJqzoaf8gCgH1bYcHIHVh0SU8E+PUIUX0fTe9r4PXYJDTbkRjy21ZOMuF\nOY80beFph4W1u2JojvQBPFQNUvA0mDaEnfJyKa5kQq4PPEkFFcGtOi/RmHCN\n+P8ArDyvpAnDsmw8Y/yRyCaHiGx9PcJwx75pxyvMrgzy3T03BqnAaAoVTdD4\nerYEfViSMqWsX0l2zWzMhAdE87KYXol3PZRTSkvwNgfYQSZAuqVce8B+Z87C\nb5Sd\r\n=nT1D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"bf02a8d17dfa0a11c43ad7ec7b98a0fb3d0aab17","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.0","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.3-renovate-eslint-config-standard-16-x-bf02a8d17dfa0a11c43ad7ec7b98a0fb3d0aab17_1603952213025_0.7010315026339229","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.3-renovate-non-major-e80df537b31e6d9a468f55a3fdecd34b2e8d3876":{"name":"@balena/jellyfish-client-sdk","version":"2.4.3-renovate-non-major-e80df537b31e6d9a468f55a3fdecd34b2e8d3876","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.3-renovate-non-major-e80df537b31e6d9a468f55a3fdecd34b2e8d3876","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"7611b7d5b4a3e9459eea6db77e24ecc17928d8e8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.3-renovate-non-major-e80df537b31e6d9a468f55a3fdecd34b2e8d3876.tgz","fileCount":17,"integrity":"sha512-0c9k/vzwmiHK6TH6AoeYzuh0ygMkgBNId3AWpY8UVDMn3p4oFOxJ0/FlhkM8tIIIazncQomRjISP/J0SYU32Xw==","signatures":[{"sig":"MEQCIAYZnOODOUAdvjieWFxkx27ecCzUsKZiR9yQVYlviB9zAiBMK7dJhpVeJMtKx50vQAINFroGW+IkTyYxCnYMBVeNTQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnRf9CRA9TVsSAnZWagAAKXYQAJV3AhaDEUg6M2R2NA4h\nxRzXx4q9oX8kvZcxsdjDSBt1MLJXKp7GqVKtcgkABfBizp6ZNnExlfmRdycn\ng35puMuz73p2ZK0YVVyXKLZ9ySxrQrl4rGz4lTLQTzyIUEv/3/smyrEvMha6\naM9YkjjFWnSs+jsz94M6FJ2Uff3MEgS9eAjmVQY7stOlh8TMJYcokxH4IC4C\nw+5DU0XkLTBD1JGqw/k6oUvJdpKkGh4j0K0gEKS6ikM02XjCn0NgWTQLvSvE\nHwjNuxCfYuyAMbxCp6WBHkI7Aw3XypiYmqI0CO5QKPQdj/7w62o33O+VzD4m\n+4BUHj3hDUHYPgvA32Oj4uXMTQBwgMzRpkA7Uw3ibXzvrMx08CGsq/V3TY+F\nmXC53isS+/I8dafRD9nvhKVo5lMeBN4l/8ZO/fldl/bBBPHJ00vmUpQJqz6M\n7z7dNglM2tTJySJXawmy2ZSJ0usgqSPf9AG56mTqEKeOn7XWoeUd2NRO6AAL\n23BNzcWQMg6aY+lnl46ejLUpZJgNiPCgmsv4FM3QzjuSrYVpugzk9fr15UI6\nce5UYqcI7a8ZmOVYvxZPnZoOJBXaA6AWuxHCFOt6n/o+0F+V0S31izt3gtQP\naPcEFACEitPu9CDeBqIUDpscEjMVg38wuMw5wUp7e4liOblqoAOznlXhgnR1\nt98E\r\n=T498\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e80df537b31e6d9a468f55a3fdecd34b2e8d3876","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.3-renovate-non-major-e80df537b31e6d9a468f55a3fdecd34b2e8d3876_1604130812867_0.1358210148383947","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.3":{"name":"@balena/jellyfish-client-sdk","version":"2.4.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.3","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"f07ea622a94fda4691025846d7f73ddcc48cd8d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.3.tgz","fileCount":17,"integrity":"sha512-SvQUsJ8ng/Gp1o3q4HHDMApVYFvjIglORJm3YWrQLdEkMIUb+4uWjRJ8q82nyzAL877vAwxlGm0XzAGOlAvHOw==","signatures":[{"sig":"MEUCIQCl2juBDxrjOp/TBUO5qY/e2TRh9C4A4BrH6glXrWlrVQIgclb61kT1y1OvqwTLVU7kFctv7hNgdQQne8l697WDVXU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnRjSCRA9TVsSAnZWagAAmEcP/iuTWu6nXca0bTrzkSp8\nIdSyqHygnYTRRYBJPOKe3TsQA74+2R0OgKh0WUkQqMHaO8JDSeibRG+4CHVO\nDOBObQ+Md682IWhgonadm0+JTk+oFNvi0a9yQks9z0Q2brH5O337s4PUL8Yf\nhnoipOtQvBFs14c0uE2w4SC7zmnpx9t+2gO54BSW/DMvZOfX5Lv/qY2RTBWu\ntFqpIa3JK3dJC1hbwHd4R3AFSe7R7/sh+vF9mqcvCjBrWTNTpUAWuTrLfsMa\nH/TdC9KP4/arCf1JSHBltgX6emdIqNB6fIDuL86X7rdx7vtjjpc2easS9WdN\n7v6YxWhJZQmGHSvzM7H8Ft8kszyctWKIof0ksw0r9sePf3tHj+VQTqmoO5AX\n1Tj06PhS2N0+FDZA0NggeV0bVygr5jK1J1++Gax8v4mnmKMuZLkn2OKQFf6i\nikqWxXRKc7FXwePysARfn1bCCs6Cli862MU2IsKMOtDQYkbMe02qYhDDQ7qe\nObIhls4TcAxaMhc9isb/UIq8PSOTsArkY10ox7IliQgYSydoZPXI7CjY0nrZ\n/Jx4zoeAp1fvpGm9WsaVCNoHeQGNC/Ox3IeepjEMTRqjGCQMkXoE8SDjIn0D\nLIx6L9XvPUE7Lin0IC4aDEV4fqiHMZrBSbn7EyyUIVtVS+e/cQiFHwmrZSxe\nHjTn\r\n=3ycZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"0db0649d0dbf2ecd40bc06e29e673d898d5dd057","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.3_1604131025812_0.48693323283152656","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.4-renovate-eslint-config-standard-16-x-a4a66e85ad66918a12c42a2527e3d9097a6006ce":{"name":"@balena/jellyfish-client-sdk","version":"2.4.4-renovate-eslint-config-standard-16-x-a4a66e85ad66918a12c42a2527e3d9097a6006ce","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.4-renovate-eslint-config-standard-16-x-a4a66e85ad66918a12c42a2527e3d9097a6006ce","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"99ebe2c60bfe5e891d67144486a59ea5d9c84fa5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.4-renovate-eslint-config-standard-16-x-a4a66e85ad66918a12c42a2527e3d9097a6006ce.tgz","fileCount":17,"integrity":"sha512-zy1ME8C57ckgLoA6Sx4fLgSyW8v3apcDRAMe2BOiy1L63sPuOfPdb8oWnzrk28jrnMthxPTl0C0sXDpPFPiaRQ==","signatures":[{"sig":"MEQCIBscntPcAS8zFyGUZBk+dnRJlb8aZsaxVh7XZIC6gtB+AiB0WY0akHUjcUbe5k0E5zMkiykKhAEzIEj/Zns/iEKF2A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnRmZCRA9TVsSAnZWagAA7TsP/AlfzJ2CqJ/7d2VC/QrN\n32xwTqzzCnvDpAbhzvvDqen9agMOYc9ph3pIUrRmxPmRoWiArVhJ7k02Kd6Q\nwhVgh1A7GfVBTzQyGN+OraBFAhvReNILFIUDBst2xSP+mWjg38UD4fsEp/fI\nJo+2ukcdm8vJO883VEQb38V8/gNEi6zpFFfR0nWaz/TEumFBA62GbO+jzYkM\nmVRcJ3Z+MElogl2cGvNU3ZbiaDF28KtMoiYZwdZ0LM32+7PKPVy5bIg8r/FI\n3XideqG+8Ci7j1SIWCM3nqX4jpRzGopLtlNM0Lz+tKAWi/9waOZIVxZddp0b\nhewehg3NpHgbOA1UIPN7jfSU1dMQbR86rrTcwhGUQ2cEaC7BR5Shl0QPIC8i\n3te+hG9kxMqE6aEmcpGRElk+WRyH3q4YSOW8a/u96z9h6n/DNAwPXmd4qI1n\ne1J+io4WsuCAZbG8edD2iqwZt+hKET5lMQA3nmNM4iJFY89Fb8wp42A+HabE\nTxhK9pk54qhyp9oykfLePoHZZazCKzqw/vljmfiia3UuvYKzHnsLulx4pNw3\ntAjKzZosaiVovLnrdctqv93wGr4xDKxmgP+68brjFN7DiEgmbZDRq3vJYLOA\negvwGfvCrtIeCWD2BhszbL/wPUlgUu5v/skjjSLu+tmi/qEqE86DkJihM36o\nLr+3\r\n=D8+f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"a4a66e85ad66918a12c42a2527e3d9097a6006ce","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.4-renovate-eslint-config-standard-16-x-a4a66e85ad66918a12c42a2527e3d9097a6006ce_1604131225334_0.43267179405350364","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.4-renovate-non-major-fc1cf4cedc7099cb47e11fe1510d4e9c3ef6ce6b":{"name":"@balena/jellyfish-client-sdk","version":"2.4.4-renovate-non-major-fc1cf4cedc7099cb47e11fe1510d4e9c3ef6ce6b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.4-renovate-non-major-fc1cf4cedc7099cb47e11fe1510d4e9c3ef6ce6b","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"77a3a2c82559a3ebb82acbb0d457f910eab7d8a9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.4-renovate-non-major-fc1cf4cedc7099cb47e11fe1510d4e9c3ef6ce6b.tgz","fileCount":17,"integrity":"sha512-mK3km3I3bgl/PTaQWfiEd8XaYpmXZSLKZ8vG+hMIIxPJ6CQPmicylnDKY233jJn+/Uds4XREoKTf5xSQt9aWTg==","signatures":[{"sig":"MEUCIBXpyqVgbDWMwDeqn0gp+XHFmR9Qcr782y8umR7jd7WIAiEAx89h72QzzLuVXgDrqqcKP+AuudvKrh0BPLzS5ETRAg0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnkggCRA9TVsSAnZWagAAZ3oP+QGwaD7xCiF36FfBC9jS\nXNZY0yijIzUWve8tADezm/SPYqDxNdrYGiK0ky+FgSNXjBca/LIHTj+7rDB6\nGUt6Hx9bVIXmXIH7C6MK/j3azc15rMoZfgj23H6PJTTv5eof57ONRB4nl+cF\nsvneFWLwWF8NBVHJtWz0eUYkpmM4XsJfqaizu0cb1eCobfC0jx9djKX3Gfjp\nrseWIkvMLsI6MVt5lXHtosVULRxNK6CC6Ko1ImedjVle9fRnC0Ij1IHyvEfr\nvmshZZBgLhFLRjncmZKHJGMSDm8TC/O1jz/HsLrtDH8+TJWIBAs9l4h3RlzT\ngRm6rYwx/ASzIIyyNSWSxCTiNdbT5qDg1Pccn0WrwKFHtR5fJ3gXxRbY//YK\nMKsLITHvj/y5PtimcVgqq/52BhA+Z2RdP3/O/ioE4VuDz/aNx5Cej+t0exur\nj1/+cnNA+qBLV28TCtXBKjDHngT1mK1b7fpTwev9jvz3HvGP5+hSfNNhQPBS\nkt7dr4dWFS0pnNKISTBJqrg7C5y0/HvAZ+PUrqMbNbetmAdRS6xyTJPt0CSn\nbZj3ZF/ego5fi+qsa8Bn1bciLzCZjY5vK6uep2+e0QY2AlTUOZ5Uc6RlJnsN\nUYd7b1vgEFUWZO4UnUwCdp6tatPCZ3Zktlln1hJgKtXbS+rXK7HHEm9mEsht\nv4eL\r\n=O4H1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"fc1cf4cedc7099cb47e11fe1510d4e9c3ef6ce6b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.6","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.4-renovate-non-major-fc1cf4cedc7099cb47e11fe1510d4e9c3ef6ce6b_1604208671887_0.7543318415277693","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.4":{"name":"@balena/jellyfish-client-sdk","version":"2.4.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.4","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"4b4cf12d5d622e568a49ee5f5ad9887598d1d708","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.4.tgz","fileCount":17,"integrity":"sha512-o23/HODFe0OR4XY0eYpqmKhOXHOK5Shd9CXErzcVNkO6vFzUVSMRiYDSqDXk7nswGeW1gIA4TFxE5HiwtxCBzg==","signatures":[{"sig":"MEUCIEdPqAIgpxYW4BxpnMMuxW+syTT5YvtFUEnno3xY8A4YAiEA3oCiZ6d28qm0l5DBxformdJXh3YFjzjPYbouqvkft7o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnkmFCRA9TVsSAnZWagAA+T8QAJak2NTJpxEGH9h0piWo\ndyw6HsqKXjp5cyj+ueo3M2pU5o945RCnp9+S5aM8rIrZDeP47k0dKpvUN9vR\nzL6NtOhzrvu3fYrLMpJVng2Sk2U6fa7i35TVsI4eLJxg9wJgBSinNLK/1V0I\ncZL7Wu9hBa8vvMcL4/SDBwIBrx2nFJMZa777SwnFZxVqKeFTUrfOlhi3ZS6H\nZUne1kJpvwIdapMjQtA2Z0E8MYORXI0vFyq9m3mBkR3w3HwGVClP6KpCkfFv\nbFIgFMQ+sCaEqMql6VpLm9cz+jVtYWQ2a7DDj+8aG1rA/J+6y/ske5+s3hyM\nZu/2sSRhfDN85Se9X4QESmqTrBIAeK/K5Ai3wY0WAYibBcE4rH+8D+IHKiYt\n6C6U1YpdPXzjL4pu8LpxfwQaH5yrSGCry6iSSu/dtqvBujYr79ieOzbWM28s\n2yTwcegDQtMFmqEHCJgG3vSYoz45byz3hZ5JfFswIYokjrAygqqWkSPHbXUy\nl+5KBccLMmZWtan2vzP1GJ+auW/A/9Jx9FjAc3OROefu3IoLxAJheq+icD7i\nv/f3WERqv16Y1dKYeW/nR80mZ6GrBEwGpbuEKqhHM3lLQWJG2wdMiBA7Puxi\nwaVlu9id7+0Zcp8saO249jXbKLEnIh8A47MPb80VfxNrnI7SeqYv1rWqDugk\nTT+V\r\n=hgVQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"6d8f5d0f967ebf21bae086c32c442503b2407e30","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.6","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^15.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.4_1604209028879_0.15695014501134152","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.5-renovate-eslint-config-standard-16-x-13f4c8eb5bb95039ac8018013b98b28f4dd73374":{"name":"@balena/jellyfish-client-sdk","version":"2.4.5-renovate-eslint-config-standard-16-x-13f4c8eb5bb95039ac8018013b98b28f4dd73374","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.5-renovate-eslint-config-standard-16-x-13f4c8eb5bb95039ac8018013b98b28f4dd73374","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"fc1a31d34e94bd0b2ae41387f07f51f7f9e12000","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.5-renovate-eslint-config-standard-16-x-13f4c8eb5bb95039ac8018013b98b28f4dd73374.tgz","fileCount":17,"integrity":"sha512-W4cIB/J+KOYsPH3Z7blv6mlhkcpWXKHduFKtIcsofJiTFZ/jwe/0smGtNAS6EmhhxQgusogDrTnNmGk4L2djaQ==","signatures":[{"sig":"MEUCIQCYiLrdvYuy8WNBFW6G1X1AuEZIQUXZ4jID1bT8jQPT2QIgY8dkrjy7Bq55yELKstF2uIZb0FMQ9/HfCbyXtnWWD9I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnktHCRA9TVsSAnZWagAAjFIP/1TlProeTuiJT4pD1Csv\nV6zTV/O6K0V8Eun6tlvM6Ms53aNzpzv/t2/fifAXETrsy7eTY5UxR62OGWCq\nlS1joH4XxVAzLboc2wfDUzf7uKwYuVmKJxl2TyGveGWWC7svQiKrJlJ7E+hE\n2gb0x+Kh1nXZRnINg5fMNJ3452b6ScLSTXQj3xnzZGS9KCoDoTZiY7Qc7/eV\ndGhk9AcPRpk5Su4T+G+9yxt0uEZW4sc5BxEssqmT7zECVxV8QT+EJPbW6LMw\nKCq6sZgEozs7f2eNdbQ5yIZLaMkWWaSLR2IjfMM1z2JmnmIcvlPnWw4mDZIU\ndgbLwVHiX9VFonrrGxTiW9DaKnA+ZhFCl0Eju0uFuO0fO7tB6bbwQfk+7TSY\nYH3sRlmccQWRlESXJCNTj9ozAtBCNiLR3w9zxbVVwPQrmqI4ldogozcoLuub\nkz3L48LxZ7CCxrRaTL64/gq3uVpLoQOcES1GtFJlqDIuEaha2cQxIHJTKk8u\ndYU8RsDt4ktILptxMK8Q/JFPSUZ3GhlX/lD0YpZ4jPxVLghZdIpWxuRzMfXk\nP3SfFPLGfuA9HjPhzGvRwKJrJPpRzCqbcRyREA4ppgyfXIRPEEDMAfpsw+fM\n2k5RVGJZA9RZ3WJa8bLYQFsxEQZ7QNDxbgu+Pj0jutFucKd25IjZcpaRoDnL\nnuy1\r\n=E0k7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"13f4c8eb5bb95039ac8018013b98b28f4dd73374","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.6","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.5-renovate-eslint-config-standard-16-x-13f4c8eb5bb95039ac8018013b98b28f4dd73374_1604209478920_0.9687262796462781","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.5":{"name":"@balena/jellyfish-client-sdk","version":"2.4.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.5","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"b4c3b5d513285e309c8c87c63ea172fcd847496c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.5.tgz","fileCount":17,"integrity":"sha512-D8LL0uHDm/CIs5ZgZR9OnndMELnbtjfQm0PLF+twfQWYvM943LDGuux7An/0ZzAcsjC0ZVQDYL07LjGwGJptrw==","signatures":[{"sig":"MEQCIDIljuMG3H1PC0NBhF6RfUMhvDhHkEa1sFe6e7BsBLqPAiAtGtCbRbgnYf1vqjnhiarphzPrmUmcYeylArQtZVcDEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnrHMCRA9TVsSAnZWagAAmc8P/RR5VegdkTk2Ru6w5ZEt\nyuzQF5TgzHBztG21iOm7UPfgyU4QbwoAXroCQQDmE6g5bIcyNvbJdM+xd9PY\nqImC8W7cgFqOWGw2t+9GLm1ZZx2jKYMIUPqH+hi7wRrVTCqvRQoMQvDI18Mw\nHB2vgR4C84/ckWwDSD63JsZ39l0Gr0j2h7XOq4bepTG7yW3W8lKKAHx66vXC\n37nZ0JV7USyx5nWZAgUPCkMD8vPYR5xYQ3+C8i2YIfztN5d5s8Tl4PyIlOih\n1bkAU/3QGG+I+XqCqSCgNWFzM/XH3MyUfQXIeIYoy4gcPWMsyo9RjzjAYDAc\nX0fL1w6ni0hPNizCEgiK0U7wwEaqpjLTfXXLOzji7it1OKJce+rP0Rib2Rr3\np3Opa1hJSJI2Pfaz4aM8drIuiaHTAoD8uAbvWmDvezHVoJ/ZfQZrHT0ZWwwe\n6gMFXyHvvst4B3KfssE9qVY6wp0HAWgc379s1H8xSmW1Darhu5dwnt9Mo0Ft\ngWC1UEl2FwKDs4g00ZWiNQZpgqs2TrcdYGKuuaad6s35nVTzJJtZTdecKL/n\nEtWuP6uo5LlzDBUTqkjp/oy8YPsf8tvQgQ3n9zWns80jzXxNUUtYrJXeaRAQ\nVd7FKKU5FSYPUSi4TTawkatBWlo/u5OmCXbQObg7P0gkuJAZFJvMkWO7p5ie\n7TFS\r\n=une6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"715a028b735b5d7ff8cac8d8e49bc7e59f09128c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.6","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.5_1604235723947_0.09946898913770741","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.6-renovate-non-major-8a8e5d5620d68429521c5b34055e9a4015eb74a3":{"name":"@balena/jellyfish-client-sdk","version":"2.4.6-renovate-non-major-8a8e5d5620d68429521c5b34055e9a4015eb74a3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.6-renovate-non-major-8a8e5d5620d68429521c5b34055e9a4015eb74a3","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"6aecb1e6597b17e310e19c97f95a8188fc3f5ce4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.6-renovate-non-major-8a8e5d5620d68429521c5b34055e9a4015eb74a3.tgz","fileCount":17,"integrity":"sha512-u41wVaqMDGn5I8whEDooazArgOUOxTNvoo0rl/h2AN4OEs/VxT/XtdPrxlFWYpoL4nsvL907+O+ELE0qcI42PQ==","signatures":[{"sig":"MEQCIBGmIz+1unxydukAMjqRONcCc2gcmF9zM5ixP/ziNoRKAiBD3sPUYK95CY2gRx29d27V6nmnPYKi73vAxLq8MCpmAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfo3u6CRA9TVsSAnZWagAAjdUP/2LTmwxDOFiwZs9xiukC\ngzeT9FuoKFvTzXT7lSZAFeSck43oDm56eAU+NVW6Wkrri/WyoCyYi66fWCke\nEH1FwY1b7/MoGIfb3GfnNh2EoSVQgPQtv84a/N6bwprY7cgmQlWPpteTMBTI\n+aMS/GdEKLb24O3qoSOKExcHB7HPLy1VLYEX+nycbslgqtTtZiJ5Zo+rxQyV\npPbQqTj/3mvmbpG+jy9A8zGQiUMywXeIqjfVkVuIFGrnS9rmfUQFUADNmSrc\niNTnIuvlSezoHfHCIJsrESDZPWE8hyCFbwsK67hQnfBSEYp3gcmvjG5b3t1N\nXG3to81SCRY7/LUAo9cAK/QZPW+srLa9nD5pY0ZHpVAjZ9ZjcjytWSWS87a9\nEM8MeU9KWahWcIH/QsPPd2G83llx+simMK+B4QohxJbntqtZ4J460GnNea+A\nI3kQ726vculuRGornjzMw9X3ZhU2dmTPQ2mesbdRhf5qVEMVD7z+wQs1Y3gQ\nONPGSIdKK5J/VZ/m8YGLwWDrqPxaouZRq/pM/L3ttuzHyEPdQvj0B/M2dp4u\n5ZLjUbVvNEZhQNOQmrl3qjRMQxqHv1wysn7KXE2W4HpI1iu9bEOgXE8t7Mvh\nQ9fqWe28n0ijw9b8WSeaXs8HlNEOxKcSmlHnXHKZuloeyXwh7gDwMaqxqxpQ\noQdX\r\n=0A/p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"8a8e5d5620d68429521c5b34055e9a4015eb74a3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.6-renovate-non-major-8a8e5d5620d68429521c5b34055e9a4015eb74a3_1604549561993_0.7913448856898184","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.6":{"name":"@balena/jellyfish-client-sdk","version":"2.4.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.6","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"072dc2bc100e38f0641af6b2d581e71acb2d791b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.6.tgz","fileCount":17,"integrity":"sha512-1xej8989p9pD8jr5hqurNyXGQ8aBml+Jw55GhEDEkP5VqDed6jssKW7NKL6Q78sAtOno1vJIIfEr4mbrxBd8nw==","signatures":[{"sig":"MEQCIFhphaJ3PhPijXvxn6UuyVgujXZaTrO6i8ntFEdZgntaAiAZvO2idjViOjtpTb3wCUgugjAjKWm3lUY1LhyBip4IPg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfo30mCRA9TVsSAnZWagAAF2UP/AhgCqLXjPcssm7qC5F+\nTJmBJD5LzO7vBEz3IKeYFaRXBIT80sL9ZlMBNUemEC+ea7+8hgwXk30r0fZT\nwHA2GNzUKC9K3M4HDfbhWUOYTh18w+we5LTBo/PGVWhiejTYSE3zSXO4oN9W\n4P4hYW7DfG48p/dnqILg7G0iITZ9znaNVAYaIAWbTIFSgioucE92+m86BxSK\n1D7Q7InlFffqDEVyM+8PaKNQWTDEEHC6dAOpiqlRgIQZWoB8uipSZaMOzrGm\nmjeKvy8fM3BX2Zkbceq2+7ZTBxTkBYhxJ6Z5Ru74bwLyec3YwHvHCfub9zXd\nw56uelNH1dkcdcmz1iUrMtfW6w2ow9Eb/Ju0FKJdYvixZttlSH8x0iT8eLb8\nwV7mGfoi9EQfMb+hWkrCwYlJJ4S15jgsxWDCuVwfwwBuHBlWwpp9xKIijdi+\nNt+QDxMf2WtvoH49a3fMiPpwnwO3krBvWjZDgj+qx4Xgg3Tc4U2kHh1F5MUd\n3W7Rjb68BH8VdnrsZJ1gBP6prABwTrNd+cKYx9lBps2Ahf3ZoiOtxJ08ISYq\nfOsnY4u7U086Opvocz2NkkmQ8Xh0xP7GDONGQdDHoZddyapoYSymxIgz6shw\nw9YM2bXAhplYoKHEcqklAGgeFArbLuG+/XK2n6tcIviTVY/JzIiuLXgMkCvp\nOTEO\r\n=oOk2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"2a05199482b72265a3e7e0b7fce98ac7f53544e6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.6_1604549925978_0.1346909333558397","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.7-renovate-major-socket-io-packages-1c80cfcb07266803b30c473a37f6d634b0d3adf8":{"name":"@balena/jellyfish-client-sdk","version":"2.4.7-renovate-major-socket-io-packages-1c80cfcb07266803b30c473a37f6d634b0d3adf8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.7-renovate-major-socket-io-packages-1c80cfcb07266803b30c473a37f6d634b0d3adf8","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"393578170522e7025f917de7a72ba2db32f0755f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.7-renovate-major-socket-io-packages-1c80cfcb07266803b30c473a37f6d634b0d3adf8.tgz","fileCount":17,"integrity":"sha512-Ktv2uMxVxhz5RMiSSO7AOlMdUoO6cH30Y0Uii36g0p9ibhQhcbiW7cBzYSAm9erscy1z8f9X883NLXGb/grYpA==","signatures":[{"sig":"MEUCIEgE0KYYltLx9Nl54G/buLZCb/ZnLErWZPKSNycn+S93AiEAt5LZvBYI+HEUpajr2VvSp10f1Fn/vNH8uUTBZ6XLtFM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpIPsCRA9TVsSAnZWagAATm8P/3sUrJ6BNv8k/FRNK+h6\nleQ36OI/pozYj49aFRyUzmomuQtEIXF9aJzTa28qwFb0WOoC39ClHvkbeV0A\nCPMtvUxzO++YFHrU+RYMdIT94QQ4cb2H2H9QA++lS9kiRawJsSB1Wy7/e7+p\nGK7ibE/iSZLLJo2lINnMsXoGFvHeq+Fj9hmdR4zqvd0RcU7u0MhzV8vG1a+/\n1UJQcV8VVOZBW4fdHj9StTCepVkbTJy135PE92hL0pUOTRuTgY8E91rltD+N\ngo6IwRIIABD32dizyTBb3cvS0CDv/Ty9DCSGoh7ZNOuXA2ZqP+ILYr730YUc\njqRX0+Jy8b1a5jTOiVcFmzTwzm2muMtCH+InMM3mFGLhwNUz9f57Kziv/dDP\nZG5DGMseQDLCo4BN5lmQuE1ByBBOyOHHEIMXNDsxKOsqK5vs/x8+we8czw+Q\nGESriKmHHQo2FkZ3ZeQNPGwh1tkG45coINPbK1r3LoEgQE3KuJ/G3aTCnZJ7\nAlr/xgFi5epEaUbf9bYIB6ghnjDSzy15NgTDMivXZQyjlkw2kCW7W2M11oCY\nM7erB7sqW2oc6xlqA0qyXbEuwqAA04jNez7QmL/AeXJ+Vv9UZ1Lpcq/OMbG7\ncZBRV5RpHe7+4MYJZM6hz781GVtJT73d9LPxvEtgrO1F4bfcQSOeZE9bvJEZ\nvk37\r\n=cZ7E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"1c80cfcb07266803b30c473a37f6d634b0d3adf8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.7-renovate-major-socket-io-packages-1c80cfcb07266803b30c473a37f6d634b0d3adf8_1604617195589_0.2792838429372053","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.7-force-renovate-node-version-e748c584fc9b2482027cb7898106d1b62f63dd80":{"name":"@balena/jellyfish-client-sdk","version":"2.4.7-force-renovate-node-version-e748c584fc9b2482027cb7898106d1b62f63dd80","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.7-force-renovate-node-version-e748c584fc9b2482027cb7898106d1b62f63dd80","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"396ac0641052602da111f16db11fff00e05ea025","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.7-force-renovate-node-version-e748c584fc9b2482027cb7898106d1b62f63dd80.tgz","fileCount":17,"integrity":"sha512-5sw7ku5lh4fww1CX7t06f8K4KfhBizKBGt8bxWTrY6KMyZYRZ5TTxe9dr4CjeFECT4uIb4o6q7tnObMw4auIdQ==","signatures":[{"sig":"MEUCID5rHEEUtfszzh5SIk+ubWHKtZipyiowB3p8FAOmYi7QAiEAqM6ssJM4WOfsacgW185cnG5BmvC6IU+KbfheLaqNz10=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpNgLCRA9TVsSAnZWagAA5dkQAIzHxExT05KArcKn6I7J\nU5iM1P7ecIIbbuPy8+OaAAC5Up+bThe1MUDRA8tWgmOweS6Dk936KyhXKP+r\njPuLiFwPLpLRDHkJmZSY1xxGY95vWCI/vEJrMOv2l+gWHvQTsw+lZxtJ8RVe\nB8aLQsLkcrYPAiqp7Rk05ZxYV7fkCfQLdie6RzYOcQTsqzaTBJIriTK3e6TP\nP+zNNKBLWtn7RbX4nsr3iifa7DyxNJ0JVVtVdIxG5XH5lagqssx3UdRy7X39\n4N292QG0mnsk1AJKGBcP03KhrWLQ1XHW+M+o+fCI5Yww4L7FI7jswOKKVrOq\nZesBPIyKLhtP3n4Ues8bQWkdQUCEy/AhkLZkEuFvSyB2GbPH3v0tqlQN3cOT\nCcbk9oi14RE749g8vTlhrycAmyZRyguwAwdaCn1/uQY9HMFK/nR03vhqQ0wP\n7jAvqt22OQIaNEsftl4+3ojrbpS/BZmczHRTw2rcXnS3KhNW/PnzNvApB094\ntpZzKE07syvi/XvbaZCXVwFSesDgKl96ris9Q/8uTOU1tv/nGNom3Sf2WFSX\nNzaJl/ntTfnEUvUB6XYbeyzSB9rqUx156o62Lv8B2wnZjNnD2VCbs5zpo82Y\n61KOSVy1jtByG1bNrNiVwmmjhoZhgVmBQ58h1xd3qO4dtquHGqQdrFPsC0UH\nri5v\r\n=EmK3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e748c584fc9b2482027cb7898106d1b62f63dd80","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.7-force-renovate-node-version-e748c584fc9b2482027cb7898106d1b62f63dd80_1604638730695_0.2761434229886719","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.7":{"name":"@balena/jellyfish-client-sdk","version":"2.4.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.7","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"79de6eb8942a2082a2068bf6112b82222b42baf5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.7.tgz","fileCount":17,"integrity":"sha512-WaP8DtrcSk0kBkxAOAJ3OU9k31hiwRG/pCFE0qPr9Wu7OoXjyTmDGngGRoJ6tWdT6ACuNQT52UcqMWt4k4IUSw==","signatures":[{"sig":"MEQCIHpTTpYApcHt00iRl3PGIppElpBL0WUq6jakD+9BQPIEAiAzK7+Wn78V/nwwAjr0nCHA8NMXJwnH8TM4P6Em/6304g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpOU+CRA9TVsSAnZWagAAS3YP/R/2ppMY+2/xLP4MH6zU\nWD9VMgfQnNNe6lLrJPw3NU4Jo/lQuZjDBruK4x76386gvAO2s6j0DJoOmAfh\nYS5+2bNx9KfwoAlZ++qyMmcQ/Fe6MRozq2Qy6HbSl5PhpE/EdpntD+yzUEfC\nibn4Qph4oaudpfQJVaKEdzTXZLFx1kIFyJ73hLhplAjwvy5DZ7O53k9wMkwO\nKXAMn5rI8oCkI/guQzEZKv7sR6qa1iPkzwkHM8qCM7E1vTvffUjy1v4G4U+/\n09RyA10OMHvgbk9qZSAuup5Ifhvl65YpnRS/ImhZQ3k2TF/neKvYrxUO0JpS\n5zLIoQqCNnBVjo3OqsuRGIxKdbyKS1JT8akgLn2wd/rSPxRKb3W3asA3smjc\n/CRYPPl+ZRa/RL6jwgk33RsleqVfpibK+7cs1nDV0Qv9c8UvCWVl8B22tfCM\n8g+cW2fgL6KfRHD9IuDnctZi0UFOQkS4Ev3tWO5xLD6i+iLux2+M6Kkgqs33\n+XLCsJ272syxh5BD/f3YzCuB/4j3dI+CZxS9CDtw8F+Cje96nHo3tFfGvKYC\noZTFeusWGBoGj4Nb8agHxCZieGC0sqRzDJs+LRvzkM3s9T45ZyIROo8CKg/Q\n6d4wlau/dDGg4Gcl4F96sVHNR2Cg7KL61jooD0ZVXC/j37XQUzVgyhltT50X\noNkm\r\n=Ne7d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"6ac871f2cfb6282ee4a80b6bde990d8831f1edc4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.7_1604642109896_0.30559419551749234","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.8-renovate-major-socket-io-packages-8505d733c8d319fe1b66282d933437cc9e9c7728":{"name":"@balena/jellyfish-client-sdk","version":"2.4.8-renovate-major-socket-io-packages-8505d733c8d319fe1b66282d933437cc9e9c7728","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.8-renovate-major-socket-io-packages-8505d733c8d319fe1b66282d933437cc9e9c7728","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"b1fc4546a1c856dfcacfd993635b3b0a5470fc6b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.8-renovate-major-socket-io-packages-8505d733c8d319fe1b66282d933437cc9e9c7728.tgz","fileCount":17,"integrity":"sha512-EWo2HzzczNab//n5S4fPczOm2FgsN4Pb0Ttdi+9ZT8/VNnVJLmh3sh7bG8SLwhtcwshztQDcKxWsMrFe+FiI2A==","signatures":[{"sig":"MEUCIQDW1k6m2Po/X2WDsHpt7npIpCXdGntQwn7514jsIASq4AIgfVLFMbJMyFjeTAoEltxFu/D1w9Ens7Xki7h27vzopN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpOZKCRA9TVsSAnZWagAAqLYP/1+J9LJeT9jDFLzgU8YS\nBJW2F6Gyn4oI+YKNB0FirdvAyOoX/wrWPf2lFiaiOZZtNHkzwR8MLm+l0i0t\nhD54za5XzSntE5d7QHdv8oEp5sTaCJ6OfQbvsZnyCep/xfUiG5h3zCx03LPS\nXVOtmb7czIjT6gKe1VFHF+ax9+Ba3SpFzMIpAzbg5HvU5M6jpXiVpGKoLaw6\n0QGxhipCPpa0C7Eo2QDtf8wlVn2h7aSqSkbRkYCip5vjNJhEAhjeAv7MBpXG\n7f6TZlHYKzNmhpYtHSR+uGUk3zz6672pBUKaUsWasbSBEyaeLkLSi2AyzqQU\nuTEDL7K8xjPG/prlsuy0x70aNaBcRRf8YpmUawL8szATKneGJqMEucXgIa9E\nK2PeizKCKukdUVa3hNwiwHf3lYVprEP5TqtgwND/8r1yDUdOXe+folB3DUuK\nJqTJOjL7oMa9M31qbsG1mZxx1jvxtjSvo93dtlsbo0hlJ+xm4jYJo1pUrioN\nQZpQ5BLJZlVTh5B/G2Kilt7ZSARUP2q42b0VsZOc/+C8V6WgAj6hgbvFaw5S\nfga8jQkv4cojt26YX06ZTMRuXHRMvMekNFPblvz9fZsv4qJQXszoS2NhxHSy\natmvoMIsgBZWG+JEdQaF2A4bMh9j8SCxT4bFoDBXk5Jy/S0fl/w5j/nME3EC\nKOlQ\r\n=SuO3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"8505d733c8d319fe1b66282d933437cc9e9c7728","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.8-renovate-major-socket-io-packages-8505d733c8d319fe1b66282d933437cc9e9c7728_1604642377828_0.15762466612212145","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.8-update-link-creation-to-include-card-slug-999d61b66cdf16d612b95c1cc8b93750bb36458e":{"name":"@balena/jellyfish-client-sdk","version":"2.4.8-update-link-creation-to-include-card-slug-999d61b66cdf16d612b95c1cc8b93750bb36458e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.8-update-link-creation-to-include-card-slug-999d61b66cdf16d612b95c1cc8b93750bb36458e","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"5f931355ae1f93d5a52ad8220262ceae3dadde74","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.8-update-link-creation-to-include-card-slug-999d61b66cdf16d612b95c1cc8b93750bb36458e.tgz","fileCount":17,"integrity":"sha512-QdA03DiWcAFI2G2SIUFuzl+o4v52AaN6e/O0ah9LWjQczyuLhTN+A0iEjLTPmg3FnSIOYu2Wm9lneVc+B4o5/Q==","signatures":[{"sig":"MEUCIQCl6xavXxHqbeqEyjiUZnIZfg6CaTGp+xq6CjUaJUglpAIgccv14ErDu9dReX6wiNQP8qasG0tooESozA8+05gCF6o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpZBGCRA9TVsSAnZWagAA3lEP/358xu7XVKwoaIB84i6B\nOlKTWAHgSBC61FrQV8pO4kq5LWSPL5miLXuahcj0TYCcun927rXsUc5itg+s\naCpkayBCkh5h8fIPx62URFJVSEB+vu8cWMdJB9EBDH7gyQmwg1JWeHKiS4F5\nYDv0fNBWuo7280YKv7tSo3DOzO9tcWh155CzfD6mlLxQ+umagv6MSL9vqgao\noupCsPy6tsvilGVgmS7pAPZoImB5+SGh7TPZ0RiNf25k0fzVIVst3AM44uRS\ndLFYHJh4qum49K11/AK9YlKmXcUi+X7U1xu468ItIg+BirOD0T8zEw75MqL/\nqKtsdg/XPa9VTBK5iFBfdmUuKBWbCYBilbTvQG3jrFdVFZcCQXuqx7ag/8qI\nTQx7d4m0jJLYOQZMTDVuZF2891VQXkpvUF7lIBWPLKsFcJW42GCiM/Ar+I2T\nBG8aD7I260TkTx5q3CQgjwDqKnZVQDe6W4VaQxGf7R6NemhmeVfl4I7ZlN39\nRqBQGWtaB49zpnPgxim3cIgL/bhsJfVC2EuVyt7pMrMRZvuY6T/PFbOY0O2h\nsa4X6qR2BH+qUeGumAQMBoccURvp6DFN1krc0VtmdzVmYL3NmcduBrKw0up3\n1I5xUdbzE3q9EArHGJclf//8ZmPAJr6YgFfXNTs7fsTNJTOvAzpptMi5PlqI\nn0zd\r\n=uFXT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"999d61b66cdf16d612b95c1cc8b93750bb36458e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.12.1","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.8-update-link-creation-to-include-card-slug-999d61b66cdf16d612b95c1cc8b93750bb36458e_1604685893538_0.6256895362674195","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.8-renovate-non-major-c4859f094e4b67d3de21739c15419cbd02d9cae9":{"name":"@balena/jellyfish-client-sdk","version":"2.4.8-renovate-non-major-c4859f094e4b67d3de21739c15419cbd02d9cae9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.8-renovate-non-major-c4859f094e4b67d3de21739c15419cbd02d9cae9","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"f8c8af1cdbefab039368d60024225c8353cf4a24","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.8-renovate-non-major-c4859f094e4b67d3de21739c15419cbd02d9cae9.tgz","fileCount":17,"integrity":"sha512-Kc1BNP6b/HbIk9jqFULtP4YataDFgFs+NUnrkaN18CAJVpHznV+LQkZR68OBNJ0GhJPfiDlwqZnE00bCteZnlg==","signatures":[{"sig":"MEYCIQDEhGLLwDjCX/q2AVfV2+Qouwvd32o7pqN0C2LJqa2ANwIhALLqYfnWNVnu9wVwMsr6bd+9mH8c4wBUTavhi1fleHee","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpgaxCRA9TVsSAnZWagAAc24P/ijbD+fIvMi5aJLeGjfC\nw2JAIXNXf0NREYT/4vK33drp7KvCkq6BVmvwNOedYt1+Zsv0Z47tLoAQ/q+u\nUF/GW6pFNCToGdnueGa06XZcARN9LWv/1dJQHbfdsSwFEuFeqoNBIYUNQSlz\nvgCuoMzFh5cLthSQ4xEof7F7Ig7OQywUVZY+94grQpLZFb5lthhwDGpPFUQv\noh7AIASpUhBIyVn9XZpUOx7iEL+ipO9ehLjLF43lw2SvFO6PBJpjz/+HpHzZ\nF0QNc3lcP9nqwHBKsPdYEvNfmZ2Nnpetw15+0ACRu7NZeUYTQyE+joClr8Zn\nLoPZ+tbIMXe/QaYtACe84Y+QMNNkXDUP/b6cajkikvYs8J2RuwWcCKDQQm42\nyV0iT6Lgi4VPn9XYWpGIIye90YN3eIbqXWmw2PvpjtYpN8cLCFwAMohEf+oT\niJGgTQsc3nUEHegTv1QaqsdRBbqMxcwD4N3jYL6KbECyYK2sOzHqnC/U/v5/\na/tsmwhR60RIo+fM20+lIqARDiEWUorM/WhJCN+pw8eX6f/9wSmOHbnddZ35\nXjtRb1TESqTl8mhaebZBYbmv8/LhEWSjUKhPL6sGAkMKVVbcZ/Dshe3WiPp1\nWqc+WKCs1OGDN8zP57sI8ljLMBCb5R+i6kKo7g05CeZRzHWKy/euttqExoUG\nnIR1\r\n=jvON\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"c4859f094e4b67d3de21739c15419cbd02d9cae9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.8-renovate-non-major-c4859f094e4b67d3de21739c15419cbd02d9cae9_1604716208579_0.459169992544304","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.8":{"name":"@balena/jellyfish-client-sdk","version":"2.4.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.8","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"2df28e22e4be3db0694702719cfd31a29a26995b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.8.tgz","fileCount":17,"integrity":"sha512-4TCM8BUX2OP+XFlXi130RTkLmUZv6NIHGrhJ6vSUehwHc1iwWgheEliZop2cJkKS0wzq11dvgJPeZaop2ZXAKg==","signatures":[{"sig":"MEUCIQCfy7DX9tdy6QrihFD8vLpsJiwTeS1B8ESnzJ+Xo+74OAIgaqf6nCRDnFfEfVee4QqvRZMjMr9lRJs4wW1YnqFdRnY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140593,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpgeACRA9TVsSAnZWagAAo2UP/jSiI1jVNtD57Z/dbGR/\ntUaUMJkOH+ZtrOEozzqoA0FzbiXscr0/fIXBXwfbrrea7JgqluIUcMecaTVE\n4KxTZ81hJJdQtVvvf/+NZ391fVwrYDk+L+K0JBusXpXgUVSJIyXf8NX7jtih\n1gHPICvXFa+XgWeRY0xQLVwHZXgdi1jXsEzHAni0THgzGgFpeQUYGq8YpefU\nd9+9xCVK8y/3oYQzyJZbzBBad2HGQfq6xh90fLn9qQVDNWfNtI1dr09corD+\nNPhW3KX7V100ygIjPwHTcvlycx/0WS/Zhet9M/yR7HODpFjsNaQwz4mHSNvW\neYvhZ15JoNJy0cM7yo7m3moSK7HsEePyu1PznVGvCP42iyqw4iUGPMshDXxF\n1ijSpPvkSIyvgvvrW6cfwLME1duduRvhZoWSlic+7qJEsgdI3Fqql8f8YIoa\nUmfs2KX9uQaYHKYIlA+/STg+o7z0gAQxhproBxpVmUmlfixR0w89jY2meyWP\nYBLq964pUDHtn08tNvsOBjrSLA+rJVZOR174xIknFucyN/bXE07tYoXgy0iK\nZIAVLXsh6ISE8TkPJD8i8zom86MprpW582zcShQZ3R6+izKCJAiPjmQ2mjB6\nHG7A64fVTQBrjDcC6rP3z3AaHghzsgM6Glu5d0yKyySgHzFhjKrTIZg2syxP\n0L78\r\n=xR1c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"2b4a8a24f42a8953a0494f737d6ea68368b7ed19","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.8_1604716415728_0.4565449795616787","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.9-renovate-major-socket-io-packages-8775a074232a9358c0588db6cf972f846bcb692c":{"name":"@balena/jellyfish-client-sdk","version":"2.4.9-renovate-major-socket-io-packages-8775a074232a9358c0588db6cf972f846bcb692c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.9-renovate-major-socket-io-packages-8775a074232a9358c0588db6cf972f846bcb692c","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"dist":{"shasum":"db49ae210e81f388f9589a0cb1de4ffc28bdd059","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.9-renovate-major-socket-io-packages-8775a074232a9358c0588db6cf972f846bcb692c.tgz","fileCount":17,"integrity":"sha512-i4B8zhr/xUzglczAqdzqzf2z2gP482h812CAf+9S7iWTmGPCyN8+YXNRJ2IOYztDmg0AgDTXHgPMxjBobKSIew==","signatures":[{"sig":"MEUCIQDtQFCdWVLhtb6T02XRu2WjEYoXl5Xb2D9xcdr5MdGxiAIga59qgCsELzaG81I2DY4TbJhunZtfOXjx5aaTNV+6OBI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpggXCRA9TVsSAnZWagAA5pwP/0jjiG8BoyJjdT7yXa34\n0tqbjeWP1xebcn2PAFzz/7UWuCgCbkgJ8+l4XlW/xlpqa0RyzLP2Mcv7q1X+\nlzWPxn38FRc3WZsbT4zRcYW10tJS0735jj1O7mHmPRt4U+JEJeqJHe/nEHLA\n6n/CThKVhE6ERIM6SzOXEyqLIOVKoVSHrwB2/XQq4y4vr0I7cqb8ENgeAym1\ndayQXzeS/5qOLAySc26wu4QLnqDhv++vvCPvMIlRSSCUHTc6iMDt04RNTJ6d\n+PH2HYIshX+3MsyD7Ku2NxW9XY8kVMuh5PGcHAtHshUuj9sRJXTro2K8gRtt\nYgAAelHB7x0YPyf51CzZCl1/HjOTt4bayus3dyCinKh8V8utGtNTj5SQEius\nzihpaWB4sjaCd+aioJ88RqzLTsURerOXbyWoJzicTdBgr/hlImMcm9RxOtFq\n1R2Qa/QLTiVcXykb+X4lvxgYxs9+zMxMwLVJaWP911dHfWCc3xI3KyaJ3dRo\n4trqNzM2Nf1tFaFZkNjorlpBC7ZAJvuoVI+e+gejmQFw+VgrU3Wwv7T7MSz9\nc6IPwHWPac/GptEuoz2apRCldwOtaQ5J3ch3q3yx+Eelgp/wk3AZOwi2mPkU\nt31Tlek/gKnKb3ntbcZo48eYjmhC43Hcy3psUm3fRrDN/CQabZ5c3AAVzINb\n3Mc+\r\n=bMgh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"8775a074232a9358c0588db6cf972f846bcb692c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.9-renovate-major-socket-io-packages-8775a074232a9358c0588db6cf972f846bcb692c_1604716567158_0.6642559666343368","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.9-add-repository-details-18a44484081b8549ed83cd952bfd4a0e7b990109":{"name":"@balena/jellyfish-client-sdk","version":"2.4.9-add-repository-details-18a44484081b8549ed83cd952bfd4a0e7b990109","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.9-add-repository-details-18a44484081b8549ed83cd952bfd4a0e7b990109","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6f14fe47583c5e04aaed1a92b54829c60cb7ebf0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.9-add-repository-details-18a44484081b8549ed83cd952bfd4a0e7b990109.tgz","fileCount":17,"integrity":"sha512-zb38Z1K5vlgqzo6nUco2K8nRCa2gpQRt1n56H8H9/hROhQuexOiJFDg+QHIHhUSKiaL5MuPS2EafEPXZS2MhZg==","signatures":[{"sig":"MEYCIQDXVQXY7U8X5tN1yJWeTJIsQrJZmoZ5bR9mLlP8vYKLtgIhAIz6SEx3JB21bb8T8bXWkcHLcJNVgtItFB8+dpP2WgMZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfp1zACRA9TVsSAnZWagAAlmoP/0OkvW5AGfRLqZZRyRZo\nP/YUc5batoQId5S4BKHVaDjdsfHux0Je+hqVEUHl6Yu9VbCv+iJlohIFy7Fi\nv5N3zlJ0yw7zMhiin+TXxdCpuR9QLKbLH0T9Uhf+KPyPuiXElQQpuk/Ro5jc\nXWA8jONb1IY6M9YFD+nDf3GGiWgOgcBkh1l52m9zVE7jsaG8Wv6lD5/0TyaJ\nErJB5h34KSJ0uXVy14W+6YO805M62v/Dn2aZF2Ln92jVF/dGMWg990svn4St\n0zp+7F7wU8wHEsuTOfUhkbIF8Sb+nHnI6Y0fLkpsUkCtdFp2nqQBwn7zheEH\nWZMzCGV/+5K68vBpolTuBsaznAwuZapHe54AZRi79vseT1BEhpGE3cZ9hXcI\nTKAqCJtu5YYkXlMtE5l/w8jEXEV0rrhV4ouEIbjo/RCV+hNtjXc+ttQvF4JY\nibkWtFlaYpA85v6OBcAKiSZiXy0oYhHDlEI7+a0q2CD/qPHsbm9QiviMsRvV\nd9vccyJ5Thwa/i49/n3beXRWV78NKnyJbV0PKqDUayKvNcS5DkBZfxrFmJWo\ntG+8NQdfYBiX7CkbOzYIstSXtCZKl9EPHrS+BMCNDcycrKZEmzFk7WI5YnLu\nQVQscxqtbCN8gUzvGF63N39j7EKLvHbe/7XKiUV6/tMDG0fAdtDGjRUQbEAh\nFifm\r\n=oJkV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"18a44484081b8549ed83cd952bfd4a0e7b990109","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.9-add-repository-details-18a44484081b8549ed83cd952bfd4a0e7b990109_1604803776006_0.8175506757516122","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.9":{"name":"@balena/jellyfish-client-sdk","version":"2.4.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.9","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"113b321590a40fe621a7c64b8b2388017bbbd5e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.9.tgz","fileCount":17,"integrity":"sha512-ODmHcYTqKHvD4c0kHQtz3n7+RETcZP78KvMQka47iO6EsqRRKxvDPeSxUsLHEKQiOPMft+Dl1gFLypS2wfwvAQ==","signatures":[{"sig":"MEQCIBxRKNCyI+kWTQODRXfg9JZp9QBRqmKcbuWKYV1aML9VAiAUFThtIdLERglGPToFKHumPJV3XwYHL7KxmMt39jRBcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfp1/6CRA9TVsSAnZWagAAlr4QAIviMo7wS4R68EMa5x2Q\nQAGG91/OXuvzrXD8Th6Sqij8TzdYkzEVrke5/agwsTMC7Ga1PVOzez8ZuH6q\nzpWshJDq3B6tYg6HZojNcqyz41rC30SyIISvVEDRKfuWgo4jb7XCTXy65d4g\nTTYbP6Geq0a9BVPnow/8/mGcwqIkZxzMRlPE+PQbfxY2PDGbXfCPkmtbPJ17\n6hRhiSSBwO7KoCPPbDtxvEJ4qxTvzX3i4Cuc6VZcq6H4duhtTyPsGU2hooD2\nkWbHX2SNDNzzI2MF0jLxidse0K8aq3CfNN2AokU/IyuvRO+Ves1kdCuPsxV5\n5VX6loFyjW92ZJ2gwSvSpy1D5jbsrI/Yi8LyNES/xo3Y2EaBYOqBhqXXvHY1\nzXXZXZlLw6pIS09euG6STHABRBSs6YeW9tPIRElD5ntXuJgCdTd0NFffML63\nSQPD9fVVVEyCFDahuAYsnySXMB+rdVvt9biY2/GN2Ouqy3AQXlxmYhTrTgnb\n8Zx1OcPHuASDtmAq/Mb+d1VTw7KA/nJBVDTKkWLZN7B1dH977u0luf0fpgor\nCfy9DJv1wmee/ygEZxI5y/Vol4V430mJUkaIGok0WD2ON/0ZXtM/DiVvszlT\nstGhQadyw2KYrGM8SGUSNEh5OiyVM6OLg8CaZ6giOQ2mF++j9cKswJagtX4C\nhBaK\r\n=N62M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"05fe2603920e94d4ed5ed4013fdc928ee460e046","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.9_1604804601755_0.1124179993546155","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.10-renovate-major-socket-io-packages-8e1e82ced1db7a5ecc5c7f784a864b4ae4b26f8e":{"name":"@balena/jellyfish-client-sdk","version":"2.4.10-renovate-major-socket-io-packages-8e1e82ced1db7a5ecc5c7f784a864b4ae4b26f8e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.10-renovate-major-socket-io-packages-8e1e82ced1db7a5ecc5c7f784a864b4ae4b26f8e","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"623127dcbe7bf55dc6378e7f31d007236c8f4385","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.10-renovate-major-socket-io-packages-8e1e82ced1db7a5ecc5c7f784a864b4ae4b26f8e.tgz","fileCount":17,"integrity":"sha512-uHd+82MZaPDccei9t0MrFJijXewN6IcopoRuy3JMDzgkjrG92DT8YvznIARy+8kbuiVnV/R5np1HY8Q2wl/KXA==","signatures":[{"sig":"MEQCIBkP21Nn0mXkHssD+uq0abd62JJXWETZyw2NJ0epHTXeAiBFmmGtzUAURLFOXxK/B4lG6a01AeXEYWTb/TkkMmt9YQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfp2DiCRA9TVsSAnZWagAAAnAP/j9MgIOBSPvMsmBiHxkx\nqrqTqOluXY7RCGdH1j1JC+a+QRF2eTmbTPrN6713jrBhXoKNGEB/UYaAQAnW\nlLKL7YfFoa+zpX8j52YRBd/JNi3qdwrjNWe6jOqkJ8rjl4VZyhX8d9OWvcL1\nf3Flx59Sm83gQYfwmlM+IaJUzdX9B8wcZg4LrFx4qgEU/5/5A7XupwGzNMeI\n6nlIRZSNqqy30R1aNwZkckJxfYVrrIR7D6iEdtFHH+jhsRbf8HjWB08x+1E5\n+ZOx929f9palC88X7nh1Flxn1v2qjpHpV33cJgPda9NDbZGxAheOZ6fRCLo8\n3VoUv9dCes8+s5u280eEq3I2TnH2PdI9fn85CiVLG9IMg6t0DrydGEW9W9Pu\nlgNjTtqUW83S3K9fmTCfQsBKnoOQKVczhXFBRIFKkfKB6Qje64Axryp4o1ie\nDZZGhtjKtQX5YJbGJQI9U2r9jYgSWonnKD1pIEmtiaskD/wzkVALmAFrFL2k\njL9U4MDei5rjNq4im2YUloEk5M7D4zx/bAfREPPTv0IE6GYCIC3jb4q8G4lD\njZGYH+rX8K+iUZGLqpN9Y5do7JIi3WOHpIbPanHnBuqu7ZHlmBAyXr3pFyJO\nukAmxGRaYgcGxQGiN+keqHfsU/u8Z6aUFEZz+2PsEjD3U3x3PYl0ekLYp1F5\nEnN0\r\n=gCLp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"8e1e82ced1db7a5ecc5c7f784a864b4ae4b26f8e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.10-renovate-major-socket-io-packages-8e1e82ced1db7a5ecc5c7f784a864b4ae4b26f8e_1604804833911_0.8338277256935074","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.10-renovate-major-socket-io-packages-1c5b6a2bf8ea6b3614d2f5fe6e1728eb44082dd1":{"name":"@balena/jellyfish-client-sdk","version":"2.4.10-renovate-major-socket-io-packages-1c5b6a2bf8ea6b3614d2f5fe6e1728eb44082dd1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.10-renovate-major-socket-io-packages-1c5b6a2bf8ea6b3614d2f5fe6e1728eb44082dd1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"eca021e6950e4708f035dd7e1bc79b135c38a619","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.10-renovate-major-socket-io-packages-1c5b6a2bf8ea6b3614d2f5fe6e1728eb44082dd1.tgz","fileCount":17,"integrity":"sha512-yowRRVRYJFH7EpOxI/SRVdlMzFi1hYnxy+fP1VEOEctneDkea5GdFEuEe2ODPdPnXA8yHECgAR2UlBTeFD8xxg==","signatures":[{"sig":"MEYCIQCFJ7f6otG7WEGMMgbcyuQDBG9zS6y3zL8bCMe/rrOgwwIhALHRa6uK2Wxwj5GwX4NO0clHCpuVNWGeWwpUZq4pI/rr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqQ2jCRA9TVsSAnZWagAAbmwQAIx97z6a+6upYHtHrN3f\noORrTcQZDZ1uRbhK28wIq0yhZevwLXPPwELM/TJacovjVIssHM3AUw5U3/Dk\nYqKQufwxx+bpHzDDyCmhq/DN4X+GKBBzy6iA8ZuYQxb1UJcNhCZdaMwUOgKU\nt7MYTxbabZPDvApOz2iiOJ0bNhBTBerDP1C0gT2GAWkpv5h1kx2J5w+c2jCg\n8L7QaQUGS0j6Fg16oCJomFjLCAZ+lnV0hQ7pa0KfrAlxhyUZPHQvtdyVT0md\nKIS9yahx9aOL9/hHEaRM6bBUyeNlifUyZZ50/v/jq4QWNi/3kkwFWyICz1iP\nEMpsOq0umsWC2fh5RqikTBi1y0Ro4mN/Ze7MjrtTvH4vQPaRt3OBfoEZRkIz\nVcM3hjbZv7R9uad4ha5cfnqS2fT3NQ5+zLx4MWyckzqE1pmsHZSXIdqfPSxV\nZCz8IvAsbhrgVjo1ILi5xRZiU3Zsa40hMX+MSd4aI38wdSI5Ie17kQgYroOg\ngi/gQO70GhzhwrUO4U0gCOEHosm35FjyySz5/06opI9M51uyvee3vSNclePK\nJDC5e04jShfcetM7OBh/irnRqlhh5kMZDb5bITqncxhq6bObpvy3CLlYkFXx\nZu6sVzJFknYne2o8VyKEiwZU9qrLr29LnxIe3VRpjNzgvq6jWOs/G8SOXPHD\ngnga\r\n=Q7tI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"1c5b6a2bf8ea6b3614d2f5fe6e1728eb44082dd1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.10-renovate-major-socket-io-packages-1c5b6a2bf8ea6b3614d2f5fe6e1728eb44082dd1_1604914594967_0.3490844946400282","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.10-update-link-creation-to-include-card-slug-f88bcf446d3862f472143a19f1a06c38ba942074":{"name":"@balena/jellyfish-client-sdk","version":"2.4.10-update-link-creation-to-include-card-slug-f88bcf446d3862f472143a19f1a06c38ba942074","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.10-update-link-creation-to-include-card-slug-f88bcf446d3862f472143a19f1a06c38ba942074","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"petrosagg","email":"petrosagg@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7385fdf8537641884cd962be5c54f0026c6dc486","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.10-update-link-creation-to-include-card-slug-f88bcf446d3862f472143a19f1a06c38ba942074.tgz","fileCount":17,"integrity":"sha512-3KeOYygLGtxLl4TYeHo/Ph0HCEICPokddYjQbsI9wkHdhw9rrhxRDLUwX58/lWCaemtC9GDVQIXrX4MKECt+hg==","signatures":[{"sig":"MEUCICmjiAP+ShW03yZLQ/5c+vF7DY3J8MFzYWj8HpJ/d81NAiEAiJFGgtflSqsyzm/UhYHMC88elYHVUizBL9WkLRqjmDE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqRg5CRA9TVsSAnZWagAAvnEP/08GBO49ItqVnSOLoEG9\nEjC5V/PuQi7Cp1UzFbDxnfG3M148G71AWyLvqI6s9almGeNnriJoeQx+m0K5\nQyllNydGUSwwztfrru78wro9K8sX9DKlKLnLbUCbkjjqviWSvqgLPwnlf6Zr\nGfZEU8A3aQPHiQb3/f/Jt/yR66lR52wHoB1UFRqi5oI0s3yjAScJWzBrB5pj\nJp81pkplyBBvmQb0mYxSyslVpRpuuOI4fXsmnpkrga/yZmHLRuIjiUGltHjo\nUpXPi04f+4FpkOIdlWpSomP+HJ8tKbo0SImFvWRCkvaoJWijQDVa6Rmm36ki\nW4Vw2y2bR/ydw2QvYDVVKkLP9fYKb4l4ppRKmcszJaJKMag9uyQms0X2UT3+\n19HuxwI7uvkaM5v3QKcYBOI3cqQtHwuBScZMcKBrDIc+uNDP7OCi/bawsv2Q\n6HNEsoXjA5lz2pWdzbpt5MDbVw4OWn94Mwj3/+mPLHGoVt6/yddBIBlANTG1\nWkXzVxmf3NY1sr5dijuOq6JpSMGG9MEeostqc3Kf0sb9wzcxKMxS3Gu1lnm9\nBvShtOenzSQTV8JhfZZ+IvPM0h3KRyIRsBTFAKfDEFdWvDuR5VlFz9D0j9bI\nuyHIJWGe0vsGEtWL+bku2iNwVPumg1uhM3Qy/qF/mTnpk8biHo+cqwd2lg9U\nXdGa\r\n=rPoZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"f88bcf446d3862f472143a19f1a06c38ba942074","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.10-update-link-creation-to-include-card-slug-f88bcf446d3862f472143a19f1a06c38ba942074_1604917304970_0.10487293788020913","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.10-renovate-non-major-d60375a71230ab962f76ed463dbe8e0d859c8870":{"name":"@balena/jellyfish-client-sdk","version":"2.4.10-renovate-non-major-d60375a71230ab962f76ed463dbe8e0d859c8870","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.10-renovate-non-major-d60375a71230ab962f76ed463dbe8e0d859c8870","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d305bfdee46845db11a188e6eb5ae081e6b12bf6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.10-renovate-non-major-d60375a71230ab962f76ed463dbe8e0d859c8870.tgz","fileCount":17,"integrity":"sha512-dmILvai31G53Lu//UtNxRzdvIOZ5ZVHDEKpKZ/VruzEuYBXrGq5pt3GFhM2pNjVFdEE8sYROhHgFQuB3i2FPrg==","signatures":[{"sig":"MEUCIQCIVh3/HrG7x36gKSik1s7yu/o2roYj6f6YXxovtIPEqAIgRohFPSPBtp7qnrwm/O80qKQnND+cnfPzyR04IY1HSHU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqhbKCRA9TVsSAnZWagAAkoAQAJSpBl8Xh1qi/o6JKZLB\nmfqOWq6R16wkmRfc5UALhGiKbQyUT9wqhJDg5F39e5cEoLLaUh+t+2LsZu8S\nAAAnvnCqBgKSxzwy89PbobxKs7CCEqE4nH6bdz8mRIxewZCql+4Hbk3mFOOu\nxHhVsF/PJCgDCWyPeW0PlwBuce9ua78DyzAFwOaSt867I2/U6YDGVSaAnaYy\nC0viZWD7nkwBHq4IxYkXHdsIg86UIb1sdn/HNam01zDTZ6nvj2A/LJqs/U3v\nPPGNcWai07IWtJMRyZAJE97C/AZu/htLmSc8nsIb0NkDL3XR3NHVqMtv563r\n2OW6EgcvMYi9aLciVtF8g181AwCpSTjRmMU7l945oix06qqdXz5rzFAWhWD4\nPd4rslw8FFTB6+LgqyefJpC7L4GPmd97+dBqpeIUuHFjB9/vQCpPR5wpmYWb\n7MNOTVnEgRzH3yzcRd+fSsefKmtFvSpfpcqQ4y+MCl6ZWd/Z/jTcASntVFIp\nfTVXCyr2aumvQsT05UiSMsQ9TUR624ne4oZl9doi/0SoBumTzC2L0QJIorkd\nFXPQiwqLO8khea8CW7nk8VJ+Ph7jT7QTfloVry2gWg0ezCnPmV0b70W4Uzsd\n7TOczHV3t/qPYPAh+6HYRj0m+xd6p4oGlf4H2eXGSq2Vha7N2RwnULfbENpT\npvjc\r\n=lZjN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"d60375a71230ab962f76ed463dbe8e0d859c8870","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.10-renovate-non-major-d60375a71230ab962f76ed463dbe8e0d859c8870_1604982473620_0.15328793772627702","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.10":{"name":"@balena/jellyfish-client-sdk","version":"2.4.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.10","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fedb310e7d6235c1c8cf15aea16ac783475bee4f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.10.tgz","fileCount":17,"integrity":"sha512-pH74V47RhTpeLQN/z87/CcHkwfufyycwUH36MTeipHCFuucJt8wXYTAxiwHcSZrgbaYV7Cu1VKhDOFtu2GLhzA==","signatures":[{"sig":"MEYCIQD7oqGmNV+sIXmu+muzDBKQoBKinz/gIt8smw+mh1Ik7QIhALP7FZ/dLmuhjTPfBhuaydQ0+RQi6L2LdvNSkjK22LIf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":140890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqheKCRA9TVsSAnZWagAATVQP/RshW1SAkrmywxOHK5Ma\nO2KyEG3qp0kqSEbLE8TtP17MJUsTc1OOTp9cil4G2VIHJZpPpQx6D9Nkf7Ig\nX6deiwUNS9zq5RlwvMxhtXZIu3z1cEjCUpFaLFCKqvPaGnQCjKolJE65LMDQ\njVbaedtzoKVa82CjX60B01WosP7+AmCKIs3yWOWjpE3ko7SguZt92BTiYjW8\n3Bx+tMJMHFshzx/aN3BL32vUdexjW5UQfDCP4HqUvIn/PyIcPyGSb3uHbtfe\nHUoYFbvDB4n1w152xRDLPmqKTUR/csIqT48q6HtdAVISI7zqWxtxAYZMbTVB\nSjh6SKVSn0/eBqtLmnp2lbf73tCfpDDzVkQpyNZa4bQlqPiM66HL6VRGULh9\nkAlZX8IQeTHCTBrj21I1jf6iCh0/xXM40+HerYZC42ZZuLzvRxnEiM5eDtdw\nnfDIdac+43LF6MO+5jed7KzMP2kynDWjgt/ad6ZbNGaOhJtOXvoR3GsjMP7L\nDcN12zU31EaHPSN8muZ7RpI+PLNeWIO0QzHu8NX28UM1e3wgxgN85moW66fD\nVFISqA9pa+dTKjkZ3zwQB7ayjWS25scQtqbSw/jRNADdH6O8VdVFl2nFMtnS\nHbFQCVivDAMeyVK5L3QkMB4dJuepB05ziyzwt4JKojc3pJYhhbWFHQ+NV59v\nnyhG\r\n=DQxg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","gitHead":"8d0428091287aaad5dca3cfad41ba2a687ca90d9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.10_1604982665471_0.43038493659372223","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.11-renovate-major-socket-io-packages-e712e04e1c0cad21464ddaec68b03532923deb35":{"name":"@balena/jellyfish-client-sdk","version":"2.4.11-renovate-major-socket-io-packages-e712e04e1c0cad21464ddaec68b03532923deb35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.11-renovate-major-socket-io-packages-e712e04e1c0cad21464ddaec68b03532923deb35","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1f51946d88a2df75e802c8139fb271f9f5749ec4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.11-renovate-major-socket-io-packages-e712e04e1c0cad21464ddaec68b03532923deb35.tgz","fileCount":17,"integrity":"sha512-C+7BCAbtr38OdN4fI+o5wGOMWbFYYuWm8ArFDK0i1YaIu+Q5LL/1H1I/SpSqRwAyF7nM86A8c4OZV1lULqZIQA==","signatures":[{"sig":"MEQCIAQ53Ot66MKmMgnYUAUNUvrhKLwHkO2VJCyjStv9/ss5AiBYMcd7mDYmlSZ9DiqaV297UGFHH7EZ6gmniIVVm2MIYw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfqhhvCRA9TVsSAnZWagAAEd0P/R8b8jih1M2iRNbcELD/\nWzelR8e+sClxD7GaTTI3T0P/nCA7c/ZmruisdfgwjvKC87RJwkAqeImwpy6U\nXVjufNGW6Ar9HfnFPoW0HpM5jPxsDNcUF+db6JuKHK/NsVGOVk/E0VVBqs/R\nJwO1m97pB92FRzElsR2UXUlbdjljU2hL88w1KIFHJiRUJUpx7FajlwghlbH/\nBdDUK4UWvVIW6YptnzRSRSw7iiEj/N3zMjsNuxp1la0GDNLk6wvEttxJqmrv\nzpscucSX5AibxPGY18Ldv5qx1oPc0MWaYNTPN/Jd5OjD98E1cplpXGch/R80\n6Rprob3qgJke43KoM1tJjzNl071wWx0VPn1PkCkQTzm6hNLi3sGSwbMvsSyH\nrF+fST0OIeWzT0ziPILvzuC1FXqjIA/bOvOF8gQfM2htLknjd/FGwCig3YXr\n+Fs4FYre1TtwGmEnOkrKWIeZJnGUb8DG9Na7JINC5CioEH4z7rcTqB0EX0g+\ntu6eRa6llRdgnDIfupZyMqxJ8QPs79dKjVI9E5bOchKEQ7dcUXZPiUizICCp\nt4tie7Sq82dLajKPgrLf0o6+l7yCHevvqz8ffBkqd/PSD1Aetqr6bCqrOdQu\nYq93EQX+N3FFPb6xkGFvI74WimNYXFW3LCkLE10sVaPNbxbXJsnxaFHTqIya\nXgfk\r\n=wERK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","gitHead":"e712e04e1c0cad21464ddaec68b03532923deb35","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.11-renovate-major-socket-io-packages-e712e04e1c0cad21464ddaec68b03532923deb35_1604982894661_0.27963595902181004","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.11-use-node-14-efe496607b747db1639b812711f4562cee3c391b":{"name":"@balena/jellyfish-client-sdk","version":"2.4.11-use-node-14-efe496607b747db1639b812711f4562cee3c391b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.11-use-node-14-efe496607b747db1639b812711f4562cee3c391b","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4ba0d53fc6e3befc2545fdf889a30224b14b5e2c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.11-use-node-14-efe496607b747db1639b812711f4562cee3c391b.tgz","fileCount":18,"integrity":"sha512-4SHOYQi16YWilW4YC5//FzzaaATGKuA9PTgP2eyMQjei/YFSxxMDTIrzg4x+ZDYytNZv+5GbwhE4V9WwBlyWmw==","signatures":[{"sig":"MEUCIGURTXf+2kiAo99cO1Vv+zohFRnhhUaEvmoMizB9ph8NAiEA5B/YlyMWM+omom1plE2wyPy6rCwUfY1sXNm9/jYc5fw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrKssCRA9TVsSAnZWagAAkvUP/1HepwD4Jkmkt8HMPvxF\nO94LT/wqUkIx6AhxXVhR3BzmbFNWZI8Qxw/csHwn2IgN/AB3DYOFGmijwRs2\nZq9Ak0wydhO/VGMr4S56/uxtyw23qLswjEec9kAc7wV1Q9s8Tlghwy75uAmb\n8j++YlFI++IS+FUc6HZmfS+5O7i9lHmtWSS9GH7AzIzfckc7cn2coYQJoTwi\nUwojgHzRUXsjpQj9p4KshoDExo5p/Oc9fh+pTiAj7FX46xsOiZVsWWEjW/H4\naesgHoLP1V2I7gdNuaQhsMfdWx7Z9d3g5TXh3+MuNqnrqxTZOK3Kr/d1OrjU\noC9piFBU5ksCo4iFxBP8ev9yyPjYUib+bUX919tDwoo/0/OKV9K+gTgQK0dE\nhoGOKKeUAB5LltwQbM37UdOKqULUp4JbW59icj+XqgafhHFwj2BLmDB6O9Ri\nLo8t2I4vhg6Eo/1mqvpJJImgPpekwFOe2xasw9tSyk/VW0cyPsFpqtfhDrRy\nz7BYxtPSAmh8z0O/SRDph2TTugED2ZnUAc3yV5mDHfyNpOBrkrOjJa4rvosT\n/xGm3J7WWswSwQzv0xyJR2LnUmabQzJ4SYty634DPNhT8La4gR4Qs5hibU+f\nLxlK3pPzJI2Un5ewynwe+/cJp4mBHkjYolNuKqV8cadOV7vOoTChYBCvyl7h\nCPVB\r\n=Bl/P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"efe496607b747db1639b812711f4562cee3c391b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.11-use-node-14-efe496607b747db1639b812711f4562cee3c391b_1605151531711_0.5768356532359353","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.11":{"name":"@balena/jellyfish-client-sdk","version":"2.4.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.11","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"785723e487a56730ee6218cf3b42efe06ebea771","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.11.tgz","fileCount":18,"integrity":"sha512-a6G7JckR/TLzt/Ea41UQIpy5fYLIyJVGallwJgqr3sVQi35D15BPvsR4/mZT+Ov4O0q+pvfB9qsl2jAICQQeWA==","signatures":[{"sig":"MEYCIQCVT0ybNkPGGtgG+JhJGrSL//U9hHM5uMWNBV2KZqlZqQIhAKGXUaVWuMUGe6SLzYOI75nTQWIT0Px/khU+vPQmGefM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrL2yCRA9TVsSAnZWagAAZaIP/i3MZDtnUrzmbdzZJRGb\niyqyt8aMPTKLHMy920udhGwmmlG02VPLcMh1yLoXerJy8hJEvBctFl8LNK+C\nzFAR0j8PsLq+/+DULlqFTk1g7IJW06Zu2AejrEJhRNIiQNiBYTQPQP7r1nCD\nDYowApBy2cyHQVsH57GPQFGDsRmVBy6yD5zEYS+s1YKSXRfEbQSv/rC8uX8N\nVf6TnmQ4vWz257SzOBSl818+Chotws+s1zsaJ9o2dKdKKWQB56G8XiVMdzEZ\nyzhhsIybku4/dOO1FY6Fg6mZlu3cQLygW8ly/cWLK4CTPg4FqSaqnSXtonHv\nfsyWpNJV43qAjoQR2Fjth5LyjbAoDWRrPORD1g/peeRn2H6H2DSpQ2UwSMfj\nfIly25UZvvczxCcy1N581PtNU9bKDeDNhNhhmWP9pka8638HZqPiVIv4GIUm\nCVCyI5Jml4ont+h5zeSVeqlGkLILA7BjZzpR+TXOI8UQRRNNWRkgNP+BKlQm\nmo41tXiSBg+8pmZJHupudk1B8ylzqqVn2DXQqU9S2wUbNCZhP+egezeerb7E\nRQ0Cn1dQcMZRkuAUDsMF4M50CN8mSf21neuYRzni3dXlAGBnG1VlTSG66x45\nBw8PQLixla59dgBc8RalVKjWQcMRxj9Un69BeRtvSpemW1gs+1BnbExQi63A\nXBSl\r\n=mbDL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"a9f66484f161df7d14f95ad86002dccdfd902ae7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.11_1605156273597_0.817206572541687","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.11-renovate-major-socket-io-packages-74603aa199969f45eb6a0b96854c9c1c051b1605":{"name":"@balena/jellyfish-client-sdk","version":"2.4.11-renovate-major-socket-io-packages-74603aa199969f45eb6a0b96854c9c1c051b1605","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.11-renovate-major-socket-io-packages-74603aa199969f45eb6a0b96854c9c1c051b1605","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d8b72e220d14d7250460f9621e8f2bbcec2f4ed2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.11-renovate-major-socket-io-packages-74603aa199969f45eb6a0b96854c9c1c051b1605.tgz","fileCount":18,"integrity":"sha512-TWzMtzwc6UNmYSK/EWS3WGtR5Ur1L5qOwtBaEJQ6hJYMOUachgP4BJta6Xp+jH3hSIpPyAyGJZB29gXJ6Q/OIw==","signatures":[{"sig":"MEQCIHaSg9XAp6V+/Nu1Rok2VrPR+zp4Jr84eg6t85UHExOYAiBQNqN87tvEbyhCt1MvN5OaihrF45bqCUV31DNRylG5Bw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141251,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrL5gCRA9TVsSAnZWagAAHT4P/j+cZNK3U9dUk5p72OfL\nyULQPkucgAi2c3XtxOE+nWCLqL3NkJ3FUGtWVdcU38N7lTWR3MgZVDKQtBvg\nfGpHk3hd8YZ0dYsW/ZQNvy8vfJJvmmye1QDQNq7/2dwjkAdtY+Xwr6F6MlEF\nqopNCrakEdWi9e8PiMcU2xYN9XhFJ26jrqJPhvgXxtpHU6uxWZJ+rXgLygHf\nuS5pqe+JhKVovEqfLc6uR4xnrp8G0m9aBEvR6hqxFN3XC0PY6qxwiYp35nkt\n9ywVpPIBfFjdorOHPlERN1LpbQIa0MvHMxAzeRdg4DaPS9oFykug07vsXbwi\nfD6hfEjWnV8KbwXzOmG4lExCVqHfpqKYyCcqmE6boSr4YVQZmlGtfp43Jwx8\nGuczI7h7UvhzzFROffVXYrX1tfZCOTW5+bKuydI96GAYO1nW7FIg3dg6s9Vg\nE53Y2Ou98quAWCWk5VPAbEMRMLmYqQZlNs1uw47UFXa4cRE+kLaBCXzqDXF4\nqRlNon0itmJ04NS8ViYIW+7op49GnA+2yhJAAvOz/7H3txR+SJtMl0Ap9qlm\n5AwamgIgv6iWwNMp8WlNebc37I1KIBTagVozfL5V1a21E8nuy2sjmw74R+io\nzQtrKWQpgynjPDF/usO1ssFbmkP0XpUN7EGn1R7Tls8wVYSwZqwgIQe2baXj\nfbhX\r\n=XT0G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"74603aa199969f45eb6a0b96854c9c1c051b1605","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.11-renovate-major-socket-io-packages-74603aa199969f45eb6a0b96854c9c1c051b1605_1605156447805_0.2096345886203026","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.12-renovate-non-major-49c4055b495dfbad95c89356a8dd8a5b1d916812":{"name":"@balena/jellyfish-client-sdk","version":"2.4.12-renovate-non-major-49c4055b495dfbad95c89356a8dd8a5b1d916812","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.12-renovate-non-major-49c4055b495dfbad95c89356a8dd8a5b1d916812","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"89a0077a469ff3a7ca34d6234386e9a38f2b16be","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.12-renovate-non-major-49c4055b495dfbad95c89356a8dd8a5b1d916812.tgz","fileCount":18,"integrity":"sha512-eORQG0H9X5v0jIOTX+bbzLZ+Fll8ktIekpLmu35yxIHzxkr1zUp3SfJbHNnkI/UOfC68oKOU6RC89s0kNQwf1Q==","signatures":[{"sig":"MEUCIB0G/gUMCeKKDZBb+QHQ1te0h24W1cbh9sSc38oSGCG9AiEAi6ewqU2LbwQoaXuuOYEjuwWdb24G4T1WXFUTCi2IGtQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrL7TCRA9TVsSAnZWagAAagAP/1Qh2cqGE0Dm3TuCSKzK\n/uNr6ata2jWFypw/m8qbsARUfrmoAGa4ZvdLO61an5fuulQl1SW+gI9pP7d2\n5h2gUeZZ+DNrfsLzbaX0eoS90DtpGQLF7BQsXbsUUnuvWeU4tQmE5ktCKa7/\nYQIYrRfhkC8JIdn6yzKRMeZwbGoibXWVXgZ9GQRduj1P64SLmxiN+Wy2GJ2R\ng9PwUNVnax9tAoHuw+vVQPSKoc+sVIIiF0itSboWSljgsz+NlKPg9PzIQ4Cb\ndFcYQ8yqM/HGlakOrz3EMUIpMlstMN2jy4rsYS2up6gGr95f+yvVB3fi5o5I\nx8JLj0nh0TJ/SjnMpzMUKCCB1bSz/cBM7278i2noQy0OA2p4CarF1+6isM6m\nNj9yS0jPOP6HtodLvsGtnFHb2UOo8fjPNfWC64em4i2KFdXFh1XvIhL5Hot+\nFcXzwHgY+nCy+Gq0y6yA6gi6PWILsyD7ZkAETK3kKQO+QjODoIbbERIrYN9V\n5Hqml3uP7swgZgfmGijEQnDNiVZKNCe0TNrBT54f09qxRpb4hbrsAFXOQl8l\nMwzK3FnY3DxGCUww93i5DGZrlnRSZsql8ftkbYg425ne9bLIWtyv6/C9BULX\nDixDTmJgTrVQPI90I1izhAATUKgxvlBGWIcDO6m2PGz5XXYFNlXQDWPhMK5R\n1ruU\r\n=Dc/Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"49c4055b495dfbad95c89356a8dd8a5b1d916812","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.12-renovate-non-major-49c4055b495dfbad95c89356a8dd8a5b1d916812_1605156562630_0.18817026448351526","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.12-renovate-major-socket-io-packages-bedd3d32187ed3a3bf49917883aa9691bccdfdbf":{"name":"@balena/jellyfish-client-sdk","version":"2.4.12-renovate-major-socket-io-packages-bedd3d32187ed3a3bf49917883aa9691bccdfdbf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.12-renovate-major-socket-io-packages-bedd3d32187ed3a3bf49917883aa9691bccdfdbf","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f9d6780ac58894eecfa18a494a707649db9c4cb7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.12-renovate-major-socket-io-packages-bedd3d32187ed3a3bf49917883aa9691bccdfdbf.tgz","fileCount":18,"integrity":"sha512-xMX+EHYTZG3VLDxM0iXFysQTCe87c3IudyZj/JaVIHo47IRxiJ3rtxkwXG9rbuinKw64seu/GWbJDS5dTp9M3w==","signatures":[{"sig":"MEUCIQDINSl5o+U4i3Ql/vF068eKuTNVSy/jTtzx7DGpQSesoQIgGqd3fgJVdLURRpVYPGSc7Kz+NtI/h3XaHowQC6kHtXo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrL7pCRA9TVsSAnZWagAAK+gP/inE5zOZ66dyvPLSqwkW\nlrKNQjgJ8fVLJh86AeIo06TE8d1op5awGeD4qPrfnc0wtpVENqpnP4tSLqpU\nTYje3D83FKoX0rNoTv9XAHiWpqm3q5fTS674PTLsrqSd5ykpWzvri4JxBdMZ\nHcon+5W0Ff1M0kogoP1w8BgVpkTOfOhQhkCjq2+Uak7aLnOQ6UVSOw6bSN+2\nP7rYyRJNb0v5YZ0EwpY5fNnVLnPeE5US2YdiqQ63R+V/qAAu68KoYLr6q1SN\nxMIF7ajIXlBu7pOVmFoN8ZX734UbvD5Xr2vq5Hc8miyciGGjC1A4uxtaP54I\n5nftncKHMTod9rYMcrMd6XvG0tj100OSwhTMcC4mqydNX2GydIqyWiveBhfw\nFSDM88cN7LiKK//tGoiNsnK0Ww/7xY37Uqrx1QY/9fX/qBGnNLhDHlXBsxFW\niEA8FakMH8sBRincIt49oth/DGT6TTJv0G7EywGadFRbdFZQ5MzkistRptHZ\nLEfhQooTAjWzNVNNg7NZZPdIvwTJi3RskhFM57+GEpQHbjCU373/i7DZSF9c\n7ABUg/Hm8cBVl97WQE45gJGDsIC4xrMBf706Rr13rsMDXJnyqfqfpaQckezE\nyrUK/T8M8Ed2m+WFl3X9wxPSJ9XLhIYhbRRrn5SsXyxqAa2B9/l0YJZDMylN\n7fm0\r\n=7Ikd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"bedd3d32187ed3a3bf49917883aa9691bccdfdbf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.4","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.12-renovate-major-socket-io-packages-bedd3d32187ed3a3bf49917883aa9691bccdfdbf_1605156585157_0.7714252724636459","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.12":{"name":"@balena/jellyfish-client-sdk","version":"2.4.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.12","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0d679f8826cc7f5c7e793aad342d7c60bb5e5528","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.12.tgz","fileCount":18,"integrity":"sha512-t2DTZj1oXudZcJD2X0QtdGYpviTDNCo08mytE7ICfo/ThYxdbyk3gX1VYSyjZDPrJIkpn9ZAxa8symJn3Sf3oA==","signatures":[{"sig":"MEUCICtsSPT8mRN4aU8roe/3l6oVlHgerPYn0QdUvnt4dCYFAiEA/MdQ8lMvEODsctW60IfJYZWTSpZoZWwlrul5AwcxbrE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrL+WCRA9TVsSAnZWagAA7QwQAIU5/fHkecxEE4oRt6gW\npTxuk36IAWHSlf511ruVm/8GxsOegwDXFLCgQnYkOCGr0kA77AbY617rbVry\nmOT2I4w/8uYbRGCd74UbbKT8C6X/eUMjSxFOGaXeUv+X4T/wivhBI9AGgTPl\nj5ip6v/YIAlDaeJgNNGr/QL7lfocGr3IbX0waYREtg8rhAxM2MDEq8Frdmll\nqZonk0jGtkRX6JkqmtRpbQwceZrjMRs1xjLwbp3UHliqHWipeluAHUE4JB1T\nr9ZDXaQV6BwRlryep8u4ZwOIRyyrK/Y6Res81QpKLwRkUBv9LZKb4OzAoMuu\nndceBw5kL3QVrMrqDvxRuSVzzy2ak3lYqWisHphIVlVUI7F4Dcx285D6qCfz\nEWwby0KHe/oCwVWdYOMOs7i/KTlTf/pQFNtlWaVE46CfW2FNMktXhylCvXVD\nhUNlgbRMRuO7FtnVOA8gRXS1y+jbOdo2zCW+DVCLqh4DV0eMYP4n1ws34Tso\nzWdlSZTO2c4+09zETq3pRZzjx2zTro5P6Zspde/RTil84Us6gTAw317Iam9m\nJAvuQjWfZcZ7BTTrkK3Db+VdG50YJUlx3HBjc9atBUo1Y+xhl52jqgFhiWds\nfqZYc3okYgfulF41JdO4vcyBhpTdn1s0EZI+kFxoP9JIGmMN8vttmPaJ1YOH\nnmuG\r\n=+/0g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"f2090bc210e97a2242f5d8068cdd69003126911c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.12_1605156757769_0.4687580515902361","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.12-renovate-major-socket-io-packages-55cfdfd3bf8f9154933c1dbdc83363110a9a5b04":{"name":"@balena/jellyfish-client-sdk","version":"2.4.12-renovate-major-socket-io-packages-55cfdfd3bf8f9154933c1dbdc83363110a9a5b04","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.12-renovate-major-socket-io-packages-55cfdfd3bf8f9154933c1dbdc83363110a9a5b04","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5a90009c2a63dfadb2354451b62f5e77fc6c0468","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.12-renovate-major-socket-io-packages-55cfdfd3bf8f9154933c1dbdc83363110a9a5b04.tgz","fileCount":18,"integrity":"sha512-4ajh6ne8z9292V/zNXCWzcJ0S65jt59sV2n5UqL+MqXkvHlMzzZcqwJaVbT2p/6aJ6n1P6sIXCu7SP7Ux4aPKA==","signatures":[{"sig":"MEYCIQClykjBCP9i6uswLueos0YDnn5WetM9tjc1n2RwFLHxrAIhAP9TFDsVGetIZvKI4/fcQpC/zjuUxbDBrFlDvWzI6d24","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrMAsCRA9TVsSAnZWagAAvpIP/3tm1WDMJVvhyyeXEBYo\nLqF6HCzsDgCeI+Gd3zjCMzaIdBy0wGVqsuyvOlbjqTBzRj/biMqntO9xTv7/\n2OYtMu8/qnd0m+piheQRRGXzvu7ShTbfdBFs8h4v3Dt6ofxl7BNGpTo/WL17\nsY0eQPlnocyHdNWWd4I0r0ajfAewflD0p7GlDq4xuNKjT8kjGONhcoWXfi/Q\ndtjdsjoCqvEBRSo+c4uNr+13uNT6N09KvpY1HB2LMXokSGt/NloFAZfJFmX6\n6n5+WknvwyjBfZwwjEL1lsxfyJgPCWWRR0TdKyhETVb1kp0FnosNcKZKWIq5\n3hSDLTcp0ZioRP9UuX7+9WFGEAUMKfbLdwE+8RtkRjMxXsRNXGINYaFmL1TD\nLHA2u8nMvxdqSSt055dK6EIdF5rSOZTOX8BVX1KZ3/2HHMlQCrmEH46uXPzs\nOoQmDWuscoDNqAKJWPq5PjfD12L4swrZV5hhZIa9IyD2DLvFwKVxDEx0ehBZ\ninQOE+7RvAhvvVTi9DySfgl4NQRd0J+/9BV6i74DRmxeqGHrOKQ6pLgX7C+T\nB963MiTL4/Xz+KlsnlAZqDiG/GouXJoLIxLC4qGcT4itFmWGeSL6FegiwirK\nM3NG4Xui7wrFsIwraaVZOy8hx/BpuBm2FADcu0T6EAbDY3s5uvduvzTAeXMj\nFVtx\r\n=Z9Jq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"55cfdfd3bf8f9154933c1dbdc83363110a9a5b04","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.12-renovate-major-socket-io-packages-55cfdfd3bf8f9154933c1dbdc83363110a9a5b04_1605156907866_0.9022905639060055","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.13-renovate-major-socket-io-packages-a4ce978b42a6889ca170877dc94b8d6a836160ae":{"name":"@balena/jellyfish-client-sdk","version":"2.4.13-renovate-major-socket-io-packages-a4ce978b42a6889ca170877dc94b8d6a836160ae","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.13-renovate-major-socket-io-packages-a4ce978b42a6889ca170877dc94b8d6a836160ae","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6c7fdbcbc5b78b8b3b56ed8dd08d6c6f85cec7ba","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.13-renovate-major-socket-io-packages-a4ce978b42a6889ca170877dc94b8d6a836160ae.tgz","fileCount":18,"integrity":"sha512-gOZox74WdFx2/WYmMCftG4v14rxf3KAHQn5+flcXEZGpGCjSpmqip5kHWgIdDA2ffs/TIFOZZlEDkX/YpAWuDg==","signatures":[{"sig":"MEYCIQCLM7rRzQX3MZVU+FynDP4oOf8Blu+l2dwqUmWnLO10bAIhAO5USlk0AtWnjfKIdRBbMvU8ac4UYanr7c6DyHStRzy1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrMC+CRA9TVsSAnZWagAAbXAQAISTeeZAbCe7uOYJJRHb\nfbE1B3S/iFaQJ3KBmU5s3aEZLUDC9servLhWHAm7LbTvQ5UlQX6d5K4RM1R7\nWBs1IZsW9gj8E9mIm+z36BW6CXxE+WP8sRCjGylF64wnXsa+1UxgRVqCpQxV\nydPtfVdWX3BDsS5XXb5JtYNW+kDHKnOT+alXAlhJBAN5bvmu/25gabGlYb76\ntTX++l5o7teWmz16WJH4ZFA6t+BvT1PxrZyhVKsNrNqRJuoS4/QTn1aHtwNW\nZRTFaEexumioq+zu2sMnrsbKRhBQn57fTqWT9JsMfZfmP4I+STIhW6pNjY7p\nsL23z6nOhWtkePiyyTCQJ3uma31MD7qduRKJl0JKrhbvAOU+wN0hGPlwZgPM\nXZTp/5X2kWW2KwxnFH7wLL7kfMORMyIFrHXJjjfWWycJUEuX18NyS/XJUdyF\ny86p9gEpCFFc65/DyhoTPsp6OYKCtGDHq/4R1Qqb3LL0U08ZqDv4UnHht3zO\n0aKjypbWCYTtn4uooRrgsuohzIBz/7qIu5NA7mJY4E4D1ujyBegJmYTnpbl4\nlKj4s1PY3iiyJw8KZAJiFe9bwDYgX5O+Fa6zyE/ZI9zKvDtWaLAhMQlDpxMn\ndkFJW2jfWvOsDWEIeZuxUX9fPZtWYU7zSb7OMbKIW+PeEsdmw3sfyjKHU+Xk\nlvdM\r\n=K2hT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a4ce978b42a6889ca170877dc94b8d6a836160ae","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.13-renovate-major-socket-io-packages-a4ce978b42a6889ca170877dc94b8d6a836160ae_1605157054363_0.47841962369497204","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.13-renovate-major-socket-io-packages-939917d014e32edfd62afa68a6562fff884671d2":{"name":"@balena/jellyfish-client-sdk","version":"2.4.13-renovate-major-socket-io-packages-939917d014e32edfd62afa68a6562fff884671d2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.13-renovate-major-socket-io-packages-939917d014e32edfd62afa68a6562fff884671d2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"alexgg_balena","email":"alexg@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2fc77d07da3c2ac6f4aca1685b2d92c0a1ee6a2f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.13-renovate-major-socket-io-packages-939917d014e32edfd62afa68a6562fff884671d2.tgz","fileCount":18,"integrity":"sha512-QmOpyg5hpLeVsxjgOBfJHvDax2O31MdNqF5DwP/BTltS2rpY340rYoNhvdPm6mGZdi5YQofN66JnidtaEugf0A==","signatures":[{"sig":"MEUCICpkfQ9+LueC0DWKRZZU+X9nPVb3nftGD7nEzVjKlnFuAiEAkUod804rIMpqIsyCSe8th/NXxg26614/vEVtBJ/kYgc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141413,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrgr6CRA9TVsSAnZWagAACwwP/iKXYdH7w43KYDF/TB57\ngMehqOZvmfNqEpO0ESS+YoSK+FzXE8e3B9DMDg2eUeQBRaPOVINtx9HckWcO\n2xU4awRVxHCJIw1Vdhlltgrf1A8ZOomeZL+OIOGUKWBx8fsHkd4CCdpfGF7/\n6XPbfXOJceKvWjTWpycqoxO+v2YF88YeTf3TxzZO9W5bpTTv/jRRzecNMWoA\n7PvXwaOgo7IwkhOpiJvMrMfRobXj7z8EMMq326ttjnVjIfEPXPRMCYIDbSf9\nQ3Qs3Y70k2SbUKtnSWLGMTV43Zvf30R00p4sEzfVdkc5pgpAN/wa0izwfMdO\n3fPv/G9xC1B7qCvdejlIxV76oQgPlEzOR6uv/lbAty4huQjvjz/PqGhGRi08\nQMC2lKwUr/MbAinSZgfOlNgjjK9xNvB3kOukoVHtOqaZFirMNfvsVHiog72i\nyIYGF8/aJlCgwbeGH0ceT6ncqr2kIJ7LtRUx6yjicGxntSbP1PMZ4HvSFUKf\nlkgnddnKM2bFNCIxAMiN8RX75+luyMWzxP2nnIcjv0xw3hACN6g3dQYz3tah\n1ixC+qLGik9P9S8yIg4I+yL7k0mpYpXAmXlbagkBaH0bt1qtHM2J+FEDUMcc\ndp78798EX8xJWqq35yli0QA9dQK07EQHSzng28qe0MimhnDqUnaYoQOpYm1X\nDebg\r\n=1zGt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"939917d014e32edfd62afa68a6562fff884671d2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.13-renovate-major-socket-io-packages-939917d014e32edfd62afa68a6562fff884671d2_1605241593867_0.40381182625687373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.13-renovate-non-major-299d6c9cab9020c81ad1b1b818a7d85b28977a99":{"name":"@balena/jellyfish-client-sdk","version":"2.4.13-renovate-non-major-299d6c9cab9020c81ad1b1b818a7d85b28977a99","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.13-renovate-non-major-299d6c9cab9020c81ad1b1b818a7d85b28977a99","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"89dc3be5a6b7e13f63af3aa3456e9075bf9a6268","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.13-renovate-non-major-299d6c9cab9020c81ad1b1b818a7d85b28977a99.tgz","fileCount":18,"integrity":"sha512-eoORPl8Tl0cdN/8VN/EvIwe7bUaMEeITDHNLvu+hR95bdH2ugYykg2lZosZHJ3N60S/FkuebJwJyb/iyDk4/UQ==","signatures":[{"sig":"MEUCIBNkq+dHJwQjcCvBbttyFc5j3tATki5wKMQVXs81vwcJAiEA/2jbWmukjMFfMLc6YhyXoqg8qllxcBSGog4r76xKZXA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr8eOCRA9TVsSAnZWagAA6XkQAJnDzEOrk59v/NiCEuJP\nmFazfF7lZ/E+pptYUzjQVxB9VIf/FUoQRhpEXazf5CJaaahjGz2QUWTZL6PL\nZ8gxubdSFMUyeH0rPceKlUoD9WZ4q+qs/zftLquYNpxuwI6p7GBgx2lCl0rF\nQK7boOt3iIOag1qm8XHxhm726STJzIyj2tOMKZCgpU53mu/fidY2sPGfvzSv\ntZU4KDShUsMOVs5BW6WGpyw3Z4FZbqkeHq9kzv6KUWFaArS64+8xV4/jq1G8\nyT+0SbtOB1L2dJXk9O/feGywtZpVkcnLzC6FHwU/QFT3U5lba3UuITuUGyeT\ndFa5yukDqH6p2gxUb9U7jlEWWlU7wnWv94EnkUwWWkr4wTXpfSii4gTcOZ1X\nj6kukW9SUnL8CO65p1iX0vbLed/n45caUZ4eeMHSPNUYX7cViLIkR/f3eIdj\nJ6v6xS30NUhMIr82e83fWxcSn4AlBD690Y2xrx6AYwtGDGRJKUqYJuorX/Ro\nWm3nOe4QXJLqytmRPRn1KVG41agp2YTlA21AK3yV8FYWRnHFQgdZ8dY3bcuq\nH2sZvva/EW7LYDMjKhycZP2E/wNSXfn7BjC0D/InlHMqR/0U3BQUkmF1aqFq\nn2FwVMfIgBwMIeY+/QMpWoaffGGeBfyf/uNehqOSTIyfaFfCVWQFnEVWUy0L\nbYjj\r\n=A2nd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"299d6c9cab9020c81ad1b1b818a7d85b28977a99","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.13-renovate-non-major-299d6c9cab9020c81ad1b1b818a7d85b28977a99_1605355406392_0.014942614070780236","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.13":{"name":"@balena/jellyfish-client-sdk","version":"2.4.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.13","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1bf2df0f86fb39c157d23a4e3a8467f48e186597","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.13.tgz","fileCount":18,"integrity":"sha512-PGVqLpBwbCoI/LOduf1V5VC4om5R0gxU0QCgCFteJ9PI2wVDX7Jd3Psu5j/FWV6l6uiIn/ZOFJKti0Z9W8mpSw==","signatures":[{"sig":"MEYCIQDCToFmScxf9UNIGOqlwCMmE3T6QXdYz/IKQiZzH5o6CgIhAM7mA2G6ssPdeefjW4bJdfnqvkBdj2lOochLQneglmF/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr8hVCRA9TVsSAnZWagAAoicQAJNDakCtl9EyisCWnV4W\n1bZIFvbc4BQaW1dAhPMb25iXhjT8bCCpYpAjo9rBT13IJNcue9Hxxr7xaenX\nyvAnCyp+/RwVi7JAZ4cO1/zCwht+4IsKRxadc54/jnGfCDdCib3thM/1Qp1e\nbV5V/SzZ/QE7459w3bfGo3FnhnnnyOzO/sruyULgjkuKp7cX3yy/h1UqUPDO\nu+KJo4PxY2mkPNMLFYI1DH/9n1Tg6JAHjcL3NFc0bO7gTgEjz+8igz8HMbeW\nBH7KLuzjy2t1NInlThJbl0CXq5ENvjIoU0aHMEr0Kozhq9aG0voeX0YSvZVZ\nyVicAtotbqMN2rqBxZxHKRuzsctvqu9QdrHBg74ZT1fir07MrCNpmDDCZodd\nifRwKcEw64TBeADIQ/CftqgfzPR1WyRcSc9hCAYMGNdzTU8cNQ0pLMIDHrp1\nutXhzsXpka59THoMe5mOvoCmxRH7ZRcEnHg0phai/0mD2+UwtMW44Ztl2Iu5\nhamzIqOU/cCPxSi4miIJ8bvy77mDHEvywUgLi0+XtQfmGjyHyQyL22FsUyCP\nGmWr+emGPGYC+AjWL+qzbqaSOPMoL2PJ7l8NIqZPJKUEFwJ6JtbJCfXIsoWj\nEFSOQjPKDYoNI5Xepf5JM4t0bjAj9naX+lmW/N1iwi+9tUNWxA+lpBzA6GSu\nuKOx\r\n=fBBo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"bae4be0b58f46cf3f536878adf918911fcfd0322","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.13_1605355604815_0.08854175174975487","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.14-renovate-major-socket-io-packages-43e27d1fa92a5c9e0f7339b73dff998abf821f72":{"name":"@balena/jellyfish-client-sdk","version":"2.4.14-renovate-major-socket-io-packages-43e27d1fa92a5c9e0f7339b73dff998abf821f72","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.14-renovate-major-socket-io-packages-43e27d1fa92a5c9e0f7339b73dff998abf821f72","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"89713e630323f920c72387c61d7722ee13539dc8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.14-renovate-major-socket-io-packages-43e27d1fa92a5c9e0f7339b73dff998abf821f72.tgz","fileCount":18,"integrity":"sha512-mtnCUs078V7KFHXqsUHvxiEL22AuuW7J9IrEk3GEbjCWdqoTaGhoLgGrwrAZlO4OnHgWVFV7vANIsOlThMvngg==","signatures":[{"sig":"MEQCID8Smhkjhy5WfejC2TlONL1ykW3uJEUdOQnfotetgsebAiB+hXlhzHohQNC9PCDKJ7lPh7NZ2dLvVB0DYIeZ0f7K4w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfr8k0CRA9TVsSAnZWagAACiAQAJFhEl3KgQI4/BEUNeTW\nAmpDy7TQlEu2l7+se+ufZMxVw//VEMbEqvNKXU5s7LItKG4NXaaXGuafD7iM\nVd7C4e8ytgZoqAx90l4/KiA/66CwWcKQUu4l2c8kFKKwmslFHTf6GXnafHJs\nDrZisslT712/nQj+dZi8URIO473W6PRpwH7+ZLf1Q989fzh4lXtAYuSLlWbE\nIwZcFUruaEz1M4p7R1URG37X2Ylfd2fmNYdHybwKGn345ojLPBOvukDXVle3\nWfGSz3VLSySKxZK9uUzIQWXuH5vgE6aQrB+YHcKuz1+69p6p/zdH6gvNrBmK\nndJFg1F05j0wmTXn6iNvec3zQYnK09Ryca0dZArGOcKCkdeIsvOscA5ULEQB\nfvnnTAB+9d+0LEh7KDABZgVVKbL/XzYRMp2SSOGnT3YoHOyfQb+F5F0PVnHm\nnqFdVfWcfcz62mKMT6MkOhvSpVa9MpJEhOanB3n96DOnAmklAidONcdmQH7K\nnkInODqH5lbPNW1C1ae0FrTHabTgqmztvPv1iWT2X2QNqHSnT/w9uaKfwjiL\niaXVJ5tFFghkutr9AGpSVh1whFq9KzOafp2Y+l851FRShp15vT50Wt1chz8g\nyXbQzqH/E6MLgnW5uf+yq+yVKMIUAFTCjkVssH6kNY3f3p3iosF9gfqucd4e\nd8Jj\r\n=MLTc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"43e27d1fa92a5c9e0f7339b73dff998abf821f72","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.14-renovate-major-socket-io-packages-43e27d1fa92a5c9e0f7339b73dff998abf821f72_1605355827758_0.37054461524499716","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.0-notifications-ecf9da107ada5cab7f415eec6e4f81f4132ad3b2":{"name":"@balena/jellyfish-client-sdk","version":"2.5.0-notifications-ecf9da107ada5cab7f415eec6e4f81f4132ad3b2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.0-notifications-ecf9da107ada5cab7f415eec6e4f81f4132ad3b2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"db44211f1959194f85495201af4215c85090757b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.0-notifications-ecf9da107ada5cab7f415eec6e4f81f4132ad3b2.tgz","fileCount":18,"integrity":"sha512-qQMz/1QT1A/BwTN/KDuszDcmmHt2NGoyClE58KUoRPVurW1iXNGAA7A4ujCfra9+Mlv3mHkJUxhCxHgba3iEKw==","signatures":[{"sig":"MEQCIDO22Ox/yll/n/Mcv7W/B1CyrFtyuoHeX/CQb2otvetEAiAecIcgBGAbNdP5/jtCxyMmBUY3D7+KiRC0SQf5x5L43A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfs+0eCRA9TVsSAnZWagAAMr8P/2U0KQE/4gIg49RAj18x\nlKgoAFYC0jUVdyqvEiNDJQJ3X+ZpBPklTTCCMeGhVL0anNY9fzPka5KfNZ9m\njiBK4H4yN8KQMBTRWy37XPHVxjMUT2eOuMNLl/dDQLfWc9BDjWxYzNhqPxhI\naikHfo84H5iQrqTpcXPwrvvq/y94tYkmImxPYQwux/RL2UKFcwgxsv4jhqFF\nbw8YgoLgfzesWXGoWkXsoww7pHnWbC3DSTN1nlczSRpVlUOBAReH4Tf6r8uu\nYDiAzCTmB9v8/LoumIIbW0rGjxDgvlVJ67hzKuajLGtpex72DGPN9oDFzdn4\nS+bTLOEj7uG2SPKXl8IidckgnRnrTJ6kYr6MroFK0zDdjdtpCWIHnfPV+h5F\nALT0++fztFpMldN3D8R2JzIkmkRnkQwx4LCXMUCggSNcgCQWb4MGuOS5pSiR\nI0Gt5L7V4hrNzGJqbmGd/xgoBo3RFyDFwOe5+zHroo6VYct/NwbDEkLsBt5u\nqY2Duv3O8HRSGfsJYSSUnwaI6Yz/TqbTxoH/oCPbc7WhuXlMT8+3hmPstpK7\nPnhiRE6oh8tYCFIuQnU5xihtGXZKOa3iMgpajepQkdR4yo7PUywsDEgJ+DHf\nc94YA85kBP0LCtg8SXZqAavC12q9X5VTwI+1oBewO9hxqZLBX0ly5v0GeZDX\n42bH\r\n=aWVO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"ecf9da107ada5cab7f415eec6e4f81f4132ad3b2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.0-notifications-ecf9da107ada5cab7f415eec6e4f81f4132ad3b2_1605627165923_0.00559847157029969","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.4.14-renovate-major-socket-io-packages-4a08847dd416fca41debd107ac53f1536ffd70b4":{"name":"@balena/jellyfish-client-sdk","version":"2.4.14-renovate-major-socket-io-packages-4a08847dd416fca41debd107ac53f1536ffd70b4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.4.14-renovate-major-socket-io-packages-4a08847dd416fca41debd107ac53f1536ffd70b4","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a9b7f9656d2ecf14133f200c7d7ab032807fc2c1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.4.14-renovate-major-socket-io-packages-4a08847dd416fca41debd107ac53f1536ffd70b4.tgz","fileCount":18,"integrity":"sha512-nlLak6nGIwBu/7harj6aCBL7yUYjfEJ5/m9yAMBIe8ssedifRmiep552lF+vc0+Of659f5lwkvdlRkueiLsBYg==","signatures":[{"sig":"MEYCIQDAcipB7RCqARNySEBRDhThOFKh4VwGQyzXEzfCerL+WQIhALIdr3e8TYXjZfkPVBzdgU3tUVrsXxWtwhf+GLFu9KZU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftFYWCRA9TVsSAnZWagAABtMQAKHP5sJt6tpIxX/s9Dtv\nGAu+/6ZmjSEcx1bllEkWYOiaQVKRVb0k7DVgPm1Q9b2mbw+JTQRjrD5frW9E\n10OTPD+NKRUD/bejnMeuMk7O7gg+oLBzBHTGjgnVV0AYQGuD6z3n68vgZrsU\nI8X/R4ulSqgbRtGKZKiOnvXf+AwulWGVutqD1KjJIUpGIlwtUenRTcU4t0z2\nXrDMJlO7WzkTF/xenaJVMIVodS4P0WdCoMLNeAvaimp3VLx1MjRi/p3EvHrz\nyWHBPNEM8anHf2ArkdTmiISF8MlqWdXVgD9ldkgecJr6rGjnUdfwzo93gNJx\niqNDa8gsewSBsJ7Nl8LIAb9VM30b2kQ+q6Uyv+w0r3/Kqhgdmeh/Idf3xUdS\n4eiUxzTTlEj/f+TMQF+7o2NHho7nClX7nMN29I1HIGMVEOxVt6ByFNO8Kjr/\nC4/GgpkkhWsAKjDQrSRY1bcZMlU/S2LRs1R/XZFAFa39XcA92hiSFCpXM6Uz\n2cunBwkD1FASg5c02HmUSmdbgdnCEUGzRdvTrnARQnRxKP2+HjCk0Ivd8dIn\nTt+xwhIM/qhCs2ULddB6xjCOb21ea1gdosxr+TLwnmmNQ1KiHq4qu+su6MvX\nKT1JFB6L4L2qOENUpXlVWkixr2iT4TrwYG1iuQiW96ZHxu8ioHE6BUa8mL9c\nTc8a\r\n=Cf0U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4a08847dd416fca41debd107ac53f1536ffd70b4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.4.14-renovate-major-socket-io-packages-4a08847dd416fca41debd107ac53f1536ffd70b4_1605654037711_0.7278585311853507","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.0":{"name":"@balena/jellyfish-client-sdk","version":"2.5.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"407d8d4bb047c9e25e526989f128b9edc5d7445e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.0.tgz","fileCount":18,"integrity":"sha512-HqnhnHDxCUHzVXPZucyxCZqj9/AfMgVIsYR3u/96EGMOva5Ztwjmz/Q9NnrG0OUKkaUHOwMJqdGgRN2AEpDAXw==","signatures":[{"sig":"MEUCIArN4ThESN3KweJN+BVvXdq1jDlAzWqKzxdumTJzrWHUAiEA41bhAu2A1Xe7EwiDAHT9KVAN0w+89kFNKsz2NvMfA/g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftSsCCRA9TVsSAnZWagAAAmQP/jLsH8ubmaPONSpetj1o\na4/Ag1ZSm3/Ly6sJjekkp4Il1HgioAEms/7jCavuhw1Gm1TMtBTZOPuSagen\no1Xct45X3yINpMP41LwOwtmD4r/vZmjQAExYlYHgApf5hqadMKFzqdJXp3jU\n0m0OY8JkpNYTzAPdioUPWMablXHhZymRFgit1zw0yopDvU2sdLx+gUkuQ/yu\n2+7+fwauXNxmgj7D5OEOUj6Mts3204pUS1cfQIgR0k2nSKWRulWbsY0pziAw\nuSOIdECsKOgUCNOgE1wpk/dUK3LMsbimcx4ggJ53F0f4nofXNjSrLQSHvDdX\naaNPMHShKpvpMujfRUXw0cZA3dYHZDWtsHqm6qr5/rMRgjNy3HZwt4bECE5o\nFkl+4l5kQEeouDtmvQyADUFp/LSYqXo+UM3WzLpFj+JXpsxx43XcCWROFeoI\npwwEl5ObAJZhfcMreBEfLocwe1DcQ6Ydf8S2rvrTSxuIvjPpdx/plEGRBH9e\ncFQ/aGxrLqmqbD3lLdhSBiopdxNDIYGu+HcnHuTLSRewQO/7eUR1Q/MU7EbM\nTE9zh4GumzSe2Ocjhznnw54sQ+eYksVAiXncPVLBT6Ry9W5u7pMyEY/Xajxf\nRBplxWJi2g2O0M+YaUmZrdp5gKbSLFqiN5vV1ZOBOHbNGd4L8XtgSHFUAHcy\nwMvD\r\n=JgxB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"6cf7263939310a17573b4817adef70c63579db39","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.8","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"10.20.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.0_1605708546204_0.6345667986404495","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.1-renovate-non-major-eb4932889b8811c6fb9bc1729a793573c1372bde":{"name":"@balena/jellyfish-client-sdk","version":"2.5.1-renovate-non-major-eb4932889b8811c6fb9bc1729a793573c1372bde","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.1-renovate-non-major-eb4932889b8811c6fb9bc1729a793573c1372bde","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"73149edef3168272445ab861998e5d533eebb4a7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.1-renovate-non-major-eb4932889b8811c6fb9bc1729a793573c1372bde.tgz","fileCount":18,"integrity":"sha512-mghTyhtcu/J8h3Row9//WXmT1OBkdWg3x7A3hYdHLa1xe+uGE8kdh6hoSjjh1iVII5eQPvcW01YONxJ66oOxUg==","signatures":[{"sig":"MEQCIDPuQzz4P3txsM5reuHgeoDZHZLtsEzTtOXM+GxLZbhIAiATslPL+K/jhn32yJtJkAfl09Y09hzTucvGev6CybvawQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftSw1CRA9TVsSAnZWagAAMakP/267D6oWUKLbJ1aJu0BY\n6X7NdoAEbdWO1Gp+/GF6qUKR0GRQkjbvGm1SqPOYplanb6nUsD14bI2+by7f\n1SmEc4Vh04pcCzgKwTiivYlWnP8cnNcFh7bMtC3M0OG1CyOjcG7Fx83jlj9E\nO6X8vu41G308t/IQAYcUpPFdaK/g6+GyFv88UBw7bCfpRLrG18y7djDNRRmd\nfvsYg/EGKuzrRt4dgZ08+DMdQLAdkugsrtMCVj/SDJWa39R0iwZFtGHA5fN+\ng0AkMX0crscbQ49Xc4G5DhaN5QnyH8fg18dlY9ZI4ApT7+ybob3yt3yOC+rX\nrJ19p13U4zNecHyjJ/C7asrNfxb7Ebm4q81i0oo/lMC1icrx81IJFUeHzyxl\naYs8/2RTVAXPGVcMo7qv/thuDM8HyyLtKleYt2T1fzVvV6rO2NO3gBUJ2fij\nWpExQyHf3uQdW+d1XUlNyjQ6McS3taqqhS5eKXVaL8k7vBUxlgxPKK+nn0RK\nl0LrN2ek7yxkKXRa4W+CJEWOK9Ckwx52OntaTf6wUmMwpoOkdlt8sChuI8KU\nKQowHzSADgbBPcgP3dMR3qrn05heAyhPE7HgSeIdPdfyig9cqR1n0Dq3WZWf\nGDAh0RuzxKoIQMnklQAL+lZObj96tAzLSfFWthF6z2eGBKQ6u6s3c+/2lcwA\ndlZE\r\n=BUcQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"eb4932889b8811c6fb9bc1729a793573c1372bde","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.1-renovate-non-major-eb4932889b8811c6fb9bc1729a793573c1372bde_1605708853130_0.4729109324918297","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.1-renovate-major-socket-io-packages-23621ba1520bd6b1c7f9b1d7b93a4bd6f7f35cd9":{"name":"@balena/jellyfish-client-sdk","version":"2.5.1-renovate-major-socket-io-packages-23621ba1520bd6b1c7f9b1d7b93a4bd6f7f35cd9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.1-renovate-major-socket-io-packages-23621ba1520bd6b1c7f9b1d7b93a4bd6f7f35cd9","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"afb059db75b581453eb840130eae173546f67678","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.1-renovate-major-socket-io-packages-23621ba1520bd6b1c7f9b1d7b93a4bd6f7f35cd9.tgz","fileCount":18,"integrity":"sha512-Yq4u4Kd1mdV/49WwX5g/ztfUOa9MyiLxfVAUJtYEP6xWgs0qGCxqm1UDfPtEoxB1KFsIkyzGL71N+4ldffCEzQ==","signatures":[{"sig":"MEQCIBntyzY2qsFk/eXZVyqcH+rhfIKR12nFvztWNnZ9CKzAAiBEX5m5yxYTO96K7/DOp3Gi5K4xgXmzX7koJ6koXXSyzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftSyCCRA9TVsSAnZWagAArqgQAKGJSdC36FGe2RRqr7Z2\nxj9kIAZQt9tXWVRkVWPPknYrJE/3H2fhd7Uuccie6SAOHEpHU9qlXIVtyUGC\nFM+ZV1BP30eIfipBIcSt+rXomdK2n4fDiLKLdEmH8oxAt4t8QmR8UV/ahR1j\nba7Q8vcXD1547+cj9P5RfuIeakaWfRdn98TqJGKMoR5MmwU1vh0omOEvjoZ6\nR1/biLJTKNsD5HvEXdSP/eXklXWLo0t0j3MOXYgRBO8VqYt7llYcn9QWPVaM\nVAbMd5r9T+EeoMF9A2ccPhum/HrUDzuhGPmxrU1hG5hcTOtTiLi68FFvhVW8\nNkDkPFuQ5ZrsJuHQf6sgYwFyffzwoOhirfabdsBvSffBB/pXUQMEWsICT7Ng\na+9CYMzoZrGZvIlPAR/I1aa1TD13bn5PpfXDxlNyyI+43f/aTo61JwvnZF+L\n3k+3JzGm2VZQSINzbWW3FgmXn51rKUeD0GwpptNMBGrQ7ZNttPFP1+/onOaD\nW52EDPTCfzTYR+r4ezmmYR2CM7429MnJFoorcdYmU9BmgUKH6eZTjQnQL2Cp\ndK5TMT+sV5+RpRVvuu8l+SQFvvxpedh/WsTm/Inm3kr5Bo9035P4l0cWUJne\n1or/GlRC9HzjWR3fkRV1dhDasPq5/yybJFRT+c2Fdz8lSZNLcAS33MCsMt8F\n3nv/\r\n=ciAM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"23621ba1520bd6b1c7f9b1d7b93a4bd6f7f35cd9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.1","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.1-renovate-major-socket-io-packages-23621ba1520bd6b1c7f9b1d7b93a4bd6f7f35cd9_1605708930311_0.39695815470776474","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.1-renovate-major-socket-io-packages-1b474274419123e6a538ea9f47ce6976329e266e":{"name":"@balena/jellyfish-client-sdk","version":"2.5.1-renovate-major-socket-io-packages-1b474274419123e6a538ea9f47ce6976329e266e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.1-renovate-major-socket-io-packages-1b474274419123e6a538ea9f47ce6976329e266e","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e4572c4002f0e86fad06d0b27199c7c3b540a161","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.1-renovate-major-socket-io-packages-1b474274419123e6a538ea9f47ce6976329e266e.tgz","fileCount":18,"integrity":"sha512-N6mLDsirRjtsHwo5FBYtp1WWbeD+EUmIge6d22GA5uG2FZT0UKeTMGMvkTppF18H9/AVOW2Sw+IabsoaUxjYSQ==","signatures":[{"sig":"MEUCIAi2h1Xm1ZGaZXpQJ/Aj8iLRqFre4r4FSGaIWNNq6zHKAiEA2vHlAtfPU4GINQdLuW8uICz5VxwybS+nY7/lr/lEZLo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142052,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftS2vCRA9TVsSAnZWagAAYLoP/Ree0iKkpGW31rR7xV31\nDhP2KzvuRtgPKU+nL8nl/zrKjsHvNqW+C8QDHJxxl+eraTBJJH8CVYUxuEyK\n8T8QrYi8/EdK0uKEdZ4WxMLv+/A4PKvAt2tGfjm5E8n/nA0LFg0IrLM7asb1\nEkjih3+erRp5Bv+Jmwy4f8Z6eR6ilB+iqrvrPJ0SV2EyTjxL1bjop1z93O+X\nI/7AbbfURMMs3JlwzCn3Ys2HXD3JldgDyirsBE0UZgMwdHQHswqOchPzsm50\nQVeh6Md+G2bemJwYHJi8XCvp9+a6svI3bC4XBFrPehRMXttLamVbGGx+YsN/\nNHvygvMi8UwGZQSbfjz8cx6nb2+rb4Ub2SLBJb+U0CPCmuQ7Roy796MY66MP\n1EWIVG4OZuzKQMZUM5gks2/MmqVnFdjalV5+rVADs/KMZ9SyoysAlNxJrvdp\nQMIUcIZ+ienvIFaqOzJNyYa7xrHSwwsldWX8au8knav4Kly709cCxf9W/SVN\n8WaTbmkH9isehJD2RfcG0b7dSQwgEF6VP3FeKqTuIYtS2R/8Qq9rXmJvGLVy\nDfC5RjQESldD2iiKfMhvbqdzonPLuueoMCYsU0PBxh6Dgr7CsXdEMmOCKqxd\nbBKhlurWJGJK8fO4b5R7aZTGSVTmZyz4XvNLklhovPYYMVIMpb3hgJAG64Wx\nIH9d\r\n=YhYW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"1b474274419123e6a538ea9f47ce6976329e266e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.13.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.1-renovate-major-socket-io-packages-1b474274419123e6a538ea9f47ce6976329e266e_1605709231179_0.2540096122037043","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.1-renovate-non-major-30bfd2dde36ecf96c5e45be9a3377827a0cd6346":{"name":"@balena/jellyfish-client-sdk","version":"2.5.1-renovate-non-major-30bfd2dde36ecf96c5e45be9a3377827a0cd6346","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.1-renovate-non-major-30bfd2dde36ecf96c5e45be9a3377827a0cd6346","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1f4dd16a3edd68bdc3473c49a5e3280656720994","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.1-renovate-non-major-30bfd2dde36ecf96c5e45be9a3377827a0cd6346.tgz","fileCount":18,"integrity":"sha512-1CUcayScYgFV8OlMho1EYmZHnjnt7YRTh16NMxoSBCz+F7QNpL/E8smcoKfQhjPF8+bvo8PHLdzxlZMN8OnzvQ==","signatures":[{"sig":"MEUCIQDPKOPGa1UWeE2ZPQRp3hdfk37Tl6bHpBVFdakLx1WZLgIgacqIyNx/9D6Gs0kh5bcA5JSWz78cWK+4e9RO1s5OrRw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuEzzCRA9TVsSAnZWagAAct4P/1IyrZ5jQR7MfRzepjFn\nrGK8udIr6oW4/EmBTcgUNNjhr6sOVX5cPc1Ro4aEOm7R46eoJm8dfbU4+ZOl\nv1dIsJo7iNgGUo+xQYFt7GX8x0WTxeL+QEgWUpR4Gcn/6rR5rxLcWejzU+b3\nlKrKzhsNZ3honFGAjRtDfCHeHiL7+oNIycFfm0Zdg6r3QKH9MB8PY1PClOjo\nZOizCNmpb8N7+/sLc7d2ZyjBmTgEeBbKKPQO3OpJJmuZjOoswrtsLFlza8ES\nAxJQosM/z8cMaO+TxHcfH75QDmjf0bjzR5MXo9q1FJrMbQHIUvU1dwdqFNIP\nQYhk3YBz7jj2jTpHZw91Vj1OWY2sp8BZB7I60/kBQNEf0xjX/f7+mqoMYcEp\nySkdPR07K6bCfDU9I7yi+5yDy+L5vARD0qsehsv+FHts2HYAMyoJ58Z+JAKm\njOPRsNAeEeoUVZZyV1mpT5vW96d2td/SXfL0J+uCzYUdjM38A1n3ETJR3SJx\nEJKmKV6vzf1YaUnOYnftHeFvyBziSJF81yra4HZvOAenEzdCxrKBjXcTPKH/\nxxFGT2Zsb+oN6QcbJqmzVTWRD93RHC/eRQqfLRYZGYDkIIMUJGaOtTYn2pGo\na21Kcr22LwVIGAcCXEVYq2kq5MjUEoXVfAsg0ErDcwJjaLW6NprtbI4BFEh5\nLCU0\r\n=sJo6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"30bfd2dde36ecf96c5e45be9a3377827a0cd6346","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.1-renovate-non-major-30bfd2dde36ecf96c5e45be9a3377827a0cd6346_1605913842952_0.6966638063426245","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.1":{"name":"@balena/jellyfish-client-sdk","version":"2.5.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a7031f0289d4828f825e72497aeeb92f2564eb0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.1.tgz","fileCount":18,"integrity":"sha512-16984SUuSst9H20uF7+wgWP+iERZbAjolPesfuFCg40QNS2QX0alwzGxO314Cv/l8EClY8FJ0ANSXR4UdnEqaQ==","signatures":[{"sig":"MEQCIAmXXXywqoFrNBSSbaoG8xcsgKpgwa/I5S544BpkRJILAiALA38i+Y9Mt6OzEzIojv/hk5fM3MieMT5GpbAojGojTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuE3QCRA9TVsSAnZWagAAED8P/2ig29iXUWc7bT5Er3Iv\nz91RYZwu14Zsef3ui0g3Anp6Ei3YSWGQ1ZAg6uzEImJZjrDWhNHPfBSKWWSC\nf72T4+IJ5uOwkk5lkWP6lRh/5hPw9jzWcIQj4y5XXyJsyFSuRaDKVY/EhQbL\nzU8z0l/A4xIMhZJ3sQTH6kdB26WGX6zglBVVh6lU8lTH1ZETgO94HMYR42MA\nIptIw7xxGZjbsg/aufGvo/dlDPMnWJV1NJ/9YiN1bjt4q2R3XwOa+TrNVTCI\nWjN45mTMN9vwZOVnQ0FvI23Uhc1VJJFYSMvj3xIoBpWJMLFFDvEapZBwdjpO\nvpht4UIZ9ln/Ps/V7ChMCqYFAR6rT4bd+130wG6/rlPYn25NiVguWjv3KXRu\nmwHHrr2KAk7G8Q3qNO63nWAB+FNS5if9NvaX01KmLsbXsvwF3xThN3E27RVl\nBHoPt3w3pgbEOIsBiLjlwF9i2LLLE6I4Qmi23d5DI79d8KptjQw4fcarYRTS\nzWejFKMPpzzSItBNlqVlU8elCfk7pLxKNVezrZUuLeInSYfSruVtftEPZ8t6\n1j4/h96SYP/8CF4P+AXcTUN1M/7vNuYNPr8UsdjcP47mhskB/VGibDL9eZPr\nIPZkKZ4YF+44qCwCHzdCJXZd/mCj1D1BgT1q+L46y6y8AREsC7AGdS5xlG3Q\n93+6\r\n=7O0P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"fe916558b2a2a6feee64f70e888b63cfb4aa977b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.1_1605914064036_0.5552434601516552","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.2-renovate-major-socket-io-packages-f53c5b1aaa78881d50768dfb19b915ea6880036f":{"name":"@balena/jellyfish-client-sdk","version":"2.5.2-renovate-major-socket-io-packages-f53c5b1aaa78881d50768dfb19b915ea6880036f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.2-renovate-major-socket-io-packages-f53c5b1aaa78881d50768dfb19b915ea6880036f","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b50ed57b8414018a22a9652c6c973540dd0611b9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.2-renovate-major-socket-io-packages-f53c5b1aaa78881d50768dfb19b915ea6880036f.tgz","fileCount":18,"integrity":"sha512-EAi6/ow/EK1VfqH7WGVR7YxMRirarMpOaF91IK9Dh3Ows50CGvnTiHveTFSDC3BQQnoHpANf6MfcUUxgIKbllg==","signatures":[{"sig":"MEYCIQDyZ25OjReKHF69l3xj9ppDRbYDzs3yx00wm9SitZyE0gIhAIuFaC6T41T50unfIMD3n7ylUsWRqtBBvK6dJSuwn/Eu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuE5gCRA9TVsSAnZWagAAwNMQAKUZLD1vgVOnlCxbFFOP\nVKLPL50QHPGMKkQmKDl3w++3Xn4Dtpnb8qAEcohfJa4ks+siNLxuoGNR+zSl\nSl7NISalm8r487lUKqoEkRkov7+apW1kyQgQfMnybHdfnt/4H9ly+azuvG1y\nYrcSB7w0WCw1CRACLDJALFTwXwKBWoedVp3L0kvbpJ093jMdcJhijd/I0/dh\nhmF6RlvHVh+0iD5/tCtgZCoeT0CNpY6DVs8QsQnrHMZrPr1n6pzA8ope5pCW\nIzt8iaW1HJnyKgC416ToAiLFISdpblimIeBCBIWamAIHMaL4j0pHxrORnhug\neW3K6LrxyPmHAfUBQP3/HFt7HpsV7cuTQCsidMXZazzViOgFYLF2FbP/FhwS\nwHL1H1BUe587A4JF0Ub4xynAzRGnqMxZ+oNbmYGrezGz6wGq/noPZH91+vGw\ntF/kHxaj8MhtzHBYfc0mYkEy4wx3zzDSOXtnY0CB/yEH3s3BwTnDVa413BtS\npoq2P3u9jLFhJwhulo4zMxzZi+1sSc/TlYcuunsv1rn6f1rkalyL2GztmHEH\nMkw/39vjZogvUhPSIEsp1t2/KlPnDGCxTkEpVtZTczN/zDIy3L30+eYAMyLq\nq6BZ0Ys6Z6Wcv7msnoYzeQxEsCsK+TKgQ+SNYbmZE77VzVxfS/YsKhqLN3KF\ninFh\r\n=/5ZB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"f53c5b1aaa78881d50768dfb19b915ea6880036f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^4.1.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.2-renovate-major-socket-io-packages-f53c5b1aaa78881d50768dfb19b915ea6880036f_1605914208132_0.7823352096325411","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.2-renovate-eslint-plugin-standard-5-x-3569e538d631bb3918d21f7178c447500de31851":{"name":"@balena/jellyfish-client-sdk","version":"2.5.2-renovate-eslint-plugin-standard-5-x-3569e538d631bb3918d21f7178c447500de31851","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.2-renovate-eslint-plugin-standard-5-x-3569e538d631bb3918d21f7178c447500de31851","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f98e2c28443bbbd498783220e4d682becacf1614","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.2-renovate-eslint-plugin-standard-5-x-3569e538d631bb3918d21f7178c447500de31851.tgz","fileCount":18,"integrity":"sha512-a9TgPXwmLw2l8W54Fm/tJC3VkMK5ebA1VmOwMgBY8yBtbUSW3wnSGyRJlVdofXqZAEUHzxWSVw3N47uBRFRPjQ==","signatures":[{"sig":"MEQCIBhfkXrJykJYcL8YY0S9c1zxx1Ky9s7+RC9IdngJO7QPAiAabiSIH+dRslt0Wl1WBuAlR3R2VuhAsadletCfsq3CnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuw2tCRA9TVsSAnZWagAANTsP/2yH1cWoyPK1QaDmRwR9\nDfsfuQUl0fRqxYUsaUHkRV8n9aSdPyNaCExSiSWLssYsO84wk5Aeuseh1qyB\ntJNiQmo+rpstJoLxBxCChUV/cqsNKX005BupvYcF6J7QwTW4GBUpkB6jlEQz\nUmZ6NNZNyZNMnqqbjEG9yLWPpjni4coUn23JRRltR7lU4zZ5gzgbsq0pRDnz\nVYjNhK4I2oSfTNxYUZ/mOvfwrBPl8ii8u+vMPMMktz3VcpDklrxS2Sbv+7Jw\n6nWwVR84kga7EsHUPkS/W5FT7zM4HurGNsTQ3dEOW5Z052sO6Nm7sQCjHRkK\nQ+Nz6YKLaPdDOTL2+0TnoAAyGbK+tlm7M/e3YKJmFB5dl9AaGxgt6UMwIw2O\nXVsioyUlBgB1BDSAS2wGAXO0Z3nVnunCcNPItXn4aTZjJhK09ZNTVRr+QEMy\nUUdrGFw8A6X5BNuwuCQm99Pc1KTDfnHqRNiRWD7thYAm4ewaRW5bZwmumN5z\n5QcHSMPYsS5bjZpqRcZFJ9CQWYGjjqXrmIBAta16YKIE6nQvHPXdOokpcZxP\nfNM9w+t7tdltU3pmgEecsUWOKTpf6k5Ag3TvtCwC9xI3Mnrozlkrq0tlrG71\nOstRzAK4jSUZabe3kIsh8uWJmDvNj/d94ql+CvhAlIcOqrIl+Loz4KOyMiXc\nuYjh\r\n=6riz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"3569e538d631bb3918d21f7178c447500de31851","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.2-renovate-eslint-plugin-standard-5-x-3569e538d631bb3918d21f7178c447500de31851_1606094252483_0.6506783698458134","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.2":{"name":"@balena/jellyfish-client-sdk","version":"2.5.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f0f5ab36185b23557b0551eac5f8a34898059230","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.2.tgz","fileCount":18,"integrity":"sha512-1ic9jz6KqKEsFjSjjTzrTYjLmn1/L9xKb3lJPi5xr0OLt+/Azy2tEolPW2n773ioiDePLZh+vEpeWxguz2IAkQ==","signatures":[{"sig":"MEQCIGYw/izN462pfvRozcgKlTx+37xzno4GHBdSzC8nVMyeAiAjxrWhZhLyFZPQcOZe/+XESwbwl5IdB2RC/ZxZjthTPw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvcX1CRA9TVsSAnZWagAAhNcP/30T1qynkPJPWiyuu2I4\nldewVAdxyZFYM6+3/exsGCX+apZPx2tQW3ExgCfSgKOF8rUEkm70ggEY+7di\nbzmWOe2GsZsmqWAFclMNZjWnPQHs7o+2IyfajUJaLjOXlPjjqAzCHL95ZXzu\nGqvpW9v9H+kKC+04AGA7naPiZNQ6rhKdlZAjEgrJLuTCZi9WUqoE4Zjzz2BV\n5E5jEO43nXP/y9U7t07qizhPEO/df04YqUTkes0jYN/za7YeAU/ltym7gc0D\nbKP9GbyEH+FCBrpDnl5ehGA4esWfx2Q4mo+bsixJYe33RDxlImYp1RnPpeQX\neQetzek+6pRbMHYDhrQaAHUk9wA6dWB64gKcQKViGlJkevhEsNpqkGugqEbQ\njo6BZpVjiH528TrdHjoEl8FwaC9KTWyJKlMRFpT812HjeW4N0wQ/gpXxy6Mu\nrgeEu3c5MEqrKCXwIVBTsmIIa4VxjeaGVFRNt/9Bet9WnSsg2EdtBMvIkrYh\n/54XymNxIGh6e8BRPVH+b9mNVg/P+vHhhZwKdFV3CYs5OPjf9insegiodex2\nYjokP8WO2/l6bk/fDsDUbnoQ1YNLo/ocUJBA6K3g50lm4wYITrGQTAobrdt+\nKt1Ckkrly5+z5HZswGSt8X78/9a5JRaWG69f10V9rX5WYJmKhkih6ON8gOzd\nIVPZ\r\n=+nse\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"e584084a5441bfa2a94addea9db19eec36dbe561","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.2_1606272500463_0.05003727792931567","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.5.3-renovate-major-socket-io-packages-f202776405fe3d8ded536ef35293d707efd255a2":{"name":"@balena/jellyfish-client-sdk","version":"2.5.3-renovate-major-socket-io-packages-f202776405fe3d8ded536ef35293d707efd255a2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.5.3-renovate-major-socket-io-packages-f202776405fe3d8ded536ef35293d707efd255a2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b36828e825def2ea96516bffc5e46aed7e8f7278","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.5.3-renovate-major-socket-io-packages-f202776405fe3d8ded536ef35293d707efd255a2.tgz","fileCount":18,"integrity":"sha512-e5qq0SXVNmjMqc/jbk5LLo0jhAZcUpP6KwJI840qLG7UJzgMnaWP2Xa84jgWPcDHBoL7ey02AmI1Wj6AnH9WIA==","signatures":[{"sig":"MEYCIQCovJZrYBi9XWuBxL/Tykc7BDjqMwH84oN3ehGmDwIjBwIhANppIRiKvqMkmE6WYuzKYBG0Hy7SRehWHMpwiu0m8Nm9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":142237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvcbSCRA9TVsSAnZWagAAg4MQAJrAw1dLWJiIJLOgbz0h\nk9NhDr74WLi8+0tLD32XmS8gOWrtI3E4eZaQdX2XYd880oryTJO/lrRM4n0/\nAvrNPEnfa7CRsSKU1qF5Gv6ptIwHk5qaiw47RViyD1LW+Uq2nEh9IC4HZVfT\nIBq5btj1ilRKbBMAwvT0sVYuoYoNArLOwGlt7+XRtP8pq3MHvSD1zCIMd1bg\nkObVIefRygfC+AdvO+iBHezCsbbBMjWgHYGftrSOTrbbDMX4m8u/Qg6FJrZT\nVgYloDmH6ap1drtBW8g4KPHmoEMgiiGVHaDvU/7hUf30BAIXArKFWDfO9T1H\nWmtASKGY05Z3CkNNpy0mK6NdQxRaxOwqpBJ4L30aGaudLbaFENYdfekEvK9e\n4XoIEMX86Ve5WuKc/AcTE5RAPFhWJlC58pYlD9PEWYgXx3zxzdVzfsbhox53\nLWGPZOMpBamhkOREjpiKuQpW78yc+70kJtHqATHFO7habNMV02YDuvMo8jBA\naT9pTZciskSmk/jO4vEJxlo6Q9ujTGv/UtLX7mKv0Yik7lHWEeig8dGSpT5I\nHVe0Qwj3Q1NvHyhaSndWDJpOf6BC5wkwssVRgSIGcLJiGLmuAkVt2+ZN0s55\nHiaB9nPpBb5GZVytFY/amqRxUk98J8kvFRNOMZxVrJmSc57yBmYI9Mck+yDv\nukSH\r\n=dq+w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"f202776405fe3d8ded536ef35293d707efd255a2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.5.3-renovate-major-socket-io-packages-f202776405fe3d8ded536ef35293d707efd255a2_1606272721544_0.23055800520985525","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.0-support-rating-8ef8f37f44e9be43ead09deebaa2e16622188597":{"name":"@balena/jellyfish-client-sdk","version":"2.6.0-support-rating-8ef8f37f44e9be43ead09deebaa2e16622188597","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.0-support-rating-8ef8f37f44e9be43ead09deebaa2e16622188597","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2c09243c49bb661028471e31effc67dff3082ef9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.0-support-rating-8ef8f37f44e9be43ead09deebaa2e16622188597.tgz","fileCount":18,"integrity":"sha512-4ioYObcnk5AhHN6DQb3J9YtSl63t8tAlmNd+VU1jztVS5Kpt0mI0CbbF4GVsSsPqWtOUcRLVK6lpA/P0ZhmxyQ==","signatures":[{"sig":"MEYCIQDdo2Mk5zr0PseBPbnXLHq0DnsQt384c7HidKngd+MCEQIhAJ7dYOp3HNQR+0IKwxpoAzpKLLMnsFwlyQvUITO4O32z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfv6RuCRA9TVsSAnZWagAALIwP+wbQGTz/A4VbuOXBGuv9\nx2xp9B9CUZtVUqX3bNq1brInizFacs9jCyzZo94p/OOWGBqV3oyRlIG3olPk\nHbiuOgvX4yGkqX35FccXRX9y4cX4imerR1RK3DIfvFgzR9Nv/x/F3pcFczmn\n0WD1+F3xdZjDSgOZMgK4eVQtkW7QzZRhCH/tIgR8u05POWyzYGW4coRyIk2f\ncoNsY8+CRmrin5NbK7T1V/4goHbGZU8FgyoWd8Q66Jbu2dl+kjKk6/XGBWHq\nKNCQxkPQlvD4JJrIlCirzVuxwyHWtw0DSOdZiTSfkI7c4l7w9KTXPOlXe5gA\niBEDWsC5z4Q2l5ghw4Rno2i676d6217/oudxpfT8EW7s2+SYwfAzkvZMyn1x\nlzCweur6uiGM2K/XHTyzgfZkLxFllc5vb07H55jITjkD+U5rTfD7EYEf6mWV\nx/3BnxpHPuJd5VE3Z/Ce9PHU0+QLjD0ItF2tXPbchdNx/EFvcO/FPqBocb84\ne4oWzA840lJhNqh2xs+5qV9khxEVsI2ou3lV4w1/eXqyVk1aeL7iiAIm7eXi\nMZtZ1fDGB+xrHtCBgf0wl+hAMqerzgpBhwtFt3Cu01NVr3JRe3AlByeTAkpv\ntmbVsP4ZiVdFPYYc2Vd8Av0XiMUuQ8Ih/AzfOlwaivAfIFFGswrrfBatKGZ+\n/hc5\r\n=ZVMQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"8ef8f37f44e9be43ead09deebaa2e16622188597","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.0-support-rating-8ef8f37f44e9be43ead09deebaa2e16622188597_1606394990063_0.14666979326599305","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.0-support-rating-d97264bce94bb8ab33a15435c9ec3fa09be62444":{"name":"@balena/jellyfish-client-sdk","version":"2.6.0-support-rating-d97264bce94bb8ab33a15435c9ec3fa09be62444","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.0-support-rating-d97264bce94bb8ab33a15435c9ec3fa09be62444","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"69bae0e428aeae070f6683b351b3e52cf4aad8c2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.0-support-rating-d97264bce94bb8ab33a15435c9ec3fa09be62444.tgz","fileCount":18,"integrity":"sha512-7p7LhNBGfS281TPFFd719MsaPdc1XdabYnUcD+9JbG46p4U7Dw7+jAEI0RstXne0ykC/L8W9OOIB5DY9HxMf6w==","signatures":[{"sig":"MEUCIQCTAM4jTFZZYOq7DoA07aGi4Jqa/SYsYpPUIdk1DPzNuAIgJrR3lHg6QEcqohBHG/sUqim0Ba+xyIT83K8bIe6bpkI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143084,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyKzTCRA9TVsSAnZWagAA5EkQAI46mhacR1Hk9qc3mANj\nQMbF7eUOALGVER/PC1CjvxJfHh7BXkZxTEUM5zc9R84TkoPYoXuNo4Wp2vN8\nYdnX5Y+cuIS983Gvv2OSJHQ60Me5BNXR/8+Z5KlSdsecHc5gMkszQKa7Nmcl\n6frSpd17ULmQk+nXxvWP0b4LYijsgWGDAFN7KrZJkxy3w9dkJSDPxGpTtnRS\nfgtu70QYl2qp+yxqhk5uqK/ENQw+peaPJCXd0SHHz/k9/kHtsI5gAB0Ic0py\nBUiggfTm5aP4g1QlTueRa9fPf2tXjPdbw1yHVQWlCFcZEpc45cqTEscnLEpq\n/BPQvplHmmk3gTZ+845yfS0busF+AQVNm2akaS7l3dydzmlgBgb8RO0XILT/\nJCbT238eeLjz+nWra0WTE0o66A8JkZqRMtTRKFKAy7fByOzx72WfFKpOdXgl\nE9mLZZqKQTZ6qB+mon/ABURM96rNFCEdOl6knO+SiyFESO94+4xhDks70J+F\nNNpP65M5mAB0CkL//vGOD1to+IXKssofStF9QtobuVUuDshtY8DnDgsuIzoh\ngP2SiEU3KI0Vi+hFbT1HD2N7EqiJbULoeuWsoShdlk2EzJX2oZPYbxIqfWls\nDHLYgtYLZQZ1uZjhhWML2WuYHoh1cv4ptTU5rGufbIGoy0riszIK6tRxleHK\ntzjd\r\n=fIfl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"d97264bce94bb8ab33a15435c9ec3fa09be62444","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.0-support-rating-d97264bce94bb8ab33a15435c9ec3fa09be62444_1606986962963_0.033982367956037596","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.0":{"name":"@balena/jellyfish-client-sdk","version":"2.6.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"70d050f0b3c5eb1a162b1dc8c182d75484e7e882","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.0.tgz","fileCount":18,"integrity":"sha512-joI6BqQUlJOsFvdS4ZBUOV9L2tBCJ2Rz0LivoIQ/TuCM+NKx5Shr26BvVmolxCWxZ0dA3uA6wVJTBZ6YOGvPvQ==","signatures":[{"sig":"MEUCICPc1S5WfVNlmJnJIOOvyQ1Q79CJ0pgAbUNWgJGM1I8BAiEAvqo7GJ9v/3+g3YgwSQjH1QwjZ2mILK7ikW6OyvcJeJM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143028,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyMWzCRA9TVsSAnZWagAANhkQAKQxcwIxLRu2VqqBZN+k\numxUgkw+YPWaU3fra655zPB3Rx3vLv62pA+dKWa/j5x8Itk+v9G32XUreMPc\nD61BOp6y3e8zEq5TQkBzQCjRGNnKgG/7p8fn/LLIHXSGoR9mChTBDQHuWo2D\nyp5VkJF6w8uSUMuSgd9OWqU85CNmjoXZfObIB1eaWSIqfBE0FoH7jQeX4SrS\n62buOWss2Vgu4r2ZjqaP7x7oSUPXajqoi+xQUyAaWRrw8+oF+niGyx7mSAe0\nONSLu5g2BwCuy1RXJ5OpCxU3wqwBSjWCSx9y9D8+aBmSziqwAWLAwjQNZcam\n8GmTXxDT05bfl5GFol4brZNA2XpOvvayWUOLrFCEw3P5uf4sM9ucW6VpBqLd\n7baazwKMhw2NTLATv9TJucNLmp7bHHGqBuDTIObLN84P91WNtZ3x6U92r3kd\nYL0r/yvWUVv8gd5kKPVygK75lrqcPPRtyf4TdjblMA3GzA6O+Gz7FPmi7jAf\n6GB/6lnh6fSJb8Ozj3xxTXBZWqEaIr83dOUWgUAsM12VEWuEHs/D35WoStRW\niFTwm1xGXmt46/RL+I+tVD6AJh6y3JmTAw2kzK2FBgWXcDW+hUgD/zGhUJ4a\nA40DJHvyGGaLlo1L5jJerozin2omTFxRRJ6IimreOLNJzHkHdxF5Tk3aLmxj\nQJ1R\r\n=w+Rq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"434538a1e965bf2baf743d8de393b4167cbfcaab","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.0_1606993330818_0.6460619333383546","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.1-renovate-major-socket-io-packages-0cfca18a7863fbb5b013697bd192ef86faff0fc2":{"name":"@balena/jellyfish-client-sdk","version":"2.6.1-renovate-major-socket-io-packages-0cfca18a7863fbb5b013697bd192ef86faff0fc2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.1-renovate-major-socket-io-packages-0cfca18a7863fbb5b013697bd192ef86faff0fc2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bbc91e01dd3471234779723333116b7c0eda76d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.1-renovate-major-socket-io-packages-0cfca18a7863fbb5b013697bd192ef86faff0fc2.tgz","fileCount":18,"integrity":"sha512-qG/+vaujCJwNp77YqlHOZWaf/JGaaMrZ5C04CQQ2fAHyNi96CK7oKfwANv9mu84xsM6pvyTg9ENc659/muiUsQ==","signatures":[{"sig":"MEUCIEiPfr3MpI/XQiM723RPDZqkhllm4GM3ws+m9VW6SUV7AiEAglfynjlFyRX8FUaK5d0ZRqBgUzo85BSXQ5s/Op45Yoo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyMbGCRA9TVsSAnZWagAAlzgP/2qdOKkPykGbCcqIQct/\nFJO1+FE6nambfICFDT18ucnojeoNoG1nBwDGbEXoFwTfHlQCdCeUhovTVNjr\nbHS7qnG+TgSyu1XWunK7OWi9JKmkkgEQ6kPBl5t5VV14QPq8QnBl/wT8gFLx\nj4Rg5lj8BtHh58DeQwZ7o65BvCKl593lUgqXCptU3npPs8SG6dVvFY2uVYNH\nQPJzTSL4gxJCaWGxhfHosbxvnQRotRgG63OrIVK5sEDj6pM5+2kgpkvJPEA/\nXc3xs/rhW9Te5MRVhjYVXDwWUmx/UZfdDSIuelY5hvxrnAqFEB9q+B7iGT4M\n36gGpH/2qMXqoCTeo9K68Cn04Z+HYELWgRv+5tZ+Y3U9szGFIM9xp0o4wA3i\nw14te5kOh8jyRM+sNhOS3PZTX1bG6/GzOMEutZQi0VgKgtgY8BOia0teokv8\ni3Cy0E21sSPZpbUH0n4TK1a0dbN0qF7R58IacJmDnrgwRyidkB57AqP4CSDC\nj4bI1w7O6KPrmZEcVDzibU/Cf5PAbqx4wTADh0aXbLf+gFRTgNj949RiBfAn\nqcZEbMYd7uGSqKTilHd+GBGvc/QNnMEJf2PJAKrw3Yr31gYyD3lYhoOFAkr9\nb75SVlfKSA0GNMZiCFVYlRBjg6cI88DTxyHacGYngNcn3WF6L5EpRVo8aMbf\ng05t\r\n=ddAc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"0cfca18a7863fbb5b013697bd192ef86faff0fc2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.14.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.1-renovate-major-socket-io-packages-0cfca18a7863fbb5b013697bd192ef86faff0fc2_1606993605745_0.8377909551967175","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.1-renovate-non-major-b979ec2fa5f756f9f33b80bbf2ed8c24fef4dbb2":{"name":"@balena/jellyfish-client-sdk","version":"2.6.1-renovate-non-major-b979ec2fa5f756f9f33b80bbf2ed8c24fef4dbb2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.1-renovate-non-major-b979ec2fa5f756f9f33b80bbf2ed8c24fef4dbb2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8abb9e73a6f8d35b8eda52bf132e5350e5568255","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.1-renovate-non-major-b979ec2fa5f756f9f33b80bbf2ed8c24fef4dbb2.tgz","fileCount":18,"integrity":"sha512-TBNCZCf4CoBo+M7oNtdoPaIuH9ORZtLMz/cFPH/7Ddsi0t3lS4v9b6hQNfdWe8R2FSFajB100HdUmc8vYA554Q==","signatures":[{"sig":"MEUCIGCQgfatl77WigJLjPBC5N0P7yPFDJwWJ3r80Z/bFck2AiEAsRn2Uapqm9hcAPfmBRalhUnJhAnF64tprcZQxKf/f9U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfy0ajCRA9TVsSAnZWagAAtDkP/A3QmbQFB3hFWmc6cyLO\nVvMmOkWClzoSqNMm7p/p9+ZPqhvl6sPliNuRIiAMvT8q4W6vyLouPb7N8wlX\nhxp/Awas9jBLEIzi48K2vfxpSiVKGvswiqF88bpR+qsrhIYunIA9Ij4UIkTs\n7HVg09IvudU4DdWpCgbClx2HWNSC25l109hQ/JQMhvfg0IGrKXNrYryHzu/W\n7nSbXrP93/vfVjnfXy1k8KLwAQQZejgEIymefzyTlfZDY654dfcPBmQEcPAL\nHYHfxmx3dzwAyYokHMA3vIf6yTiGeK2o4BKDh4r3AINHfuzRJaArQtbVaHC7\nz9OleuCNNHmZo/VA5I6+0GCcdKr7nc2QiTTVGIPXGyiWabYOwsqai6J/bGAs\nDmSu2VQhwK7IVoKgVy7L3ikyzGmNFDwGmkIbkHKX63ZXu92Qg8+cEqJiqza2\n8/F7z2BbwsLQAybS3Ybilz/aOe7+90WcjcxYsuBOhl/D4RcCvMozBF0oXNSB\nwEx4TnwS9xs5NExRLJJ/9QvOWtha/TrOiWS2Ein2k83zdW11GJO0fJyZP95t\nKVTQVIcgOXEGGq5BjiPmgXD1V7ixgWwAcUW09YFINkHdRY/Vt6dWnmCvO4vi\nqESaYzy+07pK3ZScvHk3b25mwqOweq/47qy4P5RSLBv0nwYxvSVGbEbIGYYp\nXF49\r\n=4lvl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b979ec2fa5f756f9f33b80bbf2ed8c24fef4dbb2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.1-renovate-non-major-b979ec2fa5f756f9f33b80bbf2ed8c24fef4dbb2_1607157411183_0.4534820849333161","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.1":{"name":"@balena/jellyfish-client-sdk","version":"2.6.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7c0c3d31e6fd0822fc8960d1f6f1084e88a989ff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.1.tgz","fileCount":18,"integrity":"sha512-LUwo6hSR9uB+Z7z09Dc+qZuuw1Um0ufVNjwFjTZbZ0JLzHVX1FGpyk/50Lqh0rWAvo7/DGYq0Mh0hzhK/xHbGA==","signatures":[{"sig":"MEYCIQD3Ep6t9CUa2yUe+Lbl3d+PNwzhVmnsk/fKsmhEWOyMogIhALyfSophuXyPIchhnn+xoxq3zXO10OZMrBZo8zZx3l+L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfy0dfCRA9TVsSAnZWagAAdGwP/iPrY0QQq3ZZfdLKq3Wg\n1Qy0iHsb0HQgPvBJd2JeeYmVRAgbzs9J07aAFbd+W2G5I4EcXtn2ORqmZ9s1\nIjfRb+WUO/0Eni5g05KuTX1unLCvkjJGFu8xykmFujCW/nl8pObKbYsIFWM5\nuxzZw4CKc4NClmXxRGPPuPUzeMxsHFhcbBQJ3V/WoIWUvl30MEZoAEqplIwv\n414dvZN75TIeXU9UeEfNoQIGCq3bnorONqAj00o6Doqf7BPKIZFA7OQxHKZQ\n2v10eKwCRp063dgilwrSSijVn3edQ7fnUvgoQLmpm8FmGAs+b0CL4thCHJKJ\n2QF3+AH4ZrWJjcO0yPy0SITouTYyDZy6466WggjQodAGt68KCMqeUyjbnnV3\naCPQ7aNC2QU1z1FThHw38m8em24xUZGz7xZomrejWJCQWD2bO8nnZrO7mC1O\nrW4tslC8JYROe5RtjPmMgfs6qm0CdlnMm71HFJ52GKDzOq+lJT98jIOOoWjg\npa6Swn/4/DKdKICzBhwxo4i7Mets0hGq5HFwbCYj4elfkz84cIkteuKyRxM/\nykWPzrxXc9fVyNeRzLq76JWVGbn6WbMgYSgu41gi4RwOmAoWZFypIH0bkEjL\nW3SxuLCunk/e7JDetAidixozU8NaG/XC/W1MK3nYeGEh2FzVUU+7+CWuGA5i\neAsb\r\n=QXXc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"97a14750121ccb09388bb5aeb21faec9c654e656","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.1_1607157599019_0.10470846144605916","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.2-renovate-major-socket-io-packages-655130051e4d4af9d6f32ba12a1af89261356e39":{"name":"@balena/jellyfish-client-sdk","version":"2.6.2-renovate-major-socket-io-packages-655130051e4d4af9d6f32ba12a1af89261356e39","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.2-renovate-major-socket-io-packages-655130051e4d4af9d6f32ba12a1af89261356e39","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"07995a74d6bb2033e3d2e74419797b79a87c1ff6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.2-renovate-major-socket-io-packages-655130051e4d4af9d6f32ba12a1af89261356e39.tgz","fileCount":18,"integrity":"sha512-/J4RNXlM24j7ICCBP9hn1GteYhbmXOH85fTNkNiWY9rUOf4SR0mZMe/z6rVu+PNW7MxnaqnIeBvKBzSUweFW+w==","signatures":[{"sig":"MEUCIC0L1ZlYqiU+qJFvc6OvijpOGnVbJTnOui7Y2pJ4Np4HAiEAx40xuks92DNV7pAY7SiojKokeZSiXsvtFV0NLrs/z3A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfy0gZCRA9TVsSAnZWagAAmYUP/i1ZptjVPwdXYJz6Bsfc\nksA9oV+HZoBqXb+qJAf3LJv/lCy0wRU3kTzC5ctid3XhntXYj21F2cDvSCvo\n7vJBv0UnCUEYQ1keuTIBAaXtaW9lOpKTo3nJBO3kj4Vp65CDuHCiT2flCFv/\n3QHYAxm72as79E0W5VIo/mYghiHxqx9J7xUIGbrjFRT/7VH5DkYa5RyJLcVp\nf9Nf6FeLbmUQtcAtV+qusJ/nUCqIkyN1hCRO4hWVG+koYj1dkZ/1xZA/GOeC\nf/OJpPwYmUHHXhrQjV0FJk3znZjiGXdy7j61NQefnmyAS88Zx44dqlNZkUGq\nYUKgqn+lsRHwo8cxJU+RQPuYtWr7Ce5ujVI99S+9/IMlqQVSqAOx//e/W/av\npmX6MnsspqJNlK8c4QuTkOir646PhAqbc5mKIQ+ehVObBKqAG6hT1cioYCym\nrTbhE5xj/7bldroumF4QWgcolBSO2rZ55hGpxn3XRPNVqmFXF+liShZxetUM\ncwUOaPomI9lh9Pi9d9o8vdoES5m4Tn0/yVsffQkwZ7muaA1HWh7tHaFnqGa8\nV1IbV1npe0SmrRt+a5sy6BP7WUlf8ZlSsK0So8Jeh50CygmF3vCR0F0nu+xm\nmRM2NwoT6E6shNFNSrB0p1VL/ysnJ2q3SXTSONYASZhfTUcZc9HhHC0PMoAV\naO59\r\n=SHz4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"655130051e4d4af9d6f32ba12a1af89261356e39","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.13.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.2-renovate-major-socket-io-packages-655130051e4d4af9d6f32ba12a1af89261356e39_1607157784966_0.8423209508990204","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.2-renovate-non-major-627999f3228059417652462b95cb1c7bc04a3c47":{"name":"@balena/jellyfish-client-sdk","version":"2.6.2-renovate-non-major-627999f3228059417652462b95cb1c7bc04a3c47","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.2-renovate-non-major-627999f3228059417652462b95cb1c7bc04a3c47","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f969e67ff3ab9d54c7bdcdf383969672fd23c3bb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.2-renovate-non-major-627999f3228059417652462b95cb1c7bc04a3c47.tgz","fileCount":18,"integrity":"sha512-lBOGh3d6bRDkIj1kFxH3DNClfMtCz4tgwQzqmsaGWD7WPF1y36xHmmmk4YhM4NruEVGLtOE16hRzjzf8TbCFqw==","signatures":[{"sig":"MEUCIQD9zszfatF6v8Jss6KmzhqfUXoZdsbqZ2bBWwP79vbDPQIgUZgQPx5oiVMFR8ISpNHBoGaZRmjXQw5xc11K9T5T45E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzfNFCRA9TVsSAnZWagAAMCAP/0Y2o/eh4zu0XACve6ag\nY6hW/pYpYOnDXFEGgd16vLxnXlcfD9+77oZgQUPn7uKJwe3svrEqr1zCBwtr\n7XDSxvV4k5mel9wUpdNgMzb9Ctd04/F6JCpS2GDhnva0/7lav175Jw/yP4Ms\nA7w/XE/hZ792rtijUnAuupqlB3XlFBScEgJROL5AWd9n6RhvVPlv4h2croJ/\nU/9WTSZzI+s/q6elk0osNAoM73hAEz+CK+KgtH3Axjv+FFvlJwcrnAOUTLAW\nBpoVh6ef4oHUgMwKImskdE1I/TAxOQAvcb67Oa98/CNahVP0AUjFs9XkzWaZ\nVZ+LvnuGVRYoSJaqVNDLMeKmzjtZPV5M6q32lA3E+MPyZXz/UJ78q7sxCkCj\niFhvvaAlft9ghAwnoBpDBRts5KUJxSB9zTDimtnHrXMYLNOKdA8B0nqd0HrZ\n8N5cvkbJhlYQwi0z70NaIXts2atq710lkI5n2uiRtFr/9jtmburA3w4YLECb\nBe4U/CgCnZG1c632PNccnnd1MTH949+yMN3KP2W++FClDemnpjknWUhksWC9\nleYj/HhyNNYuCu+LrQf/Xjyi5IvHPvhWyWYtzUYAWQKO9wzzJHm/DKAjJ2VC\ne2iPlXOP5KFZRPHAweUrG5cJoADk0K9AdVhzkjAdcLfPe4TM/o4l+EEtlysQ\ngl7S\r\n=9ARW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"627999f3228059417652462b95cb1c7bc04a3c47","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.2-renovate-non-major-627999f3228059417652462b95cb1c7bc04a3c47_1607332676679_0.5023852786905403","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.2-renovate-major-socket-io-packages-4198a78e252fc910ebb5f19fb1ce8b32e83dfc14":{"name":"@balena/jellyfish-client-sdk","version":"2.6.2-renovate-major-socket-io-packages-4198a78e252fc910ebb5f19fb1ce8b32e83dfc14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.2-renovate-major-socket-io-packages-4198a78e252fc910ebb5f19fb1ce8b32e83dfc14","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"080c7f683b6333f4ca1d57de4294ae7ac2f4c0b0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.2-renovate-major-socket-io-packages-4198a78e252fc910ebb5f19fb1ce8b32e83dfc14.tgz","fileCount":18,"integrity":"sha512-lPgIth/QxOgTIqiRxcCO2yxvpr2PMPvMWgwzxbEdk7+RmevklBNeu0+4/QGUKaAc9EvWKfC6XoX/v8wrwO1syQ==","signatures":[{"sig":"MEUCIE5VMcK2k0A3Tl+k00PiXIQzeeF58JI++bgddhJJMpCmAiEAjRYxtThOpbvhlgNJFkozEqmZ9nGJHJMla6hZMNEp1og=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzfSyCRA9TVsSAnZWagAASzsQAJCN+1yZnV2RW7rpfI57\nooyH7LWHJhCCMMqiidl5iVN853rOculzo2qRFY1Qjhg5Ajl7TNJxb9iKQ+Hb\nMymKveO0UHewvJPxMGFqhZ1dFvNA9FCMM5bN9Q59tFPfMgyUx2Pk8LE6pbQ1\noRwctKTbcPzlRt4MqQN64yFLcC+Muwo6EXywD+p/FJtuIX6tUFynebA2Zt+e\nLZ4mSAIDSVPBOxK0zgsRzgivY05Wngs7ShM+dmp3QG0TzU6fcuPs0fCfYnjM\nu3wuxONZ57wJC9t8ZUFPWGzu2mH5N1R+DRIPU/k3/uvIXQ3p1B7k7sJiXRcr\nndPr+jaVNxnZ/gisYgxuTFJd7s1RdJ/WONqBO3RmrdRkdFl/BGVFGpo8M4wc\nKQPyGgDj6V605Xj7dmjEWrBTmuA8ALsqD290s4NsIBmLnWvE9Ft1AHZorCzn\n4Vc7Q9vf3RHCPSjF1FzzynsWozS17ji+d0N9s4uXrpc6oOXpQg7rNPBGkG87\n1ComCm7YMhWWPiJ9m0sQy9R6Grq0HguaHRdslQSUAFxusOnVr6pR08AUPpc4\nWnC1CFQXTJ8wGr5+DpCpEOrYpV00KL1PR0jf7jMVVa4W8pVXACf3LbR8dFRF\nOuRi4I+uwY64UrFmkuti51CPHAzzakquCG1ZKiu/s+LUObPuX8mAz3eai+T+\n7iOm\r\n=sKpz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4198a78e252fc910ebb5f19fb1ce8b32e83dfc14","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.2-renovate-major-socket-io-packages-4198a78e252fc910ebb5f19fb1ce8b32e83dfc14_1607333041712_0.9455877490013207","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.2-renovate-major-socket-io-packages-9b30c1dc625585ad3cb94e4b4362dc011d262046":{"name":"@balena/jellyfish-client-sdk","version":"2.6.2-renovate-major-socket-io-packages-9b30c1dc625585ad3cb94e4b4362dc011d262046","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.2-renovate-major-socket-io-packages-9b30c1dc625585ad3cb94e4b4362dc011d262046","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"596a4b5e3abad0c32357c393cc44b26a1c3ff630","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.2-renovate-major-socket-io-packages-9b30c1dc625585ad3cb94e4b4362dc011d262046.tgz","fileCount":18,"integrity":"sha512-8zAJM1lGLpz9PA5m8fv3i12fU60OwHlnv7XBct11ocB2KZh4S38CtGTR2MmTJVMDwGAw6alTSM1viLeiyeRJcA==","signatures":[{"sig":"MEUCIQDVW2Gmrd52Tlrkyu2WrbPnz9BlJMp5EnnCZaP8M5ITZwIgYC0mrigSVZpo/d8Twj6cHAAUSLWUpWBREL4qj/CshRo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzgmuCRA9TVsSAnZWagAAWx8P/2fYEDV0TAA9Ck+OLJzG\ntDQxucjSqxqeOCGJqoLRfcShiHdnEDqykBbeO5h1uMe4NsvydrIdJQ8iiO1Q\nFIlQ9DCCnqzfRr9lRhSYi/5TVX1RVpmGQ5UR2F44VdOno0CA4TrFmRwG30JV\nKVQ6kXGEaL1up8Mr1lLtkMdXItGQgYcylNEaXSEUprhbTOQDzhCnKANxiAWO\np3iRKCZQ5PcLK8Ucq+KVQAXAUnorUZxptWmN6q/YhWKJhbDgTNIzYkSo0xfU\nbBQ/TPkGTyDUy+VxJHZxYQC4D5jp3pyunikTK8WHbC/0zGZJS0DatitywPY2\niN47wlBvM/CESwUHFJmfvHhri/WwIOu+XIlqXLvvRrwFtuulO7+mBSHSXJMk\nzUJ4hX7D4zVcj0NgbzKvehpd+YEVZ/RbB60FV3TaGHSKSmTtGboI+PAlx0vf\nnlTNfJe82t1i9COSaPjWxlYm3v/iwA23NGvHuOCOUMvDLpqI21dqdhkbPaCq\nXI+goy85Tw4dwhZBhMrx/MPKNYawjPRr/bgoXaN9Nf5DQ8zGfPOYvePWpJ6M\n1YZ2K8Q2O5E0B3vOxhyGhy3oo0jc1BpLPHpF704j1aQh3jFigCXDFmAcCsnK\n4rRdOitZYRxPjRPcWZKXy7vQrqbPDftGiu2Py/QfJMa1mV+ucDGRkWG/Flgz\nVjZv\r\n=bPuY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9b30c1dc625585ad3cb94e4b4362dc011d262046","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.2-renovate-major-socket-io-packages-9b30c1dc625585ad3cb94e4b4362dc011d262046_1607338413809_0.9560669453018835","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.2":{"name":"@balena/jellyfish-client-sdk","version":"2.6.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7ef0e98ed42f0a4c7f3e86e7a52e14e8b6e7a7f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.2.tgz","fileCount":18,"integrity":"sha512-vsJ26Bjpz0CnS8KOBk5FzVwuMocybqZn6nfORWEF+grZDv+emD3SQfbsnsF8gYJc7FqHkaHO4+SAxD5Imbsezw==","signatures":[{"sig":"MEUCIQC6oPBOAr997SGqfuA13YPRdGLKqABSmkDcMJosMWBUXgIgVubVxoJNNMIDlH2CN+BSpKwMxJoHJ+2/s43VCCVABiY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzluKCRA9TVsSAnZWagAAfEoP/1ESmdWvIcYJM6nkaOB3\njGoO3iQawpg9R+owhUvv1fzgs/6DMfZ+ow8MeKMJyUboDfhRVAz5EMouW269\nQ3LIEBy54m5MNcPJBcfX26VAiHONW5E5gzTKZe/zblsxbYRKv4LJp2Ny3zDV\nHTrHXp8njDTIOwxr6jE3lBAikFMfTM16bQSNHTe+jxZSqhxD1rit8aDF2PN8\n1DRpu3PfnRp8zsYLylSc3g4SkIaNRpvLMdKHAous2an4W4fWf3omd0MfD8Oc\nIBFUfV4AOT1rWMOMmwtwr4Tre3thfYNdO1l2FKaOAfFoW6Q/swWhFfV2ESdC\nX3CTlCpvywqKWhbyBP91xBE+Axo3S1dEpurfEdpfnP24DrXlhZCWrijW7Pn5\n7IUktOTTjlOrenUX2HIG7eSr/7aAjE8BFZ5/vywqUqkhEFfdWq54/AdGYar0\n3VHsVYGE1XzNHFsyXJRghQ3aHfYuYh/eAMz8/3Rqi/hO/xW/no/UULNXsyiV\nu6td7j5d05UdqfKHP+nvnKaMwQGYU4801dJqOZq+pOsI05dsvoWFSkFr6epb\no7YfkKXWudp7lBoCjYnVo4sVZnr5/1j1F270flDemdG1QzYZ1HBDqcvef4Mf\nHxKOmwS0ShB2E1y8FUfzPw/jk/hC+T4qQd1QPR2wR1MndLoQ6uR58k6mIhWH\n0xKT\r\n=9xgM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"93b7e6dcdd2920bb8bded92f17481e92d4201457","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.1","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.2_1607359369742_0.2512585129740077","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.3-renovate-non-major-b1e204e25e4bd4e4dffeadb95f5ba4e752c7c369":{"name":"@balena/jellyfish-client-sdk","version":"2.6.3-renovate-non-major-b1e204e25e4bd4e4dffeadb95f5ba4e752c7c369","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.3-renovate-non-major-b1e204e25e4bd4e4dffeadb95f5ba4e752c7c369","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8824ea826f2329f5e02b8e52725f499e44caec2f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.3-renovate-non-major-b1e204e25e4bd4e4dffeadb95f5ba4e752c7c369.tgz","fileCount":18,"integrity":"sha512-jThS8eMuMFwxoTu+1PO7Z5lCwfIsPFtFcYjdn852GNNRVm8T9y3PBTXXrwMuMeZKcQmKO+GoTsibyTk4yP8THQ==","signatures":[{"sig":"MEUCIQCJtRjdDwqBQxamHB78M8htlcD4k7bU/2X13mBUuNLpVQIgHpkVa44KrRA+z/YDD+JbkkRt51aNlcPX/ZMG6HQBBrI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz/q3CRA9TVsSAnZWagAABCMP/j8yqKo2W9EdqRxILy3n\n3pk5UeKdy8HdU9eq+bbA0xzSV5Bs4+ow6pASCy2mmjJvkPgBQdnVRoshjr6r\nckmVavfNVROAKs3j4hwsYxmrlvXlK8CSweMGJ3aFYo3A8ZK7nMf5bsDL0/7q\n1z8VsITP0fzkw6bwWwKAJ1GX0wU7wI6AA5H+njNFFMt8BzQyJRGkheLgJNWW\ndhDjOzNYFGMCLmhRl6jcfKrkJnlOY7Z9DxKqV/FwQuj26D6zjhy6XhquBq0N\ntsfGEC+5kLoJf4TWUoKMOp9SDTDiLCPSfXpSwrcqrkqfGdigKpEvbofjF5Np\nXpCYYosEqMU5g87s9dOf/dca1rq6qU3r/WAGOwMpRprSjbYgsuxo/IaUPPCF\nycN4XSksd9T3H1g5/07MU2Q5VDVITo1olD4W/1tls3hMt7q5svdZm9bnxFjw\ngVgzmA6YyERP+M3lp3JzRxs+h7Igdlmd7WbB5/WvNtn6t400YBOY23QZAa4j\n71whYCMp5D6DRYO1bJSfRLPGOOTR+G6TlSABvDCpgL0kHtXhp7UEhzkLa9Ms\nQTCheiBuMAM3ew8zMZh+xrNXuCWYB7QimWbcOFgVhqpkVPdt4Bj4H+gjynRV\no2Fp/R5v2Z7dALfgGnAbV+Yhlk7vU/TwHermZjt3xLPXER3HeFq6PVscgSLh\nL64u\r\n=B8kf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b1e204e25e4bd4e4dffeadb95f5ba4e752c7c369","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.3-renovate-non-major-b1e204e25e4bd4e4dffeadb95f5ba4e752c7c369_1607465654819_0.16312921815092274","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.3":{"name":"@balena/jellyfish-client-sdk","version":"2.6.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.3","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ab2533729b41dd9b2f335befbf584910b2340c6f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.3.tgz","fileCount":18,"integrity":"sha512-XWuP3M6l0LoqBjDutfnLj0yGnUSd0OWxoF3feZSWX20nXImp6c75HzpbfYoMlvvFENglbhAdzOoIqXxlCsDkPQ==","signatures":[{"sig":"MEUCIQDIYnIwudlo7jBZbe2jfDag3wHmvKXHmowH0GVORtkaFAIgCpRq9fJoaXVeaC7NSZQSzLZ6icPLN0O9ptrGA0hk690=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz/thCRA9TVsSAnZWagAAFFkP+gN0LiD+ODvferMMCJMv\nsPbOzacSgC0BY8YrsS04V5WbRLTWn/xIgRr0/yPIiY6Zp7kU2YDrOlZBDJ0B\nMmpSJRRKqGFwYE3MgstowuGuKRmlfJsUvfzXq8tVhqC12uJwowVVZ0G0z37a\nsw5Gf2Uf2Pj5nVaEM4HJOyVEdlGngWIKyGNg5Np3GWQnZxO1iErc24eli9i7\nLZLRni5JR44KeFxYKHkqe9ilw1ranJWpuT9BUoXoiAV9PddyAno3QSi495I4\nCEwIonOJ2YBpN3QNHYj+++ut+S4P19AK9hn9NOV7vjmWIUHbWKkDix9dfyTu\n4+Sme+eMRDejtwmdGe2JECE/9OoaBmgwZLb8Kd5cZxwMP2noamXPn26qLUzj\nqiT/Xtf9jFkecPMWmqDJos8F1zMO5UE+GK37qlfCJJXFjRYM59y/ZDEjnFTt\nxos74HSRHbsBn7UC/AJlqu+O1oKOc96LpGGBrC1yb513wiGkSEolK1X4bXDx\nOr7WCx6S0Rn2zm/V07QWHTwWxKzMwZrxfBJ/f3qdGxW0bQnEWtxevMtFSaiH\nIDS4WLWbWk/o0Eo0RXpjuNxDuA7xkkzY7c4bOLXHeRumdvdDLS5Qk6cKykUe\nOvHy2f9oaxG+oM17CrLRFRPtEgw/BPESrA3raKe8UNrccbOiKauutZdYkp04\nPaiC\r\n=oqSp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"fb63f95190f5b8b4f2efaf80c658f0d129918b80","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.3_1607465824741_0.8808008881020655","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.4-renovate-major-socket-io-packages-62b66da0b5b755324f5c7c9812d82fdd204dd913":{"name":"@balena/jellyfish-client-sdk","version":"2.6.4-renovate-major-socket-io-packages-62b66da0b5b755324f5c7c9812d82fdd204dd913","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.4-renovate-major-socket-io-packages-62b66da0b5b755324f5c7c9812d82fdd204dd913","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1c65c10b9749d319b837f262e555dfabf1fc98ec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.4-renovate-major-socket-io-packages-62b66da0b5b755324f5c7c9812d82fdd204dd913.tgz","fileCount":18,"integrity":"sha512-foj+fBqws3ZUMQAeQFSbJcmka9zMshER2xEnh6Ke8ufLbgefRjQ1+9BJzkLXZFzVKNccc71YFNPBXwiuBnuILw==","signatures":[{"sig":"MEUCIFRBNO3LnjguBltYO+Y9byd6O2YqlVP8ygHGZCGTl7n4AiEA8XLUKk4Ngee7fs+3XaMe+4DYgncdIg2O4s2WtS/ZtzE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz/wnCRA9TVsSAnZWagAAiI8QAJcBj8adD7BAZdnCCKS0\n7PLfx/8cLYZ/VJQwMO8caSr0U6m+gjgfNly82mciY3lhIg5aShd0obj913xk\nQTMAO5wi/e8umbAmZ5kVKgMEMeeGlNgfE7NYCrhnLytMySAslwxA8Xd8ws7n\nuS5OHPJhwwVJr6jUcnER//6UJPE5Q8+Avr5IQ3Sjz7lBjK3P4+7gaN6qmiNR\njKfZeDTa3jsAyaO7bsKX695uaYMb2zBqmxT4EfqHCISpmNqGSz2AA/SWqXx4\nP46jSzTdVpgo9Q2c07d7RMGmw8JTJpBXOPJjhbFomxqS7MEi9ZLk4o7F0iaE\n5rSXUy7mA7Wx2RgzrFwnmp7E4G1eMZQR/0HmthXXD1juZUQdNg9Wn97toCkS\nb7h08hs2Yz3Dx0w3yE53WNHZCdhcYGMVVwFAa6V3bj2ZeirpMqUoinIem3th\nWjGyf93/+yF74siMp7dvmPPqmi2iSIHWAzeNiFmoBzz/79LQ3I9YGlQfIJvD\nY1DVmkvAL6e/gjIt9kwOKAup1KFZykdiHnRaxsZn8t1/x/Z9knkfdKCjLHbr\n3ffeb3iv9JlO8Cb1Gum1TRy6blPG+eZlyJZUXzMK8sYYMqcwkD1blh2+/phN\n34UOffXqERyyO/Yuj2Z9opfLs07jYaOLv58i7+XUE18vRLZOb6+TMfqWT3K0\nr5Zm\r\n=UtBw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"62b66da0b5b755324f5c7c9812d82fdd204dd913","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.4-renovate-major-socket-io-packages-62b66da0b5b755324f5c7c9812d82fdd204dd913_1607466023454_0.10265242330855617","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.4-eslintrc-root-true-4842d9d76495004d71b56d58cbce72f5677dd870":{"name":"@balena/jellyfish-client-sdk","version":"2.6.4-eslintrc-root-true-4842d9d76495004d71b56d58cbce72f5677dd870","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.4-eslintrc-root-true-4842d9d76495004d71b56d58cbce72f5677dd870","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a6c80987df2b535d63a6b27c94f3994e62098afa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.4-eslintrc-root-true-4842d9d76495004d71b56d58cbce72f5677dd870.tgz","fileCount":18,"integrity":"sha512-xsnA+ZZTCDplhwPgR9Pw1YTZJ4Je7suD2CDcx1LEbYu2Qt2eFqHTDCYf0D6lY7rjlM89XrcxPHOqMKbIxJHYuw==","signatures":[{"sig":"MEYCIQDAMdBKoeQSuqlJLJherXfFI8q7fFkTk4dzg7XtzCW+IAIhAMiOEP/hHMt03xdCpg2xRn7vBcjPc2i1tVGdIfjrhHAk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0zYICRA9TVsSAnZWagAAVgYQAI/LgijM55GdDAVmPoZ1\nLXOmAB7p4PaPI7izMFyEeE7h7Fb/l1WV58d+4B095bF3E+Y2Vdq+eJdfmIu3\nysJxTkHnga1wzUnC97Hps1WAn1kZ6OryGn4HdoXprFAKejZmPHdxa95KtwRu\nPG9gbJ9eVnPQCiUK2z1UwjHaDn2mzqvMzCq6HmlbL1/cK6pQSqpTl7g5d2dC\nXosLR8hf9FvhsCqzC15MEWVWzLSYeOVhKVkXKNGfiak2kM9r2TTBNeliE4kE\ntnBzZcrsqP7bo6UNAtFYcOZ6eh189DPh8itZz8wnjIXmHlT+afxi5eIIv5Db\nj/MY3i+ZVfspUkUliawbvBwydRcoKdilfDjtzTboyA9c3ErDDgmhIUel6Gs6\neU+TLWulqFoLl5Q6Ic1aDqOWm4tqcvt9fBOBeMTSBBfuzzA0FPaah3wLvVLV\nXTDLbD5efqXf4RcTKdy/NAImCyjM9uF6lF5mFCXsNx8ndaZ8UiQHL//rtcBh\ns2wyLXbQf/ht3ShZqjU1DshjDp+Ci4pgn2Mcq/KtumxbVCN927Q78v+BXR9u\nA2KoK1r+4A5/GJqqfhjHpDiHROXNH4FB6sUP1KmbOpF82uFj7KbdZy+/IMkA\nfnhxmAnWA8rSBU+V27h11SGEhL64q5ub4RhrxgiDwqCw85+Yoy6WlzTuzjnD\n3DHH\r\n=u4im\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4842d9d76495004d71b56d58cbce72f5677dd870","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.4-eslintrc-root-true-4842d9d76495004d71b56d58cbce72f5677dd870_1607677448220_0.29210148224214905","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.4":{"name":"@balena/jellyfish-client-sdk","version":"2.6.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.4","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4baf715d780dd59ba9126ff95e8ca29d34541bd5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.4.tgz","fileCount":18,"integrity":"sha512-BNx7/iyRRJLWaIy7OW0NG5yUoae64n82QU+7wb7YG1qiCFPW01raBcyxqqFWRzvTqIQLSf4sLqLWKkOAceS87Q==","signatures":[{"sig":"MEYCIQCaeE4bpET+kQBO+OYVb0WkMZENyYnsLk0t0ffJsi/NggIhAOaMIifDh6FWWY0RETd3mZT7ivo1qneJ9PGOynVapsKC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0zbdCRA9TVsSAnZWagAAB70P/RxgjDkeAq+a/4Lsllc8\n+fyxPsFfbDQnprzWKFSwLYB6kiAqOXb65919A2If6ueEEJmPg5eZzCwjorKh\nxlnDrjJJ1aCRyNv/PRlneNgyTeF+ehbujnI/m97SxYp4SU4akIFzywdDT8cz\nsX4x6ytFT52eVoXqS7fDp4jPO00T9JCPEGNkataEVjhbWp0MvW38Sh7XoR2p\nRp9/l38AkTz6TYAE66jyZEW+i8+FRcd4yjC9i26GPTjvu3BSMGQdjHx1h9mi\nMRf6I2rWgvgXVNiYT99pzBeEivCZ4dwOb6aBnNOJ7f6WrSM7VBTuR/C7LBLS\nVDfoMou4CdR4EYadPdeX2l5EgK+F+Qsw3zvYTDYShgxCNoCkCD+zohlXXwlp\ny3Oz3RCDPpFuPU14U1nKkjGzAiV1fycHTOpIZXOc280HVXUz1vY65A9twMsC\nrpPvuYmuJ7qe/a04YHuDC7CORkDGicAWEO9gmumKvCsklnrebtHMRvfJatE4\n8tryIQeWWcj+3SOf+eHiFUDQG/+NMTolOge8qOTzHI2gYYnQCijRMLodDsry\neOjLNh6CGdoC4NtFXNG1ylcqwF31Sx4s6WzYIOOlP7a7CUqxyagjL2mfh3gd\ncSFFkMDGoavY8xah3RydOZdhrMDb4tIdbPNCSenpdh2T11GbpCZfss+/BGgF\npEdc\r\n=gq5j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"2a4a1d016031e8cc0d4de02fc3c4516bda30c1e4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.4_1607677661503_0.23297668576935915","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.5-renovate-major-socket-io-packages-4fc3ee0b29bdbd40cd71839fc3f90f71fd1061b1":{"name":"@balena/jellyfish-client-sdk","version":"2.6.5-renovate-major-socket-io-packages-4fc3ee0b29bdbd40cd71839fc3f90f71fd1061b1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.5-renovate-major-socket-io-packages-4fc3ee0b29bdbd40cd71839fc3f90f71fd1061b1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3ae650a4a996a2149cdae4eb9a832c597e77692c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.5-renovate-major-socket-io-packages-4fc3ee0b29bdbd40cd71839fc3f90f71fd1061b1.tgz","fileCount":18,"integrity":"sha512-2COPVcAq/NViJO4/rkkz8DVRse4em1j1PHjvYHPGyi2jX0WuA7oxnzqhR4+Dq6Vdgmp2D1NX/4SlKbzwhHvX9A==","signatures":[{"sig":"MEQCIGpdCmbXCoM1JGg0ffsGFkR3qAJncQ3v88Jpigr4KwqDAiAz+SOrZZYGGTdypJozCt0r3ImTzQ9odMP6UroUq1ZxDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0ziBCRA9TVsSAnZWagAA94IQAJXKN+1GhSAoALMTQYuM\nJIV0HMw1o/huhkW5CVhgbQpuXEzlp5Toq53ya0g0FxFYVuj/o2fKCMGCask4\nAgD0Tlbx0fKqI7wqz1WisYEzp3A1QHynj0cq37efs1K+XIp+NcWfCj9wGMyA\ntJPDGXlWN9SLdGeMnYiY6CmNw6tKRoykSMry/zlK/zfLwhxd0qbur63NXH1b\n0J9I5EMQUO8iGTteJkSLiJFfB7caNRBk3I5DyV1brKvmx2qZw3P/jcr9KJz/\n92K7KEgAPd0+n9YiWHMTaFm/gi9r4p5Y+qDvGHh9B+oZVQ9h8rTLC7Rf0fjy\nNJjaieiiFKp1J1hee9/R38KODfkKZF3HgjdioZvveHH7w6GYiOwm+xD2wX6h\nyAcjUZMqk2LPrLv+zyXKF9H9NpiYUK/p/6tWA47Xkg/PMmPX1Q8uO+uT41Yf\n9Olz7WOkVPsMJe53HEPv77/OWCrFeS1gFz73Cdjd61VT/YGTyZ0wsJ6OI4gj\nQGQA9OHl5ivB7q+eRLR7xpXXaXhiB4vIuAjYE6hJJvqLMWpOQZjbcJVK4/7c\nFWjYkANLROfFnRJm2YtQZCuj5JvU4MWoiQIKY+nqaK1QcZNYdrs7v9pHouY5\nkyMjFRUJSvimWAlcukcG/pVf5lloLIBXqqyGQHBy2zUlWACGDZEei4Tukoep\nE8vt\r\n=qDmt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4fc3ee0b29bdbd40cd71839fc3f90f71fd1061b1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.5-renovate-major-socket-io-packages-4fc3ee0b29bdbd40cd71839fc3f90f71fd1061b1_1607678081315_0.6756744192743653","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.0-transformer-constraints-fbc637c0d5ce40c2f9127ec5ab7fc50e0b04c2fb":{"name":"@balena/jellyfish-client-sdk","version":"2.7.0-transformer-constraints-fbc637c0d5ce40c2f9127ec5ab7fc50e0b04c2fb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.0-transformer-constraints-fbc637c0d5ce40c2f9127ec5ab7fc50e0b04c2fb","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b97fea79fb254436b8a72c72f561d2946c61bc1a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.0-transformer-constraints-fbc637c0d5ce40c2f9127ec5ab7fc50e0b04c2fb.tgz","fileCount":18,"integrity":"sha512-8TiB1Y4C9LMJCSzgh/zYq35thgtes1Hjv3/T9IlULozFX+b7vNS+Jdll0o0chleZAude0i2i4433GlPQREPCJw==","signatures":[{"sig":"MEUCIDRMEfWFjFjyz1aeuVbjbE6eSa9I27yZeQXZad9Dh2X8AiEAvqkuo7zRbaFM6ilukNP9IiBZQwIqCj2IwsHtCAASUa4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf00bMCRA9TVsSAnZWagAALiwP/AuZBJs5VOkeeDyRKLsL\ntdzwu3UBYMVZkHyySJoVietxjp8ng2ZLjH+zuzL+qufNnf0stjNqjAqkNcUK\n1DII11X2Q0Kw9+FXlj/MaRVRe2ad0QIlx1Hf9/mVzrDXKsiHsIiMputlTgAo\nCD4arY98YdXlSKbX5kmNKDyHb/FXfErzS2preeG1RDSaG17b953CPHaOw5T3\nK9Cw3Vj1hAnT41RELzHS3lU/HhlkUSHkBg5rC6fJ3R7AVZJv6j/FzSi230la\nqj+PdYSlA1zBfWwY0JphTMikz+wrtiH9bxgkkP6HaAAGHdhinJwzdUbRWHXO\n4rV6YQsI0fr0MOCz447BMBgLlvsZxynOuQtWmpQOQfo2u8nOyj0wctcnUSK3\nTL6KuDSILO5fbZ1erUbQ5F2TsdnNaitlZJH1tFZY+/D/ZcD3ZynynXWPfxfB\n9VkGF+LC4IDRMU5DVTSi81Gs2Bocp1e6j2uwhi/mrJyBg15aW38Mts+MLO7j\nHHwzw88JupjEo0rgS3fDzBFgJ2c6mlrLoOihvI0+J88HmadhIi03pPDUpxdE\n0ryIDhjhq8+q98rszTxvX9aZ/H57h/jTTLr/XwSZe9AOg4+C8/ZBmBnxYnKT\n9CDoSCwY6BZU8ZRy+uDNBIGz7iQpjGg5YDvC23ccYOuiTWphgQoMbBayniJp\n0Frs\r\n=4jx2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"fbc637c0d5ce40c2f9127ec5ab7fc50e0b04c2fb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.0-transformer-constraints-fbc637c0d5ce40c2f9127ec5ab7fc50e0b04c2fb_1607681740137_0.9145209224655182","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.5-renovate-non-major-20d42539b326a93460fc4018dac08d6fdcf0d5ad":{"name":"@balena/jellyfish-client-sdk","version":"2.6.5-renovate-non-major-20d42539b326a93460fc4018dac08d6fdcf0d5ad","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.5-renovate-non-major-20d42539b326a93460fc4018dac08d6fdcf0d5ad","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0a4a26d30c3befda25fd84614119399babd00735","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.5-renovate-non-major-20d42539b326a93460fc4018dac08d6fdcf0d5ad.tgz","fileCount":18,"integrity":"sha512-lDZ4YsATSF/bYjMeFC+2eRVUIebqcfdJAmj42KC/NCmGSReYjN1gQ+ikoZ7hHLBzgv0ZIsknq1xq6VG6dnCEyg==","signatures":[{"sig":"MEYCIQC18rYAxozIeybhrd5HyMJaYZsyY39iHhk7kw2IzDBXXwIhAPu32gTDZeC0GKrnrryu8JYd5RPezx93FxCH2V3HKN0x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf00iACRA9TVsSAnZWagAAx14P/2LQYhtWOQ6sDz1jKXoT\nd7SNWjJr7I7AY+ubaOwEmtWvWui0CzvkJz+liKX7Gg8kQuGUviBV6T2pkRcX\nUVhFtN+Mxan0AWGeiQ9cHuL/icwh2ZF8SabB8Uh5wIcfpG7I0+wevKESIyV+\nXODmOnmzViuCzWTNma2j+VnBN/eGsV7Q3/rhYLqvziBi+mPVuapfHKsQwM0H\ntkuAu5G3OIHi4UnW7/qFjlBjBvoVTiLw/fKFHoLke6MffGkdI1JYOGg23UiB\nlx1z7++B5/Je45MjObyGyr+wbXxuAuvXv+AeDWaVX7gAbrj2NaFutEFEJnUi\np4KaOUdk09Te3tRlFOv4KJUND/JZJSXIQQTWDDk0lHkr3hWcWGMu2BMUC3jv\nvtGPhI/j97ja2DcuUL/fK9z9IFRmWTGMK9iBQ1mhZ/QL59W4I5DrXvtqlNqw\njPRzIcymxEe4Hi6Wfl+2E/9lp03bTl8RVbaB3xIZ8h3wZX4PeFSsgcrC8fcH\nXtP9Q8shHCsQpPJVgzifhSGjlGobRWPznkJCYfCigGpbkyGqYFAORG8JaVra\nI9zccHIVgWK17LbYQnafVqp8sAe/tr/656O3Z7O5kQr30PnZftvFCdl0GC7F\nMTAMVZ+P3DKcJ+lTn2L8o/0nE/HZoP83iyE6/3OO7MykctoSgJtKcjl9sUKp\ndW/I\r\n=pp64\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=v14.15.1"},"gitHead":"20d42539b326a93460fc4018dac08d6fdcf0d5ad","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.5-renovate-non-major-20d42539b326a93460fc4018dac08d6fdcf0d5ad_1607682175630_0.5928206035319608","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.6.5-renovate-non-major-25a8e06be9d2351b58e15f9a2cfa54145ae7b0b4":{"name":"@balena/jellyfish-client-sdk","version":"2.6.5-renovate-non-major-25a8e06be9d2351b58e15f9a2cfa54145ae7b0b4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.6.5-renovate-non-major-25a8e06be9d2351b58e15f9a2cfa54145ae7b0b4","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8642a7dee32c8159d67ac23cdf5251d955b0ea19","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.6.5-renovate-non-major-25a8e06be9d2351b58e15f9a2cfa54145ae7b0b4.tgz","fileCount":18,"integrity":"sha512-zRmtR1R+eImzLy8szf3wLGwdqfH4adl9L+mSG4tQJ8VUiPmi7AWuyiC3H4JGW7RMGQqGCFEycgaYk9DERVjCEg==","signatures":[{"sig":"MEYCIQC93kJTaoBR/uzatLf65PZP+GFY2h9mOASnWK0BCPZX+AIhAMV/qeFTI4q14XJZPZTEYu0rHSO42IE2cstXwgl6eR8N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf02m+CRA9TVsSAnZWagAA+AAP/29wRdqsTpSezAU6+D3H\nOSaYXYM1NW2GJBadYKSPe1+MfPrG8TCVJQKdku2OgA/EFDLo8vsa8234/7xw\nbQ7v+ffIKk5eps9i7t4IalqverwKakambkbbW7UU48rUI+BZY/GSgJUviYNj\n/OoRm0ewnnD7/z7h51tEqTT8QgJ5TeiO4JU00gRZgdUWFUbTy9AhFbNja7LM\nkEYq1V60kKMEGMgWKZmo7uIEv1gfY5Lnu3aP9+7i3Ekz0+JBdvRo5WeAk475\np/a824yeBfJLndbR5tztHXWwNYoZt2sWK4kRFKtlvxc4rOpkmRwocZlCQSq8\nZw9VvhkvT1cL7C/CVt2vrlUatrN0V1/9+n8RYAVhDQWeFXA2MJ8eDTjfqbYH\n3A+EAZhFY6rSjizuCzozPNPbe4W8JPhrDt5Ol69WuXVijX3O6QIFSYGlXez7\n8IEtBym16ah0JNGgxGSSvUT0B+Sxs0TdFcDCZcFtNL/8I4a4JkVPJuh3BO6D\nek0EV2WbS+KFkM2AF0pYlSbkjKmbEFErp1asZCi8j+YtMCvK7EFo7svgoQaC\ntl1SDfBJxylAfamKewehjffDllqszihmAmI99nGGF1ljcDGaWrvCRet94pIi\nwAIyV3s7wMEPZ71BTl1QzFkgipG16rQ+vMoPe5ZDAKf+kyY7zq6bSmKE+AQC\n141j\r\n=zNB1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=v14.15.1"},"gitHead":"25a8e06be9d2351b58e15f9a2cfa54145ae7b0b4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.6.5-renovate-non-major-25a8e06be9d2351b58e15f9a2cfa54145ae7b0b4_1607690686078_0.5912521235336332","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.0":{"name":"@balena/jellyfish-client-sdk","version":"2.7.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5f1d5aa39cb7484ae87fb395918c2f9b76166015","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.0.tgz","fileCount":18,"integrity":"sha512-+XyoSJpmCTSE2jTQaJ5oST3+U/+Os4uTkQJQwjXnFDKodQEH3PH1KCN0FdsLfyrC89EuGwLgrzUmKSYKoOobKw==","signatures":[{"sig":"MEQCIBY77UDP5TbbH8F/9v7BmU7y/E18qZLr1ZcgSITn7A/IAiBJm2UD79FteigArspwxVSCSJZcXBkK5SKW9fpk9dVfFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf04tRCRA9TVsSAnZWagAA0FgP/2hXdNigwd5j6zhKoP0P\nk628nJIISbGc6jcbEXGiXECPrj/BSwwB2fu2Iqiqwd6W01sKMnE8iarPF4eb\n3TqEtUOzcKyMZrVgiIsOeBL/h1+4VlDJMuEhJxkUA9nfVJo8DvlAx8BvgXZ4\nZSb3RhqSjNtp/aeXI9xnwxJjXojePLkMv7LZodrm6sA2mwFaWOlakIWKFUhk\n1N/b0z6doZeY6CktNc0eaYTOZjVS+9QHj7KucTgERbt1p5diNzU6iPyUfdZj\nQbMQ/Hm3akamqrCYxKFiGjZW0GI4G3efkhVeu98nqAR1mNgxRxmxJ/Ii97AW\nK9VmOMHawvuitW2LVzz7QfuOCYGieXaxFuG43lunfVfsTTpluBjI0i8xRfT+\nU/3qBxzAowmX+wrYhLQdMbBVBwB34YNVxJSLnb+Bt2jD7D53srnVNxLK01Fz\nOmZ+/IXyz/NSxuhbAMUn9vInYuWhZE0S8boV4yNOSsmkZxT+HIF8c9LDshlP\niQNgT9qLvxfWGJVjobh/ldgOoF22BO94nfT43ZBkOkmotyyKuc3du4McMyC5\nNNhU9s8Nd2yn5ywLr9E5BzsBf++n+1C/JtGidZ6xVEq5JZqX+dIpWsLrHb/z\nKtTggcrEg19w3/HLZeGklQ1vbYWqALHgMrTL1mfRpjqElOdN1zjnfyCkfZm5\ngXxp\r\n=oVmP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"18734cb07676f121834b6f014731cb58adc17520","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.0_1607699281484_0.5730734108882116","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.1-renovate-major-socket-io-packages-0c7fc886d02522f9a08565526bb88a945747a52f":{"name":"@balena/jellyfish-client-sdk","version":"2.7.1-renovate-major-socket-io-packages-0c7fc886d02522f9a08565526bb88a945747a52f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.1-renovate-major-socket-io-packages-0c7fc886d02522f9a08565526bb88a945747a52f","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"06f6e5fe41a0260877c6ea546fbc041aba61d597","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.1-renovate-major-socket-io-packages-0c7fc886d02522f9a08565526bb88a945747a52f.tgz","fileCount":18,"integrity":"sha512-CI7Qw5pEru/DXaq+L1zfvIfQIqMXBGHOPorKyVtnd/4PWng8wO3bOoIxZBgIROwoYh6ZB30PtTVyLr6ZstHEdw==","signatures":[{"sig":"MEUCIQCbkKMii9WDEK/2Ve205Kn0HUMEGpHQybv8wME/tlnJSAIgZ6qmVwn8LzCuu+45n++d+XMCuNSEhE2wq5SZIB2kjCs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf04zzCRA9TVsSAnZWagAAa3gP/3rL1Ew4qMD8cmkSNCt5\n4wew/BMl05Fl7mTHR39YchVHvEHqyTEQ82+WSriei32FFdhTMO34E/1ZudmJ\n/an0zNPmBghMfkuAps+qTA+1HxBLpcJLdSRHyw3On5yf3uoS1SdUnaW0u1Kz\nDKBuUWWuTt8sWpwr29hIOFfRejukI+lqwHayc7y/GU124StR3avQlo+YtNFc\nAogV22/rffpui+Rs3Hk3UPvCC3t3LbrCgIWa4EYm+cznjWtkz6j7LX/7DLem\n2V4+SZoJFJOWeKUrCiY0BtNMLB57QMHSgUxLe/B3A+tB9TtMZYfXTzPx+BuA\n+PpY+GiRdBKl7qVX8TrsKHJOT44PnumwqdIUSDVTCnhxjXDD3fyIzFX91qrc\npJbHZZBBjpeqQ1WEoJwCa3itDkJy5G+u+CKmxu4UD57CJEpEP6I4wZmniwB0\nygtRh1co+Y/IGiCSzzxASgq64i1y3ypJzRmoMrMvBEqXfXAKrn14s3UcZZbD\nZUI4hOBE6hm76jgaTdY7wNg44Z0KUF4JtCdTcrFZfs+VLX5kYRb4j5l1Dunj\nlSUuO2E73a7EEtjIV+h7HLp1ySwCtKBnhcq6gIXHcLtJiant2ALZcF1uEfE6\nju4aieQlZMFMip3mozODmdkN+8EFpn82L3ky2MaBLrWfbEefib+IVhd3TQnD\nrnuM\r\n=Lzni\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"0c7fc886d02522f9a08565526bb88a945747a52f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.1-renovate-major-socket-io-packages-0c7fc886d02522f9a08565526bb88a945747a52f_1607699698760_0.23464557923155538","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.1-renovate-non-major-8710c95502206d22e45e70a7fb1b84ee379d4ed0":{"name":"@balena/jellyfish-client-sdk","version":"2.7.1-renovate-non-major-8710c95502206d22e45e70a7fb1b84ee379d4ed0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.1-renovate-non-major-8710c95502206d22e45e70a7fb1b84ee379d4ed0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d87b085b7124f6fd7cae774b1fb1f08b3ffc609a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.1-renovate-non-major-8710c95502206d22e45e70a7fb1b84ee379d4ed0.tgz","fileCount":18,"integrity":"sha512-QC9apDbMLo6IoC5WZPSvFkdcJlosUrquRnNGv443EBGuP3Z0Xu9HF3YdrIu0fAAZ4Jn0p492bfFytjfmcc4GFg==","signatures":[{"sig":"MEQCIHqm62n9c69eb8rDQIrHoLMqfqPzV7Z1fKpZCcn0bK7OAiAnKgLISd5dPh49riZm4yOvZl/fgIhy6hvK31O426XzGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf040TCRA9TVsSAnZWagAAuJYP/1w5LUcqqKsgxzFg1FLt\nss/72UaOQzRg0z9bSzxLeLGMAWKTMfQ9LR/p5VYnzAJOwWO2nMAGizyNdlRE\nGJ9NgQ739zhDHG3aaiP3AeYAA1X4d7aN6V98ugFtNdl2s8vMxWiQq9cVUaa3\nyI6IApOICKX4skPmYbs48r25f2Z7w3j0nIDc0Ms5dY2JuVrnXAClLGhCFhxz\narA8tQe9r9ALh+3FjCAFZxnG9Cy/NKSyfg9RNg7opK5eRGhwftlKaeiMtrN1\nyL2meaY0zFuP4vJlcD3yEgc9aCpF5oeZIVWIidmUPjjtAOMGW9POqmrsTtFj\neaLkIPmFpzphPIcaTrvM6aCyuVktTFtyLyY1Q5C4JfMM1Q7liEEqNH1tzzml\nwx/n69SJd4bZUgXnF1y2mD2uUuBpfvYnvqlHhQvrb4xtRTKF3nyDZZebYv89\nscTzJnd2JWq6dQ4clVuDkkDFERHLm0mr9NzEE6gdddO+QHPdX/zkNSBIA0LD\nsfKSnI5iQVEXvEYnHwz8bINfGGMOynhmI6FcH/9y4xIeZBF/oDLALWWoPTN3\nlc+05NOWupiO937UCtJyfgOWWfF32r+WkHFKTWhWI202gppuOY2Ah6wSVEyw\nHETFEMIlkp7cTRlD15viGp1c8nAf3C23Fy+eENJhX+wtD154Jo7k5J/T2ptP\nFKOj\r\n=GK7V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=v14.15.1"},"gitHead":"8710c95502206d22e45e70a7fb1b84ee379d4ed0","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.1-renovate-non-major-8710c95502206d22e45e70a7fb1b84ee379d4ed0_1607699730644_0.3855765974700567","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.1-renovate-ignore-node-aadeb7e8b358614d08aa345db7a79b13cf30e780":{"name":"@balena/jellyfish-client-sdk","version":"2.7.1-renovate-ignore-node-aadeb7e8b358614d08aa345db7a79b13cf30e780","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.1-renovate-ignore-node-aadeb7e8b358614d08aa345db7a79b13cf30e780","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"339dea93ee287ab3f03d726503fb221bc2c374ad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.1-renovate-ignore-node-aadeb7e8b358614d08aa345db7a79b13cf30e780.tgz","fileCount":18,"integrity":"sha512-XFsjK/76BI/SM+vHQzF9zYgoWRQ8x5tZhZ/ypmKE9IZ7l6eVnBFE7bQwfS1sNml07t/m8GOD6tc6xTbXPl68oA==","signatures":[{"sig":"MEYCIQCl+dG0QGaLDRgLo8vUG/XItFIbCazo6PRizOmeUcyLqwIhAOn2G+oh8Yi/xvcO/z+R0WIvZi1hRrfR0tw7yIVD8JrB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1JBvCRA9TVsSAnZWagAAKzsP/R0KmHjcusV9ChQ6+Rfj\ntTgsAnh5sk8qXU/3cIlscJ0UNAUdOaznACiKP/6zFhqkPaJscofrPXnCDwK1\nJpT6yrNCqgXsQTAAwfmbznm7NlF6qKOV5LiNO9J0iLjk3Ewq1th54vZMFc9l\nw/5qZYuI+WgxlpzKVPQucF6xCTYY3rv9Z9NC54Cgimnm/K3AXzqKnumlB4bn\nvOqzdi8OlZQ8OHQ4I86Ppgv3FGXiVMj3Q5w7PnjnkatG28IdeQ6A3o0EVptw\n6ehKngn/L0rfblDQ4nlmJPxtyG4r2hqojon36d9SvAY+QAtEr61KEMry2B0h\nTDDEuZqedaFcFc5/6pMfFZdOVOpEB84Hov+5LDl3+qRdxQ8rHufUa1eN6HhD\nlTLhq5siRhVls271uL6B5DefkbwZG/PZU5M3vXz8GGs8Be8HUFAC/yexFKbk\nUtPc0XAZ+CtJcjhB4/YyFqm+FghzRWBx1oR+Ci8SviDGhwrMFom2TaHji5i+\nMzaJILqyUhMCaoC7UWmvyQdjRPnSkjSrlJZ2gIfjCl0Y4xLMRAagt/CXRQ8b\nktBaAx61vhSFV0X139twu2EQONNrOYYKudr2ALYtgHElVUuBVL7zUFFYWllL\ndYGNtgS1WgyP/wpxtsOvNoTdI9jCNEaAHita0KGEhhmevn9brfYsTjrUmf/O\n9qNA\r\n=xR/D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"aadeb7e8b358614d08aa345db7a79b13cf30e780","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.1-renovate-ignore-node-aadeb7e8b358614d08aa345db7a79b13cf30e780_1607766127500_0.15623805199802243","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.1":{"name":"@balena/jellyfish-client-sdk","version":"2.7.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aa588ad06421612755cdb347658be1b44b0d58d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.1.tgz","fileCount":18,"integrity":"sha512-io2AeF8uD8zC3LzJ2I3nh40f/BizafChd5wumKGaxeACyxM+2x6dosSJkyNLmhbC7pvp1IYQ3UUHgRNl25a2CA==","signatures":[{"sig":"MEUCIQDIzP0npjPUcVyVkh0GFcsKj6oS8Mt+nKo51BQMalsrXAIgOeo78BL7+lTX0TuSBo27QNBOQqy1AlDWbyVvbeQv1l8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1JE2CRA9TVsSAnZWagAAsOcP/iI41GWps25ZbbEwgAm3\nmSCQUnpRaIf1ULfxsZ9hUw4V2hgNySUXL5is5/1BgXgVS7mLlGFubzzmzvqw\nMmIXAaNHuY6Wf4voTU3Ueuz7fXTvLn8+sb3jZbkYMrNVfAr95hCa29feR+PA\n4DXRzRqgkz32vPSl3S3bwH+BJqMNMg7ob19HQy4GbiarXQM1yJ9PWZDzqfVN\nSLZLbJm6yBx1UhK7oiQs3cY8INpajfpzEsor8HYxggdNE7ZMaGtxqPfSGq89\nTu5yXUUrW5/Amb2UmBavZ0umtCN5igyGknkhngdN9i9l0ghi31uDY4VDuSvz\n9do13zvaL0XBp+OfEVDopATY8qCwbvfs3awihBZTffmqbDYE9az5W4pDJRCY\novrLVv3zCqosTWaDkjhNUrEfZBVPzo5n5MvxSI/8Kk+VZ7JC0lT9CIGph2V6\nqvdEYeTkARMvQDWvQ5grtf3xiKo+uq62WVgZHOdW3DTVDzE/mH8Udov+oJro\nDcqM0aP/kJhpepdhd+gdJ7i4pN22uilW3CKqejaSLLUNYVKvOrupcn0r5FtO\nICoYyFDgTThvXdqrUhnSoVJO7OIija4qPHVg7eMZZYI2Elexil2Fk7cSBz4i\nH+MbwYA26fePS52FnH1vU9lvMQZNiu/VPoq+We9CTxjmkVKtg2RwfkwoF4/Q\nV9ZK\r\n=xQkN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"8505ee584c575ca9156588622181869f9feb3c3f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.1_1607766325966_0.5090533530628718","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.2-renovate-non-major-e6c7b9f825b1c77afc160af1b991b293c97dd84f":{"name":"@balena/jellyfish-client-sdk","version":"2.7.2-renovate-non-major-e6c7b9f825b1c77afc160af1b991b293c97dd84f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.2-renovate-non-major-e6c7b9f825b1c77afc160af1b991b293c97dd84f","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fc0ba00035cf43e2e1442ca89481e9a5717633a0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.2-renovate-non-major-e6c7b9f825b1c77afc160af1b991b293c97dd84f.tgz","fileCount":18,"integrity":"sha512-5s2ROV4XBEJk6DN6C1sBD6XMZdgQI3CPR+su1mnn/WBtTK61xg8kHVVyzWgnyf87gi/OilM6RRlEHEgyzZzyeQ==","signatures":[{"sig":"MEUCIQCfGPkD2TFZ7RuHEXaeErnlE9YhQvvDV+pVVy6W8xmDhAIgV90RrBsTK3BBkPiRX4kTat66gBaz2hM7vaq4TqTtw8w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1JHQCRA9TVsSAnZWagAAPXMP/18beWjpOWARQ3MeyOKs\nnvAcZ0/EffDaJuKigODo5KBt9BOh6MxpYCBl1OW46qKdNHZYWzjEGX2LhZYQ\n4zAGIpgYX/fxHY4AnNfWZvxZ4O9Xyv0CS6NfMUfJGiCkzPnyyLx/nZAcIgfX\nMeGd3m0GEdoD6sd89WRDkmaeUHephqVlpA4RH1FCRH1Vo9hsSn9K5zC00b8Q\ngGMR9yDcfn9JE5Zp72zNlSOpDcnUIE/So4BCIJDys3PAT/zJ8EjYaIlOCr26\nxTrfVZ+2Arkjcb5nlZJkAMlxKwswhS7HqNPSV4kWXMD7KGD5r2jaXSnqn3NN\nBC0eA/gIxOuKD062YC2ejsNS3nNpXDF48RSVLVR3kbMzCRHsjA9040Tg0UpT\n7ZAk7GCK3y/nDQtdA0jCwejqAG2qag6fhb4+zUEF6taLXnl3+S6wvkRgU7RS\nRbRzxulR9iA2YUjomao8oAzbxKmkrPX8+URnLsCMX2uPMkOdKvP21QsYVY3y\np9P46PO7b8ydKtMOIJC8aTIjkBV1wqaec99eP1E06Ch/cL4jauTu2YNIq2TH\nJVFQpk4t4g8asq15JY6gt0HDPEWAWMfxap4dqDzMgK5OS143o9lS/fSKRZ4u\nvxpfFDfSX2rvMOZVrnQucR8eF/r6x1ldgwM+UOjW6o+erQQcYWGI0DCy7z8y\n6NML\r\n=l8To\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"e6c7b9f825b1c77afc160af1b991b293c97dd84f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.2-renovate-non-major-e6c7b9f825b1c77afc160af1b991b293c97dd84f_1607766480249_0.44622817169315443","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.2-renovate-major-socket-io-packages-7a6e2fc45b2af746daa8dfab8608ec051056bded":{"name":"@balena/jellyfish-client-sdk","version":"2.7.2-renovate-major-socket-io-packages-7a6e2fc45b2af746daa8dfab8608ec051056bded","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.2-renovate-major-socket-io-packages-7a6e2fc45b2af746daa8dfab8608ec051056bded","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"623dcfe684db972a19286a74194c07c522720b82","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.2-renovate-major-socket-io-packages-7a6e2fc45b2af746daa8dfab8608ec051056bded.tgz","fileCount":18,"integrity":"sha512-yAYfE1ZhdcAHi1iUBhpadIug9hAHX/AT/tW2gh0urpNG5Iz7SGTbnTVlGFW98d6ZgrdRKiYEeXAFMBU0hPomuQ==","signatures":[{"sig":"MEUCIA/ju56QUkhcuc++byj1WAMkSh8ggJjp5N7WOkHWym4SAiEA+FCC6e+VF02JqTAN3RUVVYJx/EX69sdwd/tFOPkwr6E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1JHuCRA9TVsSAnZWagAAU7kP/jwsZRZYV8wawkI/3yj/\na4j8SArGFK5arjbE1IPA6Df4rBco/yyRUeK82bBxZcppl2ruDUorH7ERsB3H\nwN98LGiKPtMxnz9hP7Q3R2cOm+SCE5UM8MEwgkhd45I30HDcnPmOmAkXvOJa\npMkfgak8kpcTox9RwSQsvLJi+J9bk7gTvq/H8UUSfJpdsjNrK8VL2HfiiMEA\nfD2emxbXJ8BHSNfUT5YiVtQ9zShrh6GyrZ+A8fsSXfin2xxTrOJxNvI7HNVC\nMeV3uRu+z9tDoLQAHbDbAFKKQV9prhXGQg8gBMGSvkg9GQ0Xa+FjfqUwrMW9\nqdLMf54PYTn/6vaWlnaIL8Nrn+0VqRmnbfNBUpzYF8wkh4xBXS/hXiozTHNk\njZgYxy+3kYEbhzagcqCmcoQfhazWgarmdRFQaVDCUHs6ZqcW0cXim2jXm/nm\nV3wbw0p//LorCNMCWxdNPdidrQahFU8SLoWUs5/S7qjGf6wdD3ugUI1ah3/V\nuNVQ0dRkQH10S5HhSkvLP5swpdarTsNknMExp60apjGCwtlBqxKMQVgtuQlS\nOOHBzNIbXCsbxjzVF7OWuhLlDaEEARmgIrK5/yo677E4Ej93cIQ6QZlyYgOJ\ngCHkQPdnrjBJS6kSgj6LjYrcVHCfnLyoPq7gIrHn410CAKFHrnymE7AFbly3\ncZud\r\n=ZkpG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"7a6e2fc45b2af746daa8dfab8608ec051056bded","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.1","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.2-renovate-major-socket-io-packages-7a6e2fc45b2af746daa8dfab8608ec051056bded_1607766510340_0.08005300965206952","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.2":{"name":"@balena/jellyfish-client-sdk","version":"2.7.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a40836026a31307ab1813587c87b959d7c0d3f91","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.2.tgz","fileCount":18,"integrity":"sha512-2+I2eTJXJSQy9QEmcuAO+F14KEFlj0Tk+d3rZ4WD6xWFxe+yZM6F4jJRwn72dj2BTUhfDa04WmsKeFwxSHYdsg==","signatures":[{"sig":"MEUCIQCMIWLsDlgPxz4m0qDyR61PccGpB/TejW7LYcL3QoewbAIgMPggGpwrZYQVP64UkN06vkEptyo2MR6bGHVhcDGsCes=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1JMKCRA9TVsSAnZWagAAMBUQAITj+KIS6SGx3aFuqIH9\niVgew/u48FV9hy8MF87mm6hm60LGVLY1pLv+vnrBWb9eeDzvW84pFJZoldqj\nlrho6GMWKhUaRHrIW2/ubrsaBcQ1zfp/NpIS1J0gYhKasxJNzEl9EoIVL8/a\nTZBhN7zcOvTPD+irnlsZNi4Az8yBhBd0TGB6aohi+S9ISdvQ7kflhl7Cm6cX\nwGMi2bY2e1RfFMIKPBcVFiVltUXF/eei1UCAFXFd1GWXaR6ZSDqRsWmnmCjc\nt1Qv65iXwKbHx4xUdZOIceptoXdvYuMFNLgDJxEUG01WuBpBmP1vwEGracGX\nwwn0L+6hwX+CLWhqjlX0yojU8fkp/10G07fuH8M9NEs0E4R5PQquqISqmgaw\nwHpg5M8bc0dTe0CayS4qbe04LN8ZuE0Mhz8VeugK8MAPYHPYoDLk4LT9iCWk\nQWIEgSd2xL+3FjkUglJhb9hcq0LvDFhrA5LGZJhBQnOqBIH4bRj0oLExvlfE\nzvQiXkb6LWPWrt3Edt521M65OnsoQ48dy8isJ0Mw8za5oTpn/3LJfYlhAM4/\nNhFxS9tYjOhda+fS/ZVu/NC90mS+L+dSzf/y6tnsHy56y6p+AW9/XjrEAhbP\n2GfVuCmI6yrweh/iF7f9nRtFnxTpnrZhj0e9LHZW93cyiNyQW9CKt5CjBN2A\nL6hb\r\n=cRMg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"acb55412bbebac0085f0b40d82511d35700685ae","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.2_1607766794111_0.5341189773592947","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.3-renovate-major-socket-io-packages-f8feb763260d18854a8890f268698d6fb45edbd9":{"name":"@balena/jellyfish-client-sdk","version":"2.7.3-renovate-major-socket-io-packages-f8feb763260d18854a8890f268698d6fb45edbd9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.3-renovate-major-socket-io-packages-f8feb763260d18854a8890f268698d6fb45edbd9","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"94762f8c2664e25d28ff4f55a098cfb5dc273203","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.3-renovate-major-socket-io-packages-f8feb763260d18854a8890f268698d6fb45edbd9.tgz","fileCount":18,"integrity":"sha512-mdZAxMHHw4zvadSHu/rrbS9lHBpGgfxBxxW1FXQvyEWn66zaLeaaPC7DW/wZOKwdeYp4tMBtqD3Dh56V9GrYdw==","signatures":[{"sig":"MEQCIBbuMifUHLa9d0trZWM3P3ZZB0nrtHCjWpuBT1H6kKJCAiAuPYD3xsolvi8CrfTz2t3r94RD/R0ZRrSCGTwqE+Euxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1JPECRA9TVsSAnZWagAAGacP/0Q8e8zHUeM1ODImbFAR\nlpehsB3Lpjn4ru7gYCFM2+ekN8hXzxNj/Azt5CvP+AWsFlJ11HI2WOCvbXfg\nZGEsdDutrkcDKuhyPorcuQBVr17F9YpTp3s3IFfsNZJS/0wzvdbBYVh8Fou4\nYGzO5svpaxHNLLA1q6HsEHC0d/cZgv7zVkw5hm2Q55Pxhgh+OMFhm+4Yakyu\ns9Y6g83HsNiux0I7DyCcMjc8eVOyr9nRrMBuO5gWIU/YgG2QpJ89vlgKLkvj\nzT5cxfa5PdPQd1wuiprwDkK5EL8XjDG2KhW5j8KAJaMIRDLUAFi8XO77D9hl\nbWci56qFWJOKNE2rch3J6Rgdkqlngn29rc2pfvbaxYGSIFNyOLHhrro1IJLO\nEgaDNolTIxr25fMcHaRbc5syHLlClXL+mQaRofDFc17suZTuxsOR7nLYT22G\nvnkrb+nX77K4jazR/S03d8IaNhMqQj4i8Jbo/ZPgVCj0969yzDjmC0Fc5CDK\n+py+WkKlsPU6jw5TYdCu1v5MYXakVz8hcDDGTQtTnaZfcKWRuUW+RRVIeDNv\nP3Xo5o+1yTXbNIMPA5KQQUJ2xRtGq7uUBFKf4sw05GuwtkpAbd6ROCCTe66x\nvfux+15e4l+C3c0iS5Scy6GmvWkwGxO2jgPgHpAM5YOtUAlXVzVMIDaK3B1n\nhISO\r\n=LjMO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"f8feb763260d18854a8890f268698d6fb45edbd9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.15.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.3-renovate-major-socket-io-packages-f8feb763260d18854a8890f268698d6fb45edbd9_1607766980050_0.11176946887814765","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.3-renovate-non-major-6098a5a45931e084f9c67a01da36f1aa82a3b19e":{"name":"@balena/jellyfish-client-sdk","version":"2.7.3-renovate-non-major-6098a5a45931e084f9c67a01da36f1aa82a3b19e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.3-renovate-non-major-6098a5a45931e084f9c67a01da36f1aa82a3b19e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1c09d9e2ada259994717588f467d948b6e0944a1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.3-renovate-non-major-6098a5a45931e084f9c67a01da36f1aa82a3b19e.tgz","fileCount":18,"integrity":"sha512-yxYHKgshsQ4PJo323u9dJlmzN07YxmWecB5XSjwL048L5B5mZxy9a6NkQm9TjqaFBwr8X8U8ZquqDVOx6z/B2A==","signatures":[{"sig":"MEUCIQC7wrU4Wl81MydVwemN1xgWijJOnxRi1BBwIU55CDvHOgIgNbjhmn28EqEWL5WwX+C7V8+5jUmWhb8mE6vYZgyg0Eg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3Uv+CRA9TVsSAnZWagAAJ/IP/09TE3M/x4DFiIdgo4BF\nOKQoZWSdHA5YUCTSkbOuCyM9fy9JAv65G2F+X9fazB1e2TBtTlhAbFcAg6xr\nET5S7/fEDNI8Y4kOjUswLZWmHZSQ/ydrIS13WXN+/y5yQ2faPMNQToMwbSrS\nqPmZwr5Y687B4ukGLUCdZgmpi5TdcdvAx0kafiCWagXU40VK2drzKQBDswYd\nNAoBP8p3grBagNchr0uUJvIn3MDX0PLNJgbSRRWaiPxrzgqiGEaRP3F28XHR\np997ZRnSRJNfnV2krTUzgAaHWslejjRjnipBwvoH6Kzzw/5NX/iGFIWSm82V\nDLHeo30uLcoNxJ+Z44/wDOgtAk3efGGy5ShXDM2AZ0wagFOFDXbyAM0X9COt\nK3+kkEAUJsAioRmlIR4PjsWOzrIo/AvDO0n6e6hYPEqA7G9APF01oHvd7Y7K\nm1uIZHgxX4Kwd9u0PpYs3Ld+pK76/svGqoEH8JopxGlPhme4a8qsHahOFkl/\nu+gYY4q7DMLlS1GJiDabkuvcbeta9f6jjLhfe6alqNMiwuRTD9ImDfPLrdgf\n68YtUUUmlF0NumfjHFk+wwGYKPH6Na3VhemWc2/NEKyLt0/4uiDRxG2eLfgb\n34226YF7IHtLGPUCyO3rhr9h5QPRanrC1EWTskadD5xhawoNlmHLYhXJnJKP\nSy/p\r\n=RdGv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"6098a5a45931e084f9c67a01da36f1aa82a3b19e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.16.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.3-renovate-non-major-6098a5a45931e084f9c67a01da36f1aa82a3b19e_1608338430216_0.4820591117111379","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.3":{"name":"@balena/jellyfish-client-sdk","version":"2.7.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ac3c0e5aed78ec3a14d028798676e478adc75183","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.3.tgz","fileCount":18,"integrity":"sha512-jCg55drYRxu9OA/dV2MC1gYzft/TVRnelWL9nXtJALixoZB8Ec3sC6spFOhgH411teA8kbASEzTquuAP9u9XNA==","signatures":[{"sig":"MEQCIDltWvirf0rnPhCjOgk5g5A/YmXte55lwedakqZYvbXZAiBGs2cEb15tTfmp5O/Uf2SOMJ33XQq+lb4WRBW2D5Xuww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3Uz8CRA9TVsSAnZWagAA/dwP/i+yKxun61kxe7mCawRj\n6UB5bANwNLcpJ02upUF1EvAhKJTwmR4Dk5EWAWY3icgsz9pIzW+DSG/YPt82\nPP+LokC1exNxAHt/UllVFx8tmtAIUBwGMbhFfZRjl68aaOoqTXmbpI91SuNb\nSz0EcqZNra6yoPH/lRvSdN043EWs0YNoa6NZ31UfEOVoPrBQ1DyyWZlplK5j\neAhQwWPxfaTRQUDsuXY+W/jt8dYNl0lymraQq7fALKwig/OfXX60MtRA3zs7\nmYjuTd8A3YU8s/UFRRya+UPTieDQqI1HgZPopRGHk1m4No7p8JyVyx0aUJMA\nCwRWQb0crGKCTOn+RvCylZE0pm+U3czPPlCy20jObNGr8Oxpf53tc8eWJfPM\nsyFfKBOSdjLZKRrf8HttVMSUS6Xxsc4prbnw40Ou83JEbADUAesPY/6cP1Jr\nHifBN4jTRsuN0xac4bZ+YNqbB+qqUfEZlC/vCTZr6ZzVT82Xjpo2FnGpoisF\n6kp1rg+gg+ngX06e/q14EBrR6unutXA+LLwJLESTnu5NAxgoijSW2a7ykcXj\n3xH+klpSdAlzooAMU1MJFxmWKcq4RHL4vx5Nuk1dNpweiWGF9fahA+Hdv0I3\n0mJ7MQqLrQfVOl0rXXGOLGwHGKOgipVzCQPILxJKhaMZG+y6ycyNsDvoBcnS\njymu\r\n=Tga6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"e4b093762c40b115af0114dfa97d9122cd120ffa","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.16.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.3_1608338683903_0.3267143785767921","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.4-renovate-major-socket-io-packages-3ba6320e77d209aea7dfe8f05ef344f1ffe9abeb":{"name":"@balena/jellyfish-client-sdk","version":"2.7.4-renovate-major-socket-io-packages-3ba6320e77d209aea7dfe8f05ef344f1ffe9abeb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.4-renovate-major-socket-io-packages-3ba6320e77d209aea7dfe8f05ef344f1ffe9abeb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"59c7c757e9b9b3ff835516eefe28fd5c6ce1ff57","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.4-renovate-major-socket-io-packages-3ba6320e77d209aea7dfe8f05ef344f1ffe9abeb.tgz","fileCount":18,"integrity":"sha512-qMZ1qAcI3D4jd8X5G199nHaD52PB/IvVnwskSgkILJwnMMJqjb+y09JvmAuFLgkZbOAo205zYpfCJSRhgSzBNA==","signatures":[{"sig":"MEUCIQDpwcZ641utwOKNo1dS3Sv0H7Ztbt6tRB9LXSjV3Xt9XQIgEF82aAjIbM0+F73UNBz0kJwYisYQhMXIRDjPB7ZYvoU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145253,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3U4ICRA9TVsSAnZWagAAhFUP/RR/yfwb69RdGO9vhfpg\nyxvVH3c5bkewe8zjQ/p2VC3MV19oG01kRyqMl0ZnxpoWWYDcxxCKChfGuO9V\n9JAi3VDN1s+3Tv5r8Exzwt6V27NQ28jQdelrm55qrit7XedsYW4U+t/REMSI\n0xZLW9W75dwlyqrSO+TbtkLB2mOBiagErLH39BRrFuvgDvufPj3JrJRleJgZ\n/VuYTp2eOrw7Y37r05bq8FXRLOS8pywO/SeP6APoYU+j8CiCKoYUbOWvh8Tr\nLwatEC55JT+Zgn/J6XVQKDSg+ov0PLInX/lgLT65J6fxQaDCz04QO6FV/ivN\nAy1jDxASxfG7lQxTtVMnvb1QAq5RuMRLjervdQCn1qGbIteWgQFUBSyExb/H\nYAreyBJwN2rPXl+KXNYehhANkfJn8BYZU4GliBynVaDC1g0Q03WlJ+ruI0rN\nLK3bWGMTB75xamClWflzJ8t8E3j6v8FR9sooPL0kxyoN5a/EICpyMFMhBuja\n9Pmv7ubsWB0tCBddijyN83iiLF9OPjT3HOV/v1YaLzAAWMaXoimOgHJ1MIFY\nh03h52vgqpxLc4jUrkjoGU7PzkH91tcEIyiBXt8CqV0/fBKeNKq8RI6V+QFF\nX7Meli3UCMw2Y3UWkaBCIlBaUlrFeQ88wjtpEmjbRYXNGxbx/QKeGFGwqsqm\n368D\r\n=YODK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"3ba6320e77d209aea7dfe8f05ef344f1ffe9abeb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.16.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.4-renovate-major-socket-io-packages-3ba6320e77d209aea7dfe8f05ef344f1ffe9abeb_1608338951703_0.30487150431272947","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.4-renovate-non-major-b35bf4e48dd58e760139e02dc62f4156d6c7d2d1":{"name":"@balena/jellyfish-client-sdk","version":"2.7.4-renovate-non-major-b35bf4e48dd58e760139e02dc62f4156d6c7d2d1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.4-renovate-non-major-b35bf4e48dd58e760139e02dc62f4156d6c7d2d1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c6b6a3cf4769821288e7dae41fd1b7a3fcc4611a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.4-renovate-non-major-b35bf4e48dd58e760139e02dc62f4156d6c7d2d1.tgz","fileCount":18,"integrity":"sha512-46C3i0e/d4QhWBABvahFRZz5le8qm7N3gjWNNbnM4tC2WW/qcuGhPhu/tOf2xHV74KBEOA8s5LHssiGethfMEg==","signatures":[{"sig":"MEUCIBYjHitYY8fmEZxhwqJlYtB9y6ofT6FUmDx1mllGSEf0AiEAyUr/xTGNjY8OnBcoY2Zej/OIGlEOecxU4LxDx/3whQU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3bytCRA9TVsSAnZWagAAOWEP/2K0Bmjcij+M5Ys02rjS\nALpaSEnQglf8S37U2ZH1pVLU/V2X8tsOQ6lu2LFOC4TiuhE64EvcvC6Zdlr5\njb8PrklFW/nWvd1jHMD89R3xLk0z61yJH/z5PEBASWQxwptM3oVQCH/vtAVo\nSLDlCOVerTSIArn9D040rMxcSDOz5AWslH3Lw3wXBodi9YxfaPJQrf95iLLW\ncxW1ZZDylyeUEXT7nhm9Rajki+nPbRbTcgz6gtiH0XUQJNfmXB3CnpeDY1/2\nZ7/doVIISGrTxCDTkl4aBfYR4IJ8QADmWS745jsM9m7lEkkxbsJKF6ZszP+/\nd/PV1ghIZ2J1Gph64LYEpRZO9nXl9lJmKsN0Lhj3+7iB1oyFW3zls1FCWcHI\nPgxbfvOSbZ4/2nvUh/vlt1JQ7zTAQvVrzOA14nfyRn3fBh+nf8GjFa7Qk53A\nLAONdhiqIV13HlseIE8gLqw5rrXHqAnXfos7CgsXJCbw2xrCDgYx0GwH9Iul\nct+geddJ+INraLZ+2xjNnnZjKE5xlEISDROLWdGXaV5JiKLdErqCS07fBZNF\nES2lwJfTv0FSkv+PwGG1C3LtuiEKVBe76rhHAsqRZQ1Pyz80zR/vVabuURyS\nEvX5vHYnPjf0uSowDmE357O70PQvO4NTDVlETmUcHwn7SM9yDg+sxfT14axC\nSegF\r\n=N5rZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b35bf4e48dd58e760139e02dc62f4156d6c7d2d1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.16.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.9","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.4-renovate-non-major-b35bf4e48dd58e760139e02dc62f4156d6c7d2d1_1608367277071_0.9480178130285934","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.4":{"name":"@balena/jellyfish-client-sdk","version":"2.7.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4358f3b541fb837a49d907bbf0c2cf7b39efdd81","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.4.tgz","fileCount":18,"integrity":"sha512-HjQo6MyAFtdDz4mOGMjOX5Z1rhYmXLH7gHYF5X746ZjO+vNKdykXgyiOxJVTUmym+Z+3pEEJbvo4I79u1wfVCg==","signatures":[{"sig":"MEYCIQC1waRzZ6xstUdgFxqh0lOdsv4KwtEBKt/PWgbsEG3zHAIhAO53r3/D5YhmQlfuP8UXM3jGzRsnRSvahHQNRWl8uLbq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3b8vCRA9TVsSAnZWagAATKcP/AuUFj4Ly5OY4z7yDfRU\nHn/A/sz7G62qiRxjUbmtmVCJdXmccNc+Kd1/le+thvc+N42DqHg6XJpzm5jj\n4Y85NM+DOJcCfZ5WCkf46WxkZYFCgj7Z6wude6HPHox9rwlDvi+1Da0lWaOa\nWqtgevZ8fboRPBUGb2+3fonZSDXUU1hZv+Qn5sw/5k8QlEwFeMaixd4d3iTd\nJCFwPjl//cjpAHn+tFhX70LD+Zz134SK6hbBGyOg8CiTt1L7pik5K242qyqh\nmx2OkOWwcfiaXkvvePrwaxcyg4HJzGwkJrUFvUyAheK3O8TBqVVTZ190J7D8\n3zbgibNVbAdFHFQxaszJKHGPQBrMShHyKzw+XuXtBvj2ewyKjyN1PeNROzwW\ncs9wRx9ga1xkS5Nhxq4yG0ggXu64ANwu3ID85FvHtux3iidbfXnkiGy0SMro\nNXwL8BDP4hPrJ9y3wqicbfBNpLhEfLozrQPHeCQf7mlIKrdaiv1xo2PRp10y\ntpxqrfGpjbe8YII3Xc/VC2F0vFolVdtMxzNUTrZiqCxseKhw+naNV99uY0e/\n3MLYaPnr+97Zu++ZivaR5PzHEG+Bhq5iRDCO2nhRvCC4jmBAKuQrzuqaZsqX\neuDF4hK4gWhKC6RZrPTMm00QuG63lSmKPW4TOcYtzK+MW4wUlhSUGlKkvx71\nqvJ8\r\n=moE3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"35c4ee485da14d5c3957f63e7e40baa4e82a98a6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.16.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.9","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.4_1608367918620_0.7289123506280992","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.5-renovate-major-socket-io-packages-c7aaef3906772fcd115f5ff5b165e23fbf0fd25a":{"name":"@balena/jellyfish-client-sdk","version":"2.7.5-renovate-major-socket-io-packages-c7aaef3906772fcd115f5ff5b165e23fbf0fd25a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.5-renovate-major-socket-io-packages-c7aaef3906772fcd115f5ff5b165e23fbf0fd25a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0ce66e3e946bc0bf4ebeac8965759324a9830fb7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.5-renovate-major-socket-io-packages-c7aaef3906772fcd115f5ff5b165e23fbf0fd25a.tgz","fileCount":18,"integrity":"sha512-H2bEen5AyJbk0og1sL3N5IbomLdc+JZEeaYPHsIbM15n+5ue0V0cM3/ZpZRmhCPW9BjHwbfSEh08uroRSbKibw==","signatures":[{"sig":"MEUCIC9sELPCr0ahUF59Dd1lLa0ZKdzEXoKVTo2spM1g+2hdAiEAz1KGe5RgT2xtZnSU7NdWCHx8R51p8y9fMRJWLqN1pEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3cCtCRA9TVsSAnZWagAA7gIP/0abX9EnH6dEMXQdaBHT\n9xSice4hj7Dr6G1EJeewpxymOrC9W/5kfmDZvpZxmyS4SRpjzfqYPrAdEZdd\n/ZDRIaA498gSZj5d6aKhFzt3TMeG3gPP6ifG1q39Y5+i3gshu8+XVnNuEjnR\nOYZWetuD7joZLZhvA+fNHiwY8v8CfYcnMPITHFDd0DAyA7MM1rdsoMO4iClL\nLsbWe9dFMw48VVqDkw3qJovMZOGysITpMDG9SPr8MxFYmwj0w+CqUaxSDASo\nueoWPcIhRhhx2cRgCEQYTItp3x65rtPpZGBnL4pAQ3p+7YALcFH89DIbQKme\nWTJVPVCqEGDRPW+hufqtmvnDSrd2TBKeWb+P4Zkv65bB0oopXMXbVuSMsF62\nkYPxZEyWb24jM6rVoE3wMn5qH9tmwdOyrEMSuGW+M0sKYdUDGt76QE+vTIea\nVGitNC1Fc6evHwFb40MAIcvC/UxEpb/ZcPdFDzzzJzAM8SpRPmp4FROX1t2c\nSTVbfswz5rjiz+7QuRGaAAmFEPSNOl0pqg1TMmoFrEc+tYM9/JUbZM3MnRua\nmW/HbtHHosBpWjjqGSMto5/w1/O65p2wrGAWVbvvrZSq0QYrUmhyGMmD/RNj\nuWyAxVdYjT2AR5sF7DeETbbxWnCUBzCg+b81cqcibLXZEeXM95DLYj3/VYED\nFZeD\r\n=H1uK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c7aaef3906772fcd115f5ff5b165e23fbf0fd25a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.14.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.16.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.9","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.5-renovate-major-socket-io-packages-c7aaef3906772fcd115f5ff5b165e23fbf0fd25a_1608368300519_0.6663780230546918","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.5-renovate-non-major-bd6e12bcbb76482c86161ec21c7e55a2526555fc":{"name":"@balena/jellyfish-client-sdk","version":"2.7.5-renovate-non-major-bd6e12bcbb76482c86161ec21c7e55a2526555fc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.5-renovate-non-major-bd6e12bcbb76482c86161ec21c7e55a2526555fc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d325e42ab39f8bca9ee0e4ae02564279d51985a1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.5-renovate-non-major-bd6e12bcbb76482c86161ec21c7e55a2526555fc.tgz","fileCount":18,"integrity":"sha512-K71/hRCt7GSlUp0xZeAm8WTgBY7okxa/57Aox4tDJCpepKWKCqC8YMmeGQLQ0hTnwwIGpfC38QsxbUdsDoTwZw==","signatures":[{"sig":"MEQCIHC8Sr/Vv9ViCvKcS+HA69gJzeRebGDbbYavIsuhoIHnAiBxp2h5qesW9AtDvCUJciwTQv5b2x1tMIyUyHqvZP3ngA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf86QICRA9TVsSAnZWagAABBgP/Rn0/07PvTgQDRor2g0Z\nqkmhwc62S4bsnwe09FUxxkKoMnVxyRJYJWs+P97TIcRa7Fn86He4UtxAiKCv\n9FA5WbwiHWBNMN1GH1GGplm7unjsyIAosD27WXKoRMF4EnD4iBvHq4XO+B+9\nI8NJSImBOsKqNA96VqXgMVxSGbN1rUkMy91HObg1LKZ9pkSc1JThVBJOXPFk\nbt7kRwDBHOJsi6iEQNdw5SvnFfU+GzPRQaRXPUTB30a4v/E/rSrRhKO+GWNU\nvQ2DOD9OtWz6exfJ1WzE6bQ6XZu9ttIvA3nYqd7MoDw5D/RpAgctbOzH94x5\niLJUYlhe+D2BiTh6FjKCU+KSqZMz+jcgL6UiUVZEi7R7V7Th/PIkQHsMlWqu\nv9kCibHISqjQBL6iu2lCZ3SILczOiIglDk8OUzjEI96lqaxRO+4GOV7r+Ndf\n9zVs5ie4uDmldecoEqM2b3+7hdZcCPDaRbKcuixewSKk1VtuAFtQBli7oNHU\nl67q9V06bOoD7wRn3AyAgGE/UaMRtCLLVk9g2V8fARhZ0JLCOJ4nwLQgFttL\nHs6u+sbPe11//PEn02yWGpfk5DanRX3n58vZW0ppLiGt1YsmNoNdUZ7joRdF\nBDU2E1FBnFngdQSupsIQhVlYbfdh4DQbkSWHnkdZQ1ifuJIIMTQ+3ukJNfRB\nhs5C\r\n=i9yy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"bd6e12bcbb76482c86161ec21c7e55a2526555fc","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.5-renovate-non-major-bd6e12bcbb76482c86161ec21c7e55a2526555fc_1609802759680_0.940457927631285","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.5":{"name":"@balena/jellyfish-client-sdk","version":"2.7.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"603882d8c881a774826235d04fde9459053f5e0a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.5.tgz","fileCount":18,"integrity":"sha512-68tKSDVgW3CaEHZAUDk7qev0P7PLklJ1rLsM0V9HkcgwYevUPAZuxF6j5GGoimZ3t9xWvPdrrlwBAyvFdmuB8w==","signatures":[{"sig":"MEUCIGUKzgiGBoFfbPSlC0MGL90+umpnDxwbHEb1YCq9wTnAAiEAhtIsHCNSH382czbF8BZBa6ACdUCnHaPXjA46gKzqX84=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf86S0CRA9TVsSAnZWagAA6dwQAJ7AqSoBocR9lW0ikDOh\nOuShypYU65fNrVl25/YjcGpz5sXXBtx3cyYsd8bw1+hExEBxvLzrIN4n/sDV\nvtjoN1bp5/zY265oo/Wt56a7kEi3rZqTGiPAbO2a4oyvuGNF5nReBinayz5M\nA9aDFCzBxSA6SrHOGZaCsJ4E+20tmd0tcLy5FEgwvAK3pdutfz0vnGWRWJ/Q\njs04u2kzvmpfyrlZ+ZepPN93Ro151cNnwDzj8ZfSUKPrg0TVvqvyo/J6QrKX\nDI58vx8/EoPO5Z1ia6T/z7fdWR7DkIfuoAB5ieOY39v2F8GArK1KyyK8dGH2\nsiuHJfHILd/govY+60XUjk9OXeAh2oYMaZi/I7XlJsa2QE9GK1uvF3dXmHTt\ndPLcqLzw1iPxis7AsoNEJUj0cTZ4uFSsStAVHMgiqvDhnyd5r8G4ZHcXnOf4\nGd+eRc+14voL8fi3KYbksMHhQPxDLGEltNBuRb+8nuhTj9t2DBp+B/WAt8rf\niWWphZ/m6gVQnWQcqHCpJojS/qodVF63/k+yIZ5nuOSvv3dNWDVtNYC2cKBD\nbu2i90/RH0G/LgsTeFV/m/SiGq59s8TRC+se6OzDSRE/OeJTwdMQ381O/0AS\n0mgOy9kVbapOVK1a5FZVT+Ok7plV6fQgWrKBZZJE+0Zk+TzVAvjq13qMHrlN\nSCY5\r\n=V+R7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"6ca5111ad5817b90c7b7359741ef31a16cc529e9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.5_1609802931838_0.5469729420976033","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.6-renovate-major-socket-io-packages-9a43b84b11dbf70f29a9e79aead87d230015c3fe":{"name":"@balena/jellyfish-client-sdk","version":"2.7.6-renovate-major-socket-io-packages-9a43b84b11dbf70f29a9e79aead87d230015c3fe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.6-renovate-major-socket-io-packages-9a43b84b11dbf70f29a9e79aead87d230015c3fe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5389fbb74ddb60232a7ac56ddcf88d1a4b69ee80","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.6-renovate-major-socket-io-packages-9a43b84b11dbf70f29a9e79aead87d230015c3fe.tgz","fileCount":18,"integrity":"sha512-FluE4uMyln+rBY5S5ep6fmOBsVeMFRBBnY3/5R7Xb7L4BwJLmzROTQ32Ap1dHrGP3SuH4CFuV4oiIeVTVJMECg==","signatures":[{"sig":"MEQCICBXXRG13zalNEFgiQbSPD4St1PHKqiMdLz5UkCSwhEwAiAkpwbvyBvWwq5smdxWXteSOge5l084Se/8Boam4mU08g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf86VCCRA9TVsSAnZWagAAVRYP+weKxGFVua9thNUSE6nZ\nJ5z48jR808gNqmOPXHkBgsiRoLAPHPzRctwNA8vXxNkEMCVxMzTE15ThoxRU\nMeBSPxf8Rz6QJKVpRrczuUlt3kTC/gC+/SJUFPSBcJGYQdSmaC4a0k0a7ZvF\ni5CvWjcxO5qJmmrOkkXXHty+32KUdyu1nxFfxfwd9SC4ddiPgI2YhNpBmFtx\nDr2rQ8ZbkyN2bhceRzrpi0jH3CMo/apizJQPa4rPpSuqpRxjlGdYj3JpJ+oh\nEzIOXk9auLohmTav6gDiHIE7YR0iInWApLSu7EJYUIaoUlfnSZ3r5xZYeP+m\n8MuUoGkia55lbcuwLEP4bNOcxAliPb8r9tckKKG8I/BboVKGx2ckRgzy/tpB\nGLSCJfdQ6UW84n2fBfZXAv+n8oVkoj3JsD3XKbPlRqxlj7BAIi1jqBmqr5KM\nvV3YnOqIH4LoO9tXVsMahsMx2lNi6fRxIxqUEM8K97uD/shO9N32oFlvN0k3\nzpKrKyvfAfD7c9d1tm0Spr7oo64pjNMQ85RTuIaEmqvlZd/53A3ovv3tL2Sz\nhx06S6fBhIVtZeOtgLE73jVs01xuPsuCNr8BoELJ7etcVzarVcNyF5pDIhIg\nOxGhPT6nW4jscwZFiQiYT5n1rMfSfC00dt6xJ3S2U3qqL6zIlRn5IttmpC8G\nA2Cc\r\n=APak\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9a43b84b11dbf70f29a9e79aead87d230015c3fe","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.6-renovate-major-socket-io-packages-9a43b84b11dbf70f29a9e79aead87d230015c3fe_1609803074122_0.44548082041402703","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.6-renovate-major-socket-io-packages-b413d5a86c970e26abadd4d002d75e79b5533ab8":{"name":"@balena/jellyfish-client-sdk","version":"2.7.6-renovate-major-socket-io-packages-b413d5a86c970e26abadd4d002d75e79b5533ab8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.6-renovate-major-socket-io-packages-b413d5a86c970e26abadd4d002d75e79b5533ab8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d7a31ce73eebb801e03cc7bbd5df8735802a9ff1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.6-renovate-major-socket-io-packages-b413d5a86c970e26abadd4d002d75e79b5533ab8.tgz","fileCount":18,"integrity":"sha512-6xRnJGjRcIUv8eBlGtaRfygiYFpusjSqXTooB6XwMwE021xhvvUn8K7fJZqTmQvYAPp4n9a8scTm/9FH8dtyJQ==","signatures":[{"sig":"MEUCIQCLRgbe0efJE291tmCarO/6jGt9SAsBo0E12LW9pI0sOAIgenpiIDNQrb9JhHIBtiTFp4yGrh5k8SHv/CprQUG3pt8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9Fd9CRA9TVsSAnZWagAAxesQAKJZGNV1kD1+tDkFOW2f\nyHTDJIupMFTE6E8GQZO4zZTBlT+Rrnoa9zdXQyjOSmaCYrzxc+6o8QmlycUs\nrjCUjgtISIOcvhD2z88z4jssuk9OA7Gg46Kt6mPgroAWHIPntxzbgJp4XdTs\ncruOA0naqzzmocj2ywKsDyJ9n+6AehPfcKkz/axW3FloISPzCTJwMtpzI6va\nYFsA13aEs1527za/zU3qFVySid0yyEMgTrGCz5Foi8/QMSU6EPoX2YjU9JKX\nqYEBbWCJ7cuDX8YzO32M1gC6h/IDynJC6377yYwAGulTCh7hFaeGghNgWYDL\nKA2f6gMT5TOqZl8NPnLZYKgXdxvMPbmfU6cvisaDMnpUXQHEnTXqB+05OnfQ\nk2WV5ZI7SikXFS3lqNu3dNepC6ToZiNbC3vBZ7nWlZF/30sHz5py/6MaYPvG\n/imNT0fWbf5NX3BZa+dOyKUBH6YUtnOQl5dt5G3Z/eEcD7x+WRlCrUDAZr9N\nUlQw4HEFru/Ui0fYHSpJehPxfXr/+xgDFaygBKhrb7ZGSwZnvMg+yxjKihB7\nPo0hPaiCbsw4/xa0LTjlp6WHgr+cLJsx5f0XTGxQB5cpKnoQ1tDCa6mCFEib\n0aVLeNcs9Hx0Y7P9pvYMzMvQ53wSjpBszaij72jl02gh3wqffL2s1KNBZ9pH\nPqWs\r\n=oVko\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b413d5a86c970e26abadd4d002d75e79b5533ab8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.2","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.6-renovate-major-socket-io-packages-b413d5a86c970e26abadd4d002d75e79b5533ab8_1609848700955_0.669021800292658","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.6-renovate-non-major-2d63d8e7322620c4f7b795421b1b08b68861c51b":{"name":"@balena/jellyfish-client-sdk","version":"2.7.6-renovate-non-major-2d63d8e7322620c4f7b795421b1b08b68861c51b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.6-renovate-non-major-2d63d8e7322620c4f7b795421b1b08b68861c51b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8a09c49ef2a867d1dac15013d9681f7828143c2f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.6-renovate-non-major-2d63d8e7322620c4f7b795421b1b08b68861c51b.tgz","fileCount":18,"integrity":"sha512-38MFno4x/BzmHMYv2FfCWcfeej+/rH130w7lT8FMpxDd+cYJsVYfaxbfq4bPBr0agTHyMIm1rB21YCy4whmDVg==","signatures":[{"sig":"MEUCIA6djU7pOWYeajKV1ceL1F3uWbPiM/8me+Bf+pKz3xRWAiEAslp/3sKoNJbwfWl7/cGoD612ABt/BF49tA5McIX8v78=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9dNICRA9TVsSAnZWagAA7aAQAIh0HD/q8ecTVE/G2MmL\nEQHWg0LPju/jyVrmk9SAdgZFacHrxserUlxhkOA+G7mjI3bktz0VDWMOa1nV\n/2jLF+gIcONQ+KzRZCeszs14bB6+M991GClJRosPQPxwiAKnSxflS9x8pKrx\nr27wmccYy5pjBjK6k/6co36sxWlIeuSJZxxPU/CWyu+e9AMrnep4Ut1TnOcl\nK9KDlP6up8XObVLl3hObxfdICQo5pnFCTNyR3dCQHNvTNK6qJ1uQS2XvZvcD\nvRp0zDBK0sBI4XMEqCkwbyIy/5tjeenjcvSfKMBQWs257PSaajeIw5z8EPZf\nNYgGEkyrZdLRZxwU/UpS2vMUB8uXmuaCFCn09b1pbtZc1jachEgW+zHFP4uc\nQkyxCMfAG9HXhC+9f/d+o4Hi2wyfj6og/59Lnk5GmKtd14yrGtrf0EKUK4gD\ni6Rf8U0XaBVAlQIZTXCDsIM19p2uDxc9osJL3qHxVFYcEfJsP3IBcJFmVZs9\nZRIBLYUzUnZCLq9E2G9yevDt6BoleOiCderwZDvqRtnaOLmF0bcWacImZfeo\nbKNzQ1SZBMSPHRxUWKsVriYGirRCUbCHVp+GdTxJ98sDa2f5VsuXjl525uHT\n7Cz6NDlANQ3lJ+PTxP+Li7n8XL8JO1S+PuI6ByEl9gJlsY5EWxwssLpu5YW7\n1wHi\r\n=ne5b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"2d63d8e7322620c4f7b795421b1b08b68861c51b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.6-renovate-non-major-2d63d8e7322620c4f7b795421b1b08b68861c51b_1609945928360_0.01919769303894303","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.6":{"name":"@balena/jellyfish-client-sdk","version":"2.7.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d49a1ce1efab0aaef3cd90cca99ea04377f1bd0e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.6.tgz","fileCount":18,"integrity":"sha512-jAtGixVO1/B7Pyf8V3cZGYX1MRporc0v1uIf59P6CPJExxb7UfpBxy7kfkXqVmOWqNi+u2mRktAFr07218h5Qw==","signatures":[{"sig":"MEUCIAlDgpKjU7gkrZH7o7qkpDcWW9RK0KCJIbtfwTwCc37cAiEAilcx7m/Vjrp1/bzYUcxyLyefBOKkfzEn3It9hIrmsFs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145340,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9dPwCRA9TVsSAnZWagAAy9UP+QGa5hSM1CPwdKwRByig\n495oKVZCkUauGeLbaBTTQKeCdXbiYt3O9/GefgEv1xdmocgHmqYewDLiBjJ7\n3w0xZATHNkKcYoFSj8tLEBqph1OVi36ZozcoaIpQH5Yg5l0gNpGo4t9DKAxp\nvMxC6+cO8CL/km0NGs4JbsTJphJMn6Y86qySdOflpKvccecY7ADYpnB6r09z\nSmgE/udrOHOr7kqSl1+wOXWHQgh60o07hrz+BLhPKQ17mv64DV3at/wN/2lL\ngayRTb5YqDZgXSmNNjgvHz24D8k+2UrAUV6W5deNmL+U8WUXhwfBo5xCRHxz\nGPHEZhMf8rpAc1duXvTcKj0xgS5pr+WNkrPPOEdcRkABKxXJBI7/2jQz3WI2\n8ImP+2Y+6fsXCEPZJF1irxQy3DV5VswYte+I1HGfjJPkIg/xmGf3W4Pmhn4f\n5vSNfz+S0xZm/TiXrdCYV9lIjDweA5X/PDk6jwSkBciyzku94HNRRTWjiV+T\nNYe7TgKxpZ/m2VyRJ9TP2b07GydvvxcP4tYF4MIf2rywavkpjaLT+8Dxyo7d\napf3YB2x+iC6eBKHyJWltBqgYsWV6IHNgSKVNsKrVP8SvExqL9kPrQJEqdkj\n3di9Ok7FvNYZzfyD0BqmPkkWCysM7osRtfWRbNttqbMurexPwfpkcPflm5Mc\ng8RH\r\n=WSof\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"d7c364dba308874f3733fb176d68480f68e9bfe7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.6_1609946096150_0.22874017593966678","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.7-renovate-major-socket-io-packages-89f4c7ca08f0b41131f76ae145822d333febf785":{"name":"@balena/jellyfish-client-sdk","version":"2.7.7-renovate-major-socket-io-packages-89f4c7ca08f0b41131f76ae145822d333febf785","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.7-renovate-major-socket-io-packages-89f4c7ca08f0b41131f76ae145822d333febf785","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"be5b5587397651c685453d22b28cd18dd2894533","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.7-renovate-major-socket-io-packages-89f4c7ca08f0b41131f76ae145822d333febf785.tgz","fileCount":18,"integrity":"sha512-CCjBVx/KImYwOlUN7ApJTV5gBm471hLOY3KP4CIE5uNvEM48rq4Xi9/9z27c/w+Rc4Xi8qSkF+aM3CCgwb8iUw==","signatures":[{"sig":"MEUCIQCZYMm1WTZcnRoGQhc6aBin6gWk9f6E94099kKvlpyeFQIgP5lMzdnRn3FR33BdSpbSoLwO9JyENVi6IK9VKDC1zvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9dScCRA9TVsSAnZWagAAZREQAKI5TbyRokeAmxaOYJTm\nna1RqJEuBq0n4yc2WiuuxXo3qTz2eiztN0TvuZHKo5sncyOTymrofnwuIcLj\n5a+YSw+MpBeUjA8PrxefT97XcPYQYi6xJO6J12UDoa6I7o8KGGWElh4Uo70u\nWE7rx7onqurWUoYblS4k419g+4BWhXGLHM4p8GE43IVXL1uTQgFmMizI9/Jd\n43W4cyY0ZNmGz/KKM0hPzXLMmuRCAIvjAanGmdtAbSr4yGaOA7A69ufMXwfw\nd5XXpd6bZq+C8wPA5WFDdHaT7gK34inqr8mnI2Dgo1uQKzvuxw3oFoRgpmHg\nDrgfDP+A3dzyKxIlbqDQRF2HqSOlWuZFCU4voHjy4Vh6FV5FvhNbnEU8T1Uj\n73Uee56gXdatA/KR0qwydjYGczK62ZBQDQTzthfm3WBsXa3fWKn3nt8Nat9N\n0Ly/ZXtJEZsrX/T4F9BhiElUMyRnXvfZmozP/MhpNNkqfmj3X9jBsuXf/Oew\nlF1erkceYhynBOQ7iLJBtj0CFsViHHk/BrXLU9vf/HZfQU7/5oAHf7Fyu4hf\nnF8+UKjpGrzHYbq0fGsonLo+N5njAR5MbcLsk5aM6sU4OrrKaYlHxK0gzg1A\n/yioofjgk0bVuShCM5+i+K4c/goRbF/DQ2dvTEJggBPHqkDdECr8OryyGBCj\nfAxT\r\n=fVJW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"89f4c7ca08f0b41131f76ae145822d333febf785","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.7-renovate-major-socket-io-packages-89f4c7ca08f0b41131f76ae145822d333febf785_1609946268360_0.5606988063434011","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.7-unlink-reverse-links-a9876a30b838166512391596af1153bccafe3e3f":{"name":"@balena/jellyfish-client-sdk","version":"2.7.7-unlink-reverse-links-a9876a30b838166512391596af1153bccafe3e3f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.7-unlink-reverse-links-a9876a30b838166512391596af1153bccafe3e3f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e9c025719cd7a738c7f7c66c6d3f49b94b0b8395","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.7-unlink-reverse-links-a9876a30b838166512391596af1153bccafe3e3f.tgz","fileCount":18,"integrity":"sha512-yBJO5GRCiIcYNm5gWRSDq5K7ZPjmJ06SI71FuEqcIQLguZslc1DwTBVYCn1IytKYVB9/eIqkTLy2xnkGTSMKjw==","signatures":[{"sig":"MEUCIQDfKu53JbP1myhT8TyflKBjzZIrkWG6ONcr5jC51A03lwIgUIKSnm39fOf79/3mOKNFicQ/rpghoQ4vpnjk4sV622s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/ACMCRA9TVsSAnZWagAAve0P/ikqx0Q0xZznEsBPTPkj\nyoKXSldmm/Noi4mxVtGzi7hWs41SrTwe53Ln+CCPQncLki4vtUWturBJOIgT\nk6sTAA6s7VWP234Ufb3yZjiAW2Q89PohFTQwHgOIGGDYH5Tj6Cs8CB+IAQzu\nIHTgTYEocGQ0bOjISiG4/zcjDytLpWB7+pJEj+O3NXSmD6hopDZvIuDwGgwQ\nkNxsVFlL+PFqw54UMj8CT+BSbPPILDZTcprQiY5XA3MvIF8bvvODaUtjBVue\nWNubhspCLyrJC8r5XLxTSm+bZxJzUPH+By3LDsrU6D54ZVd7sPgmqX1obJpe\nmP+qm8N77QDuSRZh/hvtVzrmbWJyPp/EScL9mXZBBz9ywlrUMHSmiTcqjYIb\nZ4ituWU3ox9kbw4SpesmexgvjtG62f2flWdrWC/iv+cGflV1PLcqMu1byYFP\nj5OwJt0drwPXhtVUWmtKkriqnFEbpbrafPsboY+FFPqBLLcHL76jS8wzlIOq\n/Kcek/eFFp6SyfguvJ5Lwa8T1OvreGaR2cm70NerYx4p8XGcmuoA1AXtd56y\niAca4R2LZAKMOthYNHEeJ2siF1z6cCwze0EuNs1dJM/OhZWapX23aSx41VMz\n7IUrBgirSvkZ8YeEFpthw4Oft61k7GW1gs9uBpWuHcML4xAMohh5ZQa98c8c\nwNRk\r\n=vuKr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a9876a30b838166512391596af1153bccafe3e3f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.7-unlink-reverse-links-a9876a30b838166512391596af1153bccafe3e3f_1610350731642_0.38580964342682655","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.7-unlink-reverse-links-99134519e2ba3fa37ea4868f43dc4211489db050":{"name":"@balena/jellyfish-client-sdk","version":"2.7.7-unlink-reverse-links-99134519e2ba3fa37ea4868f43dc4211489db050","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.7-unlink-reverse-links-99134519e2ba3fa37ea4868f43dc4211489db050","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d00c61d67e6e85b2341b2d1f81df87fbb4033233","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.7-unlink-reverse-links-99134519e2ba3fa37ea4868f43dc4211489db050.tgz","fileCount":18,"integrity":"sha512-ppXf66dZgeWrEi5jIOMQDppahVdDO1Dy5RzUBUPcjjvLnuPE7Azaoxw/VX85dx4LNxWYznLKYnM8EqFyT69YhQ==","signatures":[{"sig":"MEUCIB/IWcW/sFGbvUKbNMYhB9n/JyNkkTCdpTjGc9Fm5l+yAiEA9SiUdooB8jQeA9kUEKabBnu0uDZZxCj0WmQi/u9a5U0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/AVDCRA9TVsSAnZWagAAoJMQAKP9P/WG5mf+R75oKk0P\nY/iXsGnys77A9gapQiZGvfglJSdd96IJQWpAhN9F4R4XuDqaqhIMJtrCc30C\nvzSWGdvpQgRdPfVbVAUc6x7ME0MDxHssfAOcJliiKnVe/30zWYSUNEPozkeu\n83H7ErTa5zTYN+EA/viiBQJjZJx45xxoPlneBd2CRrEqruiZuDmOXi8CLK0k\nGInGWUHAQWn3fb2GXVvMb8yChsd1bod11sz2FHsmUhDiYPYbswEIWP+vHUcJ\njYfNerbYC+XUAJCFQnIBEBRFjwtlerixwADeDWHBI7DhSfJKZU0ptPufxk9r\nLZA1SGFIKtrMWsoHNjSwR5QOyTRH0tAcObTFndCTlFE6EtgU9Csib3q1+sdk\nFV5sQG2bmnky4QwyseMhC/ruJtZFcSx3GsfNKw2XFQw+XvA+/XDnaT2hvxZD\n14ls5LtoESMv0gWyF8FE+Q5ZW9XQ1oL2BIk9UMBMZeQ5Z71QX7kh30p88izo\n1DJJtIfqM0ZqhCmt5Bn+fkNNyrXdylAkbX/MT7rVsFZzPjNTfBswyRkyeZ4j\nRMuYzTClafCQ8EO5N7tDd9bUN+PWmJGa6jDhbH21kd7AkqRRgvqHXgGrzUdb\nDa7w1LidWN42gD8PlrAzqAyCNgf7t8Q+OxxJzOzH4Pbu0bBf7SspW0jo9ux0\nzsI2\r\n=KHo2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"99134519e2ba3fa37ea4868f43dc4211489db050","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.7-unlink-reverse-links-99134519e2ba3fa37ea4868f43dc4211489db050_1610351938619_0.5104724578622521","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.7-unlink-reverse-links-9a3f8722e9dce633d269adf585811728bcdeac8d":{"name":"@balena/jellyfish-client-sdk","version":"2.7.7-unlink-reverse-links-9a3f8722e9dce633d269adf585811728bcdeac8d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.7-unlink-reverse-links-9a3f8722e9dce633d269adf585811728bcdeac8d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a1f98a7dd2c581ccd049953d1073552f28ee33a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.7-unlink-reverse-links-9a3f8722e9dce633d269adf585811728bcdeac8d.tgz","fileCount":18,"integrity":"sha512-Oi/e6Lbr/Hhk6XoQXqboA3nx1BGwrdfVVY1a5NKOsGMjs1cuUmcbnnBJj1+gycRqs3i9PiHT0zBAOHofVNMC8Q==","signatures":[{"sig":"MEUCICgmcGWuTU86GjunfxqnrcdF6jC0WBuC6yNNpNdpncguAiEAyullus9EQbNvX4pr53NGwbhKlqZ6lTGuHEVGV1Qh8gg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":149723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/Ae4CRA9TVsSAnZWagAABDQQAIMLpSZ4PAkg7IVYr02v\n2FhktyeT1/LwwoYGSxIPfjptLmrj0p2E1TXvM5Zu6e/v5VAxgLha2pSKwM3v\nl51HQINbasXsuI+tV4clJkIwg58IMCsLVfd+0Wk7K7OsGq5Rbj8b6l+uurCp\n5xnoq9Yhww/u1TOYpIqJGjtBLJnwAF8NjaOVm/4wbRuQL9W9gSy6OjxTIh+I\nIRaPi27IRG8XYkNRMVn3oOqU/8P+5Lh9asszKrGxQSz17rsp0hlogQnJ+3f3\nPCSgy/OPnuQuVDNW10efUbJxvm7yWlcae7y7nEdURQfDFrk+y8MFmcIS/cLL\nhr2M7x2437MP3uuQwwL+qy5uEHXXNK5emzepTf33tW7bYYFFczTwqx4fjfXV\n1i73+fXI5K6clOX6c2EMC93meHighG9W/FgpUreDkP1m61eolW8gfLQzOTBn\nnF2wpga9vbt+OP0U9lcw2Pt+Ic+Qc5eYA+kev0Y+7A3BdG1cfEOoAtyvtpmK\nZHl9v1jIrvIzsjYktZ8dvkjf4qV8txOjOrGRQDtQe7am8rdlv3zh9DKqvLBZ\nobiqwt/fNdr//x8bRakoLLDRk55iNx/LbQ3+awAtEZQnjNWaZAYna1kcpE4a\nZrIwhkKVUaFnhIVkjH+r7hVNnh6b7vlufQhu8LlXLTcHohCfDSs57g250k8j\n/oUY\r\n=yQ8Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9a3f8722e9dce633d269adf585811728bcdeac8d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.7-unlink-reverse-links-9a3f8722e9dce633d269adf585811728bcdeac8d_1610352567873_0.8792360479800556","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.7-use-company-token-a9aa98cbd2b8df686b4c1f68840c013a33347f69":{"name":"@balena/jellyfish-client-sdk","version":"2.7.7-use-company-token-a9aa98cbd2b8df686b4c1f68840c013a33347f69","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.7-use-company-token-a9aa98cbd2b8df686b4c1f68840c013a33347f69","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7e7e758545cdcac24567dd3f80609c9ec2b52c91","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.7-use-company-token-a9aa98cbd2b8df686b4c1f68840c013a33347f69.tgz","fileCount":18,"integrity":"sha512-HWnIjnQrWDtlg8L8v4fEQQ9ef9ufpmU1e6IFyq3Xfzhwk/3Y2tZ/Qccy6QjwNlY7b1v+qbdsxY/tiNIejqYttw==","signatures":[{"sig":"MEUCIEk2UMF4WqPim43cdcT1OT6aXQ3LlFG+ntfRJFuiQ1VqAiEA7iWljTxZeSqR/asmgYC8ROi2HM3tNbNbp9RbgLL+JLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/AsiCRA9TVsSAnZWagAAAJkP/1yZLyb9zbBbqAwZ2cjl\nKFB6dlPkj9WodCGoqACsuMG+K9I4BD/Ch4aOiu4r6G9yNxDrxcKGs3mluTvl\n4PqJSdBmA8IZ2zKyI6hbeTRi6SROi0Jq4VguxwK7LL4Jup9Ed76zvN7V/NKZ\nH54+PzUvtkPOWfGQ5a5yEWlFCNZfbJjkzbLN44BEr/OK5l1NWuYq64TeUPQ8\n747iRiTfjthoTbmV0pj8dtuL7690Vc7PQ9aY/RXcFT4/LxbT22yo2KYls3/L\nfBsUcGagliWd2EZvpRkxzvoNanYUL1Z2/MqY0238Lw3Zjfe2oap612Ko0y9Y\niIV0XJ2oqu4jHIneoY1KoG3pE3U2ndWjMSHGAaHhDceBifN/Ks3n5MBwU4ik\nC0rbngeBfY7jie1PynxAk9bPfdyrIqw3tLSYnrm+8ooPn75JnyYGzHPbOKJs\n69BK3mfS9pzm1TGNNWXRRQfuGlQq0/pEgAlohW8/BZKLwg0xH11BsdYmFYdO\nmgzbyRI7PCYWae1JZcIL9IqS/DL0qFVq+oDTVaoQaA/DRKLlDHO49E3F9e+q\njGYuWxmJuNH/GCd6rsFFfdS6tcElD9tMWchI9AOGJbLbw9ACPbRfuThc7z2q\nz7eAq7ND1FWe/DgZ2JPaoX3ZfdVDqj8RRwu88V5oLQsaPD4Ojb1YSr2rPOlm\np997\r\n=AtYj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a9aa98cbd2b8df686b4c1f68840c013a33347f69","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.7-use-company-token-a9aa98cbd2b8df686b4c1f68840c013a33347f69_1610353441585_0.2253752117378982","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.7":{"name":"@balena/jellyfish-client-sdk","version":"2.7.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"368d307fd4a4fd3962532e0f20dad2cd99064046","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.7.tgz","fileCount":18,"integrity":"sha512-bR15sqhAu2ZcDJ2uRXHb/egV1t5YY1pkawber7AGqQHoL+HPi6BYhgqICUh5oXaAbnsIqE4UssGGEDg12gWRcg==","signatures":[{"sig":"MEUCIQDW3doIPGLTaPaXiyOnHqga/oj/AI2E/oBPDjIruZ3T/gIgNVHvt5V5dvtCVyOfXtkLJAvfV0cWLT5TQnfbC1Y7VlI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/AvrCRA9TVsSAnZWagAATRcP/RFYQPpDSZ7FZbrhY0+l\nHdT/2cnPJE8KvzRYNEZQBbqtuXwuVZuOxgaaCXQUHumRc/g72gFsGFoF5Hvw\nr4TRXd1uQXOX9XQmizRWxfrNemciQc3VkobNlsNrWrUCQOGUzgnZjI8S9yzV\nOcyfqQfFdRqrfeKXoyRQacB7wBnTMAGBxEVZxeDjlMCEQOulJIe9w7cuxwpo\nIJo41gq/qYKaSCeKTTLDNYpkwm+Br7QRo0L8HwuvfoO26fsthJOeKtuHexuD\n7SO4P18UReaE/37hsnqTnAPzQF3C2ip/z1iPtw1cF/HEoYd0PNKnvl7teG0X\ne+Lx/qQNqmF1bjfVQe8lO0Ro1jcBoiEvcxcLGjVoVKtG7NB1nwRPCec7PQY+\nY+FEBt4XZY1SNJaASHhfV1UvqqmfbsdC/i0oi4P0CSjzaJXHfLnNrZqcqEO9\nRKWJuJ5VWFwO42WiKuKi5fRSxGHAt3wsyx/JD4wSd50nbHiGJ3avk4NVMcko\nzJNfE6lKBYJr2Sl7pchL4b5kiVk5WpPOG0hWWu/Ab8Ltcs+kR4q5G00Uvuh4\nph/Orb/oLMU9LU0We01upFEtV4CRZHoCBb/OqBpduBD/2rAHZsv5OUZEiHG1\n9PZz9iqC90YbZtKdJCTCxxb5NJFezlImuR2u7NO+aEkDk/zWHFB7AGD0tHat\nSbkK\r\n=BgII\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"c6d714260f1f918ec902c1fff923263301bbaae0","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.7_1610353642438_0.5165579255460693","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.0-sales-thread-linked-to-issue-19bbd685298589850caab36d0f596a27e4891dd6":{"name":"@balena/jellyfish-client-sdk","version":"2.8.0-sales-thread-linked-to-issue-19bbd685298589850caab36d0f596a27e4891dd6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.0-sales-thread-linked-to-issue-19bbd685298589850caab36d0f596a27e4891dd6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1cbf77d34ca59e00bb573bf1c649a60b8e5acbe4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.0-sales-thread-linked-to-issue-19bbd685298589850caab36d0f596a27e4891dd6.tgz","fileCount":18,"integrity":"sha512-ZF6oCyTGPdlyL/xVP9UqlJQvBVagAUFiKLKmJxNAQqkDOkgQekMmI4ZCmmOM+vi9iJYdidd+Csx+IDdWveDPfQ==","signatures":[{"sig":"MEUCIFLXGFfvS2PNv9gMHoYezuaC9pSjOMj7u/naVPG7vUZrAiEA0WRF9COGhJFoL87+eqd2IrzhBLL0tJE7EPZ+KvPuaJo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/AwWCRA9TVsSAnZWagAAHmYP/R2b6nEVsrbp2YSi98Le\neBjWmc2+RV4C5mijWgm8MPa76AucYDi2ry7RYAwdW8V97ZzmA4wKTO+ZrABZ\nt2WiVjbP+fIr9t9VJQfG1pHxzJjrDuYSVxhDdVGVOovnhiEQmc58MFGK8EiL\nk1EJZbS4xVMUEGmNhxZVt3uQ05sHoj8sAhxzV4iRRhzt6E0YE684VEYzlxWb\n4THBuc0NkKr6yaM47l5aUgeLjLyiHqp9inoMmgKYFhREYLgRXUr1qrPxgWkf\nphd+DmQvIT1SGjnWI9JWlhszzi+CTvGj0o0frCR7UWN9E+Jeenb2JrH7Y2vi\nP6R6ABf+4FzCN46vzLAOoLGZYuuH78uB9anHGJocBe9WehKG41tPhAKTpQWA\nfD02x3jKN9TL8ZX5gTmUiaZ2W06wAHqBd/Zkzw7rCC8LTip8vzY1lGXVMVFx\nwozOyuuQ52DN7xYnY64mtQAgQYIJ+dIvYwL2EVSe105ajHs2G2Z1wCjBC9N3\nOx93adMIkOfsWOJUaszM+tN5LCC6OOD8h1m1MzMR/j8Ox+lQFXXSGOHtocIk\nIGBfSE6JydlRe8rOmzILHlQ2dE8uziWcr+6Hg69Izkr5h0reURkI6YXf8m1S\nkfDncwY6980L4a0Dqk6yRrfYpfJJgoAOuMv/LOubKlhJTuBeJy5Ks1rjqgfn\nDcjT\r\n=lY0a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"19bbd685298589850caab36d0f596a27e4891dd6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.0-sales-thread-linked-to-issue-19bbd685298589850caab36d0f596a27e4891dd6_1610353686522_0.8739133813669782","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.7.8-renovate-major-socket-io-packages-b20c041177e8b4f643491d448d57d2d653bfaf0f":{"name":"@balena/jellyfish-client-sdk","version":"2.7.8-renovate-major-socket-io-packages-b20c041177e8b4f643491d448d57d2d653bfaf0f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.7.8-renovate-major-socket-io-packages-b20c041177e8b4f643491d448d57d2d653bfaf0f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"65442da3ee6ab780bde990d0d91f67f0d8c62b49","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.7.8-renovate-major-socket-io-packages-b20c041177e8b4f643491d448d57d2d653bfaf0f.tgz","fileCount":18,"integrity":"sha512-G42iw7ac9V3ElaYLtW4QRHPn/WzER0FUc5k5ifdVgYfgliCKojIX4ZPHS7UI5B1OUiBuXtuYoid+PicJBEGfDw==","signatures":[{"sig":"MEUCIFvOnNeH8BVVYaQ8bsSMCeL8Y3JUhzI4tXhz0tOs4WVcAiEAyseKaE/JsBBlYMZ6USRBXtNXN32Y99VS37RzjCoyS6Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145582,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/AyHCRA9TVsSAnZWagAAlBAP/jmj7dI/MhwQLtIddkKm\nGG98oVI6edxXzOiobN7wMON+gJgxSkiADAaxpR/EsFRL2Z9Fua4bgs4CBfWb\nyd/hN4KmJ7EhCObn8dBP3tqa8IBlleSJyo+tS9DFj7bATbvuGDhPnkvQHDit\nkOjDFrHdkh1HMugYExXp+HPlS+o7AkmHPWXXLmEIXCrIkuxnhA83F0n+5yyl\nIuUT7/Vc45azUOJ6cV+qfcQ2g4ql9RylkaJSkzfS08Q//+dXOsUWki7YkTN8\nhTBLHgh3bINvvkOW+efwUQlcpKIe9iOvKEZz8xzYEH9dt3Zc2RVq42mwscUI\nXfTIRWw+xpjB18kx8HMyIvioDRwSw3387Tv8+OeNeY/uxo86VB8PUjDS8RoM\nLCV3Gcxb8euUx1dt5AB/VA1L9chA9ieit4qI98w1Ly7Tp5jZwZpZIzUMGwU7\nYbT6CTVgPEo7/z5LKQ/bRe6X25qwf+5hJDwqdoDBq2fyIup6edeMghVqUjNi\nSbnk7Lkc/BcVOu21HPbzthb/PMzY7i6m7ZrdX9/UETRzRigttmEm5ca01WAk\nEZNQqisCYFGw8n9c+SXzCTuyXrJA97ToElcsIXlWEUEN7y/V7oxRIlUHOrPx\nkUzJeOIVGGiL2Uszlysn1ZlOmLicUMdeNCsq4DwoRPbdFRza/t5z2FiAFiY0\n8yBW\r\n=2g+A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b20c041177e8b4f643491d448d57d2d653bfaf0f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.7.8-renovate-major-socket-io-packages-b20c041177e8b4f643491d448d57d2d653bfaf0f_1610353799205_0.554875374675619","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.0-sales-thread-linked-to-issue-77c8d700536a8f32c1961d182800f533eb64515b":{"name":"@balena/jellyfish-client-sdk","version":"2.8.0-sales-thread-linked-to-issue-77c8d700536a8f32c1961d182800f533eb64515b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.0-sales-thread-linked-to-issue-77c8d700536a8f32c1961d182800f533eb64515b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b90dc5876ba2eeb29531556f1486cee7279b1b47","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.0-sales-thread-linked-to-issue-77c8d700536a8f32c1961d182800f533eb64515b.tgz","fileCount":18,"integrity":"sha512-7zeQ+wCZNExfcHy6T3x3THvP0y/uNbjmmGhS72NQbW5dVzCP4EiM+0942fV6NNJ+pDTTjb10Ta28Wj2nkv78zg==","signatures":[{"sig":"MEUCIQClczLnGOhntcqAb5pz83bRlBu9QwdSs6SvOnfHKSWGqAIgVuT2bkdMbUUL2dlLa9Is8hJMgIW21cq0uopLnZ2ocH0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/A0pCRA9TVsSAnZWagAAs5cP/iWURDtJriS7lPJy/pwM\n5PnqAxHW49zjFkrGSiPlaJLnCNJOdCMCpwRnLpOsDzPqzibpLajbAx0PBkFI\nRKCDU+aKvh7XRBdeFiYEU4tXE2zbs7/1j6BODmagi2WSFv2OJvrn6oQI7XCZ\nPCzKBqcqA3k8BcNJQHgCeLAFWvVrhJ2tIaYyTwp4dLr3LX8p/Zmqt2L0Nir9\npFPqV5kfxCdCBi0TMfSFFhoS5z9wrESBs8+VcMOLNfitDETLVJnaPrHQcy3E\njeuXVIgkgnwwGJC6SG5fuP5JUAewRIUxG3WMxYnY1WkUU/53QcQtJ5iGsaBi\nKMfvv3EdwRxVZ0Pqk/tt4SFe47oMpBMavnb7PKpsB4+EG/LhOkJo3BNtR+JY\n8uglVw2QdxmrxlKGJ4OO79Mw6aTY/qH41v+s3g2AROPeO3oIAnfPxPXgpYRk\n2rKchEGOZlilCXEbdOXvn+WeeJ2fyXqwhwmK0pYUhmOlMwcDk0AiACMDl5CI\n2r6KQp5Q9ZSINavQw/DSsCvYoighN1PVgc3ELjwRtoz1Ko1x/DYDhysQ4mB6\np4csDyC2Xg+5vbeSzINO9dCyNDa9nsp2vYtcH28dvo+wSL6tQPPOzOt5f+BV\noORg3DPlr9peGRBodWWowkiwMenpJdhbbiwAs+HbN4xJ5MziA7OVq/4K+kxK\ncXFJ\r\n=vUEX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"77c8d700536a8f32c1961d182800f533eb64515b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.0-sales-thread-linked-to-issue-77c8d700536a8f32c1961d182800f533eb64515b_1610353961442_0.8624708935253909","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.0":{"name":"@balena/jellyfish-client-sdk","version":"2.8.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"666a22bbbbcced928b91933b24e02cddb6a017d4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.0.tgz","fileCount":18,"integrity":"sha512-EIeZYr9r0YjLc4o2M055tBgXm3H9J6h/edASvTQhHKd3AOtT7cMTsbbJcpj7Chk6NCAtUEzSsrEWEcxyrkmgXA==","signatures":[{"sig":"MEQCIEkCGv9VgsIwwCZDhWiWage4rsvlmBvPaG9x8cNPfQWZAiBP+My9MntkN2waduFfdcr3y66niy8/H8gMxDvB5FTMsg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/BI/CRA9TVsSAnZWagAAP/UQAIydyxB9+IqAAlbi3I4B\nXkxzkzcUTSI3t180YrLaPskhNzINWYwg085liQycW5hlfgtq0lE8HJvkeSPq\n56aQq1Orhs3qy8q4TSIip1R5ZxOQPqDKnc++DLmw30yo65HKjaY8vCE311o/\ndifUHcacUA9DNYXTUe34JyurB82bHW0BXZIeqVFnCbPD1K6A8a9Jc9zdwHXX\nwu6z+6yTXdB7tXtNpBTOW81iaIGOXwjBUXOLNOcyNTzd3hgtpxPy3YS9WGPE\ngW9JHSIsUyDjxw+KChhvejspnjuRVSQVIy6v/gzvPPz8FD2M1E7Qa6taXEwM\nBeRHTD6t0kg5OxL7Jgwl5c9sGX7cPrvxyYEXOzKZWWCqzN0qMLwvliPSYDKx\nkeIpKPG9a9u3G4S7hhk9Dc/UHxTzJ/XEm+YRaSrPKCqp6KvJSnJ1kDiI4oUl\nVY9TO8HdsHNVAFzeW+785iOKsf6dXNq5i1DFiWKcDgEnjyIQoGHWK/YdAlDZ\npn/CcBUbZHpVNfRfSbFYTCPKsqv6Tx74oG2VAjKkaQqAIPqINiID+ATLj+g4\nGiEmsl8QxZB+Pr2I9yGa2xlPmkZWEvnlHW8nAC1ohyDieXe5Ui4ldX4kL89e\nKOl05OpN/zEtyheT2QDceDqTlx/PBg2Wb76MpnHRPwUu/OU7zMyAgTgtDjEb\n77Mi\r\n=1Lop\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"a21396927cc1fad64836d1ae9ab4c142183dd1f1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.0_1610355263293_0.5427024666173974","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.1-renovate-major-socket-io-packages-709a06744a72f09d7f5a32fd073616a2d6fd8fda":{"name":"@balena/jellyfish-client-sdk","version":"2.8.1-renovate-major-socket-io-packages-709a06744a72f09d7f5a32fd073616a2d6fd8fda","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.1-renovate-major-socket-io-packages-709a06744a72f09d7f5a32fd073616a2d6fd8fda","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9560a560695bf6cb7aeac325d10275232f4ac3be","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.1-renovate-major-socket-io-packages-709a06744a72f09d7f5a32fd073616a2d6fd8fda.tgz","fileCount":18,"integrity":"sha512-c0MSXIrloTDYfLoXQCx2iHy59dW4f6v6oES+4gZ3ukuP3IDG6okOjLII+osXkHb7NXHHCu+ph7CmSzZhTgOYDQ==","signatures":[{"sig":"MEUCID3uC0QUtbFH3w+XznovS0wYexzSZC9Ju0O9QAZ+1cOnAiEA/D3BmbFlN7hrhGPBv8Q9Qomo5tGm2HmOkNem/ocDVBE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/BNoCRA9TVsSAnZWagAA1Z4QAIGCkNsRPgn2Tsd9AYIP\nlndJk7KZXpYLiN0JkiC9zL8otSD/hbSSCdb/nEWf9k/oJ32wCn9+NxH2Nfn+\nwyDIs03KWYbdvXZjfGxOVEe8AVr+DxzkwxhWn942MWcHD1cK6o8mU4zmz1ug\n7gV6wI1IlKhU1x5zeHnNnIVvw5Wa6wFtQHG0a2kQim56Uyyke0rpGTjLetCB\ndp07ZN3uc5QNXtjH/Yw4BoH/BpjMCZFgPovi95/oDxbnGnFhoMN0VRJALGnX\nJHwSmap/8xo44ARoGGb0M1fsAPa4nOUc7716nkDqF3nBE0DYbiyIQGVavkmL\nHZemlQIPANQYPwL/qbdsl4LwGeAJ7iOicG9sJyVu0A5U/eoQCB/1DwxOhQdm\nIDNYCmE2NKptj7jQe33NEOJ5pMFANEkYFINJby0fZ7W+rzWCGE3UgAnmy4CE\n45niGRnlbeqQpXkXlwIN6jC6AAWujKZuOUrO7IsVBKQEORoq1EwoHvqeVIQq\nTrNlr4NTHqVmG4hNLsHSJM4wJftO0IWoPgmvC3Z0dVjmFRn+wRlkAzvOrbXg\n/tiTVplxYUwQ70OAiCXOOivieDjVoE5AQOvFYqRmQB67x5Z3dHQmSm+4OS/L\nNRuA2S+lnes/9VC+drYSaig5NIjNQ+oeBBEMufBLr3tfXw2gSjA2Ta+Igb/4\nNX1T\r\n=2KlH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"709a06744a72f09d7f5a32fd073616a2d6fd8fda","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.1-renovate-major-socket-io-packages-709a06744a72f09d7f5a32fd073616a2d6fd8fda_1610355559612_0.7271842858868807","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.1-unlink-reverse-links-431ec965ad00e44d1f9bb7e0b972f9d045e592f5":{"name":"@balena/jellyfish-client-sdk","version":"2.8.1-unlink-reverse-links-431ec965ad00e44d1f9bb7e0b972f9d045e592f5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.1-unlink-reverse-links-431ec965ad00e44d1f9bb7e0b972f9d045e592f5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a1843a89171b09564fefaaede9c674a443740e29","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.1-unlink-reverse-links-431ec965ad00e44d1f9bb7e0b972f9d045e592f5.tgz","fileCount":18,"integrity":"sha512-RMqTc3xAhhf+Fj7+P66+QLWYPzhhLCw7XKTOWuyycP9GRnb8qQ+T2ZCSjP3d/s21i+JxTgseukDkkEuOZMXzBw==","signatures":[{"sig":"MEYCIQDvccjxsqO4cDOFfomU/WIraNhVGIM7bKmxTcrciBRg0AIhAKhojtFUo1M6eiuCWcGZ1uj22Igw4R6BaVAJkk7NfbiT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/B2SCRA9TVsSAnZWagAA6MgQAJxpEWjCZwFLTdQJOkc4\ncwRxttG0p0uzgaPBR3l/R8Q6mBih7NECftYp4ZyUalsNpcV6nbnWdfoLeaNq\niTvQKmQDsf/rsV092CTLj/4K4IdCcrPwWki+lgYH22Ne7BYNfduSE6NQPru5\n+Oxe0IZZnSZZWwkq4YX82WVvfejhBLmwD479iZzWY2RiS+kIGnIm0B7p7+0A\ncOnWexp5hShw91in3ZVdk4oLEhC1JbGuzvqvCX73k2U8hOBpEcS4BhwUt4RQ\nCVwHixqW2pRRb3YbGRuXrftB6cbNC33/stbHZ2RVPMtVqNPzEJVEP3SMqoRv\nHUNIsgwvrBC6Gis5gynEhvv6ZogvxOQ5/qqPYAMLI5va30+Y/m9FBvQvKUeX\nJmnX63WSq/EIWBaqXXnhNxlAVNANY4Yg+G/Z38YZBrjSaPZjJnN8LNgea7p8\nvVR0PiCEsahv09vxJv7hPsXLORj4cbAflcrySiFje9amYil51hJMLL0hZS+M\nCaMlMzB1JwtvchHkc7JpIWCUXjlqMh0rJlBPHF8uqIGtmTEkkPA73BucHXgq\n03lKKqLr0CZ+XznCau1lVaOcBKqYuutQ974+GgiOcWitLIu/nn3EQbkgzBAB\nXumn3shBGlS91dOPOQmAC0DufilERHtiyGO1IZwU/JG47ntl2AH9VV2SgqCt\nyM4U\r\n=KSH1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"431ec965ad00e44d1f9bb7e0b972f9d045e592f5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.1-unlink-reverse-links-431ec965ad00e44d1f9bb7e0b972f9d045e592f5_1610358161788_0.8247644014072331","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.1":{"name":"@balena/jellyfish-client-sdk","version":"2.8.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ac7aa24e27743a78a8dba8602191673d893cbf29","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.1.tgz","fileCount":18,"integrity":"sha512-xgnPMCMAcipg6Ce6mWNVZQboGvPelSi8Ep6Y7Ys1ffmsbFpwAsjPjH+L5S5snAl438O5IkiPHy/QHrq8BHuOjQ==","signatures":[{"sig":"MEQCICvb33HBUtX57bjkXfw08yZXxtydtkoYWhnLtEBJXgjLAiApgESZrOX32EadgKZUObRUV3Ox4UAQ//huCRJlDZPuYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/B5UCRA9TVsSAnZWagAAG6IP/jdIUClbGxl18+mBh5sh\nFpXFvksIM9YVZEJKU9+HVEV4o4EVdLnn0uZWEnVIau3FIpsmQ0rALQbeaMIw\n+Jxd4h8MKpwZ09U77HzKOe9s4ritHdP1q4inQNRshy3hlC6q5Hl7wRrFtTWn\nEfqTOQ6kHBU8mg1/obN8cVIc43YcoleSzdysQb2pw2ood6A6diJAcmK9LzU8\nQldlpuHh+kVJf/wQsTa2/lBjm5blAquIpzneH6uZQnuJZIxkufHsVazf11rt\nP4uRUASKRFE9dNuQd3XhFvGQsA8t3v+Jyjmvr4RyMJsTN8tLDPba5G1DKp+d\n40TzmRb/xjdrbs80YVT7mWACnJ4DmOF0LRshkzqi1HDRPaCZT8zjPmg9w1Jn\nnJO+1xfomLb8t+nkmhYbrR4GZ57fENNCUdU/8+r7UOU29UKbLg3Fl4etLUxr\ncjzSzbuiFl5DltimlLdvfc3hVzgLqxYMP+UFIhK4LsYV2tfHlfMTT9s2Pj6R\nuu2R5S9Ruuah0uzE9PC3nRuR14PvZnu2Lw+KETNv2nHJfi9VKoqN5MMR3rqk\nOWV6GcyQBGeeURPce+8+5epGN+VHs0JjosPnOzeky4mGngXPLdGDZksA6ttL\npJ38/GuabYufw+d78tOFWCoKx4nXVdT5Utp5DC5CHBjU30UuXlqv6ljVdocR\n1vv5\r\n=2OK0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"3024ed14cccec667e0cecd50df01756ae4e97b2a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.1_1610358355694_0.9159396275068696","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.2-renovate-major-socket-io-packages-879147c8eceb7aaf7d9d88819154b4a7cce01643":{"name":"@balena/jellyfish-client-sdk","version":"2.8.2-renovate-major-socket-io-packages-879147c8eceb7aaf7d9d88819154b4a7cce01643","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.2-renovate-major-socket-io-packages-879147c8eceb7aaf7d9d88819154b4a7cce01643","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"80e05bef73c45ec52e3f57bb238efa46fc7a9b3c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.2-renovate-major-socket-io-packages-879147c8eceb7aaf7d9d88819154b4a7cce01643.tgz","fileCount":18,"integrity":"sha512-MFGx8gEf5ax1mF0d054uixbJl1kCc0eSJWYH/t3abX/3fzbHzwTQA4sAwPjSmCXQTcCwQzy+x/584UZWtDC7bg==","signatures":[{"sig":"MEYCIQDHGPd+nv9YifEN4HhnFfTujdL74JeAskFDPzbmtKMtRwIhAMb8gawvuA9b9QUwYMAbcLpEf1HY3uFq+d+rhITeJeB5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/B+WCRA9TVsSAnZWagAAf+sP/118LU1tB/aSYelVLjA7\nPvwwIs/v9QycEUQfncPH08v3JyPQz2f4loauAK9FwvHL4Owg4EDL26niGV9Y\n1uViojW4IrAj+UvY6RaEL8b3okH/OLiRlSktDdRgrqshW9X3w5P1LeTsAgAw\ng060GG3fNzBsdMUnanhqkWIS1Sa17dhR4hOX3GzHF7FShDtM0654EFsvZhpP\nv/B0qdawG9mkUJKDPHn4VXc5SmexUDlwQXHxFbJ7ooSgC5n31C3dn04rSb+A\nvIBMbje3Yp6z7VSa33AOT4aX7EqZzjMN0LziQRF3LCETocKkfU3gNKaxxm2O\nJHfCsTodywdS1N12hqNC4GQNSDO+7MzE/eSr6X8z3MyYBgKmurpfSg++hQOk\nO42VjmtaeNU1zxsoHGV1xIkmvjjDS69GuAXQlVL3sOPLZTvDgr+TqZnCZU92\n51Y9gNDlpWwUVsmetz2PtDNcphOG3Em3jiz5LQSunmgqqME3ie+bKQlWLHJr\nnSYiI1+HI4xVcIkbbmVAX/PsojA0fu0MrTH7FLAm9wHsIXtCtcXG5BDexUq/\nkjbdZPja/W3r5VqDpBummlTQUF1TDJVf15UDOV6JbUvigTFEMuiqUni0D+cS\nO5Q7ojhuWEDkPPqvcLPDVwrzvHXg+IueIGRgrLHQ5+lsLiM4+ZZ3pvkECqet\n4mN4\r\n=6n72\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"879147c8eceb7aaf7d9d88819154b4a7cce01643","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.2-renovate-major-socket-io-packages-879147c8eceb7aaf7d9d88819154b4a7cce01643_1610358678341_0.27216412963827685","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.2-renovate-eslint-plugin-jsdoc-31-x-29a71d3c4d25f1be42a51677892853286a567418":{"name":"@balena/jellyfish-client-sdk","version":"2.8.2-renovate-eslint-plugin-jsdoc-31-x-29a71d3c4d25f1be42a51677892853286a567418","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.2-renovate-eslint-plugin-jsdoc-31-x-29a71d3c4d25f1be42a51677892853286a567418","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75f97252d50482838d2b3e239e5949b3a63c5598","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.2-renovate-eslint-plugin-jsdoc-31-x-29a71d3c4d25f1be42a51677892853286a567418.tgz","fileCount":18,"integrity":"sha512-9MPaEEruMYGahqGf7Y3gfcE/8E3rlKYtNSGqj3X3rIO6C/ioaVF4zGcaapXNMOMEoSqseQRxojWtDTHp9qT5xg==","signatures":[{"sig":"MEQCIGNeRoUSjbK6+KBPtgWZf+LyAff4MS7lkqn1YiVY3WqJAiAWLtK3P6DhJZgKdV5ZuKsPCFH1wIh8ROypyVPimEeG7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/FRpCRA9TVsSAnZWagAAlZIP/ArUjWb1b4L3N3S/rWEg\ngYB33mQQuD8MDDqnPppgdUBamfZKnH/KxePDocG7ZvqyNsDDbvX0288iR/F7\nRfAt+E8rKcchBGyFm67/en1Rh+uLfBhMsGvE5dCzhFDzHh8RhUaWyFQqoywX\nZPtRcJZf5dXZz/R5ujFyW+oRUMjU2ZBY5RDD3Y/cohRTm0ISCkepuYPvXHBQ\n/0ndmwu1Xu0VHdDsmPHzBrkL7qMrzAFG+GVxABbRXUKcZ0DqJ1/1PnaysnsZ\nnVgCQdIwLVtJQtoMVjxDRN4lC8a1SdA1KNhT/keJ66s8+TLUq7yAQWhfNcTM\nbmNRdIm1YAAXnXVzNpFye4IMlR323vtm8P90V/0XxsegdIUsDiWoEyahSZJ/\nXxxOP25RzJzUBqs3rd6yLA9rCCNsHvAEf9tEGoJjk+D8aKD0czvUMe8df2tt\nmgN2TtXjQalmX7gevr5S0yDreHRhMczA7Yybt9FIyRgs8InOuzkI3mmuHti9\n10ZceexL6tsts3dGJA3qp0aMoaI4Jip5REc6VQ5N1StcrCS9Di3xMTeDtzEw\nOg6dmbXWggX53TLk5e38dUZLzKcV/UE6olvaEgvmIaAAjcFIAYWQEMhDh39h\n39rXC/73UPoEny+0ezDWwBiXnQbzamS1aCmNK6CDSsBsd8oLpX+QW9rctpKx\n//qx\r\n=DinQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"29a71d3c4d25f1be42a51677892853286a567418","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.2-renovate-eslint-plugin-jsdoc-31-x-29a71d3c4d25f1be42a51677892853286a567418_1610372201050_0.8491622480274701","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.8.2-renovate-eslint-plugin-jsdoc-31-x-aab2c53f7c97420ea48aeeba5e2419d10c0267a8":{"name":"@balena/jellyfish-client-sdk","version":"2.8.2-renovate-eslint-plugin-jsdoc-31-x-aab2c53f7c97420ea48aeeba5e2419d10c0267a8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.8.2-renovate-eslint-plugin-jsdoc-31-x-aab2c53f7c97420ea48aeeba5e2419d10c0267a8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9bddb6cb4591e8af017c01d1a3a2fd90bb399261","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.8.2-renovate-eslint-plugin-jsdoc-31-x-aab2c53f7c97420ea48aeeba5e2419d10c0267a8.tgz","fileCount":18,"integrity":"sha512-/m6kU+K02QfyXywHr+ws9zTTcPFM0yx4i/di9ExbI64oWszz3fsaOkGWAj7LMtY5pxNhjNvbIwDu1LLtvvy55g==","signatures":[{"sig":"MEQCICbgTMs3nS2ZSz1ZN9ypyxh8xrHCDQLNXDfiM/xZPxnWAiB672qMad1/yXRDpyRR5cuNdYwSzhn3Z8XuycqunbFYFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/Iy3CRA9TVsSAnZWagAA+zcQAKIhq5GwCklSptUarZTB\nltl2hsJlp0IFPrMLwtdSb9DtQWbkIDHpEMZyKWrtrmBl5yiJv1Ka0lnjW4+9\nIRdn79GWcmzJxF0/fA/PWl+kRlMfo0sMqvNWXwgLLyiR2RGg74bePsAk9VI5\nbd5OWvscElT5kwpBzHNOt8Xoq4VETS33mBIHPMZBQOUFfaR6zze1EBJI+cc8\nhJBmL25VJdeBV0aTp3IEVrdxDSc3AJvhFbCe57OwlQdTwbToNZ2Rfkb7CPve\n1CjdLQNhrj0uz8pvmHkF8iP9uq82lJG8M0rJ1C5/UYKMaUDheJfILugVsBYv\noSzFW5bKDC/YYp2eLALgo0nPZhmx+LVl5DTB5/qhNwYoQb1i0QLisQXHTcff\naag4fOXXk8GZbo6xEhw5zhiRL14ArINk6bLdD+giqRFDF5PFn3Ka0IJBOxSh\ngDZzVKGJkTe6ik7s/9H11MzBTAycw9UhbzLtDgSxMhh8SYZLMcT00GelhPsN\n7o+hmIqmnJnu7ZrU9IT+L1P/KJkfk9hpFa0hwR2C2tjueSV42csTfTpxrLQi\nfWa+CIdpsZC8AlvhzVUpB/NmHRKge9q1jaubaoaF5ofkPxKMr8H6ybNNOA2p\nXCVu9unXIIgFC1zvOfe/jHx6QG3ve7ElxjzCVk+wroPtNj4PM6mU0vtiHEYD\n/btI\r\n=hf/r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"aab2c53f7c97420ea48aeeba5e2419d10c0267a8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.8.2-renovate-eslint-plugin-jsdoc-31-x-aab2c53f7c97420ea48aeeba5e2419d10c0267a8_1610386614940_0.6763134961837338","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.9.0-link-patterns-and-threads-83c29f891661d1963f4ce37dcdf8a89854c3d886":{"name":"@balena/jellyfish-client-sdk","version":"2.9.0-link-patterns-and-threads-83c29f891661d1963f4ce37dcdf8a89854c3d886","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.9.0-link-patterns-and-threads-83c29f891661d1963f4ce37dcdf8a89854c3d886","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d07e01cf5b0759c55a4e5d3f3d89ae4231d89a19","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.9.0-link-patterns-and-threads-83c29f891661d1963f4ce37dcdf8a89854c3d886.tgz","fileCount":18,"integrity":"sha512-gYg0fx3TBBxZt+BD1K7fV7nZr/a6pKijuqYTA15yaXPFY1EDDTyzk+4VAQO6oJZ2LwFjjc9V6E15b9a1Rl0Y6A==","signatures":[{"sig":"MEYCIQC8yap2Ez0v3PMfGEcO0mt6sOUSldC14WLhmEa3AcXQ1gIhAI3z8O+Ntet333wsA08LIzbc9RtfDzPV3hqitJMyzhuK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/mS2CRA9TVsSAnZWagAAQIsP+wQS1RgvoGqkjTzVpO2n\ncab3LIybZFDBJbeNGsZG8jyW2ucPQMnFLW3gHu0JUIadJqby+jpH9xHuAzbW\neNGd82GxQeFowIB4nKOGx9NoCdXrtReK2n+wJ63PX7S21PjorqXZRKaaGVaZ\nTjIvMKdtvaACzEVq6xQzCxU6SZI9bYsZ3CxVTx0F/oq/KwWe45CjbfQY5F/W\npe3gkarYo+h/QZObm/Y6Dimj6nARUYydkupTZokjp/KoB0OBrL0xLMaAMCaX\nRnVjjCLe2kn4Zo6ipO9wmJSZp2Y+Kq3GOb36Eyfe9choN6dBKLPkYq9I+U0F\nRq8wcJlBI8Ktu1ihTOxs8hksTIHiki/Vm+DQltQFGcn+p/x7rvpEAx1fqUiX\nNG0rNV+mrysizBRUjOrFROpgeJZrAbbQeIpXns7BWp2camt2U057pAlNdjJE\ncIKFkt/QSjtmzTqpswPQeLiIERy/UsTjD6ZwMd/K1LLLqPHTTpMwy0VMLNPz\n798IURqIBenMLkp7pPqOu8y1Uc86u8x4XR9ZvBNp2HxvMV+1uSxzBfKgVhj5\nnIm5DxBJhsa/CHrTS03V6k7LJCqA+70gnPVInVHODYg4Ncnmsa5j3F4SzmMa\ny8rOKPgBUW/a5gc+rdTYqz679L+khan5CSHd1KlrZl8c+FEoW9J7Ckcs06eB\nIuHG\r\n=4nTh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"83c29f891661d1963f4ce37dcdf8a89854c3d886","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.9.0-link-patterns-and-threads-83c29f891661d1963f4ce37dcdf8a89854c3d886_1610507446326_0.0691530768216655","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.9.0":{"name":"@balena/jellyfish-client-sdk","version":"2.9.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.9.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75a2ac0a094c5c898ab3b30dfe60ae17c5b2f0e8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.9.0.tgz","fileCount":18,"integrity":"sha512-JpB21gHCzqb2Q5onYm/W18JZMz7e1bYyA79uPvaJLMWvdwC8IUf5p+UZsEi10hYszDQHVvNT/omsdmImhTdV6A==","signatures":[{"sig":"MEQCIA1jV8aENMh+6I6HulzgfkW6hZi/8L/DJfIA7JT1C9omAiBohlACDvt/njbAm2Jzrpi0Ep3ntxlOJeWJrrSSfCZSQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/53KCRA9TVsSAnZWagAATl4P/iO3++M0ga1eRrjlAYMv\nIXSMBar6r9SgviIwArQxLOmMqC+hvneMwuqEWxdDZBN9Exoz2imJ6ELbrBPf\nb1AlY8GAwdximWPzAzFJi7EJCieaagnqae0OYD/S84frMlut/OXczULTFoxe\nO+QtiHVJG/LUx4gzz9rZA6CKLqC0KewSdafY7Sagr5iPinI5AT8jPwCiiblw\nmXWX8xTyWXVFlHr6wC54S0cKJScKvpp6YNk46X/eYZDREkbIIF3i7aKIsg3B\nc8Hpn2Ng6ctT4liHlKj/leg0iW067TqYM4hqPtVFxmY5lcM0Ek4pzsa+Polt\nwkMn7Etv0T2zef+fY4pTER6ERmzczSXC/gLgv0/WxBD5QfbgMe318O0+mcm7\nsuooH2KTQElqdyfbLVXkWspNxI3fQrLQqlEAzcIzfrUPd3ydHUIeSFBYpXFR\nGYgLh1aeXQQj3ZLT7XIrS5gTd1vQWoxIIaO2n8Zlz6LOV9Gm0L9IitqpZW9s\n6YI6mDHjBqT7HDPJWyK+27Khe6ZppnxRz2YIfEZWAIyLELtRy0wNffMdYGp8\nh7qM1OBxROMuaAWMN6reWV+uKexqR8PkYavRsQjZV15Rk/T6hX5dDs4w7P7T\n0mTpS3SfvsW6N5o5zEJSxzkOp2EmAfA+XStB8+J0O8fEkDovpdcEbCutjT/f\nm72a\r\n=r9W4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"75756e336ec9b88f17ff7e89b7ceb0a3eb90b91b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.9.0_1610587593404_0.31705194143305415","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.9.1-renovate-eslint-plugin-jsdoc-31-x-c935a247ef5e059be673be4f49e6491da48d3996":{"name":"@balena/jellyfish-client-sdk","version":"2.9.1-renovate-eslint-plugin-jsdoc-31-x-c935a247ef5e059be673be4f49e6491da48d3996","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.9.1-renovate-eslint-plugin-jsdoc-31-x-c935a247ef5e059be673be4f49e6491da48d3996","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b46547bfd615cf532ee13805382921bf22c097c8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.9.1-renovate-eslint-plugin-jsdoc-31-x-c935a247ef5e059be673be4f49e6491da48d3996.tgz","fileCount":18,"integrity":"sha512-grpGWmiN8wmB/zlvv1edQpfGc5hfgBoiy+h7dTwGNroHG26iGOji8lEobMROJea206kYPOkcU4z3bZtNBq9a1w==","signatures":[{"sig":"MEQCIFdtdwCTmWDmiSSbapJyuX+XND1ImqAVrnn/hofnK4qNAiAfLfNp0ykOew1UHxicdJospGRsSoM1xERCWcGJWGKbJg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/575CRA9TVsSAnZWagAADLQP/ipXShnpn20Nffw2OUzQ\nukxAS4I6DuvDrY+1MY/xmMB+4M6l6AMfNK9oIPReRod2oiW7f5MNMQjZvYp0\njEeVb+WJFYvtsijsZQbyMV4yGX0ICT1bbBZ67xdR1wfCcsI2gb2iVokRAgmJ\nFkMjHETYCYy3ftQ2qyi7Ath9dlYAvU2pJdJATuhY6U//+ZcX5EV1g9gCYGDx\nIG8O/EqEfrNaVoY1fS/IdxMcpVfCjgOcZl3pKWIsSNAB9VdhpvLqEoeo2wI/\n4NzG4p4nRwNXMHlAKgQLNJQCJfUJte2MJTnYgUHOqmWH+w/FrM+m0v9dmRTt\nk3IFLWNIoh6P6x7FMp1wsJ1kjHM1wrtVdcFqhtmCNDOv+KRaZhRE0wnuNykQ\nyrCBx6rYx1sDgqvBwyDazhuQPdHKtJbS1eV/u3lXYCdes5s+wm+xD0gXLUUh\nV+aGRpZcXFov0JllwaXD4y+c518lNdjR+HXiMtxbfdqz5lcTr1gcPWrngkQ2\ntyfYTstl877kwMvVtm+2m47sKvJmdmgFkmVZ169IjS2Jr/8aSIfaFRxBWgzP\nyUaccK8WTn5iXGZEMr6ptDrhFL2mEJLoT9Wk9iq1Pv5cqptI/wiP6JjOy387\nHGn64aYLFY3UHv/8rlFKauCYvfbpNUF6YNzBhXKzzXb2fJde/IYjoDb88JrH\nv7H3\r\n=PO67\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c935a247ef5e059be673be4f49e6491da48d3996","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.9.1-renovate-eslint-plugin-jsdoc-31-x-c935a247ef5e059be673be4f49e6491da48d3996_1610587897428_0.21005611562518256","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.9.1-renovate-major-socket-io-packages-66c35d88eeca43c841603c7ea104a2225bc646ce":{"name":"@balena/jellyfish-client-sdk","version":"2.9.1-renovate-major-socket-io-packages-66c35d88eeca43c841603c7ea104a2225bc646ce","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.9.1-renovate-major-socket-io-packages-66c35d88eeca43c841603c7ea104a2225bc646ce","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ddb37d3573e13e89e02a18f806ee4e72605d16e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.9.1-renovate-major-socket-io-packages-66c35d88eeca43c841603c7ea104a2225bc646ce.tgz","fileCount":18,"integrity":"sha512-c3377qt7/2GpORAmm/qNaXtjn0bNybDYIQqwy9xtZjl/UCi2m5SIVq8NuWgWr8pGA/C3KBl0IqS5/oeLJHLwtA==","signatures":[{"sig":"MEQCIEkbk+vuEfuST5HpoIYvb6//yNSoUEAYyYtytA0WQSXYAiAe/Sd2ASrUbi6ZDVIhsdfWvVRPeiAZC53NljkF+pWP0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/58gCRA9TVsSAnZWagAA4CgQAIFuDTQz2ZWdXAo7xlnQ\ntMzWy1sKcsgEPq3+KxWG+c32Xu32rmkCOk8k6zxgI8zwIIHdeCS1gwo4CDON\nm1Ob0rVtTr9+YPDU6q8EGZUsnV2QGGaR23zIBYmSm0wP+ySqOplIooZSKMnC\nktmIwxM0CZahlg+UVPwhsEgLoyyCAbfTqf9kPaymuGdcAMtFEUaxKa/l2oTh\n6azv+FrwOrbB/CL5IsSKGXEU91IltOAWiUpbmmzmXkcCsRI/2GMubLmcouZT\nob+NNJgZH7BNQeTItpXxcNzrMIlbLLfpNV0qivJ4QA2iU9QezYREfJ0oalui\nx8ErVwIg00xv9bIgkHBODtmc71wszLjkTx2AqfxeQMYE8M2xItG9rCWrqtgO\nzZ51P99g9DAyWDDM3Kir6BPeXvKK9mJ/t2juQAwjergYywt8qgY/S98QWMhe\nGCkUGvPX60m8AWBiH19OCkMgqsc6D5AfS4vc7t4adYwHNBmABnjnfeTdImeM\n0f0cur2RyUjeZbKU39yFybwYS9Y04Da+RgVK1nGmhv9YzPhI5f6lbvpFSlGg\nmz9JyXRYh9fmAe4bLz+1rI7VqE3h4P8Fve1cmK4DHO5S3mOKnLSGD07TIx3Y\nHW7YloXSCKUTawiIHt5ahgfx0KMoPUWfIJICepqoax67OQPDWL5sZe5iw8ay\nft8o\r\n=xfxZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"66c35d88eeca43c841603c7ea104a2225bc646ce","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^30.7.13","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.9.1-renovate-major-socket-io-packages-66c35d88eeca43c841603c7ea104a2225bc646ce_1610587935712_0.23366687356615312","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.9.1":{"name":"@balena/jellyfish-client-sdk","version":"2.9.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.9.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c9f29b2a65db8a209e55ce0d32106924ae5f0317","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.9.1.tgz","fileCount":18,"integrity":"sha512-2HieyTMjTLtTDD75qkH+ytTkXctF0MwHOPaWSyDPwsxSs7DQGi/rvb8PaWzIY9onvjR4ewYUHkxD/0xc989AfQ==","signatures":[{"sig":"MEYCIQDs3syJdm9ZdTe2yAd9xJO0F3FXKltrvmRSZIpTCwAu5QIhAJ9JeFhbeMlOqcHdXPNWsMp/oQQm+vwvaObUge/KsYsu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":150928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/6tiCRA9TVsSAnZWagAAJxwP/j7/O56DPD4HEOYDsi99\n+gXfW9NIkY2i3mvgOHhtIuzk4olZWoa60rrXxujTJPF/y8Nk/qup1gvhYF3Q\ni/epaGlVcLzFRz2gGQluL8a3I2q/4ZfjfdHNrCms8hYiT1N4ndmlg2TCfuov\nrDTjkqv/a5E9HVvlR7VdumK5EGD311wOgTB9C7JsGkAqLa5U/43YC7TB9Hbj\nvLA8Kvjl3OC4k/tYGXuGXQVVTcxWk8rrYpQY7wjhY8kHiI2L72A9/RPffStZ\na8H+XcK9R27BWGhhLsElyNjXdBrDd+vI+kOaWEFCK1Fm/Cz1fz/6yW3l6F51\ns+Vr6wQ8Hn08tEkSDyHCPbPtzLCqLCbrfuM1nSHpOlZ3ZZMZOYw3xs3XHv9H\nz9cGwcflkU5WK/tWuwQUy9yVJF4jaQqJfhKacy60r4gsUyp2vpdHLeTM0NYl\niVVipioLgZmdEjX0LEdTEPtVmB5cIXUZKckpjCjqwz9Uf+oiEQIwHuKENpeR\nhlD2PCHjavuyzjSprkPQQ08wdbYxTWGR5MQhJmpmAIY/jarumNSV2KqkStYh\nahWbxM+RCCLEiQrmxUJYrfsjHjHV21YcSggVEz9fgLinDu1FG3LznWC6tLMg\nLInoTcfgAKf9YyCU27VZaEO+qN3Xr1mt3DX+GDSuuCfPcgUNCcWJQk3hFEh5\nkROD\r\n=TkLX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"5bcbf5cceaaf99c2a3c002ca5adf6bfe308b59d7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.9.1_1610591073663_0.7682207811716304","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.9.2-renovate-major-socket-io-packages-33c410fe2d7228e5864eac5b20fc869cfec1da64":{"name":"@balena/jellyfish-client-sdk","version":"2.9.2-renovate-major-socket-io-packages-33c410fe2d7228e5864eac5b20fc869cfec1da64","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.9.2-renovate-major-socket-io-packages-33c410fe2d7228e5864eac5b20fc869cfec1da64","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a6eb905db6e4c7b00c640ac3f216427f5a83a5b6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.9.2-renovate-major-socket-io-packages-33c410fe2d7228e5864eac5b20fc869cfec1da64.tgz","fileCount":18,"integrity":"sha512-K2ta/u6O4yENvhxXu/4yxBiKq4+r479Rl7BwcsbcvEJ0JqpFrXnbA9o2HlZTU/FgcMws89McESsvOL4VeAElng==","signatures":[{"sig":"MEQCIAsopst8/E84X8fDGav98W1jXEQJvmhF/qWkKVXsSceWAiA+6y9lXSNJ9EXlNtvR+uojn4M7CYWMkmIGGbhPifRbMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/6v5CRA9TVsSAnZWagAAxL0P/1xLFfgBYSRAf2gQ8UHo\nY/gIrM3DoobOVzg/hARn/Cq7fZ5lfYiH20Cu0iL/9yAs72Ur3fI0QsLBwrlX\nGSBvVejuOBnxBM2uMO5IupYBrAfZVcS+Wrgxhe9YlzGQVB33Yf91PJe2TJrx\nMPy7fhWUNJfLHu0/77zc/xVPKVWzGoCsXaWBaL4Y+C4bfjS4aImqQAEZd0jf\nGZYNM7bdE4JOy3lxYOSb2CtErYOGSJbqINh4E0FK0xKFOb97IGt7SrJSwf2n\nVzkxnFfkBZ5jqjTFP2CsvsYohVHc0rOxnexiIgIjfVLXD7NQ2kO7RQ/D2/IV\nS5fTC+sn74lLijAFRw1D/GIio9LXvmYQ9W5VcxWI8IQ13Q1ErruisRUq9QW7\n4xwD4rH8N1bkxM2XRYSEBqrOwUJcnCv4w8IRde6slXGRogHO/KTNXTHctQDy\nDGAbjweILrUrzv8cCuF3XGZiW4PDxNuZOH6jI97TmmA3PJIUwAH816xIf0vW\n/S/wBmI29ou9PR8WXLto91kPFN2zPhWRfJGpU7QApnxNcqruAroD1SmqTY0r\nJErh7SB0HcgR8H6wh8yZ28khV4jBpjz16I0buAMSEGhy/GAvJPHkT48+6OEQ\n7j1FaXWIEHKFJkb6iU9I0RSQZS/aQN1oP2+fw7xSXxAv0F5mgRHUswLC8BBZ\nqnuD\r\n=B7Vc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"33c410fe2d7228e5864eac5b20fc869cfec1da64","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.9.2-renovate-major-socket-io-packages-33c410fe2d7228e5864eac5b20fc869cfec1da64_1610591225102_0.7026136114276622","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.0-link-brainstorm-topics-to-threads-a49255a1e01d16f3f4ae0cee3e6eb99256166b4d":{"name":"@balena/jellyfish-client-sdk","version":"2.10.0-link-brainstorm-topics-to-threads-a49255a1e01d16f3f4ae0cee3e6eb99256166b4d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.0-link-brainstorm-topics-to-threads-a49255a1e01d16f3f4ae0cee3e6eb99256166b4d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5a7c8eb9050fcca897dd68f337f505689aa39cd7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.0-link-brainstorm-topics-to-threads-a49255a1e01d16f3f4ae0cee3e6eb99256166b4d.tgz","fileCount":18,"integrity":"sha512-6Zix8AvTqCbXNhjcvJQhuLnNki7rCXAdFBwD4uIzjmwQwVj9Ko51R6Z+hkC2LPXSzLftHjVRQ6LID0oyLmvj1w==","signatures":[{"sig":"MEUCIQDCFCarxSruopoyNuo6HBLqGIglCxVCYiIqdITodljirAIgNXNgs0Xa4ESeCRX+fiG+STvA5Ix2C0w2JVv3cNA3IYE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAA60CRA9TVsSAnZWagAAQVkP/3lVnhD1Fi2AStOzxB8E\nrYSDaBtxs0WytBKNgozHRjsXH/bM0LFCj+yQ6yUB9P7aGDjWNi+YQNrOc54q\niuRVNGE+QyuSIu2Gc3doFdvbSeyEc38E4Aw+t6cIaqU4Lz95nXsRWD0uH0gY\nL/xUlVqGOjBwpznrqIFC3TRzTPpnbeHzpcHoKt+mEXBNGdyd9D4J/tC547wB\n/5fihM8odpbRns05mz45EubyM6vxS9PoXlWpdo2gjToUVOMRBROlUjRwxWFr\n9XVq7DdgL18gZvUo3tT33Id27aKTwFQanitdV2RgnQtc9nhyuMfTRSaXJ5nB\n2NH81n9RlMRst7SGabt9LPKjgFx3S+VDaDRTBwJYGWKQAO0tTn8jIpPWNFNA\nZn9GR4NRY2CG6p0DyGgCvk5YblS4rucIvEjIJOkOaqTK95oCMG9hoYE6ujNR\nNciMiK/fguz7ZFpux/uZ0uhtfWp8zoyzbE+6V8hAnzCCwKvi7+P6jAmFhk7w\nj3gJSBU3bntM9AgJAhNkVn7EHhWwh15Zig25Kpa+lW5tx7ZHRDDCdSkJ5R6p\nu2vRrs7yJiK5548JVJYOzt3M2V6As3j8TVyE1nXa/LUnn0WGntgXkjd12H5S\nmoE0lMGoDSnsqpNjb9ibEENPuUKs9ja+mj6kPpwR0REnpEb8ZuGildfBFLX/\n4CJX\r\n=alub\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a49255a1e01d16f3f4ae0cee3e6eb99256166b4d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.0-link-brainstorm-topics-to-threads-a49255a1e01d16f3f4ae0cee3e6eb99256166b4d_1610616500078_0.8227774689235152","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.0":{"name":"@balena/jellyfish-client-sdk","version":"2.10.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"90052fd2db9e5739b237c6b76f40835130722c4f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.0.tgz","fileCount":18,"integrity":"sha512-KCfkD8A0PKQ5PisjO0IEv1LrFp5BJMmdYtx3dWp5RwcRY/txXdIGY6fipQBEJbO3jqLZEZ2VrXq/OouHVOZevg==","signatures":[{"sig":"MEUCIQCc3Xm68n55xzZYwptIgNgpUDcq30cwt7KtchScPDOLagIgOPb4ybEQWIVCbw6iKUVhPi0BPljCoEyQUD3po/8zj0A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAA9gCRA9TVsSAnZWagAANiYP/j4NBmaAen19bUg3JsBs\na1ZNyLBtPZ2JW26ibRZB6wwDR7dyDGyFX0BqsacQiHvr3u4WdpKkdaAQHM6x\nLPk7aGfTDxc2CQlbZMHJnNTYbr+ICqTeT5Qe3XBVpUKOTvnR91vXHpz3dVlY\nyzOOckBNbl2TNhuxmsK5fHUU1uvi5nh3ZLtE5bl8+6XglxI8nOq421DvCtwj\nyImsKdrFsp3i1VZgnUmGfS1V1z2G98IkM/oljxPOxU83O4z8HynuFluxIlgt\n9fpzT7yM2uXG+HMxYrOr/c1hGf6WzNmSzq63EclMKiHsmlsaE0K6r9YW687c\nTPY+QzZd7W6lY0vL2gMuFbsRsn3l+8CC+GrrRl8B8tFDnPevv3TLwLTPpe3S\nDXSOyv/XMnYO+SWlgC4puaou2UawjWFlvWfW4gYtIqY+sYGarAmxvzVksl22\nlEYXp4fw32mjqgJ1ZdSFd9xjewxACM1OdEdl8caWKdol0J5wEQ11nvXvStAD\nWq5heAA5dh9fka9QW6g+ZDPwYA8EQrqJ4wI8O5QFuWw7zbcfmFTbb6Um4Ykg\njWRmT7baPwbCSIiSq9l7XNxRgDOjaW9oYLu8sKSJoSDzYubkK2tZabCNFN8I\naXt65f/G5Dpkd6BqC/rCXfwXwfGHIaI+VU6IcOURGmlo++fqr1vVPOEAQD5j\nUF3b\r\n=knep\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"7686b1d27ab71d0016dbbdba0ddd8bccfd59c35a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.0_1610616671793_0.4233960194956723","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.1-renovate-major-socket-io-packages-485a581213110513797b6b84c31a907f5b218de8":{"name":"@balena/jellyfish-client-sdk","version":"2.10.1-renovate-major-socket-io-packages-485a581213110513797b6b84c31a907f5b218de8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.1-renovate-major-socket-io-packages-485a581213110513797b6b84c31a907f5b218de8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f36862eb9f097ce447a196f66fdcaede3887ba14","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.1-renovate-major-socket-io-packages-485a581213110513797b6b84c31a907f5b218de8.tgz","fileCount":18,"integrity":"sha512-dGJnr8PfI13cuWZ1hIvT4a0OoaRlD7lsBUe+Ryl4cvq+Fdgv/4vSB86vAUJBsnONPM72NBumwL/8MOu6yVkELw==","signatures":[{"sig":"MEQCIA2vYJseKdFsb1sQ3SzxVWnU4d0/tXpSwKveZ2Ub6YTKAiB46zSYhV+wB5IPksDneZAXXgGS8XFHg2fuANxoE/7SyQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgABBcCRA9TVsSAnZWagAAW/QP/i78GHHH5twnl9agzA+o\nr1Y8tuUQ6bmGXqbE6GMU7tE2dJXc45R/pPSv7eEe50n7hQ16kZVAhXkfTEhH\nHX0CkHGHoJaomuPGZxNHLQ0VtE3yN5lPdg0KHyvYNzk2A1/H7RkEUAdxVBx+\nCHJjAL5Q0CpIa+fqafCTFnH7fbOh512TsKEQ5RWKmvmvdzC6wV9Bzc0Rmjyv\npueN1zqQq18UsBIg2o111266tOoaWlKrl3pkfmqK3i31OjT45DlhasIQKzmb\nkdEWHoXxj+Ns+TQ5qHEr9vwLsz2hW7Ju4mTHbCEeAI1MRFh4e3OyRhquXWtx\nO5yY4Af0MN/6Doa5rLcMA912A1unJub17FKqE0CTa6MPaH1fCdHLA9klh+dR\n9FqDjDHuIsAXNs1D/tObLWA+x2mQ4uCDoBEEhioQgeuG1QNK5zzGao7fGVWA\nw9s2c1gDqIjcUkYvrIXftJTRU4oRxkXEi2fbMtc7UDB0nxuq35paKYVu3JvI\nuNuWW90qA6F6jFgZaZRHBLk3++f39RDYIgtV9wcmu2SdS/sDM6dgMFAzKlYJ\n196dt17G3PbryepnyAe/4ztYwCHaf/k3mPCZHCIopt7Wo5Lz1p2qPDHuGDga\nbbxHMeoLfk/uKVijVTB9rEWSWMS5bwO1Dl+42v23BN2ie0uVaBggew4cT+ud\ncBce\r\n=XpRi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"485a581213110513797b6b84c31a907f5b218de8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.1-renovate-major-socket-io-packages-485a581213110513797b6b84c31a907f5b218de8_1610616924216_0.5934186350456636","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.1-renovate-non-major-63484d1ba2facbc15f367785ccd0419c8656dde7":{"name":"@balena/jellyfish-client-sdk","version":"2.10.1-renovate-non-major-63484d1ba2facbc15f367785ccd0419c8656dde7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.1-renovate-non-major-63484d1ba2facbc15f367785ccd0419c8656dde7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"07edf0ba2776bfd92c8fe01c564427a0371c0728","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.1-renovate-non-major-63484d1ba2facbc15f367785ccd0419c8656dde7.tgz","fileCount":18,"integrity":"sha512-kbvJHSRbK/R2puEFnsAzLp5q8x3DMe+lgMHE04TQyIP1we9QQUOMWq1bTHdyTU0kltKpqSpOgBsojsJzF1TC0A==","signatures":[{"sig":"MEQCIA3RYlqz31UunRtvSHbyDEP7isIHlYr6xib7hbDHy7uSAiAjLNsYgdBDu/K/jQJM3IxEJac2Xky+L3djeviFhkSD2A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAGepCRA9TVsSAnZWagAAuQcP/RyWTaXdEgOL4tya3cGz\nelxRShjAeN13Z3rvPAF3kvMd032wV2f7KX+GBlb7n0+qwX/O95nHCCkyvBeu\nfqnBCGs7OGzV5Om3AFyXA5fY9Z228vBXi3PypZTk6yCT5ZXoDckRSLa3rfkv\nlVTz1+y51EV+fOgQVTXMmmvI/l7e3RvjnWcxHw88Dncn9K7YpK3YsDnId/Yg\nYzdOZcbWZtnvxVAyvB+hRjlYqMLDQEobWuSmRuuLmeR5SaxKTbSFpxwu6kNv\ngvmarnyhVIbETkVbbpyxm57jA1aeEV3oFDO/xjx7ccbpCQEPdG7w92j8pb5j\nDlt/0DSwvb7Yh9+OlMFYv/eFfdV12uBaoLAOr72UJazHXhSqWP15JjUFZe33\nKJgTLGDMtZIRh0AsSjI/NGU9VfUGR1pY+yKwr1gL1cCtiKm0Xwi3VF6UJZ0k\n0VlL11+R34hHiAvIp9ou/Dv+iBTKLAWcBfKBqWe04wKp/WamKZuXoGko6XF5\nQI5dBqb6N47fjulKP4SM9CSFeMB4khKgKTe+NTlCCUGWVa9HnrUX4VgaCE+c\nPqo8N/phPeQ6d7KfJy/pdUjLYpQrr/XxgGQaBpkZXcSRSHMl3OQQC+8j0z+M\npg9U6vgFM++xUf6LxJDerUfwIRAZpwgFALTDxVJ+4gl2hoOMMFwgIsKcvUbM\nkbT1\r\n=D0Ti\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"63484d1ba2facbc15f367785ccd0419c8656dde7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.4","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.1-renovate-non-major-63484d1ba2facbc15f367785ccd0419c8656dde7_1610639273340_0.6966518765349385","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.1":{"name":"@balena/jellyfish-client-sdk","version":"2.10.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d71fbd94ef72d718b554f09091f38bb7f3749215","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.1.tgz","fileCount":18,"integrity":"sha512-0WCTSyURE/mqX5vH0O8fLuNnpHIyVOcefOXWdVLN4jX1Q6Kf0NET6wrAfsh/KLAxXX8PCH6p9r6ElTAZbVGs2Q==","signatures":[{"sig":"MEUCIQCP/o11wvaMdOBrJpkc/WB0/rCWNh9Xr9pvdA9HaUbEyQIgDcU8xw5AUO89MpKuxISI+NvbIv7B0I0sckZMkQcpR/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAGhbCRA9TVsSAnZWagAA2VsP/0OyyOw+qAW+ix7O7NDF\nX1IukCN4/iFrcbNojUqAsyuGMudHh+rxeS4Vsdyl76kJQ1n1VLAqpXdOeGwh\na+kzuePkCx4nNDTa8s0y2dfeSX7Rth/mRSQM8faZNuQidTbNziJ26On5DhCn\ngaGYvwgKfBX7rtvI+ZQ3Vx8CW8xjOVv93CjDGqaTA8x9vypl7PvzAzilz6Ac\nkFdjSb94FqZvF2ni6AWjMMke1Wjqf7ulapgKGE8465SoBO8DaSghiuzrZ+p8\numhgW/Vq6kuBDoUjx1wVM48AZOkd/aU2Uxdn6gnvNlCQfenbNCzF0TEwBuQL\nfb1h7igS+5HeiWJmForeMHSJQqCKpUSg1HecDxE8IyxdN0DP1fcQLccTANMh\naFTXRqBjQi9H/Psz/33HyW7b4xyreV/rWI6/Vz0289Ik1xjmFHP6gMD4Uab1\n6bM7r6srYC4tdtZQQhCMm6BN/HmMxpDgU3FuAVzWxpNwi7xxe6KfeCTC0uoc\nZOBG6L20ayKr0Zr76954haZHWjqaxouVvgZjDWq2fitT5GK7tgVYVMDylw9D\ntR2vvBpPUPygHMd/E98av1oZx38qlYhWPxXZWp5bZgMNKJILPMMeuB8aQtbd\n4rOjWKSKC9UopWws6k+OuAow7I/xFsxUDTBjvth/Ian8NNxKBoaYjiB3PkmI\nAqam\r\n=rmhJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"636883bcfbd77068e4aa83f93837c3a8ce3a58b4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.4","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.1_1610639450843_0.6076210970575873","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.2-renovate-major-socket-io-packages-dce923cf04baccbc1de24180c31d8f3dd8ef9238":{"name":"@balena/jellyfish-client-sdk","version":"2.10.2-renovate-major-socket-io-packages-dce923cf04baccbc1de24180c31d8f3dd8ef9238","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.2-renovate-major-socket-io-packages-dce923cf04baccbc1de24180c31d8f3dd8ef9238","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"01895a15a3b80458120d72b8e8e9c4f8c9f6fd76","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.2-renovate-major-socket-io-packages-dce923cf04baccbc1de24180c31d8f3dd8ef9238.tgz","fileCount":18,"integrity":"sha512-0tr5ow+1DBM2/EAWt1vjSjOLten0NMnc8eWvtih2We1eESYFz61ZzR+K86V3L3y2tNEXD6zEguTWcUN+0p9mSQ==","signatures":[{"sig":"MEYCIQDpJv0LiHLr8nAv4OZDtF2PLEPQtRe4fuE1uSLQsbAeoQIhAKdB1KjpQBU9bFs6ErPzHmupvE508XVm/A4lv2YBZugr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAGj6CRA9TVsSAnZWagAAakwP+QFZPH8ppbC/Wj68OIf4\nGfe7Xl//1KOhvZKpAqHJhbUPhB40VrYj2vW6Wh6lVXNOB7v6k1oZQr1knh/l\nTYFGvTN+kk/HAOm4mMkGJGYk5pM/lzLJI+04JcJ8p/jRk5xKb0M4KyC0VKdY\nOnlF6uNqVyQj+sUEh4yzg8yW6eflboOaDfDXx5vyvnRnha7qP/m3JZSt1p0B\ngtkN2ivRJVA77qIKFR67t1fpZkZFIChUdCP5mVh61dpN2rx302mzj8aV4su1\nZGd4AeMmCHWvr6zqVuVftcKFCLIKrAENdsjXkugTTZ/SRQeI6JK2LWYWZUNV\no+Me60rc+pvUP7fTttmOTFr2+trjlATNYaXa3KJn1tjSMecQj0BOYLQMaBSp\n/UlziuBBO373TKkAVDyFBdiigUxBKR58nxccYU9tZkyP5kD8dFDzw1k8tNDA\nIOMdCjJHyxaUl/UT4FTJW44kP3HqHx9zr/2I95Wh1dLeqWTLmqC8+SW9HhTR\n95XmgZTMJAYUqe4PtLLRfaZYyUHb6XvcGBe6hoZAdDIhjUUaeIZn8t0UH/dV\nHeRbkiEdv2R64aRiFrVs9AeuLIhJeQemj+3CYvZkanOi22e3ie07XAk1mTKB\nn0p4lq9QcM22TF9n+6AZ/PdvD5byc5z6e3YBH0fhX9K708Il6UPoGubMd29M\ng8qW\r\n=bvfj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"dce923cf04baccbc1de24180c31d8f3dd8ef9238","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.4","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.2-renovate-major-socket-io-packages-dce923cf04baccbc1de24180c31d8f3dd8ef9238_1610639609771_0.43722543130656355","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.2-renovate-non-major-197505d003da2d7a97856b08733dca4b746d0739":{"name":"@balena/jellyfish-client-sdk","version":"2.10.2-renovate-non-major-197505d003da2d7a97856b08733dca4b746d0739","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.2-renovate-non-major-197505d003da2d7a97856b08733dca4b746d0739","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e07c35b8161aa6c5e1db9ede20b0e492e6062dd0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.2-renovate-non-major-197505d003da2d7a97856b08733dca4b746d0739.tgz","fileCount":18,"integrity":"sha512-P3EbRNufL+Kl0Jx72WVUqG7Xh/t+gGCgbCpTEF2xZvMi0H028RKK7cq/rBayhpCt2F3NTTXnpl9+wUY2dbcAxQ==","signatures":[{"sig":"MEQCIFqyH/T6Vm+dSt2Rkrczi4zTbbdzbvsXA97iYrH7q5J4AiBqFYC24I7c7Ukeq64syKqGcwS4vlUwVQAOJ/NxIe+/7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAOIDCRA9TVsSAnZWagAAvngP/1sB3IFN69AGIDZFTDar\ngLxCaKTql01tLAkbBTJws9SYF/CyrMyZcxXuw5+YtlWQkU+6KHQjNNu2j2Lz\ncCuNL/q+oTHiKjBA93uGrLc3n0sADuioc/doabV5SZ1yCtSyZ35AknK6nSNT\nLtrzg8ES7g1W1L9/9YpkR9w/hzWEzFeS2WsfW2D1boy1RNUQ+CQQ6p2/5uAR\nfh5OL8/3pmqmWAK8grbBO5Bvv+S1t95HO3vflAzIT2jDA/4z/gQZM5fyrdyv\ncQU0Lu7MnKD4TwZ7+u0shdGgkoQgJtSa1SmxQGVp879wTXJfY9oYdr9VS17y\n2W8wbHhYj/GS5KZr7GFh463UQdx8J215xH2vG3f1lZGGe7So6slQjaII3n/U\nM6ZkYXzqSNZfJx+Ra8OpD4TqwaY9BwCtKuzDxgjhhOnmJbnkO69myRaNEggR\nKJDrPnrcvD0DksIwdcurSW2+bztWpjLFvz7WnCPmQ/RDLKJKptV99wTkcfZp\naJYlmMbnuxIjICzzMvSk7E1c8l3Jbm8uCOqA2L/j7Gd8x6St629hwip+UHUw\nKYIeo+1V/R5sR2LUBrqztZOJSUeJfSKR5xVtGqXLb6t8YUO/VnFMkoH0rwtd\nlZDEC9xh1aqvlQL3ODlIVmeXr81wZBZRG6OrzFshX+BOR4Sl7JqJidadOQ6l\n3iVg\r\n=18qU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"197505d003da2d7a97856b08733dca4b746d0739","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.2-renovate-non-major-197505d003da2d7a97856b08733dca4b746d0739_1610670594709_0.2790448080140544","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.2":{"name":"@balena/jellyfish-client-sdk","version":"2.10.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ede3ae52dac0b8e17520e769e99f27d05edb794e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.2.tgz","fileCount":18,"integrity":"sha512-+3tL+YNT0EBfgU+SHbbYOpwLypAXEqFVH59bfxaEtWsdfISBWIgS79ml57sWMBFg4mQ5CM/K1EcHVDuDfLwUug==","signatures":[{"sig":"MEUCIQCKN3ZFEC8L0CKS9pylbyu0n9Xt4NiJPzIiphwPCDXqWAIgeV2Ct4c+tl3Q2K9SgNCZjr79V/WmcuorpzGCT5Olp0s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAOK/CRA9TVsSAnZWagAAo2oP/iGa9LdKiwFQwnh2pGr5\nvhMi6xYrnqx4qVEkwkFvXVt1AVE+mT/X8jHgIeQTWT7XzdAURirVNEMOKQ+A\n+6kH8HN2uxVP/mIXBei0eqxvnNSwgdByveZ9NcFqkNLnc36d+CBGWxJKt/0V\nBONqP8DIG3JKxbj0LKp5sdn8IRsgFQDq1MK93eeMWspDM38Yef+WmXGZjPsD\nPVxqnguPwjm2CdddxABh63iVRTdf2T1omMXiWdXUnmr2BfetUlOO51y2p+Wc\nx6l/EWQXdOjTr+7Dmq6zi5WjZW2cuKzmVPlKLpHxTvHKwYhnNe/XTs3zxoit\nD9r8x/xF511mLPm4JORlp8RRt/hX6yAy4pgVlZDzk64RkVpxfy+cHnoDuoyM\n/rq7lP/vz/dt+mlFs4c34yUydfc9TI4w5I9X+LPv7Oyvs9NiZj8+lPDa63qL\nis9EF/0d+zq+yTmtgPFwKKym4Qm2H8rXy8coBaTEm/qDcYpW/hc93t+zMcrs\nH1sLHicnZ+3Qz339lODIPKBguDO9qrEQ/1zXeBHRKZk7Sr/pk4I20ZbxKMLX\naboRRY9CKD3l3/5JNIfmjChZVtT72C10MVh6uxG9kYhFR68eqw8rRBg/MnO3\nW6j85dgSkWN9bZIXn8QK4bvRfL8RKOIsFGuPgfnPULwDgEmuHXpQrC0Xvin7\nfJpt\r\n=cplf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"a1a2fa06b39b7f8692df452221945565be968542","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.2_1610670782837_0.5364619703720674","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.10.3-renovate-major-socket-io-packages-149ff4506e15998e89ad8d4e1834ac0dfd8a6096":{"name":"@balena/jellyfish-client-sdk","version":"2.10.3-renovate-major-socket-io-packages-149ff4506e15998e89ad8d4e1834ac0dfd8a6096","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.10.3-renovate-major-socket-io-packages-149ff4506e15998e89ad8d4e1834ac0dfd8a6096","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"00b25f67c75d1df9985295a962816a354ac48aa1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.10.3-renovate-major-socket-io-packages-149ff4506e15998e89ad8d4e1834ac0dfd8a6096.tgz","fileCount":18,"integrity":"sha512-6IALR5/mIXDarroM5vgeg/SA3BeM+Ry2Q9v/Uts8b/sVlB4saqHtjO71z6CulE8CDyfaG7uCpT1Z0hy9BD5Xsg==","signatures":[{"sig":"MEQCIF0heb8tsPbLbwBUIPJ6NPg5hIkld5/PRnMsTy9b/XNIAiA+wZ4o6WdBppxIm58y8b/OBgLNUdGZE49gDZbkLwvnyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAONtCRA9TVsSAnZWagAAn9gP/37u+DunwxECQtWtgUna\nkaB9FmKsomzlN+ucmNNWkVV+ORYouDDDxT5Tlq+i4pEWAoY9fX1bB7RkJho8\nYdYLu3YF8b/0Gs0Hcgva3yfeMZ7BuUKIU1AseRxNbAiwCcfyHPk4x5F/zg7G\noeD1Xmff0jAd9OHt+RTlWRwzNxXVVWMXJKCwUOiuXBAZxC7o8aFNlwqtAIfU\nSRv2R0GzZraPc0B/28uibvvKvDJos7qqBbKEILPSIPh1iUK/1DQ+Z3mm93xe\nFAyPRLYb/UdHrHIXKAr0s7h0ehXgKj/ZNJkiV3Mfx8aZiuqGYvIhSxJVIqxW\nrC2FvnWiWL3wGpRiYzctJ+QgYerB8xoRfKD0fSclvGG1Fya+y0IB8/bKjsQx\n1uypatIkQnYHx6tGnH/rnzWVbDtnAdPuJtYcAQPAJhzMJBiz5YyRAto3JjF+\npyDqMGKY5Rzwvsrxwg/M4hKFyuHcdCEMWYxp/yMi5jq84K3jfjvRKGBBep5x\nFYpuxilxOl27Rot9EAWmk5o1q09l5cougFKC6yBXTYe3pNVugiR575SQ9vxR\nILJTL2Vimi4C2JHGUVAgFvfOGSuHwfsvhQ2EBgIvW4I0fzwBjdQQB6nSsyfq\nUL4gLTMj0Tljp8uLESVPXMy6QTSBjfuMBImW2TAGpLUwr+etkfOCKDrAEr3u\njiPu\r\n=dHe/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"149ff4506e15998e89ad8d4e1834ac0dfd8a6096","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.0.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.10.3-renovate-major-socket-io-packages-149ff4506e15998e89ad8d4e1834ac0dfd8a6096_1610670956456_0.8850616458357521","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.0-brainstorm-topic-thread-6e8a31782cd28ff4c279c61093fc32894dfea115":{"name":"@balena/jellyfish-client-sdk","version":"2.11.0-brainstorm-topic-thread-6e8a31782cd28ff4c279c61093fc32894dfea115","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.0-brainstorm-topic-thread-6e8a31782cd28ff4c279c61093fc32894dfea115","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0276fd703d79d784c81a6478b5da4078a80a024b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.0-brainstorm-topic-thread-6e8a31782cd28ff4c279c61093fc32894dfea115.tgz","fileCount":18,"integrity":"sha512-0krYu0wNvrgvKQU/EsQV/jD7wUw8YEOU1601SM28d4BCbsGAVx0xKvuPgGgR3VwxMVge8Byw5TKZg4mGTSwP6g==","signatures":[{"sig":"MEQCIAQ+UxR7vpXuIkvBlML4WrmLiA9hKFJz195gHlLD4dDmAiBSaXsLnxBLhZVvV0FiIA/BCGsM+1sfvVkhIOVuzeW7QQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAPA4CRA9TVsSAnZWagAAumMP/RQYYks5HytCWkfJNyIv\n8SVXY5dkIEUQndV37I2HBRAaJJx8iQ/Ay0I8m90HPTojaLuQM64SFQEwUZkA\nc/Rehjbki5NiEnmFGpGeuwztn2mRgudw5FN9R6nyiEffPsm/tvxOcDrBuO8+\n8mHH9EOk5wPAQ7uMqXoWJ5hzx3MrnLcXCjI9B4OiuJH3YNZiY6BhqK4uUmdd\nvjFJAMIWGN7ZZCQPu5xk4FYMOEbAnZ5HKA4T6L3nPdr4w179Bj46rBHWwL73\nkv+pdEQhOiUsMKEB4AJedYpRviEu7+5yNAmxZBcvkE8DdVjlaRr9yKth7AEi\nDqc864Ll8VPCmlPUf4aGbo5C6NfT1qpLKqeD3KawbNgzDqmNkS99dvwS2SRO\nKohCPO/FcIWilArU1e+g1n/Ihj/JkUo4zdWkLiAZo6MOQhP3+Zda0GkotJyv\nwBMA/x9qcg5J6hKu5IHHcroyHPRA284E9wSw7y/Tc95DafmoWtVGKlYDTHCU\nPw0SLdCVD0ZAphCXM9zFFpxIDWmb56bhArUzdetH6CFjDa+YryqbkHG1NGSS\naAZq9IfqzSLxuBz9Zn3kq1b8EypZw2elgtNnKPzbaZYtWlY0VbQk+C0T4AS3\nzVFPUiSB0rGjJnjxsB8WibGOFRzsX2LbNLhJCIgs8nIiVnzPzQKKyyJjHS+X\nnHnL\r\n=CCmA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"6e8a31782cd28ff4c279c61093fc32894dfea115","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.0-brainstorm-topic-thread-6e8a31782cd28ff4c279c61093fc32894dfea115_1610674231867_0.6296234870623485","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.0":{"name":"@balena/jellyfish-client-sdk","version":"2.11.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c4941fd374e195fc88e7c41e94e2069ce64d793f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.0.tgz","fileCount":18,"integrity":"sha512-J0mTaVQPm/6MXszGa4vChAZIQtfdBxOMM1LZw1ZtVmIeJULmkn1FRXH8ySx5OA6zSswVy+zRWtjdSs2PZ9t3Jg==","signatures":[{"sig":"MEQCIDxnfErUEfdBYUygjSBjgkjRMd0a5X4yA1KevTyystMRAiAZ4BVkkNHYw9d+cwcAWZFZbh/xEjfn5cPMZml+yx7NeQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAPD6CRA9TVsSAnZWagAAcKcP/iAWj5zmDnkahCC87bbS\nSIBk2IIzZE3FHqM1C821bcaop2YKjvNNXrzCp2L4IDwS9eFlE2SngOLa0puT\nEkOtf2nng6R4SNacofJilDe8b0pANb7hKXZEtYsBRVHnhcaBNvsQxe71cO2I\nQRMQ9o4VatH/3tQbBgIdmxIxVKPzeX2IaVEYMH9gHfSWM8md+k7R/JW30ElM\nmfi3EC6Sq9wta0ZVjXqiTufOR7ydUpus26H4Cn558Az1cqWEdfllCYmLB4au\n1DCkUeY0FnzIpyeu9/9fMz1LAUXLOXXMeG2kmfOQUqwOYOovNWPz0s6WD9iI\nL9ZZlHT4fs7V09vE7q8V9Pa0l+I3jIaURyuZ5zIwNTP+UJAytMB2Rl7Pz7Ji\n+NuMTUMtxbc2kK4jC6tUjvJaI0OsA1JxnVdCl1fL3JDEoubY9eqMclit/pp+\nyK2g9JGQG+95AzYy5bQAaTRYDjshKlxBALps+ahTwus6nUqDEp3ic8DgjM14\n7j99JC567KQSo/7U8OpLsNPdqeDXKtlP4ChaPp2UlDG88eY+TRIX7B4Xqt0w\nvUcI9uhy4mR2oWvMvfxAwAFcBNJXe4cNzrEjIea2roWgDs72Kf0kxxA188VD\nktwHAxsOprp6MDM5pRM38O0F4+1Nyvz7N0Ze7TKEPIqJC8K2Pn4JY7/eq1FE\nJcSk\r\n=IMDO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"1e094e871a7f56e716bf62cedee8348815e82665","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.0_1610674425744_0.31131058773498066","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.1-renovate-major-socket-io-packages-8f127b2a171fde2528a7f60db12f1510f8ed479e":{"name":"@balena/jellyfish-client-sdk","version":"2.11.1-renovate-major-socket-io-packages-8f127b2a171fde2528a7f60db12f1510f8ed479e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.1-renovate-major-socket-io-packages-8f127b2a171fde2528a7f60db12f1510f8ed479e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7926401c23d6caa1e1a83c58ee052071cc35eef5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.1-renovate-major-socket-io-packages-8f127b2a171fde2528a7f60db12f1510f8ed479e.tgz","fileCount":18,"integrity":"sha512-qbuf3fkQj3IRp4lxqXbO/VhFvw+v+iUwctDqsEgIdIROYuabq1BdXBaudhcJS7+8ubwz8PmZUd9Hi39yVFl5FA==","signatures":[{"sig":"MEYCIQCsZG/3AofviXSSgjN55MriMyVGWR1Ml+R5m9KWjHbFAgIhAPBfPWlnhVJnhJZnxhQieUs42LgrsQqNOKZHepRx+ORW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAPIQCRA9TVsSAnZWagAAXgEP+QFScih9LgLjnsT19CGv\nbJBU4yPYhP/5p78rw3pFMzTfIXNM4jw4whWrH/+CVJ11CqPmzgzhysB0v2GH\nJSxKD1/NxOhfZ3cbUy9Sdh/4oJyGrtHIDuoE3p2V3cEx3Ae+UMGxmPAM9YEL\n3QwRPw4UooTrIpE+x7qE8Fg/NvlsipwVXKSxCkYq6N3/rjs6LSt6E2PRNumR\nUPSNvSIr8B0D+rz3VPLe75oMIcwLawWyqT2N2NTATN2S56efWB1ytvnpju3M\nOBuPVlWo8Gxt1/gw6ePH8fqimexEahbxjdOc4T3m/tOOaP70AeYD3tYh/MR/\n7WmqCKAaxdaFjMvWs2V9GZefFWDRt6vwrqTGHBLLtZERq0gZWTlaKRpyAX7Y\nub/oSoPAPQuqDukdzyTTSHDU/VK+POZOGpyXD+ot2oVipvdaYfItG1XGBf/8\ntYmNDh4zmfarjAjyVpPpe9kmKo9dMp3Gdj4xKfgk3XfoxdFnad6VQ3FEwK0q\nItnMhO52GCEM4lM9jGVx/Yx9fU72nCmTWWJ6yJS+oIfw/8BeWv2kczqH9mb/\nTqZyAb8dZGEzdvBAJEoWa/Ol2kN9AwtOsh6S0dwk1XC0pLLrs3MVQoPreEZu\ndZPUkQZU3S5r/tXM7g331+V2WAxQMe3ck7MmO2MIYWxVrCF6PL6pQkmPLuKY\nEoZc\r\n=cCBb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"8f127b2a171fde2528a7f60db12f1510f8ed479e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.17.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.1-renovate-major-socket-io-packages-8f127b2a171fde2528a7f60db12f1510f8ed479e_1610674703652_0.2019457994551377","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.1-renovate-non-major-a0d24f38c8a6c9504e4f29a31065882acb53887a":{"name":"@balena/jellyfish-client-sdk","version":"2.11.1-renovate-non-major-a0d24f38c8a6c9504e4f29a31065882acb53887a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.1-renovate-non-major-a0d24f38c8a6c9504e4f29a31065882acb53887a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"290cd89999325c928b38614725b1498f879780bc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.1-renovate-non-major-a0d24f38c8a6c9504e4f29a31065882acb53887a.tgz","fileCount":18,"integrity":"sha512-ZjaWU3mx78imeIRUdUnjQot1lgxg8Y227UB4uGD1InYvO2xWrB3n+yzOQjV5UOpzeFnm2xYzTILo/HZ2vZoolg==","signatures":[{"sig":"MEUCIQDjarqO4XqpAqCUUvtxakwoFWA8RtfKmIatTvbjspmuLQIgXsstLzH/0+YkqWRULCJ0xy6u4OwdfOqQGMmvG+z626I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAkaMCRA9TVsSAnZWagAAPPAP+gMAwlQbGnYNmUEb0Lp3\npguG6ZsqJ4F3sz7mSP7cZZkUJ3WHZKmMZZAKmwURwyHi1pXXnaa0JXGnBfZU\nQhWdiNyD1s/X8T23omxt56uMQY9dJMpvOIKEDiM6avnuBocpfhZ3M0vX0ctZ\n1NwIBMh8cB5otMEg6ERiz+7GtlhVzYLm12Dj7VMuqamDaTYHATk2isxHne+8\nILPe7JXq8IskApdAjdBtTDngm45UFIwvRJHYn54TVDm9gFx257YZ3LJzcd3w\n4UUeS5/OEo7ju6ECJ9h/6P2XYXRydXmk+2+UjSU79WFQqBES+A/UQqtYvVTG\nPpbYyOphBIxVQhDi6xFIjP8U9GiG70eVZsTCzH0X0yaldizVVAkErjsjyLMj\n7qzkEbYD5aS7JsaisZycQxdP5NuIEEwMQYIQmXVmG5hKnqcFzEZbbE0eQLMn\n6PFFQwwNUCaT6QWHgFvxKEfO88C+Gfh5adqzoVoXIKFhYJFYZQ/m462zhheP\nhplFZaJxcm+4O92HOcOJKSiLVHYvOBcs2WAQ25pkJJD4/vsEA4F97W3Fr8JJ\njYa3IA116xgwXYbS5YufUImweBUhgyQQ2G6Zadrc3J6btDyh1BEz02Ltvep2\nLK4WVeLvxi1M6ybMoMo58YdTDDoZCZ7jgUbe5rV+2FtuuECuj3AzhlRxOaL3\n0rZa\r\n=N4UZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a0d24f38c8a6c9504e4f29a31065882acb53887a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.1-renovate-non-major-a0d24f38c8a6c9504e4f29a31065882acb53887a_1610761867533_0.8800975747707107","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.1":{"name":"@balena/jellyfish-client-sdk","version":"2.11.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dff7661d8de401e0245c7d09a020842d15563103","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.1.tgz","fileCount":18,"integrity":"sha512-jdQAwRDZpdfAFVgmztGXvz2P2TPI7zgW1iJ3+SP2Vq/UjGsxn3KPEBTq/AoHJue0yRsnFSb+otYE6OGuypYr+w==","signatures":[{"sig":"MEUCIQDST0yLaU/Qd9/0S/pKWl8UuN7sCXSD+9OO58VZeAJyFAIgZjfo3Tdv2evgZhvautxUDmSnUjh02jaaqAfQuWytFMY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAkdFCRA9TVsSAnZWagAANB0P/36DOlXrlkGNvrAP9n99\n+dJmEJiihhTSrs7PChzigHadQz8u8KdpokkfQOy+z7VgEp+yZ3Fw9ArV1jbs\nga7oBf4cOCihhaMhx78QKPGvkWs5Z7rIhbC1JZH9Fs2peXHqHi3W3Ym78kMu\nKA/HybwNRYavBMVVs9MDYNeIVuaNgus4dp1krMOr5RsZWOHxhdvSmu/UfVf8\ngCxQ9o1CHhKNF+f8tynOFeM09f4du4HJ2nTZsWEcO46M/xfebV4Uml9LQoRh\nRuE14iR1QJFTnbvNbOlQWNjW8ZJkswKF3K8FkgqfS+fomlSYxrJQ+Fi+CFhJ\nXsEUyCTTKsdiTy98i1iNEf6qN6i57WTs1GWOaEaC8fTywewAO65Sbm1hf1iC\nrgnTsJvZjiGx3WKeNFuF/MJHGQ4iF3otjKl1E3Ort0iNEBSn3RVCF+d1Vr+W\naJSvTMEARHLyw0u5elwW1JC9tDtArm/KtyoQZa9F1eDXR5/7ZS8IxlzC08u7\nnxgSexOYXvCLpzBgsb1FDFv5TKR0+pjBGck92JAMVG794vqfwhwne+RiS2QK\n3vDrn+AI2RLKGIR2BKpdnXXcnfSmNes/ua72SbA9s/PI4NxccPPvbkohZPCb\nT34KiLDYwvnGW8MJj500eYbcNqgpH0JLkZN/LwwwKJ66C4vgjdYFutBnbDHe\nwXQL\r\n=GSmI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"e16bac746e9fdf92ab3da0259a1082ec318448ea","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.1_1610762053253_0.8793400617898837","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.2-renovate-major-socket-io-packages-0d2b9e97a6114619b0a7e3cd664c8f1e8a72f0ce":{"name":"@balena/jellyfish-client-sdk","version":"2.11.2-renovate-major-socket-io-packages-0d2b9e97a6114619b0a7e3cd664c8f1e8a72f0ce","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.2-renovate-major-socket-io-packages-0d2b9e97a6114619b0a7e3cd664c8f1e8a72f0ce","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"00ff9beb7c8a1b7d2ee63611bc390c2b7b22816a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.2-renovate-major-socket-io-packages-0d2b9e97a6114619b0a7e3cd664c8f1e8a72f0ce.tgz","fileCount":18,"integrity":"sha512-F3VysJyXo7eJ+0TRSqMZ9P5uWvdrKHXFFWJOLATD+oCHfwrILoblprT2P80scckybFtPXq8TYWHDNIKe9RhIIw==","signatures":[{"sig":"MEUCIETBo+Povwk6r+SddWAAjN2fn+NMPrFAdHASP3/6XEBzAiEAoBGO/SmyZE9M0+Racz2Tnzp1lQDsZmUe7JH9xB5yL+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAkfgCRA9TVsSAnZWagAAHqEP/R6yQrmvdEJlTrhxlcqF\ngtzswexPsx8uV90ahTOB7GlgqmGdxC3EgeWQiWSu31Wr68ImTrxm8VG8W3cE\nnbFxLEkxUQ9MJIQn2a6ZylS1PrJQpDFKc6lP8ITKdojb0rB0EaYExQbmVL33\nF0L5POq8ipCkL0fiIyAlCheG6oArPWzz8UuXI2lBAWQrrj/GBEPXJwavb4ZE\n0c9Z5V/A/cr7MEPzvYyNurvlgLzHK5OaiQVCh3A03OyavBLwAnkHUV6sXLvY\nq+UbimIqCxu8ZRsPZ/zb1rwX6Ujx7gbchaPRbf9wNbYRObgrdluZnm6xJN2b\nPj+gSCAmF9RnkDeGzrrJB35b3zsKUZMGoKRHj4FxMOorBZRKM/l0QDl/9p+9\nfqT2xKLLqQ7rOoCSubwZ8FIDCacJS0bf0E/RwMmEqYdJePidEVdlHrdw0FEx\nFbdpRlSCpENWgGLlsW9Z52mq/e8xh+6l7gJm+Bl9jjSOfJ86cqIW3zCkuYmR\nAMsO9Ink8D1b3kg8F3UTVk8ztjudNjm3vsvJXc/WGXX+qrBKP9FvQ3kAMe/N\nJXtTEdcm1VKY54zpcFVdyLgOeCXTw7MdfVl6Yjd08y1drpC/dO387nspmGPy\n2cZnL1HORjpsp59KmZNRDW4QwtNaIYYZuUtpk2Jkygo4189tTwYzi/MqDmtn\nuEO1\r\n=8zVt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"0d2b9e97a6114619b0a7e3cd664c8f1e8a72f0ce","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.5","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.2-renovate-major-socket-io-packages-0d2b9e97a6114619b0a7e3cd664c8f1e8a72f0ce_1610762208210_0.9815871996438619","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.2-renovate-non-major-61219897d2858e82de133dea8aaa677bb941042a":{"name":"@balena/jellyfish-client-sdk","version":"2.11.2-renovate-non-major-61219897d2858e82de133dea8aaa677bb941042a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.2-renovate-non-major-61219897d2858e82de133dea8aaa677bb941042a","maintainers":[{"name":"toochevere","email":"pj@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"63518f17fdb1647607a6d3a5caeb38e74a5ea4e8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.2-renovate-non-major-61219897d2858e82de133dea8aaa677bb941042a.tgz","fileCount":18,"integrity":"sha512-cg7YcFN+VGzmavQQR7/+XSwMiuzYrUQAJAboveWng5tsP0GrIgKCE5Ds2YlfG9rdrqXHcrnCp2iClA6CEDbhGg==","signatures":[{"sig":"MEQCIHlsxTo6XE/dRi3BjGMBFQbiWHBzoQADyJralXKxvFi5AiBg8MTud2TFPI6syOTNTL5C5GMDLw8yNrDqqtns4cQ1Fg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBCqdCRA9TVsSAnZWagAAcE4P/iKjU60b8jTn/twgii6u\nIdrgsZLJdAWTMxVR0uFGROPrkC9PLAFF4VkXaaP838VO3afHbjwxR4r+WWQa\n5njMDNOvOYDFuYo5Htyi4vYm1bQHofI7oy679RnABPn6D5/FE7GVDmyn5zNV\nbtXNUFPQgPpW/nlNJWDobEnoboXl7/c190qWCEv5WYdke9SfU1PfuI9zaBHM\nmeLlmfPRu1OjUQch38LScfMOoK4doUdAGTmWQZsnetRZ4MmXffij4LxlObkc\nQGmBhYvUEbakG+YUso9HhmpqzCPe+g/4oEvCtnGPSGXZY3T+zOm6cQaPQIvs\nvEjXdJuC1dkLE9vTabNLIiszWHtGCiJj32v2lppV7aiTHcxrGAdob4C2BhPl\n2hMDwN9t2JwYWPGYkNnfzOX9Zj/0XPwBQ922UxUkqG0ixye68bOukh2HPeyn\n5ST5DlAmco+J9c4cvgDc7YVF0FkvhqPBXbdXyx8tslG0cZqtvqBegMKNDfUc\nEq3PfIMrp/IV8Hyg/OivihG/JoMCCQ5corLv4+uXJ61kgrfA4+uh9gnPjP2G\ncxP8B8AbfrEtFvR2kM7hiuErCRRLA0EQCpGmHgXYOaXZNha73ter8YDljANM\nXClAhL+7A4MI62UaTx1RxsvpiDnXh3FdJCX19t5bEX9tiXw5gSJkYYc0MXvk\n7j6Z\r\n=lvIk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"61219897d2858e82de133dea8aaa677bb941042a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.6","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.2-renovate-non-major-61219897d2858e82de133dea8aaa677bb941042a_1610885789090_0.890498795862471","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.2":{"name":"@balena/jellyfish-client-sdk","version":"2.11.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.2","maintainers":[{"name":"toochevere","email":"pj@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"be8ed54fb9d5fdffe0097e4ae62a9f3e5705a4b7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.2.tgz","fileCount":18,"integrity":"sha512-ZnyPz6TeeH8b+hIYidcVuqhjmi1I+HBHbvm01UU2zMKYmAEf6gJ8mOEPRx22j/DRUkE771cHHrktWWFLtI0H4g==","signatures":[{"sig":"MEQCIAbbzCZ02NJrocMpqWs+L9i9T2ZwqeVMXQGQiTerZX1sAiAoshiS0ATMkyFptYbOB0uM+GFPpJNPb98VSl77xGVc+w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBEDcCRA9TVsSAnZWagAANIsP/R3zNMcilGrnYdMArVPx\nAPJGgNlFVv5lOa6McbmvXuPCaVi/DykPa4alY1qWTpZ0tQo453BgYCrH2rlv\nnQh6uLn9B9/Z9YPrAIZKwyaUm2FsmdxWCR1XA3d1Yu2zm4LtIXLvYrdGcutc\nFsWbTl/7VstK422SX7eTFyBTbeg6PyYDUhm1r1jjXmP/MayFFTSw6Go5cTr6\nNlgB8zHqOJCTkDm5J6uPUQ1qHEEIaNDJVyuIy2ZSRRrEHf7RSlDW8vQmP6aP\ntSrFn8JooeRwLVSzKoGbdfRG3DItQYGgsPx58ZSASu7fAmgBRghwwm3FhTuJ\nMANpjGMaGjtU/PWUV6ileeLScWJc9b/XWSLv4lwKagMOkekU9ELhX2ZzzJfY\nO4Uk0zeQqTkr7ZS25E4cu0QiUSwyIfqQlTfcxAkl4axGeKiEF94BmrJICSqs\naJNvX+G81We/etRt8zhnCEmdtD5dXoM3ErRxALDKUYLZrx2x1oJPW7aSIbGe\ncVWmD9Swp76387DXA+WdV4p9w+8EMJgD5IuwP+QJIFZb84UNET9jEzpM481a\n4a0hNLU0cW24D+lk0XY07Lkc3lIPHPBb8S3oPTOEBDXU20eSJJsMy+dnOIxj\nc071lpJI5DV1w/qK5yJzlnzg+wLjZzNxsFr7v4Uo0plneoVLtByN2LadAkst\nJABR\r\n=O+bN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"5d7511f974efac9a7d9ed4d9d5fac81909bb0361","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.6","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.2_1610891483801_0.7637858551033685","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.3-renovate-major-socket-io-packages-6da9aa9c16631d728bee330b0eddf89afd8b61f9":{"name":"@balena/jellyfish-client-sdk","version":"2.11.3-renovate-major-socket-io-packages-6da9aa9c16631d728bee330b0eddf89afd8b61f9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.3-renovate-major-socket-io-packages-6da9aa9c16631d728bee330b0eddf89afd8b61f9","maintainers":[{"name":"toochevere","email":"pj@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ae4da91dddc62203dcbbf3e8d18b2c099231ef9e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.3-renovate-major-socket-io-packages-6da9aa9c16631d728bee330b0eddf89afd8b61f9.tgz","fileCount":18,"integrity":"sha512-o/zqZHnesCyjSvLxRqQrCOyiVGzFqIG0z4ORbBwfykdKE/U+6xrIBnFnoaNvhC9kidTULuHVtvEQQVaT7+abRw==","signatures":[{"sig":"MEYCIQDU79k5SaJpdsIPY6TT+TPE/RsHnohPkfH1M6dKj170gQIhAJdTVWdea+Tq5RhEZEUWV0zcOHFhRxk4StGIisVXNh9W","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBEF4CRA9TVsSAnZWagAASGUP/1SxsaQ5SQuVdEzH2dt6\njD7BKedQDEnKdqO/gHwFLOd7eURIJm+ei58llbuB2q2hniYOkpShymUORyMq\nbrnwmpcf1KduQD+xUsLIXyDSPjW/12Fa+36ihj4wYJ0JELY6FiS5Gzc7f9O7\n1BO1UmBH4pibF5ma3ODvXrGf6QRMsaEyLfiI6v/V0YskFoj25FiPlPaB2UOY\nwJsl9uX5LgJplqPqooWicrRCbb4/Lp+Imij2v0nJhaXXo/ThN2Q0itCfzUXd\n8MO/Top2ZS4lRzbF2UUXjP+HiOehwFhxzR9kcZdqSGtfxuxKjMmoB4JiMxFu\ngRZyPpD1hMS1ToraBRvqpPetYsGSqjoMwgfEHYerjzVo3Q55uOzucr/mNImj\ne7jKtcVUg2fGlkkP5rwxyva47KGDxVt2LhuKWndkR5/Cnv9Lsvr9KVfGIWDi\nk2iufiPQETApb9OUOI4KaZLpsuZt9cr0ck8GJOfJYr6Dprt7JyUzeIGstFq2\nXRcQh6V7a72kUglo3OyCoa4LSjgfb1ReXzgB1FgGEwwMb2yU8AfyYcj/28ZC\nWwL3xN/FUIz3zSa2FyPGUaUSauGjkPQKzSrfVfIzYS1+0B/xDerw/hmG2Opf\nczFQseIFJyn+cdfKbQ90UxAEHFFUecHJ9GV1zLP48o783Ui4JUtYA99xhy2J\ny+OK\r\n=dSzK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"6da9aa9c16631d728bee330b0eddf89afd8b61f9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.6","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.3-renovate-major-socket-io-packages-6da9aa9c16631d728bee330b0eddf89afd8b61f9_1610891639947_0.7404518956727755","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.3-renovate-non-major-af5d21c08e35fb9d9bfc361f362df0973378072a":{"name":"@balena/jellyfish-client-sdk","version":"2.11.3-renovate-non-major-af5d21c08e35fb9d9bfc361f362df0973378072a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.3-renovate-non-major-af5d21c08e35fb9d9bfc361f362df0973378072a","maintainers":[{"name":"toochevere","email":"pj@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4f9f0254d03ccd2e3c740bc637c9c379f54ec3a2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.3-renovate-non-major-af5d21c08e35fb9d9bfc361f362df0973378072a.tgz","fileCount":18,"integrity":"sha512-VutxIjlpwsES4HcHUhUIombsJZaiPk0KS/s1/07/tBYIiM7N0mi7UwxIbWvPgvZWZRbdagpaN98Bcv7wadmhIQ==","signatures":[{"sig":"MEQCIACU77zQK1qqzfFA51ncQl5lN/FHAhPABEdjoacqHfdKAiAQji7Bpn1FzBg6dVQqWqmXcsSfb6WNNqFpzRO9wWpImg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBUkACRA9TVsSAnZWagAAvnYQAJ3MoQaQ6UtozGgBON99\nA8q8SynrfaKiibjjCjtmuEH2STt6LlPCz7ntWyX5OfDfMTsgLiViq8dPhpq5\nM1B2+tOzohu8UGQJmSxo5nzuXGx0xQh2bu5A5B/CL80dHzjlRPMRFJxDYmP7\n9ghWzLCMw1eu+HeWQLe0XTa8y1loq+K1CK+G4mMBUpXK58DhWhKsl9NEbIaZ\nWpM/LnNHoAAIY0FIpffFr31WikZmPAPLbqb0DW5zzelIlbGR1WMjVygR93dp\n0kDF9Dm+0KmkuJjAJuxbRdX8D3LRDscvxW0qkPCnqrCW0C7KCrYDKpfGOVfv\n063VtTu4b0mcWYSOGjadp0VrwJNrwr4zLpf+Of/qGBK5ta6cCV2VKU1sCTQA\nCsKCCJQUeBVa2oiOXx81mgCmaR0xlGXyb1vvdrwl7IcJGG22I87ffsz1IeKd\ntxUiSC5OEQQPOb0mYGB1XbAEO97rx8iCh4h8Ccz8LbfhocHHN2DkHktBAYDA\nr+ecBpsOG50Ul5pi2hTO0Gxy30laBNKlKzRa9DOI/Kz4Y3SfunpUgIJ6EMW/\nxkAWn66L2taDNVaFbrFmE5LCX7Dzs5Mq9BXRODZ6z/2bHg9tWT/yREAAVvnV\nYIpu2vwAweT6B69fwD7AJuNOkbeW+eaRt6VUstNkXjbPm2RIjDwXYvEPMT/J\nXz5c\r\n=1/g5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"af5d21c08e35fb9d9bfc361f362df0973378072a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.3-renovate-non-major-af5d21c08e35fb9d9bfc361f362df0973378072a_1610959104271_0.25538451106019","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.3":{"name":"@balena/jellyfish-client-sdk","version":"2.11.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.3","maintainers":[{"name":"toochevere","email":"pj@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b680cef969e3bbfe948cf6b35c1c7b7cc7639350","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.3.tgz","fileCount":18,"integrity":"sha512-40vaT/GrPQVumPbZsL5I5z4viAklENK+S77WsfNyxMkXBVuIO7lg3+xUyqLIg+y0uY/7ijB4BSEjo4wA9enS5g==","signatures":[{"sig":"MEUCIQDIKe53BZRL0nOnkoooRkBSj+QVKTGhcQxz2z1MiurcFgIgCZnrsAPwTOL/TRalYWWWgWmtuH7c9L59bPGTNRKkVqY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBVddCRA9TVsSAnZWagAACYEP/0BFLYmAsgdnGZpTwMTY\nV6UxEUVmLRKW6SreB6vJYRCZx/mDy+iUTYZJlNoU5WwUoRajiu5kqQo5wahT\nxDIrSjyvWZROdKttzH5Prqs1IgmBjXdPzyXLJZ1165kdhLGiYIaYYEh9pv/4\nJE6DwtnSHCtlmkDnPdT701Udcy17gLzSwK/coT91py+nHRsiF/GdZrA8CbEt\nu2Qeqs5nqkkEBzsAKD+Ov/Dfx1fjurQn61n5uVU7gdx/vDXh+rGZu4xrxfIe\ndo7nqr/NjUVVDhzblB70VcpB3qi2h9Sz5bWS9esqX0+VNc8IT09LPll1PfGq\nicf/XAGxQKALa5yTZxHj9gDQgCNo9JCq/b1vOzDZUG4ieDutiYeT2ZbinTSy\n9JPCPNOiaZ2oO9nowtRgBj3QJyD8lbpl4CDF0v0YLCFK20OHIW5xRwFd9Pnj\nP8GAWSoDu2p38rWAkLluzdYrVacYGeFHbkBpQv/RYkof+FiLkFLbVpzLFKm1\nDyf+PPNHZ8JTqSit+TCIvpKdfV0A+Okq5xLg56Vn6fHB/i0WIVFLyPZCvAcD\n5f08wvWzDBhfwoDpTOSuUn+zrjkIzMT6caFUXR+gbbcrjnWLBqWngi+okiIg\nLGMfXoaUuH4byXaHfITKaqFOT0WbRsR7XqzdQbSYg0WHzwE6GXAlT8UfE+BE\nTx4O\r\n=CEOM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"debb1179a06a488c677d606292a300ebd900b291","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.3_1610962780531_0.362321928342237","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.4-renovate-major-socket-io-packages-f1ee9ec824fe1b55775c22e4b337eb855ec4d3bf":{"name":"@balena/jellyfish-client-sdk","version":"2.11.4-renovate-major-socket-io-packages-f1ee9ec824fe1b55775c22e4b337eb855ec4d3bf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.4-renovate-major-socket-io-packages-f1ee9ec824fe1b55775c22e4b337eb855ec4d3bf","maintainers":[{"name":"toochevere","email":"pj@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4792cf2c994682002f82cd8c232f24ca5ae15033","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.4-renovate-major-socket-io-packages-f1ee9ec824fe1b55775c22e4b337eb855ec4d3bf.tgz","fileCount":18,"integrity":"sha512-B1dgdScMKiX2esBE0CTVhcUmf/ZzE9X2ozKYCcmgCWVyVG2C3jfoV0FCBZ4WL+Zi/v027AhHQwx1z+SED8JAcg==","signatures":[{"sig":"MEQCIDnIAla+PBrfvjjWGziNzxIJ6OWatJ080DwSod6i9ZpkAiBwNmwuTDZnzcW1pvgx8oxN4bqrHltsNPOkAmFLfzmcBA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBVhCCRA9TVsSAnZWagAADJUP/iOiHusIzsBndZbICpae\n6OemupsFz2xAP2Igg65tywlFgARU7cwjCD0SNdAE/ndB+0PjvneVv4jXWQVo\nuJYAhM/BlHIA5d7kk+mpjQkPC2QbIslXGQje2MN1sUbwN+zj9kZfg8pWjcIB\np/W0cCrwgQEiuRLmiG1E0Xr6bOohapURiWfoscFm3lS+HwwFi1KlzyXmZ6ts\nl2r+wBVCXNP5zbGloXW2yrD3/esuvLEHPYmrq/B4xdbi2AIYYsYkQ1wHvznD\nmjVTL7rSAr+gOHWVxSqZjMTA0rzdoHvWBIDCpj2y98QYk8CpChL5nfKC0Bjg\njemZmNPWPDTho4XckYy1PphP1XueOgVyxEkM+QYRcYnsBqWgqtR6suNaf3PN\ndcBKSw4uS8uUbH11M3plfNES+PGOVKhHKqHUiwMd4zpiz/79DPdkswmpAv/Y\no2wmrx3yYeT+THQUBeND3tVMtcuU8y601dstav+QoJMHhxS/z1bi6ae0mxKP\nVeD9alZBRTwg/kwhQHSe7wK4TW5nsVRKw3FYWCOPtcVgik+Qka9RsVDAn44z\nK8fFTR4cNUWG5fv76fLOxt2OdBdHBjdTNjU3+AU3dipvOcW5F/vnPU5/wNbP\nXdniRVRckEZfbB7rGvm2MimUdAk6El2jQJ+Yka5uufRu88baF0rsLXXCgE2h\nLvZI\r\n=Apr8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"f1ee9ec824fe1b55775c22e4b337eb855ec4d3bf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.7","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.4-renovate-major-socket-io-packages-f1ee9ec824fe1b55775c22e4b337eb855ec4d3bf_1610963009601_0.6875383834876825","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.4-renovate-non-major-96e9dcfc25aba984eb5fdb77b6090d17621ce0d4":{"name":"@balena/jellyfish-client-sdk","version":"2.11.4-renovate-non-major-96e9dcfc25aba984eb5fdb77b6090d17621ce0d4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.4-renovate-non-major-96e9dcfc25aba984eb5fdb77b6090d17621ce0d4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"869c1235ef47579939819939fb4756289e38d7d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.4-renovate-non-major-96e9dcfc25aba984eb5fdb77b6090d17621ce0d4.tgz","fileCount":18,"integrity":"sha512-hoV2fYzOurCWc1NU8x+Ko65H36CAnRnCzxmeLWR/giBZE8HySnAImkOFJoH4vWe+fjK855rDpyKUGEj4Go42ww==","signatures":[{"sig":"MEUCICXcRSq9h82+Tu2S8N50pCq4PRvPVaOEOFtTVLO4bxWQAiEAlmCvjTvc3hZ8HOtqW5MFzF5Cv8jKcypT2GjlDuNtjOs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB8L7CRA9TVsSAnZWagAAFpwP/35lQOmMhk/fJg66wt8n\no2wTPi9F3nhvmSFkq8/4GOwlB9YxUcLz1yy3iKn6T17G3FFaRzeWCjDQcWLc\nq9doldy6JSa7OmF1rlljIUm//JzMeLryrFNDvyf4RC+ezqKT+gIweVHS/DgF\nHuA5I3wgnmW+uLFEsKf+Syt3B8DNGj/Rgn55s9yS+Pee+sIsxPKzYpAhZLWW\nWCXVevHc3P+uSKiYIHOZ0iysLtwRKiIGrI9B6GKdm4MmYOcil7NJ/v4IedOS\n9oTqwQ2X4hnPQ1AhNi/H+zAF9AwW2A0omW6DhOb+WjFinms2olj/cFyk3jAf\nAR4eUiP6BMpM7DRd6GAP1SLoiv/eQ7+k8w2BD6DTW5N+Y/+i4fwB8HHiXBz2\nrSqrQ16bkSBxQyqtY1NJEtLsHzpPoCP7aEIS2pIxHy/TOSv52SEu9+RT7wCz\nAqIXhDTae5nM5dZjcwJ5cPbVCfeFu+FcRFEvD10lWkQ+/gp+aSj62PX/9G6O\nOhm/VV8EJD3oao7TipU8hSDRgSbz4wBkP3HXQGwwVsKkgSZmnobgjfiZ4iia\nvyZ6RJAcDvS8KtqjFT46Qne2HQLpbfGJqLPF9kWAE5pL1IXxaX0pjxpgDdud\nCWhVhfsQGpx3HQQL3ZEub0PRjJKdvHRrH+Ox2IqGuMs01Dzc1VO9jAan8XBs\nEBxV\r\n=9TFz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"96e9dcfc25aba984eb5fdb77b6090d17621ce0d4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.4-renovate-non-major-96e9dcfc25aba984eb5fdb77b6090d17621ce0d4_1611121402758_0.9416491083908216","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.4":{"name":"@balena/jellyfish-client-sdk","version":"2.11.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"57c9e9af9a75f0fee2d500149f4783a60169c47f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.4.tgz","fileCount":18,"integrity":"sha512-2opmuKjDCFJ7XF0euj665doP57lTCd/fC7e5D66hxk7VIdPQNGQfpkZIzh++tB2aeMB7ciw5nYG2glKN48VJnA==","signatures":[{"sig":"MEQCIHDeLF5H29aPWl6AdqhhPWE2kLV5ojio5S0V6A1sQ/eAAiB7PvEyl9DJFbJS0jbXL5JdZ4r9mguzSQUnpsdb5OpOmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB8PVCRA9TVsSAnZWagAAXhgP/iKKGZhW0ZqlbL+rslX+\nsaJ2m5kUSwpU038KLiL1/VIXhut1iMlOfhu2EhDYm81JrrT64l343DkX+pMX\nHVOXvycLhfbN0o4E3Zto+tLPuV7JvOw5DbMA2JjApErBEpjrCI4F7MHZrnr4\npy9ND12fpRlmdJKpwIFX9EzfALulKIxyU+mZClWaZFacCv2Ya4z6kS3ppt1a\ncoV+FyYYgmVghZ+tEZDDKDksbNCe84jcdmyzlrM99DJaV3/9PFffFNlh+AHz\nuiWUBepCqyUb9inPOJ+PUteK1WyYYxsgbWBn6lw+MEEVPHvkNcDu+djjLfJD\nQOeQgoFbaQxQq/mSNLqom7+GyBa1UW5LuxfodQauLILj6+B5Pn+4kUh7l5zb\nLMwTzT/eW4zBhUkvP/MTecLdccZ/Zzk4ficrEkmMEzFRqJqYPallTQn7H3dB\nIPy8Hf+IbP7W4Yh2grRiVg22VuhU1BXQnmxfpJDR9aa2YQKZD3YnHxHZlUwn\nk3gmWOmS+xF3L+mbOjwL43EQLx8ztb4GThDRmEeOfUFFskPiAdoch84ElRxi\nt9ybfgeg4zTvl2n5IB7zRlTi36Fzrn3jooGmDTc9c8ZYD/aEDsBLkR9ELXTn\n7IijmKDpq/SQcC2lNzM4g/9kfNWcJal+lQ+vwccyYK4dttmAVXncq0a0c8Li\n+Kiu\r\n=GewE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"571e271baf4c5c24a983e2868463a750ffb0005a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.4_1611121620774_0.22640899745217635","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.5-renovate-major-socket-io-packages-c89e6002dac75aeba7ed836e564c5d37c511a6ab":{"name":"@balena/jellyfish-client-sdk","version":"2.11.5-renovate-major-socket-io-packages-c89e6002dac75aeba7ed836e564c5d37c511a6ab","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.5-renovate-major-socket-io-packages-c89e6002dac75aeba7ed836e564c5d37c511a6ab","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"51dd83b68317956a87ed3ddf8a4a52f6e434442c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.5-renovate-major-socket-io-packages-c89e6002dac75aeba7ed836e564c5d37c511a6ab.tgz","fileCount":18,"integrity":"sha512-hKxoU8F+CtJDY+jF+M/waFJAbgaF8cF5UB97IlzCIJ96HYvBcsaRB9cVXniiTfpbmHztU0ZfB2VqpTkptvpJDg==","signatures":[{"sig":"MEUCIEXrS//ylZhMO0Pv1sSsTPlbIdI5r/JRwGu6HIXIMI5EAiEA1ApSZnibrvedMCeuKAGuW3uAYZjntNpoXAZZFx1oHXg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB8SGCRA9TVsSAnZWagAA76oP/3JF+03Tu3POTSbgM1WX\nsc49/d8cJgHIzAMxjdXceGYB/G2YM+fqRSQaDN/4fsIFq8RsQyrbPmR8cJsm\nc51NU2htVwC0eNBYV/E1nSdJ7H/uKAw8Pr90XgBp77xYzSf6ymdKQhbOZD3I\nkNj4u5p71t3UVBTMtLmAABPPyFWw8KQWDZwjOKQmkQ2LrKgjmK4a4g7JmBSN\nJgQGZX1uc7Y1hCSwHS4erh9FXN79QB8468o+l+6YEHMISE8BGoAb9q+daKOM\nhJfHGvDIMyJMvkQQRFddZ7pWNFcHmwNPxjCKl7J4Nztum8n3bVHrHMjMHWFL\nLnEHb2BrHTwfC0VYqCLhfnW7gzpy3XQILw1EBRTt7WLWq9D+NH8WZDRWKMU6\nzsXJ/2TtZXgOb+rPE3oe1RJYZdo7kKVtyJKKnKXy97otpKGmsxx74off0nPH\nHKij2mDIqc8aRID/juM+lG88tMAWqsfrtRI+F6lNgtEd/HWBbp/LD8v4StMQ\nmCMRcDwYLO1HwLzUrGLUTzeDvKji8Q4cQS55uBHn+wasGRcYz62vaZvomCTW\nV67MidOpGTglrZ+wv7Q+Mv8GnTsijMgsL/Y+U93IWur9eegiCZgymlyW6r1I\nSQ0BYp8uMCBxysKjGGFjws57f9vWWnl2v4BCmtgCCkop/DbO6//PdFhySpKL\nwL+A\r\n=JXPf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c89e6002dac75aeba7ed836e564c5d37c511a6ab","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.5","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.5-renovate-major-socket-io-packages-c89e6002dac75aeba7ed836e564c5d37c511a6ab_1611121798140_0.147003969252816","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.5-renovate-non-major-4914f0651e0b354d013d95e1cc8b156e102fcb3e":{"name":"@balena/jellyfish-client-sdk","version":"2.11.5-renovate-non-major-4914f0651e0b354d013d95e1cc8b156e102fcb3e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.5-renovate-non-major-4914f0651e0b354d013d95e1cc8b156e102fcb3e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"650eccc9c701c88e9841e02286e38a2db387b0ce","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.5-renovate-non-major-4914f0651e0b354d013d95e1cc8b156e102fcb3e.tgz","fileCount":18,"integrity":"sha512-pBNRett1g0nKsARWysMitDDjhfHs9nTEZsRPpZyZwgOynfomwzUHH2wMv54Up3T1VL3cgDuYjA1ilG9KIxWbnQ==","signatures":[{"sig":"MEYCIQDuZEMhgI1Pb1gT4ARRGR0bTqqKWugGIZboSF93hbtjNQIhAP2mmwo0/Gl0Yoqu4WhqQwWdTBEEeHYsePewG7X3/3nj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCJLfCRA9TVsSAnZWagAAa2gP/0XsnfLc1SgzYzP5VG0A\ngfyFZ4NN6lkGUQXzxln+stlmyA/Z1OC8rFfWClVaJbqflEncklkSLlmmhnPX\ne+omAjWVyS9N3T6iSOhjZxVdhJpS8Zon0gshdMEFKNV2nlbfoaYHhvZbXryE\nm0IFyNIwnl1rfqdyU5lMDxtFCvLrWM7R+3YvILWNKXGLAOGxpyVkRhOUms1h\nMRMfX2qVmWjHWRY+60daBZFIDeNRnTBDFTJUxngMJFPsx+9/GkCi0OMblwqj\nIsmk891kTJZJcc+uCedcbVXr0UXXVfn1KIx2d/UVN11XufCkz+ALyjnhxBka\nQRUhqICl24290iyblJyPgStRTX0mOnRHS0myBAWLChjNPr92pklxN9mFTI7v\nPaJcyuD/lZCzm8zUNZpo9/9BOSCfuxBLNlaDOQth+NG2/tytCWS23pG6+I58\nS3FzlevlbYeoJfZ5tuM5+X4O/s0cC8Q6ANxHIP7AoswgYDe3+VAMUOZgXPbQ\nB3rnMarUR9UUFp9xLOConU+ifXLOqiLKCl46AN/cl1XmQfGZrpYJiDIi11+l\n27Q19247u5Cmo7L4bM6xKD9E7YSftijtaorr4FwQ7v1bsV6cvy6pL0j08OWQ\nY3L6Fo+36ugu4t2TT51cHPTV95cJH5l/ckrJGd5D2raRwEGMIZEasBz+nYVV\nxhrE\r\n=/CEW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4914f0651e0b354d013d95e1cc8b156e102fcb3e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.5-renovate-non-major-4914f0651e0b354d013d95e1cc8b156e102fcb3e_1611174622825_0.3399107355138944","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.5":{"name":"@balena/jellyfish-client-sdk","version":"2.11.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f37d84bb1577cc6ec44826fdbf5a1fcf1957f431","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.5.tgz","fileCount":18,"integrity":"sha512-UgUC0a30KlQD8VloAsH15SS3ZOadbl0MTu6YYmk7ydSe+XM/MJ/qIO98O2umf2c5xCMzn22zAcsrbg2Ub6utog==","signatures":[{"sig":"MEUCIGgYRgFjvqs48WEokTtFS5DuG1EtHgqkfdHC8MroB70YAiEAzPR21ZiD5WleoeJtGGGyMyB3ZJabCAqY8IeLqsLvLBg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCJOMCRA9TVsSAnZWagAAQkUP/293I5/FlNxkkVbNIONR\nOfJD5wMgwTZJscbgRwmaq9VzVHDB6GEfMr7atrmancUjNHV7y98DVvU/UpVy\nDk3C4hnW0LGnldcDA3RBP9B5OUCQWUWS0UeJgPrER8V93/EQA4sr7f5MWYYv\nFASZy2ffR6SK+C4lTGwhIu5SZVx4d9uvVBBx+5R08irU4sTJgBsTKc+DeC+3\no4Ql4W7sioQnnEGT3QHnK2SDlFN4JiPn/KiBXP/Q5wE8qTmkQXIoHz/yPdvA\n6+Br0iXlpUATURM47QTM6jYm9hoVc/qcUPh0jKQWpNtB3yhyQWCNnWtTQNXD\nZgKZj3GmwyJviM1s7jM6UQyWvk3ub1t6N5ha6uQpTL9Elt7EJCnObfqDy84j\nshajXxbbjMl8SuCmEVnTay9k4NCA96iLxG5BsiD8fxfPQVA4gJXnydZ3imiI\ncL6muyy6cz65nm7fZtAi9ZMM0IR8UXeQa13k2luRvOKAPXe0yOqGJsMA9ycQ\ne6dfMPRinhBUeCAgoToUfXeN87Kev58QrVca3fx2b9aP3QfGNxmu7gPazSoU\nDF2vPuaib7SF0t3mbbq9S70jDzrcQtPKTD2TljO9uOyj4Q3o9PdlTqg1pHGf\nfc48L4ebdtWdrQOCzt7F4Ce9q0YN3Y0LCQ6t3rR4dYdv2Agpmym7arD66+3m\nMNB0\r\n=D58m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"1b3febe8224c8b05b4979936f423ab620f5640f6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.5_1611174796265_0.3167783550270755","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.6-renovate-major-socket-io-packages-fdcd6fc6020366f2089aeff72e17ccb17a8e8ea6":{"name":"@balena/jellyfish-client-sdk","version":"2.11.6-renovate-major-socket-io-packages-fdcd6fc6020366f2089aeff72e17ccb17a8e8ea6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.6-renovate-major-socket-io-packages-fdcd6fc6020366f2089aeff72e17ccb17a8e8ea6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"94a3a5add1612649b2789453482640279a1bfb27","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.6-renovate-major-socket-io-packages-fdcd6fc6020366f2089aeff72e17ccb17a8e8ea6.tgz","fileCount":18,"integrity":"sha512-fzJojnKy8hoFzT4w8xHbmDaJwsbN3vcoX2SPeW43DDqznyuc0PSm65b9YAUL4YCDYmTc3c8Eo0ixMzMSPZqwBw==","signatures":[{"sig":"MEUCIA99a1RKg2K0vNkF5s3Atod76oYGYFl5H9xQXOgEWYS5AiEA8EH8iPsUajqedI9DG0UmE4BLUGjeAk/vD0XTklf/vGw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCJQ5CRA9TVsSAnZWagAAfOAP/0TOTL6FIN9YrGeaCtFX\nahNXTyJQqZiJwEWndIMqDOTHHw/Mf7Qk4VvdWtcTy4tc3qNfZ/SAf55/WIoD\nxm4/oJunXUSZD2CzO7VIQmYhfhqaZpQWVrMEshrHAt0DF3xq6oYg1/CRs7T8\ng9ukM9tJvxjRPa0lTb2r9osc6TPZoz7U2om8Yz6oIHPkPFZOaamtGPIg8ZWO\nefFJ5eXajVgmNyOPTB9s79SGhiUknMsse9rJSt8gtxnFGnZ0WN5tdzZC/Yyn\n0WFCZXivrZVtWAHgnO4VLeE/ZZ1t1CC3AvsjHjLqziY8HKZWnsXgb3fGwDYD\ncHd4/qxJL7AHrDkXrE3aDK/L9tYvbuk0FZgVbP/JmXy+Qyw2YWW93cmnFFY1\nclsdocWVT9yq7IAk08ug3O50Wt3b+Z2KloCRfS+kMOl1JMqzN4MdZ3y+DhNe\nZ4zn2pV25mkgOAS5EQJw8BKZn8ulvbyLa6/qMOBCtS3q5wrrEcDYsCm6Mz+8\ndWGP/7AjY3zI/bEl6GzfREn5PuPVROd5EU4xNleixNKNgdfVfBPvdIoyyoTe\nhCKUERRJHB078IkaFpmNIinWnShHXGKENLuaLyy15k6HNa91LzoSEmjG651Y\n6+MWcH6i2CWyzNKyxFe6VJeWsL6yfYTg4vBezqQts9BIcmrWeUPbZ8PDhRkP\nx64G\r\n=J/Wp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"fdcd6fc6020366f2089aeff72e17ccb17a8e8ea6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.0.8","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.6-renovate-major-socket-io-packages-fdcd6fc6020366f2089aeff72e17ccb17a8e8ea6_1611174969457_0.5208211627817387","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.6-renovate-non-major-fe44688501975abb8c7f38cde23d5a748b976ca5":{"name":"@balena/jellyfish-client-sdk","version":"2.11.6-renovate-non-major-fe44688501975abb8c7f38cde23d5a748b976ca5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.6-renovate-non-major-fe44688501975abb8c7f38cde23d5a748b976ca5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d90a319f218f591153e12a0b8b1e121df5751d28","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.6-renovate-non-major-fe44688501975abb8c7f38cde23d5a748b976ca5.tgz","fileCount":18,"integrity":"sha512-57gs6rggU3eVR6WdK566CLUsuZaBxRNdz7mRSYUzFFi1/tq9X/acKsHCWm2TpuoTg8ms8Z5eWybETLVoWQaveQ==","signatures":[{"sig":"MEUCICM8xZ713eiZpLCrLmt/CNRKAQZCkfWAmt9DP84WRRDBAiEA1XWGnF5wHNqfjGRHyxlKrSxQAxC5+XN8ta6kBfFNB+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC6p3CRA9TVsSAnZWagAAg5wP/RrRD/mlGPNv+G31XORz\n1hVMF5cLvJKEoa7b0PiKPahzTvd2WFyvvMCJ3gvGqnMcsTerjL7v+jTvOTSu\njtupiDEnoM1v3r23tHYye51Svz9Zr5KdLTpIUcVK4uVqGYQ+s/nqMxirF8z7\nW4FqsD3JqfcNQGP4VcPRhmR7mpyFcelyyQt2RHTzZdUXo4WhDPVjDitEWqGl\n+EXmrnEEz+N4MgpZxVErg3XOEQw3IMSPR64GSzqhywPNV9rJmPLyhIBT8V7N\nTSWaooBwtVDoDrSF1nsCwgBhnnFNlyy5XeyJOzP4ZcbAf1ySRTAJJWZxpxX0\nJA943WLYh+bkbKM019R9dJtwpze2R6eQB8NyP2bnE79XIbHZkZ5z1bGq27Ot\nVAuQFeVI870XAnT4g94bI/3WZQgRdYlgiK53dgEkDzJu/+aLdkAtIGHUAscd\nYXPxgaRLXD4pzRFydyxXLpdjKkHEwrFH1DlfmjcPnagP/ufaCEY3dxyHxzFR\ngwPF0C4eFBHJD356kQQWzm1cNT5e9adP6tq5/L68ZKtVNPHbUe/tyYNebJZg\nFgN7FjsZhMATaEwmrM3CPbFjhhxy8UuEriStTJ+AW0l7aI6RD2QZ6eU8xYcD\nhNcys/CwSkjliIVeCj0Br4HhCcov7gz82Zv/u09DhMHfzmZpTiZ0X5Iu9+oY\nZ5Ro\r\n=n72V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"fe44688501975abb8c7f38cde23d5a748b976ca5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.6-renovate-non-major-fe44688501975abb8c7f38cde23d5a748b976ca5_1611377270836_0.7068243013836042","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.6":{"name":"@balena/jellyfish-client-sdk","version":"2.11.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a720d3dc4d12db8724b0a80308f55d5c6ed425a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.6.tgz","fileCount":18,"integrity":"sha512-s9Y4hAQaLV5BGtbYz84lGl9w/A+HNj4/coCijycsGYYLmgTd2eZTiHksutbiNJsdkE13Xgp6YKns9OGVWyzeMg==","signatures":[{"sig":"MEUCIBQgq/pYQmvLyw//6R5j7fMYMTKnfeV97XcAJ7ozG7h+AiEApeCqN/VR3U25UkPzME7Q6VBah7FoMuXso6KnvRG9yQw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC6s8CRA9TVsSAnZWagAAM9IQAJGoZVFBIF71EFpL2/h8\nGe3t7sSnSHHWEnoTssgbeaW3BCI4/eNyMxa56uvEws+Vc6mzeEwZv4GDJFe5\nFyN7SSfIFIcq2wHvj+sOjA7YOpCzeq2ZUINmgfY/Ir2n3qVIXaaXPTjChQxe\n7+tilR3L4Vm5L8ypMp/PNWJHHj7HsyiAZM05542Wl517cJYFIqXfHtfIxY3w\nhTbi7YH/W0HoUq+4xWYhQbr2BVdZ7DfaspmqXe1uoRCzeLhVoaNYD3mzZYNO\n3M+hP2n9HYLdPlPR/8wbxpBfIJxPKY2AlfoFN+L6QaTHULEeK7pNZgwPE8SR\nBHzli1FBT8IILpShjkW5yPOGC25TkXZ+XzZHaBQ4KxszoOqrMWokpzqHsqr/\nOn5Yg83Z8vsIJBEeN7ANr+Duy96v+Vi8K+zTMdbovMEBIjr1MN5VDL8J0c7p\n5kNgsbzZ7I/vy48wsqE1sVoNd5hctwWr84g9Snh62dlWkbTJ67dJtBmpCj7J\n0E6uiFMX5HCKCYKsGrG+ZwvMZz6PWBDSVXs/Jume9OAcQ1T3w+klfYtUX035\nMkSacytyxI4z3yDxK3LVxNVUOqusIPKQAsGwQhG1sjMJCDaSgtlxRxXyK276\nAdMibXI6eV4L3dv77cL9ThFxF6lHtdypkQnm+I+S1kFZY58urNNg9Z72MnDV\nHXt6\r\n=KOwi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"fa58f9497e93609196a755c7fff2cff33e27c204","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.6_1611377467537_0.38997017758963426","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.7-renovate-major-socket-io-packages-3248e34368d1bf99cd0d46ac13f6ffc9d4b1964f":{"name":"@balena/jellyfish-client-sdk","version":"2.11.7-renovate-major-socket-io-packages-3248e34368d1bf99cd0d46ac13f6ffc9d4b1964f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.7-renovate-major-socket-io-packages-3248e34368d1bf99cd0d46ac13f6ffc9d4b1964f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"efc206ae616a9d3a879aa25ae87768389d65507c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.7-renovate-major-socket-io-packages-3248e34368d1bf99cd0d46ac13f6ffc9d4b1964f.tgz","fileCount":18,"integrity":"sha512-wOXxXUL42zMnSiO/DRC1xI+HsEgRy27S4upS3B+YULUX03ZDSGM6EWde0DhMxSizD7Zx+/4eVBVHrUwIpAdmWA==","signatures":[{"sig":"MEUCIQCQ23zUobWy/NOurVoMc7zOuZsq7Oq8nLLEiBach9cUuwIgX/s95Y26TyGDlMqMBnrDq8rtZFksQ4Uymibv2lGYRjA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC6vjCRA9TVsSAnZWagAA/FcQAI9WM0RV0w7IeS0ZnJ5O\nT7BHkYvbXYcwlv+VDJc8lP+RII801m0Bu8crzBc/wZerfa91mXgy36rZZDxW\ntVr0L/yaMiMIiwDMaMJVAU5fhJzr5rOGLZVTisXGhgwmeNjh4crfYBO2897p\nOhlWf6B99AcwZF3tVipGLiz+1sd07/3otwutQ84bDeG0Wsn3sB/y83kzz0Go\nkPoQVwEIGWDziZ0OM4+4ab2SqrqxLRrRigTKJk6hNLgrSOxmyNhjOJAaEM0U\nR5uzjFe0trN/Z8DGoJYYDPiabwFJrM3+jqVhtqs/lNbhEtwenKoq1dU/pww5\nelPqDbf+eybLudjwon48qylzk9e1KYfutDQI0FF2uKxEG+FDpXvxCONo4JxU\nXaRDisCWRItn2mif78Tb1M19dyQ+7DluP6OP4IpQd7uH6y93o9jA3PTgl6Gr\nRCEsOchIhfXBu6ka5+/Lgp7UmQnsJZwQakmIM9qchKrR9Sy3LHt0Y/FRVQv/\ndK7iI3/riFMwh8KNyzQZ+/og2jr+lWlYqVS4hZNe6+rKGHo3sITCmXkf1UcO\nxcN9ymdh9cbDrV/dp0oLJW+ZbwbETM0ed6hMOacyJMuQ7tzzNLqVXTzBaRHU\n3h8XZUuQ8E791SjTNCvBGijsBZfwGm2tOBLlRBVimL4KlSmSiFFplhvxf+lR\nGpU5\r\n=xMFs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"3248e34368d1bf99cd0d46ac13f6ffc9d4b1964f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.7-renovate-major-socket-io-packages-3248e34368d1bf99cd0d46ac13f6ffc9d4b1964f_1611377634890_0.004685124296715859","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.7-renovate-non-major-ca182ad4b57749cd680a6f7e1561becc8bddf63c":{"name":"@balena/jellyfish-client-sdk","version":"2.11.7-renovate-non-major-ca182ad4b57749cd680a6f7e1561becc8bddf63c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.7-renovate-non-major-ca182ad4b57749cd680a6f7e1561becc8bddf63c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"42619ced85e0a235802898b7f4b1b331c446ab04","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.7-renovate-non-major-ca182ad4b57749cd680a6f7e1561becc8bddf63c.tgz","fileCount":18,"integrity":"sha512-EtS7ESPfppk5oX674Hy/z/wTXuSz8S5xo4NwF9EXr4pp9W0cm7M5hi5ypkij4g9UE6IP6y5/trr2RgYPYHu7hA==","signatures":[{"sig":"MEUCIA0DQyIPrwIVUZ+YaymCKZ3AnYHaqQfgsEKosb4o2oYYAiEA08WKgX9KB6/2Pn/cuaAnWcSpuDjIn4C9K4hC5WvJCNM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC7m4CRA9TVsSAnZWagAAC8cP/RHcUivg3Nto72KsCuZX\nx8EpJjQAJ5wFTX/y3SEHKu9fLFSTPrC/ENsz14kBM3xocP2BJNK9AuHJoNp0\nkvnFzhOkQA+qU36iIS36LbFmVOW4PNIqp3DSlYlTHLGavR/sz3kKH8sywy5O\npLiPy9mAlrf/OD2KRUPiYf/dd3h9WiM/RU3QLd4pur63tGwI4fr8L0Hn46a/\nMOp9Cg7vMzGS+adxl2DfiXJivZfr7c7IXID4c3fVQBddhUHDoYghSkQs0XcU\nVVVwTcxkVXy+O5lYLtgrts390GdXIOxRNU1JuLQSvW9RKadYG0mOLgWhh/pn\neWgn6bgRUUIHD6Jaz1QdsbSg+YltGb0eAKZVoMe/SaVdVZSTkvJqhyvT+v5J\nBgA8FHi7QpCQ1VirmtC42WzIldM8NshjzEFeeoccKBdu0gLbdQmUyNbuWXzo\n6ZiUJy8u08ElvS+/xNtYkVkuy4AYMCEvQXzhyqLvHQQLmLx12jXFcORNsvNw\nWMW0BDDjP4YoR+rcnqxLuUrmCpNBXKTBnRp4jQy0rPPcXIyFnX9YKAhJoIhw\nIDNOmUjJTdG8dPE3NuTIyhvM0rt5Bt9LJ88G9FrmOYBRc8yqpsawgwjBXQEr\nM2KzOSmOpWD9z9s8RkA7jXSiGcWdJl8ZbW0YgzQ3hp1z537CMCAO8I+2+0st\nDc9E\r\n=Eg5E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"ca182ad4b57749cd680a6f7e1561becc8bddf63c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.7-renovate-non-major-ca182ad4b57749cd680a6f7e1561becc8bddf63c_1611381176001_0.41229482707411536","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.7":{"name":"@balena/jellyfish-client-sdk","version":"2.11.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"74c200b1a24922cfdaf32c171920cc8d0d5f3c2e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.7.tgz","fileCount":18,"integrity":"sha512-ZvDjDfyya549ra1sLNkJlU7RxLKozNhsQKXwkS+SZlt76HsObQ9LdPHfo2joNtHapSmoqLD/bi4OdMdJd7gItg==","signatures":[{"sig":"MEUCIQDzryOH9KtEF97OKlnt+bHkbb1ReSsWRK5fufICf5oQqgIgCyiv3L2nhyliavgzine2S80avWzd7cHqegVTAuvOmVI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC7ppCRA9TVsSAnZWagAAPeAQAIA+qVh5K07WDtJLb39O\nmK/7wCh9pYETUs/rE+/gNK35h3IyCcSHh++e+Jzg80lnozznjy2fmYddaDhx\nE98WesMuAg/i9o/hVRzlQkELQiDYjA8kXFa7rNMWwXs8he4XosyMAD6ljSfg\nBQHTdArkN9mTM66KBGNT0pOg9nNjHVT8ItGc8js+IIbl+Dt6p1BPDjRXsstg\nAgpYgITmBgJXytonWB4SPHs/LwDqMjO86J1UukjidpGaQfJKUwov/X3h+kI7\nxlOq0HL/almmRJZZR4BeVVNKg1IFlHtDUYzLxkb0ML9coy6oKEZXTrw1yyoZ\np1pWWB2tnhFaKXfE7JZUBcmrQcb9kER+foRSE4sF1XDKBrAhOS69KkGP5crK\nZQNlgHI+MethhtDqUwaMVkvUVD6KSClO9OslM1MW738EEC0U5ExE+z9CYJij\nDZYv+OJlvRRpZj70Liet7TUH5jSb14S1rF59Ux9wOYWF5Xyrv5beNgs0Mg12\n8dEDBYK3zZbgQIXuRlZDPtTdnZIFUJe8hhMcsNPKZMqfl2Gff7ycD5/nI/C/\n0CcTpt2xnBJX4Ecc3OuCCuYrvTCXSxqUM7upNvnkJ9kwAFxgX5EJ+L2V1axV\nfMg2M6opmmnQqb4gZSPtkeyoxPRN/NpgqnmiEHioEx6juBJiElvaXYko8FjA\nfHLq\r\n=2CqU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"cacb02006e03690d532fce7312400942c56b317b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.7_1611381352955_0.8288879372198263","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.8-renovate-major-socket-io-packages-b94a9b8f026783574c5d6f00538af99a5fef8ae9":{"name":"@balena/jellyfish-client-sdk","version":"2.11.8-renovate-major-socket-io-packages-b94a9b8f026783574c5d6f00538af99a5fef8ae9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.8-renovate-major-socket-io-packages-b94a9b8f026783574c5d6f00538af99a5fef8ae9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a21549f857636287b36cc42edd9141d8de76e2af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.8-renovate-major-socket-io-packages-b94a9b8f026783574c5d6f00538af99a5fef8ae9.tgz","fileCount":18,"integrity":"sha512-9bsl7RVqae6tD5lEm2XMINBRl4P13oV5m6GIkgR1D8MpZDjbpp3tc4pYf3LBTthealkAFY6esxwM+oHd9dQGIQ==","signatures":[{"sig":"MEUCIQDo/q8Ya4hC0mlfiLnNh4lRLQ4zm39cIA6cJcMnM/FSxAIgQj8CNpfB5fQxJkarJWM53qPF5SPGQF4KeOfk+FkR/K0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC7s6CRA9TVsSAnZWagAAXQ4QAIyfhpwtD1vYzE522qQz\nk1GDwrv3g3sdVMoYu5v8FwyhVed7jG/Dq+IhFyBWlE3TK5fNm0yxS5zuPRQz\ng8fmSLMSYViguKWPo9gTGkUcXlKkmruYejXDCmCAmsrLNr+0pjY70gG/SrJ5\nxac5deVTspomjo5V0VxrEdoiXDLFwIX0Xt6Hnn5/SKSk8+EQvVOR4uFiL2ey\njAicJYXU7tUoIGErldvP1eGXnu89anejQUh9+GlTts54kSLhM7xVyTcyk+0x\ne9SjkXJa0O5gAwu3QZMfaEiV0MAGgR8BOq3ceLaOvcEfJMwUKaff9Bnxhed/\nYOneP+8OH2rwTI73vLzIxrDc5D/sud8fRI0hAIidcGiBmAE8oRKyw8XBnfKP\natF0Wa95EJkBcWuY47+B3/GLMnpGq5mpl3A+YAdDVXDCWnZs32hraEolUPo0\nk+Ag6McTHFqQ6lM7yZjNH7nTVrOC63PHLrOA0fsQlWP0s13p8lKeBknKkr+A\n32Aqr+cGC4+R+xa1jp4/vQHRWRuUMOEv5XztILEj65wpTS3mDrcZVNyJszne\nC7c013Qj8V4tYYsg1MaarHbL3Lyo2MmeBK5PJfHW7276StFixeaswBImi4Ci\nDRHBnpxG5UYfn6THF0yyhQegdwoJWnVvxrfaSS0wedl3y4x/zUsyITa//qwK\nhSqe\r\n=0vmO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b94a9b8f026783574c5d6f00538af99a5fef8ae9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.8-renovate-major-socket-io-packages-b94a9b8f026783574c5d6f00538af99a5fef8ae9_1611381562016_0.6376060631742027","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.8-renovate-non-major-a87bd11512041828dde4158b4874dbb9f48e2e3b":{"name":"@balena/jellyfish-client-sdk","version":"2.11.8-renovate-non-major-a87bd11512041828dde4158b4874dbb9f48e2e3b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.8-renovate-non-major-a87bd11512041828dde4158b4874dbb9f48e2e3b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b460dbf5685572b90795999847fdafd4d2e0a972","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.8-renovate-non-major-a87bd11512041828dde4158b4874dbb9f48e2e3b.tgz","fileCount":18,"integrity":"sha512-U4whh0RjGIl0kUQ+J6xZelF039LIaI1pcUPQW90wWRcoPvhpsOnLA8hAAv6tQ5AWhyS2ugeLE1gM9w2Ot0rgZg==","signatures":[{"sig":"MEUCIQDru2Cp2ST8NVlmggj1q9NSWhgLdsA/ReK5YrQYeDofUgIgWJSLSvOwBQ0ESnEB7xbaAhru7F9tuBxenoim0dPxJQQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153768,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC9DBCRA9TVsSAnZWagAA+N4P/A+gjfN68rcgc/Y+lUn6\n5lCNHbEvHmThOjJc6/JfKngA4q00itKQUzaY7zt2AlKc/wT1X1EM6aRTp3Ps\nDKwTYst7wayFsuxsSDnrsT72camW3NAqtnAEGlUcCeuc8lBU+5HJOoZljjZM\nJW9Y66N+Yy7GMQfuxdhwqtHuf9BP3IQQs2t0K3rm5SuC3q+l46pRsigXH0Yb\nunkdhIP647MD7HSfb6K69zP8VjOZEgyZkDlGMPrB8VEr76YKJ7bCRn+YlTsX\nCPlBmdAmcr69LACwbfgXpKlJ+AGT/7ebSC7D78uotz8Sgo2c37gD1iZcxoSX\nohdOK9REQXzHrFoFXppGcSy+yXtM+I8mVKJf5c3rj2HCohAUpz+PGzKXYag1\nVqOQgozyh9lWhUkOo8eQL9E0qZ8GsAeKNLBU/V6teMTaxv3d1WATvphlbe7T\nsVBGDcoZ3fUHStRFz+gwlbn6tifLKgyzrcwaEqDNHrG4HRZRwrs4Qo5MKDw1\nhVbOAHf039szNq8IRWHZV01fUZgtw2FtgU8b/73w5OofxNx/Q2iC2kMfguaY\n9Kg2UuhfwIEJuy0gD0mKiX1e1t7jfvzBMjapCV+enuyMMteIuYDHzk6Xelwq\nTGuBXngsUwWmjV58Nl1XkFj/wlDei9Z+62S9k51nFHVnk22Q9FczkYl+vWPf\nzV1W\r\n=5L4U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a87bd11512041828dde4158b4874dbb9f48e2e3b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.8-renovate-non-major-a87bd11512041828dde4158b4874dbb9f48e2e3b_1611387072584_0.6255266448504715","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.8":{"name":"@balena/jellyfish-client-sdk","version":"2.11.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e3a75141a24fb4a324c25bb8f1a4e4df51dcbd08","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.8.tgz","fileCount":18,"integrity":"sha512-ofH79hgVtW8Xfx6VYxggaLqPTuS0xm0bhd8bjAJR91cKQKSGpniKlmV5EUsJUJZVb2V13qIT/58+grc+YFr6Kw==","signatures":[{"sig":"MEQCIFUiLpy8Gq+Of35guPJBJl2BKqmUl+kHgA3Vz28GvT22AiBbGNS+BUSzSfFoaxSMhqAId3iCWwQwKxCp6VA7/5AXqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC9FjCRA9TVsSAnZWagAAyCIQAJMM3xJpn99IkV887Ilz\npetKiII2OzABi7YyhBzS68Zrk/AakiZ7AHFWrwfGUERrERQxKIi2s3WpUTmu\nHeuvLbfsk2kjNTzeanQj+JjcJ9OvHZFc9hohLHUc7tzWDX7EW6QvHpNCehWZ\nDK7+Y6b4i9F6HxTiCuKlBXcCJTut0/MG7+i6PjhJJy/2KesD5IbijowmWQjY\nyK6kAOA80QFzK6s4KamiJiG5dw2bz6PzWihba61jVVIjwSUTJUEn+u1SvB2w\neU4x7gwD+OC53PIe4zYS2zLRNM6o50PSeoaVFfaKntQB0rsKjUxZu1z4aof3\nIxqGI8dikwmr1VKQ9KoMeG8hF6o0Zny0dIJ9vN1kkJsAMLI8AhThJZ7DdJFG\ngxXN9FKodxt54EgkRZIlQuW+kSgG1gBZT617bWLgfRSl7mGILm5MKc50mxjC\n3EC+scszoaqUX9eZvvcuq38qs2JZ63Jkat51eLXZlkK2tFI2W/5TM7dvGor1\ntuL+GE9KaRbTgou8v6L5binlSoC80EzH8Shl4hHtLA768aiN1fMTIWdcUo5p\nd/Uchj8DoQ3egHLXfXXvQYeGBLruv7YL1q7gSh/aG8Htk9Px3q1PdgYoN9OT\nn4OnEaTvn/PHeeQHN5ZFR2jtKjHgyqp7Jv8yB75430Dp0uEdeBLsYbARB600\n47q5\r\n=bnkc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"18e4fd3239aa9b0bbc93b6266e0fc9c78c04a2b9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.8_1611387234527_0.8181885123338994","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.9-renovate-major-socket-io-packages-dfc154fb7a2e39a3d6baa29f7d805eea772186ad":{"name":"@balena/jellyfish-client-sdk","version":"2.11.9-renovate-major-socket-io-packages-dfc154fb7a2e39a3d6baa29f7d805eea772186ad","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.9-renovate-major-socket-io-packages-dfc154fb7a2e39a3d6baa29f7d805eea772186ad","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"edaea6da891a7653b244fe65faf551faa5b6a2b7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.9-renovate-major-socket-io-packages-dfc154fb7a2e39a3d6baa29f7d805eea772186ad.tgz","fileCount":18,"integrity":"sha512-B/+MGlhiSMsWM2mj1bVsqS+rKTyqM82fTQHDEeR1nvg8OCH8RDn2ewQbHPL5cPF7qaJLpb6GpHjSrUvaSq7MuQ==","signatures":[{"sig":"MEUCIQCSJWtiw2+L1t+lhMcJcEIMYPRkz6rnXZI/UlO2aImx+gIgdrdibAj7Pot5U4P35e5mALOCrnY/6Zh5mQF8hUlZF20=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgC9ITCRA9TVsSAnZWagAAVZkP/RKDf74qy/Dz8jfAqdGm\npya+Ouq8diA3qVpiaMWR2WIs5uT5rJ8HnjVvfQPVifh8//AI4RpGlQ4mzLp5\nDuiwwYQPTlATbhxRZ4QncYLoVwcf7GmRXFrKudj7lM4qe44vP51P9ciX/pBy\napBChScW0Z4C91If+OgBiNiFotImBYN2u6i5URgfB0Jmekw7NwmVfA/8zj/+\nZrvMc6DpyF93G0dfR+ijULjIEznTBcaLG0S+14jzMXwkGB+YHd16zrpUnQes\nJ68UZ+7tBkrv4vDbZBTffk5T6Th7ZkK1IEqakLC3kmARwPbEKhSg/3oWheZA\nhdSPFWnkaCvq4nmo3Z8mSAlG4GCGeEUsKU8MAzuP1xsczoAa0/LJZ84mdUD4\nBiRGtWOxEp/eJeO7J5Xzclb3TszHZXL2aBu583eTx8PDbpI3Bpq+hEaadfdj\nF1Xx5d7xIOd364Rrp1+GcLftqYRL1bzDmlYK8VyCwQAVgg7CIJ2YbVYp9LgR\nI9pDySBSJjo+PWyoMvQk88M8u81fJdu7MaWSB1PvFFsCiv0aKKpZFh7wAX/W\nJVotBHdYhrjtPdEgM3YcGMXlckKixb2dqAVvHkxzLXsCOoEK9k5zNrOS3W+E\nwE+mSnwTckMFZ6Hc0kdXZRL5xNbybrYX5uWeyIbJGpbSc3nD0riw/juDFMbz\nYBxB\r\n=oYZ0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"dfc154fb7a2e39a3d6baa29f7d805eea772186ad","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.3","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.9-renovate-major-socket-io-packages-dfc154fb7a2e39a3d6baa29f7d805eea772186ad_1611387411190_0.024792170137491132","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.9-renovate-non-major-ff4e4465344372422cebf971b6ea2b44d6c64f1b":{"name":"@balena/jellyfish-client-sdk","version":"2.11.9-renovate-non-major-ff4e4465344372422cebf971b6ea2b44d6c64f1b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.9-renovate-non-major-ff4e4465344372422cebf971b6ea2b44d6c64f1b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c972ca6fa9f932832e7a89e79c65a75b23cf287c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.9-renovate-non-major-ff4e4465344372422cebf971b6ea2b44d6c64f1b.tgz","fileCount":18,"integrity":"sha512-pim7LjRognzpCDlOAsWpFgBpxDsprH8q5x/w2mB5A3YsywEDkW8YrYj+S6QH1sXrsNY4dwAgNWYqjL36y07+CA==","signatures":[{"sig":"MEQCIAemnkUMR+FRQsAXunXVRyPsON4hhnaHAD43AHjz3jzgAiBWfo/TXGP/V6M8G+fXCpVcIwjqt+JNa8WrVLUlHiQ98A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDAgnCRA9TVsSAnZWagAAvQkQAIsvZUFivk7bCGzl+/i+\nbTSCV9ZTZCtX6r66DgAIFlKrRfbxGvfLbSxE99Tuur2cTOA6HXqqOmz4MNx0\nEf566GU+zWDDM9y8Rp07ROgj3Sr4jFcth9Pk4hqIkVEEzxEYYiQ3QqmQj/AF\nyHP6IQOjejf2SzUyy32TN7dLnHtPm6xPTRAKvp/VpNrQei+ZWVpZz5WezABF\nqISyw5dlO0oLWQfhwVng2tDW+Ph7Zbv3hCTOWflWnHFwl9DpcMrIgbCs6vsQ\nhIv0x+Jt2vosqgX+sYkPoe61ks3+6LNWM/RCDHVaSDDGxnlREZijdEWPVWz3\n7RURLsPdRn2OGhg94NvBY7iGTGvaxLmbJ6Bpa4GJVVcsXOlXgOAoUPDSNEy/\n53/Th1SY1bzLmcBz/C56GWe5ysJYZVShMpKNj4bhgz+9XB4Or9iL4CqnOOGV\nPRmzNlG2Ri3XPCXdD3IyMUuX04qy6+q5v4pNrIi3hjSMqXFJCahBubIpTstw\nEQ6CctyEWWMJCbo2/T9OoXVlCWxY9qF6o5vbpjbmDAwxOM+xTD+i2+Sel1WM\nPozNwIjxl+2o2ZFgcqOHeASgZCKOs0LJCGNko2x9oG7cLvBXoTJo34iZmOoA\nIE2QlRJ7nvN4r1o6lBwcCcWHRzziFGBhH6AUpyrLs9vgh+QmHKnrvgeU3X1k\nGAyQ\r\n=5Dan\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"ff4e4465344372422cebf971b6ea2b44d6c64f1b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.9-renovate-non-major-ff4e4465344372422cebf971b6ea2b44d6c64f1b_1611401255071_0.9890538744275992","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.9":{"name":"@balena/jellyfish-client-sdk","version":"2.11.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"592da347af5c87b3431186132c5ecdd1dc9c3ace","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.9.tgz","fileCount":18,"integrity":"sha512-YTzXTThWXFGYmdBHwuhcp+YnKL7cmL03NF6TNAUT+paW/u/sCgJbGnE4pHECFx05YJYJXiCLlDarM2bB2aqOkA==","signatures":[{"sig":"MEUCICrocVXJdXNHu8LJs+KzBgp+oWVVhEronwqhlHz0BPFAAiEAj/9U8rjv1x6gpAPDINcyRsqkQI9QdlHSAp4eXBY0U3U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDAj4CRA9TVsSAnZWagAA49UP/jqXFfoaJJvu55YpE3qu\n99ZSTjYpX5wGV/kdpDIe5G7+Ny0yO8Rxg6eBseJKRbCG1ZpGhqHs162Gi8EA\nvnnquZ/8CVPRdkJilCeheFf9ajy265zO57yzlJnv/WF188YhaRtmOVrNnF2E\nfnUusyUMxZ6JapqKatiJOUtG2n7EWpOZfAs5eJRn0qKAnB32v0y9Bjv0iL5n\nIxxbi8Nin1q+1WyRi10EvRC8clmoafSgeCiNpRRlNd7VlzzYlsXP1RwZWYry\nldnmsVE154ZKa/LGca6gXkFKqiVn8L+dbTO2JLo79sHTcZgHjLZOb4LMI83Z\nNN6Sv9osX7z1fiAjtIYd+rOh6H+TZ0lSnbImvX0y9VESkWoafY2dku+/2EBg\ngIO4eyfhXrULt9R3aCDr8vhfF+gRfjHeA1uNiycgIJd9s5hT8cfChC8V7YWa\nwUi0CKBOQaNA0c/FzsaQhaqkiJG/E+HuSAZoRe/54mm+8c05pOgjNZ38RhrB\n/GDUJ+/J0rsTG/6HcOu3OfupSLKR2XA0Kblqvea5AFmqz5hL2GtNFbmKXm4z\nwMWrmtHV+bOoMWf76qwHB2AwRZ2RV04jEAuOWScNKQDtS/LXPgVEmbRRPNQO\nh3DOIROu5xFVr/xdlzW5L1lJcVAFI1SJpi2DCDovu7LxEc9CVR83TgpGYBeg\nCYCp\r\n=xxQd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"fdc0c7a380939ac8bdf2e1fc1f88b91df055d5ef","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.9_1611401463473_0.10841157318148698","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.10-renovate-major-socket-io-packages-455f2e436b3c2e4163555831bbbaafe69061c367":{"name":"@balena/jellyfish-client-sdk","version":"2.11.10-renovate-major-socket-io-packages-455f2e436b3c2e4163555831bbbaafe69061c367","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.10-renovate-major-socket-io-packages-455f2e436b3c2e4163555831bbbaafe69061c367","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"170a5c1d4d1568375a27af9c449d45c5ee760772","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.10-renovate-major-socket-io-packages-455f2e436b3c2e4163555831bbbaafe69061c367.tgz","fileCount":18,"integrity":"sha512-004a2YWnnTuzI3rGwMCixhxpQ04i1RQ6j/Sys5RVGFVhFLLC3JOhuoqarUCg4ewZEvsRuuZXflvIs9smsGPn0w==","signatures":[{"sig":"MEUCIF8IBDgbrrW8XjNghnKc7lvYnzCDiRB8Z39u2ZwDrSTvAiEA1sCze+89vPmLzQm3qIVBSUYLqJRa/Q+JGoDJquV6rqM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDAmvCRA9TVsSAnZWagAADkgP/23mTxwl9ywGxrhsn/yL\nB4Bq2lGHIsgCwrrknJ/4fAOvoKin1LslhY8eMkjYq1o8eC1V39e1Oed1vtiq\n0zSUxQkRS7I8ABfo4mxJMdWUQfUXZW4Yq8qP2YMqu9SfZwJ1ejFW1Ky3DXcy\nRS/bEVZ4YVo9Aa1PCtQdwQdurtgY6aSI5q/wShdB199hCObRYjJ8p8spLFue\nrihW2psssoKyTvNm3mZFXK+uBpg8p1xP0d/zs9k+SLc+N+rsIE3mKW1aoUxr\n6eVfh1ny1Y4DsxZGmGDW87+Jrj2oXDnS7XATAj3zDbysOQiMljy5ZS5X+neR\n61cinG1qBNVVJEH5O6lo65dcd+OeZumb/tUULsWcIjgPsHUJmZgWRdyI7g1m\n/35urA40suWQ5CUMljVeJHPSx26b38jxbREN0SwlL9FyfLpqki0EvlUIcQlx\npVBQKSTU6rWcgyPhg9c9taC7Q/5W8xvbG1oxGI4CXfR8S2S89eMl/2OZTwSK\ngk2mk8go3UQmlDmUNe/5oaYwRPaQ+iRilkOKjjIllJirWjeVxq/D4BOSK8dY\nJ4fm3kdfe5MvWGPQB4lbfY4CL0Y3rRtG/LJS+7pd73PrZTLagIDdt47FiR1Q\nvBz/iTkcQA0ZOmp7Ep6YNqpziF3ufoou3mDBG33Z341HctqnFvuBUY3AvS7G\nbYhK\r\n=4Zsf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"455f2e436b3c2e4163555831bbbaafe69061c367","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.10-renovate-major-socket-io-packages-455f2e436b3c2e4163555831bbbaafe69061c367_1611401647258_0.25522278479682803","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.10-renovate-non-major-a560787c680e10eb85552f7746fcf39a873f68c3":{"name":"@balena/jellyfish-client-sdk","version":"2.11.10-renovate-non-major-a560787c680e10eb85552f7746fcf39a873f68c3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.10-renovate-non-major-a560787c680e10eb85552f7746fcf39a873f68c3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e49d3815b83637a9c9d7cf7a39ea766ef97c5ae8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.10-renovate-non-major-a560787c680e10eb85552f7746fcf39a873f68c3.tgz","fileCount":18,"integrity":"sha512-1HIZJ6FrLh9xJo4ZCsyr5d62bbndGDSYUZBve8JWZS1jcCdffeBtgGI3Sjeb4/ALWNgFGTCDfb+K6wjHXCsx/w==","signatures":[{"sig":"MEQCIClN/3Oehvd7nSyk5Wrv+xQbptTfFhpYsUf6k5gplT6bAiBGNmumW1zhdErJ8+zjDe3UajqVQgObOHZETYZXA4nVhg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDEfHCRA9TVsSAnZWagAAveQP/0QJyFEwQk/RBs3TAgpR\nVBjnDd0SrReMODUSoxqVhDDc+wRwP9Zv4xQfJk0DGTSoO65Wkyyk9KUaLGJd\n3YcF+UN7ihz9e+S/lYaosZ9uBUUpPFbKPLoWu/Y9HRFqiw/Q4b0mXb6RLzCH\nmri1YwlW+Xg54Grnk+tI68RnnnBoKKoN10+ujbucIKP0PpQCiSkqP7CxCfD6\n4b8Szm5TweHw+J/xXl69xYeQqjya68xAhldn3peJke6Couqaiz2TQ2s9G4wn\nkQ6+6pycndJkCIKOk9jWI1+iF4bzcsVBwLDf3j/cjibwe9GAyRCBNuNWIc+u\nOFiP0JgdjsuexKXfZItr0oOW+QGiqCfljVugIortcOIx4MFirH8QT//xxqn2\nYn3x/FMhMgssggNpOze4q+9+D5qLWAVlRSHzH8LlB8mmX9dvWUDH3QWr4KWO\nNre/0/Pf+TP6vEMXbMUIjdK5khONTj1lwvhbP9YciqjoIWyyoHwvDm73suRI\nxZeQ0DOwx3SIL7QLl7rgG5vBjsy2aYVbWI18nrvzbVJz0G6OXXM0F7EtzBTG\ndFvVYPPMwUq0lPl8ks/jUitmFd2XpXqhYkAAr8W1zoZKNFfC98D4h+dsnBBN\n4ssrsJsnrgEqbCeKirxRA3QaqHocy1Ms0YU/RgNEi+pbat+FEofVF+s2+LHD\n3P1Y\r\n=0f3i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a560787c680e10eb85552f7746fcf39a873f68c3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.10-renovate-non-major-a560787c680e10eb85552f7746fcf39a873f68c3_1611417542861_0.0997064911815333","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.10":{"name":"@balena/jellyfish-client-sdk","version":"2.11.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"33105336a9870c04cffdaaf3033d914201e9cd04","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.10.tgz","fileCount":18,"integrity":"sha512-SOmf+AdIs0SMguXq0E0Yp7mb+5Ha0A/Uy1LJ07lHVJSlRXO+Lc0oE215D6ImJmqR2KLXOxo+PSc75ykC3TNBYQ==","signatures":[{"sig":"MEUCIQDWYY6AOeSPDSskG8v5vyBKBYQtAhu34IZMFrIod6FSjgIgSNzEgsD9bEpQCeTrOh7ifdjBxikNhm+9slxWIyqLlZs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDEiDCRA9TVsSAnZWagAA0uoQAIbs97OGx0brtW4pvsJK\nXlNqDPjEJ5KmZ6WUzejmfV8qI5wHRYm+sUzGQPtjNU4WwfQuU2cnuzS19qsd\nIqX9tit/MGZ6TnLFkOAHh5vK/U79HXCieyqVljT+WgujtBb1o5mhQyBbCX3O\n0U5NUHMw9bIbLa9t2/BjIHTzyqo7d6MxswxZclh11Ppf5aubjb+NEEAtKXWf\nhuLmrW0R02yCILmb5u723Wu/FKEZuQnK0qTwtlFYKjXLcvYS9dqczem9G1Fz\nfeIeYd4RloilTPD2DmL+h9mVYWhUPKletdnq+Y6PwwvqojnEH5IaanujpFgy\n09bgO1HhUfhYRhp6rLxHAdLMiYbAOVPVDyGDDuEH2RqJisAYcBSmRVIwf8dH\nFaCjqlUmDoaIN4NELJGTtXJEE5i7Mc9rUVkeg5sRQgocXlkTbVAjc42KCLJ+\nuYlkeVtnIDxLkqCVQ4tDMlNdanKgMDEBoB9OYI2xgrtRFmVd0GX/aiRoSFqe\nXeOHLIVuCgNI0PyaUlX0MIaWzTi1bg3yRd8RcYzV/KlZCYe+A7nUgNAe54It\ndxp4uiwmcg9rOWK3C8fH0QGtU32opCtex5ybqc6sLmpCgrU8J2R86W/zfZsa\nWYMdUYmyIFe2w4oVd93qW2SPX6Zzv0zhL5Q1G+NSrI7cIonJoO6MT18Ki/9a\nrL1W\r\n=r1CO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"4cde467535935074239fa9b4cfb7d46ff87e8631","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.10_1611417730848_0.685980541135415","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.11-renovate-major-socket-io-packages-36eb28c68a4b48bec986fe36764a8ad1f02958fa":{"name":"@balena/jellyfish-client-sdk","version":"2.11.11-renovate-major-socket-io-packages-36eb28c68a4b48bec986fe36764a8ad1f02958fa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.11-renovate-major-socket-io-packages-36eb28c68a4b48bec986fe36764a8ad1f02958fa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b97f031ea04e2f14f563e91c2826ecff01085333","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.11-renovate-major-socket-io-packages-36eb28c68a4b48bec986fe36764a8ad1f02958fa.tgz","fileCount":18,"integrity":"sha512-0bTXkjc632bk8GZgamtng4SeVcTtElSgCEBzaL3NOfAJJgK0BSa8DCVrU8KpFwgM7JD8exQ4X24vFjnBVowxbQ==","signatures":[{"sig":"MEUCIFWTevuUafGGuZg22BpkwKz6Bf8RVsB1rhV0whXTZxj9AiEAzxzJumcGNnopR6X4P8XaawxsCp1MLitoTGwDJxlcDQc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDEkfCRA9TVsSAnZWagAA9DoP/isFlIoP32aj8CqNMdkz\njSnPZZlGQJpS7HW66vARCLGJVK0/lDLiamSd5tX3m+6bi1shYFS+6Vt1Mb8o\nqrn9439tMC124Jj1ErffW07wBQfLrhZbOe+94OU/fE0Fxhr/5A0ASBJRDv46\nlkgTR1V0nuEEDdIsshH4HJViPRQ2z9iICLRjtygBnw6tfoPFI6bWn9Kiu1Ve\nTdHaSwExiJz5K1ALhRGm+fVAQKVsCtEf31xCt8juKkieiZGSbUsIh8q/eGvj\nynYt5Anih5QhtbPFQAkRSLdt1C3M8tHlzeRPH5ea9DtXIJIbigf1RsEYZo41\n3h34ay7vmA0fJI3upohPVKJmrYgxwoyzdKCDJT0MR3Jh6xFA50jJ6Ed7L1dU\nXpA1VZhJHB/bxn7rQmgYhSZh69xi9bwpKBJGxwfwJ1QtUCSk0+nvIRjN9hKu\nsbdsHfuezJWXCuM1657HYYjEKfERoH1jilACSNb8q9fEwHDWGfD+raoUl1Fd\nEMa+2CAS/DyN0PFKyFVVT1EHeWpHWvbp0RgfcUWMGpggUJvdPaqzjQsYxR1/\nfvX5haSU8qioVRjqNzx9HxNM709gsB71dO+Bwb35nFcwWO8bD274Wsv6FJC5\nEB77bVubP2z/KOf2+Jj+wjq3OmGn5g28hW45AFU9QMVbHpTHLkZkWjq0En0P\nz96+\r\n=iF+B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"36eb28c68a4b48bec986fe36764a8ad1f02958fa","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.2.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.11-renovate-major-socket-io-packages-36eb28c68a4b48bec986fe36764a8ad1f02958fa_1611417887109_0.4921717249071347","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.11-renovate-non-major-5e1f05147a4e1ff696aa5e6e43acda0522cda1c3":{"name":"@balena/jellyfish-client-sdk","version":"2.11.11-renovate-non-major-5e1f05147a4e1ff696aa5e6e43acda0522cda1c3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.11-renovate-non-major-5e1f05147a4e1ff696aa5e6e43acda0522cda1c3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d8d0451146f714c8d8e6d242e78b2a8e0125e401","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.11-renovate-non-major-5e1f05147a4e1ff696aa5e6e43acda0522cda1c3.tgz","fileCount":18,"integrity":"sha512-lENa1B9LsMJDzvcgOoTVcuTou6x/LnTrxXX83z043oLrjHzgdlqBB11c1PYc12LQJwoabAyVS2c1Cz3J3UG1AA==","signatures":[{"sig":"MEUCIQCYdpbByvRSxvbi6mzHxsMfTctnS4y2wGDY3rIUfzumVQIgbs5c25KR4n9x995yszXydBDIzx1G/p8nmB9tjw8DGw8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDYocCRA9TVsSAnZWagAAHtIP/AhAnRFleX2483IsVJi5\nEA+zbrr4MGtmJnNzQeOXrRTgSLsq39xBCnHSLei2Ysl8rv5TjQtXkj7DL5tJ\nWszJ1LqoxzIy7TU5NjEjr6aC1ecWnwotGZMuhN16vosQ0eqnVDTktf2zIxQr\nZiy+qniwuQqvEujV/HGfrGlRaLwR2Tfw+5XVntRoM2HGWLfJZd5BqlyCjFAB\nAVRNUUeAQ51vELh1g03ZShM5GqoI7OfXIggimVR6jwRV0spU/NN1qMYJ/xR5\nKwIDY1O4K/syUSfk2FiNHaxN82H0wEE9RaR6Vu+9V2VpThcuSBbONtUBbJwu\nuwM6Tf3LADBg6Bc40XHpNhrD1K5+uzNAVRjeykM7cckSauwD9WPeQa1TZPj3\no7yxp6vwdOWRiKSsXBPyWQ1IQcJy6CSVTsOYMniTg9n0YF2kNJ7YBRqLmIeS\nahtdz/gTDHIaCbuMsNJ05PdtP9oIzboc249eaPeudWMrzAcqxQcM8uwpcQPI\nUy9wKog+2cyQ73ic/LOCO9RpWKdfHcX30K1VPf9mBZTBZyV3hsy1PB7F51AC\nBQ2UWgFf/oB8Z59ytfZMdGP6DVdo2DlFw9mVvLxzP+1wnA9wREO3xyZ4p99u\nzJQMPAGtEXrFYDgORKZvS5szZmpG3Yt1Mo1z63QB8mPwiBSIXk4G6dQs6+n1\ngPTh\r\n=/n8P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"5e1f05147a4e1ff696aa5e6e43acda0522cda1c3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.11-renovate-non-major-5e1f05147a4e1ff696aa5e6e43acda0522cda1c3_1611500059291_0.7085650447336997","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.11":{"name":"@balena/jellyfish-client-sdk","version":"2.11.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dcc3374ccf5268b9a8d60865056a4aa69d5919c9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.11.tgz","fileCount":18,"integrity":"sha512-gX8chwX2PNk8Heo5u1/0yK7v5JTRKCO6E9wP/KkY+1AkgDdLGaa3b7oDSSif+BIJCLSek12AAf+Ng1ANmG7O8A==","signatures":[{"sig":"MEUCICAwk4otfp24wI/kyI7CVdxXhvvC5blYJ5sUZoR7OsCUAiEArzHBR8KuaeO7nLvnHZ4YXcaJ6yQxiEC0UcG7QrhQ4UQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDYrVCRA9TVsSAnZWagAAgq0QAI8ywOOxgT0SQU+D935W\n37ng/xp6lIzszePZfDs06oHjipn3zTO4ExyVuNnn+/vMmMwqnXMKHKdy1rf2\nCJCxYvxc9Xpeofd6MN4RalSppRGFzjHkSmrLPhfrMAcTDI4yzCgQDBFbqyEa\niIihen+iesqo6DnLGRSMRKOW9HwJypibwZs1eX+8dotQS4TMrBs+ii0boHct\nmXFSaHw+iMDf9oB55A51/D5MgHz4T6XAU6Vz6SESiHufw6Cq+fPgjvJZ7i/5\nGYZNSBfYAjb0YQbMhSu8KiqFEW0EFd1aHAhNLXfALeseLOHltJqEGw49s1Je\napUQc2pWwo0rhM9TRlYRByixNGuPAeSsV7tZoneRVg2kTWmBf77qrYW698ET\ndFKDxgIWObY1T8JH0JHXEmhh4rrY0inHMVq2D7+YJ4l5HZdtqfeoAu4NeYjC\nyBUcwG9lCmng9eORlRkbbVo6l43lQcuimqKAUXd6TEPzH4Il01yTui7CF/i1\nin80yoXRPkY7z8/dziAosKhrGiBP1AxPQCgb9obonjYbpVeYSKhup3YLLHzJ\nnBHgi0x9xrLLGm5m4gcvGM/RqEx9mpSNFejrIYe+Xrw8T8A7ol8tNwR+KV2V\nTqzuNRa3dCf+RrRkTTx8JR3YoORst7E4uoaKc6X/itGtjXutgiU5N0Z4wcFS\n4DQf\r\n=5YZ3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"55a94b723d9c538b644225bc43f12d2d3f350d3a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.11_1611500245260_0.4309914029451558","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.11-renovate-major-socket-io-packages-d4887b465a524e4b9a45f0cd3112f56c0eda3a8c":{"name":"@balena/jellyfish-client-sdk","version":"2.11.11-renovate-major-socket-io-packages-d4887b465a524e4b9a45f0cd3112f56c0eda3a8c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.11-renovate-major-socket-io-packages-d4887b465a524e4b9a45f0cd3112f56c0eda3a8c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4d6f1c057b31e3f5b88bcb0b7e0d71b21374259d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.11-renovate-major-socket-io-packages-d4887b465a524e4b9a45f0cd3112f56c0eda3a8c.tgz","fileCount":18,"integrity":"sha512-PDJAuFgkzCPKYejjSGDQf39TEODZqCySCZjHnuCSOx6vsRfTHHxgtKZoKmYIfPGQG4HsccOgPlStWZHRORJwxQ==","signatures":[{"sig":"MEUCIQDhVKM6wRDLPmLIAtB+ZHmALovva+98vReMcukhOKu8mQIgJy3uUGIPdJDVvydCoK2zS4Spgqa7hi5S0znP2H0iSkE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDYtqCRA9TVsSAnZWagAAYBoP/3QPbqDirlxv9R6vV2oI\nfkkY8FwUnTPSLEv54X7CmpSfU0/Gam1B1cBAPfyMMkrRufdqz4LHD3Hiq7C5\n+ba5DkVFq5cUMM4BCee9qitW28KtIrZeH5gzuK9P3bl0Tq056jQgFwpBxCup\n9H7UvmwAUNFlWNTdlcqK16oXKywHUVG4MAeCHvMO+ScAjKJj94jnWacYBPDQ\nQX5idSOiKiMrMpZiUsoB01oNyc0Ktzuu2hDeK7p8voEpo4lVLvUufs0Cb5vK\nzcQsWZZsFXqlpHuRZS9K3ei9GoCdMoF2O/GOHvzyE1/YRoTFVBC/CdNDOfsK\ne6lINdaNQgBMStMCwjQfyKPq4Al+Mc1IuRHBUBgBOcjuvgc/3hTd+YVfu6r5\nCTPYzZw2J2iGE5bDs/XNYfyCX35fBqx+D15LZL+N7xsUu8HviUpC73Qdt2/v\nLrHbyJ/Fe2kkt60WJLanspp8LdV9WilT42Rj0/wXoDKuLlyswerOTeu6YrLq\n2mD/3Y6aQcWxSRs2XFyijv6ri8/bYYq5F5JApzr8QsOhlcNUpqrzYZI98SsR\nFxxnCd+eGa6i0NScB4YTDx4NAiEfYcE5Uw0YAaM+z29Va3IwP9Ssz9bX3H/7\nIYPP9NA2MPjtsbn44ZfTFB/smi1A1m4ededvRZJmsQVCjbW8yEq2VxGj0N6t\nTPFG\r\n=LpWS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"d4887b465a524e4b9a45f0cd3112f56c0eda3a8c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.11-renovate-major-socket-io-packages-d4887b465a524e4b9a45f0cd3112f56c0eda3a8c_1611500394479_0.1503402228374855","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.12-renovate-major-socket-io-packages-5c5708790bec7bdcb8b4a44888bee8eae7bb19a1":{"name":"@balena/jellyfish-client-sdk","version":"2.11.12-renovate-major-socket-io-packages-5c5708790bec7bdcb8b4a44888bee8eae7bb19a1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.12-renovate-major-socket-io-packages-5c5708790bec7bdcb8b4a44888bee8eae7bb19a1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df87e855107e02ebc0bdfa08255d608f4a5c5012","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.12-renovate-major-socket-io-packages-5c5708790bec7bdcb8b4a44888bee8eae7bb19a1.tgz","fileCount":18,"integrity":"sha512-3iJQHinsMaUpX+Ne967cAugZJXudfWwYz0UsIK6k2nrHQXZ+141YaLaI1duIRe9blL/4ZHGlkvfhjz7x310wsQ==","signatures":[{"sig":"MEYCIQD0kvpBD7S10/AmqeeetUkakIhCAcvKKNneqHqvO4DkGwIhAKq49ib600G8oI1bYTRZuv+i1oG3L39Y798DWA6H8Mwl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDYvwCRA9TVsSAnZWagAAKdMP/jSCT3LjJh4RjzQJffP9\n6cbETehfi/SOdqK5LvWH64XVxqm+0iJNJE3+SbekEZFxJGxXJiamI86g9zbw\ncAs5AosN/nNxCNeaWO+N5I8Lw7hYCNNPfHKSBOOwT60p62r8wv9jIfu6NsMF\n9WoqZ74ywrIPpIt2qVaPjZmh5wJeb5vo7Hwlq8bHhoOT4sGfmUr54zSTFWpT\nK8LJ03G6hR5tPXHTJldxUBs3meRlm4fKHaelPD/7h7eU6PH+32/iNrtGYkXb\n+pRPQLLYL5iHQJhQqWFkthgAY20oIuVrJNxbX/hb/SlSrWDRxIWJkR11PhgV\nX1wrX0+BEguyIFLdxy15U0Lk4FTKTI3MjBSN9o3AaIZeAEGUj63VGklmLxMS\nEGFeCZX90kvfFBwfMdj8oLhxbcqt6zGiLvADtDxuSN/yJGtUavuvuPLKhPD9\nHnnchkgH1Junp/RbRxYdP3U4/5MYJUA1NOhSAZL3DGL2/8jCLgDJbBqN5e20\nfY0w/+o8jOyZnFvw9xi2auGcMVoksc/5nXzjKcmCU5LpVhYxrFIKXqHIb/t0\n67Vr8psEX4J1JyaxCT+tbj4HykVV2h000kIMJ4farnSn4HtDgGzTGewAi8+L\nZdPaRBRYvE1XGpVoMHds6+RKTnzzQrC5a76vSeodkQqAyZdoPZ8pLo/uwNs2\nSvak\r\n=q2RV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"5c5708790bec7bdcb8b4a44888bee8eae7bb19a1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.12-renovate-major-socket-io-packages-5c5708790bec7bdcb8b4a44888bee8eae7bb19a1_1611500528260_0.075939692314275","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.12-renovate-non-major-c4428ab429a409ca9b448cbce8dfeac33d13a997":{"name":"@balena/jellyfish-client-sdk","version":"2.11.12-renovate-non-major-c4428ab429a409ca9b448cbce8dfeac33d13a997","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.12-renovate-non-major-c4428ab429a409ca9b448cbce8dfeac33d13a997","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5bfc320820bb356b63d90211018e035d68b76e9c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.12-renovate-non-major-c4428ab429a409ca9b448cbce8dfeac33d13a997.tgz","fileCount":18,"integrity":"sha512-M2FPTyVszEFaygaY4Pkw/SPbu2doDDEECkGAstKDS+xCeg4ffpeaNYwKAP0ZHCXvXEDJkR02ZxAzvjT9V1B1QA==","signatures":[{"sig":"MEQCIG7Y0Z3arCrhG8YbXj1ryZZSueRHLeURiGUjGuUCXodFAiAZtbq+ytmTcIX5K8LRUa7X7BR4dtl1rDBbSMzgP2alhg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDaJGCRA9TVsSAnZWagAAs5kP/RsZSFnxEWRm8stG2NJB\nBG9ocFDzKxjbyf+t5Ud2qaLmK2KccPu+2fIr9N4pzwuHWFQGSg4f2K+4f+AE\n8M/qnwmRqdPQwejxtjEl2tVEHxz31K/s63ZnGPcFmkgLFgbyKP/QZtHlMQJg\nJsn4LstaQ3d3t/ZXyvy/L4SJq6BqDQXto2nh6rfWURcG7eLAJOqtsTKSLbsF\n8WtoTtKP84hYPpb+70nqCi/qlhC5IrcqPx0O1gdDBnPjIdzsfTlTF05S704r\nlPiVr4LpB4DgltQ5R9yqKFfuD/InQNVwVG4xSiZDCc1ojpIolCkIq7BufWDp\n5fJ/3K5yeugce2rzk7fnVo9qlK8DbvB9Je5uR0jYQlGKvCt/qRGMHt+pVNac\nLY1WydOREUaqfeQsZ9DaKiWASt5Mi32PFnspM1izsQxDUHzkthr8Uev0y94u\nlvUBS+tImerIgTELHCMTH0r5EjmkTBEjQ45GDqVizywuxXnMjJVD5nGCSy0t\nLZGops1NAZEFjY0ji2fEx5dhLAmXBY40YDSlDaGsp/zMrJs2CqGT37yH3APH\n8uwCrwHKUffL5pCQZPS6cbl8Atb1RsXX3rO9svV01t6J/noFYXWkmwJkX0T1\nT1MpqzzOPVftEKmjNw33lZPzh7hpSq5AmiF0WuB2EISRvSBkGZ3DHyC3yyjv\nDo+v\r\n=D61s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c4428ab429a409ca9b448cbce8dfeac33d13a997","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.12-renovate-non-major-c4428ab429a409ca9b448cbce8dfeac33d13a997_1611506246216_0.03026065599344019","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.12":{"name":"@balena/jellyfish-client-sdk","version":"2.11.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.12","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e89cb87d81b2dee573f131bc7c89bf1fd0e94648","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.12.tgz","fileCount":18,"integrity":"sha512-1k88xstlET2VNXnHI9q1Kum2GVwv8kijH56/TrFOZuzMgWwSYwi2sXK+Yk5esj7jF60nh9R//fwsOQSeiJ810A==","signatures":[{"sig":"MEUCIEKVjV7bst5+CUSp9CYMwBSAkeEsob1UWIqFtc6Ks5emAiEAgAdKDzRtM0Hd0huy150+ozPpLtppTALKBpZjOWaMIjg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDaMBCRA9TVsSAnZWagAAp+oQAI3cSyHtDJrsjxkJMBYO\ngbC/tqXN5F6YOKp31nxLF/ZvMCT+cOiYKcYGkycPV/7cRlTSaCaaWD2OELY9\n/WxeUzRiNEZO2PX6ZD/wu2JkV7p6uaH0q5I8uaoWMfDbwN1S244Bzz/RvB6k\ntxvfhFFmIS17NlCEyxKm/FuR+Z/tbRqal33CirSD4cpqxLAnvngkJ+4ZTQkb\npE87UBc+0DIJVz6S+3J32/OxZVbOXG7yn+6RNjWg3mH8nEsgUjjyPQbYP/VQ\ndc58rig6vEXU8RSXPj5xJea2PYt5E10mvsAV1+9olqkUz5GiMTnH1rsPzHzC\nAS9DjdwmkVdlY3v4fsQWdjnR7YNiidP8mzpoJ+lZxXNN3EZQdVk6thZ/3shM\nq27C377AOnX6dRBItkBXs3p/XuEzPTgOGAQlTkvlviJ+Q3Fw713Rx1jon/pY\n1AiyXX20LugRRlGhTNX4mFeIUdGmFZTdQ2nW3mC+1BDjUufToIvTcsxqI/Ok\nUPjm5h6HnssG6rraGO6li9szrx4b3FFBHUhUR0idQzKARElpjJ8lPt5u8RvD\n1hnmChgSd1Hlk0W9AplV3T7IK2dtk1Jj4AM9swh0yhhh7hP6n4fKo69yQfLT\nb99ncgWi0DeRewTk87RIc4VvsRr1Jxz9ZC6VNt7SjQ/F7qWNb6sVp9obTQH7\nhGOg\r\n=Hg7M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"c199d872faff16aad6f767eb20f5eddedcb1c785","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.12_1611506433283_0.0768249343630365","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.11.13-renovate-major-socket-io-packages-3ef20a14db39a1fe6b02840f106c05dbe4c9366e":{"name":"@balena/jellyfish-client-sdk","version":"2.11.13-renovate-major-socket-io-packages-3ef20a14db39a1fe6b02840f106c05dbe4c9366e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.11.13-renovate-major-socket-io-packages-3ef20a14db39a1fe6b02840f106c05dbe4c9366e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"88af1918dc5b44154934ac60f07cb2e28b153abf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.11.13-renovate-major-socket-io-packages-3ef20a14db39a1fe6b02840f106c05dbe4c9366e.tgz","fileCount":18,"integrity":"sha512-MReAaJLCo9mDHYHlbJsyw+hhbFJ/3zkiQG9MTpazIzqjy+z2kcWlvGwc4ZNcWF0DPGHL4JG7uZT3Ch8Z3SL4jA==","signatures":[{"sig":"MEYCIQCa85/FeaCsRJT79Z8Dq6OIcWdMLqutCV5F2eLRXHDNbAIhAIxjWgLQbYjDmUq1BwkAC02BEP2ATibm3r30SNH1OkVE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDaO+CRA9TVsSAnZWagAAk7sP/2jdhIW18G8HUFEJqUby\noxwj24Chs1igDlTdmZIStTqwyeKpo//mlK4SjTEsFtIbv4eJahRUjuzmY5jA\nbMYuR1Vho6hCKyw1WV3cmFml9TWWS9YX3kFe5J+SQANqOeLFgYAWa3nBY81H\nuELp5dgygR57hMvfgapa5qdbbr7h2RCrz/0LZV8BZRNUL2yyh+3ZOcGVu6H3\nkjJ6BhNKxx0H/5FcH64I2Zw9GjKcgmW19YKnWfFNqS6V9uShJbYme5kGaJIt\nhCRise3FMj0CFRdkexohRX1hdC7CjZ123z9pSwMT3DlrC1zfNFkN7rTeWgCZ\nAQ+KI8GeHA1XRtuxvYM23MLSlnv5LHiDmoQZm4wLDL7vrpEJQlzbwpShCU54\nGdJJeAS/7yQvgdKoz7eK2/novWmh6wtpw7cgp5Kt9VVABGWmLH4/QjBpQHbh\np6yTNk+Q+ggad3HKMqrUPJyk/duy97iAQQDEVtxj9h6dO1Ets76QycNylbGE\ntcUluR+pxCJkqVTKpafCcW8sKrtU701KxNoIWP30MsEc//K+lhHCIt47zHJe\nnO5eEQVOoEh5/BgkkJUa4TiSefy75UzRozLmhVIpGGg/TtFNK9b/rtfuHO+s\nmx/qHqbnsGsrI7pOBd/ELK+jc7orMy0rDpZttECANyjp8wfV9P/jx8ssn3jb\nESDn\r\n=IC2y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"3ef20a14db39a1fe6b02840f106c05dbe4c9366e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.11.13-renovate-major-socket-io-packages-3ef20a14db39a1fe6b02840f106c05dbe4c9366e_1611506621922_0.26523851375553953","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.0-pattern-sales-thread-b5aaac0293560a62b6d1270018d7e4b7a2265dd1":{"name":"@balena/jellyfish-client-sdk","version":"2.12.0-pattern-sales-thread-b5aaac0293560a62b6d1270018d7e4b7a2265dd1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.0-pattern-sales-thread-b5aaac0293560a62b6d1270018d7e4b7a2265dd1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"908cac1bf0a97e3bfac4897732a6c5153e33c425","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.0-pattern-sales-thread-b5aaac0293560a62b6d1270018d7e4b7a2265dd1.tgz","fileCount":18,"integrity":"sha512-lun4L2SYB2EDP8Y+TOjJRdpi1X24synhIjZHU4/Bf5tgT/ScnuOkuatqzn6Yj97VOjNgB7QsrhxZE3z47Lf0Cg==","signatures":[{"sig":"MEQCIG3CnJwlQm+XHNGVrhHss17EXfaSsANgl/vUWShTLlTvAiAy6FDj2R+pUlFa5hGayZ3h6rFkHb21uncu/AkhSGo5GA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDhIjCRA9TVsSAnZWagAAXssP/inHTXS/l8In02IT39Mt\n37vfhJ1OFSsb/fiwT5jxW7EFXB2zmsxxGE7XTbwBL3U36b/BX/65kzNIwwvV\ngcMZD0JLp1g5yB3kHZoKhPe3a3khN8SobQJ+nxEqWCFemZWS4Pcsy2zNfnbQ\nPVFaDevVjnfJx9v4xOf8Adi7xKiaZyXsOjKdbs5CHE3VoDlziKTWJpmothLG\nyZ3NgZA3oQ3K6AI4esPYFxe9NN7qyTxDQpRwrjx97jqho/WT1Sex8PRRw5Wk\nJM4RPsaDF8YV/AwuiBgcre5PhccFstZX6AI0OOolWe/J25Lu6zJCPoKTwlvC\ncIFDd1kVDo6ZPBwKADTGZRb67c3yVdKrLeC3VyO3Jxsy5Hz+jy26sI/pWvmN\nHn+ccOOTKsUqR2I121QCE6O/afElt3PmNQjBpizIinh4Gd2ZQFsE2lrRg+ZT\n6RXIOTbOQ/bNaCC30QsfUnu/unsAbd2EQqyaWtRjQj0Pf4rdOccRcLYFvAb4\nVVBnr8fqkvNMdXQLrXLfPIMWrV2a60AOMYCzKJSDe6msq3xgq7UhA4NI2wzQ\n7Zg9tcOFnLZi5MUcA91GvdlVwFAlORCdKKf9ThBW4C/t/kVoK6TBXE5vrLfg\nTZcL1ETb29EZXot4YqHJj9efpXGjjH8x3EUtI1epJGLpfQ04F5zDCztRjaaG\nAC80\r\n=LVtK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b5aaac0293560a62b6d1270018d7e4b7a2265dd1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.0-pattern-sales-thread-b5aaac0293560a62b6d1270018d7e4b7a2265dd1_1611534883272_0.20976056474900617","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.0":{"name":"@balena/jellyfish-client-sdk","version":"2.12.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ad9cd47e0fb3de04bd2af794f701274786f364bb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.0.tgz","fileCount":18,"integrity":"sha512-RxCDjeTzuokfenzLbXD5Qa/2C5x5LxhKiP55eUYW06vzQTcZCtVtPucYZhE55BAybg1qCTlpW+1uSfVBuugApg==","signatures":[{"sig":"MEUCIAdBdZPr2jKC/jNVNGKCiC320owo7lOS1TnYFdVKDAlWAiEAg6hXjF/MijpTk1snCPkSx+/qesk/ov7U8e7HrnILO2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDhLdCRA9TVsSAnZWagAABicP/2QgzD8c8IF1vlmNo6gF\nYU5ovvLwhitll3Pqb5OEjeDIOf3ZCvAc7sw/CWOkskzbrVC8ntxWOHZYB+aM\npPcQKdu5AA4zs6Y9uyPDqXHsV4I+WX6bdJ4ARh5xMhU30OgsjFyG6iWG5UTm\njiD/xMGdtak+AnouTxDowGpAGD7259ZPP29M9ImLZfqXoO2z2+VPBM3H9tVe\np+3OXv6TmIWknRhZmX28M4ZRP/AsUwqDEOIGImpQ2SUQMmewALL9vIVy8HO3\nJw9QUh0Dw+0eUac9FAjkrbcaNHwHpFxl2ZTW7P4JTA7u26HdLxIII/GPySck\nbR9dRPRNOEf1wwHkDVaCuU4OM9LvLPylio9qAY+iXTVsIzE7bceT42+cRq4B\n4wue1rQqpZ6WHohSu4nBrnEESmDM+lkR+DsqDVJM0UwMhUpxCL0Nc16mqRdv\n1t9LKNDcJwtEp69J5h4b72jI0t+DTyGqKOEDcml7gcJONOGVwh2Q3JDiqpXU\noDXeHmEBnenmdrAOcCY0MV8USgL004mE8TlWknxO3Zb7D5/tBCvFjJP1fE9i\nNCukdgQHBqjbnOBqF2xYM50RXdKfXCpgon0XNATmenqKqInAtcUbbBe1iI9g\nBTOV2iheF/sWfo7mr9isLdlx2W5OG/o7yV2LcLUEJG+j3qvBnhmKqAiI9yiT\nC1Ab\r\n=ruK5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"76494daa94f87924ceb6f81fd4f5231674dc67a7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.0_1611535068434_0.7516878199689614","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.1-renovate-major-socket-io-packages-9f29fba8d40b71d1113b7f74f831c82d5b9d1f3e":{"name":"@balena/jellyfish-client-sdk","version":"2.12.1-renovate-major-socket-io-packages-9f29fba8d40b71d1113b7f74f831c82d5b9d1f3e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.1-renovate-major-socket-io-packages-9f29fba8d40b71d1113b7f74f831c82d5b9d1f3e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"292784792eb731def7ffe7174c11f1efd1a7ddec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.1-renovate-major-socket-io-packages-9f29fba8d40b71d1113b7f74f831c82d5b9d1f3e.tgz","fileCount":18,"integrity":"sha512-9BhYeOF+E6UvHNaCATIxb+1adqdTubg6FokzT2vshtS6hLkaiTzexreM4PXKCHUYT386Lmi/Tne8MSUVE+XOfg==","signatures":[{"sig":"MEUCIFTDjWu6ZwnAkzUVhHwKOL1m2iaaEJLJx+BCiS7ic6PJAiEA8NfRsI/1GK2eVVf3LXpuMLIkoeHCnElM6eHwPHf7IBo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDhQDCRA9TVsSAnZWagAACIUP/i19extIngcSvC8RzTvO\nCHRICPAN5DlOLdOpJrfh8BfSReHKD9XylJ3icBRsb03n7sneDl64CNb+Zl2G\np9UVe2UeGafq1ed+eE+2HFChUZTbtJmNGtjMm0d3ZVmunDpuYQDwMQpsmIt6\ngscIH5i/VcZwd9bTLQm0fyq3uoKA0wtuurqxlGYnqtU2ICTJNMwwFAnztgsj\nB0NMwohPNNEEsGAwQuo38bbCgB19vZQA+keckvzUO9PDg5zJEGcL/2cJ8j8o\n5rRm0H7De/ynzY7iOjhlTIiknmBSG2vt35QvCf5FKFcgSxQsqAifSv+sERPG\n1uFVE/gsZ/ZwBasT8Ec6L2j2ooLnocwmiLS/yTk7qtb8mEZtSJRhgMwmYs4P\nGBuS8Zh6sHTtJyFh2UvRe82esj6asFVl7TOOb3+bCHa9GmKKPQeAYT3SSMfY\nLYdD23COf3VbKAhGJJADQv1c4MQ+4sCemAKDjvIUxiJ7HUeIc+ZFiq6QESUS\ngey3xQ+en6SzkmoK38ufq/941XMIBEWOjcG2Dvhun3FSoaRzmfgz1p6GkplM\nfmqSBE0Ot8pAzIqRXQBhFAj5TLtvIX3+gPUJywMQu1xza9vxNMn9gnQSywxq\neD8tPqKudsiLiqFsV9sUY9ULNgG0XTQad7OvcIGjY8QDlwwd82+Q38FDwE87\nHC7/\r\n=c4O3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9f29fba8d40b71d1113b7f74f831c82d5b9d1f3e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.1-renovate-major-socket-io-packages-9f29fba8d40b71d1113b7f74f831c82d5b9d1f3e_1611535363064_0.04432383625910519","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.1-renovate-non-major-e3e5cde78f2c57e508787fabd3dab4b6f5da50e2":{"name":"@balena/jellyfish-client-sdk","version":"2.12.1-renovate-non-major-e3e5cde78f2c57e508787fabd3dab4b6f5da50e2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.1-renovate-non-major-e3e5cde78f2c57e508787fabd3dab4b6f5da50e2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5c2184d9ca502b0b9e232b451192c4eed18e9e2a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.1-renovate-non-major-e3e5cde78f2c57e508787fabd3dab4b6f5da50e2.tgz","fileCount":18,"integrity":"sha512-dhwnk8J+zqkIfc173QTZc9RLn/Cn94K5PwBrJ+v/nhnflNrPg7Mti5nFvFr9RDUkMTDrH17DtYsvIAdWonqXhw==","signatures":[{"sig":"MEUCIQClpMBHTsWplITLeoko9p3MvyZ6xfQOqfbz3ukuhKjmwAIgdOri2T/9R6joIeu2oiIXhx9WKXT9BrW8apOiCY4RggY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDoZgCRA9TVsSAnZWagAA5UsP/1lzDMScrs9OIRg9YU1O\nkfOAhJmmFKzZ08cbqd4VTyXO878wa0XKLoTqCL1e99xZ4s4LEgX9YNcAykq7\nh9tiRxzXkNo4/Dnsex7dRJp4g6rzVko6CxxcfVhtta9I73PGAYlMOGjXGnEB\njPu7DAp6nqlZPPOEJObu8fjiacDWnOV3dUgBBmBEtF7459WkNWWORXz4gyxG\nLWFOgzDH1qXDtyY1CwEdykJhU5ItqxitUCcriWh5DMYG7ct+W7GhwNyOqW7H\nocV03SvJAHnv7jBA7zavWAQ8BK/bswUWga95sPDDfjLR7OJfMZw4gMyYmQND\nEovXUpmM5xBhl0i0r8khfmTjAAWc7qi15JT0P/npev9PxoaaUBttzkBezeW6\nOulZ5aBuFQEsa9q8AfBQXuANVKSfcEUipiNodAcp6REnLr7VBO6WPvL9wyHM\nvyYhxTOaWAbgH7l2fvkRt7OBJkSqPfxf/XTCjZqYSyFIVDLVBUQtsdknpnbG\nAcUNqeIdzsw/68H07VMLj7YM4Iq7Ds7b1O0hXPwu5xwHgrAIA/gqk83iD/3B\nNVPlA6AVGGA6KMIVu5UhQDtnGZbU/2BJH3amv5xenqupT0XaaWTS1xuVi8Fx\nGl9jd/V7bAcRoK7+1P5N3zpXOEHRLVuXDHIInm7JC7q5Mz2cEFuTlkotfylp\n0Xz/\r\n=S3ZF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"e3e5cde78f2c57e508787fabd3dab4b6f5da50e2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.1-renovate-non-major-e3e5cde78f2c57e508787fabd3dab4b6f5da50e2_1611564639622_0.19230914582891612","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.1":{"name":"@balena/jellyfish-client-sdk","version":"2.12.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e0b8387c0dc9a49e80bab5a34fbe016e8c29542d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.1.tgz","fileCount":18,"integrity":"sha512-SsIjwyj+X/y5fZ+OSbK9FJhIhyVw4AeGWE6at5DewXQML35rJWO8WclMdI814TJM9JYCFD3PMR5+wJpmhqWl3g==","signatures":[{"sig":"MEUCIQDR2/rnvC9XDLY0RwzYEUEXO3yBausjf07JJEtaOXNT3wIgQ3akbHE0U93gnNare1/eEK1hYmrl99ER7TVnRan/lzI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDocrCRA9TVsSAnZWagAAeaUP/izUIgDvs2kvrTdZvNqZ\nBIW+gNBbRGpq+DUOiWnkA0XUxV/vuRKrR/HH4RwsnqdcHJwfwMoolrfYLPNh\nwhmafgf/Jk7N0YGbnt1x15VuBiRo0LnrBZ+HYS3EdDnkxCjqKeUR6t69wgMN\nCb6WKi6XD3t0xtque1eC3BMZj4mN8EH9tE+9CA0zmGz7nBcZZggzmcJnUN5t\n4+53xQxnOQgPkpv31yAUDpUfZZbIgL9xT6VYi52Sb8jXTIISrsF2mW+PUvAf\nE5WNWrtbiQga4usqKoULwVVUvs6LAuZ6tz0sDmgS9vNkVSWMKNk6+C4shSTg\ngMImT0mQEdpRqi3bN1a8Qq3EWhxg5cEA/a7pFVPa5a29V8goNKLRKSlgv47F\nxUySu4YY29ihiFvZ36iDG1mGVgHmFlghkqfXgmGZ9f2zQujFuJAISpglOG/Z\n7vpKkv/eq+BukTySFqvGyqADqEQiLN95M62rf8+cFwVNY5pB8rcMHXlxkhWE\nzfWyXOvs29E49EllgAizrfDDnlBNUdxvahJDnqj8dLCIFLyxsyH4RhVIFmbl\nwKp8sIMzNKSIinUilpgiXyKi5GMLHwgz6feIOtOM39cXPnxlgY1FuKtDgwh3\nO34sIh9v9o139yPaRdMgk8phYfz0bw4KPAqN81oAqom3kJDMmA0BKNYH+g0R\n6Ode\r\n=TWcz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"a0cfaffeb030ebd067e6fdf9f504c9e55d25bfce","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.1_1611564843506_0.1087708453477827","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.2-renovate-major-socket-io-packages-58ec37fd8d5da331edeaa61394ff33f57eea7ee4":{"name":"@balena/jellyfish-client-sdk","version":"2.12.2-renovate-major-socket-io-packages-58ec37fd8d5da331edeaa61394ff33f57eea7ee4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.2-renovate-major-socket-io-packages-58ec37fd8d5da331edeaa61394ff33f57eea7ee4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"54886e9e460581a52aceb151cd2e7fa2f56dc623","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.2-renovate-major-socket-io-packages-58ec37fd8d5da331edeaa61394ff33f57eea7ee4.tgz","fileCount":18,"integrity":"sha512-8nC2+qCrBH9g9U2fHcdBxGMPvg5ecWwbx3kIfP5Z+ZEerTZbKLG0UGgoirUbuE66xkYCIw/9RCPEJLiN/hU+PQ==","signatures":[{"sig":"MEUCIQCNjUXe27FFch1w2V10tbg6ilCCOtJXr/OLmwLU8K0FswIgXDWcCCJvkqLY12+JraGRG0SSeDJ6MdJUGV6vNyc2JR4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDoe4CRA9TVsSAnZWagAA9/QP/1B6kacr7KreNSQmxibO\nrw7HnOS2MQALRSKrswEbtqs6OVPqHuSE6wJjyyvd+tnv+CtEiXPHdCChV7Dg\nEfIZj5UnEQqd4wye/UICDTx/LYVXmwH4Kzu9rz7YPzkdONBqHVJ+JYRVReU1\nPk7N2oATgmlebShsC2f/aeQnxvPnISIsZOLmbbK0Bl64GKgzeTfCBIiabjEQ\n0cU+MUIioHWp5BnSaSjuNFuBAIp5sdOOQTlYU8/2ZqiWW2Yuf+vddhw/X5Zt\ni9jZU1Kl70AdKKWqPEuASaEtNtyCjTHDDjTgEiOpII7ZFF2lsFf2qGz6S5HC\ndRw/4f0dZF1A9tfcj//DermJ2U5o0/f19/eg2jbfUUJ0MDVy+ai1yCKuBJnU\nXtrQg8dH2AfxW5G7XSDv7GzMP3M8HKDKwwTqwb5wxBH3PdUMMfChk2OVQMDT\ntl4mezbvFm25YoScmipQw2guZ74xGzYF5feZ3OMRRlOTa7P0ART3V6rYLdzo\nXVmG2iAaBJyeJ6rmRHy7wqfBtdT3pNurMQ9j/gng245AwLXMhY8qqx2+CnxB\niDhRZ77J/04xxlz2jdkHupUEX6gEib4E3Z3Lrlw9Mhkwmsz6hw4/r1sUtQwd\nFmxRbZJglj+oiHdA78JWSQAHl92cFuxy6XpIBEXsFGKKCj4AtPq38HUNC73G\n+uEY\r\n=W/NH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"58ec37fd8d5da331edeaa61394ff33f57eea7ee4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.2-renovate-major-socket-io-packages-58ec37fd8d5da331edeaa61394ff33f57eea7ee4_1611564983510_0.9872381768608185","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.2-typo-fix-h32-b2cbe9146ffa990237dd99b7eb48915b09e3a166":{"name":"@balena/jellyfish-client-sdk","version":"2.12.2-typo-fix-h32-b2cbe9146ffa990237dd99b7eb48915b09e3a166","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.2-typo-fix-h32-b2cbe9146ffa990237dd99b7eb48915b09e3a166","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"96a0cd482ac9898996b2972c917235d5a27ff7bd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.2-typo-fix-h32-b2cbe9146ffa990237dd99b7eb48915b09e3a166.tgz","fileCount":18,"integrity":"sha512-k8iJxOQNzy2/lMjEQdhZqKyTPf6Fh5OBBhaBY2cRdelGm4AJQno2/9vTj3dWqV1jzCxdrxt7yz+HsId4H2oQKQ==","signatures":[{"sig":"MEYCIQC/VP0M5GVPfOVnn7TqV4bywou+etZ5H1C7ounYTFeU1AIhAMlptKvwzug/W3a+NDcznDaO3FFO4AoQZod59YvMLYhn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDp0sCRA9TVsSAnZWagAAH4EQAIEAhkRPZcoP2a4T2f2t\nro13e2WV3E7xL4vwHNm94vWPPwMYLXiBI8bAuQojuG4nlgJTyBMUgyPHEimc\nnepWdvojflbq6C8cHWmdSgTqh2JpyXKyPOTsIkMS2tGffSV0mx2Ow0atn4b8\n17kyRyFaripQEwOn0RrrhfBnWwsXGRqLwcSNNe/qwEXnRlQ31hpCJr1sbuKB\n/v6yz1XrvJERi3Ss9MuiHg/BD/rqdJ9DFPbcy9C+LauvemJ539pm2zAqLdkO\nmfjHpWQ22qXwyCF5pNaK1Gky46btwKfABXOTfM34k3bjLb451y6vUN94c66Y\nVdYJM+b+PEVDefCT/41pbpR6Y0U/9JjACaD/p0cWFcL+l7JdsAX75kNwWUWu\nT5FQQ6t1HXrdwO8QdYTgSrnT5+45YAgnwM5oWNSyt5HvNgaqGoQQ8v+UwmHG\nnhr/B3df4FaAlhi4LUJBxZ5NyhZ+2Iu32+UGnL+5Xxz6X6Lb32Uq6FZwCLZH\n1m4es82sGFXvyeJiy2l6cVn7KbFnZL/8aYI5VpXYp0Yrosf5FMYpnHKVzdYh\ndEnWMZzk5e4wEuvCLKcj7BGCXo+J4QAUKGCYyusZZLMijPy/7T5won8kjeVM\nSlRFYeM2V/5dxafsgdN5yHCNrkTupPpuPx7epuEOqRzyCdLIaqwuMSXww5QC\nGeE4\r\n=Pm98\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperies: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b2cbe9146ffa990237dd99b7eb48915b09e3a166","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.2-typo-fix-h32-b2cbe9146ffa990237dd99b7eb48915b09e3a166_1611570476111_0.5049049931052587","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.2-typo-fix-h32-687182b83456f5d253d3c208dbdfa8c325b2dc00":{"name":"@balena/jellyfish-client-sdk","version":"2.12.2-typo-fix-h32-687182b83456f5d253d3c208dbdfa8c325b2dc00","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.2-typo-fix-h32-687182b83456f5d253d3c208dbdfa8c325b2dc00","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fb243cf1be9a2242d55088be306fb164bc383b38","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.2-typo-fix-h32-687182b83456f5d253d3c208dbdfa8c325b2dc00.tgz","fileCount":18,"integrity":"sha512-Bsct5SQcin6ZawOqmursHCLBSbS4MvjQ5v83oJgfMrudt4g8j2kt8fzvtrHO166CpGp8eR/q8FQ6/RkT/r70lA==","signatures":[{"sig":"MEUCIQDSXZgvgGye8uN+kZehEJ9h3Mxr5SKGppLkKq47/nQLYgIgGF90IeAfSYZ9+ul2CulhwNcY3HRV53cbE4QVwa0Us7I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDqG8CRA9TVsSAnZWagAABjQQAI6vYzInGg/bMpxoDDW+\n/oRXw7eSjJnI+LlEiAyCVrhZouNReyKqT4jfiyms6W25Z6fQPoz0jXY0FbmW\npTVgr2jqXGaomf47zYrBQjl9AKxdfqcLgr1EEMHWG8fRBLhs5eGQ6MD/nr3K\n8Sm3bLta+qgk5lpRR6hW6N4TojyjFSg+qBKFiPV6BDr+rLUyknyDb5/RDdJ5\nTDnz0Y5bwtr1uHNceqEzAsJTM8IAplW+mIQ0BPBdXKmDAMWofY/nUGIcCO63\nmKSeISFIT0uPFJj7wM77n4aIN7XI4QOZzUbd7fXz9bGwjkbKpFPqSl2xtoEs\ns3iB+jbde3LJ0A8pxhe7+b5RJ7KwNNMaxf4bhALuFF6IYUN/mxf4Wa5opsKT\nMKsrku0JTiv/bB0SCOT/Z5sDwpQxWMstgJbqvFUV4jipTgHOssERThdgJHCE\nZDm8nFAwMuYzBA9rti6i+E6l06wIG9lPb7qqJrAKl1xkVgZA153+WRyFJePz\ni33SIFIdhHyCb5tNQbB8yWP1ZUI+Asi0vNIVtWZI6JvD8cjOQXJCWq1CyeLL\n1y3KZb/BXTLs/SQ4mXp3Sf4JCIdYPrZ93EdEqBUnmWhOdekPbT577iAUwnQt\nnN72IV2wtuPxhXEGqDVMR1HPI1SfhSDrDMT2/Q7kT7nf9fOumAbKBUr4aods\nPi5l\r\n=Jwl4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"687182b83456f5d253d3c208dbdfa8c325b2dc00","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.2-typo-fix-h32-687182b83456f5d253d3c208dbdfa8c325b2dc00_1611571643707_0.035554561294526055","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.2-typo-fix-h32-970670f8a716470090797919cd4a82d0fbfbd332":{"name":"@balena/jellyfish-client-sdk","version":"2.12.2-typo-fix-h32-970670f8a716470090797919cd4a82d0fbfbd332","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.2-typo-fix-h32-970670f8a716470090797919cd4a82d0fbfbd332","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"kaisoz","email":"tomast@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1b86f9ffb6809d8bf8af377e96de3ed73e81d62","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.2-typo-fix-h32-970670f8a716470090797919cd4a82d0fbfbd332.tgz","fileCount":18,"integrity":"sha512-JVO9954PI+NwKEizdErhmMI8qV07MxJ4JJkn/QrB4PJz5UkNlb1zkMzwFfI1tf7MD19+7qOv7MA3oo1cAxuSQA==","signatures":[{"sig":"MEUCIFbZ+ErXUS6lNP/0nOg0xjpe97uhu+RjbFBDi5jbuancAiEAs3n2KwwXCUmvBRP9d7/huYQCZmHg6VhA1eDWwhDQZ4g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgDqXICRA9TVsSAnZWagAA+BUP/jHo937GCOgFYhpeC9O9\nGjRtygKskk4zLzui7DJaQ8xop7VWV3ee96NOeMDFviQXToyZozFlXpMYEQVs\n0ySa0FwwG0KoHqMLoKCjs5h3K+O/c7MM5uab7MeeXJzKRTS4/xcvOwIBd6f8\nLPPqF2sLMwaRkcnMTyBXQvcy8RaEHERUtAtf7AkkRNEdRY+nGz5jDbhZ5INW\ndO2eaCRhkbloJdFAyUBC/l+nET4wwndS4wsoFyxNFflNDwEbY+UiVUkMFcp6\nZdBIeVHRr6NhA9lhou/r2Frd+qoNSNbr0923AZ9w+BsMC0oEqYB/jtkJuyPH\nag7HAb00arMIZUcZ7DEv7i5vgWV1oDTJcXoMw2g5NbNPkg3xFZp9h7FiaQ41\nidQj1fI9Q+sPBR3pRK6iKK6PX9J9elZyx8JLqqYp7k9E2Mi+TQiqhjT2LEKV\nV9uf5vLPccvh/9fPAkrBhyzJDojgi2T49y0ytRtx8AU99FcnDLqLHt56UXt8\n1EbayiejJbXrVLORU2auuhcWaVLRouJfZ0yAyJEjxerVDv5BdVGtJFrhDMcJ\nlfS0WgFjsyR3p8VSJhq/Y6pr69133kN6Qyyc6CQu2xcjzFKVvlrnW+WMn0gI\nGHmW5VUQ4cFwtvmhEIwQYVFb55ycx9RF0M6U+X8SQm9JBX9Tt12NPMXDkjI7\nVCDN\r\n=agKf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"970670f8a716470090797919cd4a82d0fbfbd332","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.2-typo-fix-h32-970670f8a716470090797919cd4a82d0fbfbd332_1611572679799_0.5997726062322684","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.2-typo-fix-h32-2748f6810a2d563e63bb24e9a2918bcfc3558460":{"name":"@balena/jellyfish-client-sdk","version":"2.12.2-typo-fix-h32-2748f6810a2d563e63bb24e9a2918bcfc3558460","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.2-typo-fix-h32-2748f6810a2d563e63bb24e9a2918bcfc3558460","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"576fe0adc7a09388f0ba16fe6e2c15c207d98ed0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.2-typo-fix-h32-2748f6810a2d563e63bb24e9a2918bcfc3558460.tgz","fileCount":18,"integrity":"sha512-f4eCbhIoX6fu92E16ZI/3IFcXcRdFvspRyKAe8t0p+ifbqMi3P7RCLE+voUk2QuSEk7dl/iNHW105wI/eJhUPw==","signatures":[{"sig":"MEUCIEWx3hnhLn6h6bd1djoC50iExqG5Mjzt4LlvRuoG+Wg9AiEAhz86pbbBGk+kC4iM7dtkKLBTMwA2UQGIVnzKJc1/0NY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD3lcCRA9TVsSAnZWagAA5kwP/AxagwTT0y4EVV40Ih5m\nsaIy7cZgrjU+O9WIe/rn4EKXWsGUssAwIMe880Dn47j+9GtA6iYgNQkKM8WF\nQodhFDj4/8TCtgwz8ZStyY/O/XbTgqMHh1o57kkG2y/KFALONqHmM5L/UZ2Z\nkQyraPSfj2Z6IqZUDXgyk3nmXnPHPVMpyP0e808NEuSi4GGwBLhGOpgiodOF\n23wVgO4t0Rudznx0MaPH2yf/00tfu/abbABK1WD06oxEhylqxRotyw6Gz0MX\nMEJX8dnnN+62uKhbpnIIYhU4Iuo5b6KIyjNw1TbEs4e76jk3uSTddVzrjITq\noq5QXy11yYjtHYO5CR/eOoqCcrR7NjXMzgefVeQ2eiP9VvVeFKzoQxOkM1eA\nHzw2MYsYUkGuaidVnqdwtEAtqRupnAaiBEGe7TfQVz1uHweloz+j4D4SiFaA\nvP2jX0VwgMBCkieOEHoFAHerrv5epxizZsGvT2i9ZFnfioJ264iuZ7IG+23K\n8coY4lN9wm/o0sGEDXO6jhvvTB0mKBjf8yI6Cyl/hfeYCkHloa6nU87EPU3H\ncj3XnT+R0KLIRCZBayaYyBENeZCf0VPqyEPvNj6PDKb495ZdDsibEmzJVpuY\nZc2sE/vpVnXEpoI0QjR7wDgLd29kG898qI3q+0pH8OVE6AioiFfFltRRhTTW\nvSXM\r\n=3VI4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"2748f6810a2d563e63bb24e9a2918bcfc3558460","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.2-typo-fix-h32-2748f6810a2d563e63bb24e9a2918bcfc3558460_1611626844185_0.7346766793053843","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.2":{"name":"@balena/jellyfish-client-sdk","version":"2.12.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b4ee4bb79e9a1dfd7e4e8b0e35687b66f2dd99f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.2.tgz","fileCount":18,"integrity":"sha512-VjEIkjsKqyJrXE5hKaAjHfBzNwuEeF++aG0INlb1NitO/dACBfnGxPoQpRSxhZWzGD136a2CrMZhKpBXORp0zA==","signatures":[{"sig":"MEUCIQCbgOgEJ5Ty87z6JH0v6RzQZLTeXj+pKzyJei28JN2ikgIgNmNb/p4UCiQnHdRS/2L0S7twfYFClMI97y7g9E5CIt4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD3oXCRA9TVsSAnZWagAAbOAQAJNO7gAflz6YnGVHX115\niS/djXAWIFcWBrRMGjpY1kpsI0X9KkEkkmaxaGTdujMZc3b+qq3qQRPQq0uP\n7lYVhO0YSb9De0JMXBO96ktzwTO81qcqH1tabKjnf5QiUinupHzIdvq3eS/a\nB3m+Xaxk8TnRMZpScw0fBdMk0XMvLDom4Zb0ngHQyQHVbbbXST7v+VrTyt2w\nqm0sotrmSr07LyMsYD2idtYNOd5NByp5ctTGIMfnH64pq+ye8qvJ3QWYu6Ba\nc5UaAyytYvhbeBQ6bJl2k0+z3FfmS5kCKDHEBg1yjjUZy2JOd8xkSaNhgTQT\nlZy44sXTt7X7U7pz1eZpcZlrdtbgd+K1ZMwehtN0P+6t5sQp/4Rykh9wKHUK\n3y++iKkYdEAXDzOTFLh+DLd6H5olC5POGKUV9qavaNJTU7nVcD0tce8jsfgj\n517DOLQkkygtVM6xI/07oaG8loaZQ+kaV6UC5WRPejnk5gNj5pDZElvfyxk8\n8QndeRH/pCjoSoXIh8lRgFxRwEU3ofjz/yLz2OvigOeCePghK3XQrUW9b7wE\ncD+y+WpQGt4c+eyvHaktbyEx8JdLWwzKUMWusQFOTl+mptA4uyo3ngKkSpO8\nHkRGXsviqVzQRpv+CgmllGKDenW//RvdcMqDgTCvS9IieodYnWnV4mSbLJyk\nqDnS\r\n=u8V6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"e051c2f56754ba0e7b8e7f65360918304f587614","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.2_1611627030257_0.32103136002067645","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.3-renovate-major-socket-io-packages-b01701beb9a62138f5a3814e8e34447a7ea7cc34":{"name":"@balena/jellyfish-client-sdk","version":"2.12.3-renovate-major-socket-io-packages-b01701beb9a62138f5a3814e8e34447a7ea7cc34","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.3-renovate-major-socket-io-packages-b01701beb9a62138f5a3814e8e34447a7ea7cc34","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"587eaf002b2841979100026f93e062a0e701e9e8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.3-renovate-major-socket-io-packages-b01701beb9a62138f5a3814e8e34447a7ea7cc34.tgz","fileCount":18,"integrity":"sha512-p2bZqLjIYfHW5Q/BmdyDckjGXyKyMpNhm9TIk6zMx3EKdHo42AXbNnCFtV558I8Xc20KkoPKy4rHSWvkSzXXGg==","signatures":[{"sig":"MEYCIQCIcmqQGxcWkvHHMABUz3qWlJRRIPN3H6FnRxtjAe1t7gIhAIOZO1VaVmxP9uFYsT9KPSdQe6WXjD4VuLhseQyvusTr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD3spCRA9TVsSAnZWagAAzpEQAIXHJ2pg3y27wyNeaw6X\nd/L+eFo7840h27mu7gyWEelFBIZrs0AOFcPa3RGoafe+YuDbg5mlJG+spUpY\n4QxwGXwWvrv9B2WJtyyHRRrXEF6SNQ+Lv1hpLtnExOtymm0lkrSwNLFPh/Wr\nmITw+IfpjrvPaMBNmcNLnRNFmFF+ypjnAxETHVdngZGkfrfhINM0w1BM7Wrc\nIjYZLrc3anCfMtVYbDcmO8cYslTvgCgn8nhEAJd4oFz4wALY9m+bXhEqcCH+\nVz/Fz/k5ZRRzze+ZtBPUuZP4P4FoQ9PMvZDepG0ddYnfbsr6IGgwEpS32h5B\ng90du7+o7tbIMH8FxcV7dIkKzlNDGPBKYLDhkA7V18gFGvdXB2XDZPbiki1w\nQDIRp/XU0CBH0FtTSKz6QPnoQLIOqYmoA0xGwVKFBd2XOIHkuBqd4Rkac8vS\nkdXFRjn7Ss4hoPCpJUslZ8Uc+CTlFKgq/Q7JxCkU9gVNMja2dgmVq/HsKHQT\nKpN9eDk2LoQjbOUQnt0nIi56A0Pwbo7r5hdlsl2A7gQETTjPCLolCJ0ORuXT\n7KZrOgAX272N5YRknsHoHUWduCPKNr7dU86xHFtHWOLiNJYJFdu4WXVeei55\n0lvIRDHQ0xOhfhrpdH/z9taFK7yJMIJpgZjD+hWee115ssbNCfSkxgd7Ibzz\nwJ5T\r\n=DUMX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b01701beb9a62138f5a3814e8e34447a7ea7cc34","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.3.3","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.3-renovate-major-socket-io-packages-b01701beb9a62138f5a3814e8e34447a7ea7cc34_1611627305327_0.6260209271347383","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.3-renovate-non-major-bd35b68207e4a3b9559eb0b713ef4530e6960b29":{"name":"@balena/jellyfish-client-sdk","version":"2.12.3-renovate-non-major-bd35b68207e4a3b9559eb0b713ef4530e6960b29","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.3-renovate-non-major-bd35b68207e4a3b9559eb0b713ef4530e6960b29","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d174f0558cf599ced1dbc3b1e94f7495fd5fa56d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.3-renovate-non-major-bd35b68207e4a3b9559eb0b713ef4530e6960b29.tgz","fileCount":18,"integrity":"sha512-t3CB52U1Dx60ZLAu1iHRdAmtJtIk/hntfhm5h6vNLxzTrOc0le9ehKTuK43S9AVqVw0GeoryzovkIQBxbeeoqg==","signatures":[{"sig":"MEYCIQCTZksMvl4UwMBPIfsPapVRgiWnw9zmNQFwQivwpSgHFAIhAOwTPOPFkbz+B+yWbUjevkUtOtQCaVqX0zZLbsgWXQYA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEUT1CRA9TVsSAnZWagAABmQP/0/K4SLOpl8WnFKx0xjA\n3jkxW+ldd/1Mt6K0kA3BpfYjSjnWMdvtRUF6TZM4503DmbOTzHqoHoQrw60d\nR5LYi2MPOzxOgvewhPMZ7aRnaQLELb4cX/gMnqBI7pPUFUL3/LixkTa/ME6T\nFuYiu8Ln9nIS4zc1iLWjrz34KNugbaLiUdxvzMw8lVzbJIqTvjnHVBZVZ4rm\nVUfvLs/fv7y4pY9Nxtmy5EAYg9gbnhqK9F+Njg7pKjZj13bDMm91mOUSuzL6\n99RloDcapQspj3Al0/kjzi1EBfm3T3TMWi5frG0hqDYa9Qp2P4lMvfHpZ+yv\nGjGqMp1c+s/asRbK28pMol91jM26pNw5eBhVknocvIAW425ILmbnowJDTS5Y\njKhmJ3Sa97ZHl0rb4NqJUdx4O37ZLgqf3a2cDHSkUn1vnfI/f2qGM4XWmbwa\ndvlArHwdKRwQJYT/CWoDCASJ4j160XSTK9fpcyxeySHspFqc6rHTmSYDs5Xj\nmsPFGFUOnTVPO8TGFm/rlkPbnaSNPg6+OowVbm9XEopYn2pMTEzNGErPgczI\n1dYlAOu3XKhpySDNgWgk9olYd7zzoWcUe1YVKkTVfOvOQ3tvxNU3lvzq5p3S\ndf6PFGcwnpWTEw4DeQFjoX8vd9csp5g+JPWJs0oCEj+2aKIfSXuR3Oa3HlA6\nGWfI\r\n=aT1+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"bd35b68207e4a3b9559eb0b713ef4530e6960b29","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.3-renovate-non-major-bd35b68207e4a3b9559eb0b713ef4530e6960b29_1611744501294_0.9244413351841061","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.3":{"name":"@balena/jellyfish-client-sdk","version":"2.12.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"897efea6d5aa31b2cc0b3a552653e5992ce7ee34","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.3.tgz","fileCount":18,"integrity":"sha512-H8Oz4w9q3HjAmbhmpnEPoa10m+usRWudKhC71wcqOdVM1U7I6JzXSdxJJmkBlOqPTYaZz6ryF1FEGDOsSNl5ZQ==","signatures":[{"sig":"MEYCIQCDGQnDd63AkI6+Yo5fKrWAO7c15lTSuSF5yfzpXcUcEQIhAIi3jGrOILulWTOf6vGq3WNdpcs/c/CquqKQYZDGj2ub","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":154969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEUWvCRA9TVsSAnZWagAA6AgP/jRSLuSKGDx6koBVzKMJ\n4Tp9szoFBzAUc89GcuWk/Zn4LmmJcCkkZAS65P6y3QleL40mA7KwTi9dW11p\n8uZZgUzi+D7e3bLt1BBPhg+p9vpyaKo3BM6W9XajN8Q1hwHNUOqKecSiQRst\ndqzyB/p1/+QizfoPTkIg42KF3o0wzL4y0lyI+SwbE2v9eq/46ofQD1gctCuk\npQ90Bsuh2ISVeZlkPhXfyJ/bedSNxEj9fGi50UgfkG2m8JhdLKfdAO/IbTHx\njqhl+8WPyl2dx8xzAQbYkU6izQC4sJot6FQH5bPyAo13vb+rfbvHdD1tfsuu\nIoDf/sKIH2SwGCSsRSjun+CPtd2TwiLdqz57SmGt0fOGj7H1pc/K5m41Dcen\nolQg+EMPZTIWW1LhOt36xy3egH6VcpiLk9Bx0qhjIlz4/fOJm/bndcr3UdIU\nI13lW7M4izND9pNwTo1b+kB4E6viE9bHZS2rytJT7Fuv97ysXopYxZyD96BX\nAueowrUdweKK8OTBLBbSmU7eqRYlIN1ihIbs2zzDfmRu2HiOxX3/tZR+Hktl\nX/mgejWAh5fDCkmgyOQzwdyJdfxNeEt++1Dxn8tgAJvaI6S2WQxAQVnZx0sk\npOlNmTd5O6tymuL9X6hlOF1KZVRwp7Oh9yavcDeGZwmYFb++OqtI2QCUWXlx\nBOm0\r\n=Kiqh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"d421a51f9b2b5ac0b66d12b1f620c014e3a30135","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.3_1611744686740_0.11026632481849963","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.4-renovate-major-socket-io-packages-c53e8585c0606f417ee8886c59f2da8227af8550":{"name":"@balena/jellyfish-client-sdk","version":"2.12.4-renovate-major-socket-io-packages-c53e8585c0606f417ee8886c59f2da8227af8550","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.4-renovate-major-socket-io-packages-c53e8585c0606f417ee8886c59f2da8227af8550","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d19622e97060445e66b5cdc55f4fed8130916d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.4-renovate-major-socket-io-packages-c53e8585c0606f417ee8886c59f2da8227af8550.tgz","fileCount":18,"integrity":"sha512-IkxJ3wKIahqi6xB5Y5SwwQZEJ3HeEvxGFe7Cvg9DN6kta/zXQSG/1rcfHQiEn06cbEONeAkXjIcWBxVcgfmPLQ==","signatures":[{"sig":"MEUCIQCR1p7+Yfk+I+a+8SU3KJLOmfH7RhfY7l7+Kmm/4Y54sgIgXqNZNjA/9n3kXR9W162LDmZIMCL/usjm+pLyUKReNPs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEUZUCRA9TVsSAnZWagAApHsQAI8InGPe2xGmgaZxgfRz\nJZ6ZXf407U09M64r+9trnvvwpvR4gvflemnWi4/L/AKya+reU9SJqupWep0M\nME5g308ei1UUl8qT4Ol4z68B9mSCzcoan584+6O5Tt5rZSfMSnFxSu0tia9W\nnCdFJ9ELlLtVoMnQuOYD7oWV3kEhjnaL04gXCRavZnCagYw6OO2fwzbpXasf\nM660rUGMi0vAq9iWcDB4L5Tv5wAKBzPX2agS1cdXEydBEBLaQ9ZU8ApbQWcI\njf1HOy7yoBB3oy1mp7RyzvXOAPQJh51vtI6gIU7J6of2t/u6+CFYo8KR3FmC\nGhG5TeJdDhPO7MvVjcHfsBMqRErPCMlwAp5tnRCaPnfwPG1g1jYTFYYmfW9V\n5StbblAJ0l75GVeZm2Qcdzvg6Nag8AGLzPZkH3jk4DTvmJyGxK6X47gAeUpN\npYRzqBKN5hu4R8u31pPzXM4Ah2dYIaV0tiKjxTGPYx6WYupK0mmPDrPnEWfe\nY4zGUqblCSYcTszCI7fa+OX33CPOzad23pk6NbROHsEdVbyQ/kncLa/gtojc\n6EB0HA0F8SZprUNat1nYseF1Z+J2xb+ZWSM7JpqXB7t0Cv+HSfzlD6tp/dd1\niHv00aye5uZGpPZWHlIKZr9398df/QHOjIoIMdiqhV06RLc4dxk7pQzZ+LBX\nMeBe\r\n=MByd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c53e8585c0606f417ee8886c59f2da8227af8550","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.4-renovate-major-socket-io-packages-c53e8585c0606f417ee8886c59f2da8227af8550_1611744851887_0.52163490664315","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.4-add-limit-to-links-query-4613f177f475768bd68f5468fa920f101d61ecff":{"name":"@balena/jellyfish-client-sdk","version":"2.12.4-add-limit-to-links-query-4613f177f475768bd68f5468fa920f101d61ecff","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.4-add-limit-to-links-query-4613f177f475768bd68f5468fa920f101d61ecff","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1fd0ed1a519ffffac5909e8c5548ae0424a8b40","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.4-add-limit-to-links-query-4613f177f475768bd68f5468fa920f101d61ecff.tgz","fileCount":18,"integrity":"sha512-9l/3bTIV1sMW7/bEdK33zGHbCCxNqccIASiKLXy0p+NTy1kaCdalM8eylxxFQDpZ1RIrTqMLB5NYiHzcBJsaOg==","signatures":[{"sig":"MEUCIAbN18tI/03pmNMHkayWQ8GHJSynhL3Pw6Vw5ODX2EoIAiEAz9qLx+mumP7Ags9RQNY0xIcmBt1m6kAsXLaYnc610zY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE3+JCRA9TVsSAnZWagAA2nkP/0/1rhCBz1T7qY3H2Bl9\nhRGAxD9FlPmxybmzfU9/HmY8cRnU5CSrvg62JdqVwdEEONtPIxU2hkhfnDxC\nII2830ysrclNr7g1P0U2kZJOlDt/vC4rq5Lsm6oS/R23H12w/KxlLEl9RQIL\nlVE/AorsNXYCFfg4gUcGwrLLCDG3I0nmvpGTURJ8GNkCORIf+OBwZcHkSNbG\nrbuKzagI5EauncCMoXOIfddwKC4Z6dtwfUu8eLlgWyvCDeVgpbiKBjS2/gGp\nHgo+g86tN/4TVtuUE5vBUJFrbkxB3TQod7HGqfDErUn8gx00sklpJh8vfRw1\nyqtjEaevvJzbAHcOgDmugd3n8dnxHs6oMXIzmPQyRQLKXdGF6djXn8prZVsI\nO4KV8FncelUma/IQR/RPR8zY6jnC5KNjk+IlI1KkziAb7iKkuowNXvXMFmcr\nzOLsAcLoqnysywNSXtz01U/zlu6RpdvUuamdAL/DhbIEOKhtF4qPL2SHFm/8\nSDUWG7J5V7gacA14N4rkq6ZH8D/NuJa+ETWCxmP+iguuGZxJdrJtSbSp0RsW\nwJZSrS47PrU6y/bJ4Y7n0A3EmohtIhyUwLC++rYIARSXF1cxDZ+b+CnYnAVk\nHkSAZN2SKLXRjvRXlI/FggSpkeM9fjPjdgKWQdigCWtr7zxhIZqC/oqfpBD8\nLkFj\r\n=Blpy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4613f177f475768bd68f5468fa920f101d61ecff","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.4-add-limit-to-links-query-4613f177f475768bd68f5468fa920f101d61ecff_1611890568587_0.056310819625079445","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.4-add-limit-to-links-query-895e91dcc881ce33c6c0042dbe8690e0b110018a":{"name":"@balena/jellyfish-client-sdk","version":"2.12.4-add-limit-to-links-query-895e91dcc881ce33c6c0042dbe8690e0b110018a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.4-add-limit-to-links-query-895e91dcc881ce33c6c0042dbe8690e0b110018a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24f1144442223b28c0773548105521a669571c2b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.4-add-limit-to-links-query-895e91dcc881ce33c6c0042dbe8690e0b110018a.tgz","fileCount":18,"integrity":"sha512-VKG/I5DzUjsdNJ9Lt0za/cFBuWH0uqPZgANGASTGWXyIoQj0Kygi2qfSFSIR1FQSpmsJRS9wD9YG6m5BTnb2kQ==","signatures":[{"sig":"MEQCIDnyvZnKenF3Dkreyue3DtN16Ob25ILGok0LCamblxzXAiAy0KppA/aXOZo8IpgB7pOabCXQPGWRhLlY3/N9K8GL2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE4KvCRA9TVsSAnZWagAAvCYP/0aOVwNb0QoJTvWDh67b\ng31/NBo7jPmgqiRndxkKltWgfNCv2ADeRaHXhosO6Sad5u5wrz8Pg5PHDtQ0\nIJTTdFDeDrku9+rLRCMFgkWc0B/KPOihFMZ8daMZt9kFIFdJmr95HVvJ3r4F\nBi/aZ4iCcNsHK+1I61qRA+7/BTNOyCxnFPuOEKY7KL733UhcbG44eMv2nP+H\ncrmXy07nIszTu0fjtR5jRdQgrlDwMsJ1cnrCg1lpXVGl+LICshpz4gsLqAhk\novz1fPkUfb+lOtFO1kGQD26wrj5cVVhmSyooRERzkorgkA9HjrISKSlv1W5b\nbKp+0wF+iaXdqtJWV4NNZ6bIg3PYvd1uOJv4/lJ2Okn4Bt9hOdaqCarI+zSm\nLa21yOOLNlVueecG5y/hNtwmYG9wmcPC50KXcYsqfnOzxESGULuLvaHcCD25\nbntmgFSNYH/dG6QG2Y2c3+FeMNIMf6bAO2AomO0l6cZ1NakR6in+4aj/JsOn\nb3S74Q8CEhYjBW6a2qT1jy3qWmAMWU/PsNMh7NXykjJgve2qrTp2YiBzf8ao\n041odmZGi6edO4p5ckhO8k/I2SLBS1BaAS1D9soaAYET9Vxl2Fu+Qq7nipzO\nyD+6InBs6tY0Rgljhlrklii9Xp6zEs9MpRt4Ty7DRlFdsRP55FeruOkE1Cxn\nxRgo\r\n=2mS3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"895e91dcc881ce33c6c0042dbe8690e0b110018a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.4-add-limit-to-links-query-895e91dcc881ce33c6c0042dbe8690e0b110018a_1611891374501_0.4018871323691555","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.4":{"name":"@balena/jellyfish-client-sdk","version":"2.12.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"13262a8b0c678709690828ae2f346be58c642400","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.4.tgz","fileCount":18,"integrity":"sha512-chQtvC5cixJiqJTkK593MFzZM7MPc31KfFhOD0o/Krk0N99H40+biNVqV9BgoNqsKXAicb1qxln+KHOhZwQxYg==","signatures":[{"sig":"MEQCIG8enb6DAlq6QsnV/9JBN0tczwIB3sF0AS0yVw50SDQKAiBg1YX8j7OH4e8ibl8weNSWm2Q6MDj22jT5zdHsB6HHug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE6fkCRA9TVsSAnZWagAA4G4P/R/rnuREP6YsGZD/h+c1\nGP+DNAdvAQpjpI0bzFipP1rsDN6io+Q8j6g/6/x2PToLsS91J4MRlSkawSIS\nwXOXfb9eZArPrPxEIxcIRS9kMDYT5hHAZdhlR9R7Jtwfd8m3nKL7+hMjlY/n\nuvZ220F5972U+MVLkWkXOia5mSj341EyfPTvCrCZ8FsZJg53YnbvU5+TIF8r\nS07KSvSgnBU+xazwbvjQ+UUjnPbtQMu7jl+jstGWzJWyPmJuriIeEtXxh5hR\nPQZcpARMyq6fgSQBihY1aVbLegTJSJ9f1T2fQYfW8ATem6VXSKx8V8RW81dk\n9gmP4ya0AE4FHHnLB4xcRZvrjSKrrFWAMLCFV0VV0kaBXXgmVDlf1FiM8ykC\nVgHVnwQetyD1RFx0GkGGvb3VSdCzhp2Fg05j8S24wA8B9aslmSi0qjTN3zga\nmOUjQbBjp7kUe/C1sW6vZv3Stkeeq+tVLwbPDZ/p4n86jrOIER6pb0wwaK8v\nrL9lO+apxl+M8dcdvlxRdFP0Iq44I3uM6xt4mz8IZT+fj9KL2UqoLZzqBbcW\n/5KltF9Xiw1E6ZdmSOnyjUAXduJTbpmoBqbyuUG5I6jhzHgybWafTFXYDUo1\nGRMshNpuNNafmmQKGQoKUGbOxehkSFtfMqHJU9iG3icIbktd3+PmdRGaA4Hg\nsnyM\r\n=4QgO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"bca28c94a3055d3021609ee362bea35fc5d985a7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.4_1611900899662_0.01600635019828056","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.5-renovate-major-socket-io-packages-0bf5bc1f4766c65a4ee044dcd0fe87e2de14f90c":{"name":"@balena/jellyfish-client-sdk","version":"2.12.5-renovate-major-socket-io-packages-0bf5bc1f4766c65a4ee044dcd0fe87e2de14f90c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.5-renovate-major-socket-io-packages-0bf5bc1f4766c65a4ee044dcd0fe87e2de14f90c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"29dac70a443eb3e9528dfd492feac45896a6cc00","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.5-renovate-major-socket-io-packages-0bf5bc1f4766c65a4ee044dcd0fe87e2de14f90c.tgz","fileCount":18,"integrity":"sha512-mxLd3WQ6uz9jdaO1lhUrSLRmaq7xe/67nAIsxMRl8wLKqpwRu6ypmN8FVhs0f1MYXL6xg4kj/QTNL5OL/wuXMg==","signatures":[{"sig":"MEQCIDZm7T0yiQkHS1Ir/jf1stRVftckrzqafnObyoc0YL5gAiBk+LC9RdIhQFOao/0VpGeB398GVoyqJfe/NUIo83Jptg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE6kyCRA9TVsSAnZWagAACqwP/ixBop+wmxYTBx96ZJOf\nKKxvTS9JgkTQ3POw19Dayh3O+FKileV9O3DtgGJUTpprSGHz94nZZILBzMqS\nbiUOO6GGRymT2Nig7cSUy7OjPhjP4Ajd/Lw2qCdTm6FGBzUOiB/Y3FlA/VEM\n3k4zdUHr64dz/p4ERoSxnVqkwVdHE86cDzn0z0ZAkHmT1qyxuWF/HAEPollZ\nco1F/Gi2tGTikiggwxpQhE8IzIML1zbqUbiMh2bIHQtwMM42vauhnq72HMas\n3nPNuY0jKaqMcVHyR+eMcLA6ifR1etQR57V8xfcPwQmSI6GSXiX49eb/GGOs\nO6ICvYMuhWRTrn/7w9o6pr7q0oeNrlcsEn5mlrmJYvkmEPdu/1h0daWAkrPg\nHAdOhzEe4uZhRpbx5UhWlsFzSx6NuTKOlN1+bL0lS1Dw0PH3iJZRb44O/yqq\nnhgQ91hhrctE5MGU69ad4v1bCvlyhOSnsJ9mPgWhvF8S8EQwrNEvbtMLI5mx\nqLhx0nsXqkCZ0lOo3/QdQz+M7wI3v+qa580iwHyXsqFAu4lIQG4qyDDSHawK\n/qEj/znZOy2pbf7l2H23Gbi3uxdS7zZzDxxSY7xIYruPL6oNwHXH6jc34EiZ\nON4k60nJfkCtixQr4haK7hag9x/bCtIKOd6PrgCNwHRlCsS8mJzIOlBFKkrf\nk7u7\r\n=JUt6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"0bf5bc1f4766c65a4ee044dcd0fe87e2de14f90c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.5-renovate-major-socket-io-packages-0bf5bc1f4766c65a4ee044dcd0fe87e2de14f90c_1611901233464_0.554714127723624","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.5-renovate-non-major-15410b9ba234e1c890633145ff743a566e1c9ab5":{"name":"@balena/jellyfish-client-sdk","version":"2.12.5-renovate-non-major-15410b9ba234e1c890633145ff743a566e1c9ab5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.5-renovate-non-major-15410b9ba234e1c890633145ff743a566e1c9ab5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a40e0c410ccd06f194faeb8ba7a328c46b9bfe3e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.5-renovate-non-major-15410b9ba234e1c890633145ff743a566e1c9ab5.tgz","fileCount":18,"integrity":"sha512-bxRwItm65vs1QWcdftxE8TsOuCaYnGUXnxj+DWTSPA9JDv0SG8NAdNB1kqmaxs94RxtBXicZQ5UPhsOg7PyUnw==","signatures":[{"sig":"MEYCIQDnBwn1CqmLshV/JukPXhe5k45wTDMySESL/vlpOySctQIhAL7Z9VlBo/dV4xWswS6+i+8R8O7c82eR1Pn3k2VBy6u8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFOTQCRA9TVsSAnZWagAAVA0P/i11gfhjAl9ATpGhHTFb\n5ylTn+dvKfJT/FnvObCZOcqf2uhucP2BmO0z2M4QT/yQ22KmOm0LmPJhDYW4\nM2clW3U+L6m7Sb2QjEGxkYj6mydYnlmfObL7vgtuZacP/3pdYe0feNkwtsQV\nectmY7A3EkM7LH020IV8f+Hd6uHHJNBLCSEXja4LMncPX0EqzWKqJNKNRpwj\nfsIjR26mKUPQFZtGUjOdP5AL/EwDDAde6M6fY/xzzKlw8W2Kq8HK3cTRGUPS\nxg5I0dE8DuZaggG7fCeWe6jGpdLFJjyqP1wb5tyYFfXRw6wWqNC6VOOdLgDf\ncEGz9FqislrhS7ICVYwu4rDA272V9Hd9jj7R4zefr7HCJcGOIAyWZPEi8VN+\nUkZRF7bHbQzBNJB9VSMIqI2LYyRc2jJnCmlN+VJGf3TbPlj133/n+icu8gpx\nZzqC0M8/1tfih++Dg1EfI0B39u6Ychi7LDHBixOveSceQvd8GeYN2NcuceSS\nnCk0NDtOiR9TxfG+1NXhJ9LLX34CdtMJtiPN+fCcIZH90IiUw4e7HGnxPJ2S\nUWcUNJavdm+s/M+eOLJJt7T4XmuMx1nuUrzf2YyAFojmewGrfQzx+Ytm2bik\nmxvHm/MQQ4E67AfGdW4tw67WZYY19tDZ6LgNEW3fLSOrF8gKjqkPaVnOuI86\nKuBH\r\n=GSpX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"15410b9ba234e1c890633145ff743a566e1c9ab5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.5-renovate-non-major-15410b9ba234e1c890633145ff743a566e1c9ab5_1611982032023_0.9738247537531788","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.5":{"name":"@balena/jellyfish-client-sdk","version":"2.12.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4192533da99b0e5f67be0ffb3a1ccc8f8a99807e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.5.tgz","fileCount":18,"integrity":"sha512-tjO+fjMKqyC0H/B0Dj08TKSdhaYyx+qagZ4Vip2yqZugUW/z70j/+NSKwwdWwRiaP/ZeYjyxQf7l4aV3gdO1qg==","signatures":[{"sig":"MEYCIQCg59rQqoc35HWG/rfNb1rQs41IP4vJ5hXeuM8RYhndegIhAJJRtYvWXThxqQeE6l//lJOpbEoOabYn9mfKFE+EPcwD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFOVvCRA9TVsSAnZWagAAZ2wP/2KdRXLx6sPm4ikl28lv\nuQQqS0AXm/mfA0Q8trWUs8Hyticesn4jbDKHQk3hk7rg0l326NC0X3bVKINq\naKws6sbldNn7GmvZrAftsBTuZxHGBRKRUkSuEJ5UjTtSCRuvXBBXQDNKzUJ4\nAuhKf9Ug+lUrEkFGZy4km4ZVOf9EYlhHFw5M5heCd9E/NyptlO6s/fwVLRgD\nsZlA2JStEitH1b5ZUsa7UOvBPx8VlkJcNvp3G0LfkG6HqzeN1lwurAi1XPt5\nJIzeE+HIqRD0Ef1elzEkMP0AsFi2ZYdT/eNcCLZaf/F1hd2ZrutQoOUpv4o6\nRDvjGYxzUcDq2EFTDF+uWMMjxNnDj1s8Sx8Stwl5Tubzk1Hft74lIkTn2eoP\nRE4q8aT6xE1GYISXZrz2SqEQLlTyGyBXPR5QELZQtgVMBKQ8VCF0v2OqZkot\nKRhcXEJJh3qirAT85XPJz5ZI5ynglBFbuQ3O9P+0u3Qe82M02ITrmpvc8nnW\nKRGASIIhoS4aMzS2YNkGZCJus8bVQO3o5IAp1Ff3RlRLJfPd9ZKBQYShUWsM\nVqYEAdrPeuSjYktnKH/S23PzuPrwDILbyHmNFSGVt+x8DO29rgMHYrOYCeju\nvIoDIXbiyKcA1/BiRcHlmd0Fn6KoWCRpu3exha5TfWtnOGmkT8r56FmSiDnB\neOTl\r\n=oR2o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"ea4524a71377e93004e7572cdc28da17c7b35fed","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.5_1611982191005_0.32493772782203534","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.6-renovate-major-socket-io-packages-4119a02af7ac6ab86040cd200f0fa49abcb4e664":{"name":"@balena/jellyfish-client-sdk","version":"2.12.6-renovate-major-socket-io-packages-4119a02af7ac6ab86040cd200f0fa49abcb4e664","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.6-renovate-major-socket-io-packages-4119a02af7ac6ab86040cd200f0fa49abcb4e664","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"97be54048a29074cd526bcd900f6c4837e11b1cf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.6-renovate-major-socket-io-packages-4119a02af7ac6ab86040cd200f0fa49abcb4e664.tgz","fileCount":18,"integrity":"sha512-pdW6kyl6OcqhvzfZoSvX9eRs8wOpMP1QtgJtixbURomJlScgdEQ20OWkW+lLb/9zw72eoEm+lF9ca62ejEKC7A==","signatures":[{"sig":"MEUCIAY2nLMdM574dNPPYf33+n0nXuQ5NZLd8+ybEbQB+n8pAiEA929lqJJ9yqCd4GfIRn2IQ8BbiYTvLsKqHHrWHrJk2OA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFOYhCRA9TVsSAnZWagAAp2kP/joaFWZ45ohJcLmI/2JI\nRcECfuFbZQlalGCaevK3kmuuHcP+WBj5QHOd5SNI2kRv1M9ewODBoIU2vU1I\nH2n9GIXUGvxPxQy/OZ1irW28dJQi3hg7hzjSIXMl9lPzuWwO58W50Laa0nFu\nrqEWbul0mogieT88BIqZvFz1qE/IzkDBTDBTH0hkfsL+DUaHMluDMFOirVZe\nCt3Uvs406ge9vCoAO4kNbLj4zFSYVIO9+Fi7Dzawxx6s/KbV2/m9hCCVqDfL\n6XPRGIWfRfqNe0/5y6CrPiRafBuR0E0AE6xNR0GOVksm940XLGa0Kw2XzZvg\nrQ1QDxFI9uzEu1H++9YA6fdb++AGCF0uR3Nma72vE7etkS1bMJ0COeJnhNNo\n6nfOG1YkAh+NOz9vRJrX22rx9NmP3YOidTONYS6AVxd+fhdW+eRLAKB2iLqs\nI6alzhEc3eukv1XTlnFpNPq9epOL5vRIcEMwVVHGgkXN6aAc/tDmReB8F+0p\nTWpNoHV7ntoYIaNh+rkYbEbT3dLA+gSNH3IJKVCcBU+kgjaIdDrbO2LgNh6W\nDRoc6Cw6fevz/a84eCEwnkWDzwEz/o8vZuLhXbSYpTxU3l8efKcC9oY8ESx7\nRfRl0Tom1hdtz+UpWiMKZx1KTWxUbj5qP2SLMV5MEKDoEQnebuvMCKGbSxip\nD5Yr\r\n=IM+j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4119a02af7ac6ab86040cd200f0fa49abcb4e664","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.6-renovate-major-socket-io-packages-4119a02af7ac6ab86040cd200f0fa49abcb4e664_1611982368525_0.9350664951753673","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.6-renovate-non-major-45cbf576109874f54bb6186c35489e1a4a36cf4d":{"name":"@balena/jellyfish-client-sdk","version":"2.12.6-renovate-non-major-45cbf576109874f54bb6186c35489e1a4a36cf4d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.6-renovate-non-major-45cbf576109874f54bb6186c35489e1a4a36cf4d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7f4fd0e0438418aa6d4691b674d74fe95f709660","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.6-renovate-non-major-45cbf576109874f54bb6186c35489e1a4a36cf4d.tgz","fileCount":18,"integrity":"sha512-UccYI6RdPZ1JXUiiRJhurZEhXHZBn7MJDwpU6ybC65+pLEYD3WAIrvxszDLw7JmkceY+rOD07Aoc85KlkIrEow==","signatures":[{"sig":"MEUCIQDgiC75XcxGRvgiff6r/Dl+78MLnS55iqPS9Ghapq9FtAIgf29IFUmiYE9RPDqWFQZCSAOnUXnDTgo+7uNMl9lmT1M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFkK8CRA9TVsSAnZWagAAwAQQAIzPgizP6i0m1SdKzKoU\nGWbXVz9Hcx0vlLOKLMBy9yw5TzFIEqunBfrmfPOgP84HXh32/82udko00263\nNK288NHwR2eJgPdHlGKBZk7+brlv+uoKxN8uRlVtK7PPsii+k28Doz8xcwjo\nF7O8zCG8eZF39aYEJQX0KQIazjQ04as9ytn4l0bu3FG19P2o42UC1rzFZx/H\nCVCeA6nH6syOteV5pU2QJuq3SHXtDcD6riIjFwrS8mKCOE3HwevSpA2rczfL\ntaKCjrKq5wzrIKf3XrYcU5emdT2E9164DkVve+7SvyXuayNfXCUAVTc6qHoG\n69N1q5ZvHV9Hd3VgYncGDqdvgSFliPeBhvB6ANaKwuWQRg68qoPzI0dtIYwx\nfqRhJyODM8ABZnjSN5d709juWPpBmw2h43ClnY+PuLrxaq1MQ8F6d45kgVHf\nFt5UdPLaQMzvEhwXL6P4krqU9MSsxHvhioQkPfTGbxNqYB0DRx21mCPTsRVz\n0zGllkTCEmInb6HutIXhTKjYogELyb543VM+btcHsMOPF3VG3tdG09S+yjMn\n41LOGieBvaxHp4kG8kG3AP1BSPpM9YjloAEFI+zofgxzKrHOsrSHcLiH3Qkp\n1fEb9UJt/Vkb16R8vLdIonIswoH02uJMh5ZbKvGDM21a2l74ZRAAeuW35LVT\ns0TL\r\n=RCVY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"45cbf576109874f54bb6186c35489e1a4a36cf4d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.6-renovate-non-major-45cbf576109874f54bb6186c35489e1a4a36cf4d_1612071612156_0.890317536709835","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.6":{"name":"@balena/jellyfish-client-sdk","version":"2.12.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c84cacb85b3313743175005a5c1eb551051c0d65","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.6.tgz","fileCount":18,"integrity":"sha512-eh2WH9k/HJDCm7FFuXzYZ3s8hKK/tOQ/SHIAgz0jrktJaCLGZjC9pf/1PH3p81eZhgggcCLUDMwCNKdQFeujkw==","signatures":[{"sig":"MEUCIFd8M/5b8hd/yWtpFFYeGKx4e2Foo6nkk6yWt60bdwmYAiEAj3v1Ms5CMRn+p6m8NWCLJt093W60UUrCmDp0HKFlEPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFkNwCRA9TVsSAnZWagAAHmEP/izTXZ2DTKnOjSG54K8N\n9wvqSpMivI0ktofcGrKqEn/V5kJDY+gPKlo1cwAerRpnXmEAsmU419Rg1VZn\n6N1lIVVN5V76Oss9mUA8BIVXhQeiB/Xqb1lpe5eERCOgru0vQmuVR+NbicL4\nsvGnPEXzCGMyFZVKNGHjrXoURfQK+FJeSxmVVcO8wEEkZAlBLarJ9V3sAgSu\nLNHmiIJG3qXrHNKtynPlk//zzhjKhZ8d/J/4Xm0jpipY+SqNnFUCRRmJJSam\nPG7RXKyCeXbkIxJ7LgPBlxKrHeY8UMIb7Aa3kXJYWpdza9cVr/oI4iQJyWzo\nPy1MnX2aoaLSVcV7LMlX40Uts7rfXky0vagK9FeMhcNuWc+wA3v7A/LY1237\nqVHma5TyhAkiLM97lmbWW9pJlX0HFgv4ak00vUdC7scuU3v1vodnMG5Bq54+\nFkY3KxfxfbHMIIU8PqQKicdiKGCkMdsjFeLi6ohmlsZ0AzuLvgrJtFuPmDoh\nhKoaPinSUBiGUZajm56QJeQayJTrzSdrbbOePurhUlRld2/VGSO6ulCZZuU3\n5trkuZQNledXNWsD+5g8oRQPY29HX+1Yx6wCXajvUeSMnGPp7rm8mTPmWWhl\ny/dhLRISJc4HbsFOy/ANs0YpllJrh1ksC2RnyBNVTWX8oiZRUirrsWD4nWDO\n7Vxf\r\n=9upV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"0445bbb6ad1f68d7908b9f0e0cf07392acff2031","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.6_1612071792190_0.0061843043340268355","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.7-renovate-major-socket-io-packages-9df460e0904a6839655c4ff02354037aa4187a79":{"name":"@balena/jellyfish-client-sdk","version":"2.12.7-renovate-major-socket-io-packages-9df460e0904a6839655c4ff02354037aa4187a79","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.7-renovate-major-socket-io-packages-9df460e0904a6839655c4ff02354037aa4187a79","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7f274f5112b85b562a898c3f1a617e8fe3ed64b0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.7-renovate-major-socket-io-packages-9df460e0904a6839655c4ff02354037aa4187a79.tgz","fileCount":18,"integrity":"sha512-bsil+ZJF3JAn7B1e/Atpq4SfE6I+QkNPbdwDohBJMlpYZfbgW7D9LgGbyJouY2Lo8woGGkXPpFjvfIlwV/J9kA==","signatures":[{"sig":"MEUCIQDzf13TddpQsaPiIe1kJq66JQujYGsJvAIA0T5BsKFy/wIgIgC/OjCC1wfL0wowys3aG9KSSwS2DeUCU9jbAB3NnrU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFkQECRA9TVsSAnZWagAAY4cP/1Q6ENWut1XOB13AeLxD\ndxmk4+E7EEtzFBGtBM46gI2rpJaYE9KW82CbvMCHEmzm6FuR+gGKXbRGbJzX\nj1wQNommtTXpyuhgVwZsXTWkL+HDJQj+wRbZTDHoi5AvN0Tr0iw11Dnoev1R\nRBSo4fK6Oyd5L5zOkFon4mjJmjD/yfyOmCn9V75uUMHqLbczdnpqdnk9TSLV\nnI93BkRYYfvKUHgXBmo317cEuQ+Dh5lc7XALZ/J5lfo9yW4BEcYyIxeUrMac\n3abbC9xsNaqvVW6CvK8DQ47c1znaZO2nmCFkLJVQseDFmscwpmHf6EkgY9Og\nM+/wDBKSgjgPg4jSUP/rhdiDYcvAR1gG4v0igDuHYbM/sirXV1SFWH8/pyjJ\nomcyFPz3/3EEru28XIJ5LDReS4QwnfwedR5aapp4IhpE9Zz/3jqqtQzOOrq7\nduE14T58Nj1SFbpO5K48v/5psr2Tq9OpT2iLPYyqk8RFkNsBp2iupp6eT20Y\nGkONoxjcxw9SBIy5R+MslDg4bKE5BQEwDx1WKiYDiEo7yJqYzHINvf/Tzkrf\nAajbMzBn0GLiSror6U8ypexffgQLq9ZE+eEJ1T78D9CRGYyDVmqeqPegnhUD\nf6vDhYFyqLfHh7bnabjWcq3UL/SFBFdig2ZXR4zEV+H4uxQNOLwXAQc8qzrZ\nT4Fh\r\n=Okdz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9df460e0904a6839655c4ff02354037aa4187a79","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.7-renovate-major-socket-io-packages-9df460e0904a6839655c4ff02354037aa4187a79_1612071939787_0.1250314344943333","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.7-renovate-non-major-9166666d08c66d042408d9745dbeb96f96f9dc34":{"name":"@balena/jellyfish-client-sdk","version":"2.12.7-renovate-non-major-9166666d08c66d042408d9745dbeb96f96f9dc34","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.7-renovate-non-major-9166666d08c66d042408d9745dbeb96f96f9dc34","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fdd418bbe55b41432588acdad3b4c434b735b88c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.7-renovate-non-major-9166666d08c66d042408d9745dbeb96f96f9dc34.tgz","fileCount":18,"integrity":"sha512-UJ7my5/vlWrbNub5it2sX2cAQHhA2Vx4j0XHKc66/Q/tUqXciD5aPUsmnS+NphMKzVQC0kBqgXnhqdMrK0lvUw==","signatures":[{"sig":"MEUCIQCDO5UZTv7JsKoWQB/1FhmiS4rdGCjbFXP/ZFcdtEsM7AIgMZGC7weED3UbO27eB4ldrbBziV1p8U3sJiZN8oRi3jo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFpcnCRA9TVsSAnZWagAAV7oQAJQ84k7NDw6nKBhgxaPT\ng7A5Fkrdf1tUo931B8HKIRiJnmgBPPg0Rr+mwjmBeZ1tSpLIs5uiJ6vQczcD\nTtU3dcomEbIxFptPwpb5GnCsnTR7XgCOpcInRd//ZbIgVkF+1korKwZimmSO\nRGnczs9eaTJJ9f2g62erHgZu79G5c/uuJVwd+Co/5FlavPBVRpXa/Fp5yDD+\nWouC9X5gr/TszAIDDGVv+y1zSJg9aACLeV/61D6lrbiv1CAaMJ1rjKaaf3+v\n5kKSHB6Q4/REVq4qxMezljWLDywxkVpoU6W+pASourv38PhHIGg+kLJJfAGz\nWSyFo8hhPP9fthoCYHtCVFJUEeLyqriTVx8E4moS+lJ62PahyJZ9dFgKHddc\njug8b5eOw5YXIvROEVIWkfVmChEIFlNSTSd/AUzdmCJBMuK18hwxWhvYX9Ze\nxUkEhzRJj/gU0ZiP304N6n5Spk2rvI9GqLZB/caCb9wmnt113ZCrZDwOi6ef\n6LXPBrGPJJwY9isP+vlhqu0PP0zu11kqDUlNEW/uNZTNrXtui51oycY0h2xC\nWoo/dMdElngB6uULtDEVU/kSLONI9pTX3bPJaODDG1y7hCj5ikKX09t/WlEe\nsRfbvPtVpGxBKvSSnyEI3TPgT8zIuBs7bSPCWxCcFsgoHAenuiizGjNUuxeh\nycHy\r\n=qJLY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9166666d08c66d042408d9745dbeb96f96f9dc34","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.5.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.7-renovate-non-major-9166666d08c66d042408d9745dbeb96f96f9dc34_1612093223301_0.827843408111187","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.7":{"name":"@balena/jellyfish-client-sdk","version":"2.12.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d7a855dd408adabbe0078c331832f26fe767ea6a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.7.tgz","fileCount":18,"integrity":"sha512-LDoemdh33Xdr4pKlCEiQrfXctl3SsZIaG7T3FWwEgaQ/CVZgntfkrji6N5EHXAPhoGjcaaRluzYMM11gdc9yqA==","signatures":[{"sig":"MEYCIQD3DEYiS+t0yFVl6gX3JY4f0iZaZOaSPkEpTLX/HbmTOwIhAMFojESgGXbWX1wkVauIqElot7rOjVrE3BaITg1XWyk+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFpfxCRA9TVsSAnZWagAAQfQP/jyoL/mDmp6+AZavZNpZ\n/vLahPrtxs01vnqrcXf20pTZDiaY4fQSLf09GIhLpIFSpohKx82hn8Pd5axK\n0xA7NglPg2TLB1j+PxFeceVBRBl7cZ4PfyfgIHatM0lujr+HMcxEfgyALkur\nxUt/At0HYXir9lkyNbjVIvQL15HNUXPnbGtOhHLtMFcjzQMW7DTgyj8/cxVM\naVfUCcIBqxrKwGI9Oy28WeIjsqElDGdjH1YkxalgfxDM+XqHJK4uO7wx3skn\no6WoxsqtoAMRBAQGRplC92+GG7SmIms6ZI4mrs0Q5HLLAS8rr6/1uzWOzNns\nBdMN2cYGuzMo+7NBjPMmVu6xZscMtFR1lD6HkX5oHLhNvtQb3zWEc9TL/IwF\njewdI8PiF2Gpa6Q6gQ+/aka6RKxf0X/k74XKpYPIU+Iabt4wBJkdn9YWnlnE\nm/qlSayAJDCufwHJhP1YHrAadX3Om6x+L+c8/mlvtZhMYrdtmAYTtynoxSap\nfE7pYvfw1BhDI1mbVp61S5I2RuFP8n4oFV6EemUKu6o08LFpAauQ/uMbrsjo\njzROF4Oxzllf1YyxIKDQVPqGVFYLV+5zFkb8JYrfI/ua4hWa0KfjKkxtSD34\nHClx3TGuaATFzaiOupJfYjyfOsguVwXhLUKZ8ePDkde611UyTTv8LpihLwWJ\nbIdh\r\n=JjX6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"ff6673cba2ea6fb186d0d5032f8f3d8b6c0f8ab9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.5.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.7_1612093425133_0.8475362428437061","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.8-renovate-major-socket-io-packages-051f7ec8fc00fb9491f0c3501a5e5b20216ca564":{"name":"@balena/jellyfish-client-sdk","version":"2.12.8-renovate-major-socket-io-packages-051f7ec8fc00fb9491f0c3501a5e5b20216ca564","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.8-renovate-major-socket-io-packages-051f7ec8fc00fb9491f0c3501a5e5b20216ca564","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cee090c60a4a4663c15014d04b24bb462269dbeb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.8-renovate-major-socket-io-packages-051f7ec8fc00fb9491f0c3501a5e5b20216ca564.tgz","fileCount":18,"integrity":"sha512-A485FYJ6XtkeuDVyCB1MA9rm365NQZ0a3MmlUdUfhFdrOZbFTP6gwLcwgbgHnBD+FV4ZyJYTCYxxn6pA/0DjTA==","signatures":[{"sig":"MEYCIQD9Iud6g+fG7ckPZFxQOYdA2WF3AP0LBE3WGaAibnqJOAIhANMeQ92Op4mfk9VSSjFAX7RnU2ZZJAXjvnRgCRCZoFEH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFpjHCRA9TVsSAnZWagAAK5sP/2rHjfyV7ePYPOBHFgLh\nCICpfvZ7W5eA4UhzWiXmb9ooWbB1nw/EudSon4eYDqK8OUPYnE2nClCFzhhv\n4YSqrF9hTOsVwoXus/oATHZ3qXrDkQuO2nukwXComW6kuQAUWF9mOgX2f5pp\nE+t/GbVGda8BO9+Yb/mQpVy8xhPQwBqID4FeM7XWMJkAuqsy3FmR9E6xPNqn\nKdeXtpRJYIxzuTDa0K8lHWERdnWlGQ597t9f1ARzTJx4IVmAwIZ0u1nrmofe\nG/SzHaEmV2slTSx4zmbQnqm6XuPeIAno+ur4v9NBGM79PJXQRDQ/idSYprr3\ngOCN7u6RmgU/bdTND8AdsJuXo/hXr92ZnhXsmSlDDfb3rEx/E9dR2ODmBXc+\nDDLHU3sSUT8P2oU27RH+dP592A73DHuGps7ltPu9I5ukwbykDIHcpiFRwzs6\nbVpWk+MfSykRMWyiQfoGQ4OndJR2BahMMHl0Mh8n4ou9zQWMSclc8zfWzNqh\niP79MULv1cLnp5ICQIDIMtZ0ma/MH7EAUP9l6GziERFhXEy7UIaxlMRG3VFT\nPr5kaxv1NuhlDSd/1GV+o+gnrQc9nN82NDCiTC9Cb4+LgNKwc0k3ekjwTuZ0\nJoTpF5jJxlaKd0DZn3S4q6rYS80p2TnNXgq03QuDha/POhm67YmGMxcYgEyF\nthHW\r\n=g1XY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"051f7ec8fc00fb9491f0c3501a5e5b20216ca564","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.5.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.8-renovate-major-socket-io-packages-051f7ec8fc00fb9491f0c3501a5e5b20216ca564_1612093638834_0.23191598294505056","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.8-renovate-non-major-c58493fa3102b19a59c9bc0d6043c0ca3d56518a":{"name":"@balena/jellyfish-client-sdk","version":"2.12.8-renovate-non-major-c58493fa3102b19a59c9bc0d6043c0ca3d56518a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.8-renovate-non-major-c58493fa3102b19a59c9bc0d6043c0ca3d56518a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8e88cad14cf13e772a6c6b99114e02e893b5e4d8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.8-renovate-non-major-c58493fa3102b19a59c9bc0d6043c0ca3d56518a.tgz","fileCount":18,"integrity":"sha512-P/zI4NTdAiF+b5aI8hGUN8BOUdBJCJ+M/J1FtjtwGHARZK5o+cnMaN31xzt3n02xQ9owCiDyR6mNzxkvXDHu/Q==","signatures":[{"sig":"MEUCIHgP0mzv1y97CZKeAE4euApvLw9zf9o8UUdrcWIIrAyQAiEA4SsrTn9iycVsQluMy0jxlnwGIEqdIbxK8bdjMuJNOIw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFuHkCRA9TVsSAnZWagAAPMwQAJzUygXCo0OXoGphO0Uz\n2uBjibBZ2NNRtgAjp1wlPLApD9rE2qIiH5TKQpZf9E1tx0Y80Pqh3po5QqE6\nS3f5OPOyUKRZiLOoz4KDRDwYSk32xmEziacLSKwoN44TeyjdZ86wXnLHOoJR\nZTd8XndYSHgZHn0J4Wcck1fMKB2TWG+i/m2f407ybaJ+H6ya6Kw0klabB472\n/AQl1X9GegGG8up2O1gGZ4qQltxLpa6YQHoKv4Db8UWyfRprk1vcrM6+31SU\nOLmNkrMZ225VaqrkxZ87YQhCHAA2FiD9SNg9qIQb9bI0m7WPfxZUsqPWw5OC\nOV3VcTkIuKVLGzfI7M+3qgKXsEmi8PPyAcOu7Zdv7B30Ej70C7xN3ofrhsD2\nb6rwJZSj6dQBpTHzN5W2DNI+K2dJlCXKUNz+bziD7YS43lkKymwPSzHi/7bU\nyzO1czWD2j9G7y4WiIhmyQQCrGtA3FVQnezhW5llW+bLK6yJI/GL5GDXRDLs\nlI6uyt7K/ProO/SIv1HDcBRxSPkxLM0B/fiypoLQw+mnYbnkP2OSWXRzLvU0\nadeOmeeiTvSVwZknaaxXs/BtZLxofc6onwoNTE8nY/ukA7ZxYJTaGym4jJk+\nBb03Cyw2lWz1sbZ3ZryHbrFMb78d4QQdIPBMKhBHof2icMqfF/mXkAb3xpfs\n2c3S\r\n=wuMR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c58493fa3102b19a59c9bc0d6043c0ca3d56518a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.8-renovate-non-major-c58493fa3102b19a59c9bc0d6043c0ca3d56518a_1612112356486_0.27635165989645927","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.8":{"name":"@balena/jellyfish-client-sdk","version":"2.12.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a885981162aaf23300f14d52cc76fb053dee3a30","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.8.tgz","fileCount":18,"integrity":"sha512-a96Cv/iSEreF8QdIhYUkQHzjAKaaoeniatFpFd4XFZwhMcYGr5POQIu88L8IE3t5Cci/wqR0EUmrg1elDST4hw==","signatures":[{"sig":"MEUCIF3n4AV4kGE2GApq5ETWWmYcO27bRO91/gahvbEZT7uWAiEAsGg+16sTqgWCdySgLoa5HOm+7+iEAuAH4a4wLgSKGj8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFuKfCRA9TVsSAnZWagAAn2EQAIBeikHFpwnS3uhSE45b\n/mGm1MAsCiauqxdV14ugvzbXGsTah4ge8kMg5lLWgyykFPGck9/J74eQqD2R\noTygij2H74QnGp0LslEXw0boWxJHAQS+4mq1nVrOvDdLgJdb7XxM4J2VCCHJ\nkfz9hUHX2hjYdgGnHbVGfAupJebDqmvAZEO112aLtQq+9S+rXbtLj9aPy/H/\n7No9JFeH55e1DsxgtElrdTfHD+Cee1YBVPSI0tCPag17XY33h7eeIaAQdYgK\nmGVz3lkW7KSH7ihlGiRpPpYL58qgOiGrRA1eUgOMQpkfwwLom/+PdEs2PvVA\ny2abTqBpWPMeWuIyHYMW9XhFxY6/av+htv+ALa3BBxlvnEzFVSo6/g3RvkP7\nryyt4WixgertNhSm23D0jSnfcXXIGAL/fBizUBXK/LEmZVRXx5rj3tTwBBu4\nmv09I4P1MbZMDgqeECw3gFKNTpSOwuUiEIR/6bJB1gnuLHMSqi/ejdB9v0eP\nYWoo/QJ2bD9e/6H/fxFcMGxPFvlh+TMpPWX8Ylsrbrui6eLp6zg8zLk+a7dq\nv2A1Oj8xhi5wRUBaGJAy+ZtZMG3gE/5JMOUDmDoODBEme0dnMabDV0Bbi0uM\nKn1XZFx1EEBPeQ30gSjku3tC9VDUunaPIbCt5VlGSz2FAJx7OOfE/Cif7Ul/\nszMe\r\n=pX3S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"7f27194f7f8062179ff7bca5f49f199b4b968779","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.8_1612112542634_0.4270034664834317","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.9-renovate-major-socket-io-packages-ff544ab9b4a0eb98cb1ae019965fee41277f354c":{"name":"@balena/jellyfish-client-sdk","version":"2.12.9-renovate-major-socket-io-packages-ff544ab9b4a0eb98cb1ae019965fee41277f354c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.9-renovate-major-socket-io-packages-ff544ab9b4a0eb98cb1ae019965fee41277f354c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"071b40b029a513de59d5df04585bf4511481d376","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.9-renovate-major-socket-io-packages-ff544ab9b4a0eb98cb1ae019965fee41277f354c.tgz","fileCount":18,"integrity":"sha512-+8HqmQC2O6OGMemNX7K1iCqn1lI0mNIpZpxX5SeV6OnoBmaHSC8sf+WjjUPtc+AtHo+FZeNhIe+18l+MrshJSQ==","signatures":[{"sig":"MEQCIGULv0KwdTDLDO9sCjLnxbrUyfuSzOkDkWQHA/IbWmxMAiBmhwHGLewR+QdQ1QXY3rsxl68WV4Wfbt0zrzO1Pk7C+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFuM/CRA9TVsSAnZWagAAxBMP/jiJV0biV/TF5wEhMEL4\nyvbYHBFkAVgYIP6yk4GPLX4r+gnPMszwaO8y2lbG04xOD9BR9DIVSAw6NOBo\nEWOgnCaOaWwsLLPDAQY6nGaRFxS5taaV/Fb+KRtuGWFw8EKvSY//KoMTCO27\nJA8FNu4f6L+D1/XBC/cBRY+4BsNLDFFSNCURziMFpXENpOjnNZaNvalb28WK\nam9ntYmpDGX6k58QvUq8qscEA+op40phaBxNYyuGeRAy59SJMXTa6kodOcXu\nztwYdEdqS18D8NYOerG5LjaLgIGEuyi7vXunJval2wbLcsGc9E9zIzYsBjjP\ndZUUqGx/DEoqcxO61D1fVlaojtZdieFMrjsP/PB6MxJz3oCfG6UPaD1rrVch\nYmpLcHI5dxV4UbVB0yxR9gr2ew80JJJ5GB5P5rEFwXp79eIHKVp7+Pqj960a\nw/9P8a2+RVVKoEgCLU6uPuTc55yTFbc2YYuhyhhBh2TekMuPJh7RQR65Rosq\nkmkdpVni3WHvC2BGKAqdl9j082ta1fBfBG3xCPdQxRnq9bJ+yhlYtqXuOfjY\ninoZBfQxYxxBMShpkrrV0vRnmD3PorC0hXuTNhM4ZyO+1JpCqkpTRnn2r4hy\nVr7LwCST3xasejh/F518S1xzWCT8k0KFzjugq8gNLdrhdrMgtOBlgvC2VWs6\npbw/\r\n=SGaz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"ff544ab9b4a0eb98cb1ae019965fee41277f354c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.9-renovate-major-socket-io-packages-ff544ab9b4a0eb98cb1ae019965fee41277f354c_1612112703241_0.7192579950331095","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.0-add-options-query-stream-40cb76ebb7b5da5e96752b94ccd215ce80c6f7e6":{"name":"@balena/jellyfish-client-sdk","version":"2.13.0-add-options-query-stream-40cb76ebb7b5da5e96752b94ccd215ce80c6f7e6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.0-add-options-query-stream-40cb76ebb7b5da5e96752b94ccd215ce80c6f7e6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"28cb37ec4041e1ea95d9a1cb0407af845d274fd4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.0-add-options-query-stream-40cb76ebb7b5da5e96752b94ccd215ce80c6f7e6.tgz","fileCount":18,"integrity":"sha512-AEYhapfvIfi0pXdVR1aUOHXqGY1dBoI/ITfLK2dMBMlnlFyXgI6z6OlEWSRR2j+arZouQkZgZUqXWzs8aCwekQ==","signatures":[{"sig":"MEYCIQD6U16CEM1Xr9HMUSP9pAnaz27Rgd/OZUgtRte4TMx/dgIhAPKsJHUqJ5ug/xmYhjuFQ7KvImrbbAGyRJB53Y4ViAEb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgF+S/CRA9TVsSAnZWagAAwsUP/iXun3tj9GaPTtUrHwNu\n9WfZK87KGuTiDtwfizmOhIvRHml8JwKRdH0XleLXaStfEa7j3rotS2uxaX2K\nFXR/za841Dj86o5i/B5xgzlgyX2wnvxoS/mOR0g4ZZffXw9PmOYJWYA1GLty\n/XxMpyEZ0ZE43dLzI4Oc4pzJMt8ZbLIpeQX8mf/rqcofwT6Tev97B8FPWo+A\nEerBCa3biLOJnwTYaWsPbPLBNRQxCMyBf3IbhbpZOObYVxqyGq6dX+FryHEa\nlFMv8PB4X9IPuBYHCS196gGca6Vzp5agK76mxOhyPXZmwCf/mIpc18eh1r5i\nwJb+s5l5jxlChh3udG1rgb4T737Pk4vyM57ju4BTGbYBxba+hSrxniT4zHVK\nMglRI6wu+wlIgBmvfKcbH+ss86shUyzKZXcDXuyjK7dbPEVLlSjehie/xUbg\neaQRhJymjP8MPR9ckvkT1tR/yFGkRMJjcUzx2/Jo/eeISKkm505ig2g30E7P\nDWIZzc0VF5KC8nSfEvYJwRUT6b3YmPsz9SXNvl/Pr0/jSP0cSzsSM0hd+ru3\n0r0ZNVa/gWnuMLFokADXniqiW3npJURifb+l89LLeRnrf7FZHSZp2fw67oGd\noLEIEG4NyRF1HfEpWih248ZgXxfhE52F3kYn5lvYpfqookQ6OdoV2vT5II/d\ngVPC\r\n=P++b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"40cb76ebb7b5da5e96752b94ccd215ce80c6f7e6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.6","sinon":"^9.2.4","eslint":"^7.18.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.4.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.0-add-options-query-stream-40cb76ebb7b5da5e96752b94ccd215ce80c6f7e6_1612178622859_0.013274174627028401","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.9-fix-link-query-option-1c9d84d151ab1f23dc8a6c32abc5ec028671df6e":{"name":"@balena/jellyfish-client-sdk","version":"2.12.9-fix-link-query-option-1c9d84d151ab1f23dc8a6c32abc5ec028671df6e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.9-fix-link-query-option-1c9d84d151ab1f23dc8a6c32abc5ec028671df6e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"519e5d01fa1187d843a452753e59d9c9a3f2dda6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.9-fix-link-query-option-1c9d84d151ab1f23dc8a6c32abc5ec028671df6e.tgz","fileCount":18,"integrity":"sha512-HgTz09rGQ3Y0wAEAO+r6tUSZTk0F+UzYB5XwLP9jRTgNbOW5FWRxb2SVdRyUHABlFkyRUbFP9oWUS5vPRvl4dg==","signatures":[{"sig":"MEUCIH9cMdoJY/XkvRxFMPDrW5oQDhc2fADJ0wagP9GLAVTcAiEAz2Ar0+xWOVd1qxCel8E/KpdkATDAq6E+Jqa7HCg8QIY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155701,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGK2DCRA9TVsSAnZWagAARL8QAI4GjlrHH7FVKBW5mT6Q\nsQ/57rkwH5BEU+bvA0/yOu/lxprW89vK5vmINXUBIhfh82ugzmfkzjlFwl50\no1QLmkRAg7LATMIVJ8GviZz6xOnZsL5cZIGiFAhmAYLvRsVeEvM0lP1HVykB\nfDVQwi6VDiDFb5mBLLYBOae/3RtKq+mOeacf4Sd4axR3qoewp6mPpzdzCt5c\ncL9w0FVOUfQBh8JU3KqRU8id/ohNFJiPJYIS8oAuH4Om2doHpIDRT8CEOlXH\nNNigWJ2Q5qWZcSjD/fc84p9QilFXOn/ibLRXhNbeelpo+Rxstk0aOkdGs8uR\noXXmtZhy08KlBSjzFKd3x0VhdPpEbVcqHSKgQ/hVYzoiIRjeBT5DicfW6Qbp\nDcup2if3FuLcTMorv6QPf8awTDwvlm2qdyqcvRdGOSiS+dQeur2HxcBOmSWd\n0hHrEFv4ngzUuSIQfUIVoOJHE5NVVK+IcB9z6tGLn+ZnTlVgDJJ0lZDpKt1P\nyvuMAIw8qS74wfkEKPYkHyKkJMKX/9Huy16hYXjgrq6MyOHM3AprvyWS9uNv\nR6iLMCi4mP9LxTwnAW8r+PvvO5E8v7oaU6VwrCNLkun8kc+GX7PMFcI6IQye\nLUyM4AZm03GpkW7xswKn4Tf+ATcYDUxxbGW/1bIxtsWZgL88MtdoqlGGpuol\n95iQ\r\n=77v4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"1c9d84d151ab1f23dc8a6c32abc5ec028671df6e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.9-fix-link-query-option-1c9d84d151ab1f23dc8a6c32abc5ec028671df6e_1612230019313_0.8522022221695955","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.9":{"name":"@balena/jellyfish-client-sdk","version":"2.12.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5f3cf3f964a10712fa51b7669968599cda305c33","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.9.tgz","fileCount":18,"integrity":"sha512-s4SR2JdNoQYd0PpSgM/EGAkoUIJFTyRy9gzkmaBDHnUvABMXnSWc8phzopo2k9APWwT5+xokyBHTcI3FN+Q3wA==","signatures":[{"sig":"MEYCIQDG3HthI2tYKUU56TNvF1htPP+c8gflmIthGomQji7f8AIhAM5kyis8JVvBWFfZW0VyzXFbyQ/3+bSCSkJ7SXbgRTyo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGK5BCRA9TVsSAnZWagAAJMAQAKF8AVj5BBwc9vPOy1xh\n4zaA4IOKGBnjF8uIQ87ULzfst6rIyDDQZF2LyzD0vTFGHniKPc5+ufu469PK\nKlgqr/XkSZEWQcogTfj0Xw50ZBrzcyIQzCP7jiA31F4TTCyrSmio7YzbhFLL\n+UPaQlAvkGwo2vtkzdXhkHej9L+p1SunuPV0yoV7Iz9leAdedtRSvDrz+a5F\nmO3pbaSuJ2o7X+DFl/DKAP9pg8YoeeJSo65nCozU0Takj1RxapDfdu/eBUVA\nUG/PIfG5vjLxPHJkDyZhV4EhzjeD/miEiXdDXawn53L8fGHHznu9ipzfgNHz\nZ4M9Bquuuka3PibFbMHglaQOqZXkB64xZvGvur3jgzoWNOyRQrwTcBUJm64w\nqD/nlpoqsUemK4gPBZoFBhCqvRQoLi+HgexoGY+gIYbgAItJ4B7SCyfZHMLG\nQVmInJzqQ8eYoCGVGMCUXwfAB+bnSyOXXde4KjDyVAYzsWgaJBECl0jDTJaz\nkMIfmvRV2zfmLllAqPeDvJXq88GLmaJZagfwhgIJZJ3T9Z4DXEwXcebH8+Pv\nK4hXUepeKJJr8RkNguHs1zu9t+gnoL82H4CuAYBbg+/cUYZVu9bgBuFMkrLj\nJYH6pWhjsIlJKYlzUp2e11pEgTGLTo0J5RAmgDYokO76mU1doPj77yrhipCQ\n+J43\r\n=MQXj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"75e40f9d91fd9a852e5f9902851b64b2717eda0e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.9_1612230208777_0.03944661308562836","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.10-renovate-major-socket-io-packages-fe5b80433e06ed67dd295f0f33732ed8c31e337e":{"name":"@balena/jellyfish-client-sdk","version":"2.12.10-renovate-major-socket-io-packages-fe5b80433e06ed67dd295f0f33732ed8c31e337e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.10-renovate-major-socket-io-packages-fe5b80433e06ed67dd295f0f33732ed8c31e337e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1c5e228f8f93d61ba9849fb49295f2172c11307f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.10-renovate-major-socket-io-packages-fe5b80433e06ed67dd295f0f33732ed8c31e337e.tgz","fileCount":18,"integrity":"sha512-xs5CZqWlMO3gko//Xq/YkPm+lET+Tal4QFSNISDnnzLhl7nPelZwckyW59Z8uSa+1osOsFhsNZLEk3JxHFjxKQ==","signatures":[{"sig":"MEYCIQCtOWkINjsvuj/N9sgTVPTXUhUP8TxKDqK7/g9JyG7JBwIhAO6E2+dMMk3Rq/F/Srvj686mG08VAL3Dp4+FgYk+6/0L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGK9jCRA9TVsSAnZWagAA6WwP/38d0nwskLPnilwaJ2rc\n2puuECOaNeJP+INdAyHjmExIK5725+QefpOmpS3uJSIVPkDU855X0kJOzTs/\ngEL0EKmlmUClqGy5nq4bBHcHDn5BChRiUkCy57sEdvOiCwDx2Q6XMAASsmWL\nj9WEnQK4wrAWiHaj3i2kU32lYkfGciJ5AOTycI6NFlNr6lO3LQrLlpCOuQ1b\nJ1fy0UKX5ZEpafTR2AJT4etDcmK3i381EHJHiQcFLRhWFdZtA3ye5nq9GAWR\npTWBnF3Hqjw3628kaIR6SzGVXPGaAR9JG2IWQQsLF8jNP89XxUofR70N0JyW\n0GTo6oFGaLyhiIp2N9ja7y6NWOWnVbHLNxMF/d0jDL0PziJHHx3CJvzH1syV\nNEXD7nu0Y4a+N5Q3jrib1TkzMeOdf69Qt3negTnedTm5GYuftYkOkYV95gBU\nQofIfpvSiie6Gd6/UUd6OwGOtyq0kdhnXqneJ6OCOAZLpxhkb6KN0JYu/g/u\ngEtSHdO+oJCXYpoEwvhS5Z3JBUUCTMzrbvNgfNa2axjy2Nf82KH0twK49i1T\nCQ/tkDgTMvytVhX39JT7yPUW3xMpYtJbrTxlTVne70zEcg6oGdvxNvix6DJh\nsy4RPc9E8DOLU3AvA8H+VCzO5TD9PY81yZHhYL1bi7XspTvIMSgAL+SstqSm\n3sch\r\n=i1a0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"fe5b80433e06ed67dd295f0f33732ed8c31e337e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.10-renovate-major-socket-io-packages-fe5b80433e06ed67dd295f0f33732ed8c31e337e_1612230499238_0.7129373731721642","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.10-whitesource-configure-d1d8be5f25b1905eebdbe3c4a48889e1d2075d8b":{"name":"@balena/jellyfish-client-sdk","version":"2.12.10-whitesource-configure-d1d8be5f25b1905eebdbe3c4a48889e1d2075d8b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.10-whitesource-configure-d1d8be5f25b1905eebdbe3c4a48889e1d2075d8b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0e0ffddcba01bce9bc27970f47e021f580c5a56d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.10-whitesource-configure-d1d8be5f25b1905eebdbe3c4a48889e1d2075d8b.tgz","fileCount":19,"integrity":"sha512-/22PhWp2EBnhJgPwuidbs0VTfM8VEbOgd+olYg1BKvrmYYmIbO3Y9S59N9E8Mo1wmK2aYP1b8F5ijK+zRKpjeg==","signatures":[{"sig":"MEUCIQDovLJASY4IWNJ+9SSYnqsnKQOiGTWaCuySySXYeW0RdwIgRBZ59aqSpwqPwPeC8sl8xs/DG8uk9kzDU0sLWXpvaFQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGLWPCRA9TVsSAnZWagAA2AQP+gNdc5LJy9wyogGbqqU6\nZ7uj23WZvg3iMgkgIbnYjLmnqz99rUJkWMdJQKUbqBRJTz5ZnJP/lisixG6U\nuOuQkMLhwnxXH3bFFsMdTRQg17/96NfJeLCG1qBuFxKeFMa7ehRIIyr0v1E3\n0uT5jPbw2I7MwuxMXC0e2VMq2t9zCSTRryFmvNMCtoQY41mw5/InT0zgbOcr\nT0mJ1H1/cfuFnUUB/lGhmEwrX0LIXYsKi+z+VrJIjhrFIRu3zOi86kT0Lc12\ngL7fDPi7hy+OevchAwyeeWgXs8nOupOXRakFjdFsUK9iC7A8OcXTiREwPEEL\nYZOYg6zmyd2e02vc0MMC9fuyZ9N5S8wsgtuk2s4btUtYItHXRy6DbsK8ne99\nhNM221yJ0Z4kEEus4xPR+n+ysqI+iKI1xZN6y9ButKR+rVKKBs4TxABn4LPK\nhx1d9je5HKb/DEYPc+Ly5/MbsdN0MUaoHC4E022mall2ZpVKImIRY56ToLS2\n1Di3/qsk/JnT0JCuCrE0TvkFjbaOexE8ZAeTfYj7b0T+dZ+Mg7JhGFOJgTdK\nUmS0K+VTM+v0mrmHecnGoopiZJ1ArgP5bqtKQwEV63gyJ50e8k3NHtmOW09j\nV/HjboAMDSKwy3C/gKbSwpjk+2/oSI4JP3qgaxOrnz3CPiyPOJGFhaEwXYfF\n5BoE\r\n=DYxP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"d1d8be5f25b1905eebdbe3c4a48889e1d2075d8b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.10-whitesource-configure-d1d8be5f25b1905eebdbe3c4a48889e1d2075d8b_1612232078655_0.39290788663000087","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.10":{"name":"@balena/jellyfish-client-sdk","version":"2.12.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dc8418d0669fd6c8c0346b8e3aba09760c112fc1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.10.tgz","fileCount":19,"integrity":"sha512-1u4URKpcCfN6/9TZrS9jk4rYaw+Ap0J7ke9BI3h3Ii1qFoo5DR/6BrL8aTaRu5wPrvddxjr+aQdbMA2MWI0wpA==","signatures":[{"sig":"MEQCIApGgMWUHFCbHqWPGkoDPNJPCUjbXAiRLotkXluy/hZvAiAyDROBuO3hSarTmG9g7tdxP9fYOtTbIkvoXUkazlylRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGLZQCRA9TVsSAnZWagAAEUEP/3+KQiA+oQxZHbBCuWLC\nTZBMFIcQpn4aiAqzOezIIoM+KAnp3+y9f471i355bXRQkmiYcw1PEUOcftxI\nS1ENws8iCT/kbfnUZv3asbOTSx6UvYo+rpdsWJzQz0Dx8ZmEx9GhdkayhzoP\nbvZpuGG2ERXaGQRbpguVL+jB+Rw0hEXHTXtVygC4/cEGt6xsUc1hv5ef8+/g\nHG0ixPXxIupjBXCmITHd+sBKOV3R/ZQJd8rY+0tZoqCL4+QEdAko+vlXzN/C\nbvZmlcim1itIWgYEqG62b2Do3m/kyzVHJePQoBwMcv1EPsdrM7F0AevH3SUn\nEgADkvhdsgY9ZEG3riT7n6DQ+/2fW1zPG6ZrYPln8wqhLW4Jz8xqru4Id9Wb\n/nstPBkkL1noNnpcsrN2q0+gH/5vFyltCdJEkpqMyYm7v41vqGCjuRCJuuq/\nUSHr4bcy9/YRiqChNNgMECqJw/1uekYhlCry1DH0MRqk3LdKVqwdyt90nglT\nva4stwYnrL/XF66/mQmMe4rthnFdjFkFgXS6ZSg2+MmCJwq1oqtUInmQm1dH\n6ixNHPYlBh3/MrcBz7dh2/JGofMAsAX6IBFWglmFe6lLDw7VPprjogzVxeTL\ns8W16pe23eRm6M/Uyrp9bNHk2/3CdV1etN0pfo4G9Gi7zhGyOEUzFHfkZYA/\no01C\r\n=HgyX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"60131dfcf086965063c2dcc0075ffc60d8fe5a81","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.10_1612232271987_0.1831752785789631","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.11-renovate-major-socket-io-packages-4064ba1baa96d4cc2e51b4ed96d5876dfa1c341e":{"name":"@balena/jellyfish-client-sdk","version":"2.12.11-renovate-major-socket-io-packages-4064ba1baa96d4cc2e51b4ed96d5876dfa1c341e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.11-renovate-major-socket-io-packages-4064ba1baa96d4cc2e51b4ed96d5876dfa1c341e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d74e89634f3f4aff574af5b9f101ff76983b11d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.11-renovate-major-socket-io-packages-4064ba1baa96d4cc2e51b4ed96d5876dfa1c341e.tgz","fileCount":19,"integrity":"sha512-QF1kLR8GTN+KGZ4P7t5nROca3wTctF2A77NKVvLQsgaFildZMzMfjiJ2P0KgKWNweIUMi6r6OtBiJLaDkLX7Fg==","signatures":[{"sig":"MEQCIAoOpcnOoArylIeQbSYy+oaQBFg0pDa049WF9M6ebF3MAiAV8Lb0B/4q3t2mbctyKzhEOfBC0JEJrpH8TrsIAeU9Og==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGLeKCRA9TVsSAnZWagAAgt8P/jyAHZ3g9vmkfq/BgFdU\nY22ctvu1u8V1fts5Lg4hwGQWLnSJ05TILX+b2K5bOMEoFCxFl+iQEICXoYig\n0+Ed79X393xY9pOc5vJabl8Dnmya4gbE1tctngK7hsSt3eFP1UHa/YpB2Bg/\nUi1MIjjUl/EFgu/NHn5u0FROGMDGtbBqGNQYjcebJl9/0OhG4WZPgxQKLWpJ\naPMRtjVFqazRGHXlv2Hj/DtWHFsUE90fkGZd9mI5Pi+jxizcR3flH74QB6Xu\nTMasI7w4MUCeDewPyrmVt5LGaqRCTpPfDa+dB3CQCa7iJOQi+ixKC6j+Jxab\nOZEWDYXugA/Q9V2bGLHxyHCbFZEtZtRqtyiuebGiIXqux1FV+omAciJzQlyI\n1Onx6GWm2TqD8rlNdDFmTAP/7Mz+6pY1PSom/DnfE2cwMp9D5299w3bNeAzB\nR3gXG1DeWLjGFL5cA7Nfg15g3tkW62fPNharEYnaioScfxgBIpItk+OxQeTa\nbfoSL6lF0gPm8ImRP58jmKJDa7BUfVSh1FmUsfXkH+7K+pyd7PrMl66QSMke\nJ8VOVAd4qGU3GO1QSSVc6N42j9FoB75GL9KMWy1cAsmA6GU0/0Rq36q6fQYv\n00RitRGpi6225yeiRgRAv+dNZxtHGWYJnaD6k766HE6FVgxUJI0W40lWUBjC\nTj6e\r\n=Ij1H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4064ba1baa96d4cc2e51b4ed96d5876dfa1c341e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.0","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.11-renovate-major-socket-io-packages-4064ba1baa96d4cc2e51b4ed96d5876dfa1c341e_1612232586352_0.2852851403918246","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.11-bump-axios-b2d79b09d800abfeab4a2f943c2a7a49f6b4dcfc":{"name":"@balena/jellyfish-client-sdk","version":"2.12.11-bump-axios-b2d79b09d800abfeab4a2f943c2a7a49f6b4dcfc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.11-bump-axios-b2d79b09d800abfeab4a2f943c2a7a49f6b4dcfc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4266f4378f26ba5b70e20ae209474c8f42d9a4c6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.11-bump-axios-b2d79b09d800abfeab4a2f943c2a7a49f6b4dcfc.tgz","fileCount":19,"integrity":"sha512-AjsCHofm8/xJVszTqWzFUBsu0Q1ym/LGv5uxjISjcUyJZOZqjxlXyF70AuNFKl96RVtofyM8MPy4TFg09CJZMw==","signatures":[{"sig":"MEYCIQDTH5JkYdkQ8LKGqKgReuoj3IG25vrYVONaftlOcr9qaAIhAITnQPX474/mLvSBDJbKaU/Y3KQWqGzCRTQmMah6cpR2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGiRqCRA9TVsSAnZWagAAK78P/03BcEDYbZeG/X3PUvwL\nj53jy1vAf6+giOF/klCERF6JdXO0Jki38gIFXh2/SxycrVYJ66mFqjg76wGS\nbZGCqyyxq4wyfOESLjcmtexTMBtvLTp9kQAMg6QO2B/PpS6sHCQq03K45rqm\nJXyodlTcCNqjO85dPaElOlJAqg3ZxA6RBau//i8fylyzKHcQMlAPzRyMmemL\nvoQI2bQuv8FRYc6x6wS+hkSeRs+pLgXzwQFpefIIiCtHb9xKBLH+uNv4RoGR\n5uIB0zU+lPK170MJGjW6S/XOSFCXXEedjFCYrJ5+hI2J5xRhuqxBwssYzZSG\ncNBnU1LfEmcpGtjeCXfSToYqe3f+1GmS5Gb4qXZMjlQ5cQMIYK7iJSYIg4W2\nepl2pPtACNRYiVPKOF4tr1hx41Tw7wvgECvCAdaZAW2+l2BAKyWC3rDzI8OQ\nSeq//A/z4nZZREqKEoJOn2+SR/HM5UQ0awzjZftlYKctMqHWg7ISKH3/yV5z\nkSmSJXyuTo2soUWPYj8s/9ROpx9clPoXUII5TzwJAseG7UVCwrF6HXrLGFXt\nt196euuP+WWoZ8+p4jYX1kFY+++WHKj3MTZHynivcsb4Vq4leb/1Apc6+6pu\nX3otuUnLXRK8e+vKTtDpXa+f35YRFdhD3H3KmoWNea9xogVLRlAqTG2A/juJ\n4IIz\r\n=d0Rj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b2d79b09d800abfeab4a2f943c2a7a49f6b4dcfc","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.11-bump-axios-b2d79b09d800abfeab4a2f943c2a7a49f6b4dcfc_1612325994094_0.9185290901883849","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.11":{"name":"@balena/jellyfish-client-sdk","version":"2.12.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e48a78303d2f8be1fde7a53e7e492a96a32e257b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.11.tgz","fileCount":19,"integrity":"sha512-W0JpqizQEWsxECl2FjGHunxG1nQq5Q3/nMhbvu6U/wM1etPKaxRDRsVkNbtyRaBcn28hPsefxrN1QHRahGaflQ==","signatures":[{"sig":"MEUCIQDi2zbFuZdG//xYaB6/GNGl4SkYymA/MqYuWeAsX/ZTmgIgFXt5LcpocPvNTfNEdLWnbdhlhaxo9CWN3azGHHF8Po4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGiXxCRA9TVsSAnZWagAAhLYP/iUytX6gh/AUKbYUVoJW\nXNEiZIKt5JHuFUmcJESl7Fo/cdWpdsXQwyDNkN1FEGVkz4W80xQ1Uo17FC8I\nGqmkuD7EDY82bYGkEbndmF/kbNRE+BXWXtq+E61RXHx8gUawlHBynFycWLXH\n3Y7scB7OofXizkrVR86n4nKPr3GCFz5wjiUkNHsTHJTCsU3tEqBKyqQ7ofLW\nC9jWwSht9FOx4KhkaOrZiBDejkQypColpXrmF1iaXPpzHonfwu/RfhAEeowr\ndRAtWm+ZYMSqtJepJoayACM5BXOu0qO4cmat6tG0DmeWDBDA/wNLewopBkWZ\nRUObWUUyEkgqZveZu1orEYxNaUhzW//bfOeAlJnWxk+uZ39ZJPEUz3IFx6Af\nUfap1tfAeUIPilm1ZeyoC8f+OV5mtMVNGajuz1I+XrBYuPAx9i77BGwR+JuH\n12JRzn5gAN7P3GzIrJcTzesOSvr0kFCffMSVP/J70uteDbUe8N0gqkoJAnB7\nLuotouwyTMZlv87UX8/fLjDDRSmZsERg6BG8cOElehOtOLuxiHmbn4oftrTq\n1jn7zxOw8f9mA3CC4vbBWOb/E98lWzovQ7SevJLNnYOGo0rqi7n5wfwei0Ap\n7gf4jWcVr+V7Gm0pz+l78Im4OuK98D3KewkUsB7bzkom1cq+o2FRWIc0fb7v\nS97o\r\n=LJAy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"d077f5bc68d0c642f74b4e8940ed52a04bfff9a5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.11_1612326385247_0.05468180006136225","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.12-renovate-major-socket-io-packages-8b75945045ea5a063f493747a958965eea4170da":{"name":"@balena/jellyfish-client-sdk","version":"2.12.12-renovate-major-socket-io-packages-8b75945045ea5a063f493747a958965eea4170da","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.12-renovate-major-socket-io-packages-8b75945045ea5a063f493747a958965eea4170da","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"26cb338fa9e766a5b0ac6ba3d76d17790ced5bc5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.12-renovate-major-socket-io-packages-8b75945045ea5a063f493747a958965eea4170da.tgz","fileCount":19,"integrity":"sha512-+mHn4koSez9MGIV2ycAQ1U+aqqbiECA8LYNmWkx4hN7D1W7GloMqQlAqbcmQGdb6WiC9zpHZI0xhonU0Jgq/vg==","signatures":[{"sig":"MEUCIQCuVDliFcXc81/nVUQQGZciDfQtsrsDzMA3MjPTPk4S4wIgMgjBjGpXj4s5TNDAjnqbTRFQ1ZgLcLcAYZbtV/lNTN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGiaoCRA9TVsSAnZWagAAwxEQAJ7/U+BZ4va3FzB5Oj4l\nK+NfIY/JaBTYOdbX4rEqwC6uk/02GF5cFDfVa13yGUm4+i4/HffT5yMn0FLA\n3E9/hi8RIGdznvhGk2Tvm4N0oOzxsKpJDXG4ICaFqc6yl4AmQ+MfhsrcCEZ8\n7Lp9cEEUihO8Uz+AWobirV/iUk8ACtASIq2Kwrd9kdxt8vq55EjwuuseO8wm\nxU86jxmt6qIQN7wq99GVK7Bs0Sn09TGrkJl+hc/o0KbcgXACc0kIDDM9LJ+w\nBIixthGbIb/aodPwU8cwpn4SbogwAuiDeqCfaAZqKUvYC163vpUss3CB9rMY\nM4upeLb2XTtSc24PQlmRgwUBXYUQyHeTfJBJ73dXWRdGspK+oYCk3R7I2T2y\nyjSlUrYoRvr+cV2NPvH5WwsgxLfz+rhTPzeacTzJdoNKMq4lfKCfarHaYwDT\n4zGmFO1ZE6AA3+yvP9RtUIlGUAo5NdWdBRywJOjTUjg2wcsQJLj8UIsLbnTi\nabLjs10TN/4b21CU3ViIPD0hr3q8dnYcdED/VkiOZG6T+236gV69fxnJ0nm6\nPZGH5dGpGoIX4qivBEWkVU8AiZoRdEiaPFDbrmCtpQb2Oy+Y2JAes5G7/X0C\ngMv/o55B3htKVCygB5/noSVpLeqXPUwE4R8LGfkxHihGLCQdw9o8dqUUKMee\nS09X\r\n=5qcV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"8b75945045ea5a063f493747a958965eea4170da","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.12-renovate-major-socket-io-packages-8b75945045ea5a063f493747a958965eea4170da_1612326568477_0.4719393148321853","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.12.12-socket-errors-a889f3c29fb92768a1978613c8d3ed52e62c7cfa":{"name":"@balena/jellyfish-client-sdk","version":"2.12.12-socket-errors-a889f3c29fb92768a1978613c8d3ed52e62c7cfa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.12.12-socket-errors-a889f3c29fb92768a1978613c8d3ed52e62c7cfa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c495467e9ca6134ee273798105cf8a7f91736dbb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.12.12-socket-errors-a889f3c29fb92768a1978613c8d3ed52e62c7cfa.tgz","fileCount":19,"integrity":"sha512-e65VyBDO8lvKBEj3EKQOtb9nOClf4uItwxXUM+9aSQ/oiLrsK/gbtquYshSle1Y8LHWH7UxtUINN+8CoDk5j8A==","signatures":[{"sig":"MEUCIQDzj79AM/5PRIIrqGSKxDrz7S/dm7SYUsngltBhGnP2gQIgRHD5lFzFzqQxie3s6Y+0ek2JaeLje1RFox9QH+fj9Mc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGmusCRA9TVsSAnZWagAA7RYP/200iO/3qGxuPDtnu/la\nQ40qDanDXvebVAHBNxqJeEigZ4WF/gOiKsZuKOI2VsiG9w4mw2jhf8trtkGF\nMEvlawrdLHczVn/Hm1+FNflEnwy+GyXcyIMsDaUstG7Miy9WM+N7AVFcDeWw\nxXMuOfA41IsXCm9wAEu+8AkCWK2sgDay/VvvzVf/LgoQvPoZlSW4KlPBBlFN\nRjXCcgBhgT0iq9XhQw7zndPq3CRLGaxh+lumbmD7RnZDOY7wii4kNGsf5MfM\nBptEKmYgMVtiBCOS9ttdNofCxaPwYQ0ykHnQT1M68tUIAZEX1JV3PyMtyrcM\n0GGF2T5RSxzslxWy6y8h8fay0yWOLQJBA9v0a4CeBuUMQz8Vlv/SzOhPjD33\nBNcBHrtVl3VQi0BuyuNtaGkuhXhJCzc3RH7B+QGsz0/KQFdIC+yNzAMKErXd\nTlilKfkj+NohTcqykvNoUHk3O8UD54oOVc/equVV2TrijTXJsNk37PJeI8M0\nZq/P3ybkvzvCFvoiErSvHKOJptU9bZ8llq0Vi0D/Ng7RQEHiWm5KkoEquH3y\nBtfX4v3gZeh97XALNgTSvXnJjp6vmx6B2oqJJC1lK3HD2U5bzZkxjDUTW0R4\nvbq1akIH1pVLWSvK2IT+JLT5OLjn5iqfXVP1t6rIGfMgX0zqXRwCqn3oIX17\nwRPB\r\n=IGN+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a889f3c29fb92768a1978613c8d3ed52e62c7cfa","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.12.12-socket-errors-a889f3c29fb92768a1978613c8d3ed52e62c7cfa_1612344236413_0.2574683020827253","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.0-add-options-query-stream-7312cb242ca93793a315e17dba676e9d29593581":{"name":"@balena/jellyfish-client-sdk","version":"2.13.0-add-options-query-stream-7312cb242ca93793a315e17dba676e9d29593581","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.0-add-options-query-stream-7312cb242ca93793a315e17dba676e9d29593581","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0ab1d809c2ed844ff9afa57d09ad81f78f994e05","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.0-add-options-query-stream-7312cb242ca93793a315e17dba676e9d29593581.tgz","fileCount":19,"integrity":"sha512-LHxbmAPFsp6NNVc56JgNgHdasPF6mxgIE9H954ce9yzNEAEyYKeXkDk78Qzi3SBXMYS4/oFjpxTh068dn2jUAQ==","signatures":[{"sig":"MEUCIQCE9oitBcue5P06XJISvws1sBicqrxLIMlMyN/RQNwJvQIgTmJnn6SxWYDGV/wvz6k+JuaIkSnQdOzMpZ6aqtzf214=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG5PFCRA9TVsSAnZWagAAdUEP+gPiomT8hVzqGHpTcSzt\nHW+i471jGScGQLF9/43yNYRFvxG9CW0x3RaJwFtbgQyZN9bY2MDLSoXOziig\nmyuxOgLxx51mtr7SO/lONvU0xfwnGRjYh3KlONa1mO1H6FQ1yGkfS8nd3adt\ncnmSC/tkvjVcn+gkTPywLL4UeKqsdBltuTGtVyz9hMCfSZQR31ld1N05gkQd\nRZ7WM1GGAHJ+c9mkQernAwJkLY5PiVyCY84cTFn3m8ve6LDcDcLP3aHNoVyp\nTZ8wi70adel9lKLs1+d4DOF4ve5rorDGIv3kizCy+x7/7JAJK0IrqEy5wfvn\nohFi1h2hphRA/he10fPNi94VGIH1K29EK7DQLraZiZAZ6F6IZAhVKGrvoWyy\neAGz8XPeJtFyf3VIbAOFTjfl5E+mhoVoue37HRjnhVhsIN4yn243cOHEMmk0\nZtMDnj078J5jn1nQA4YhzD2rG2ApHHLBZT8OmaxB5mxGzspe+GYhkFflPQKA\nLdclelni+TN9CLXAvOXY1fkQ1n9lj2ukOwUDTci08VbUVwVgqwlrvX9z8YtQ\nOCq2Adc9MHKIXtS+4IFV2F3nHMM5U7pHjxSjP5rYGat48Kbiw92IZX6SiOiq\nGNN0eovw2jJv9hw8Boj29WXeuRD3QiMSxP6uEMlv/J+dXcDYirCeMkTNSwzT\nzOmY\r\n=gfdY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"7312cb242ca93793a315e17dba676e9d29593581","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.0-add-options-query-stream-7312cb242ca93793a315e17dba676e9d29593581_1612420037317_0.6119344398735389","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.0":{"name":"@balena/jellyfish-client-sdk","version":"2.13.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7b0ea573cc2b6bc5f731a000a66e889a36452e11","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.0.tgz","fileCount":19,"integrity":"sha512-FFZPIZg8FxgTIJjxUGIhqhty2g3IRvwpLVNWXuPKwPJCuPWWeUcJt7QidIWIGTpGpf45e1DKJ+lNe3PTlhp0mQ==","signatures":[{"sig":"MEUCIQDUWBxWt6W6k4Rm4cz4ro/LvLJX2XWsq18X7VGv30JlEgIgI4Fx0RFZe4h6FEywicNxedqS5mRK7RgBaNKoENbtFwI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG5SHCRA9TVsSAnZWagAAvvsP/0QmAVxcGIGm5HolkNkE\nNm48gHtR2faXKtsjUFi5lfKRiSyIqLPZyeuIbpbACKiV/A66FleG/TDoQSID\nOYo+GmBBIjAnUc1c0DNnKWl1kx/GrniY83/tIA4VUCbbSI6vpFLFwpwTQd+P\n6gGmXDjbCiXAFJ99WuRnJ8fLlSuDlirhNFmnnqBPhBrKkQZboV6rct+iyS5N\nd/IDjmlsYGLYpezvWL54TfLRWQ37aPqjPSCBTc4t7sqrD9FWNfljsgLbnemn\nFV7lasmqSkVTOemS+qqLsc0Idx1Yxi9Ena4Jp9UaBEXp05allcJrV6lOFlg7\nhECUs/R5Z5/ZEaZSH+0PCCvaEr/Iyxp9Znn3a0z1kIN99HmDrn06Jt5xpFXB\nhGVbGLvpTNhsVvImO7ipGjiUvAzfIFFPfcJiSPkq9ljG5nRviqnTtb+ELlKk\nGVO7JVDhOPBko6XqdiaICtZlhmEYg0FYW5csqrDhjjnPdT/2GvNBZxeni507\nNw5YnqPy32GivvOMPowcMwAII3njDGHxTcNbS08fU/EiHQDb2R29hIBL7X0e\nUxauidJj2CsBk7YaWuFi+TOVrHz4clJABCRH9qilbcgtygvkXAlMvTau97vq\nNU1f9fQIFyaPrDdteew7CWW/ra/DCmTOV4IpIS7nc6oPLRN+5BkI3daXGGd0\noqG8\r\n=uDoG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"e1b227ec650db6072827a524d6c52662c3b2296f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.0_1612420230969_0.039080628746812174","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.1-renovate-major-socket-io-packages-e04ca0ca61cf782137606264bda7921bfc7febb5":{"name":"@balena/jellyfish-client-sdk","version":"2.13.1-renovate-major-socket-io-packages-e04ca0ca61cf782137606264bda7921bfc7febb5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.1-renovate-major-socket-io-packages-e04ca0ca61cf782137606264bda7921bfc7febb5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9fe284b2e5dfcb99b66bdf4dc7077b6efcabf5fa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.1-renovate-major-socket-io-packages-e04ca0ca61cf782137606264bda7921bfc7febb5.tgz","fileCount":19,"integrity":"sha512-9jqFwKFKIV2HQFSGBJ/md8LVRzv/HYasmTO+nHIzXK4HI6TWNFQrKTdh5y0Qfbf5AYOvS6b1isVkH94e8C/N6g==","signatures":[{"sig":"MEUCIQDeSl+Tt4IUZ89w26YBJccjiNYbv0kTC49541GZWVXabAIgcwlToHOkZwYDeXl7cQSlcnkI5gPqWXUNzsQ6Y/Z/wEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG6QOCRA9TVsSAnZWagAAgvMP/17fRspbvrry+3NnxqtL\n7XVZ1EcfVmvN8AhYzFaFMM6K0Hu+hFOh4nhxSjSMoXDJYmubqzivntm6u1SF\n8sZFJwyXgt33hz0rOOpA9o1fu9NYhMYgCGc9BDazNZql39m0UzoKXyLkHKv7\nP5vGJfB+XnVY3Yp5Rq83s49ZqfDA4LS1L3eBaRbZGIfu8GKCacozBTZlQZhP\nX3NoGO4EYfFC+YkWGrNfDhPkZ7rgwFkdATYqFkorGFvOjcWE2YwcEet6FVAO\nn4P0RnqOtcMLplM4CtJ/MInE4OvKrDDzG1zPcih/BhSOqvy99tdnSDIw/wEI\nFuT0lKVJ0bzYArg8991ePtEv6lh+nbWTz25Q0QJMKpQAHyntyoLlJe5AVeCY\nXMHY+L05uSBkMRzIAnYBdzXx9yPZzq/Onb16BHi7M+YlK0CpcrKOOfk06qxI\nCDWpWqQc4VE6XWXWUNp6CM5H/lBs+KV49QPtELqjnZ9/2mqv4ct/CnrREgZB\n3O9fquCqg/bZQrYNGUETN198139U+Hk+luxyiFqkxjdoVSm9fkNk/wWMwN9r\n9y5L0UGJV4fHiJpn5vlg1YQOkhmTAXIAE/IbKD0dWKqbHnM9CxRo1jblKU0D\n21ps1WCCxn9UauLvFhwn7OMSxI0HXZEKde7AJc00IUuyeQiKdZJeterytEFP\nd8/k\r\n=EeVI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"e04ca0ca61cf782137606264bda7921bfc7febb5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.1-renovate-major-socket-io-packages-e04ca0ca61cf782137606264bda7921bfc7febb5_1612424206156_0.7765319933224635","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.1-renovate-npm-version-82159e162ae24faa858ff5551c77cd6ee7a81cd0":{"name":"@balena/jellyfish-client-sdk","version":"2.13.1-renovate-npm-version-82159e162ae24faa858ff5551c77cd6ee7a81cd0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.1-renovate-npm-version-82159e162ae24faa858ff5551c77cd6ee7a81cd0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0b78282ea00717e11a0d9818cd9ef1f987a71a9b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.1-renovate-npm-version-82159e162ae24faa858ff5551c77cd6ee7a81cd0.tgz","fileCount":19,"integrity":"sha512-Qk8vRU6cM5f1yu3HwxYkci8h248Yza7FMPrUC9St3Lehn3TsjbxWZ1zGAyNBNJ5eH74K70IAyJAoOlqjRWKncg==","signatures":[{"sig":"MEYCIQDEiivTMXhHR7j5m5QkvecWULWjRrox/nCh7J1NwqV6bgIhAMbxsY2uHM6mqMhm2c9+mqSFX/wTkRHrO7ePQ1VLEL98","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHNrvCRA9TVsSAnZWagAA31QP/3FmS5m5ROI7X0D7jSeM\nSfq/Ii7xVA2ipk/RlrPx/w4OXwgr3djLMCn10d2K0C+OrOIlP47+4CqkceAX\noQODwnAfFjg8QNoYIZb/Vw1uIenfqOJCRwp8q1mdt+P3A3QYfD/nJPe23icn\npNh356xVIkxOJSmu03lX6dOa7yGvErJmMRGtmITFT5acqjdHZ3KcyFiO3rJt\nuOmu/mnPxe8zSUmPmDESGnFmj85PZHvop4qbG1BWJinfq1X94a+ykIyuSHPg\nqe3Z+RbTYJl3OCxig6RWBDMLPyn1w3sKbq9QOvM+qs5+lyKt6bpaWAr9c/Zg\nsUyEF+MmjLXbxzkKouGO+BPmRYRkCu1QBiIyCtURbUmUCeeJKWgAkra6iea7\nOrBzh3Ix5NVrglWSlkjLn+J3nhHWGAlpnMwk1bJTn7QPu9Lu3HemHXvHTpIY\nfGglsLZC7k5p7m3VtvNgUCkKr6eWaQqxtSg1XYLsj9oe/RuKzvcYhJXNhIol\n1aiAS1nMDieLS5ywHjG69WFMc2goPxP+64L9UH52Z2Wh6r+ZUyrx6kzSK87V\nHD7Q/kyhcJAlufP7PXUCZbz2ibp7qNk702xy7c98jne/vy/omwpMX5Y/ivJ1\njDD0UeoljOaT6LxGNfoDT7Z25vcbCZKolZw0oDtFuVvBdn811E+dTztwGyum\nZCpW\r\n=fGPk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"82159e162ae24faa858ff5551c77cd6ee7a81cd0","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.1-renovate-npm-version-82159e162ae24faa858ff5551c77cd6ee7a81cd0_1612503791103_0.7315673211264613","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.1":{"name":"@balena/jellyfish-client-sdk","version":"2.13.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"04165a605c7e5f79fe5a36550b2fae669a031872","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.1.tgz","fileCount":19,"integrity":"sha512-hulZs5Kt6Na94Vccc0bSz3AIFr8Mdh5mJ4JTCsoB2p4cxeBszpgGezT6AP2KNTD9NV/8Tbdq4mGos70EtZL4xA==","signatures":[{"sig":"MEUCIHD4D2RETAC3GPVgnO58Hq3iF/zvMTIVJ4FeNOGxXPZrAiEA7FdnL3dL9nqtuuV45jiGa/ABmFvychVZST2icIOSAiU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHNvACRA9TVsSAnZWagAAFM0P/3nEP/nSJ+mptQp1dH2W\nkFuhp0TCN9NIgM4eFkhCNR3I4vlXZk9aEp1GBufCoBPhSilMUqurmgQHQ9gm\nW8fBWEFJhPyN/tq9O6HhDUbd4jtWutZ3F80H9KSGw8CPAwduCZuFVKdzaypn\n/kAGfCFxsRz64tAFx+cIK3UOhjskM34vWfzKatC+USHFJ7SkTSgv2l6TrBNC\noVYPMX5BT/E3nVFARFdCbzqScwyViJAAoQsUD/rH5YBnxNP7HyGiLwlgIXcy\nGhPiXZb65iSD4BaBcoaVTTreGfo3UU81VBLiaY+LzW/EhZxEKN4/uI8h+X/q\nvWftUmd2QVTLCcJ4oYOA7Xg/dKqqGjO3F7nAc0vQr3M20HQYAk6VfVXNQHQF\nJ3AwewV4mQqSErSq1s/UzxTfreCtNWyBLiUTFowMhvxd1Do5If6EOt+rcxIe\nrQVLreNJAFM2Ifl29trv670JV5R4xExP3pcfuvWMPVVK5XwLVSXKO8mlJ2/5\nZVNdB191/CodcsLVbiQDD9h6/8v6zuXmrWNomRPOQ7Gql3q0eYUrq+Xkyig+\nMY+nk1ict8ufH/BFxdbje5OzTgnB4CtfSI4kHeZ7ifjr7ryywbug/e+WAWIk\nMhxqh9N5ojipgOhze32E8EVr18XHZVhDC2Rl+pubcECJ0RKHzXaRy4GzdChD\n4SYo\r\n=X4Xx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"c1b25781fe65a3fab9103a8649b9cb093724cfd2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.1_1612504000142_0.1504758801001045","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.2-renovate-major-socket-io-packages-d380cef4ec1873d3dd9ddf0c0aac33f82e48f838":{"name":"@balena/jellyfish-client-sdk","version":"2.13.2-renovate-major-socket-io-packages-d380cef4ec1873d3dd9ddf0c0aac33f82e48f838","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.2-renovate-major-socket-io-packages-d380cef4ec1873d3dd9ddf0c0aac33f82e48f838","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"653d618d64bb318838c1e3a42aa1b96b8b98dae0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.2-renovate-major-socket-io-packages-d380cef4ec1873d3dd9ddf0c0aac33f82e48f838.tgz","fileCount":19,"integrity":"sha512-i4aSOS+4HYCoVmt5eF1gbbJbB0pEvvNuhmYYp+rG7aE+IGmeDWYqxFGQWeLPK2sQFvsz+jyMZg3G85KEoOBW+A==","signatures":[{"sig":"MEUCIQC+4t0f+hsQ5EWCbtyfEaK5pWZyTdJSXkVwfnFxsruCEQIgCEr4iracakkpgc1EYVqcV8BqKaR2IZLle27S1Ki6Yec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHN2/CRA9TVsSAnZWagAAZRIP/0D3nN1zo7O4FoCuVkzo\nv5kp/a73MXpGFe3xlH0AbD8eKlK6MilJp+d+xbXndwSU6XWxX/02Jf1cxzJm\nf2tUJXcXDI6wDi5cexJm2AYqq0yXSR/7f2KdmYmDu3sQYL214gVVGn0g0f5M\nYaA250rxXa1NgeOuDDMnklK/M0liJVM6IEwwcp5lWAyI90NSiXVlWktm9k3y\nPUwJBkGmEwHjRGZu2hpaN6oqqRH0AF8XjKqYHZigsPQLhxfGmdMNNIwLOsur\nrkVeB2o9aHftqFaup90gx7XS/tMLye5UlwuV0F3Mjz4d/5sGbKZw/IvWfy+d\nqw+sRjU7dbyRtK7MGm4Ra0BAHIvVPS+aFSxUf/qcmTTMO6kxVVToNR0QF1MU\nXLPvwp2aQDEx/OXRWDnmo33vht9p5MxUyokpWdQPygL7CrIDbMBKif3x/hVD\nYn2cnVMPBJmWNCLcGmSz3Z7+NORHQDxYSFG4DuLhpae6nsRUi3Lh5oRf0WfW\n7QAShsyMEcRLWXsg8Ig2Vdm3x74gjzzs0dt9U5mj18pps3Fe9BvVjTiEChL1\nlH6CQNRHsGadx1Exhqz25iZLzkRsBoc5RFlunCwgVlWJ8D2ftGP/ih0tb/sq\nT2ZC8RyljzReCBM5uUMYN7Lc2YZcLVtoqujSQ0fYXvHZpEl6ogJYp+YSBlz+\nZnx9\r\n=p+ZW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"d380cef4ec1873d3dd9ddf0c0aac33f82e48f838","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.2-renovate-major-socket-io-packages-d380cef4ec1873d3dd9ddf0c0aac33f82e48f838_1612504511291_0.7326126368619215","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.2-use-shared-renovate-config-ee152db8fa4e189d682212c7c824624d0365d4d2":{"name":"@balena/jellyfish-client-sdk","version":"2.13.2-use-shared-renovate-config-ee152db8fa4e189d682212c7c824624d0365d4d2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.2-use-shared-renovate-config-ee152db8fa4e189d682212c7c824624d0365d4d2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bd03d112af0066ea1fe57f3fe64813ac0d2fb99a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.2-use-shared-renovate-config-ee152db8fa4e189d682212c7c824624d0365d4d2.tgz","fileCount":19,"integrity":"sha512-c+kKzS8iYLj0X4tNS4C+bhHGRGigOl/1CIrBr91pOYenHZGm3HlGfm1kapj+O4OKOtKYF0KCdghh71ez4KHvNA==","signatures":[{"sig":"MEYCIQClLl+z9pCu1kAm3JM2yLjY4d/7rrrgEanfCayar/lxswIhAN5g2oNc37qMS5I4VDJXeq5R8lgiDc4D0CngqqkWyOYY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHoeuCRA9TVsSAnZWagAAfHEP/iO9axwIdVQT/SbVNUCQ\njUhr7XQtd1rj+BMLKi9aivcweDCAlhsokt2Wvy+9Sgeq9U4cMwcn4h2Z0Ord\niGoTtsBuXOZREblCXjwDB6sabWNzhO2yI+mpNoX8SBHbv3H8RyFpGCf0lPfJ\nMt1wGwu5zhP9kPveM/RX/iXFYbGK4mR/Bpq/qyWqgaMElDLflQ5JwPPqe8Sc\nctgsx9FhRKP5Ua5Uvt+6w8uYGtrg8Mbjwogro62uk62oY+J7Dk1qapqSWNpZ\n+W2/eNEYBF29Omnz/zvXgaW39tGkHs/BQgQH41ba6zagvq7f6mHGMZhJneMo\nI8FFxtesgLgRx3eONetqFMspR23gs58uWP/MmMTKkAeBfvjbJfhVxff/WdCR\nREqyq/YcIUx13M6zvEZ3UKo+CtvCd4QMZm4Jv3MGh9qqB3rHtBb5SGp+iogu\ntLwgmzlsCcbYQJSpWZNCc06Q3cIp5M5R7QsFQ2548N+HXJvNsxxuqgGYmjOZ\nHCf8xo9drEzWKsARzxW6ikoCzdKknQAFBlJ5IMnpb6MCDh2POjlQQCuUnQEJ\n5cY1VptND4YVsFMRv7VnPeoAjmm8ciBYHEOTA65GKGZRFO64MJzMAjZfEy4k\nPFJsi7vkViGaVSdytuxZKa4HYSCU/kElbwVka0r3BbMoTMan8hOA/cKD9B4a\nvKDs\r\n=3yyE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"ee152db8fa4e189d682212c7c824624d0365d4d2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.2-use-shared-renovate-config-ee152db8fa4e189d682212c7c824624d0365d4d2_1612613550098_0.8797323676171849","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.2":{"name":"@balena/jellyfish-client-sdk","version":"2.13.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"40a0c97d13bf2e654c3e4853f3e4d5c122efa65b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.2.tgz","fileCount":19,"integrity":"sha512-owKiEq7rY/mlxK+6HyR/6mlJNN0x4wNCaQp8d86Vos6DCwCPd8u/NTZ9oRlST04e9k+2DIivJCF0KeFTx8Q+3w==","signatures":[{"sig":"MEQCIFj6YRWYZHoX2q3U6pPoxIwNQoQl0lhFt+cJgeVcfAqeAiB4ww2AYyt8v7vUGIBNMooSY+WewXNsbXzelWtABqBsUw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHohVCRA9TVsSAnZWagAACy0QAIwXIy+eVMMRHmtPPdas\nsg+XAkayl4txREyrqOAyfuZryVVPuRn+U9AC0QGk73mNDVB6PWfQszzdoWm5\nmRuBWepeQQc4Otv8wMutCwO7opczen5oQXCEPtKoOa8WNX3BK7oKeWiA9s67\ndt8XjarO0uPS1y4h9o8lYjVpMXcd2GrdxbbUIhwgKJ82TDsdsNzHj3aQFEED\nNLV8dCWnSSzaEAC0t83xYpjzqOCnrl0szmqh5qdFyaZPcseS25g6QyFQw5UW\nZW2ZIhQHWNtrTHr8bLR/j3xDUzZHYZdz1J7zyzJYvvQZO9KSq+4dz78kzobF\nrfV+p803c6jZF20bzd5UimRfpioaYKk6Hz0AxXIGaXJLJLxSq+/udgfdmw8f\n78lv9egiB6SWlExz23/sVk+bmphYUj++TuZtJftxqRgOEcY7UKevv578Zmvd\nE91YUUrGruSivVW6Pfd58CrDG1oloe3+8U7tuhvQgL/efEQTbbNUjYaAKujc\n5ke/x3pqlPqbl7WdtXHAWHPAnhsV3dahdvT1Bl5OMQZXJtr2o9mxy6H6T/SO\nU5lfClpYBzvxpW6xcqcxpS50kTFJgF27I+QQ5BWCcO7WzQsT2M0K+vV0oHPd\n7/3EkBnPfHUNmN3TOTbr96oaJKGLKvWdobB5ji6yI3FfgNzhVC2tcfIPmhxh\nxLAD\r\n=MqvT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"b4faa20d51cf4aa1cdf3c4fec21304ca29673bc4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.2_1612613716923_0.4297687377948567","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.3-renovate-major-socket-io-packages-c1e22afc5a0c88220dfb13269b379ef1587d9dbb":{"name":"@balena/jellyfish-client-sdk","version":"2.13.3-renovate-major-socket-io-packages-c1e22afc5a0c88220dfb13269b379ef1587d9dbb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.3-renovate-major-socket-io-packages-c1e22afc5a0c88220dfb13269b379ef1587d9dbb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4b904f88e8611ba5641a759cf58a2864a7e8877a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.3-renovate-major-socket-io-packages-c1e22afc5a0c88220dfb13269b379ef1587d9dbb.tgz","fileCount":19,"integrity":"sha512-5UBN/Mz4nh6rZvDJqeQxNUUwG/0Kjd1gsyVSHDiQKII8/1VGbUPFUKMkmP/17EBIs1XT7vjZoH7+xq9rJUI5aA==","signatures":[{"sig":"MEUCIQCvV9jdV3WPcQw8c3h86uLzHjrgskqgtaM6wFV9OVbrjQIgCtanGuaaCvpERASfWTniKZ/sn340M1YX+C6kBl7Bu9k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHokPCRA9TVsSAnZWagAANloP/Rx9CwKMWwTton0CqgfL\nHMRWAyOS2VRJvb9+0R/FP0Mk7Dn0GoTHGHqI6JB9IxpmWiBm/Z1JIFCmJM7t\nZq6U+1lNKbacR1iIFocROvjQ8HWTQMRC35U6cItltV2PTV8e0Mb5jCm/arUy\nHigWscUW8wq7+kissZ3pXbF9CMjxcbC6U0QILEO8Kr1Tr3HWQmlXTo+tHGM6\ntzklacDu15C4v1pMCR/UqYkMqHj3ovDXROLoRmNg+QShqVCIJRJv/SMuQVvr\n6LieT0NZu9IwjvUBW7i7Z+PTt23IZrmilEgI8Qu7fgX9w8PQ20WaVW86p0qb\nc/3lE/EIdw0Ac+1uRXLoCb+cTeuhIDxG4h00iowo9TLnxKeqDlkl+fZEePHJ\ntN5ySe+UbeiIuY1hDIQDeFy1wVww5M8arnGb0L/InW+aJd9vuum9AQm67A7X\n93Idm1EOtVpAKu8aztrk9/uhPwVSBgtgXTJ9rhNRy4XwOjwbzcDtfjbm23sk\nxS1kC0yB5RXGkpB2GDNuDdimvWLNwkNGiAfhJjLVIUfhDrsy87ITfA3lYICx\nRj0zPdqn9LdUVozSHV9iyN0dcjMCIqzfjw1ZL8mIqe4mv8wpxjuTtebkVFvm\nWdSMTJw5ZRyux4DG7L8yKJWe8jQEniISpL7rat/y5wSxvNni5+QOx5HCHkK6\nS5Rx\r\n=JVC8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c1e22afc5a0c88220dfb13269b379ef1587d9dbb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.3-renovate-major-socket-io-packages-c1e22afc5a0c88220dfb13269b379ef1587d9dbb_1612613903137_0.21059801847529047","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.3-renovate-non-major-f964ef8f23647467ef658b0ad440458697968a95":{"name":"@balena/jellyfish-client-sdk","version":"2.13.3-renovate-non-major-f964ef8f23647467ef658b0ad440458697968a95","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.3-renovate-non-major-f964ef8f23647467ef658b0ad440458697968a95","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8f7e0fb9369e2a57317203390c6dcb37a14abddc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.3-renovate-non-major-f964ef8f23647467ef658b0ad440458697968a95.tgz","fileCount":19,"integrity":"sha512-ckmhmyQdSCbPlrEyIK0yenqLH8ftsIUQiaN2pjnu54zk8r7/4QXTPcO2LxKTHvaMjASVRt00jLXKiO5d5slWmA==","signatures":[{"sig":"MEYCIQDSqnpCJ+3JOvlO1S7rVIit01MrGcDWn/dWH766roixYQIhANwJoLQCIlf15XCpWJOzTH0oxrRJKqghbJGltDqmv7c0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgH9AWCRA9TVsSAnZWagAAimIP/2a85SQsLllxdv8/pDji\nVNCUgsEu3LdbrDJUqxiyB7VQHnYoldAojtDzGzC/veRdfvwiz2k+PacHgrD/\nn2z9KZ8FaIMBADXdfTAgPgwrphcJOWrQfowtIlb/iVcKrjB/HNknQn7BBbcH\nXkPupSEiD4anz2pwO2SMdRMChfXDGk/R5FS7+kT7rpea1VXR2uFDF/8VesL5\ngKCSY94kQIr8tGxgEIoshEzk2pYcn52cv+V+J4g+mMJNyNNuLRUKQIBNkhIg\nOEZM1aeopghXKmoEzX3kpILKPdBxligVfj2RbqwIJ0jdIehwnSCbOgDx9oWP\nxm0NEWUTf8ErXzQnlv/rucRdYd5QJdtEMeeELze+LAYQaMru4d8J13/pLW+B\nZcGFbn9Jhpcwe8fh/5L+ieT5En++jxYM/AqrDLwevOdTj71g5gC7J8bs1Zk4\na11MykuEBjb74Wb1QhUoIyRKWGLPFTJ9KwKlFGd3h1FHhW3NR2uIqwuffZmE\nqpB1WSX1xfg+65nRafHYVU09nC3x/Pl7BsZJ4alkoUmgyxU4hEDCMYSp10d+\nUpxi8DcSS6oi4z3u5P0wl9dhZfeOFdpbgglWcMRkQIN1KS2y1SnBcSQXcbve\naUTKh5aibM+Ea5kc0AVzUuwdRP4vHPZCVRVdQK9TQvpSStJxUWygBYax4qxf\naiXJ\r\n=JExv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"f964ef8f23647467ef658b0ad440458697968a95","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.3-renovate-non-major-f964ef8f23647467ef658b0ad440458697968a95_1612697621515_0.660365906915384","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.3":{"name":"@balena/jellyfish-client-sdk","version":"2.13.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c283d99c8d3e8b40ea7b6100e10934f0a48b0a18","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.3.tgz","fileCount":19,"integrity":"sha512-sbTwmt0BlXrdsnvksQ61QDn1Oqt0glPJyybSNG8UZUok5YqFdzQQZWA/JMzRVq54Apxym0Ar9AAIvc+YJO7x6A==","signatures":[{"sig":"MEQCIGKjakPyePvAQ1Xe6o67CSzlgMJe0Dxq1+ED5tpCLKqvAiA6DJe8EOMZKdEt/ANikqi7HyvrXAr3ffgb2sz9/XALXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155735,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgH9DOCRA9TVsSAnZWagAAkecP/1gB1GSWJVvZYijdAWT3\nD1mxQeQ3zdjFT1Gq1jQcPZQuhJQ6I8hOyY+WafJhq0mNfVz4iLy64eDYTSmm\nxu7MfK1HvOQj8kRMnHdrXCOoALEaXLYN9iQGXRFwxgLnLi8Z5Fq2QQ/aiz2V\nfCAsJ+cw0RpxGt2N1hZaPAtf2dyOKoPq2WkLNoYoSGY1eAapajyInO1kXjGQ\nm3GLh2E6FosnyMKGE7yLfr3KldEo1VDzFnjOxBP+7aAfkA1riL1iBfMiuNdh\nXo7Kr/RxiI1DMmBQhmpsllbRAp7nY8B5qLZpc9VQgZRKu+b6V+XLwgkIjwzW\nVSaPLM5Qllxj/9qS5vWneLUF6R0hslWwAz2JsTjcetKQ80EtkfeoS5+Y+kfY\nlYl4ktm8XUs9jr9yDPKm/sMyEzmC9Dh4h3O9wHB5Ko8j57OoxAQnx4ioTd/u\n2h/qkcNkC3LEiGo/TAuTyc3tlV08m956QohB5CBe4JISOtFKk0u86X6O5d23\nui90QAvTyFgIvMZ7YX7XFSQOHme5wel58+6Ws3sJLTtiDHAsII+3FAap7Ob4\nO7zmTAiYcExexsp0IIH4Euf2KKhvlqdIKZZJ3c+kMmQMRm/SDUrB+Ct/r5a1\nHuvBb+w60fasYYVjvFhxEJP0sRDT+eicTyF+1GLGxwvBscsBjtoOHD94+TTA\no9jC\r\n=BJLU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"ad56f96e1e93dc6f7023bc7210b65406efd1a7db","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.3_1612697805452_0.7868522933247326","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.4-renovate-major-socket-io-packages-5b14c2397968c01c16eb9da81119b8898d8990ea":{"name":"@balena/jellyfish-client-sdk","version":"2.13.4-renovate-major-socket-io-packages-5b14c2397968c01c16eb9da81119b8898d8990ea","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.4-renovate-major-socket-io-packages-5b14c2397968c01c16eb9da81119b8898d8990ea","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7dd5a2a67fd32d50e28a1be8a2daec36ba12d9e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.4-renovate-major-socket-io-packages-5b14c2397968c01c16eb9da81119b8898d8990ea.tgz","fileCount":19,"integrity":"sha512-c2FTWOWClbsvnEjwhcsOx8JeQ1gj2Us0vvODxBRSBdq/HDGt8jMXqeK3VAgpfaKI1jQ3XGMQIniA23mXtOXFJA==","signatures":[{"sig":"MEUCICvXsGOmUqYdeh/jv1Kw8w/NUuWwItHnrBO8XFFdUZQUAiEAjFr8JIWFeTtPH2YQL6iN8bdAmEAXo3t5920RsqDNU/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgH9GHCRA9TVsSAnZWagAAZe0P/iUEMkh7Rozxx/JaeibU\nUz6wvMbbeg+As615qu3jgKVCpck4wM2ZXvQabChgrn909PPidf7hy55W3yp5\nKA2T3iFTNNkf8uNfVEMYK4s819omGWBDOyanYcxFbIGtuf+EQ+Lu9GYTqniR\n4Kv6Bg/uioPCRD35OVAlfXPUGIr4MAXtSM9ezkI554dgbe36HB2VWLcLIBRf\nVcpuUOrmiMtFiElkH/TieRFJvHJ9mcKZwgsOmU0UuFaojVd1ccIz9olbS2+7\n1OeqegZKvBarUCLkUmexUoOscicCLib/xzROl5dqfunK/mXMPWiTYM9Akm1P\n0ZIR4/9xcO+HC8cLEL3Sp51YweKg82vHqkYb87J3OUxuTXk+s0xwX0wEdel9\nQF+T3MeIyQ6WrhSq+0TYFdst7CY1KdLTcrsp4Y3hXQ09aIpO/GiRHbysYD1L\nBKryIpJgblKhbB1P3WJ1BJj2C1XUXRexwyjUpJO2v5nBVzS5W7YlItuNHp+c\nNH9iP5fp69to+9vbqM9o5evV2LEmwLO9hVvXQv1YcnOOrohJe2f2EIb2Ecan\nk6FkGBHt8ijYxgi8px9wm3WxmohyL+EE2hyth/dKEu2veVRMdUe42QdGSZQs\nI6aXMsZRVf3f67akGhY/hEVQP1Ou6EPG0GgaSTs0BtNlYW0gwQ2Hpf+lID0S\nmnTO\r\n=X4pR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"5b14c2397968c01c16eb9da81119b8898d8990ea","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.4-renovate-major-socket-io-packages-5b14c2397968c01c16eb9da81119b8898d8990ea_1612697990597_0.5181624133721674","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.4-renovate-non-major-a6302ed9b650618055e9426be25c3ae35ec0aebb":{"name":"@balena/jellyfish-client-sdk","version":"2.13.4-renovate-non-major-a6302ed9b650618055e9426be25c3ae35ec0aebb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.4-renovate-non-major-a6302ed9b650618055e9426be25c3ae35ec0aebb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f584ac06593c26fc532b3de558a43e95d9ba6318","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.4-renovate-non-major-a6302ed9b650618055e9426be25c3ae35ec0aebb.tgz","fileCount":19,"integrity":"sha512-5crR8SR6wXDOETpCofpvw2fJjSRLLPbbx3+SQJ2R5xRtBn3FCdGFh888KuSWU8YOZ0V5ksu3Y85bA727QaTrog==","signatures":[{"sig":"MEYCIQC4ehT63GTNV0iNgEKGPJpV6vy7P8pqVo3rQGB3mhvRjwIhANjJzsfMor2N+soQ+yVUOzCpmPUVhc4I/gp9RsoubN0n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJJzNCRA9TVsSAnZWagAAuw0P/jsDN9VIvj1J2EdHEw1c\nePi9YGeBSMUx+5984w1MjhJyu4xSs4fDUWr5rndhYqZFNjZu1LmvYpY/c8HU\ncFDtYC6OiCwXGUw2SIy6KgH/c5ErINYqLABNzTZyutPPSJ4Q2B8otF54E00N\nRVITVBK6HySub0s9U+NQaWFhuMSen/TPTXL5o5FE1Jo3eFZbr7kNbxDff9du\n+tPsC+InRfxISY0c9ykoEIfOYD/6AouCJ0dmWI13ZjAQaOIQNXFuZzb8i6xS\ns5r+nabR5BBJBftD11v0BHLVt0hQuLXqRO+1T2YzNgvDbV3iHhHaupS4tFW2\n3+LLHQli5NeQvfZogIF54wJugylhV8meH89BBTLvvIiYr/VcUwjJcnf1i5p7\nwXOvh3hy7XvIV6BVzd/B0xOiFGc65JT9IMIfXfZVhFO/U/7DrB/T58BIQ6WY\naIlEMbjikFYxnviKHuaaSNJOINim5IccwlBjZTp8TFxPv2nAr+gCf+GTS/Yy\n+yuoEB2+dH3pYPQSNg79+GxuNkwtE4hAW2emm+KSOIzEeFDOVPdzq3Veux0g\n0lG6VaVvnX4Rc2njGKBQkbP7RDd9N/kiUW6pSZTj17j4LkryWuhmq9IgEiM8\nSmFfKvkb8LB1Oy/6oOl0MZoijG6pk8DDh6ZrFNOYRgsHZuKOZkPSn8aDnaFp\nnPrs\r\n=vKqP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"a6302ed9b650618055e9426be25c3ae35ec0aebb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.4-renovate-non-major-a6302ed9b650618055e9426be25c3ae35ec0aebb_1613012173008_0.05154244160336385","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.4":{"name":"@balena/jellyfish-client-sdk","version":"2.13.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"791720d4c6c7383070f98fad43bf5ef5304f6d4e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.4.tgz","fileCount":19,"integrity":"sha512-mJyP8o1suzTyojjWFD3MXdEYIWSBc1c1o56XRzKebi5n10FIsAbHokxWdS63cCykHdv6ziq8lk8PrhVHMUpzjA==","signatures":[{"sig":"MEQCIHwf56ArhCty1h/O39M5pH1hOMxmafIGSVS5/r8Om3BuAiBSAkpzginHgsroEZE610e2sP+mv+BSnc7jSbg4UYuFPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJJ2LCRA9TVsSAnZWagAAHxUP/2n3r56ColpSFqpQuAXu\n7dfPlRSp0ScrumhhLE/CVWiIwnBVM18kTQOneuC6HX6COhbdER3w9FLCQdhx\nm/rZM1HTzkenZgnMs3+xU8q4KJYQtfOgx8vK3k4ecYKPmcGyyeM2fgYQmleq\nMCfKEkaXJxyQomlM84vb5Ucu/6E4v6nL5OuXZ36hkP5xlYKBVIh9CCGxOtXF\nQbudEqzZMj9BPW34IokmAU6ccyKy27tc6gOnWwscsMoOoQmfkq6jBsRkK1Xl\nIYnjhExkVjzSbxp1e5D8OB2C6TC3A4FNm6ru7cpomARZ7mu6l8tj0JKdPpRy\nEW0Jju3IOLBSPd4n6m2j5uZUf1s+iYpe2wkqNSpdvZfxadp/XOlCj5dg9l9c\nYHKobU9yxKVDDcWU2lJ+OxfvQAsk+KYSdP/vrI2GoiNBlNVeNZ+SCWZkYFz/\nAqJUQbZIoC6Q4JPziwi0f8czXOrzGvVt6mWbnOEkOfx0fl3JuM8kZ8epy392\nil0usNca8tZa3gqs4dRIgvVAl+JmHzyDNrXOksjrR+ccBmzrR/BPQsJtyQco\nUjgVVfTvV9ScXmL3GC0YBKqJoN+okhZVGI8Vx3rh2lOpfvYDrWRRulXNPhDj\njSPwLHuhoD3YlZn5uf61y0FO8QfdMt3OygG6KGAiLsvs6zdNRzZgPTV7DjUh\n8kTi\r\n=8Kmc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"3f194810099047dedb9748d1d048a088737ccab3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.4_1613012363270_0.364390395174754","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.5-renovate-major-socket-io-packages-d78fdbdb10cea20cf98ca15d9e6c2338f01c5636":{"name":"@balena/jellyfish-client-sdk","version":"2.13.5-renovate-major-socket-io-packages-d78fdbdb10cea20cf98ca15d9e6c2338f01c5636","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.5-renovate-major-socket-io-packages-d78fdbdb10cea20cf98ca15d9e6c2338f01c5636","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ff98958fe675b58c5cf37923d9bebc629c729522","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.5-renovate-major-socket-io-packages-d78fdbdb10cea20cf98ca15d9e6c2338f01c5636.tgz","fileCount":19,"integrity":"sha512-DuCncMbKIHS7u3FbYYuGqAxWxlA/UsRvhshqeN5dN+0s4y9z5BXraPepB80tcaUq2vZnTIh4zAG6XXzIs0c4RQ==","signatures":[{"sig":"MEUCIHwyP1hMVJN13/WVVmt+0viLC6mdDULjmNcYmnt6MXw3AiEA7GDStvnYID+HCpBnb33eQiEn3PZXRht+HmZ3HpTWR1o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJJ47CRA9TVsSAnZWagAAMS0P/2Z8vQk0uvF3Kj2KAKr4\n5mB30PtLPzMCnOSEEnKeIi95toOK0tWH30pDqZgIp5WHkOyL3G5qYhOYMAFy\n5875VcR3r3GY5eFxbiyXnypQrY2H0yOsGFwAH2LuMneUjlj/T0OW+x/HyNQi\nduhodfrE4aXfqyoV92vOGaKCsUnqziVAtR+z15+pvtZ7GfrcYN0p8myUKWLT\njNTGhoGJiqDvLSb2LhBx+82r1CXkdQUkXzNER7lZO6Ucn8RKXcRk5P/er2Qq\n8R8jcyQsFuzXLO/+EJQ/S0W7izLE+/z+GYubJuETErYdTNZvaIM8vzyRJaiZ\nrBVUkGBk1xffesnVjaaIHsmjvmkqvAT/G/D4RcY0zNGF0hYNiZI6jCYT+yBL\nUM0A2zhm0PIKGl6IFbVcfO/QgsYMHKhPb1POVNkIsqjhcc6e6EwzM3/6UGhA\nFRsz6W0eByqtaCkQbSCejqbsQS/iSedqShu6xPK31t5wDw+zqEXXFqKoYDBh\n7yxe6+8poglW46H0lAcFQnXrT04Ddr36MsCs0YQNYYDItADWbsZh28bh0XBG\nnz/ICWlrDuVhF2Sh2kgIwXeWrmzwn3bcXIjoGXTBgVMcfKZ5qRXPgpzj5jMC\nps8fw3iAUnCFM561WNl/zz7dIWnaDBFrvNJ5OBqdn+cgHkAr2YcTtsjcNRlg\n5RBX\r\n=8SCf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"d78fdbdb10cea20cf98ca15d9e6c2338f01c5636","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.19.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.5-renovate-major-socket-io-packages-d78fdbdb10cea20cf98ca15d9e6c2338f01c5636_1613012539291_0.636277469340625","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.5-renovate-non-major-b6160c9258253d3aff9fd0602de0e584592e4336":{"name":"@balena/jellyfish-client-sdk","version":"2.13.5-renovate-non-major-b6160c9258253d3aff9fd0602de0e584592e4336","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.5-renovate-non-major-b6160c9258253d3aff9fd0602de0e584592e4336","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f21235cc920a29ebc9468d4f83c46963a3682986","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.5-renovate-non-major-b6160c9258253d3aff9fd0602de0e584592e4336.tgz","fileCount":19,"integrity":"sha512-dIJbYqPaaUqieE3nc+hHcITmcegH18YyjaVT5/s+T2k/5cKI8qgTgiKqZl+sHcG1hr6ucYPkYMrLKgwd86luyg==","signatures":[{"sig":"MEYCIQCAZmjuQdQtaS/vEYF2QnFmpp0EfnVR4yIOpwhquo498wIhAOmI0X6PmcYxUmalqHT8JoaCcqJWQZohx1pbXzfiQVq8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJyBnCRA9TVsSAnZWagAA5ZUP/RqtOhZL/a+lGNbCHRsv\nKcTww6/HoXmFzpOUZ5b7J7W//xc5yBdLjoENUe7RGoLlniR4i5yPDWzIh5IQ\nBv4jZKxxawurOxdd0wL6jSACXuWfvSTb0GtXUBhDhRjJu3vZSPbLnWnRbR46\nmeCaUW60YTqlGrLeFuO14tnaXndBrVCUScsYRgmyrGZ5PlbtVrnKMUwkRctb\nktok1gVW4SnIlr/3EebWtJl7wppFuOV2hfasw5cXiNMJ/enLFwNfY4qQBupx\npv+goUPTWGorVjQdPW8qEk+YL5A50Z76ZvTWd2M7e+lVRDn6B5f9D+G2s6VI\nWpijsU7EU/TIsE1vh3/jHgGviuDOXXEnmDDZS1+kLpw8VCt7StUDE8jl0PRy\nIU3JTz9YGPRsx4jO+QcO0Dlu0wssvMFyFJuqzqJv7uDRB3d9+WvFYVfPv6bn\nEgue2KT3xnXJNtH85kYR/KVB5FDb7dxohDBx/eh8QLXOh3eT1/CH1mxILX9N\nYgNGJrNv9nfWV3KjMCXwo1BpFJkSJtxTSWROQ88HN+mD5rmZY3ggmttxfhUr\nEQa9bL89LFxQHepdqdWa2oGj0bcyN2+FfTdQa18t5Vr4p+OlHw1xnyyosbpj\nM4Z3YJ+1DIDeqk/CIACtbUkOu2tw647Iv68kuEaZJJ6TVpCrsUEVDLNV+V9k\nLr34\r\n=xfil\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b6160c9258253d3aff9fd0602de0e584592e4336","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.5-renovate-non-major-b6160c9258253d3aff9fd0602de0e584592e4336_1613176934758_0.31618058775682667","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.5":{"name":"@balena/jellyfish-client-sdk","version":"2.13.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b9fd5de90e18a42840a938e93ccbda53dd54545f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.5.tgz","fileCount":19,"integrity":"sha512-PkfjrxWGQnWlvMvcCifZOoUObUaeA224Fg1WydP06bAi5v6spi21bZc7myzhbCe9tW6fKK7SfkPovH09rlTG0A==","signatures":[{"sig":"MEYCIQCXXS0lOzKL+vdfnGCK2GIpzPdKjPpCkx4LhVycxCgm8AIhAPxFUXdjEe/9u9IvgUTxcu/B9FYoVqd3B38C3iJOu5HX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJyEPCRA9TVsSAnZWagAAcasP/0XysHHF8sorzZ8eDVma\nlLmvRwZQ/QqwUZvGCB0Eobpd3KBtNlDSTJ/8Fp4Ex7wGe77yST5W+P/OIFpz\n/j/yzTwzlFqOASZVmVQ9fMEvh+tAmfsglXX5KZgmPUknaOwEtjxCjpI65UT9\nJ7j4dsPuHEAV8GqD/OsQQ2HjmlYWVIEv7fFjEQFG9juxA22cNCk++61/HU/S\ngQErT9dGSrZy6w0MW8Am1F379ZX0Pxuj2JSH01tadmsnATwOPa6Xl/H+1WqK\nF/d7SvrjVykU/0qpyKg4h6rClJ/rd1XVLShw6vUyBBtdFQBXgPesRlEf5gsH\nwGkKaxJOGfkjaKn2jOK3+rDL00Q6oDeSW4UayCCOYnpjpDpdgpnjGpGUJ+2g\nVuPRffuECL68uh25UJYkeOD1tTaoDb8HgUIx5hRvoIbek6Sj8ep91rWI7UCI\nyoKq3gav3EcIuCmTReCX7xnXXvzml3YdxoiGPBlFFn8z5S7XTLJVndmKgLCu\nM+zJYNmfmkMoPt/C2baXDJj9L/z5ZtaUerFbI+Yw0z/F5v11/BsYnjqgNnpl\nXHgF/efsyhHnIFWADiCL9+5qdYp6O2sAqlgtPUaVCqv2W1CtiKDMhW7uthsW\n3D95MNVVeqLuqvl8CdEA6wNbj78JGdmeAF9/x+e0sCS3K+lmqNAhgOLKyvSO\n14AC\r\n=RSwD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"982729ea0fcfa5f0106aeeb0e6492243ce99f67a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.5_1613177102923_0.12041223696230463","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.6-renovate-major-socket-io-packages-7c7a9da18b02baf616c1756e01c678237c6fb147":{"name":"@balena/jellyfish-client-sdk","version":"2.13.6-renovate-major-socket-io-packages-7c7a9da18b02baf616c1756e01c678237c6fb147","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.6-renovate-major-socket-io-packages-7c7a9da18b02baf616c1756e01c678237c6fb147","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"16fdb3db130f7b08d845b3d2b88c4b5189a50fe1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.6-renovate-major-socket-io-packages-7c7a9da18b02baf616c1756e01c678237c6fb147.tgz","fileCount":19,"integrity":"sha512-B51Gwy8yPzcfbYsE2q02+3vPZOp1kTJkyKVmrNTQdAEIc/Unwc0tVpbeNH76wQKUsWgBRzSk5Pszho7ovGxXBw==","signatures":[{"sig":"MEUCIQCFlTH3/Cp6dwxNx/U2l7WmEFs5TKqG5JiAdwoflSLWRwIgdJouXlARVaFT3wzcqRKJdL3aBkzTvJkR573/SHSn9WE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJyHVCRA9TVsSAnZWagAAM9EP+gMxIGUQXH9SrjubxwSu\n0tg3LiWqztlL56PoKqswqvPj954mke6AJ8JjgfD0VjquYoOyW0LmtZytaYZU\nhlK9SbHpp6CVX3bEfX1+CBfYO0EQgCblNgvFMkWNh13eZAMWNiw7CA5GLEa3\nCuXq3uIWul2TG/D9nZ1rjujCJvrRuXWzhZj3JangeTwLd3mH0ZXLjvRrGiMg\nrxj8EtLcslH3NXlu0/sIs7Wf+NJfHTmfpHotr+rvwklB+qC0ZH+wBV4Cpw+l\nOrF1ONGJgdmCAG+qUpPkZQg5bxbxbmLdtbk3uI37u4dM3DOEXGuArdxVYkqY\nm1paCj5ciP6wKXnVVNqbmCAaWYr7dVmCiaRkJ8UPKgC4mdqrcQIxN4zr6A+W\n4/JP/vDhBYDpISeGQcCbMDSks+ZmtH6ItaoroQsU+V1VYFhPxZECF5UDcvVh\nN6/dWP6H9lUGNkXYEzEcN90YlA+CT9UNIqUfPK3bEONz08eP2iSrBT8Rp4VP\n7B6gcmfnWLHzpMx+oI/JbnPo2FwBuYkLzIO7V48Gb8LVsJqNjpNvyjAxY25O\nzbmcRGo9DW6jXdmxKE5b0YxFpXsnZsibB/l7CV4x5awBy8x4X9dl7kSwQ++s\noSPxcqj/titmAbbXWZ4gauc37QLFqElDdOl4O3qtlkWy4VghR7pgIaGHyMAU\nrdYP\r\n=HjLd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"7c7a9da18b02baf616c1756e01c678237c6fb147","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.6-renovate-major-socket-io-packages-7c7a9da18b02baf616c1756e01c678237c6fb147_1613177300685_0.48539703572039494","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.6-renovate-eslint-plugin-jsdoc-32-x-b53bd54b6668f0fd44a1ab36fed65add44dc4fb9":{"name":"@balena/jellyfish-client-sdk","version":"2.13.6-renovate-eslint-plugin-jsdoc-32-x-b53bd54b6668f0fd44a1ab36fed65add44dc4fb9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.6-renovate-eslint-plugin-jsdoc-32-x-b53bd54b6668f0fd44a1ab36fed65add44dc4fb9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b2cf9316afd1003db4a12ce0699dd5813c5b91fb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.6-renovate-eslint-plugin-jsdoc-32-x-b53bd54b6668f0fd44a1ab36fed65add44dc4fb9.tgz","fileCount":19,"integrity":"sha512-VrVSt97e2PPCdfLPMoAzQBvvZgWik4BMlD/fJApxfMsU6q8sXMuXtUzyzEQtKhb+clCqnRj9z5wgK9urD8LVQQ==","signatures":[{"sig":"MEQCIGlEmpE4gblQn4VpyAXkIRu0ZztVoIguzfpMM+6yk/fzAiAfmjJ6Xu+zTAj0UgGC2+McuK6iQdr/5ljO5i95snRF5A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156097,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKhSUCRA9TVsSAnZWagAAB0gP/2S5iCU9sGSt7iFel9wP\ngrb1jCmWVGTehbV4DvTylH1p0EUgwINlC2I2OPh/s8WZbxywK2RBdIgM4aE+\nBEYexYS+r2xpDbLp8FqMPPyHUNPlkgMuBqzX3a9IuMzKR7CfwfxkXR+nV7JY\n/AbqT7VKh4wsy1Jxkg5ZlEj4ooEPT/cssuNLM7rXzfq/aCNQP2oXZrAyhQ9X\n9PyX4s7Gg3JUwsu+CW1HN34sHoAXTanmb0fTlgN2xvqb/fBomTyii2WFBBpl\nEUz8SbQNUOY7wz6zbSiQRqNR4Bk5aySm+HnFxnive09Xv8HyAaIPeH8+XZ0g\n9lcAaB9ajGQT1syO7P4uqfHzqyDwKkXClhqhvyT43CIcUw5UEIscJGYPrIGO\nf6MuoJ+yo8yr0C4tyCADN5XM7dZKHAJKdW7HlhNUCmKffpE7fnddtPmuErLm\n7AHWgmWbrloynT406GjiYSv8o89YAXrLg5yzNJVe0vtVu+ai+UrROXxC+B+O\nMIg5p8ZfmV6vhSRqHObwWIdLG0AefcOvl+f6eAnr0PBmR+SObRgxEcmqV0PL\nwUxHZfsA7hBXAeToQhFrO4Yk3+5aX1CvvNKe/t3CKccS5cAeBwPIJRQtIKuB\nlgvx9y8T2ZuNYT22JbfaPkRtpJQCSgCeNAor8msz0yEtKgv6dvGACSzKg2n0\ndjuZ\r\n=iS1X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use IceCave DB:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b53bd54b6668f0fd44a1ab36fed65add44dc4fb9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.6-renovate-eslint-plugin-jsdoc-32-x-b53bd54b6668f0fd44a1ab36fed65add44dc4fb9_1613370515721_0.9556925963836707","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.6-fix-name-bb94aa42d7aefca10e5ea25d6cd5427046a2c564":{"name":"@balena/jellyfish-client-sdk","version":"2.13.6-fix-name-bb94aa42d7aefca10e5ea25d6cd5427046a2c564","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.6-fix-name-bb94aa42d7aefca10e5ea25d6cd5427046a2c564","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1e4ba3cf5812b3b6d8f95442faf74cf42cf43369","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.6-fix-name-bb94aa42d7aefca10e5ea25d6cd5427046a2c564.tgz","fileCount":19,"integrity":"sha512-o+N02gurzdB1act2+iFdRWpYyQPPosdIAN23SaBCr9mk/FHW0H4d+F8lC8UJH8zjn/TgHZ0BlwLR7nQxKUVW6Q==","signatures":[{"sig":"MEUCIQC6nurGMoMumDZvDH4Fr+kJWuxVCWejq6+94E5BPmKftwIgBLUAEsvbHgmQDdF4VedksMnmyIYjQuXiIzRI/UPlCm8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKmKjCRA9TVsSAnZWagAA5vgP/iKMTptEmBbqxQ8YCaGb\nyEzfc+9MrcLrf8It1teovY1AIqxsBs9HgbY3cbN4ZWvopBNw9m9kjM1j+2am\nxS81BdbMrhQZ4KPYpIXb0WD2G4ixVOh015G/3j/yVtqthzPz8l4gqOrvWGqx\nmVOFLE4hicXSJeIguAl5+gqYzpyqS5jvrWj+obg6LNEdKVLsuR3xw7T4vUqp\n6iZihRhsVl4XtDqaM4qXFGjfwF/v8nbi5GBKaLxrMoYRzIGKvxQbN6zY3Sr6\n7Dp2ZjrfoqyHk+15MzZjsAFxUGWyVmSu93fXkFF5d5Awxdn8zb1+Wv+iTiRI\ndcmUEUGc1pCOLzD4HL3KWqaTV8Rg41LZvlLoNcyMKQSPGGh+vAJ8RMLR4yN3\n0KNI0HmnOzg4yztlJFtpqNfPchYTAOiaktxfZVrmz5RbAgir3qL17dhxK+cY\nLCU+wt58RNolPOyRArytD6T/uyTv+hX6KxEEFKRTAdzqRHq4CdEanubJVM0v\nz8sydjNj00XqZ1KL1/f3VkPmWenjFtDenL+S/Z1F+v9WlAaR963ZxJkPxRs4\newXQjXyRewZcrwl1xEZNEl3uclgUIBCU2CRg9NIwrFmEuKCcAiiGMfsAr3vg\nl1Tpk3DmVu/voBJ3qXLKD34Xi95zfPyHsfeslVTJkGipl+HQNsE7Si7bXWP6\nsO20\r\n=RYsl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use the JulliFish SDK:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"bb94aa42d7aefca10e5ea25d6cd5427046a2c564","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.6-fix-name-bb94aa42d7aefca10e5ea25d6cd5427046a2c564_1613390498627_0.9690646274337651","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.6-fix-name-04f5da81e3db9b552509e8b00d88ae15e1f3a906":{"name":"@balena/jellyfish-client-sdk","version":"2.13.6-fix-name-04f5da81e3db9b552509e8b00d88ae15e1f3a906","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.6-fix-name-04f5da81e3db9b552509e8b00d88ae15e1f3a906","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"88ed06b3379f208b9e9c59271b90848ddc051167","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.6-fix-name-04f5da81e3db9b552509e8b00d88ae15e1f3a906.tgz","fileCount":19,"integrity":"sha512-VeTNV17rCaHqlJQho4jz2hfZkVkfiz9i4EdEuBht4VYoVcCB02JRrtRoBjJcfIVXKxM8VRaDYGU07OjId4OcPw==","signatures":[{"sig":"MEYCIQDbto2EwsZTR11egFD8O3GZB4iUxNPxDr1y/9iDeBQsAQIhANZp1iHub/QnTTMgD1aPTJK4ojFY1LsJKlaQbD6012NB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKoqsCRA9TVsSAnZWagAAsC8P/Rdr1g3/7s7d0Ndgnw2c\n6hfV9WMGaEKmewUqhaZlRt2x3P04rCSZ8IxswA0ACBlKqWIT6we47Xzr3vPy\n0FR4Yc4DDq2N5+evBPOFxd8utAm6XBiqbN5yqDRAJvMMGVGbDBhLQUJ14mB7\nRMYTj95mU0jUUutsGEDfUKgbec1OcAJupBKaKSSe42pSMLZ14MkCJcAorz1f\ni7oDanebiOIlnXu38+uhMrQk3aEX2aEIaCuMeFttveXpi5RiV/l0k7Cr3CKs\nt4j1kaXcdPKCFyDfH56zWAuvP4QmQ09R0E4qM0OHczrp+Ro7PTIojMIwHPbF\n1Zm8kVSRK6PqWZ8hAIJxs04KIrGZyVpwOJRby7beiZlWnwEb+gh4T1nqVkGl\nI/9T+NbTCAplWsZ4qSlm9MUFnAtCgBkBU1REurpvyJOHpbe12jCmEJTEf8hc\naAdTMkL8nZHal/qrUuuH/Bfz1eYndjNq1sTRamJI50kDoI/eLqSgKfJwz8Ta\n2c8gUi7qmh2EVdKfna4kgT37O//3HEKTQkDr66zWJgVDvQpyMhmfi8gtmxrd\nRVasbjLKdgug3igLs326OhhBkiQOklaOj3Em1IlUUQhXsvC3/CjWAIxtWqkF\nFNA3Zwrs04Xve/qdm/K8/G2iuqe3132j/Up+9wAUI9rEhWvl8pYmoaZFwGBm\nqQux\r\n=tRTQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"04f5da81e3db9b552509e8b00d88ae15e1f3a906","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.6-fix-name-04f5da81e3db9b552509e8b00d88ae15e1f3a906_1613400747358_0.851951376687333","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.6":{"name":"@balena/jellyfish-client-sdk","version":"2.13.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"93b45bc88f057fc5dc6dad1b4ef0685bac4595e3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.6.tgz","fileCount":19,"integrity":"sha512-/h4OurH5ZtDTEXDbKW7PGe4QSj2wUEqkz9Xcm+aWxzoEw0ACS0RhCbsowhr+nYCgttUU3arA3rmjKcVS9PjVnA==","signatures":[{"sig":"MEUCIQDuEFMjnRCVRx2+YavLRx4KxXFtI98M8DGduiQ0kUoh2gIgcEyqIKSDTHRX4Jsjk0Qti+AJnjS8PGbqzC7XyToVNcU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKotlCRA9TVsSAnZWagAAQ3EP/06BKGfphjZi+CI9Um4y\nkjRhQNMWJaZ2d1MULfpIA5wmUmpHMwpOBZtEfVaHbpYLdP6VMBm1alQLEeXY\nvLsmfihrrUHZYxOAUvsSZEWpANTPn66jJSkbgC0etQ56ylg36vFWK6ObPKTL\n0sZdv6ffQZ7UDYdgesHE1X/aas51dhnHX49EaHizaRw+FM8SwZQYVGgTEVqV\ni7iH/IcuCwcjf6xWPuFii5cb7CU66FqhYBbXt/D7gyz425m11WS59tJUs8Wv\n8dPZ9zfmQ3W6fUBgu0oNHollZGjLGUMGcTvDCZ3+uvTPgGdCOKqPJZaBfGr0\nB0ndsCWxHzO6NqRaHm5Bz/ZIAz9hAXkYUhxCWykPOWp6Ny8WT1jy8t/6cPD9\nHSKXcVkHQrKynx8hgBDUjhc4I+fMIvZoqMlXrjjUV3ElJWy9kTBRL368y+eN\niyiNwERUO3TAx4rfo9gYbS1omEZv+iobcorBczT9FNhb/4slAJlogo0x4UbU\n9WI+JL/3f9nooIx0n6vFqrhHbhXz/gruuBAYwixE2JSCZ+8VroAehm2ZN1Eg\nzh7Y0/THOKJ1SBvQfHcCNN4IV6SfTrk1kpcGKMA9ulzmw6dKaC8yZKtVFhBv\nZnpJwAWMBi/JWFihuRbkrhrsbMAXleMSTfBskcXdKch0i1xf55M4lab16/ZB\n7Wmv\r\n=O7gR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"3b180f49c9a07a5d0a0f3d4100f5dcd8ae7a4772","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.6_1613400933395_0.1498894973754621","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.7-renovate-eslint-plugin-jsdoc-32-x-5c389d174e01736e73cfce21ec5985829a3e5a1c":{"name":"@balena/jellyfish-client-sdk","version":"2.13.7-renovate-eslint-plugin-jsdoc-32-x-5c389d174e01736e73cfce21ec5985829a3e5a1c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.7-renovate-eslint-plugin-jsdoc-32-x-5c389d174e01736e73cfce21ec5985829a3e5a1c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e23747a0716bdd90317ea3cd72785d5780d83c19","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.7-renovate-eslint-plugin-jsdoc-32-x-5c389d174e01736e73cfce21ec5985829a3e5a1c.tgz","fileCount":19,"integrity":"sha512-dVb+a99AyEEGz3b6KzStwHklsQRbLp9/aD2+ziQ6QwXxg2U7tlgpJy9uguXPd3RxQ//fN3G/F/oKdGYsqCTS+g==","signatures":[{"sig":"MEUCIQDSj2xp+l5sA09M5E8OuR5jDF5E6BJMTeAboJz/vEywdgIgDTh5STCwUeOA6OxPVpCgeWCy1D1NzN4lVptX2V8Q5eg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKoyLCRA9TVsSAnZWagAAR+EP/06gNOAkYjs6ZwjG9kvM\nETb2aiKt30FQOMq8z5Z+fZEwNm70lc+h9mlmXAYVn6wrQKqK0rPXB8CR6dv8\nwLW6mKBwqVirERtWF0CEMdxez9gEYhehVWXqvMzmqANAGttvkLx/Ndx66xxt\nJCxmuZgKf6AlIQ/dSdDEUOuneSwvEmckXiB+78/rb3XzPujrU21rUpzCOMZg\ncPBhntawAjRpKk8UYg1MtmHZhZ/R49lIv2p9uWIQAMXNmb6BT5XLA7zKQJDm\nMlVfXga3FZsb3G5NNnFhTG/mTw6x8KBBlsnovyci5Ft4U0XpBcJ8fpwHrp3H\n5jcNm16FviRrxoRioQcw+ApMtO7c5m2COp+jlCpizOo9Tsj+BWumjn3il/sy\nbihNCR3zjVpMAyWKJChX8M8dxP2obRzi/XRObqBWN/Aa9HXDEVZ9yEl185ky\nuWu3WdDG+CYMr5EMSenbXptPR0Tn55ZOfDKpiRF8xy3xjB2N96AcgnahEmoC\nJFmXpb/CXt4mWqAlh6YtcnUQhV8RjKlA+6UzVH8+K5IGfj/v+8ui+ky28QGy\n0VeTMPRk0EaZN0agjDSkY1fRBo9xvy9M/MN/m37NUZw59Kq5nR6iT2d/vFAU\nSYRkmFEfjiUEKr1eKm2Y/y1m+/y/NuYvVTAv40QNfqQbq+sJdmgULZUpBN7h\nmchc\r\n=F8ge\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"5c389d174e01736e73cfce21ec5985829a3e5a1c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.7-renovate-eslint-plugin-jsdoc-32-x-5c389d174e01736e73cfce21ec5985829a3e5a1c_1613401226994_0.5148271478294224","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.7-renovate-major-socket-io-packages-6558e735279ab1d95fe29845d563faef21354cab":{"name":"@balena/jellyfish-client-sdk","version":"2.13.7-renovate-major-socket-io-packages-6558e735279ab1d95fe29845d563faef21354cab","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.7-renovate-major-socket-io-packages-6558e735279ab1d95fe29845d563faef21354cab","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"69e7588560b4324dfd78ffa60cfdc057f5a2c8c1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.7-renovate-major-socket-io-packages-6558e735279ab1d95fe29845d563faef21354cab.tgz","fileCount":19,"integrity":"sha512-aXNoGSMuhVrk7osdBwMUE2gQDNXAipAUm7/wyvY001sOpyk4PcJPCjmqlieqBcznSxUXHEdCH50ZKaa6XgGuqw==","signatures":[{"sig":"MEQCICy/P5JkfelcOvTpytSxhmB6eLPSii4uBEUleUWSmxZqAiAzeI8z/OU6q/rM8Uh7oXxWd3STEl8z6DGh27y/unQLFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKoyXCRA9TVsSAnZWagAAL18P/jK0cy3nME1jCcUIKo64\nH8wTDOq1KbNc8d4i8lmRpxJ5G0QVAbv46quefTHhzaMVG3Zk//oqNEFWRZss\n6jfDiQcpZjM2ulXCiui87SL/r2rzvWIAH5lLeNL/GHJZ6DFOWAeMPdG+WwCG\n2gGvIfgoot8H/VF+Lb0Gj8GfkuE+VsybyD6P29dkTDxZIqbRF51iokOa0zc1\nA7rdlK5lD3qNiHE8Y6OanplCYTMMLeLGrTMkn0gZTnqjf60KdZp4BwVNbcSF\n6V8GfiqmkkKhAckJBBLQi6DrjP9hJnhLZeTuuoNMiAWa8N/u98pDmiqDs8b1\nBxLncis158h9PmlTjGwshCcfobe0nTIyt1ZwhVzp1mBrTaapzfgrZKauSrGi\ngBWUQG2ddc+4WHceUvkNPfAsJrs9sXrAe2dwe/qLrJ74iPopOfsQ7/tIIWFr\nWrSjWGt/VaMY04L3hSwWCqEX4WWquKn6Mf8cY+nrvKnTxTF0t8iO+TUeCnov\n5FSBzTNJMz9Tb7mzXlrIOqMZyCjFAVwPKd56tQJmskTgnGbZicg6mJzm/2CW\nQF+XqNLURyfNW6Wtz3y1+wFjaT/r4CwAx//ZuzJDWoQp+ShXSeAzJMomsh4/\nQBO2COT7eg+4VJSOajL4CmyltsUFfY2vpgctuwbgL56HeBTnPWhsBvlVR85T\njhsD\r\n=SDuu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"6558e735279ab1d95fe29845d563faef21354cab","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^31.6.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.7-renovate-major-socket-io-packages-6558e735279ab1d95fe29845d563faef21354cab_1613401238854_0.4288177283090615","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.7-renovate-eslint-plugin-jsdoc-32-x-2f6d3973cc7eba36ddec85610236564727621cfd":{"name":"@balena/jellyfish-client-sdk","version":"2.13.7-renovate-eslint-plugin-jsdoc-32-x-2f6d3973cc7eba36ddec85610236564727621cfd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.7-renovate-eslint-plugin-jsdoc-32-x-2f6d3973cc7eba36ddec85610236564727621cfd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a8309e826c1365f8d1de79aa1ffacbb6cdcc47e5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.7-renovate-eslint-plugin-jsdoc-32-x-2f6d3973cc7eba36ddec85610236564727621cfd.tgz","fileCount":19,"integrity":"sha512-ipJmG6Eo+K2/IiuPEzFNfpsOeJ4SjOj3+rIP5y+Xmyt1JWFpT+BHVTNwIr5VIJ7RZy5xuEIF00glfOQ2tJehGw==","signatures":[{"sig":"MEYCIQDlZU61biAYWbKe6hg8vTEWUa9NlhyOnGKOypraRqtfNAIhAKKYjSDAMZ2Jf79jtE7GVEv6QdNwfMWtzJgqdwM7ujeQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgK1kJCRA9TVsSAnZWagAAvtcP/jM+DnKpbe5Ow1b+vMSs\nRRPxwlB8VY90OI2fYvMLEbvo0GHbqU45MPrDFnsUM0fjtahMrQqUx5uJS64C\neV91QLAWca3cIjEynOkEqIYTllL0y4Saup7NS2oSClXYzkUodcmWKKcvaMnO\nSm/ZsbLB15oHZssAsJyFuDi4qelDJYev8dZFRs2n0GIYlko7vsnXDEFdKM/z\ns4CQ/maLK1rwC4Ho4LBkNVHGWoAWZ7/7A0jtRmeb6N9pholBg3AaFhZlsZHn\nJggbKgfXojdMj7ok0eiGyYS/0dU8fd1G+monEI5POlHM61ftXQb8xGct6YXx\n8NCB0haK0eMP3DVQ7B1GsZ4XB7tmZbNtJThmENnUxJa6EcufyaK2HdqNzZUp\nKbwRp6cnO2FdS9HbLWCuqwNjxu03h6X0btrNn8cUYZAXsM/Q5F5BTTXAZOYH\nhcvOoP0nziIuDeSK3q1RakuYOdvIoYUdC15pqHO2WC72IMp4I6i4rsTaHkjF\ngGXl443fCAkJ6v1IXb3WEFHw7W/cJqefJwvos0xoSJweFF+GCJmWxDwM57m/\nzQf1+kipCsTBjKFYDCJPmcM471lhPuNuU1km5OakRyWQms6T6Pqoc+u8DeY5\nQb1JijKEYvlXwshSxV0F0F2zLunJEOt+8Qs2a74w8AldkiEAXYhdzlzy/Xgs\nWwjO\r\n=pEe7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"2f6d3973cc7eba36ddec85610236564727621cfd","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.7-renovate-eslint-plugin-jsdoc-32-x-2f6d3973cc7eba36ddec85610236564727621cfd_1613453577543_0.6551683381552889","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.7-renovate-eslint-plugin-jsdoc-32-x-996eb947474c9a8e938d844a895452c621cc03b6":{"name":"@balena/jellyfish-client-sdk","version":"2.13.7-renovate-eslint-plugin-jsdoc-32-x-996eb947474c9a8e938d844a895452c621cc03b6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.7-renovate-eslint-plugin-jsdoc-32-x-996eb947474c9a8e938d844a895452c621cc03b6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"57a8360f65d6c1d1da4453425a99d7cc32a36c5c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.7-renovate-eslint-plugin-jsdoc-32-x-996eb947474c9a8e938d844a895452c621cc03b6.tgz","fileCount":19,"integrity":"sha512-soIA1E42x0nnNscbblbV2ISYD5x7a2Y1seav5qigYHe0ULFCz1sVM+yWZJZDAAGDcpvnYIX1kXAAu71OSBIsKg==","signatures":[{"sig":"MEUCICkA1K2kdJRKFf/Gl60WPaSod9VPMs53ga5T6lbPP9qJAiEAundosp0zMcQGUzXXcZWHaJYVkCDWNkeTwe4WtuLGQNA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLFbbCRA9TVsSAnZWagAAoeYP/1Cz7NueC9xriGpoXpK+\nU9QE4Qo9pgJp999pnw1XoZTGLlkrT1c4e1ueLFbs9r9GM1nEFVlx5WQ2jcKd\n/i3XNFchQA10OmO95TXOb+x0kmzBWQ6tJ7yMBgI0imPEAkXyGIZQQ2ZRBBWX\nRyGKjbnFW5W6YkSmX/CQ5F0tTAgVN5SgBdwMhJQ627rfQLCK6ujQpy/OcA9B\nrf88teedE0LY0KJvlVAqxVaWLYtrni/p0Lga6JJpLRmtXPilNPBtV/ApcZSJ\naEnpLFgEBF5CKsiZ+jV/k4mvnIG9Xw1rS41QaTMpoCKPc0GcskwREzVccfI5\ngznwsqUlJG8xNLRHCfHIsyRKdWLDBtwcgXpSxap08PUl6eJCA33NTEIk5w5D\nuoTspvP2J7qgtGelqNG65/OLn+wbEwO8J51r2LZ2i3NbL4STObj5vqHLVtxI\n4WWXhCft0aTr+xvOeNyI+/e/D85OAAvaEVmAIs7CJAfoDKNQfPU1bUyuvtn6\n0MHbgT5L1TlfOBAJynVOQrXuJfWuK8RS0CejYZi95J+8XILC2zpiHtuZZdjv\n9qVtY1b3izpul5XO0oQFmyhebUYb1/obOegopWSdYwKwTgYUcas98JDnP5U0\nS8loF6gLpFq2NxZotH2zyAqoHR28SItf5QQy9gp/KM7rLSW9rrt+Dr3mpsJ1\n4KkW\r\n=N4tw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"996eb947474c9a8e938d844a895452c621cc03b6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.7-renovate-eslint-plugin-jsdoc-32-x-996eb947474c9a8e938d844a895452c621cc03b6_1613518555031_0.37220963369624016","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.7":{"name":"@balena/jellyfish-client-sdk","version":"2.13.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8369d0c263b11baf541be124774e23584b6b0205","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.7.tgz","fileCount":19,"integrity":"sha512-q4H2ZrUpYeqXByakOsd0HVc5nUgxEpbvENpidB9IhvsOR3RjsJiuDZ5mnW6GPI6+BBjXeGX+3yUzKm0WGet7UQ==","signatures":[{"sig":"MEUCIDzfGwJxXVio78tHWAsDFSf5fwQFMD744CA+SkfupKAGAiEAs9WOZoD4K4uNcHHh/3ejBsxJi0CwIO3wfZySvfZnB2o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156094,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLF+DCRA9TVsSAnZWagAAg5IP/jZkkMn/GImmgMSIkl+q\n3XaY5BNuqBH3eFnP5WZyhL/tGS3REE7zregPuzXv4rrWD9vVV87SQdADml83\nQtq5inqX3NM6WcmpYrMUSzGf4LEQTwVqrSFmT7udmc3MVbjoVDyKtNp2NPf7\n0pmOSXCrxXiF7bSf9KsgC1BG+FVntdO3heXtGQAMreF9VbvKsFHLhJbJ/rwO\nrpVQhjN8Xt43g+adcV2+nq6YX7Zdq0EcKwcQAP9xv7q5Yk/3YQno/BU9nfLJ\n9xmOdiTpdJj3Yuw/A2MfAHaBVhImp/g/cjOA2liMeTj5eK0MOSBK1ffi8jB2\n49LrGPnzNG8ZKdzc3Mn/ohijfeWZoB/aujJ/b/Anzxr0NAqABCpU0rSt7GhG\n75AK5rPreQ0TSbDDcUBgbNJbD2GW2AYDQYf/KOL4dSsAH5joADY/poZ+3U5/\nHDtlf9lbM91I5GE9a2GOq/0rlDD8DvD5wZU3x8kCDjRbLKuBDtAHwdvhd1bI\n70nrwM5J6QOe0r/gtzncnMOKevZWEJRxfwpzb306aYnMlhATkqemCiHXLYpx\nZci7IS54Z4BcvxrKtH93Vd6HuSCPs8QYj6iS4ttp5y+KYLXjVuQs8gw89S8k\nU8/GkeiivhnUtNsx9ZgBtOegOwBw5PykjVmRTX3Jm6Q1ECWV8kj9fYxj/M5H\nbF5Z\r\n=hQj8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"fb9d40e1e56f3fb103d2e3ba9bc3a1cf94ea25c6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.7_1613520770992_0.29272635700714544","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.13.8-renovate-major-socket-io-packages-77d77e6414756133262da273ddef174560fa1ea7":{"name":"@balena/jellyfish-client-sdk","version":"2.13.8-renovate-major-socket-io-packages-77d77e6414756133262da273ddef174560fa1ea7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.13.8-renovate-major-socket-io-packages-77d77e6414756133262da273ddef174560fa1ea7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"12ddd0c75a9d8a12017ff358739027d41296d8cc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.13.8-renovate-major-socket-io-packages-77d77e6414756133262da273ddef174560fa1ea7.tgz","fileCount":19,"integrity":"sha512-lceS4KU1FfXKY3DELI1zGZpDm/PwPCKnI3nIVLZzdC70aXJKx+rlYzxNI+Uy36zBfc6oL1LpXPknkcg0AhgOWg==","signatures":[{"sig":"MEUCIDZviulOgbRjlRe2wxIdYQjnWW1n5KBL1npFaXdyjxmJAiEAhlWYoqIwqao8KNPWndrP4fS0DZnFJ2fbRu/zmlQKOuE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLGA4CRA9TVsSAnZWagAAzCsP/00HFcW4R+quGccJl9l/\nj54qgTBQchETprfo4VuMhIJcx+fYZAuycnspdYWHw31wZQHMoedCfbgnzQGO\niiN2UhooNfkBV4GNj5+gp6rAgznXDjHTZW+JMn0wTOUkPV1WRiZprUFTuIKl\n4lmHfkVyRTswpBAs7SjN73+nGFlhrRiSkULnDAAA2JJRp3oFylZwvBK1IkdQ\nEO9OJIrfN1zlIkV8ri6XP4VQ+JvJ3/hT+Wva+MawQEwG7U4sAY3iYcxh0O0B\nmpuSpNatlsjtk1LrFEcn8xQLPq8v9Ns9FdW90yiadVnmY8RMlqc4PjRykTqn\ng0XkzWvyODh2ZiVyY1I1irdHEgostSO6MtVXUWaE7EjkC91ub/PuHnGSgx0o\n09Iu0KNtIxxVU8QaLu8Am2/w4whF8+iC1Rqkl5Cn4YdBCNlJ6IndfkEUBOe1\nKB8xfxKguTWgqM0CvYY2EzDmnL6rsnM8IwTi5Z3Wxjd+tnrA7DFYZ0Pz4Dpr\nf/CFgyNmXaal1LFocOMAYR/KqTvC3USdvlT7AdqXw2lHYwzFLWmqWC3ilkCI\nqggNIBJ9nhkCj60c6JLk//gKIJXYnfbN2S7fSjQzmu9RTJEcogxPZQZm4Ptx\nloWfs/Bduxf61T9GgMXeS/Tb3oXFhIia/65fhVjSKwqe7QS/kUDH+b1xwMUR\nRAVB\r\n=GYc7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"77d77e6414756133262da273ddef174560fa1ea7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.13.8-renovate-major-socket-io-packages-77d77e6414756133262da273ddef174560fa1ea7_1613520952204_0.7166349739705944","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.0-link-user-feedback-to-owner-ab200cbc8f530a212e1d54bac9e0d6bd753cadb8":{"name":"@balena/jellyfish-client-sdk","version":"2.14.0-link-user-feedback-to-owner-ab200cbc8f530a212e1d54bac9e0d6bd753cadb8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.0-link-user-feedback-to-owner-ab200cbc8f530a212e1d54bac9e0d6bd753cadb8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ba385d7ed3406c57e6f8f471c180fe77d6ea8822","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.0-link-user-feedback-to-owner-ab200cbc8f530a212e1d54bac9e0d6bd753cadb8.tgz","fileCount":19,"integrity":"sha512-EXw1+epU57dvmTqEHlGShWptnvVOIPR2p0iB4H2Xx2onJ4pEsYJnfRDW1N+9dh/8e+hMAEbbbn1QScs8rdwVRQ==","signatures":[{"sig":"MEUCIHN+2wrYHL/7P+7VIg63Ca1SOmFlCN4nAbDSHsEGBDo2AiEAtlwqPYTVEoVrmaq3PT3wEHrt7/cK6uzkcE2AfR/cD4c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLhgqCRA9TVsSAnZWagAA0O0P/0ikXaeMTzhgFbo/kCZz\ni/xyUlmDfzldtCPY8twUd0NJr3wk9iQUAvlCO+irUy/X7npMohkj03g+Ixta\nBQV6lsk1++kop3efZJPKZXteRrH9jYz5A8+/l2T0vv0ff3RiLj3HuSu3/VVD\nE0s+TPKYeJODwdsNullp2BS/EkMsORbx6COljUyDW/su6owiQhaUyuQxM3Pi\nqXtF8Urpu739XizOxJopJiVgowhyKfdcawLfOgE+I4vxy7lHComn+Y/lR3JT\nEtkDjehfmswq7bXrReB6FQ6d8jxqexaKovWoOw+aYPseSu4Oz2xdK5HA8kF+\naKRO7J0wcmv5F4NC3DDFriMb6FkkosfxjCKmGf/Sw2pBcQaAxlETbdNL+slE\naXuNDX8T0zHXNxujT/sThiMfWfZ+lLtGr33/gzetz61spqce11UhSYdSDwNs\nBYIkPMXGwM/fXmC0UPLRKuA3RqO7pEaBs2Vz68Ts7hPm4C9D6okx752JqAI1\ntMUMls9MnYWu9PnExYbHVAK+RF8EMRzwGSy5rFH3u/o9MfNL0NmMXV58nm22\nmDIVBI+ulnYZVN8C2MrRyaTypjUMsZyLZJaz/W7LNim4XJQaVkIgnA9HskRp\n864PwRnqJwyPxvk81Ne9l2fbMr8Gm1MGaDjb7cc64JHHA5yAd0LUd1vBCPbz\nIGFC\r\n=u1w1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"ab200cbc8f530a212e1d54bac9e0d6bd753cadb8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.0-link-user-feedback-to-owner-ab200cbc8f530a212e1d54bac9e0d6bd753cadb8_1613633578088_0.46287623934264954","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.0":{"name":"@balena/jellyfish-client-sdk","version":"2.14.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a0ce27a0e45d27c014405346048955525b0d13e7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.0.tgz","fileCount":19,"integrity":"sha512-86t6YBSSAVM+gUwahcboTiyVLkDQsdEcr1oPzQ75wxH+XapSAl+XmCv78ASe0N2pkk8vmemE+I4omfUDuXn/Jg==","signatures":[{"sig":"MEQCIFE2AfU+V4hae84b/81fL8SZTs5J27/ALofwVLLZ7btPAiB1fNQ7Tl/h5/Wdvr9EPdsyQL8xZ1dscfNGJt0eMUMHug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLhjhCRA9TVsSAnZWagAA1IQP/RqvElGbXNn/G9yavJj5\ndTZx32fpuLEkmrHb55k5qs5Do3gLvCGbFVyrExw5Qu5gshl7h6QCqjuCj9Gd\nrQFomp0IHDen2TWdGtp4Ufzzc7pkWfB39oQpJMG8GDcpu1rXiBduOczCnFGh\ngxmt29LfP6oTvFmBXQC/E2Sz4HI8kDYtdBELOKwq+TCRCiqqedGvFLLK57az\n94b8H4nGIqmQp+8TUaIvalUvs478ubePVWHR1UzSWNcvJODMoM4euQWLXpwD\nIDHsnTx6xiix4hPSebed8rcBI1uNphnlRpyHBzs3KpQqWNJtAgJItfTzY3MC\nHxmB1ZNY6pra5OSAvGyTB82B2+pcTusFcRBYn1Hg5mBEkrDuGHcXUg7/z++G\nZj9KaOXm/EDlmx4znimwsTTxT2/FI5g0U7gQ9QdM96ShjrhSP2lQDoLjtNi7\nEeVDJu2SJ49SMpTwFF9AjFhjR21bG59xzkO+/4xqN6h78Wiotc1c4uTMApZL\nsXcgBYpCUOJ8kaFv0MNlTEfvXserBxl6vU9gGsGXjZW5/Jx8aM6c5vqwrGa7\nrssoUPvSKLZafmU8jjBI+186VFR3Xiylmc/ZoL66+FNSZ90z8BbR8Xp4J8BO\n63sh/D+za2VOLcIeGvVv6XzoQ3z82AW55ml8lqTR1uBYDttbGIB2M59JVgj2\nfiH5\r\n=Of1o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"5b3aaeb08b70903fecca34eba1347fb21ce9df1c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.0_1613633760992_0.8614213543064031","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.1-renovate-major-socket-io-packages-f0970d1ed3e13269fe829a0fdd8bb72218d6ccd1":{"name":"@balena/jellyfish-client-sdk","version":"2.14.1-renovate-major-socket-io-packages-f0970d1ed3e13269fe829a0fdd8bb72218d6ccd1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.1-renovate-major-socket-io-packages-f0970d1ed3e13269fe829a0fdd8bb72218d6ccd1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1cb4db44fbdc1321854a976f2a74dfef6a4c3aef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.1-renovate-major-socket-io-packages-f0970d1ed3e13269fe829a0fdd8bb72218d6ccd1.tgz","fileCount":19,"integrity":"sha512-phsiUJNHyEQm8lOalPJj6HisPouXtL0b7IDwwaDd7PjsrzEcEsecJ8AJyWp+fGcsrPzFYIGNI0zEqXhmYvONWA==","signatures":[{"sig":"MEUCIQDdWee5SIut3DrygQtLjWmF89sWQ4CgdInuHxs4mlJ9iwIgS5Skh9169yvnl53Ozi8Qs4ltNpYcD6og47pff75bFe4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":156780,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLhoECRA9TVsSAnZWagAAMlsP/3mY2tM/4CjnYPHs5Hia\nEqJI1N0uVUetq48VRpQ7fJHvNiTJFYng1WXBOGQuekb5NeutSDxwuKR9DdG1\n+YJUF/cto0SMAPw3ag1CCTtH+o1wxZZwcGRTh+63G8EJuPoCdkcs64424vUT\nv7MLnq2klgGYBUOJw0+2e2oayRUIR47vONPIPO3bEtcuqupTweIWKCuwqQ0+\nV7qeKGbnOXQ0I0C/BHxfb/A3qA1MSjYc2I2L6YpEAAs+H6RHjl5I6mw6V3YW\nxjkx591flnsouX5xoTTzlvfnyvNgB+HMyNGvfpJPj8ZVz9hSWKujFQkOuVCM\nxHRWoJxQX4eurVM67zhB94eGAxgUhhpW4UiH8KhZe+E70Fg51jgmVh/JiO/e\nR2/NJ4WLz3Kc0Fce84JeAGhJAHcV0D+s/Gl6qcnAAKFJ3UNp2wddRp1BmCJS\nM1FXs3kFLVHlEohpQyd553tsl18oYV8ZNZ+XIbliyVJdSm78c2+juGPZmxHb\nXYlPX09mupMTqqT/k2rzlDLxwia+L0foY+LskS6AA3wxhWjaGd74W5/fVWm9\nxKXldODxbS1C7wd+tosXlPw4KCTWhSTW5eSJXR0bs2wpujPlUK3/S2LsxwUk\nHosztob8uQB0S965oeepjvuQooBqIKC3mXQfkFyBYIr8qtzYnjxKQb9Dgi9b\npR8U\r\n=sdSl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"f0970d1ed3e13269fe829a0fdd8bb72218d6ccd1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.1-renovate-major-socket-io-packages-f0970d1ed3e13269fe829a0fdd8bb72218d6ccd1_1613634051481_0.16330047128271707","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.1-add-changelog-yml-fb9ad23d6ae5716830435e59f7cbeb1b44a1ea3f":{"name":"@balena/jellyfish-client-sdk","version":"2.14.1-add-changelog-yml-fb9ad23d6ae5716830435e59f7cbeb1b44a1ea3f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.1-add-changelog-yml-fb9ad23d6ae5716830435e59f7cbeb1b44a1ea3f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b82b0c768ff140b872c50171da2d2bdb6158b383","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.1-add-changelog-yml-fb9ad23d6ae5716830435e59f7cbeb1b44a1ea3f.tgz","fileCount":21,"integrity":"sha512-Npx+CXF6Y6ll3XYMKjruB5txVtMwhL/eD4t8ELRcdLfhGdioXxPfUFSJQhSBc3W0MHOUF+zrUHq/Y1TQhUwDIQ==","signatures":[{"sig":"MEQCIFdbgWTPSLceqclX4CB2PzhPgOaqOke5vrrJaZq6XuRfAiBVNd+IOtZvU168CwH5n/n6p2MrH4grNV65EHs0aaLWHA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMNcMCRA9TVsSAnZWagAAoLcP/A4bXOIOethueKwXJIRH\nJEy7JxEmpB4PYXgkqGCQsO3QZDjpySm6+7SbloVMtrn/5uhpkpnryTAwrsOZ\n+vfgFnsLqALX1Rz1tow+ejktvkYBawOYYo6l5EusPN0wlQ7UwRpsHYPc+b3t\nvRo2yeAfbBcm4ZKXoDVjMPMwq+h1QC/ye85Vbo5JhHXX9U3zZ27FLRRYhnRg\nzpvqZX0ms8rXAZ3pcLGgcmryW2h1UcytZ06PELdsmiR2jgm3N3AH28ZUdVar\nyTIKLQRBTnWfAMer4Juhl5feKluNAmxZaoLzJysNB3qIhMtHP3tUh+DUiU8Y\n7XcA8NFAjpvTcWou+ZoEpy59incPfBC37NkTMKzCapBBbgL763uKp1rsD9KO\nuFWnKwYRK999HAbsaZZdF79zlLwI54uLnm1W8pG8Hi2z+1Rk5HMyXIZfJx86\nR2wNJSdEPDqNfNU7QZp+dFliPqpkTg0OJKSlPKFamT9cz804natwBcTeKwSl\n2whqx0SIOWZ0Zh8CYcloOInbW1EAVqsK8uuilwbBkfrYREEn/5aAHxkEkPNV\nc1F48/zWvKVSDpT6wAgWzgFIJ+lOxNU7uY/uquX+ZtUV2/hdAeamlGps+9Gy\nGji8XZvvBjsTmRfGvGeufE4eczPpxEe9tR11DsIxoN1YUyY41GtYRqbtfyys\n89Ia\r\n=ds8K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"fb9ad23d6ae5716830435e59f7cbeb1b44a1ea3f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.1-add-changelog-yml-fb9ad23d6ae5716830435e59f7cbeb1b44a1ea3f_1613813515736_0.8660374535235509","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.1":{"name":"@balena/jellyfish-client-sdk","version":"2.14.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2cb424b29562c3688874f9f7d9bababc15f35084","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.1.tgz","fileCount":21,"integrity":"sha512-xs1nXu1RVIPMFL6a0b+Eq/Y2SGxgMWB/XjzTDUIm1tn88luQ2OAoitiASX4Vj8WpwdkZBLacIpz0Dy5TLMNI4A==","signatures":[{"sig":"MEUCIGpVMmRsoKkZce9QCDD8a0w8bdAT9x6Pdc+8M07rdbXTAiEAtYwzZQEq6QaYSDsesKRI6K5zczLFYP/CW2vbfXOBwT8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMNexCRA9TVsSAnZWagAAB9QP/2mXHuidT25XQpjNZSsU\nbz3jAyswhxZ0robNdPNoR8vcWovJUuUYKevTprg0/r11AVV/ZlxnA6kE7YUn\nxmmsn1tGZSUPajIjHtZtzEcNBaSg7Fmjt0yGI2T97O/HobDjHBqcxWVzsijT\nnhQJ6RHcJviDQvv5ejDC5A3+2jAfTNgogxq8swY0k4mM66qJtLpXppC1tNIa\nQbAzniNiin62sWszbS16v1izCPL6xPnl7SZCPAXoUaYkEe8pfNZqzOnCujpF\ntNE82v8Oi6q53ueajeTEaCFdk+GvSoeYRLLUC5si6W7iKFWl7j+YqwxdhAOv\naVeQXgM6zWLxANFwS0SP8PmCDeKTxKW7UDiZwp03ye2FmOV8BHbJ/+fdOorB\nMg+8Z9q6jXAN2C1RETxyPsy/IHHrDW95CfZC7kqnL7VXNabf+7BGUM90DBfF\nTQLR/QTO+hYviuH8RUyvSe3RHVMzWQruGJXDsECiIEetmNgYG7NeTAFwvO4h\naZ2AC38KmT7XKtIyaxW+PFcHpcy/+TfKpTH6mCpx6fFZ71n6phBfM5mQA61q\nmFj5zzA+9AmdZO7dEYmchHl8TGJRJA4RdtYOpV6kA6VvLFknZFgSvL3lB43+\nj2yAxZ/tQ0VcdiIqGRMC2vrTBBEUa45ocsGKPvVVOQWEbqZvdImvSUAWgh1Q\nLMuO\r\n=zofD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"5eabf3ade22a1ba4d5ad2a89d307cbb7bfd23843","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.1_1613813680837_0.43571333716577954","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.2-renovate-major-socket-io-packages-9612f5d03cf5b8b5eb7e7f678faac27a92c5359c":{"name":"@balena/jellyfish-client-sdk","version":"2.14.2-renovate-major-socket-io-packages-9612f5d03cf5b8b5eb7e7f678faac27a92c5359c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.2-renovate-major-socket-io-packages-9612f5d03cf5b8b5eb7e7f678faac27a92c5359c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"afe8571eb2acc0d318884224378035c9b3073a48","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.2-renovate-major-socket-io-packages-9612f5d03cf5b8b5eb7e7f678faac27a92c5359c.tgz","fileCount":21,"integrity":"sha512-Xb3pmMrzukf6osw6+rTv3AKeErZInulOg58z7HLmhoUs/NA+J/B4ddRfU6+tY6a0//LPHofQRRWH9EwksyQnlw==","signatures":[{"sig":"MEUCIEWuWKMDFPshYihUZe/xaHL5MAePcuowSfQz5NBEdEv+AiEA2ALgZemhEGVYquBGEWLqnvMWMINX6kfzpsGD57N7Bg4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMNjiCRA9TVsSAnZWagAA+BQP/295GQT6uzFwu7RYCCzA\nFrDn/Kq8/bwsc6tdcHmaf4XRafD0kfUPAaESoU91NesbF5sTX0KwFk/bgimt\n9szQwq5cIvh4p0QiRq6r+mjzrS10bLB0qlpfjWVMokKLazZizw1edMK52dpX\nBlYmxuQt8DbLQ8x7rrbynMx5qwoE2SiVkuEPXhRXvIriYqwne31bEAAqdsos\nbXZcbkWB8Yq2gKesGGW6odXQeSkk8QEf++DTvPwJtVgTtygxA3oTKsjP1gR+\nuvLqQ2egk24/yG+48ES7ugpsVurVoOQDPTg5x6CB4PAZD+dDumLwHK+zRqr4\nLzZZPLAxTYUQVrmlirc1o0kSVyKf9nujJlFYVrOgo3EMGWS7IfKJsIHCH+CW\nywBJmQt3LY8jj8xU5vv9zT+Lnk5eZGx4jdJMSgdArzzdTD7CKTS1G8XkY7sm\nPGt1nLezjQx59I/JYmvcFaJ/m76u3AbcoDsxd27lck3cnyhw0zKXdATqKYJv\noc314SjMSBqXqHQ8YmjAheJ5jdPHXn9b19FQrNQc8i0VQWttAtlEZNH8AcYy\nzCf91GS2S03jYBlSIQ+h9F7zF/KzEYnNpr388Wjti9WzOrUdRdad4q1d90yv\nV2sCcswbFcgnh1mbE7SHRZODbHJz+4K6PsePzQ9Fek8KEE/2uUPmLGfldF8r\nBNUf\r\n=GUzT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9612f5d03cf5b8b5eb7e7f678faac27a92c5359c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.20","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.2-renovate-major-socket-io-packages-9612f5d03cf5b8b5eb7e7f678faac27a92c5359c_1613813986167_0.300327782517847","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.2-renovate-non-major-4b5ab77805d72269773c1c1cd39593686e5b6bd6":{"name":"@balena/jellyfish-client-sdk","version":"2.14.2-renovate-non-major-4b5ab77805d72269773c1c1cd39593686e5b6bd6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.2-renovate-non-major-4b5ab77805d72269773c1c1cd39593686e5b6bd6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2251a8fd441fe050618db64e95891bdfe40c72c5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.2-renovate-non-major-4b5ab77805d72269773c1c1cd39593686e5b6bd6.tgz","fileCount":21,"integrity":"sha512-MmHM2YexjHjmYN+6fVRVqC2Ff0Hj+6ZtfACITphW25XOREGMX1bjrM0TIHni2Ayoz/lf+Ykyg3n0y+C7FOr/jA==","signatures":[{"sig":"MEUCIQCG2dBLHNoUm6NYjSePAlMgJJ5eNob8DMsYwblYLvAzYwIgDju6k9cljWtSEtlMBRnHce59OTZ4LH2p53WpvMEmwf4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMUZBCRA9TVsSAnZWagAANugP/1KcsNz+p2DNg3zVVR9H\n7a+4UlH4DJy+mQvhl/0gXxXsIRvouqEP0ymT/f5x9oE6JMh/1FcLhiDuqss9\nWjtXRS1Ji3qeGbAo2LG8/5b0LLPRRrrS9QvGoMgVi2WSUQ757LRf0ak/e74F\nJGW6TND4/osxDgd3MG6rxn80SDXvYi2wbP2axBuLzbpHuz1LE8Ery+UBosRk\ne3noFJFbBTLvxTQfE41JiZfHGjB6A6hnMH4bbdpJiT6cVq+SinibaC9UsEIc\nSI2/jQrbJo8T5E+p0T7/oYEkhamTUGO3y8pyB00VEYBwRtsA6c7o8nsbFJKI\nUc9n14GSKWZv/6vtP7/UlKL5f6W4qfurjO9h7BE/ZkS6qILzYc3EnD+LmTcd\nabeJrcWNtFWuJsvgJvTDAUoBtQ9RYROQjOifD5IL3vaaDI+zttTYC6hWXRjY\n3FUCcTn2jd1kcR2orvcapl1/JT1exs1umi+9URmyoTNBOuQfuSGWsMIqR+cP\n2o/NMhoTUv9edG/u+cx2QOwvVCBB63dtGqUyoAIGXIdkDcgDB7ftwdqPl4Tx\nsrHq9KU6HXycBPaoTazOKotI6d0LMM6MhzblUNRUy7G/gfFYa6lcQ5xLAc0k\npzPEnwS20skNLYieK+KPwvnWwJgJq6W6Xbv1ln60sOcf4C6XUP7+09Vy0674\nFUKx\r\n=uqSM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"4b5ab77805d72269773c1c1cd39593686e5b6bd6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.2-renovate-non-major-4b5ab77805d72269773c1c1cd39593686e5b6bd6_1613841984539_0.16008635736541676","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.2":{"name":"@balena/jellyfish-client-sdk","version":"2.14.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fc4228aced8be8d2faee9d54b1b8d83f06110ba4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.2.tgz","fileCount":21,"integrity":"sha512-QqiN//0Ljwwb1uNqCunY6aPNOtNzHXEXLrzCa6kvrM/V8CX9afaNsEK97QJrGs5ZBN/3D1laP9rpAtgJ2mYwuw==","signatures":[{"sig":"MEYCIQCbPbCLLZ9CnozS4/uuI8pNe8hVRf53PYMAaL2sS+Dv3gIhAORXb3JrL7bc21VsmCuYiCF2i7TcqDduBsx4nhghVH8i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMUbyCRA9TVsSAnZWagAAPqEP/jNhCwemkwyotke33fl3\nG6f3yLn2tTvzNGm2B3Icr0KA5w7oClZ3wBfwBDJt8QUnN4ZCu2DEAb4TosJV\nOOEVuM5/ojPhUeyVhFUVZku5hZOqTPBHLx85WWEryLP4dGxdH/C3epuy5XHY\nwQCRv1fLQCReBVkQ6AROEKrFeTsgZ8rXrIbqEVj1+LKAgEP1/sYHRMaiz2ck\nlvAu0NJg2qMKRcIru+lIkRkvl2hmpY3XWMAF/1esSD5mzXCCk8c+Mg2CHl2/\nAHAJEWRSy63EEI5wtKrBPdIjNlNtPhgZiS8lfst+xZ7Sh8p6sZg1sf7Q5fdQ\n4MS+2b+Z908v7imMTBoND+zMZr96RX8xd/KhGE9rPvELUwB4tW41xD7QJjGm\nqpNg83v2K+y/8VyzEuLZOSCRSHgwTFCf3IJ3MGDDxBFwRGs0TFbarqeL8Pk7\n/Fgtk9kmLZpI6cauVZ0F9nLjGbP1DWj4xUhSQU2Bd49RxCUpUF50zhbESYF4\nhXNFzed2awW9w3FleRjvYbqptAOkURN2fKSvLzdyti6EqtTuFUspfapASjgH\nfl3xeTG1DoJ3fwM7+YKaJQOkph+RdlVEcdnRmQCPgd+Bh4Mo5Two5Xf2nMcA\nEkXduLJVsMJNOkQ6UHZ4VMA/0M6JH6mm1tSmz0DwFPJ3ufjjTKRM4FUpkn52\nsN49\r\n=3vdt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"78ebb4fb95b689346bf290d8fd59e885c8c50168","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.2_1613842162355_0.07070034251397739","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.3-renovate-major-socket-io-packages-11916ade32f1d53e57de609733adcb560d0f4205":{"name":"@balena/jellyfish-client-sdk","version":"2.14.3-renovate-major-socket-io-packages-11916ade32f1d53e57de609733adcb560d0f4205","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.3-renovate-major-socket-io-packages-11916ade32f1d53e57de609733adcb560d0f4205","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"13aa85ecfe33506428039795fbff7584ffcc34af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.3-renovate-major-socket-io-packages-11916ade32f1d53e57de609733adcb560d0f4205.tgz","fileCount":21,"integrity":"sha512-/BVEOTJtQcYwIUfg0NzXUBT9a5noAeP4b/ZmMcxsS51XsagNfJ4KnBI7jA5gRTas77t2PQCMuG5KF8quD6jDaQ==","signatures":[{"sig":"MEQCIFcwD35cLTI9f+uWusTvF4uurbFGeKh4gvoZhNzvkVBBAiABC1iM0tideGnyD28lcn6M80oqrHncMh6DPPT3aoAWnw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMUe7CRA9TVsSAnZWagAA5I4QAJ9qEI9S63nhP1D1d+9g\npN3zjFzCWDkpblKEuXDqMijqDQCXZcJO8wq6Koamejb1oex8Ckodkfp6S0BQ\nGubZpFMhpcMDJKwIx2mByc/8lVeHwnEirjt3z7p8ZcslByW52/GLrb1NGgQ5\nwc4xkDty1hTPjO/evlEY81aKRqJL7xTKbce2JtcSAt77osFvL2aNaQT8or21\ng8ZQBQZfQwgNO1LbAFaLj8q1cJ9+SQc14UOoPUGGQJqtb22DgmQpQPMBr4JY\n3nFDqCpjTk/LB4qlUFDkfemlc257o9WVPiiu/He7LCctRRGHjCrdfMzma/N4\niKsc38Maq1FuQ9RDdcioKB48609LIO4viTuU8+NmiWg+fXcpypAQQIEQEBVY\nBaJ0RjauX3JwsfqsiKXrdwcYiNXxVv4oqktrKFK30KpIvRc2jes1anGdeHX6\nAMhDdaNQdMSezaf3NxvsRnE/dJMDWObK2XzD/8AX7w3nY/Xr1EUG9fpXuG/D\n4sxVdwpUnGfyqDFOZtGTb4nW+vjNKc7nsNhlH/y1vRWh7NAymqGoEnl1qdzj\n7q2VsrNua1+XbbqSFkeKRXKRU9mn8xtUODaWcbhVXWLm7PYAcrzgp85q21Af\nftJRy2eO287YBZvwBIJ0TbgfKRYTknTgTOkdHq4xZJPRftB+O9LqAMh1Qv1B\nknwO\r\n=tpVb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"11916ade32f1d53e57de609733adcb560d0f4205","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.0.2","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.3-renovate-major-socket-io-packages-11916ade32f1d53e57de609733adcb560d0f4205_1613842362727_0.9978157645551693","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.3-renovate-non-major-363acd09a3576e687634099de9bf5409183a07e3":{"name":"@balena/jellyfish-client-sdk","version":"2.14.3-renovate-non-major-363acd09a3576e687634099de9bf5409183a07e3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.3-renovate-non-major-363acd09a3576e687634099de9bf5409183a07e3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"76cd98550434380f7796435fb955c7ebfcb3d52a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.3-renovate-non-major-363acd09a3576e687634099de9bf5409183a07e3.tgz","fileCount":21,"integrity":"sha512-LL5QcfZeS/h0zas5bAdOYsSx63F1FR0Ep63WMcVtlXGQ5kem8kzzL3JbELDTbBIHBouqI20vBUh7gsEZpXRavQ==","signatures":[{"sig":"MEUCIARshnpZj8IgstxeNzj2c5mBQgbVKD/NpzHGZ0f0shoGAiEA4D6BL2aLrs+AkzEjVypHuEYFsltgvpkHJtgsNrzGcLw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMeQxCRA9TVsSAnZWagAA2CAP+QFaxbE1sQVW3Ykfmlxl\nfEDGTCsHWl2FS1nviiw0JdZQP8Uqd56ajck5JMZjjHdDsLuQ/ylu3BHA6pyw\nmn7dFVpoTiu9z3oxqYaIfYCng0nJzb1g2TYjcyc6GznbQcto+XsfXLngFUIq\nY7VIJ/j2pzOXD6QrltJAymInZaqYRCiFqb8CJmtDavxiUjWDaWYeYHhybruk\n43mMTjyxNR2X2zLM3gqx8Wjttph6BJDF3tYd7kRj7AS29io6hFK/FMpFrpd+\nIz55y7S/EV+E2FY0rxsMBG+G3InjS0OwjkvAAqThfa8zP0DW/Gg4eMwG1/wl\nBjgONyAKPLnglLmOEMssTfCQR7TRq5oopfL1Osj9VM9MLTKNthz8i3FnQ2xm\nHdE+NQag0Mno3JUgt1DUQ3dtGbr6O96qKsntEOohwv9FTpcwDRJmKESeFGPp\nZMXO+mhD28LxVGzUtYbt8U0wuYaXRuTP3EX3/XxTFqwUqLKX78mMsNmTMonM\nKJDUqbRv0u6wz6gdrsJqXZIn0wLM1oj6H1z3RJMHLEpqdYVYxdfQeRDBpe0W\nQ786cPxLPNrPBA+hoU1sXIvv0TsB5jHPGCzgjwOOvyWYfoL6LmdmtDBw58sL\n8RM/KDuRsksKJKmaB6OhmTqj4+YefwPQz5vG+3xQycT+qkCR8a7WyYHpX/CC\nvA1M\r\n=0FO+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"363acd09a3576e687634099de9bf5409183a07e3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.3-renovate-non-major-363acd09a3576e687634099de9bf5409183a07e3_1613882416629_0.6663152645809594","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.3":{"name":"@balena/jellyfish-client-sdk","version":"2.14.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7ab1f30a7785c611ac9a3e60c3d5243efaf46a95","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.3.tgz","fileCount":21,"integrity":"sha512-wN75mjkMOa4bpx0MxdQcesZMa2kWnHIFQ5H35eq5iMz7IoQrFPxy9D/r6Myx/5JPBRMVEa/qw8kD/RZlPSErgg==","signatures":[{"sig":"MEUCIQDSslPoydgo1T8ftrtrZZM4cB7uRPO8TwNDRz9o8mTY/QIgRpHyKRCX7kTXxONMdZJA5hvmn84z1wvSKSoadeiKS9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMeTeCRA9TVsSAnZWagAAuNIP/A8SfxRhB1wyDpLp+qvb\n975Ol4QWubyPkufXHBJezRwLqJO0TIRsAKnlROWXoFaQnKMUAUuRG/4BOsb2\nRbSoBC9kYY3dXOM1XV3gKdHohTU9bdva6OhlBemDa0R9h8MQITyPqxTqnt1/\na5Leq8gdqjM9mC1qQC+1Fy70EOX1x9zsM8s4XOuiy/jHVaZeM1Wkgq7Vy/gl\ntpMKCFY5xRVDwsdLyjaENOssiPmYGaUGrMM4HmeO2MgQq3feuCGmf3HHTIOe\njkQt730AOOUoK9xVePPpgE67mNXhMSX0QfUx7FfB7Y9mzlO/XL/KPqHVlS6I\n+MXUTqP4sgIik5qYPbcGHW25APvQrZqn/vOM3vv2Gg3vGsB/DeGEMrn39PiK\nhPBLgwryHg5DncH7naSrYETMxHyTBpGtp+LHHst5NotJ/+8D+6xcBGAw+/JP\nPW2Stl6WDIvuyXFpsPWxxEpskGeDap19YROON3oJEV3Sg9WHibhsikA7dHWg\n1/t5/Lh0SO4YAfU2FI+NG8bAdYtfpo5NtJhJsSS7D3a7K7LTnolZxXFrJYBF\n4WKelKkuSJhrIpomPlo5hYNViufiZCuAFCB67ffnABjY2SvhoWBP6cRIGOn6\n7BO/0CeXKT3JvhJxIF7xP2UsfidVKw9+fpgeAx+/n9hKK4vTtmXPmd7vwvk6\nU1fq\r\n=iaXc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"7429fd7c5228756ef95d6c6d62e1a35830ce2033","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.3_1613882590347_0.6833368927984247","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.4-renovate-major-socket-io-packages-e2067392a583bb3be85d928293a758ee092119d1":{"name":"@balena/jellyfish-client-sdk","version":"2.14.4-renovate-major-socket-io-packages-e2067392a583bb3be85d928293a758ee092119d1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.4-renovate-major-socket-io-packages-e2067392a583bb3be85d928293a758ee092119d1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"02a3f0eb24fd2faeac0bca21ff9ad28070d9ddcd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.4-renovate-major-socket-io-packages-e2067392a583bb3be85d928293a758ee092119d1.tgz","fileCount":21,"integrity":"sha512-fO8bOvYSdtIoXP2oDiN47QNZzef6xwTYm0MD/HGkAnOap0rJ3KcfbgGNi9mHWK8BnQqPpUCWbm6IYrP8gtTpxg==","signatures":[{"sig":"MEQCIAYJo9a4e3/3+q87w3Nqy7NfWrEzWaad3EBPu0caFmARAiAFidHtRzlqN4cbgEQHGMFtfj7Az43vf8OXKw9TnWfsPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158362,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMeWFCRA9TVsSAnZWagAAqQkP/jZZHQMXdYpP6lstam+k\nfsBN941iGgUVVV4s/tHEaxPBSUFqn4RNzvzVVg11Jq11ufgioOlx0Bt+97Q6\nIxrHQt3tyIz50y2Ma1gjqpOo6HCAkJNHdVC3pvVK8+Xs7x3lFJCGdwDE3ZAn\nGwJ8wWmY4m/EjALh47sxckxrxV0kGBFr22TLGcimRFGZYfnuOo3TEa8Jq2I1\nSW0UjfErpw8zj3BEJywK1oh4AkLTv4N4rnXE9B7kNnNYfRAPxqsO8hGNgZxy\nqiqL3C5EASJo0KoYP7LZuwpbgWIM9ofU3Y93VRvVJAzwz1hZjv1vY07GrXDM\nTZIaIGdgsgwuBJ2aleuTtopyoHzhHsWqur1o0Ryh117Rqs31i7ybPDxUwXw2\na4K+54s3KxuEhmqBAvlwvJw7Psogv4QjPlymUZdLfZ0twxNziW0hLLqBJaZM\nr1BdJwgU2oSqzUd5arefa0AYS9LINbJnwxvH4fOEoiHM+U/yODpWeNdiAaD0\n4n0CxVRY/ruEJLiWPlvbkCB3zCzSbmDqr2zTEM5bPZML6868YMYIYS2tS99/\n1s7hEObCPsni4ffjTtiPybNisHGimLdscBRWBUqRfQH4vocXaHK8J5HmD06b\nPHY5yi3ERrNPyLlt7P/nXHH468rsSanZiaa4EPKSEWzenLy3y01SCz9vP5t1\nxxhB\r\n=2cZ0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"e2067392a583bb3be85d928293a758ee092119d1","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.4-renovate-major-socket-io-packages-e2067392a583bb3be85d928293a758ee092119d1_1613882756534_0.031765867880716","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.15.0-generic-oauth-64327bea2d0398edfa214960a713fe1a58c2f5d4":{"name":"@balena/jellyfish-client-sdk","version":"2.15.0-generic-oauth-64327bea2d0398edfa214960a713fe1a58c2f5d4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.15.0-generic-oauth-64327bea2d0398edfa214960a713fe1a58c2f5d4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4df13b75a8bc894118174b77603a3c6b277d3629","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.15.0-generic-oauth-64327bea2d0398edfa214960a713fe1a58c2f5d4.tgz","fileCount":21,"integrity":"sha512-Im/bpNt6QSRDZKtmBrUjKa2E7FKjxNhCYmDZIVgNdfaqeuPL9rmO9pgM8w6GCaec1VMHGbl/OB794lKbdO6Hhw==","signatures":[{"sig":"MEYCIQDABwuKJ8yt+g5mSuZz8alThZi59PXQXFL0PSRMxIyc1gIhAMxlISvWheqpaB6qlTy8FUo0ldzzIqJIW9QWVR7WOzAz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgM/C6CRA9TVsSAnZWagAAfpgP/210kBDZb7fsBA1n/AEA\noIpBdXJWEp+nnymSTZ+TPOlsat3W5DvAovFbv+1nXs8K5hihoW3iHBa3mUQ1\nexzt9v4cICIckqIYpiQ7Lq8gQhaaUDYIyPPKJFjR4+VcPR26Vw+C+dug5O66\nARH6rmIFklc1igvigil/WAxSfeW5jm8dsnN/3rQLiNdwGFMVh2zPPg9zLUJK\nV1uHNhpas1HbfcQobHZfjRYWZhGToBhMjLB4GQed2JmIudZEPpXA8wuTtkIR\n50OYyOzajnLK8IKQ79ql8ubEobyP9Sw+ZGBNvTLjPxbHJziF0I3YQU9NChVi\n6XRXJLLHGu9Wez8JIsv/0V+ntyZ8NbrmF1QL0htnoluME8WBHYDQ+lQtMTG/\ngpixgwGBZAzAHxPpSjdIpdpVSKe8Uws8F8gaMzExi+V/FStMDRtdytTH+olU\n4NMaomGUrSXQKGc0c26NAE3zHKr0OlTPeZYD1e4Dih7YcIOaMr5+tSLoAXXM\nqcTHBl8AyZbJXnS0iULmCcWGAi3iOy3bXl2X1uD2CyeTuAwTdIN8iaHNOMcM\nipfCOwObwhUOHuoTlIAYShF+vIzrdCDMbC8bV/hWkWF2zmL1uIyTY++rSbf9\nptJBTyAOV0ie6Tw0YuNRLWV2rOILvj4gH+/nOepsq6IOWZpIDNKEbXMjXd8e\n+B20\r\n=CWH1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"64327bea2d0398edfa214960a713fe1a58c2f5d4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.1.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.15.0-generic-oauth-64327bea2d0398edfa214960a713fe1a58c2f5d4_1614016697812_0.12820617676849277","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.4-renovate-non-major-c24452fc9ac466a42bc7e7ac7132421ce89e4a9f":{"name":"@balena/jellyfish-client-sdk","version":"2.14.4-renovate-non-major-c24452fc9ac466a42bc7e7ac7132421ce89e4a9f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.4-renovate-non-major-c24452fc9ac466a42bc7e7ac7132421ce89e4a9f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dfbf5288bff41c2a62f7d03a4e83751dd8cf5785","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.4-renovate-non-major-c24452fc9ac466a42bc7e7ac7132421ce89e4a9f.tgz","fileCount":21,"integrity":"sha512-4z1RirL7xk1/rUw9y0szDRRplEVkuflwFFHiR4R4F+s/8g0JGkAOtpS+dBkb7eehATLvQSqT/iAk6VvVmon0+g==","signatures":[{"sig":"MEUCID2O7i/gBVcq8kAkO8FSNfXcHjUqVEtd+D3fEQEkvB1vAiEA5s2aGbk2VaxgbEGzZ0LxAadq7EDAF4xKPhMRD60NTTc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNG91CRA9TVsSAnZWagAAgmgP/05nlGIaGH1vL4lR/WTR\n4hhZebOSzzqcMSPzh/SVo0DZEuaZsNnqO/7AlSlCCYTcRObGiphuCjycaNrL\npVUwQQ6ysf520ROl6MGfZ2qnGFGLUt5qlkK4D/GNSjX0n56IiXVdyi+zvv0o\nfkiYtnbGUCxlCDgCk9Hq7DLpe71Vz7umIhtxJJsN+JI9OmnP7DhZyp4byPX1\nDU9fT24LwjBA/v9qU86n2WbVe14gBCK2UFEbv33ynxFod0lNZjmnEwjSSlI5\ngT3rIbNTNEsgAKt4rHGEygU5kEjRT0Edv1I7iHZV+c4LKQu3LW89c2J2SUrQ\njl3a4FXnORdpBLxrNPq9av5WDJAVutFa9b0S0J06mrk1lF4XoaAlTaKebsoB\nx4hVeqZn2/y4iUcNR6Jb7/ohs0Qu1IRWt2uq4WwqlA+wLp5Pyd3CXuxYuaAp\n7oKFh156y/mIqPaV2Grzd/T7O45Fw3BfScR5U/ERXrdpL7v24OivgzKVjmZ+\nevZgdtQdBdM9dH1Nn65KMFPDn2E39kQVjcVpW52kj9E4f5SW8ZgQvj6PWpk7\nOPmzbJtV2xEfSEiHsbCvf+JzlGGIXCtx0PoLvgx1D3RmQ8R1//VyjJx3/NEh\n+pLVw/O/LHwzAlg4vkcenY6Mmak2nrv+o6mjTifKu1+qFNAZA3nJ96tvfxz6\nRLuR\r\n=NEMC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c24452fc9ac466a42bc7e7ac7132421ce89e4a9f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.1.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.4-renovate-non-major-c24452fc9ac466a42bc7e7ac7132421ce89e4a9f_1614049140945_0.8394061331340272","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.4":{"name":"@balena/jellyfish-client-sdk","version":"2.14.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7f9fa329a1d9a88dea1b6d3f0418e5bb85469e2b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.4.tgz","fileCount":21,"integrity":"sha512-LX45S5Xdy109NzI6zjeycwqma4GS+35HQCelCLhsS6gY/xwPHsiOaq/dWHy9vdJjD2mzMzoJg4t/deRAgOJMXg==","signatures":[{"sig":"MEYCIQDJ9WY+4Qn60R0I+jl2HhG43YZggpb2hv9aE8+3LQNmDAIhAP5S1LKWhm6QZ5i9CheHv1qmVnvL5cKo7CHAAFHTAn3Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNHA8CRA9TVsSAnZWagAAez8P/AgfIzSWD2J7OnIy9YW8\n9EeO9JfJYHcOExXJ0BPalm6H1PpUoKnb9E2h8CFNALGD5rUqizlCrIu8q1Yf\nNSnDkByB84SJ9uQtz0HZ3RVxMbNx45aRGqViSfwpGFaSJk06DREZhgi29sJd\nVsAeQCR+83C/Zga7OHN4qR9hMtH9keG9KMwuvaSUSTzZSVf/z6LW2dgBBRAK\noZjQ+SZFZGjQKzxpAWCMC7nibswv+x+vcXTMbTi//uoKQl9wG7Z7G+9kIKkI\nwwBCNRxGt1SQtWmXCqYz2gBWvou8GlT22iGFTgW7ImBlx6fG3gzCX55dRa8u\nXFNuGssP0wKDAvHdhs4ZEEpPqFhOWKgzuTTym3mhfepBCKGtCLkAP0AhRrk6\na6x/VwGs3i/S4ujoloxCvpmbGScjqZvpk6vgQ63XeqQEK0kvjLrrLGE7nVMB\nYUoj8rLzqVG3Z4lUiYnB1qLPai7Yd9uAS/0eiqfhIuEU2zgz1EkZSjcypG/Q\nJ8WL9BilF8su75rXNYlFk/U1nyJ8hn4vFAl31OaG/mehgMoFgGnSDfBsuXxe\nFsk+gvjfIORKKLV4eJ4ZXRvrf1xaWCpgs1wt+cZz2thHIi3cgt96Y+kqUeJQ\n57B790+7j5IP9kASdMcPPNETKjBCTDexZh7OThhje7PE0rsaJRTP1TDGdXc9\n42jQ\r\n=/qQ8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"fb2752ccadc5d0844f80476bf269cacdc3100b11","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.1.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.4_1614049339533_0.9929284190982399","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.5-renovate-major-socket-io-packages-c955004655bfddd68123d3511f0608464f27d73d":{"name":"@balena/jellyfish-client-sdk","version":"2.14.5-renovate-major-socket-io-packages-c955004655bfddd68123d3511f0608464f27d73d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.5-renovate-major-socket-io-packages-c955004655bfddd68123d3511f0608464f27d73d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dc6f52ad01141cebfce18f0a4ba760e821fd18f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.5-renovate-major-socket-io-packages-c955004655bfddd68123d3511f0608464f27d73d.tgz","fileCount":21,"integrity":"sha512-hWwnojKPW+EDiXLGTboHdC38/j3X0B3e/8oQ33oDwUY1wre0uX4X7vhz+c34jqt7wPxdRrLA1k1rN8sw/jwgUQ==","signatures":[{"sig":"MEQCIAXT8mZjgiJU2Gf41V+W4hlCraYf7/htDrQ4a7ZFDg0tAiBSQPxh9pyF/rdcgZsqxntR35fOBUBKnFAnN5xq/cd0yQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNHE1CRA9TVsSAnZWagAAYw0P/3mhXwyppPyRHNROseH5\nfuUyN2FUUnyBeBu3Ew/11mwdsI5k6OIg2fT5EecSgtEhgd4KWZajU3fT/3hG\nar0I3by1WCKff0elDuPVe7wXS8JH706OsNfbuJiBW3IrTMoqzCUSMOsu7r6X\nP9LX3BO4dA4gJMyxD32ud8ptbtrqQLemaA5r7zpnhAB+E2HRxZaQ/EtB42UH\nYiv7d4DQ6NVDBYRJCpu/DCXiFr8suTMoFfugY1UuFPtQydlYmY/Zj0omE/53\n6WhV3kIafL5q5bkzlViiMWqkikC89scE0LGWn5gabL2GvclkU1ArISIVFSoA\nIY+S1G9uZJzEKC/cZXTwPRMshLsfo3udzFlppMDQQEzdh0CHTgIymV2rAo3m\n+X5/QpHqNpOgtq9ob7mehGIzDstrhejEqw0b8vjLhNIFVz5eRFf/7ajuCPKU\n4p4vPo7YaJsgHFk01//V8TmTXR1sVF/vEqluFrlTk9Q8gVJUhLVcn9votIng\nrPR/hzZ9iNLi5Wh+XLy0ZqEqKm5gmpHy4Gth5qqbzhpc9TE1UsQqKYBgL0GV\ncRXs0NVMJFRagUysD4lRaIJkw+jpAvbtSOjp2EKB9EWCjP9gr2pVcQUctvgE\nYzBt5G2oIVnR2mKj3PZpNseJ9osaFWnZtAtDp/XxCPLJJ2j68iqSA+EXzL6O\nEA3P\r\n=ODJe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c955004655bfddd68123d3511f0608464f27d73d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.1.1","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.5-renovate-major-socket-io-packages-c955004655bfddd68123d3511f0608464f27d73d_1614049589375_0.08848464995942318","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.5-renovate-non-major-7dc84a50639576e4759086b88236546d399d628f":{"name":"@balena/jellyfish-client-sdk","version":"2.14.5-renovate-non-major-7dc84a50639576e4759086b88236546d399d628f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.5-renovate-non-major-7dc84a50639576e4759086b88236546d399d628f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df91a50c540f8c23dafcda47e038c7adea22fe42","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.5-renovate-non-major-7dc84a50639576e4759086b88236546d399d628f.tgz","fileCount":21,"integrity":"sha512-0AWvvuh4nnouWGYCcC+PBVHaPBn9319sEWZLD+VevoGU6/tpOhJ8540UqP/KEDL9znXsNjaV7FIcoO7Ftvrm6g==","signatures":[{"sig":"MEUCIH8aZ4gz8/0mby8mUVtl6T8cE3w+mhUXncPQ+JYJ35lzAiEAwTTGSPY1ZA++hU+VdNhVi1wuZFBEzE+39ePe895OyAI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNNlTCRA9TVsSAnZWagAAdZYP/2GqvlohA+cOcKW157Xk\nJBvlQkJEI2+lqfzD9PklkMSIwiFrkS26Z0m6xBxljtpyus1Jjf8uNjAidOY3\nthkXbtXy2EQd2UFQ7Ua3YxUQ03tNAVBBMxatTsIVsVrrP/R0wwI09CPkF/PG\nmUymfd+C2KiuANRJlApmcZjQd6JakcE8sQpR/Xc+XQeCdSUU7koyGMpuiAvo\nR2xoTpYFCOkwrpnF/ITH9QpwmTDas942aungOz7u5Uj7+cm5IT58mRnjjzbM\nwYm7yisJ7iopAf0z9lQS/mANvwQUczMiMtFqW6ys1E4eRI8APUEGDBlK6l/J\nvrRK/QJ4hCMmWeqcjVdv65uEmVZCVUZbqV9eZK4GZcfQYmyH/FAj88qlEMk1\nipeO8v1nvmbwqcQTcUFyDRP9TRmOirbNQ92Cj917R8OOcVmjfBiYvnOGt+7u\nyhcqUJQi5nck5x1ZpzV7Hknf9CHOqQKqyomJYW1amQeSnEBu3kqEioxHIHi7\n3zFR6IrqQGOXGMCWyzadoph0S8SI3G0sjSWRGaTuPPLZPPIi3PZEuxH0AGlZ\n6vh3PR/tX6T2HG1WoefrBO6wtmOGi4xCA7CNgm36xhwE0deNGvu/I9Lpf32H\nW7HciHitffTPvanfOmAJE/2HoZ9ChsTcPdSoGrqJqKRnq2rmCwCDqoACgFrP\nfh5j\r\n=lJkB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"7dc84a50639576e4759086b88236546d399d628f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.5-renovate-non-major-7dc84a50639576e4759086b88236546d399d628f_1614076242680_0.14001966987693115","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.5":{"name":"@balena/jellyfish-client-sdk","version":"2.14.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8bbee4af203cebd8c74e667fa94a82b50ca9b898","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.5.tgz","fileCount":21,"integrity":"sha512-FDtEjREnIZI+SY/Pdb+OTbm8a/C+eXPCPH3AGsVsvM8o8Ovua0LOod1uqhADgDQ2w2Xj76j6+FhxvuBeyRr4ow==","signatures":[{"sig":"MEUCIDPa4lkELm1BI4nXGFDEegNY4x6A0+VIx6qThQpMYAjGAiEAtONLODwgQh5/2srMcWS8GIEsZNNkaZZUKR5Mj4DfMlU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNNoUCRA9TVsSAnZWagAAsdwP/1TeNlv9uS4rcZP3soiq\n3MXF0EYL6TBfD9nVLzyI+c0p7TgXReVVDEOgneCxI8iE0bj8U/qiG3pXw52v\nzitl76XbEFdCA1qf0AGGxMBIUtjVnz6lEXG/iCT2TAJe1NXjUEHUKfCnQ0U6\nWTRKT71VXJq0CyALCq37Vbnds8fAXnR67EDmj0ap44qDm8y+gdYiNUIYcmjh\nUVGZevMBhNVVdRTHzlGHCS9xPnelxBcAptovUm8ZX1V89Rfzd0aml+1gfS5K\npSjTfwaE5DyvU7cpzWFR2YBeQtsmCkAoW8GeEh01qZKe9SmTIDqzOFcmHsgT\nj2KRtik0am/NohJbiOBWRBn7b3jxQXCe4cF4VWagEHdKthGlAWqjEKoEZLOR\nyecFRz+jhC7H7V2l7VZPpnP95ld0kJi00lDoEkPgF/7dKpqYW0lxHCbejObP\n+MIyrx8WYwcqd20GJ/SYdfd5QuJV3wkmsKbLzcMnq9vunBACY+wZHv5Sibj9\n27NcpWVn5+HsRwTZ48AvPmTPGi3qG/NS/qdTtlRhIZN5504UmzAHiVJrzvNJ\nRL64PH3AyHzoimIPRJESsY1OBXNm/iLTrtM73uTwgRL//KPCyIPJTn6aHPKr\nI4WKKjH1zq5jsmZjyKKPYW5QjlQ86muVjC2WMu9ikOWH1HfWi7cRaIuayDmm\nqkqS\r\n=KoSR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"9978ab6d0b411e4621e15428a01f57535d79faa8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.5_1614076435259_0.8602752698510514","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.6-renovate-major-socket-io-packages-b4c06236de97161d595172b5fb1a794156efe4d8":{"name":"@balena/jellyfish-client-sdk","version":"2.14.6-renovate-major-socket-io-packages-b4c06236de97161d595172b5fb1a794156efe4d8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.6-renovate-major-socket-io-packages-b4c06236de97161d595172b5fb1a794156efe4d8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"179e401f45c0989d84091dcf1aec93d161dc9759","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.6-renovate-major-socket-io-packages-b4c06236de97161d595172b5fb1a794156efe4d8.tgz","fileCount":21,"integrity":"sha512-2RLNoa7Mdh36I3pAuxPnjc6FcvfhNgfCFeND3LlRRg/VbpxDWH2/v4e/LEpUP8YdBSrXpVb/Vu+Ny/9iFvBe+A==","signatures":[{"sig":"MEUCIQDcBeKgBnJh1OLDQuf9ZHZouUCq/77Dv14gRkqhBJr+IwIgGfL1ny+GVgJFw3zOZv4DRuWjI8coe+1u4vazIbJlts8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNNrhCRA9TVsSAnZWagAAo/sP/RlxJMDs1yn+Vs6G1f6Q\nmOMeZseQCiVT9q+noDT49K4ZBDC1RqvRbCzvZAcKAA6dLSKc966Y/1UO6Yvw\nDvcH4zV85rGjwhTwS8xOSP6H1bqacWM14ianFjzcOA+/LoJzuJnnT/G+UTjd\nCEwjqrKNRYzWyYOzYmZbzYO57K72A9L3dCZAi2ibDrsEb7q4zzE0WFfpIRkl\n946yRS7AdXksegYOM0dIBgn1YK5b8YJ514hwUzD05pUGaxoLMhPi/VM+Hm8s\nEG72eKPPj9KedipdDXDaOdLBQn0brEH1kl6FOjVbA0RJ1nEQmNedBdT1uMrJ\nxLVEmCHZnOSsWcb6sQfML2v6ZeR311grNz+w4MRkAWIVLLtbheQ2E0wIvmKv\noCONCRbEs+WenmH5eTsaW57+HXbbha6Oc0pMk8yotpMdv4BFIYlUHBREXJsz\nM+BS3tWFlKhrPBOABHWk3SfB20NltXsalb27Md8O8HNf/zzBwZGrbyTfNPOO\neOOf4Mh/TVA5nqT53r/EQJ8D4Y0QHUMYvlf2N2QHa5fDvzdfq9eXG7X5yaog\n7UJVhfYDKolRlcD3db4WQvKBIKDeBg+QB9zmPlAbpg5aN4bbMLR5ahuMWMyf\nX2dsntSQCAtN3B5bFIsbkcAHoteeWDf7lRl7e9rBC1WEJ/6wkvJL5FvVzZdP\nsD8I\r\n=NWFc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b4c06236de97161d595172b5fb1a794156efe4d8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.7","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.6-renovate-major-socket-io-packages-b4c06236de97161d595172b5fb1a794156efe4d8_1614076641289_0.25943811193704547","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.6-renovate-non-major-b16f39082359ddc47635c2b8940b3790b0943acf":{"name":"@balena/jellyfish-client-sdk","version":"2.14.6-renovate-non-major-b16f39082359ddc47635c2b8940b3790b0943acf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.6-renovate-non-major-b16f39082359ddc47635c2b8940b3790b0943acf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c6b4ebf2621244b2f3494b09c003c37e548888ce","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.6-renovate-non-major-b16f39082359ddc47635c2b8940b3790b0943acf.tgz","fileCount":21,"integrity":"sha512-Jjmf4qOy2g0j+AnDCDist5939PtbPnF7KkGxT5GnDejpwt52SbskvdHxLHSdwsepYWnZo0N+fZ88SmcjjQ52Cw==","signatures":[{"sig":"MEUCIQCM1mnNQqoE/ntMoARQvjGXEbcOCvXTYo0X9dGOHx581AIgGZAHVMUF12K9HdVIgetO3dWWB2cX/Axd43lqUIwfCEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNzSrCRA9TVsSAnZWagAAtDAP/3O/7pWJXpMXyP1Gz+kN\nyWElkAZCbH6Ku7+h+POBPHDS2JV/vKdMVwaLuBTRT/ieK2PyR/lbLhHhqLzd\nQNpt+ECfBMEknGLSvONvxaronAtVyQz5TeOAo6J3gowzAM9DLCe2bfo6+Bcy\nIhcWQPzaTCpUkAhjAiCbXvo016I7Pf3Quk8H8jibJUaALCXgIN96SqTVeJzc\n6/ZWU6afttbsGgxAcVuCkWwWg9rh9/Ev5FRAbQbGmBfm4+1K9T/A4gL58Fnf\n9dbcArGj3OLeURpfABQZTNHq4HyrkDCX5j29sp6E+ed6l4m0URCxKFssWsnv\niNOTHuhM8pdLrymRU2fVBPwVerJPRL9k2FJuh/amnpgYmO6vJC5kpPB7ULGX\nhLjWdGT+uKiPruuRmpV1/Dv2xKfMVIzb60Yduh/oQ18rcWl2uZ7YwVjUmH1V\ncvrOyMoo8qXkOhSykLZ6uGcDWiJ4wLDTTkMAikDtJ0+fgHBuBLBO1RV/foLU\n9ZC/uG3/f0ki+WaXqkTrN5xImGHdV5bKruZGy0GHeZ+kE9Q+I+oFVj/EDYJO\nzTfbsvfMRa5nXqrsQmZJ/XazQ3Vxuw8wyp9c2/LWg+0uGel25OWVctVAVnVo\n6MMZ4+5Cts5tBiiXrSy5q0+q7gbimuV7Sd+cuMyH7+7jx1IZsyOszRkuBjJQ\nCzlZ\r\n=Hfao\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b16f39082359ddc47635c2b8940b3790b0943acf","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.6-renovate-non-major-b16f39082359ddc47635c2b8940b3790b0943acf_1614230699412_0.6069637053581975","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.6":{"name":"@balena/jellyfish-client-sdk","version":"2.14.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"eb2466cdaaa422f5a9f47649754c061756dafeec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.6.tgz","fileCount":21,"integrity":"sha512-VbEm0gDnDkQbUhMM8QzCEaqSHvKQVWtTuEC68Qc7P14nqbUci6muB0UDdbzGk63vq/zReRq8VuwqzTZIYKDdhA==","signatures":[{"sig":"MEUCIATRdriIsoiicKyZQU1Mc7rGQqMFvCPQhP4aik5IQMrbAiEAtYYBwp4ny7zRlXtZp0cAsEELh4BuwuzSazxy61+kNYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNzVfCRA9TVsSAnZWagAA7s0P/34QnVmrILTBySL7vUui\nvJMYZBExOLB03y+kPhqSteVHHR6M4ab51mTdBMhV+f/t8itLGDpCTAGh1uVP\nBpcBm+HEGtYLrpZp/HYAzS9HDpPEOWWHSab58tN6ojIXZI+N8GG5qQAgWtXi\ndqXSCmA4A+fhkRl1N1ZXPjYm8Mmw/rbRTDJs7PsYGwUV+98Pfo1afXmSUZJP\nPUTMuUwUDRIr4H0nDdfIaFKaVYRgixexszos38WhXE68teovTIEe86bNqvxT\ni8npUX/UK0nMRuqr1LlJPTggwZ6iyXkFaMtzEBL+dHB0y0nXwdv3xBzfJ6vZ\nvAMQ/9RrZplLp57Ekiz1t96Cte1IDcQxAmEP2nGB7jlTPuXmSGocBiEJ0QIS\nnVKiHw4NJaD3A685jndQo9jqUtNvFZU3dHBSBwD5dZeG7nqeCdGIf9bOJGnP\nInfdxLDQBZ715xrhX5LDRTqdEftBtgkdMDpMSTZ+dx/k34B8g68NsecihBjH\nxcB66MmW9DOLGsQJut/bGzM8H3nWn6AriltkPiHM2EF/VEZDRNVic1lBI5ol\nCUWqidfrOaMgXfv3EQPcYDPs828cc/LLZT6o76lkNBKPuK6BI+EHrYHl+DqS\nNe+u8OnuINTxbF1b57pjin4OH7I5mFfyD6tqg4TnlO63K/J6D9LtZdZNVSTx\nMMNu\r\n=yrog\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"91050af8b18ad45e6b883c442b7deb5ebaf49a5d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.6_1614230879308_0.7053366779291479","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.7-renovate-major-socket-io-packages-925157c66c5a799cd285e86a43fc424a469d6f0c":{"name":"@balena/jellyfish-client-sdk","version":"2.14.7-renovate-major-socket-io-packages-925157c66c5a799cd285e86a43fc424a469d6f0c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.7-renovate-major-socket-io-packages-925157c66c5a799cd285e86a43fc424a469d6f0c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1e174f1109cbe99bff9f353d4c5717f9d76fd60","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.7-renovate-major-socket-io-packages-925157c66c5a799cd285e86a43fc424a469d6f0c.tgz","fileCount":21,"integrity":"sha512-fqYq4WY+uhyGHUFImoVsY6vEd1CqTLuc9yrS+L0e/a2luA+DzUjnDXcoqk1Si5tvquUgX7BdOmyfMkxvDc0LOg==","signatures":[{"sig":"MEYCIQC60e07av9sySZSgxT/WcE4Ym5PnxCyElo6QsAKG5lCVQIhANnwzbuNrpSYhUhubHLACgE7T4iWnI6naMYOOTa/lkC5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNzYQCRA9TVsSAnZWagAAzysP/11JK4jgsP06tN1z7mrE\nzPc0mMdZXb42YiAD1yGCd6PF4XBeux4h7wEqCYXPbns3dBFbKopYWpdr4cqg\nfxfUbVizV7AU3zhU3UpnVZcKkCgMQffLGxzMQG6fZ9FmeWlyYaNglHngdVQS\nxKN3Wc8KlbEHTHW3eaQobjVd7AECKJ36ZA7gPvRhane+CbfljmiR4bDMCePP\nIIh3puIt3tUyndde8+100I/RBQxYgJFFcMS0YHwNbzXjct2XgmOj45eE4/5y\nqscnhiYDMYieh2vAWUpo9BFPii2e+USSfjBYNEb1F1mrBAv/m+TsNwCdqxpb\nQDUvwLbcWUC+gF3/qLXAxDbJ9atM1/PRaN2Sf5OtT9yQ5TtwJnm2uDJA9mwG\nD7M02QrO0QWJH9fgmdJcKxebKsJswhpu0WOQhSPTyf3W+Db1LXBgOmfUAoPH\nQTfr/4BzBuOWHsFyMFfA7s+ckd9EqoxQAFKXEqEBihcWtLrgJETpDXUjMdlL\n8cuhviBwwHwL4kxB8CYEk89YOuNUrvIUElgRN38LM4PoenrwfEgZUemJxlpI\nFw/OsRCOBQZl6TzaOkuLPERv+V6cq7+6PVgXvZ2GvHXFWVhI0NGZASkCPV0a\nZloQKQWrjVgCqBuuLbTJfIGSX8AKYxoD2qONCjEFl510ovTib8mNFiNFzT2d\nDdcU\r\n=eOC+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"925157c66c5a799cd285e86a43fc424a469d6f0c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.7-renovate-major-socket-io-packages-925157c66c5a799cd285e86a43fc424a469d6f0c_1614231056047_0.2893358915908666","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.7-renovate-major-socket-io-packages-82b59a72f6bc3e0c860857b16785d7e0f93db754":{"name":"@balena/jellyfish-client-sdk","version":"2.14.7-renovate-major-socket-io-packages-82b59a72f6bc3e0c860857b16785d7e0f93db754","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.7-renovate-major-socket-io-packages-82b59a72f6bc3e0c860857b16785d7e0f93db754","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8a347d4b58bf52650341b86dff450d44a6dc6b69","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.7-renovate-major-socket-io-packages-82b59a72f6bc3e0c860857b16785d7e0f93db754.tgz","fileCount":21,"integrity":"sha512-7S7onuiexPVQLjN+MC8NutcLXH2elIg8gb2JvzVUTZN93cPuZcKOhnDhNbrkN1C0dDhYydBakPV+uLQZjTcCmA==","signatures":[{"sig":"MEUCIQD/vhvnNWuqwdtK0BMzjNuj16nsi14V3hYK0Npzn1QSCQIgK5nF/cD4bS/66KMqleaIt0AUvIU7IDl9u03++lg7z3Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOEakCRA9TVsSAnZWagAANvIQAKS3DE5bPWcj4FS8pry/\n21PQpQLu3mu4bwObP/4hmg+U0Fzr36+CgEIWVfoxE2Z3YuxcdrkZRiJkX+pb\naimbciZGobm8tDceUCBofNu7B13tB21O9bHi8ZxIv6Okm4XqRUh41TpI/6al\nsoyiAjjFoURUtVTBbATddOwwfOKUC4+4Ha2+t4GTn24zhijI+H8hwy5aMhTm\naDaAbRNHnC+Z7xDwmzehQeLxtFxg0L1CqF6FR0pG6jktbpPPH2XjCTeQbcqx\naA7bAEwbaM3F1meE9R2qvfia0ih1ezTQ0I4SluvPBAPgcAw1BoboHAtXOR/l\nckZ2ZRZ+7Wiy8tIkZ2sq2tnc/2nmKJSCBMrtu5608JWqwaNVqCfc6f2bFwHn\nTNr/YkIqSjb0PobvUgB87WO33fUN1MEdE6fZj+Fu9BS7UENAPer6UlduQl04\n7GCqPAOHexboVtPdegC0//xP/d/izDNKWIrUISsmU2MhfcbpLVpBqmCanbur\n2oqGAVJ4rR9aZTOyaKBTi4Feu5Q3tNfs/8nDMEzji4w7CBt2lHmgut5W17fN\nofCCx092JZv2Jq1uESm6UO1sR01ItPMRfyolKqhObu7eRVbJWngqt7TWRhGn\niCasQJCRTCeHAVsqRrA/FopM69R/xvsSBmJx84HooFQ6MjvTdfoEFXJFangC\nljME\r\n=Nmfq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"82b59a72f6bc3e0c860857b16785d7e0f93db754","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.7-renovate-major-socket-io-packages-82b59a72f6bc3e0c860857b16785d7e0f93db754_1614300836043_0.13017785795482184","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.15.0-typings-e425afab2689eddf800f3fd0e3c523c3935b28b9":{"name":"@balena/jellyfish-client-sdk","version":"2.15.0-typings-e425afab2689eddf800f3fd0e3c523c3935b28b9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.15.0-typings-e425afab2689eddf800f3fd0e3c523c3935b28b9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7a30f0598d4ca951740b3decde97051cf59ca1eb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.15.0-typings-e425afab2689eddf800f3fd0e3c523c3935b28b9.tgz","fileCount":22,"integrity":"sha512-obETyvscUVNpRQ+f+NmpkO9UA256caII0pSmmZBUf3XMl9vmg4IvYHdC0qqNn9u3TVxF2l6qOKdptrad8S341Q==","signatures":[{"sig":"MEYCIQCwBXRVnh7y7j8GDX7Ap8vUn+v6j+PKi3ZwS97it/AungIhALsjVwN0hFYx5H9ZhnDVhzIpsyuWD/3mQ6PP36cz4bfL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgORK+CRA9TVsSAnZWagAAjEIP/1VwJksjw8vFhruY2lxe\nbhmrdcDQ1m775uPaGklu5qJnKq4aQDruroscohuiqehh7DcGjqQi1l+SyfZm\nOCihxjOn3a4VHo/EHwf9ZHQK74GLfTt+SZ69ud42fPu/xdOcMKEdj3coLp3B\nLNynJE633mZRCwRb1q+4sQ+du0BV1XMtOchts/wH809XTPBKqC/XruFpFrUA\n1I9iF5x8msPcdy74KsBXhRcSJ5rKkGBctxDUIdqvE9g66Ld6Aosbdj/SpoTo\nDXYpu3emMXBcYlBLeAHq4i7DKq1BckWfdQozGHxVMXpRFID7TrAfupvf0luN\ngq2+YS6d5EzRUaH5RjjQpwAfcDaRTLId/3FtRc6PoIXbz3ho2PMjoLwh48qw\nQeMxihFqSN8rp9gfccuXjsUT6gdlvWkZxHSOlaTC7sWOqFfM5VfgMSVxS9Ry\nDeJiLNglgQUXWlMoigopYU5ZcgXlEZf0v9mGB1anF0OQJ+ea3s9gY5goWXZo\n3ZBUBN2xu5B44jaDBJMa7A/nuiq2wdcHcUS4Njx2qdcEDBEZHjbGFDOVVSpW\nVI8PFUamirPE7Ciz5FOhtZlhEcSzK62QUCTZYRE4AW1+KZ8iyBjc5jw50F/W\nfmfzPOlNttCY/OrXUwCLi/In+sdQhqriM1ifToUN+H2oO51tIpZvxJRMDRMx\nsMem\r\n=gpN5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"e425afab2689eddf800f3fd0e3c523c3935b28b9","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v","build":"tsc"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"dist"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","typescript":"^4.2.2","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.15.0-typings-e425afab2689eddf800f3fd0e3c523c3935b28b9_1614353085538_0.9363891023901751","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.15.0-typings-86cefcc24b9ae8586d12131d904bca5ed1b9bbf5":{"name":"@balena/jellyfish-client-sdk","version":"2.15.0-typings-86cefcc24b9ae8586d12131d904bca5ed1b9bbf5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.15.0-typings-86cefcc24b9ae8586d12131d904bca5ed1b9bbf5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"778c85facbd270b86683fd02dea73d67ed6e74fc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.15.0-typings-86cefcc24b9ae8586d12131d904bca5ed1b9bbf5.tgz","fileCount":23,"integrity":"sha512-mBC+/Qqi7AYseYXV7XhLtMpmdLZG0B5UHYQvVnQG+j/XuRDi9JuBOjP373PuOF1URCw4rjE0PnsrGU12KWuUMw==","signatures":[{"sig":"MEUCIG1XFLNo9hcKCwaKoVEbeC5xg8PwgZPdrcYTCrF1NPCDAiEA/6MnnBjr+fgJbHnP8++J+Mht4RAPz8Gr+VcIjjkC3xs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOSFVCRA9TVsSAnZWagAAHyIP/A05DaVR558AaZv7PH0y\neftgXhhmCP8JAF74uvRwpfwIK7OMk6cBtEG5hXlO7PGy0y+wTPTYIHzfvhcb\nrhbJiUxdCntfmC40F2x9q9t/iYsQmw7QA7lhJSGOoTu+KiLqIfYyALsAyZ99\n9ol9DkUTRmOWYejM1TR2IOLNKs1tv5Afg1LQg6GCvz6r7DxdejFYHcLIwOZ5\nY6h/2Mwo0o5NOQWh/2rcHw4DNomHKueM/I3juugr/4bvAaQUhO79DIz30VRo\n2Wr+jFcEnGrMewee8IWLFhKwhFbWk6L2lOUZDz7nFpiv3sJBfchzFJabwgGB\n32eEPYRWr1IGQPh3pp5CRjQoe3ZeQ4XAXHYgSKaKpvNh1SiABKzNIEJeA2OA\ndT8bR+rkrF5yjctTaoCuxm++fyl/Io3rcVTImYfWtNlXCibN52XrXykVdoJo\n0bzppyAGlzkw1W9It9bV6ri4OX1SNM7AwxralFly3tX+bTAsvWy1t782EDKt\n9sjLT3ZXr8ikeGvj7W0CLNZn9BxkuPnmwfIw0YIUmsthyCeM0mF2xWU0pmGF\nPz22DCu4uBg0g8g5b/3VQ2ETdgtdDlmOnJjluMPp7pq+bUFANdbvc5ItWW8f\n3y4Zx1l1lR8nPo7CpgNhBFIdL1aJLinPc4EEfC4P3iAYKpXiToNcXqXGtstF\nf5QD\r\n=VrE8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"86cefcc24b9ae8586d12131d904bca5ed1b9bbf5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v","build":"tsc"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"dist"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","typescript":"^4.2.2","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.15.0-typings-86cefcc24b9ae8586d12131d904bca5ed1b9bbf5_1614356820944_0.8293082484222438","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.7-renovate-jsdoc-to-markdown-7-x-1a4c93371849fbad54157fc78abac66c9cc93ff0":{"name":"@balena/jellyfish-client-sdk","version":"2.14.7-renovate-jsdoc-to-markdown-7-x-1a4c93371849fbad54157fc78abac66c9cc93ff0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.7-renovate-jsdoc-to-markdown-7-x-1a4c93371849fbad54157fc78abac66c9cc93ff0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5b7b084eeb7a78ca709129623aac1170ddb53b31","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.7-renovate-jsdoc-to-markdown-7-x-1a4c93371849fbad54157fc78abac66c9cc93ff0.tgz","fileCount":21,"integrity":"sha512-LbAnKUNFRXZYJIEyj2v2xHXG9bvm2fidViIhHGPQracKpi8UYZDZVP/XM4ZeLUxzMoZQqDo0Mz/j0/phWRuwJg==","signatures":[{"sig":"MEUCIQD/poDkcPhKv4SiRjp9qvJ+5sRL00n0B5ZrO+CYpHWF0AIgfGU+N/Fm+qPjaoYs6dmRLhNOCqz/V6gVrC3oJOXD2pk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOZk7CRA9TVsSAnZWagAAxk0QAIU56cPqJB4XlnX5+l+P\nWEjxXQZm1OLRHf7EpjOCDYKmn/7KFi2WmBcHAB4lt78r1MXdflVBBmifvW8u\n0588V+DWtGF9AQgMmkmGiLdOYgcOk18pttNXUDmUOHSL4yWgPAttm/H79GG8\n7XPh8VPV2SrAdp6b8ouLhVzqXdLkVF2EMJA+Lbzc5D6OjCs8ROWeFmZpyqHW\nCGD2BBqsiwZA+jFOH6L9c3vkMJ3rP+Sr0a/q/wP8F+ol9LueB1gpbex/e56y\nvNRedc0Ec067Nf0yihgWBIBYUhSjUAoyw9/6VSNLhrE6vwA9WXkHN8Jlv+DY\nNFj6/ES+CcyK2ISFoFfdsleYdn9zfikQ9MtlkLRZfQjk/KZQTRA+sxdSsFwX\nwlLpDWuEepKH8KNoFHvwD/eU5bjauhFdCoY3TrrXIauopDc/ZWOvgcmiwkvB\nwjcaOwNRgT8ANnt7TWPIumLKCnm0jSQrzJDVHgDKvNSDpypKfGj3qD2jxXUs\n49YK42dVLPj5xjb45pY56h4Ycqwd3TCDG4ilKlfz3RYrMlFgEN5wAPwhEptO\nDiPK/O59nrWNIbPXmBEnOwUbCeSCD8Rd7cOlNONQlJRBVrXwHxGW+eA9wXUr\nUKteLvr/cja/+zMlc+z3/nslW9PP1pjBw95+fa5kDwHznHsh/ZNV5JYxn6uY\nX5OQ\r\n=frKw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"1a4c93371849fbad54157fc78abac66c9cc93ff0","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.7-renovate-jsdoc-to-markdown-7-x-1a4c93371849fbad54157fc78abac66c9cc93ff0_1614387514537_0.21858509607897636","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.7-renovate-non-major-fba38fdd12a7728567425368535d70ec2b74c655":{"name":"@balena/jellyfish-client-sdk","version":"2.14.7-renovate-non-major-fba38fdd12a7728567425368535d70ec2b74c655","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.7-renovate-non-major-fba38fdd12a7728567425368535d70ec2b74c655","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"82102abfec9eed42d5cba7d7f3c76a608b19697d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.7-renovate-non-major-fba38fdd12a7728567425368535d70ec2b74c655.tgz","fileCount":21,"integrity":"sha512-TR5dxwIQedM4XRBV8ygIXYqG/Wgeq2Tnrb66cZFOOewv89zmnmdU+dl0KSkUiS00noAu0tpn1nA+u9J4JOHKVg==","signatures":[{"sig":"MEQCIGGhJ6/IZCTDcROMqAEMaMOctHd1ds8NqiAJaxA1MiJHAiBHdJaURTrljxWtDMappXeS4FG6K4zkl7zloR3fZMjCHw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOccGCRA9TVsSAnZWagAAgnoP/16q3OjK7Y1Lqz3H2zfu\nbeP3wdv7tGmg/Rbf9rZ/DwmL6AR4W/5Ia6BiYcK0VH9zRmCe3LPbfef/umz1\nk73DbYu0goVW2iLLeOc/6JPqlYYkH+8kUIp9yNjlensw05rU1H1nfkAVbn/Q\nCDOrhAJm15vbJonlpFQDHv9iRGYlhJLdohIjqHu5qK2lbno6qsp9+0xQVcCc\nDKj2Wp1MjNBwOzYqQ0gMWiix7NhNa7mwWzwAbSGUKTB5mQ2if1TvnfBRV/2o\nLldYNNQcSgrIgEPqi3rXbEcyy7dSXtilqVyBX1UcSY8yPiZP7v9DPaPT5gaH\n/1HqQHgYt9NWyDkslUXP3yIn3JI4jwAGbvPlzvZuzFdLLPPeU+uhol3stEQz\nvIrTspzX5Hfl55f4aOmqsGs8pykRv5lB1L8MLBbPp9PvTF3B093oeT/Q/Z+T\n86S/3pMe7VLEyUhMfDajZhFrsA2xmBHIqfEf90Xr8ytaJ9s8nRiqiFNUaSB3\nnIkRSfHhc0j4tDCxIeV8AqGJ67jnIG0TuvAn24SFVULvX3g7VAAtdjU4xsZa\n3QybFAk3tab+Dw7ffst0qv0VssJaNxEqCEDW4h9Qx8Vc99fjvPEMnafM0f1d\noh3ub9rcDyFHcP9eBE94l9N6mc7vKH6G1zr5t2gsqFuOAtJRFuUbG58a4JMQ\nXFd5\r\n=OWqz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"fba38fdd12a7728567425368535d70ec2b74c655","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.7-renovate-non-major-fba38fdd12a7728567425368535d70ec2b74c655_1614399237988_0.47693133352274275","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.7":{"name":"@balena/jellyfish-client-sdk","version":"2.14.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"eb6c455320dc1914f5316f4b6ccb48c044bbe130","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.7.tgz","fileCount":21,"integrity":"sha512-+8zVywJ3gtyi+CFbJLuszwuWSA4GrJ34Oalk+HsCtcagR6WJ2hKF8noE87zJrvDJZW2iwcHHhG6sJvNHEOrh1A==","signatures":[{"sig":"MEUCIQDu/bIaXq6c8asUBYhQv9NkSGDwiYO5GtO8h/PTirCwZgIgVTSwXrLTLdPeRZtVH5zEQUL5bY6wzojki+55KsAZb/w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159482,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOcexCRA9TVsSAnZWagAAONMP/1wWSbz33IDQWTlV6K8H\nvzsq7h4x7yVfzLNulafl8Bb9YSvH/tsxL8+5Jdc9ZRKN/dQJCpHN6Zj0O1NG\ncprJRbyy/j8zrQfu62mfFS2jmZgu0SY+6bp5gHRpJII8IwYAZp447+E/nIPl\nzv9EMzifMzkuBzyrmPJsFkj1E6F6v/l5wSuVWVtu0uaWR/stZ1mVAw488OWu\n6UT5cSErzZJggVgYxJ9CaSOUXC34wW3so61mrv/JLEeWy6iVBdqfN+lGjYwy\n5nqkW4JzcHdxisWJURCBHxi5Sa3XF1Q+De/hduhEDScoAaTPZTAJIphWMAef\nOJZB37r3maToSsX0sYIlOtX3hWCbfsDB5fvLp+cpMjl7/qvrXmXbY8RG6Y6A\nKl2hVIuYOYqVlSc1aPwp+WfJpU/bBg3RmQ6EPJt8BVBuVw0HVNGyp8JthPpK\nBDpqZ1ut/6PHC3f7jgy1OD+TDZNUdDVTtaR21ovsjr68KchjOkZY15fAUXSI\nS/oOIjO1Lh75T7DpqbXKQ8y1yYSX+dIMJLwVl0jeUXQxv1MILL7mJjx/YAjA\nQoCfBrRSWBWcu6qVAnZhN+ujC26iJQcYEMfxKltn/5/2vzP/UhyA8bA199Uy\nmVZBLo8b/efuF5w/rPTUm6Zf5Mup8EO17qGXb5MuIqj5uJXo1M+1F/sEDh7o\n4Ayr\r\n=Pchu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"957c6414a3a912c6691f9d95fa1020eccf15e8e8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.7_1614399408882_0.44639329776107295","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.8-renovate-jsdoc-to-markdown-7-x-eea6390eb038de2fcf30b3ea1bb6cb25e7b4d352":{"name":"@balena/jellyfish-client-sdk","version":"2.14.8-renovate-jsdoc-to-markdown-7-x-eea6390eb038de2fcf30b3ea1bb6cb25e7b4d352","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.8-renovate-jsdoc-to-markdown-7-x-eea6390eb038de2fcf30b3ea1bb6cb25e7b4d352","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"44a40731232aacaa6569cbcbc4ab6d73c23a12cb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.8-renovate-jsdoc-to-markdown-7-x-eea6390eb038de2fcf30b3ea1bb6cb25e7b4d352.tgz","fileCount":21,"integrity":"sha512-sgqM2QFqEfPKpA3lSQ3BRv7GjnFrBZITp0a6oWC0Umb7Wju7baCM3M+0wrZcK/l0Q7kOKSrbnI3e+Pxe8viq3g==","signatures":[{"sig":"MEQCIDSyfZRQ3RwnVKuRgKnzYvAmOtaM9gG39+I4yWWHl7deAiBy0fxeyx7Igt9bsLgqzZ7C0Z0hPezSzKhCjHE1wD4kkA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOchtCRA9TVsSAnZWagAAeocP/2xzz8LIjhZAi64v+ilh\njVpBfVVeZ5i4if9+2BRKLNxRntWAroaedOCRk+BVSNxi6uJ4VdoRFKLbZjI9\n4buhsVMcMXmOpeMsrLkbO3xS6vQfvN38MMIPGbqZOAkIPoIiNmqrV4KV3yKG\ndnW/wYyA5uA5u6eUkHEK4rmLwesMaDj1m08lR1jzfWJsF6L1TuVNdAiIZalf\nopAs3wNx8j2qYMQpDNIjTLJ7YzEx8n7n4cBTibc+8tLNr88ODS5EnpYsVIB3\nsUNU15POyJWJqZAbahbHZyo9RPqRN9mEDxwvkE5W4BmsQlI/lnMokxNxrcA/\nTbnqIM99zfGOiLyAmzAqBuP1GHIf3tuWJ9y6B+5qd8FkADOSJndb58ryzmFZ\ncE+Qn3o3mXhTxsW2MKrYlL8fBvm4teMtOreQ3THF61oeqERIf00iPdLO5DAB\nJnZgImrRgobY8+6fVsIWIXQQ3CTUUKCm8f858DezhzKnlSLjnrEAyE30mH+7\nIjUUB0ZVAdnu+ZKQsuyGzrOKpgTNksC2HSXWXEsFVJ4Xlbb40mD5iCFMw3R4\nUt8akwyC569Fu+ojTcXE6UEVtmCQZl0kAW1SdjRZ8rN9ErAKZhbeHISrJpj1\npUyzWa/WAXEWGYCLQqaOkWRimIdMWTKe+SFASFUcQ5QGKAO0QlnLZUKr005/\nebIR\r\n=7rB2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"eea6390eb038de2fcf30b3ea1bb6cb25e7b4d352","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.8-renovate-jsdoc-to-markdown-7-x-eea6390eb038de2fcf30b3ea1bb6cb25e7b4d352_1614399596397_0.8348845653114598","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.8-renovate-major-socket-io-packages-53a97bb631375062fe489aa5d846c714e5eb5b15":{"name":"@balena/jellyfish-client-sdk","version":"2.14.8-renovate-major-socket-io-packages-53a97bb631375062fe489aa5d846c714e5eb5b15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.8-renovate-major-socket-io-packages-53a97bb631375062fe489aa5d846c714e5eb5b15","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"77e5ea90a3d0e146c8b157363cb2cae86fd97126","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.8-renovate-major-socket-io-packages-53a97bb631375062fe489aa5d846c714e5eb5b15.tgz","fileCount":21,"integrity":"sha512-vlpXp/M1K3d2VxEF4XkqAJejGJQIqNIpoVm3rYxaZeOKFtgad6CsaRcotWTeO5VJby8kRwmhl0z5Xpz0iOZahw==","signatures":[{"sig":"MEUCIQC8FNv3ycKzH0hh3bYL34rmP+z0AdjiKnB8iu2pDH7PXAIgZwuSijZcTa3IZntSQVKchBpFHskpxS1U83YW4YIlYgM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOcioCRA9TVsSAnZWagAATaUP/jP7kGZGN3XPhsjk6wnJ\nTT7/A9DYPiVzw89E/rFaS58raU5NJJZ/o4WntidwKM8/i1CspOrR/6Tk8bg6\nsXYz+YXwJBEsDuaRWX2Bc2NtsZvTFPtWHYHFQvs5xpQQRTMdEFDPAgG0lywK\nvy3rtgWH4YvvCk/DCghTpWbpvNUvkfMO5CeHAS6VlYrAmdSBKf4StkMRkCq5\nBlfYi7WG+aH7tBmV1ujjNkT2LZFU+EcYtApmVs1YTzAcgJzhjCoJtA72G8xK\nIPSE+3KUcpAjULCn8bBN3/OwqScw/8hAfknEurrcV1S6UshNWKVXOFZXXmi5\n4kqoZQLJ791LObXMu4eLTtBW/a4gi07Axyl+RlfPjPwBraib0VuYBzTq6F4k\nUDPXQfuak1Aa6SiIeOwrf6L4nOVkhPpf/jGrE9HwnmawwTAENw+aPowxTsMt\nzK+TeL960pJ9G/nsh7L0VNNBYzdofde/Nd1CW5+SeXfFsAE0PJu0Bg9x+gDO\n0pk1/DMQYpzdT2+gY79ZPhfkGklNsdo9J9cJn0xeNXTDUKWShFsfCdBHnZOT\nQSfxQ82XhHQmd2ie24gSlz+5z4cPZlk7k28yUVou+jGCsrtBmw6m+8YEv/2U\nckqIG4quF5qhVtQ/QjZO/nbuCLRodnfvah9YrOeiBtFWDZIqbBCwrh8b3WTO\nrUJg\r\n=nXPh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"53a97bb631375062fe489aa5d846c714e5eb5b15","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.20.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.8-renovate-major-socket-io-packages-53a97bb631375062fe489aa5d846c714e5eb5b15_1614399655836_0.7304451450680116","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.15.0-typings-1f096dda20b64889e7dc10e8ad17e3d20008ae84":{"name":"@balena/jellyfish-client-sdk","version":"2.15.0-typings-1f096dda20b64889e7dc10e8ad17e3d20008ae84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.15.0-typings-1f096dda20b64889e7dc10e8ad17e3d20008ae84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aa3f9e04fe412992c860057348f927c73e919d7b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.15.0-typings-1f096dda20b64889e7dc10e8ad17e3d20008ae84.tgz","fileCount":23,"integrity":"sha512-qCo9wN0wlbD8+aVQXI01tsCDYFJT4SqTTU1drzqwQvX6or2EzEQJPMoC1nw8UuPYISCOiPXLTX7ZwuNdkf8DUA==","signatures":[{"sig":"MEYCIQDYqd/vuFyiSASMXvJJZjj4ImGwJKPWy4pP0xnTEtnYfQIhAI3izT7vQtgGDL8l376l7r2GIC+wEBXKCZd58vMoCp2h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOhFECRA9TVsSAnZWagAAsQgP/Rhk0WmLLbUcNi3oRgU3\nqq5oYQ6GlUjbQg6VpMUlFEc42AJn4NGjUWKiWS8JeV3Q9KP7WRHT54TJtgwW\n+2n1YFF5Ds/aZ6frDtdd/EYrkq0QbSV9fKTaVSoWgiPv8i+mnsJuLDY75zfJ\n1PiQHg+yOlj7Adaf9j0mal8DPfMo3h4ZfCHs0BR5eJc801BmCdf7HlsvaQGl\nU/2yKE8Bzoc1rjSuI+nOv35V7Xv0K/kmgcmackfqJT1hIYCn6i+mUNPclOfg\nLUWjqiIeILbUuHvTw4ZyXkC3kcaxWztK/OtyWM1JnrcjHeoVZuEi5eKnfhsl\nGygupwJduvDmMXo0aJKq2qo7yyUKtZ1SnMWgkyjCMIWBowWRXKbPyeL4XIzi\nEByrT5li1PLE5B6TsovNWUhjhpHXM6qyz5pETifoKon0+Q2iPe2RDP8Mx/yj\nj0PoMRrBMhyyVp0yAK30rwpE12zdFiEHjAe5K4Xpw474jUicxPfZW0zgZeet\nXajOp91hiR6S/Wq9zl0ad4qsE8VWMhcNbtuOZ3dNEOqhvvyZljGSVXYxqzaS\nS/tbmOvoFvckowcTWu/x4pMVm3Ug5XBYgx8i0uXt7A3+4sQGnTCI5HFkVfPe\n0AFLBer1itlyCwTTokvlbwBrMOrce+dTfMxLaLSwOBEDBzwsu+TGxbfXYotJ\nnslL\r\n=ECI4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>PartialContract</code> | the contract to be created |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>PartialContract</code> | The card that should be linked from |\n| toCard | <code>PartialContract</code> | The card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"1f096dda20b64889e7dc10e8ad17e3d20008ae84","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v","build":"tsc"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"dist"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","typescript":"^4.2.2","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.15.0-typings-1f096dda20b64889e7dc10e8ad17e3d20008ae84_1614418243762_0.9564753840717362","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.15.0-typings-c9300ee0de0c40f5fad1bf849ed7314d3bf7d8b6":{"name":"@balena/jellyfish-client-sdk","version":"2.15.0-typings-c9300ee0de0c40f5fad1bf849ed7314d3bf7d8b6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.15.0-typings-c9300ee0de0c40f5fad1bf849ed7314d3bf7d8b6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7b5f66a8ee47878febfe3f8b9cb2fb285190f6ea","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.15.0-typings-c9300ee0de0c40f5fad1bf849ed7314d3bf7d8b6.tgz","fileCount":23,"integrity":"sha512-6tD+J4OtECf3Bkm9TcL+dEiZMFnkIUon5u548WO+lDkEMXX/0d/OD7N/mLr2ALXP5xr5E/wD1kAZWr8zk60PMA==","signatures":[{"sig":"MEUCIAUZKY5XUbcMQmblliOCub0/hIvnZusdpDOM9+vlLEWwAiEAgTJ0phrM3ulrm2c17xBBcsiGP5bwULyBINhr57sgqQ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOiwyCRA9TVsSAnZWagAAaK4QAI/iHa11FiXVocarWHxn\nORM2frP23imPzcVX24ovOQIg+m24thhVMuDU6pXGrc4XdNH7Omf/wGZI8/pc\nWoaitrH1IWXMY2T1qOtFogAJhEytZ+Y1oFAI//bzE68I/nopEZrN+JhcTc97\nd9iJmJX9qIgKiJeoZPk/0/yH1kdUFY2Lby7uvF4lVNDW3tFLOsRfA91xfG5y\nv1zg2CSDdggH/n1BdGvOU9hebNAL3WZdkG06/W1Kf9HmHY1kaqJcOzygRQKV\niQqT4rcPrCLvqodDWcnxjqLEpAFdzu8Om3RXXuf6Kz9cruQ/pdGCjEU/1KPj\nUT8aOt4pzyKFzoKY8LnoHYhr0kaQX3zRwtezk2G8YhgTgSniLmAPckqJUtXY\nZtjll/XgxwJsyCHxm3hOFAaPq3Dfxow9Y1RTPAPPsBYl2q3GdTdMnJ/ZyO/5\nD1ZvwYSbRnG9/qcBGcgeCVR+kX/Mr0hpPbxhzAj+Zlhc0IV13dIchflPh5Zp\necOj/FYJpKXYZxxeZnkDg6Zt4rZW/9TeqgSXU0IRTafJc4e6Iz/qLqEuPJ7X\nTAzskF+rOnxqykh70N0GYYWYBd5frCUk5GEwIj22T1Lgt8T15QBIXpLNSjX1\nrxQ9CQHuHkiqYyKjUoXW7G+NHrfNHZ73IIRtiYWwHGu+DPHaFWSWfVqFuqOo\nKj5L\r\n=K0RU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise.&lt;types.Contract&gt;</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise.&lt;types.ActionResponse&gt;</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise.&lt;types.ActionResponse&gt;</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise.&lt;types.Contract&gt;</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise.&lt;types.ActionResponse&gt;</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise.&lt;types.ActionResponse&gt;</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise.&lt;types.Contract&gt;</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise.&lt;types.ActionResponse&gt;</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>types.PartialContract</code> | the contract to be created |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise.&lt;types.ActionResponse&gt;</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>PartialContract</code> | The card that should be linked from |\n| toCard | <code>PartialContract</code> | The card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ [<code>Promise.&lt;ActionResponse&gt;</code>](#ActionResponse)\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c9300ee0de0c40f5fad1bf849ed7314d3bf7d8b6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v","build":"tsc"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"dist"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.8","sinon":"^9.2.4","eslint":"^7.20.0","typescript":"^4.2.2","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.15.0-typings-c9300ee0de0c40f5fad1bf849ed7314d3bf7d8b6_1614425138122_0.7585801211078336","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.8-renovate-non-major-322f73d15aba0327b204df331626ceb6914c554e":{"name":"@balena/jellyfish-client-sdk","version":"2.14.8-renovate-non-major-322f73d15aba0327b204df331626ceb6914c554e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.8-renovate-non-major-322f73d15aba0327b204df331626ceb6914c554e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9ded8582ae726d441a30bf8c7c4525f10469289e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.8-renovate-non-major-322f73d15aba0327b204df331626ceb6914c554e.tgz","fileCount":21,"integrity":"sha512-6R3oL93X/xeyO2AeoNYx7gcilQc4SGfF99UjbY4p3PlD3xTEKI7kNsrrrxPgz0PYyIFqhJurQgCDKlBpDcv8QQ==","signatures":[{"sig":"MEQCIDyISEZK2XWxniXzpKL0SaHUtry733miBnSu6oQHvmeiAiB6qr3P5+4gIF0ZoN3186VR9E+AKtpEcLiesouy5XrYKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO6LvCRA9TVsSAnZWagAAmtcP/iOdyvjC+HXslo5zD72K\nDZxwaiJWGROlsn1GbjJNgtUMpOXQK+T0rJLftgilAvPWZagt+o+EuXJcEha/\nu7Yf3W+XLSMDH0RFLxf1Gu0Qkv0uUvCN2z5y73I30nl60l0qoNL+7EXU5x9V\nsSkOogpHp/oilpeqpIEwSpzG2Wvxvx1YOebU7C1cUDmL5NRa8GXrxjnG3GUM\nJfXqrC5PKYYzZJEVVLGFH9NRKBhAqHJotbFJ6TEGsF40hEwtiNjPuqmAxRpk\nFQmTjnrqY6rc4bO8zm/EpsBq19CjpXlcf0jJGudfUdOIDxAOf5uBmEH3Oh2X\nOHhr0GnURx+bLp7LL2KEMtSgEEDLVhavjDuvRKCZSTj4oC6Rmyw5L2bk5EV6\ntjxiJ0IHVKIOJuw6fH3J5OJDlLomr4cOg2W/1PUCaRKxNAGbjJ+OE05c+fDU\ny7KPSYvY6xp8+paCr/Z5QTqslwCrfuWraJDOwIJHTXUMC7bTxXWM9atEhPQu\nvMr6+AQ3GJOe3tPnIWsJCbSXMslbMG+CJSeHE8Wzt6auKdxtvdz+wmmroq8V\n7znmFE7lgT2ldzy+sdkUzKLynCpDNIYzAhRGUxpyKdRxfMee2ZAej3OI9+7k\nUQjIyo2DyT+juJQQbjz/hB45SzSsv9pqRbaytno++8z9/1MjocXfwy7aJgwR\nHgq6\r\n=U016\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"322f73d15aba0327b204df331626ceb6914c554e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.8-renovate-non-major-322f73d15aba0327b204df331626ceb6914c554e_1614521070851_0.6194496651836576","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.8":{"name":"@balena/jellyfish-client-sdk","version":"2.14.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"98625f83652be662f15e5f93b81cdc9842460469","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.8.tgz","fileCount":21,"integrity":"sha512-dz6EWCKFnl2YxCpxsNm8qxwlCCGIlO7AsV6GbUVxarI1XbruXrnajhv9dDiPlAPVaDK5VrjymGvz5ZazDmZ/Jw==","signatures":[{"sig":"MEQCIG3ptXGFgiWnYsBvWKIxKnCtBgsRiWu6JAQvl80xLGGlAiB8Ag37TTxE7OoCsMZ8Hc/PMJbn6RvPEsrvr3Yl992ukA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159869,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO6O1CRA9TVsSAnZWagAA83oP/1Y/Jaz27cffTVfhfMwy\neIrK2yjUmlXN1YrM6LeX0bT78MXyvOU+xili97McvCT/YEclifqMhkbZjRYR\nyvIrmitQLRsbDF/5Luj3sxY9g/HDgjFfU+MYqct2VPJ7/JWttItFPw8q/AY6\ngPxNX6JWadanNTW79N7165gVqWJZUCVk1nSyHthTPfFZthOVDj3F/rJy4rKj\nTkstxZMyMLRhuauZms11De/rWcxWmdUMER0EFLVj//BJwPKlZaL5QtqRxRNA\noiqNVfxBZESJEUySomRMn02Gh/A4gHg1zG85CrphYses29LbpIhY4cIS2d5r\nDVcNWCw7ljDAMKFHDdztXyDb6/eGdPs7UOcnw/miFZ6u1YRN6XNSb6AgF5MF\nc/3u1HvpBQikIfpypMF0VkdmnQ6DY+waHeVMpNc1J/szQkpsfkVGmdRyoX3i\n+p7sXFQuodEnrTpaDg8C71fC8ym2kZ9yHxgnAt4yN28Bx/15v/iLu1tyhwjg\ndPGEei7y23PGE2sOBOnn/tb3wgNczRP7FpX3/WR/YlU2Z/g0jXvC0AqMk5lf\n5gS7/l0MGEPcHpMdb38joRxL6rT6E6cap2Jjov+z0fFlqtV9M5ROiueWK8e4\nW7od9en9XsWKPy5uNeGogSv3oErEpI/8icRW3F8Rqf0WTST66ffkTPic+7yy\nikCl\r\n=+5Yc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"c6427e79e1421f4b9d5af0c25a526884703d1502","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.8_1614521268540_0.5824232036615302","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.9-renovate-major-socket-io-packages-9b68f247bf8edb4b4b90f8f07760c12e21074bdb":{"name":"@balena/jellyfish-client-sdk","version":"2.14.9-renovate-major-socket-io-packages-9b68f247bf8edb4b4b90f8f07760c12e21074bdb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.9-renovate-major-socket-io-packages-9b68f247bf8edb4b4b90f8f07760c12e21074bdb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"29cb5a08f8556ab77f82cbfee8aea5422a5ca51c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.9-renovate-major-socket-io-packages-9b68f247bf8edb4b4b90f8f07760c12e21074bdb.tgz","fileCount":21,"integrity":"sha512-u9cciLPcRBYBbf9ranNe8HMd/UGQr99S6PGF0odk0rvL3N7XJhcysBwy+ejw7bDmYcjtLDn9FY1V//pQnMdtsA==","signatures":[{"sig":"MEQCIHhBgMFvfeEUAMD8kGCUGZQyi7VUfCC2MqN6fOHy+KU/AiBRrwxFm2Mk8W74If9d0L9if57c2kqOyx9grVXhm3oKAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO6TOCRA9TVsSAnZWagAAXNwP+wd0hKH+5p0rZGWEJZ6I\nJRXECrRBZ2y5rqkGIhOO2zLWH13shMjgXTQp+71muOSGUU6K/woXBoT04Ppc\noD5LMHb1PDaj4YjiNuXTD2wog3qvAdLU8iIq6c8bJQO6w6tJTRuGa5gtxr2i\nMKXzixDQ0+MumDukNUrbcFcDIB9g8CwOVwNTYArskm1rqRv+R39ueXjm8Pfj\ngq84CqYB38OPAL70xI/zes/rsPdxf9JQ3wOZo5kndAetMSo2r19IcBmuhRqh\nr+jPa+b/4IGtHXyY1MCKFo/y6ikGlp/0BEK8eqhQ6pO6v1z4CHthMqlXMSva\nuPVbnHQcH3UwokvHaxC7OPZwjI+0nYktBtPwH+qVOhZJOfeBGxSgCBqvPM5L\nKogLKrceWpet52Vm0G2LY2Bu+NKFlOjnAWDUH8Lu2W5+PBVGTN/pLwnkyQYm\nF5jlKevxhVs963zmllANJKSyF+qsyvIuK82Wr6MZbUIVDplinwK68OMC51JD\nnaZiSycVNHYLtF76iUAY9kpjvUPgmd82qJ0xzk/OZx6lGlQupHgb0jmSsehA\nOHGTDI+KqB+ZsDSF4fE4jNPu/UcPs5Xkd9milxE4qtSM/EwvKH9TJ4gtG83b\nkQ51TKynkkLA6onI9NMvl3PFUNpagVg+z3AC32CcrVyitwNqZ8WVGLKqzM2S\ncD+n\r\n=QsgC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9b68f247bf8edb4b4b90f8f07760c12e21074bdb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^6.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.9-renovate-major-socket-io-packages-9b68f247bf8edb4b4b90f8f07760c12e21074bdb_1614521550464_0.6090525266526237","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.9-renovate-jsdoc-to-markdown-7-x-3fc6ebefb298ba6d9dea5fd34bb8480f5d669ecd":{"name":"@balena/jellyfish-client-sdk","version":"2.14.9-renovate-jsdoc-to-markdown-7-x-3fc6ebefb298ba6d9dea5fd34bb8480f5d669ecd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.9-renovate-jsdoc-to-markdown-7-x-3fc6ebefb298ba6d9dea5fd34bb8480f5d669ecd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0d8c3887db1b4ea4a40bdc77488d591b91ffb396","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.9-renovate-jsdoc-to-markdown-7-x-3fc6ebefb298ba6d9dea5fd34bb8480f5d669ecd.tgz","fileCount":21,"integrity":"sha512-Q2yh+3e/ymdwOYFR0H+/rqKe4IoW7GKlj9DpXwRkgp+vJYcfhr5dqgUQTB43Qi5qYY87W1AIjOf3X82+kPka5g==","signatures":[{"sig":"MEYCIQD2i1Rq/pUwz1Wan/uffMwWckbc9Hii3XcKm/C2Sx1pUQIhAPblU6YfYuwu7+l1pKfSpHUo+sc84CeyFYmyExoWmsC7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160340,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgO6T7CRA9TVsSAnZWagAAoo8P/R6/KzLHnPv5W14BYg4S\noAmhPO3eNi+RHA35zg6fYH5Nyfz03MoOr2M2IXpjWjPEjQgt0Rz4FqN7dJIO\ng0jK8qL6eOcIWxpW5c21bdESLK4SpIE0USE45RWU+gsPGtbeD9NsdP2LsWmf\n2/5nn6DCq1flGNJ/rd0U3zYwbuosP2/f+ONdIhPS1pVZjdIzlTumLOHtyhuV\nHNHWC51mBFGoHvzO1DLcseRgItkpI7t18YlfdfTIa1bqk9GHYxgUMxoOa92d\nyjDG0aWiSI6fcr9dWE0K20dRCFDNPAVWuyW5CAJdKSz8hQmUTjXexFdGrnle\nRXH2qpkbQdstXh+agtgTs1+D3moYxUvuHqHkSGm1Tgrf0y5r3uDWQWh39jbB\nrrPHnWFegs5ZJ9tKlO9B7WniM+nwJaEXJbKPmat9elQqt8sTvBPAWS1Ce9cG\nliorUzImKpOcG6EoAhmBh+tKqSDkvgvfh5DxsxMvBjaPWPDuzF+b77r6dFDn\nU6fbPS7VVY7q2B30WpKlONaOKzT17flJRw4mfA0QfBylQOq1GjBTII5GRenl\nfHNsMFFN8bhb/2eJvbqz9NJkY4+1e3w5H6oSljQBdhYwJSfoB5Lt4s1hPoeo\nHIZy1fhSNPTxnsEqLC7oKtnHiY/3vIJa1+cR9/OFV/Lhft1xV/PW9A9m92g8\nUs8/\r\n=xiyr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"3fc6ebefb298ba6d9dea5fd34bb8480f5d669ecd","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.9-renovate-jsdoc-to-markdown-7-x-3fc6ebefb298ba6d9dea5fd34bb8480f5d669ecd_1614521595140_0.9032381493534196","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.9":{"name":"@balena/jellyfish-client-sdk","version":"2.14.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"73864d0a8841efed60429240597b8c68f75d3259","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.9.tgz","fileCount":21,"integrity":"sha512-z2A72FRSuLJqjoD72HuwOdZ2kGxVG9AGZLWzD5b5s4KAjd+p91PP98q8RC+d85luOaRsgijrzO9a11E+Rp5N0Q==","signatures":[{"sig":"MEUCIERpeLkD6rz5xVDCUY2ecqWwjjjGuJSwg+9welcUhDmHAiEA+l+WEdgiHqZnFQE4p0E9rnWyAW4kjczUgCHAnjVBcp0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPDEjCRA9TVsSAnZWagAA424P+QHixXL5fp7f3I+g49bw\ndieJrSVxGiUIRUjqATDf2hnjOUyK/mBzRVqc4eyMmpjVHN2BKPUUNxNo6NzK\n7Zp8k9khOwytFpsVedNqRQOmnbeNL9yQZufNdNxKzFPkYW8mUzrTcuOweI0/\n2MFzw3QMyQivVOrsusI8E6Pq9wfbEhbksRI661sRrffRnxIblRDy4iV++3bm\naDuKcjSntbKkEU+XFPA14LBFJp6ae2epw367CLd85zMDacGc7Azi+0+IoPi3\nA2aWB3wS/V8t7yfM1/Eybgfm+Fu7dhZfCAxegrOFroE3modkNKklXC80s8a6\n8ynXehxNNjTXxMx4TBJKB6/N9vUedjizuKKWZeV+R/avIpa1uKVV/0EmvhLk\njrLGbaPPkFgcnHJ54E13wPZrTmpNmBbNzGuZuIqRJsRUl1gzWFMBDpC6Ojfd\nLP0Sky78Dg1JaotWc/CuVosbfwVfQx7IsTor3WiVk6qt4FXSPr+VSDWliWro\nLZ6ChkZj87bVJOTNHCsUdjSYxj4iFVM3nN3GfVmdVELVS7ncG05wk2+3c4qI\n0ymz80X3t9nmt+X1+biWD7BUU/liud+0ObSQxQgqj6vVQBTL5sjLMwiqMUoT\n4lUd+Bi1+CqEyt6UuD9y8yRbQVqVnubDgnvEUqLQo7shXz83w9pA7xiPPo+4\nHk+m\r\n=i0g3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"0cd89d92805397ff8afd73ceb1c3d4d8a7bf04e8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.9_1614557474735_0.7216906848244713","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.14.10-renovate-major-socket-io-packages-5a84cac26529f6452e3578371d7ca7967bf6d079":{"name":"@balena/jellyfish-client-sdk","version":"2.14.10-renovate-major-socket-io-packages-5a84cac26529f6452e3578371d7ca7967bf6d079","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.14.10-renovate-major-socket-io-packages-5a84cac26529f6452e3578371d7ca7967bf6d079","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bacd01449b06edfde103446dcafd5699e47e0382","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.14.10-renovate-major-socket-io-packages-5a84cac26529f6452e3578371d7ca7967bf6d079.tgz","fileCount":21,"integrity":"sha512-DH5qWjnUMOfkrkzMgHghRd7qW3oJGcXHN6daUEm/49vNEUDYg7ClYPfNdMYvBJgBI7ptsK3rIKmNPD4uZiAy+w==","signatures":[{"sig":"MEUCIDjHYDZn0Rt8A4QXYnHg42vnCIx/mN2JpOuQIvKojAcSAiEAgGm4KKilnQStU1ikecar4rySalUAXhK0H31Znehue6s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPDHTCRA9TVsSAnZWagAArB8QAJo5j6Y0s5RAxUCmkmXb\nC+hSG627/VPOD7BjBfYIq26VvXdJu6rNH6wb4keBfAhlA57fcswWcbsU1oaU\nL6by5ayDy5A3/Ejw7crZR8Q34J2pynOgvHyKCJiEdn/CY27FjysslRdsm10b\nCmrjl3eb2jmSsMwwLFVivnyoJz/k170hhnEKV5iQMuxdI5es+k/cKT4GJwQn\nShgfAR5QVdnEewQ//iheZVxy0AfirhweVc1sFJwvzXc753x2TPBsYbPk4Q1S\n7DM/G4/+WnPv50ZCXiD2J0QIuTtgdtU+KuLCH2t23Eq95e76FY2xqs9QPs++\nOdjOAwMAY3wSHSdBvOSbdovWInrIKITL6PtkMkGCywGLdjHF1LXxT4waxRl8\nssXIt6osrXZ3mIg1kc6mitC3eRsQ+PKpZ9CtbPv1VUzbrTmvjwe5j3CW8FWk\nK4wIu7jFIzWdXvzhpz+3UGwBMqUSwzc5NQMhAv/xHeK/WNCiHKjW1hYARjV3\nyiufRSksDRZizcKWBE4x+CAlO2Y8NZf0G5BYK8k6ibVrAJM/FxomZ9mSuNFC\niXUCepssD5V4Vs2i3wGVVYeDMv7ebO9gIdICqOsZQ7NYUeiUXD8AZgvrZfsJ\nTLuZiWzkH3Plm3UEl9MtrA1jOZkFNMXaCibApe9PmQRgoESYFKh4i5j+h7SR\nNSV2\r\n=46WL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"5a84cac26529f6452e3578371d7ca7967bf6d079","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.14.10-renovate-major-socket-io-packages-5a84cac26529f6452e3578371d7ca7967bf6d079_1614557650937_0.3575321152655411","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.15.0-add-chart-config-constraints-745b1e6fe04b1a500542ff186f4168998de297fd":{"name":"@balena/jellyfish-client-sdk","version":"2.15.0-add-chart-config-constraints-745b1e6fe04b1a500542ff186f4168998de297fd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.15.0-add-chart-config-constraints-745b1e6fe04b1a500542ff186f4168998de297fd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"81384f39a4ca9cf0bf9e8e0230c7c32374d4f44d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.15.0-add-chart-config-constraints-745b1e6fe04b1a500542ff186f4168998de297fd.tgz","fileCount":21,"integrity":"sha512-UofqsEgIlxXhSga6/WN2aZkwU/m7SfHx3g8ytBgmZdkeHZEc1ylFjBFWvQDh+Uz3UUs0YLBb88OAqkfbt1wK9g==","signatures":[{"sig":"MEUCIQD2ene8NjKgCUTcvXV4a43NkPCp0J6prl70NB0UwAKzxgIgK+w7fcMuEgngB5kq4dYq+JC9qGfAzHwZwDvMob5TqZ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPKssCRA9TVsSAnZWagAA0/IP/Ax1dyeloL9F/Z373mMq\nljUAtypJVz98mfbdcLySCUPWQIciy2CxD+I3TPd81wfsnP1JZYkZ7V/T1sUY\nC66xbRITK3D6JGApkuog+vOutf65cki0X5x6fH+fsdE0fjO1/fGDP+77iFTt\nXvz7hcAKGOSxyVY7CO7pL/7EMcXQU2CnKVeRPaWjm91V5AluhyWWDf3EAZA0\nmPadJQZNbBr65XhNFGeSQ4nNAQqIOIsnotsOpzQILPRDvdhQebQCUDqTgRBj\nSrSvChyTPYoISaYnAklXITmOoURGb+ng3V0+zWsNq6/7erG64BtH697425nS\nX9uo9pT3soRND8u4xt+xde5h2SNqQFS2M6U1DnZh41UtnmtbCWH8cIeea1+b\npWN7kkc3+o4WJYi0OPx3LUddm1DHDaknK5+izA1leeovR+l67+ZC+27pC9QD\nQGE2kGhpXyjtcrhx20y3F7gCVawT1/mPic5E+7vJOKzadMiPfYxUXru0hAqf\nWbrAGI1o5VMK5EIxuMisdooAKgkzHlTcv0tb4alWmldBztaicYBp2KX0G6+B\nRezmvpf+cTgV5z5epKtM4oTQ6vsIZz+Jf7X9etpr+IQBwXxMdVgqVVL5G4uL\nD8S3KBeW7D6+EC5GuqhAufDkdcSb8IK74kpMC+ahjO+iMupSuvLFLo5L5ZNp\nbpVc\r\n=RIec\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"745b1e6fe04b1a500542ff186f4168998de297fd","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.15.0-add-chart-config-constraints-745b1e6fe04b1a500542ff186f4168998de297fd_1614588715754_0.5689829849816159","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.15.0":{"name":"@balena/jellyfish-client-sdk","version":"2.15.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.15.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fe0e65e6768d88562bf563332fb0b8b634c2d3ae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.15.0.tgz","fileCount":21,"integrity":"sha512-KXy5SXc1yZcDrFL19iifI8Dngm6zAE17CBoBKM7PR9JmNaQ8iKuSXjU8q1VA6kiT92RoESooPtSjfAwi73+g1A==","signatures":[{"sig":"MEQCIA0acJoMif3FhtUpYDKbkLQnD6KsDqoiuUpFh6n6FS8uAiBGAvkwx0b1sTQx9j0uW02nTGmvhY18lFQofc55wWqo+w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPKv+CRA9TVsSAnZWagAAfI0QAIDNN4eB03Sd9z0VaN65\n1kuVHce++aRjwcaoCESgFWHgltJPH3FhpKkwh0ePVf+gMDgYmk0H+b+pqSCF\nXPys/HxDR2JX0DnuhpSH1LqBAxbFOn3haaNs2qJoJ/7neiN4tP4It5nEZCpU\n+p1OYeiXIugY1jPBEZ0/n3xqgGSZromfV1mLGBnHdKiU2baEjJCxQuIJCpdk\nqrxYUO5pcQDlTD4OahKW6IT1Qg0cvbXEEsOzST3P71DnPkyvdVnwlPzMRtpJ\nnjuEr5K+/GoeVScGyqiM0gCNYjTUXpkVetV2K1ITHaVKl4ygXOzTBMwq7lfS\n+aX/NDlG626uYoT9yj/olFZrDNzPruGKV80jRJoiwGm3rBS/E9Pt8DXnQ/MX\ntsAKumrKMRuNboF1We8/d6IMl3MAjEVQB+QMvBsuCev2GrpCNogPwIUOd0hi\nV3cX/BcAQX6t8M7iXYfn0Eemu7w9E8L0RzJVuww6RlCfmfg+sng79IWCpLLA\nPw3W9/CrO4nOaMBb5TWKLMks8swqMCXvKV0Zb599wWhTehb2yeFeoMq/jQIa\nb0aCrGAHNj67tK3f8Chcx245nBLxRIzIxc+r2um98gOizpCw7iRDqhVurW0j\nGrD9zpkjoJwVN5uMOa/GuwUwmPU+WanhLOOFjaN0IcLn1ueTJjnjAY+QUpK+\nAn/+\r\n=fFcf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"e585bf35085d9be3c3bfef7fb20e981cb85cb780","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.15.0_1614588926195_0.49665834119034824","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.15.1-renovate-major-socket-io-packages-2bab094cbd77b487ae6f9c3569cdbd6c0a1b747b":{"name":"@balena/jellyfish-client-sdk","version":"2.15.1-renovate-major-socket-io-packages-2bab094cbd77b487ae6f9c3569cdbd6c0a1b747b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.15.1-renovate-major-socket-io-packages-2bab094cbd77b487ae6f9c3569cdbd6c0a1b747b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"093911f1e0dd2fb68162f89cdf85d1e9689fc2ec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.15.1-renovate-major-socket-io-packages-2bab094cbd77b487ae6f9c3569cdbd6c0a1b747b.tgz","fileCount":21,"integrity":"sha512-E50FTXC3z3gtQpLOG8SaRiXWZ7Nl+vEzUAN+gMHlCpnPTSMWPuHMD0P0d9jZ1BuwlAOW11eYlfB2iT2sqRLX7Q==","signatures":[{"sig":"MEUCID25aYzIuxeDX7GbaNPybbhfwdCIpWNpMNd8G6V/3aB7AiEA0cgOiP1QIDHsynJNtY4xEVajFKtxQhowScLQgGKOIDE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPK1SCRA9TVsSAnZWagAAt+4P/28bC+tVqzR18wfHAAHP\nBI3EbybPAK7I7u+qbTtTERbMseTBeodMNwJvwNTJsM3Q96KUXMOrZWVXrhK3\n2AGGDU7+tBSUAAMvH1KNCPshJYJ7jBOskGBg+pZuAAIhUT8eS2Srs3q5yb8e\nA3hHC7pD4mDHru5DjL3X29tejnLp5Ftvq50zU2nKOs6EsGtA1cuaNlFL/MWy\nAXpWgrbwkDTCbdmGqi1cyHcZX1kdBZSoIAZDMnFecgO15/+OzhQDGdNtf4Te\nGRmscmQweh4aFfVlmgK3QGugPSssu8Gi1smToZ6aJbXp27PovlQKP2IGVir+\nYLa1n7hfT2UZXWH2iwotN+w9BW9KYxCJO19gIKBfC5ZjMu8QKKfV0M3XdQqL\nBzm5JkeD3s3TxYVmA8FE2DRNr80QcahAGQJKAwOhhIFnB5D49l2TjFnPO+Ht\n755qGwGrzxtvnkpzoNuL1rk3dMQoTyAUPSHqyR5XKcI6B47bWE5jVCGvg/pR\nRbdhQ7mlQInne4jW9wK6Yq1MNgq1hrCWh3TIeZyyczfeSJTrRmMTBYEIM9Sd\n+zW58cfYyORR0KEZ16J5Ij7OKhbLn9edculk9t/d0iTHsETahKmrNrFBBxag\ncqjzfEfpDZjznqJMPwM7aY8mGdgRXqnqAx5si921w2zJxnPgPy3Q6H5Ve98X\nUEbz\r\n=QjMG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"2bab094cbd77b487ae6f9c3569cdbd6c0a1b747b","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.15.1-renovate-major-socket-io-packages-2bab094cbd77b487ae6f9c3569cdbd6c0a1b747b_1614589265896_0.628270394243645","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.0-link-brainstorm-topic-to-pattern-3dac95ed8d738662cf4015b6cd3a9b9a92ae6ef6":{"name":"@balena/jellyfish-client-sdk","version":"2.16.0-link-brainstorm-topic-to-pattern-3dac95ed8d738662cf4015b6cd3a9b9a92ae6ef6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.0-link-brainstorm-topic-to-pattern-3dac95ed8d738662cf4015b6cd3a9b9a92ae6ef6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f828450c426a0b9f9a8aab64046297f7d0fd31d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.0-link-brainstorm-topic-to-pattern-3dac95ed8d738662cf4015b6cd3a9b9a92ae6ef6.tgz","fileCount":21,"integrity":"sha512-U5VgxQYmpBThmW36+Ch1+q9TwXC4Tn05UFJ9YScnQasVhhxaIhXRaHEkUKtybz6jJ90WamHIEnkLF5N0MP3fkA==","signatures":[{"sig":"MEUCIQC4YNNVeqWmCCjOAQbnPaAGmbRHDsWYQdkTlAL7is3i4wIgPZQCPCwihl0AMoe42EbOkjJD2wVHyleqfysYCd4jZqc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPLjMCRA9TVsSAnZWagAAdtAP/3vYIevVjdKoEJqafmVW\npnanJE3PyB7gIvLyH99AuEJeyHHhd1qkAYCIGIr0ovmbhoil8xusYBeJq8pO\nA/UFMljOZvHw1o0gGwSR+nHrX01/GiKciS1rxmnZwt8qwhleB4u8oEpr/41a\nDGNvwkyqZUxSrvZLc3jCTjydHiza6ZVgL3pewwpi0zuVRi3Dc4KyF0qwHjdi\nGsSkhDLo3OjEbWLq+H6VPGtjGNfx+PvTYJKQU4mSbiUlg9qrtdDSqJdDXDSk\ny69LkEzuFYBl0mRs7qyY7OOsUfRto/yGPZSJ5sMVW7mt7epcU6DkdStP0ULH\negoWXeYfsRlyngoiNV5Y6rwlFrn7rcn1CLtUg6l45g/mu8Xx9hZcqhjQmlHx\neRNY86XabtsDsc3iB3RYHUrmZHq/P1+aPngpAYxyQaz6Husgx67TCQqEA+nb\nKdn9QjWg4dnSAVcej1TKtdyWpl61BEPSDvZY6+5eT7SrA0RbKdW/PPF9l9v4\nmZcyneIOgvurkoxCmvKnshcoeFZwVzvX0l25VWAqmAaTqH3Hi3zsnwFtUrso\npuai6VSQZSUwmXfYUwxFGzqG2vQzcXlRBlYZcNG1NjNOIx5z54T4Xhew7jx7\nMqmjHbDaQAvs8OOsmDkSG4R4KyKI3MZrEhglnosnP94d8ugncknR3Clmz6GG\nYcZc\r\n=/d0x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"3dac95ed8d738662cf4015b6cd3a9b9a92ae6ef6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.0-link-brainstorm-topic-to-pattern-3dac95ed8d738662cf4015b6cd3a9b9a92ae6ef6_1614592203980_0.6553867967644458","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.0":{"name":"@balena/jellyfish-client-sdk","version":"2.16.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c446a14232c929414ec484a19264a1355217e16a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.0.tgz","fileCount":21,"integrity":"sha512-uG90cVPoOgC0zs8z62QTZ/SJ7gPGRsZQmlubuf733M8bRhPf6hRHbpQ0ogW4RkVeHJMeE6I5uXqCJM0h9clUXA==","signatures":[{"sig":"MEYCIQDjDhVxVxrko/rAxQwmyWvrx+r/vh+CFv2AdxTsyFwQ3wIhAIkAPkyBxTLeXooq4lJknEtURGriVueJm6zwDn737BkO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPLmLCRA9TVsSAnZWagAAYY8P/3SfR9rh3iTVptt35Z79\nagMxuZKVLBRbAHFy0CJhTmeG40QZoHEDMWl0WevvMamG0usy6mvG3f4FhOFp\n5smd/N8UFhunrTK1rLwRDmnYVOEwfqJXO+l/FJoF5dFQJVwSbEY6IuTSWkgH\npka6C+GCKcxxRd3O7EQtLMOhW+VzB87QKtb5pdd+ig54WFO4aqejq+XcImfm\nhgeL5npqzb35oSbe8TX0IHyfrlZDKzoVTDfI4+oltz4XX7QasOxdFzYP0QP9\n+i6LHey/vRjm4HN8UIb3jvFLBY38rk9Ew8MNCMAYCKl5Kh6PGJel7QbtCcam\ndJDWfxslz/txFLxvcGqV+zd4+02Jer+Ytf6YOZKmYF/1yQU7zQHeAr4tNKPt\nupOSyk2T4welFMTLud5LRLvYh6G79cfS/+3a+0KHzkRKfXufy4OQEGfyzfYF\n1fOJpT63QCpoJqRnBqnL4pCONpKAwgcjoYIQ+hTwIK1ZuFUEWI83K/NZg9Pv\nvuaaVb9GEhW2AiaYPamEAlu37QYeG4jh/bTiF/OTyHxgdUDgWhkyzUVb3MhL\nm1n8cVzB21php8GYvk49z6HcFFwvqRzXWPGjGf68toWWqoTB5RANULGNgJMq\nf+VSznxpo7lvxmzasKu3sFiVaswTJ+GLRqL2+t43CCmdAsEh8UVgvMswZJmP\nexHG\r\n=bKEA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"e6e9d321ac2931aaa7511555715c50d03e87ad30","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.0_1614592394596_0.6647808579459593","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.1-renovate-major-socket-io-packages-2cfdfa932d587d24ba7520e703735686eaf2b84a":{"name":"@balena/jellyfish-client-sdk","version":"2.16.1-renovate-major-socket-io-packages-2cfdfa932d587d24ba7520e703735686eaf2b84a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.1-renovate-major-socket-io-packages-2cfdfa932d587d24ba7520e703735686eaf2b84a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3e9f3efd02cf0a415d7c34836d46c91456ccd2be","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.1-renovate-major-socket-io-packages-2cfdfa932d587d24ba7520e703735686eaf2b84a.tgz","fileCount":21,"integrity":"sha512-B1W0+CUFQSNDNBia9t0+D+o0WdSLey89t2RDtvsMDkIZNJ/0AOGbEC+lcdT1I1Jkn3vu8VCTfj+kTho1ctRBBQ==","signatures":[{"sig":"MEUCIB/Fsd6Yq6VfwzreFF3IN6USNszBP4xk2rJqXIsZ9bAIAiEA5qzqLIxDvmJUV+8Yd+biNmOWMzYN/2OjK0mtrO9kNpg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPLqgCRA9TVsSAnZWagAAA5AP/ifsCiNVlptsax4yAIey\nifffikJbOAjG2zKQwvb0VAGU3xSrcEUYNtXEoLi4jw2jhB7kfEhggIvru4JL\n1sUUCDWXLS2cCEp5UuOjGhfjlcEsx313gs7iNcGVYLsW6apRLcsv9tSeoaV4\nHLUsJRlcoT9mGsWPwqL24LaaEtOGAqBgFUvmhw4vDrQ+lRCZIIHV4Q49RjWq\nKmooddSsA19/K2W/AX8QgUJ17cX0cYlcoY9a4q85JrRFwaB+lJZk3Py+n77R\nwXPm7dEAhHNbsUEWmEloU4HTM5GyevAMSDtjEZoy8RrSGM9xaPtWtvc+QvEW\nNMtooIFcBGTR/DaghBS4tA/S2EpmV1NXilr9JqZDq3/GQQYkLz0h1mWgXL59\nYmaUnQx0uR2I8C/dE1qhB/Aex3Sv+TnylrktvIeKDSw2uW1hbV1DNLDw9STM\nPg6zauDNRU3PPJy2X3bwL2LRi440JnZXKwTxwxrRD4loWmVxbkMjSHmp6Cq4\n1wVDrh9ooMqlfKAHeWIFizKX9HsVhiQx0Gt25Z9Nyef8/51w0hXhM24bfo1I\n8GmK9VyG+GeoGF0xWh6Anobe9ef0l2xXz3XD7BpJVjBcLgin2Uty2cysHLmM\nIJXcz6IMypn3Ffd0tn425voh0v7JuzUEjDL2PCPahscaIwx0hE1d29OglN46\nXg8Y\r\n=WQpX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"2cfdfa932d587d24ba7520e703735686eaf2b84a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.1-renovate-major-socket-io-packages-2cfdfa932d587d24ba7520e703735686eaf2b84a_1614592671947_0.5408907078531071","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.1-remove-form-response-constraints-491fbc6406c9cd6e8a83216b2d14470eeaa2a839":{"name":"@balena/jellyfish-client-sdk","version":"2.16.1-remove-form-response-constraints-491fbc6406c9cd6e8a83216b2d14470eeaa2a839","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.1-remove-form-response-constraints-491fbc6406c9cd6e8a83216b2d14470eeaa2a839","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ede71ddeec739a01da64c648a0295d6af6ea4d20","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.1-remove-form-response-constraints-491fbc6406c9cd6e8a83216b2d14470eeaa2a839.tgz","fileCount":21,"integrity":"sha512-OnlK3MV2IX4YH7Kv82JrAftkIsM6FosVYtTbUY+wWSX2a5DoZHjUrMH31GW1QiPnCsF/NJArz1UR1nWa3vfOww==","signatures":[{"sig":"MEQCICQEUrXaXolFQlC5jEeZyBZL/L4dtcgJvV+K8bOEmSlrAiAYJnRLiCBQFug0osHUm1KZE4ef7mzvWeM5IUsYDRJTIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPL8pCRA9TVsSAnZWagAABJsQAJb7enkCq9xe0R/VZwOp\nlGYu8ZMlr+9UcVZH0ax8T6EzWUA0Q7IHIO2ZFPE7ROF1qxtBDHhC6gjYNjan\n25LcEbxl/TNgVpIkHyqqpkI3DiAYgMxMmhu1BnbAryMOjNSC24nHhEBGITgi\nfqzQ+C9aezfCUShD37AdGfFcK06KsliKmbEyxywYVMPDooy4aW3o3lz8coLk\njpcWOLKjknOseii4q8JA2JF/De3PDBQwKmA0W3nUlKNPugUPDCvJXY8GNyyw\n3VObxQysBUFymQfiaJNR1gq+JaY6KtfpYmADrmXUlEz87TcrG0QUxsaSYKTa\nLfz7c2IMVIbR3NjC/sYssOKM9XY8tLHZ2/s9PXAELLrJbrmNfQTCVEo3uhOq\nx0sTJl5N1htZYQuu7W11pvy2i1kgH3I70+eLbzp+REPCia3pzqHJuBS7HKDn\n1EQkXcgI0MfhI83igbkCMXGmWBKGuBoRGGgOifbteAQ20oN7TpGoNV0OLB1S\nrwahACCuv9iZ7gfhfymBL0vgzz/JKktPX6vEEkb9h2pqrxGKjDokZCcHtBqW\n9w7eEUyN+nFEPkMHkwDH8PZR6iytiQPSvxl8a3jHCiA+qnx++7KD4xyf7cdb\nGkgpWcDroYxLQeTr+9+ZaxWbY2mtQjj73eT205T9/8a1YaIoUUx8VZVWO22k\naRo8\r\n=vgQB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"491fbc6406c9cd6e8a83216b2d14470eeaa2a839","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.1-remove-form-response-constraints-491fbc6406c9cd6e8a83216b2d14470eeaa2a839_1614593832732_0.04633209012463335","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.1":{"name":"@balena/jellyfish-client-sdk","version":"2.16.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1e81e129b5dd334132d48a3c145f73b265f96240","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.1.tgz","fileCount":21,"integrity":"sha512-USVR0FIpBMXUha4j6JyXng5L+8te5PNankYC8dRpkqeGMW6YC75+IDQ2fAAttLeYODzDZRQRABtYtUDcKZJoYQ==","signatures":[{"sig":"MEYCIQCYoQqLWRhU2YBeSiByWIbQ4DorLm1A9P6CxxF8vZhYhQIhAPZWpt+jBsnRIDCz6r5BtO++V+Ghd8eWAVO3vaqSoalN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPMAOCRA9TVsSAnZWagAA3ZwQAIPcTj6jP9JOfitP+Ocu\niDF91On+Sf50x0v0V8gBpeObxsNmLVf3iJaNVc67Kx3msRkBedrXPVH7u58F\nSrn/ELbEzrs6Gn0bj9OeO+30M3rlBjM4ddqUsV5DnzWx2FdErX0u4maJTgu/\neo2Os22fJmuX9NUI7dwIcbmIlu9r6XOzhX6cUevOFRF/8TDOABYQ83n9tpPC\nKlMfyG8kX5i8510NqWf2urZgHRkf+wvYKXtccUbVLkYZ6o0XsQqMZOpsJ1DG\nyK1rfvTYfe1z2pPOSYyaCqM/qU5uXtBPkR46k6N+Mj3hPoGzpxP6H9CF8w0w\n9YOQY4oBIp3aXKajXeo1ljDe2byed6P3mu0EeLykmOqLs2gshlX2OtNjQnU9\nI1j3oWHkGlZWUAY7Mmmibpl/wdZcCQ52X5HfI7FgrdY7IauT51Gv3GN3s0o7\nmbtigT9m9KY0p2fURpeUTEPvLl5YnIHHSnl0eAbeQ7d/Y3J+QEfC5zH9K04S\nkXM3FcGeEkjHQ717YjkvXoUSl70ne/mLMF/Iy+fq6dBtPcoqDZWQDBHWpXec\nd2oJzRZHonKxRA/p6IiFJxNheAa6pc1xjsJD/oz4huRrHPjHckhx0jJvzJqK\nSWc0oLghCzJaEVfnmrzMV3fzL3+MDAP9t+LaUm1oAaPx5TLbOcE9dNatc4oJ\nWhpT\r\n=St/k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"b9a2ede20307838ce68e9b1202ef7e4d1eb73b3c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.1_1614594062260_0.24915122390701572","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.2-renovate-major-socket-io-packages-6f5cd89acebd11884ca34b79aaa8e0af7cf661c3":{"name":"@balena/jellyfish-client-sdk","version":"2.16.2-renovate-major-socket-io-packages-6f5cd89acebd11884ca34b79aaa8e0af7cf661c3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.2-renovate-major-socket-io-packages-6f5cd89acebd11884ca34b79aaa8e0af7cf661c3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a8125c195cc9d0448499f7109045caa081ffd840","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.2-renovate-major-socket-io-packages-6f5cd89acebd11884ca34b79aaa8e0af7cf661c3.tgz","fileCount":21,"integrity":"sha512-eDjjKb+UpuM4ssf8mreQsnE0ZGms3h+AK6LZFJq+SLFvgPN4xEz7khTdEWeBMbUU6TK+q90ingWmTGl48hMPRA==","signatures":[{"sig":"MEYCIQCT7nEf5QiIqTi58M2CACABDz5WGBwuf83aMmId70p+pgIhALZ1YU6/nWpSCmdK7XuhbMp+9Exu/M8qtW3MkNrCX6//","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPMELCRA9TVsSAnZWagAAa48QAKDHKoW64jCYSnOrkWsh\nQcLalN7B9Zg4pFUFER1ntgIkAXucSeIAjggcuhDynzP6brSwaBwH3xpq5tkR\ntv/n+CE3yl1vZdC3tsHyEPxOi1nfNqu530MRvFmDLvvDqoNXoRVjPDeh0DWo\n02sWrC7E4le7RZrgEAzFVJH5TFgrPK5021QJg/hIIyP2yHbx6F0qU7kluXi4\ngKpl4dZDgle+B/fsQumFhUSqR6bBHhu19tms+pduG0wOCWEZW+Ec3KDRx9CS\nx2Pf73Cfg1wtli5sJylPbS2IQpAja9l4UhEZfCv3zPUtrOPNP/EWk8cUcCbz\ntr+ECfbrlFVeS6sgAtinZTdM5fHyaCKe0rwqsJHAwxkZs4QbGVVL+FTyR7nT\nmiTy/lKWUO5VIC01qu+IJpESrTxfDpkpjWPzGcgCqkcxKv4tahfLSF/e3Lkw\nVsqACrNkIhll8slLH/9b2usXJQcc1oyRCDvcPrzVs5YkRfJOeIldrShyRQaq\neXIkbz/6Bp9wc+iugvzTRDJtAFp/gUR6qNP8OiI0XEVWIF/0ga31NFM3KjJv\njqkXOGboJCDgCrPpvW8i86Z7zkhsUthEMViK/w20qFXsawmDVGR4MR8j5Ge/\neEK8KUdr7A8bp7ArK2k+YQPhvLY1d3mttWOq0jnaDH5TJ9stQxs16LsERvpX\nRPAu\r\n=VUOS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"6f5cd89acebd11884ca34b79aaa8e0af7cf661c3","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.9","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.2-renovate-major-socket-io-packages-6f5cd89acebd11884ca34b79aaa8e0af7cf661c3_1614594315462_0.016910994363421583","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.2-renovate-non-major-808c4c8fe93498bb984c0e5d88aec80a3020b87e":{"name":"@balena/jellyfish-client-sdk","version":"2.16.2-renovate-non-major-808c4c8fe93498bb984c0e5d88aec80a3020b87e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.2-renovate-non-major-808c4c8fe93498bb984c0e5d88aec80a3020b87e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"245719c79d848c347fc1d44b137c7f2072e3e94a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.2-renovate-non-major-808c4c8fe93498bb984c0e5d88aec80a3020b87e.tgz","fileCount":21,"integrity":"sha512-2Q0IFUKs3jXF/Q0tYe74jP3e46C2waThqrE8vaSAfLFFzHsMy67A3wfOYNSsPtnMX5tu6lZLF9S1W3ZcPXAyDA==","signatures":[{"sig":"MEYCIQClKJBCDjwLcfmrZJL2Qv0Gwl8ux11QjgJDiW3KSDZJpwIhAIO5zA0uprBpmas1zk4AC5YsxXp214dWOQPyv943P6DK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPsA6CRA9TVsSAnZWagAAvCcQAIGSpMPYU7fN4pg7k740\n1OonbDC+WEsHw9tbfpPTB+32VI8ncBLSEZeV+rJvJJNd8bQ2AYTAgFtwidxn\nevf+HxH3a9wUr6ShlkO+GMb17c/dKlLpzUbVVGsweWot83vTc5O7TYjsfMAP\nL77xSCjFscsXX0f+f3UD74x/D3k54URd3p8tcR99hAp8VP08deerX+iYBVqg\nBJgYK3l0ARXVp9acYXboEmPByXnMo2ZOZAyErtooAm25h8ARSaA0s1imSkWb\nJXGbwnStaplo0UlLm6mWZpSV1h9VavJw8j00zVx5Mc9HFeQqwmyYKavy9cYi\nPD3TNccoEvROZtKwhSn5sp5v4/scgC6ksVEqJdyugCPxub8j06UzB8rm0Fa2\nsqTDZZASQKYvDTrDTlOG9GAW7L3LETbgivIm28ixb8zf6aAEc0sdE9OCjrgw\nVxWAM/ghpOsNGYRvemoxfVG2JNLpsSSE97OEylXR4owcbivaML+eIN7zCZUw\nE5W4oTBk0l2A9cvaaMOqOxYUKmOTiKKrzpNoSUyMLI1entcyBGcImu63FerZ\nfyAOdCx61R0nxFq38hSV/SmLJAYLwfjcP1TMw8xNFuiK67pw7Ig/qseHyF0Z\nnMSWCYTKf5X09b3N7DBifFVRP9IICuLUKkvpNTu9pArB9B0ASJUDkjg9Rcbk\ntN21\r\n=THrU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"808c4c8fe93498bb984c0e5d88aec80a3020b87e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.10","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.2-renovate-non-major-808c4c8fe93498bb984c0e5d88aec80a3020b87e_1614725176765_0.05297684616215004","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.2":{"name":"@balena/jellyfish-client-sdk","version":"2.16.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d7699b6e38aa394abb545792f17afdb2f7fa2ff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.2.tgz","fileCount":21,"integrity":"sha512-jLM0GXmJLyY/EWuLhoOGRfk/sSE5K6YyA3QUBORyrl2KINKD0AftcZIO0qXkUfFBMHHsalZvaSDrYyuSwSNDTw==","signatures":[{"sig":"MEQCIDAqyS83cCKbSlEXGNEuwInHBZGv7T9LgZRFbvV3wJfsAiALNyHIp7MKF3YVXG9dlvXP2HpKNLNLIOyNgZkZcR13nA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":161856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPsEkCRA9TVsSAnZWagAA9BIP/020JCWBCGgKjXTy/Lqu\nsFTEGQH5bVPu4HA6IvGPPPkUaMQa7qd1eYcwibl40ynVLmy7PhDFzbbWdQnf\n22IoK/F9IGIN6Kby+9X/Dj+ri6sawW3sy8/DkZcd+mn+PVYhh7mVYx5R+vyE\nJODNebSePkWJGAE0123tU8kJpcF49t+4XfxtAAB45REtIpkY/br5YKCCz/km\nBAE0N/lZa295Rkw9R7x6G5w27q/nHszPC+VoLRNEiiGGLDdFz2IUPrE/CdEl\nzF341/IIKtDUU9Vhd30uabuU+fg8bUOy5aZ0pg9quG2f0b/bIzlm8c7fzo4M\neZ55UMmp1HgmfI+ZMqYwlFko1nE2l+QdA5SB3gPRptwYksqYCzh6b5wrfdjg\nibZBqHXhgVQNOOKLw79mLeMVP7L/z2PgPGwTy5L1YQTwGfVqAGmGUz7Y47vd\nu+qWu/fnY+f9A2CbATZTHvQtQ19WTiK1ee4FPp3gyixMRj+5GmyPcevPyRMq\nHA3N9Jl/UwfpZTH36Mg9lwaGRGkji241HsroDJDO576o11xQCAStd1BwHt/U\nbjXRAZyLcvyFmKGOufJrGwqqa8OCpzfgHsvMM1cTzNXkqB156cpoqkUqBmBS\nLPvj4Y/jQMRejQCrZcAH3wMYxoNxWxeRFN2db7Vzl9OH12IV/KaeKj8dbYmP\nEIHn\r\n=NSys\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"bcacecb5dcee112c1a764b49c1c8b606067cf35d","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.10","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.2_1614725411528_0.3888142993611656","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.16.3-renovate-major-socket-io-packages-faf9509815a065a5fbc09c95d9464f4f03648013":{"name":"@balena/jellyfish-client-sdk","version":"2.16.3-renovate-major-socket-io-packages-faf9509815a065a5fbc09c95d9464f4f03648013","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.16.3-renovate-major-socket-io-packages-faf9509815a065a5fbc09c95d9464f4f03648013","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"19a9c1a55a098576f4d4b877345b01e11fc90d9a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.16.3-renovate-major-socket-io-packages-faf9509815a065a5fbc09c95d9464f4f03648013.tgz","fileCount":21,"integrity":"sha512-cFBPA/tSUmIR9wtPDWvLLNrlnw2m4SwTG/mYEi85eiPJcoDJon6uZopamnJX1W9GZv761o4RMfZ6EfeUt8VT5w==","signatures":[{"sig":"MEUCIQCFmi9AWQQcUMfnhxcqArCMuqB6NuetxlFF8iAbBDrfGAIgPr2rmx+FNNmdAOuM8788O4uSvbqLN1WNdKxp8cJ1/rI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPsGWCRA9TVsSAnZWagAAWh8P/0KH+RF1J6f37RrQAQ9M\ncOxCxeC4eO39DehN4EoaJScU9b4XCMbgqM9SyfG4t1ur7QbVSKBmmSM780dc\nU1Nm+kySRyOV9TOWcQvQwOWcRG9y/D3/5vhhEN/dYPSpC6XjiyYgkcIX42Se\nNlNQ2r5WgLACOyLzb2MT7dsTkb9TCuzzU8fo4cplb/dZKrS12HL7UPFXFRKx\nDHnesfkMILXmAwKhBdV2K4gUdxmI5ZxF0J9LQJbUWLfTpXIQUuKLpdnvJcn2\n8LijneS/NXC2GjhnWZ5BGgSWiA+ryPJQr9fSklxWNq78whT1wwgZcNtmqEhs\naiUtKclpLU0zWrmLh60mtDSXiS15vNGYZ1lUpi/tZOQHC6FSGgoJj+qplo0d\nRat70UX2GiCW0neBPrD1aJFBBWLnFCskPjkG1YNdkOh0tPzpmzRKo1GKiYNz\ndLy3tek+RWEHrqur5hMXf7bBH5/cuXJPgTg0VPrG0NmhyFRaKaEw9doPdt3g\noXDg9cM3dk+Mx9dclsYcZBvYqZj5OvfFwnjyrTut6uXJOTNUj1ceAJvZBGij\nZLtXgqGbl//8ASSVJ7sHwCiRFFeLNpFeK+zetQU/8Vupi4/hu4Ep0a7ZK7ir\nIv4jBE7lk1A5zM4/sL1PDLOF+jfOSgOGYwShi+uQ5MsxnLJ0iaWRyJb/dWTv\nat+y\r\n=0rRu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"faf9509815a065a5fbc09c95d9464f4f03648013","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.10","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.16.3-renovate-major-socket-io-packages-faf9509815a065a5fbc09c95d9464f4f03648013_1614725526340_0.20959343256712115","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.17.0-generic-oauth-895387a1ae7993ee4a466eef65158db6d3741192":{"name":"@balena/jellyfish-client-sdk","version":"2.17.0-generic-oauth-895387a1ae7993ee4a466eef65158db6d3741192","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.17.0-generic-oauth-895387a1ae7993ee4a466eef65158db6d3741192","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b7cfdd6bee654adb50b8fae3db4058772f09a343","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.17.0-generic-oauth-895387a1ae7993ee4a466eef65158db6d3741192.tgz","fileCount":21,"integrity":"sha512-jvxo5GEr/7w28v5yhgWscO4X/DKWYWe++UlVbvq5qnnnRFX7YKauQGTBzdKSP/HhpdPhbWjbi3MQ3CU9Ml6CKQ==","signatures":[{"sig":"MEUCIAwS9oP/J7HHDj2XjCwxDXHgM0V9gQM95X3hHq8WvIbdAiEAk33HUPj+PqhQBlAzlg2CJVGDt0UAfY79th+aSL/RK/0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQBX8CRA9TVsSAnZWagAAMTsQAJwLhM0w0e7claBin5Wa\nEHN4saBCo04aE03cZY0c4jmSoEAj/EcsKpW9FROr53YeC8F2NLtftRgcMvsv\n4JvoUKgahRcyKDJL7gelTxNORF7NNb6/nowFC59mlD7RA5ee93sT36FaW2m5\nnMTANurdyfhkopH6UiXxY0/4B84C4RaklJPItBSpd/r/XGjRlatBn1w28TfL\nhDX6U3O3oPuVUC5k1gGxvJBZ0rNhJVHBrTOuxziXY4JZRUxuOxF0fGgejDB7\n0qaNTE8rOgdXjUTWmeMryF44p78uG3da0eHT0umo+H5rV58FCd1o5BYemHUD\nBK+e3LZNEFyNXGEae/3vEAjXGOL15wdfs3unChApiOSTFuSTTeU0DHh3nsQU\n9696v0kzQlwfOJ54eZeSgKR0q4sw3l/lRLp9zfvg7ZQuA+hTFFg/KV4CHL+M\nNwwsAnCUgoYWSc/bwxjGR9uy4FIy+0V1LGoqMdO2cNUpajbrcvIdmAMIekgk\nPvlXuaKVP+gEP477UFNuV7BcV4gkEys5MmG9Q/w0rm1wEXL60ixpE0UWzdIE\n7IZSk3iCAslHu1JPvpBPoOHGq7hIM7aIM9TcZeX/9r1in9aJInFz+9XOqHgU\nki7sL2IZs58b3R29Q7WkUYHKJcd7mwlRwPzjeeWmLRkzKlTpx9Pt6WPrXbjD\nWU0+\r\n=+Uqq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"895387a1ae7993ee4a466eef65158db6d3741192","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.10","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.17.0-generic-oauth-895387a1ae7993ee4a466eef65158db6d3741192_1614812668195_0.11325900499398056","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.17.0":{"name":"@balena/jellyfish-client-sdk","version":"2.17.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.17.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"97136f5b666e4dfa136853ecb8ef10062453ea24","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.17.0.tgz","fileCount":21,"integrity":"sha512-CLSC27W+qHfXsoH2wwv4pTcqh67sT41YK+pwN+HxmU7clitNzaMU7VFfocnU13ShvmXvpmgsE5+z55s2TNPaMg==","signatures":[{"sig":"MEYCIQD8Bll1z35x57D5Q/y2/LkAxhi5ObhjDs65iFzTFi8sXwIhAPLkaD0tLTqD1xpfNR22XFeLnqjJCuzv+/rWGqxtEnXe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQD7kCRA9TVsSAnZWagAAyGAP+wXmEFg61HzVnQGFrqRD\nL6bj7WtlLEr5y9L3qFMX+xjZujd1tpKPySYMlXrBdE/UsIUMmQiVuYwccouB\nnxqiYVU/EeNNS7U6Oaggvr3vtaUSbZLznN0ky7AU1lWYMInppXjJFhPVtSpX\nI05VByxPHEsFm6vn7RCospoLJbH9oKIk+7xyIvt3fHmaLM+DTmaOWlhpCKSB\nfROzMxz5gsvRnubZSQqs9POpZAivjPCg0ONyUbjrB61POXZKJbusRX4JF8LL\noS+Tl34tjcPU541xD4TMxt0XfLNhUlDrod+ZsYta6ET8olMp0GiKbBhV/a9/\nqwW9MU7ev4VttBG3dJsB9ND6FFB7A8nWv9/0lsEnFJoW/3wkf+/tlkCbsu0t\nOGK7OdaR+pDG3Hw2joq+7k40et/AzlIsQ/S1rDZs8yzu2G8dNQvTCRcund9/\nPw6FOLEnXdQHhKRnFc/w5EcchDXErLR3QeNS3+IIvPpkk/nfNCGiS1rHUQvw\niOO5SCbAPn24rpmLBf4TqH4SY0fmxopqTzjPnLBYtBLA6f3eHKrvBoujOZ40\nBgDd233LElu0Ep1j+1ventu0NzqQXuIRoCPlccZFbK842RfsNzB+P9Vgluxu\nzcXTmvyiXH3C1l3Inlw2AU3AfKAwujL1vSBONJHYqyPz20OUXiErVRZICj23\nebia\r\n=8Iwn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"0e658a90b84c3e1f468697473bf64a4e78adc1a5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.10","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.17.0_1614823140051_0.07669175945681506","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.17.1-renovate-major-socket-io-packages-5341a219b8074c0fc20237e4f12d3c4c0733771a":{"name":"@balena/jellyfish-client-sdk","version":"2.17.1-renovate-major-socket-io-packages-5341a219b8074c0fc20237e4f12d3c4c0733771a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.17.1-renovate-major-socket-io-packages-5341a219b8074c0fc20237e4f12d3c4c0733771a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"67a3129d6e536367f2365e5b9d27e1ca9dc2aaf3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.17.1-renovate-major-socket-io-packages-5341a219b8074c0fc20237e4f12d3c4c0733771a.tgz","fileCount":21,"integrity":"sha512-3l0veM7q+EDqnjJPpLVftns5fwyXvWjW7uD06dBXoPMPfsKk1OQj6FIhwvNvkHD5vHw9+QEfHeu72XEKH/NA/g==","signatures":[{"sig":"MEUCIQDOkJ3uyewBm9DAbB6c8AFwVUBFLAe1CiUW3/sO3wO7dAIgAoNm8Jc7xHdRze4DEbZypIZ/+IVlaFgbZjOnY6D/KoU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQEARCRA9TVsSAnZWagAAnK0QAJ82vFgqYtZNZJPh3GI4\nOhR6ql/0zwj/ma/RPSCMPZDbmAPSliRzjOZQW+zJuIuk7J82kxSkxb4BvxYQ\nVm2aact/91eJXtyizPgRHAMg55O6KfIaA0DYQ1P0uqbTRz2gAsiJwmY5vcQX\nMWBhIpbs47YqO9qqYg3eBQlj2WUxd4dpbBFSwmg/afp/S9fxyIiYk1kf8QrO\nTKo61Us4P3vyVktSon31Q/mKhKsvffuZAiIwNpP2avKXQgVQwVNShidYtqSV\nftXNPH/m5kohwnPaKw9T1Jdbf4i+pTlvwKNRUkjRDlXOfKNHSxEx7U6fkR+i\nd/HFfBXiOSzH1eMbycpdmlBq84pRZzcgB1GBeGxykgtqBJho7c2BlO5exDrw\n0gEkpEFeBa/hWMzyGve64uIR9Hbnzi8gMLLlOp1ljHExHIEzrQ4ulp8mnUno\nClKZNGXT6OmntjU8SvX+SFViIs3sh36xj3NvosLIvbS2Bbnf3JBHD2V76fer\nmGbagl+VVop6jvLMKzar4Y2IXxJu/opDlA5ytsmP779nuZtbNbyr69OkjHAy\nZWpyOV995eVrSWMADB9mur4xNICwjkmEoZR63qe0JNS4h7539jsbglFwU1pB\nt4u1GxB0sZrGJC3IsyAp9UnKh5kaATQD53mo0jKMZYgFFyJGLpqP2za3SXM1\nd+TB\r\n=rvS7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"5341a219b8074c0fc20237e4f12d3c4c0733771a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.10","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.17.1-renovate-major-socket-io-packages-5341a219b8074c0fc20237e4f12d3c4c0733771a_1614823441285_0.5512101791035064","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.17.1-renovate-non-major-3f5e15bc253e6d158e84c432ed100fade5885ca4":{"name":"@balena/jellyfish-client-sdk","version":"2.17.1-renovate-non-major-3f5e15bc253e6d158e84c432ed100fade5885ca4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.17.1-renovate-non-major-3f5e15bc253e6d158e84c432ed100fade5885ca4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"354d053a437b01d9edf45e8984ca033a5dcc57c5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.17.1-renovate-non-major-3f5e15bc253e6d158e84c432ed100fade5885ca4.tgz","fileCount":21,"integrity":"sha512-flAoUGZXqX+18tTH2biqjKZ4dNmirqQcn8kooC27w/bIzqB7MWP1nMOhwN2CIPhy+DOBI+5n8PIGOa2qEioAjA==","signatures":[{"sig":"MEQCIG1EgHrgSXA+eaV+hpPP6iwkOyCtaWYShrnhctt0fm6rAiB2UPcmtEoB3xBtj7WbrLvvr274RN4GJFve9zznfxUAcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRUhECRA9TVsSAnZWagAAsUEP/0ryM0y6+38i8KcZLbRC\n5fDWU5vwH6zpjppSNOEok9NnoTVHxSj6WC3rnz6ay3l24Gn5DIrhv5XiVGZS\nWjxUSQclz8WLngKj54leEHjlR3AnxLMe5wTnqYiho9/kSUOw5SxltvNRgxH9\ncKCa/OQDvh+B1EkaYmEdensGGZayw5nZP6U2z5mnnl71fOrIVVzFhfHWwXnF\nFZdgWmKiQMyz3uH0H9Ucapilj8srn90fH3ASgfuTVzD+U03KOvYaHgJT6+OE\nafY/2yl+6z6isdYAeBNqPVC4XcmAtuaFVj+IM/ydEoKWo0/U7S5nUzgjVQPc\ntcB2IOGGbuCSDTvs61Iggb1TjGzYxA39jXnA5J6GP9mpVY8a1y5F2AeNitoI\nc3DqW5va+sJyLeH9ZxSsIGPye4JcD8O26jZIuEmHe6IPdih+6YZTxOe3HG2q\nqbQPDGAlHhvuv9pRifqmfINg+nQluH3mw973xjPCrOpfBGmwb3DVq/R2m/dr\nN0hXfp+I9LVH6pjbcnbqbjP//XsC1nV0UKb8O+fTcaUrLgB3LPnzkgCN11yc\nn3wQ0v2AnTv9lifnpKtgSCLPAo/qDBQlNgOjp0OvRf4srkvBZWIE8pzPbDL2\nSNzD0dfMo2YS6Bj6I1UUGIDLiQXQUteDUe0wWb9v75AZsTWhktj0UB7gZR3S\ny3iM\r\n=TRfj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"3f5e15bc253e6d158e84c432ed100fade5885ca4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.17.1-renovate-non-major-3f5e15bc253e6d158e84c432ed100fade5885ca4_1615153219704_0.4283342359761424","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.17.1":{"name":"@balena/jellyfish-client-sdk","version":"2.17.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.17.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1687fe63ffa78276de74ee96d01eba45093c1c5f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.17.1.tgz","fileCount":21,"integrity":"sha512-dF5pI+jD6ahrzRm6Z7AKvBO2yzgHx8elYojxDlfZmeByJ606w9l9fqo51NmlARTtPE08hJ0/fHeAli1proMuZg==","signatures":[{"sig":"MEUCIQC/jvOe5G29enX+DRMjcFMdONzFUMVTvGDDh1TU1+XnngIgODUjI5dYrRZxWR59wmAGyDVpIAeKFwIqkciXCzLH/TI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRUjvCRA9TVsSAnZWagAAkq4P/j+Ash2E+sRsNTO/0ZcW\nOsXylGEbvzadzzPNrGcX6l9pJ+P3772WCpr9lffq0Vad7eKx8gwV62ovRYsj\nTqVxuBkGZBWSeBIQkeWmj1kpD0IzvmL+sBsrkvkL4Mal0HBSliX5YBIwXnmm\nYUrL+ctFSFQRKNuoV15m/E2dacySe9QodgL1bQRdTCoRduuLgde8DERPLvHU\nJRsVxou9n5YYLzR4j3Qs6zxt0Ohmawa+B1ry3vTBBuItEdzuZMc3cwOsPZ19\nCWE/C1pIzrHh2n9lKo3xJAGKyLC1Mv0iszo+XoZCXjqFlMBkr46zD4EKWUEa\nxofm4I1ytirm0LdAWGfxozMgC2uMaI/Ev7gkzgzcS5zeEMVC47HTxKRq9y9t\nPyKjKkzXqczTHcLMxPQLcMwLFIO3UpHY/grgyobxk0drL6oX9/V+qaosv7iC\nvfzWmcTOikLnaHvOJbmp8cmW0l56/DEPrxV0s2uSbVyGy5p5PCj/DMaCOgEM\nVDuoqGdR9mYgTpReKRws9rtJuMZYeF6NxXHmAt0jagsaohAZf9IqwAnx3dwB\nHjCpPC1RhfC7pHlT//dHYbM49i9BhShnTPyfw9xlKZ+92IhbABqJZwFoCkUa\nO/ZrAwhPGDuJOqmzbBQh/h3zQyg8cYVag0rzNjxARaVAqj/Tnt2fXsSlYUPn\nzaVq\r\n=a08w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"36bf785cc061de92edbeb857acd478e6c731bb0c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.17.1_1615153391453_0.4241338894522513","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.17.2-renovate-major-socket-io-packages-e26c9fb347fe4d2ead470764caa5320e9b49b6b2":{"name":"@balena/jellyfish-client-sdk","version":"2.17.2-renovate-major-socket-io-packages-e26c9fb347fe4d2ead470764caa5320e9b49b6b2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.17.2-renovate-major-socket-io-packages-e26c9fb347fe4d2ead470764caa5320e9b49b6b2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7dc53d820e58569143ca30e70de3bca4908dfb22","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.17.2-renovate-major-socket-io-packages-e26c9fb347fe4d2ead470764caa5320e9b49b6b2.tgz","fileCount":21,"integrity":"sha512-yS06ANKWx5xfe83jqVaWyIf6k02aV2Q0yq94NA6PJPjMw6t2/3ESCWSET7eHDfhmJyse7cw8GVomMoPFocpgaA==","signatures":[{"sig":"MEUCIHlE0UcfEHv5PoGfUbbWhfJzyyz1/Ju8PhIyO0QONmT+AiEA5AEvVDZX4kdtBDeZGr2NIBdAn9Sz8RFnI+iHj7iRFuw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRUl+CRA9TVsSAnZWagAAOpMP/2kEPqI8kGFx/gF1tr+l\nsqB2MLAas+lMeZS0qe+OI5ADXUGqqU4I5Xc2Y/gBXvG+KTa8zaxpKGrFM6Ia\nuGWqMK8VGFv9XJf+DMeqjwIxKK4ozBlnDtpxC+C1/DrX7aPdWkS9iTjpDxCW\n+1IIn3KnJmvvsJT/6EBQmGzmi24w3Iozcti3WWk9XHShE347aQuY9KsVLoKD\nSeLBvMgw1+U9MsAFbeePO0Ov5x+SDts2tjUSf7PmxdSYU3KVbtJO6JCAHY7y\nO11NubTdZY4zmlUPxHL0LtjMKk2Jp7HTlc5c9+Q1Xln7rKlsK+7M1TYR64wX\nMIOJ9/PCcn27onYSOYB9t3qbS94FhiubQdazdBEVXc7i3mAgW2uVBaVRZSd5\ngU8qwA2mc/n3eQPpQAcegxN8guwKGw4o/64FqS2gAxZQ7fJRXBf6nJ5FoM5Y\nmlFr410rUHcKG1VPhnSF4xBxwqLcAq60j6/yHb5+o4zDyW/YR8dazP6z0V2J\nervufdGuG/a1vRupOqURwFSFy1Iur0/jTZ3efZrvPRXMMXXsjv4WgQzxlIDP\nwzo7+JITfxrckcKoOodIeXMQ0mWwTQ/P0wQllrc1IfeHgqFrB1Z5sci7BdSS\nPiLYSkpvpQ0iYOMlhcffs10/kOgPgfOUb7c7fOkxQzha6IPUMk2Ycryy7IGU\neACx\r\n=M46t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"e26c9fb347fe4d2ead470764caa5320e9b49b6b2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.17.2-renovate-major-socket-io-packages-e26c9fb347fe4d2ead470764caa5320e9b49b6b2_1615153534455_0.45064293316666393","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.0-task2any-ef53ad64d9767f24d2805b4f1ea8df9c613db045":{"name":"@balena/jellyfish-client-sdk","version":"2.18.0-task2any-ef53ad64d9767f24d2805b4f1ea8df9c613db045","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.0-task2any-ef53ad64d9767f24d2805b4f1ea8df9c613db045","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3265cf40851d8800ec810a6908f5cd230dba8065","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.0-task2any-ef53ad64d9767f24d2805b4f1ea8df9c613db045.tgz","fileCount":21,"integrity":"sha512-YFG5qsc1bUPMat491jftastT661EFTkKg6fv5aP/cW/eilMyPgM5aZ9wLMfFStz9wPqeTGn6irhY5VrlwUa9qA==","signatures":[{"sig":"MEYCIQCUOwAz0FDCAj73HjbvCGuV7ZTX5adz5kn73wAprpbn7QIhAMNr7ZDU8GuRRP2mTlJm9OnkZ65fidkerWEUrbtrjApS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRjySCRA9TVsSAnZWagAAf8EP/05lgA3RjWHJhbhzNbsM\nPMwYxaOI8a00zD5Ihxlw3eC5fDbbISh5NfC0SDkybIjKVt0j0LPdi6O3E+HB\nQi3Eu9IQ4LCJIoDpw0hX/n/TDLL1k9ye/kbVBmaaES4WWJshFs5SO3LNNmH8\nj900T5udDIRl80y+tNGf4yQJxqZp+8CIuOajwVNpCQBNLXIj9uT+FkdLnyOd\n171KmmHKf2nqMUlE9y2sZhBpmOTmifM2wfPmoZS8RbTVJgIEcYm3QhgeUeo3\n+1sDyN9bfJlSJaXEPV8WEK/Tq9hPVb+b3EhX4GKZ/gRrX1lcYmgvCFL9t7Rs\n4H9VObSTwBMrqlkZME8sWsdA67tHtDMVrPYm7soNIujzs6RQ3ZhVmdUy/hBd\nUeLAoCoPUSZ9I7xfSM/oB8F7Rf5lPAOTo3C4k7P7Ko1DFPeM7HqrtuyF6Cvq\n2bYb2m/oPFI3POo3jUrsIE9JPWYXMxSPUQwABTEo13zh2bVy7QQG0ILJwTLS\ndGZNR6+xf5sbHWxZBRT0EXiPGZXzt7pANmGoK3L9pDXYjX1LIUwqu4AKLeuH\nzcOB9QlrIubONCa0iy3WcjCm93KXtX31riA5xI8xwT34FrQo9WNNwOQvoLiv\nq5IQKHAvGSuaAOxLW4NutCFWT9/GQE1gp/25Jy+zrsmYArkYvVePwLkc112T\nJB7c\r\n=vYKt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"ef53ad64d9767f24d2805b4f1ea8df9c613db045","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.0-task2any-ef53ad64d9767f24d2805b4f1ea8df9c613db045_1615215762371_0.5642668177994319","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.0-task2any-6bdf16172ec9acbc7ac9ce5399c24409180dcbed":{"name":"@balena/jellyfish-client-sdk","version":"2.18.0-task2any-6bdf16172ec9acbc7ac9ce5399c24409180dcbed","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.0-task2any-6bdf16172ec9acbc7ac9ce5399c24409180dcbed","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1db75023999e58a3d5183ab3397375e48e95ddcc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.0-task2any-6bdf16172ec9acbc7ac9ce5399c24409180dcbed.tgz","fileCount":21,"integrity":"sha512-24y5Cbjaeaf4yu8nnsl9+rwTZC/kMvLxJyUDys7284QlnsQ3EklKj/8jEMSN4XKqnn6rXrqDTsXSMk3NNu1nrQ==","signatures":[{"sig":"MEUCIQDL+372QyFtL3pXUvmwxqgCmSlpPA+hUj0UkXDQWnFjdwIgFp8mwavTO22xKhVg4MkRpboovo8dIASXkIXpM4rLKVQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRk9HCRA9TVsSAnZWagAA4eMP/RDkOD/5glRRHLo1HAee\nCK24gwQZmziCzB+w0fhUAId/hWNYpDPHzBd4taZVU/8WdJHKVKx9TiaRakZB\noDo0d2DFCL5aAZqzgMFz4w2hqij5q5qxrg/PisxxIB0EiKX2FtbLrhreE9b9\nMvXQ8uL90Cs6d4rkiW43V0j4c2ubZ9RlnvVcw3pw7xdyQKV0fLxkyCTkg8EM\nMpEqn+M6vE3ipyiYWRC41Ij3IOBe3k2fJ2bJipopqL5KE1Yh2GXrY8F0ufz5\nOng57JsYAV/1g8nGXZgMgG2uH53cmjquK0Lpe4blS6YOFVgnhk9egURDyuDY\nNaqJVNqzrLfCz9JMS7UOXS7so21xOjPMCUu/TDMc2+qdjQ6dhCH/FqRtk3Sg\n3F+Ls1z0f9I0U5wV6Org7qwsQiv04h4yfYMBkj9kGI8Xpm6HtAhxC7f+vhFh\nL842xi+BqMYmuep/ILjOnFK4ORPp7O7PaCNzUw7f52klDZuY9mYDSWQe7X1s\ngLnQfySzE0jYNvokX49vgitbQEXwlQyngqXQZT8fDv5hRH/Z7ygaqa1sTtoz\nCx9w3qAml1TcfmG8iw6rZuaxrkr8lTZojwQ9bVAr2/haUyDeN/W2NFZRbb0q\nJwz/M/QaGNkAf8i3/Ai9D9wE19SQArRqPOoKYqL6xW2mWC3I4xlMqN9z+3ii\nueZM\r\n=Zdnh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"6bdf16172ec9acbc7ac9ce5399c24409180dcbed","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.0-task2any-6bdf16172ec9acbc7ac9ce5399c24409180dcbed_1615220550594_0.1861117845529312","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.0":{"name":"@balena/jellyfish-client-sdk","version":"2.18.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"140d8fea94abcc8a12391365e1bb15f272fe4e26","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.0.tgz","fileCount":21,"integrity":"sha512-x+Hqsv3o1AVIjBkm+qADrFmNV4gl1XGBjX+cu/bZpiwGpkxmhT8l7JxAqrYzv4r/6pL2rtqSq3XoPzgP8cmqIQ==","signatures":[{"sig":"MEUCIQDMYYSBCI4KrDNhoUwPE5DlHvAm5jqc8QepvPNEU+d1wQIgRyW1JTl1tXYLhZGnSUGAZYRgwYyYBOI4j8SwZ1Cde3U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR293CRA9TVsSAnZWagAA6F8P/0yLZwX+jiV8IrSe0vUc\nWJIpWhQN//j0LyFnsG2GbpYOI0CWj812nKecQQGTrCGwQ+NmIfqTUEZUr8Li\nfa/Oif35BJrUzUbAzWBHOM6oCNlN5kdk25i6r5PPS7mIhjpL5jhij7n+PxaY\nzJiUtrTvOCJzIgAm0IbstvesQ1kDW36QyLP5axUnSTN8DXdZ+R0S+bHz2r+y\nS+xC0LLqqISXrKXriPM+OCYyaxCMeRqRffDdVTROx5DeSbMTW42o2Z51z/aL\nkj7qvr2eq5dgpEwX/UznF4Rlaw68VNUo0UvFka/TIHwExk0ykzOV08dYDmEL\n40JIiYf0K95stEp5+X79MLrevePUKB/ssueLK+VRYkx40M96CMr+yx0ZN0Ly\nGJj9LTRLgRzaoIys+Y8b+/EkINF2oXQdzikmDbKHfMsPbAtOtn7q7RLXNL6N\n7cDbpiV+cZB8iyqeAXzH7BzSvZZ9YVhlyPtSdncKmnn2WOu0bIWSwxT2gRnR\n2Af9uaEEMtktGSUJhUGTgjlXnJ6aOspNJwC/oyDPdGe+FA5YODlVfhfwV9nZ\nEUJAqv93mnTAbcTnE37dyUT94m7z9YtLSHeyv6yJZru9ti5jvqCtsENJqxzM\niF2gGyKrL3tHdsqgFix7oYcQnjwon/vFtzzfI0ZoAUBjojomfEhwv2Osoyd3\nJoD2\r\n=m1l1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"4bece1528f91dec5cd160fb60f8b7e541ffc287f","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.0_1615294326453_0.1270556624592376","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.1-renovate-major-socket-io-packages-667d12c95313959c179d5e1d77363e9ec26d62b2":{"name":"@balena/jellyfish-client-sdk","version":"2.18.1-renovate-major-socket-io-packages-667d12c95313959c179d5e1d77363e9ec26d62b2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.1-renovate-major-socket-io-packages-667d12c95313959c179d5e1d77363e9ec26d62b2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fb921fa559218c23f72f725c2cc95ac2dab38308","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.1-renovate-major-socket-io-packages-667d12c95313959c179d5e1d77363e9ec26d62b2.tgz","fileCount":21,"integrity":"sha512-XylpHKWqwUZt2tdUUPkYW2AjKDWJIz+sDCNSMZVEn6lY5Z9jaZWeEBTIhbqljWDss8cduTHjBAv2LkAEcIV7LQ==","signatures":[{"sig":"MEUCIQDG4S9eXx0Hit+7En3SwE4O2m9+ZaxglQyiRJAE9i+zlQIgMxt0FkPb4XgMP1lsAJv98q5fvtISUg35+2o0rgEWEbM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR3CjCRA9TVsSAnZWagAAyKwP/jdTmi98g7PqVL7Gbw3J\nzRfXRBWxCeGaPzaZKFQrH06LzEcJQWSABChh7kC6C6+i0Fe+Z/aGbcUt6P+2\nzK2EiYXY5pxtB1szZ/go0ZTUz3EAvb9NHRXgSMi9+qdjfQ/B/pfyzQR9XfUE\nh4pFOA92pUzgqT7yeAjI+E71wmKVPrrq2Pu9OfH2owrcDn6WqbEzzjInTquj\nPeZsZojN2OErEHwIPt60MWyg1zIJmuso4ZNSCLZzhnwEgDC809Bs5cHMNMzB\nW+cTubbyLzBxWot5VCd1pe/47UQFaAa10dIqukeLv5kfCPLo6T3VZM20EVTr\nt86EZ5otQ8fOSiqa5B4MOXL9phKsEaxDUcuFQqKDHLeSUUZiVQy9boCHYc7Q\nLYJfog6CF+/OqhDN88VUVyHPXL1RJtEV4vhBJU05o/KpAVcIStuqxoJGpmy7\nxBtr+euKk+Sfvw/S12pYGFsBiMFBGdkayKruTQuo+IHsqDLv+rC9wHUFhYZY\nLo3cayIcsM6XS/uOmwSHXWP9VFe9HRlDavTCcHNs2zsbJz1q9hGyidWVq7Vk\nsydKI7EwsuY+izjVP2srVUlY95hrZzMtkiLVg4WXPeBL45Kot3r+qlZBUtmg\nWunkv2+cxNMOBf7x/zdnNG65Yagq+Y/4cg9Kn6+N7nRz7KhO2i/ftX0qXftv\ng7AM\r\n=6+bB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"667d12c95313959c179d5e1d77363e9ec26d62b2","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.1.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.1-renovate-major-socket-io-packages-667d12c95313959c179d5e1d77363e9ec26d62b2_1615294627473_0.984511390672641","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.1-renovate-non-major-422a31e359d41665f238a5848c188c1dbe9837c4":{"name":"@balena/jellyfish-client-sdk","version":"2.18.1-renovate-non-major-422a31e359d41665f238a5848c188c1dbe9837c4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.1-renovate-non-major-422a31e359d41665f238a5848c188c1dbe9837c4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dea58c143d0b68f8a146690d2af3dc26eb637fc0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.1-renovate-non-major-422a31e359d41665f238a5848c188c1dbe9837c4.tgz","fileCount":21,"integrity":"sha512-MZDs6LS1r1cJwp2CBliemyOa7h1aKPrYBsjMqvNWnXTHeYJVzpC8h5TIDCIw0Lp0CgrYKLUdc+fBiBJ6848NgQ==","signatures":[{"sig":"MEUCIQC4ahgpMDQyHcV0MCc9nWw+1ofxLThh3Px83ZID169GvgIgbRBvw7NrQ6pjgqmssqKkkovW3ayhSV/nNN28ZL+ndWA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSINrCRA9TVsSAnZWagAA1C8P/3xPtoDT+zppI8WN/KIP\n3SGitDQelCliS2LuAkPzlJBeJimC5VOILcf7R2ql94e18OQnODiftvRhPJlJ\n3k3joyMpKScH0aerQd7/H+i3emfYx/hpItuKPAk60gp8EMoXO8pNlkG/Uje9\njUap88DGFYuQ88xBBwrlanuNvWbhRM8Bwd7tyY0nwbV42i9n2HFA2pKFv7K8\nrWJhU82g99yjQPU6ktm6ysfPFE5JbBjalXivnjSrxrIZpfRGeHtS2ieWJJvZ\nuDMBpxr0pyVHdWMZT1prXQf+WJAenpafuguER4K+NJyw04QDMNQtzcXLIXjA\noyK1geA2DQNkl1rzfXJdInZBa1x0++WAx7n4fVQ9kTNtCzMLzm4BjvZuVBo9\ng5u7J0InogSxiPuOvIm/wjwlExnMMOp19JVy8wgliVC7ftQsLHwS6n+ZrjFC\n2gF75uxqoE+SrW+4qsjUP08bhggi8Ij0hx/NGsF8pdG5YQc2mXFDb87TMJhH\n5v8h96Sxa3vd2fK4SlDWEbQ3uHibrUb5LDmHju4RazI/crcQG9Jm/mJaJPvY\nLTiB+BK5xTSljMy0sPL4zHeTU0JckKJNfMIDT7ZVWUJZp8q0fVjqqNjQiAOf\n1/MxT9oegLwFoeDlzHDhJf4xFzdNr6ENiC72a7k17sC0NvTWlKbsm6equ5GK\npQiT\r\n=jId3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"422a31e359d41665f238a5848c188c1dbe9837c4","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.1-renovate-non-major-422a31e359d41665f238a5848c188c1dbe9837c4_1615364970970_0.7242904626120825","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.1":{"name":"@balena/jellyfish-client-sdk","version":"2.18.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bfded09375782d12c1f4d60b3789a9f05ded33f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.1.tgz","fileCount":21,"integrity":"sha512-DsY617gk/kMJb1DlI1ycYofa4FgnBIwQjTnhAI1UIuBPm40GISVljWsGKAO3S4gawYylaRJlBcbkAHM+XKUi6Q==","signatures":[{"sig":"MEQCIF7KgBFOZQxPF4zDXuFADQwisxTEJWs2lR+PynBo9ubYAiBxFSAgsEl/WqJ1r2VN9axqHM9RyVa1Hq3qBH90ttfySw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSIQcCRA9TVsSAnZWagAAxo4P/28k/ItN6zSU/JqPA2Or\n+P1051r1IVVifmPpKwEb5KTAWGugYMuwg7dWCQe6uFKuIad//42TschvDCl3\nLIXGCmzv8+NIvtIFlPxuwZyhxaq85TMHuZD6gouZu3kSfOLdpjr/b3I/y0mN\nqkr2ZUA8HyOQG1VOfD/sZJPKs9uaO/JDuVuKMCD6jq1UNLUnfgEPIHynCVOR\nLtDWFSOtPvhzhQJ4+y47QzTe4v/UJMOCbaIAqK/iwL602cs/KNGuTnkXCOj7\nnRcnj53kfsvoL6Qlsclfl7CS/n0WuXhM/iO+iQpf23mQHXTWrksEEyz63NMV\nqY9heNGJQ52JqU496xFsyqmLbfXFJAhj4YPoQh/0EaRPR50+4kFdv0+fEfnL\ncsk8+gqa0kLKFv8BTZbbXDRbyXhlUzUxNMqEztoU16KTE8qhL/RWnxFKpBzZ\nUSQPG1pqJ+n72S7mmE/cB52meo02kIDI3PpREWsnhPAms3RchJa84isPKbGO\nFfn7hz9uVPWzPJ9XYbD3RD3zMegTWNlrFFXdHtxFlFT8k1RsBnKgnf/MDlz/\nAXPGYKGVI9d5hQ04VPVfBILiKzh34Fu4doETZ2fO+bmsp1xPNi/lOs8Obtp5\nXCcFR7qu6UoXs1yxpGsAESQ6+mWaF3Ayg6rHIj+PDEY3E/7uiP5BWW894I9b\ne/Or\r\n=odjO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"ac9a042f85ae2ed27588afcd5b392ebe9053e160","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.1_1615365147771_0.3704113894677965","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.2-renovate-major-socket-io-packages-80bfe0d6e2a8cb2d2cd3233ff92ad26fa36db2e8":{"name":"@balena/jellyfish-client-sdk","version":"2.18.2-renovate-major-socket-io-packages-80bfe0d6e2a8cb2d2cd3233ff92ad26fa36db2e8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.2-renovate-major-socket-io-packages-80bfe0d6e2a8cb2d2cd3233ff92ad26fa36db2e8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3a86853c57c10dd508e0d85a63ef1523e0ca1ef4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.2-renovate-major-socket-io-packages-80bfe0d6e2a8cb2d2cd3233ff92ad26fa36db2e8.tgz","fileCount":21,"integrity":"sha512-b4CSHKqBumemGDnXmqZxN3DB14fiu/ShKqttX73MGvZ/Vmbx0xcfqLJ0oGp80cPkCRPNGz+vbKtUlpx6CmK63Q==","signatures":[{"sig":"MEUCIDCJJVYEvRw9UnucI0ZiyBUK3pBN4L55w9dRa9qwc5/YAiEA1Ch04bGO1ff8SDEfQIollvYyxoX5RfLuiZm2ZnZ6eTg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSIVGCRA9TVsSAnZWagAApB4QAISrJBem3oeQjS/J6qjG\nPBZouBpDlJSU5diXdA/acIDTxnU5LpkWNXf9XxtkzAuGo5WPzcJRgFM0gLAO\nkBdhG7PGkIUbmeSKIey46AEaRCVslAQvxLaQKX7bMvf8TGJcBWO8lsNsA0KI\nBoTP1ih5jEoBLwsSPtZeFFZ9FCVi8pt2Sl7la8ufvq9bd8WQnev+IvBCf/dC\nf6wln4fEDf7qKfJREYT6+JYsg2RDNCpki4juSQ7T6DNbRNROlzq+glQ/Z7VS\n3g7AYmCQIpDkvLdy9sSwvvE4J+XBhxia6jTiqRvixH1oSRp4DhNGtpT9pFhb\nbrKNtjLpV5UA4/gQaa6nVxutNnz3YeJVvfrji2CpYWouTZtCNBjR0fZX6SVY\nLZ1hfyvC5dzLlS7dLRRzW7LbYdFHzvwsb+jNVnoS9lYqIJh2cgMFQyMZXnHg\nLSCp/9IR+xFEdpTAGRGKaMTYP0Spnbu8qfF6IHw6qXj7UyelWTkgTPdesaCt\n1YarRlpR0XH0k4RSKbsXqqw7ryluFM4H2KJPr4BXLK8pRSCnbV4V0+ldqG1M\nY9sqkBOhkryUNDDlMljKYKx7KVycgxNc0aF10ZbJhdcQSOjHASI3ogN1Q/9n\nMkuLNFXHerqpnMWC6/sj998qwxAIdcA/zeuLy6IpRR8zdPMZDwCUbge6VOZa\nUco0\r\n=UhzK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"80bfe0d6e2a8cb2d2cd3233ff92ad26fa36db2e8","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^3.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.2-renovate-major-socket-io-packages-80bfe0d6e2a8cb2d2cd3233ff92ad26fa36db2e8_1615365446070_0.5590092959068496","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.2-renovate-major-socket-io-packages-f4397f1d7151c9a5ac50501a1beb4787bc1863c6":{"name":"@balena/jellyfish-client-sdk","version":"2.18.2-renovate-major-socket-io-packages-f4397f1d7151c9a5ac50501a1beb4787bc1863c6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.2-renovate-major-socket-io-packages-f4397f1d7151c9a5ac50501a1beb4787bc1863c6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"53749d93df992237bec8e478e50a1b75cfee4bb5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.2-renovate-major-socket-io-packages-f4397f1d7151c9a5ac50501a1beb4787bc1863c6.tgz","fileCount":21,"integrity":"sha512-bbr1OP3oFgod31uHaTNuHwPwlGi1Jcj9wAe3b1zA6lCfbmFWfygejZdAoNPlP0A6+dlBjALgBnBuEsnqwhtTuA==","signatures":[{"sig":"MEQCIGCN+gvkVTsyHo2NIVIvXuMKO1CgLAnzrrkJ9yCZBEu+AiAlk3eAquX6pEiB84+CfaolHtaHoQdOIMYXgkz99H11Lg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSL32CRA9TVsSAnZWagAAOuoP/RfNFf45R19Hz2AkCY5W\njrwGNYEgAknluRKgrD/O30gfi2ShuTuvK2cwFFwQ/npnbywFIAFA4mn1hGz8\n29Kpc8VwAB0NkJpQu6BENfzMAKqcu2pJN1HMbQoviHp/0fZJdbHCOuLtFjDP\n3xCizLDSPQen26BhscALlOcqCGfkZRIJzpsXrki0gLCKmbG7aFvEOGrAayWI\n2RDqjJS42R1rTNl6y0evPoMWhODCl1wh8SuSzPqBHX0jPyYfD+zQf8IDmXnA\noJgmoOmazBm+Cl9l/AHfVs+nCS2z6aQIdND3d4Hhx+Iomei0qYea4+Jviy/S\nlINYp2vzDRzj/0TkyWMwa2+uUO3dlKLGCiZDnuzeCEUgbMiBkmVorI98f5/5\nwWVtgFWuGgxuPopjs/f2ZoqnFGp7wybIvSyrB8jWy0t21KOHV5jJ87NUKka6\nZZOLlre7OMy+KDSsp8R75U9c3EQEhoT1+gLwN6BPG+e4m9QTjgjJCi6d6gxs\n5SjQyRO703UJ+fMG+MGkTB1gySeQLSPULwltMljPAk654T207i7K739wLIqO\nMjexYbWJ2bWRpRBuFMXKB8gdAN9zeHpnGv9DplZr/y1DFxhAC+ubPXH+JBWF\ncplIJkxTx0ObbpkrzZV6kYvxE/myN5wqCxhE7GRJ7ahV/rxiT693k0x/3Qk5\n5ukt\r\n=KXpz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"f4397f1d7151c9a5ac50501a1beb4787bc1863c6","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.2-renovate-major-socket-io-packages-f4397f1d7151c9a5ac50501a1beb4787bc1863c6_1615379957636_0.3731180499491582","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.2-contract-repo-be10b1f4dcab6911225fdf5d89ce972fdc58e55c":{"name":"@balena/jellyfish-client-sdk","version":"2.18.2-contract-repo-be10b1f4dcab6911225fdf5d89ce972fdc58e55c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.2-contract-repo-be10b1f4dcab6911225fdf5d89ce972fdc58e55c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d854f5c1aa8afe754e819c40a41f9d84a669d6c2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.2-contract-repo-be10b1f4dcab6911225fdf5d89ce972fdc58e55c.tgz","fileCount":21,"integrity":"sha512-Ju0/9a6kl0KJhsxk30pjeFXAhs/K4MJx3kWd+0yAMypkxUgYUy72gpq5h+MBjJTgXTYLtoUxsexCFSp12EKf9w==","signatures":[{"sig":"MEYCIQCwX3K3qqxaL1zFKpWnL2jiAEIikN1BcFXm48SQObPdMQIhAOpuv4pQMjJqbe+mj/LbkrYZk7ndHq8Ai0pBulbVBMRd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":167753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSggFCRA9TVsSAnZWagAAVEkP/RrNdkjKIcnSGSTNxmfA\ngNHKihOaGGWKpx2C772wEYbeiZyNd5njcCV98FBLAPZxhPBLgJD+a2mvtI0i\naqqNrGQ7yGzmQ432UioNr2rDXT28DE5k3sPSIQU9JyNJzfZqxMTe6kaGHjsG\nTObRzkpzcug0Z90eOWw0QeGilzStiKuDZ0OxDDK9kXABVHynb7DVBiy3+BV1\nG4XOBTpv/AqE7fvB6uue3web1c4eB/kSPAHbac+YAjm38xdjlr7cAb8pe/6G\nnNjUUdhXTgdPcuv1hvSKGaqNCj/dYHaCcCV5oqT0AnfMnQWZ5tVVjlauJB7D\nMbnom+9qeesZhg0WBP8twuCUsC/OVDCF0Ii/4RwiI2LTISVyoBaZquzrpw2Y\nJ/FfNz6HIuCecwVh549gG8COc1TsNk22RiXXTZrsAjgG4sttaFoTyKLVMuVA\nPE38sxr6a+na8pD++u+1CzlFbk74OefpYXRB4tw9jBlir1Xv7lPyFPjRFheQ\nZ/+xprzl8PMp/UPal+W0UaCF6L8j0c/lgCcgWsX1DyT3yDDpWFzU9JPPC8UG\n7MUH5Ohk/mMi59dTZT2AjVL+8d1YYPtdPSooupZywALc3pvQkopvheJMkZ9I\n7oDfWA0rC3VJ4iNJDn2TS4okmZ7vkjAk+b1Gj2RP91bzSGTjXyGenI4Dt3L8\nhNlw\r\n=3pX6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"be10b1f4dcab6911225fdf5d89ce972fdc58e55c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.2-contract-repo-be10b1f4dcab6911225fdf5d89ce972fdc58e55c_1615464452559_0.9168561607267203","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.2":{"name":"@balena/jellyfish-client-sdk","version":"2.18.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9b6a3ebefd5919cbf3cc4d5fe3b22ffbc0810728","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.2.tgz","fileCount":21,"integrity":"sha512-LYRkEhURTyGyFqAOPA9qfxMuJogI01rPy2zBADvn/SP3oSHkrFXlGIIlTqsW8M9KaIHeMhELQ2X5YUC4E1qDbA==","signatures":[{"sig":"MEUCIFzb8MzAsXiMZVfy4o3KvWO6hPd9e2T/TXzQDWaPMsQlAiEAwXc27QQBRIE8809j7UVxsN4NX2XjoMMdOx2SEkAV7pI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":167698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSgjUCRA9TVsSAnZWagAAkwsP/j4jvhPrqXphHKEfhHZm\nQZgzZFiNfxf48yLYJioN/YdJ37UiMQ3cSHYjWpXdnbD9zVXd3nLxP4uMtias\nSxDq+cLwX8DdvxrWAkXRBZkAlivQECxyV/Oo/FbdlGf+zeO3GxGVihCM+dst\nff2ehQMyywno5/LVNc8geOO+GGw30d628UAl9CZRR/K7hFGaBgA0PIX/OmdR\nK4OGQvVAjBRwB+y96ohUP5/58amT7Rgd/awBwz2QWgt0J/BIMLvKlO18VSSG\nDxxTLxspEli778rc1wxu7XIg0XOhD9FrVOD4f9da3jv4LBwpQiKXGTW+CNo5\nvBcSlIjY86piceueOYHrzgHTozQQWykmsj++ZfGPusfjPNbMoATTq+EQ4WVl\nH593eVKts/dt3/h8/2oa8pLP1M413YIM/6VumrURYX68fSnb0IclkaUsVaSa\nuUtAEKPvD/o4zFL+Wyrqlb1NqHCEgDhnwM05S1OT2/E0VQdChh26n3I55vr4\nRdexGhowDfjqmb5rXpWp5bxuU+y00rjnqjMVBe5BVh2BfhMh9Xqz7q+KUsLn\nDFJZB3/e2ORSxAo4KaWexYnBOuB1ROdeFC8X9X+GdrlhEjN8y4Dn92JtxeQk\nqyc/Q3AeK4QjTfyZLDBB4GKfBtgYQYZbqLYhrswZFgBK6VdJG1sa8hduh4rh\nHVZT\r\n=UD8M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"4ccd64b77ab1ca67ab7906a8773eff4bd7fa5547","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.2_1615464659643_0.3289513393162673","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.3-renovate-major-socket-io-packages-7ebbcc6f37250293912ab3dbcb35a2f0bf967fa5":{"name":"@balena/jellyfish-client-sdk","version":"2.18.3-renovate-major-socket-io-packages-7ebbcc6f37250293912ab3dbcb35a2f0bf967fa5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.3-renovate-major-socket-io-packages-7ebbcc6f37250293912ab3dbcb35a2f0bf967fa5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"26112bc5b4ab9ccadc31e472cbb3f26453db13e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.3-renovate-major-socket-io-packages-7ebbcc6f37250293912ab3dbcb35a2f0bf967fa5.tgz","fileCount":21,"integrity":"sha512-wjSLx3hW5sOYxpGn7NTfb/hcjuXEPJqLL9sLGoUm8tlvhZ6jkgV1RBI3gAdUAOTuf7wfiY0oAubRn5GxPLQaBA==","signatures":[{"sig":"MEQCIHPgiqWMhZ2JKlaq9C7FdDddrLyJmFCPE+nFzrzqazc1AiAkZTm00Fw/vIzmpLxNWrEQBkE/Xrj4x6xY7zajhSrFdQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSgpLCRA9TVsSAnZWagAA4pAP/0IIqT9aJ/UZ/Eoqud+D\nqLPKA/+DoRQn7mG/y4NNLo1e7Li4TFhE3E5qC9gk/zK3nUVcJgmVZge4vkIQ\niIEGZPHC/pB0NT262Y5u6Jdt2Ts38tplduh444HS3hHhWNCrIgMe7gDNJ15G\n6AQdXI2gjbc2/+FsatDI+3A/Jy+gROF6yGL0LVO/9zjnv5ZAKpNYtd7F18G7\n1NdOfVzjtoE5n0Og2OgPOaN19yS0qObnRZrE2PbSLSi4fkytFhd/4T6dNUoW\nRdbh7jXzLIuZ4kAFU77CkOUZWyEbjpGT1bSBUK9l1nHxRUVL+HXiVrE8gPGo\nfJNBWNod9hR+18eAXTBnlFWHQSezgokwhgULpXdYxKc8/JMLJpndZoxROB+q\nOpIYkGb3V14u5tM4GYTSSC/jyCHlw8OC63ar3CtzRO82PDLoecjyl8VS33XS\nGszMaDZIediBljx+d77QIDwC2Xv7BmCU21b7ECm1DFQlhVME3fP/SgpMks9S\nlMcQtynqg4552Q0W0pSgxJpVVF15zXA3wQgWIS7fJB+aEg8hCtHoveTFgE7r\ngMCmFcJzg+a/JpKnYMXRt7r6lh8HeJJFgHl7bwCpiwAxjS5tanc+EhAwJ1LO\nimEnUX8uV2KZbT2iBKQJWHptFqxAbyCcQw3GYPOJvOIslCFagIPK0yLHwxB8\nRYEe\r\n=CRRo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"7ebbcc6f37250293912ab3dbcb35a2f0bf967fa5","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","isuuid":"^0.1.0","lodash":"^4.17.21","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.3-renovate-major-socket-io-packages-7ebbcc6f37250293912ab3dbcb35a2f0bf967fa5_1615465035325_0.7297702148797667","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.3-use-is-uuid-6286de013b572d7aa0d50ff0aac23a3965f8d32c":{"name":"@balena/jellyfish-client-sdk","version":"2.18.3-use-is-uuid-6286de013b572d7aa0d50ff0aac23a3965f8d32c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.3-use-is-uuid-6286de013b572d7aa0d50ff0aac23a3965f8d32c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"59b287d499c8f49a3c290b72fc49fa447b4b1e77","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.3-use-is-uuid-6286de013b572d7aa0d50ff0aac23a3965f8d32c.tgz","fileCount":21,"integrity":"sha512-5YyvW/ZkCnO5eMAsSQyW7zejhGHoB7uoxacA754bKAumWZWwXOcFnphTZfeHq2cDWgRAEswVDN3VFRQYKFvwhQ==","signatures":[{"sig":"MEYCIQDF7ZOdEBN/hm7T8S+GTjba69dd/hdeDYBk/Gi8jRY5sAIhAO0bC80AyFQDVeROcLlOh+FR5S8aPY0bvccCIYWzdRwJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSts/CRA9TVsSAnZWagAAYYQQAJRe4uBq5n/h4vyW3kV9\nybpNDW6X5/ttZREbQ1P95tANw8KKPisfKGoj3I02A3rJn3J4FvuJTh6XpsIw\nGfhWGeX36Z5+2nxB5fvmE1VBRp2VjblQXsQvW/xR3A7BF+b1aB6d6D22tkTD\nxbo3KMl3/lEurjUMbfc7+tzMcT67X/CypH07K3jQ+OOPobMgT1JnT1DsfEQN\nkJCepgLG7uuHnOt/sZloAN87aMeiFnZ0MMSt6WL0iXjzQBmgpWQnBHX/pLqf\nuxqaPLWxMb++IQ3NyxtXcrY7GUpL3GDyPsLj/WHkuOJVAViD0Bs/tc+ef/xO\nZzyjpLkCUSrKTmS09regmz6gZ+eSCGj3zI399RNh+TGIGVk6sRnbIIJ6BtCw\npWyxvO/wLBF5TvB7LM5CoxF6BiFSMA3tF5zXCKRfcFflYAoSwgx96biFSMBC\n9cM29Z308yNEVK3uNzxEi8LSFbgAMf4jVrSleBSZPPL+LIAQZ6k4xWS2dM7e\ndaUQ+ApULmeN1PtE+YJSY9IviA1KDPGa0uecOcQA1Rfnvql2EwJVyaR06Kvq\nySHPXT2qq3O9g+3yrSc53HShd6uLKOMNqKB0w7VOIxvLaJtKrZT37VrsmQOA\nXb40pYh0rYmHlbCz6BH09UNfnOCBbLSrTweJR9EaK9K44hQHA65MWTX0g7iG\nZt2u\r\n=CKc3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"6286de013b572d7aa0d50ff0aac23a3965f8d32c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.3-use-is-uuid-6286de013b572d7aa0d50ff0aac23a3965f8d32c_1615518526950_0.07084002396946709","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.3":{"name":"@balena/jellyfish-client-sdk","version":"2.18.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f4078c278194f22f03f20cfb2ba362467c8fe541","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.3.tgz","fileCount":21,"integrity":"sha512-RVzLmzrsXtoM/d2p/SUcTRCvhKUkrQy3pNVj3cEFfnZCSJssRXGCnHlOHYfH96/5h2wk9flHSyQFA28ssUtGUg==","signatures":[{"sig":"MEQCIGnsDfVsRQ8dS8op+xnmFmmQ7/8us8Rr+yWaOssO94JDAiBHSGx0I9I7hzBXJ1FsUBEb1dYPeySgtdqQNNPb2XdA0Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgStwGCRA9TVsSAnZWagAA/9cP/jFoCqwvb4JdapC+lnxC\nDYXWMXx5vPGrh/BTtump+sAxTBHtrybNrdJoVutUR+dU7stQMQVccIr/1YCK\ncVoeOuXgtLr7UM9bZXF8yO2P0ne4Lo9h4/LTxIn3eM+6xjUa4/mnyrWy8wvQ\nj5K4X5tZgCdIoTQnSdGRbscVg5EVtRnPKvt6deF26yHSmjO85/7mbIvej5HL\nvJQ/x5+UdqzcXqwMlhdQHyy2ykGFZy8NYUSSAJbUQd7t8JkKFkYxNFyOrVOu\nzUAhSF0GYr/1hM2Te9ZGvfBLTcvcD5QSGNAkGp+Z3vC6hSXQMXuxmvhVjlPG\nTZmRRZGa8WVc0kFp6+5s7/KVOdugD8kJrSCBC8x0Ctn45KYpdUiLOvLbItP0\niVrUpLW4il8uk64wShRc/s07o07FsJNWvxMUIvcNpEnb0yU2+HXFanh8GXUD\nmIE8sSefmUjqChAuLs4RlGcULW4KZ1IG1+n19uhbTMvzcssnt34QHMi3ji37\njCVW3OCjN5iBVawU1SXq/rVeJDYgp9OLeh/ufpSGI02PbykfGsXSYZT76fIZ\nsNZgtMEbCyzJc3w+9pKJsxrJ+SMQ8pNnifpi6/CiBN9R67k4xkiR8MgKR+g9\nEcUhifHLo6n09ZSJcBWHWPOoNHxeBsbnbXIJmMHpV7dz/XXDERaFz1NnH2im\nneQO\r\n=yjkn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"571404ce2f2b3595cdd26128447a7e2e6f6ac584","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.3_1615518726409_0.8357303671506939","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.4-renovate-major-socket-io-packages-99dc20f18dbc620b400eb5c263419b3deb231c99":{"name":"@balena/jellyfish-client-sdk","version":"2.18.4-renovate-major-socket-io-packages-99dc20f18dbc620b400eb5c263419b3deb231c99","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.4-renovate-major-socket-io-packages-99dc20f18dbc620b400eb5c263419b3deb231c99","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cafebf9ec9ff88e422ea056e656e65912b38a629","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.4-renovate-major-socket-io-packages-99dc20f18dbc620b400eb5c263419b3deb231c99.tgz","fileCount":21,"integrity":"sha512-p7eRwf2NVCrJaDIDUEgk2cSx2EaF5149cfqYHWbVm6y3uRCeMnspFmctqgD40L752dmRKcKAz4hUaa+7W7H6vQ==","signatures":[{"sig":"MEQCICVRcbCdZgVQ8EcUr64MamPIIhk/jjkgR0pMoLx5XNpKAiALyKWwJ4EsNhpbVNeWQDHiE2dSUsWMcpOgxArPsbKJWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSty9CRA9TVsSAnZWagAAg5oP/0dHquKIoc0+JPNWjbkw\nTmV/NsA0niN2fNLAXOrgKw3CcLfvWZqkWbTP0gK1I4xDu+o74tHPh3t3gp93\nBCeMmSehqbrCG8SO+nZSIsrZTc2mExWNgXLmuzbFog0QHF24igqk2wDsbv28\nXVVnIXhw/B95gQDKmFEetb5WUIEfaXzhOkCWZ4A4PrYoRJ88hgCkrikDHbc5\nvhK+XkzlXkRKmaJlDJ6Xhf6raR71t3lDslygyexsMFohlZqkNppAUj1YMKjb\nLWC6yT88s9N2U0T7OL5iCSY0mu4eqzvOhIL3YIzZl4BwWYeJFaQtnujaZpfX\n+h2OBVgJUWIaep23LlHr8y22sTSUZxTBCXQaIIjJbBga9nY97abrl4Ld/wg6\nnFtZUgyOR8kWptbgSY5hJHrDBO5FU5yBYFA25ewJnRZUV+Ud3ALnHMTa6Oj3\nVcxcciBkT1LO9C3ddrGfF28b9AYHMOAUqcBuO7t2I1YyCtsT0l2zF+LeHIak\nhtgfrZdOIzONBkOubzPaIG9UZ82WnxnefdzTg/nr2E8bUchRbKVAXGAwV9jo\nbH+KsiMmlUZU0V9HxJk5tx9klnfgocQ7duZvJdsyd71E9k8ITURMMAAtgni1\nSUfKcaSrjd2wmBPosxntDVsDLSBS+OFYvHTuafhQUI1BIUA8Fs3NvRBobGI+\n8Kr4\r\n=Jo5a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"99dc20f18dbc620b400eb5c263419b3deb231c99","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.4-renovate-major-socket-io-packages-99dc20f18dbc620b400eb5c263419b3deb231c99_1615518908698_0.2912400262749337","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.4-loop-owns-repo-23913e1c7673d70e7fdf1b1e63701ce1275d03cb":{"name":"@balena/jellyfish-client-sdk","version":"2.18.4-loop-owns-repo-23913e1c7673d70e7fdf1b1e63701ce1275d03cb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.4-loop-owns-repo-23913e1c7673d70e7fdf1b1e63701ce1275d03cb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3ab47d77ec8070febf1840bae50e7d7bc1625012","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.4-loop-owns-repo-23913e1c7673d70e7fdf1b1e63701ce1275d03cb.tgz","fileCount":21,"integrity":"sha512-zeV66m4XaI8IZERqYTWBtMAHD7f0foQmC2Tk1vu1TfAsJlOJHw+tpzVFNW9wFqc17XErOWPmkAv4sT+j+Frejg==","signatures":[{"sig":"MEQCIDD2015uC7bgSZTQ7gYsls7HgmfTBfdnPgeghIwI087tAiAxSBst1Mf7eEK5z4477Sm02urQYuXpvVj4pCv8ZTgJhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS0lxCRA9TVsSAnZWagAA6JEP+gP5eVPPMgto6tS8X3c8\nRkLOFmzWBNWFpiHq+xoeBdAbor5PRJb3qc8iWqANh44V/HOI5rOuBreDE3Dj\nUJRQOj7+eHnnWN4dxgRjw9fQUhBJK8UeJuvKwXaz523nNfV4ZUwt+u9psO74\nqN5H3g7U/ztfLbOTxfe3BoNHksMopxFPoawl6n/H4q9KTJUVjToaesdNWJoo\n4iDDnmmdWiEp/ODUUAtuutmvlu4MCq7w2Lwk3HgPpeiP+dR/RpMOyct3Wf1G\nFuuFGwiG44nAB6I9sjdMZSz9qdf69BVuTawkenuuAzzRJ/d44tCwzDghiaNR\n/yRbFYp1TSq9KCyCiiY7UJUEmyrqksWiFqexI0H0UXAaR5vLzunFlVwPnWto\n2221X/GUjZn1rO23XF2QIHRuESf/hhpSs2Be2jQWFCjlH89kgBTMJ9wOGI6I\nApBDnxtzRUHDfE3/2ovB0YVZEavv55RCUDFuHjkfBrWPayenFCAa3Au6/mXb\njbtEjMaKtlON72jUQJio5pWnKEVmE5oJPZViXslU8xdMYAYiFcZF3yTBvGuV\nGJDxzChL0R2NGorKxlg7zbaPSO3dCAcDKS1RGnsK+m4UYKEMjweX/Mu7QBSN\nMKibPkFDBdMMGoL+nDpLCvwPJvW3xnCjiwI2+SbDFb1tT8atU0kaILlrNq2F\n2GR5\r\n=LIt+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"23913e1c7673d70e7fdf1b1e63701ce1275d03cb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.4-loop-owns-repo-23913e1c7673d70e7fdf1b1e63701ce1275d03cb_1615546736685_0.10155085766975325","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.4":{"name":"@balena/jellyfish-client-sdk","version":"2.18.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9c70b9f6e698415208d8172b396b83a169da4e65","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.4.tgz","fileCount":21,"integrity":"sha512-WoDl6XxvNM4d7GVuv+um5GPyJDXbmnznogKr7Sc16ByAfStKggoJn3b0keb4PVBMNkLILTLOOLTrqTWnFyKICA==","signatures":[{"sig":"MEQCIE280SLHspcSOIVYcnHJ/YyTMa5qU+jWJxXiJ4wenyZUAiAwdIscHcOdFDiM50QpOgTTssNTEKfSpC+tXIaEtGN6VA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS0o+CRA9TVsSAnZWagAAlrIP/3u0DnP0QTc4yoe16ol2\nV1VSDLVXDI/6N83IUyusYjBeqP0lGGAcvDclDsWJAVbqIIkoaDXIb7PM8XAW\nf6NuVjVub5TqsA0mpd0RRHPFs+2ijLhbQxPiqP+OcanwCm7KlOyCZDS+Rgi0\nawYdTA8Bo4jaGyedsewzV01zGvi5RB6Yf0iQvYzrNsoqxI5lpHKI2rLqxGNG\npF14wBSlwR8fkiihwyksA3jL8qai9p2IE6rgjvr3Va79G9b2KSTzzlcOW5hd\nxYHdqEzNg/UsTNXFTVHi1BxTH/YOQ6M0qg0my1VaqKU5l4N030+kmBQJpKIn\nlGyGMsJP2/UfcPmdSLSX/K3b1b9Hsk4MmbtrbegLhwCd5oII7lOKZjLAkGqs\nD0JXHXBl4MRzYNmnEXXhiAkctXh+q2gqjXHxgTEgRb/q6WGGnypJRK3aJOLe\nS3qBTH3gAOdrzKhxDqifaFo6lXvFqvoM/TifHhfjlsXD/F33SnJx4FnM9pHz\nsld5u51AkkAT3ms4gTjc/ki3twdmqmA0bmj3aZTRbdc7F9hqxn+IlYiv5Tmb\nCpkOx+yK8WSWa3YcN4K8mqFKhmL/t7Pc4X4Wj4IAw1s8o6ylWZEET6/DrFFh\n1KFVtuCwVRn+z3+TpQaObvwDBCTzhImqKoSlG8eFTEDkOLV7dyJEmt9QRC1O\nRXOm\r\n=pBrb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"0b879bc9d9d82e68be89788a4b67f293acd9e56e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.4_1615546941838_0.4825784542357259","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.5-renovate-major-socket-io-packages-9fce58699fd402cd379e3fc0479b1875134a72b7":{"name":"@balena/jellyfish-client-sdk","version":"2.18.5-renovate-major-socket-io-packages-9fce58699fd402cd379e3fc0479b1875134a72b7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.5-renovate-major-socket-io-packages-9fce58699fd402cd379e3fc0479b1875134a72b7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"da0acbc36a02ebc5d26f1c9e1034b3b137305bf8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.5-renovate-major-socket-io-packages-9fce58699fd402cd379e3fc0479b1875134a72b7.tgz","fileCount":21,"integrity":"sha512-OlTTc0yb9Fw4D0YFoF31Mz0siXnA9XSX3R6Fdb0q16zpTNKDN7aEwm4eJ3gYk/0ajmHQt8pDMNnk86HtDCWpXw==","signatures":[{"sig":"MEYCIQDH383O5nJGJ/ABWsaZXg92qfFpYR6zqvRC5XG2AyFmXQIhALfkqnYmklV55KzmENd715PT27tjavmiREDKaaGDLfDK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS0t0CRA9TVsSAnZWagAAKAcQAJApn9dpvH7FvoNVvjGL\nLUlzW4FQQAZaaheWmdlBsbVN+Q4pxMYhSt1Tv+elqUAjbibBjZp9FUOELO5s\n5iMf05dKvSOoIWlY5Op2ADctgS9Kj05vWNMOAzMBfoaXxzW9IJbORJ+I1yNC\nwlo/U2Fg4hI3998S3fvywoGfyHTWfLFKkNCf2WCLaxSdIgYSqDGBrO66zTe1\n85quCqvc58laNSYjolJ50IDMkhiODoVJL+Gm8QV7au1r+3KRiShbq7wVBxRt\nwSDVNt04MCCKiAWNZelQocaSxZPAydxC6yt1F8t8py4Eb3hYSLAs8YAmX/bM\nokwmwgtYGDEWDElS717O0GJ/4XVCTOfYknN107DuD+FII5K3Gd+PbxX68fPf\ndBrKb2ZbTf4dujQrSUvPHmQHZAODuuyv5YK4OQQ2uxxPZ0LeDrBctH4yIkVW\nZxA+3b5ljrI3D1/8l6mBzVSsYdaZapwUrKY7FixVe1BSVaWYNrbMkd7gS14p\nCPQ4j2eVlfG2lcd6yXX9nFwrjaWp5YGQ6xnncki+0yl7RfFJcbrVOI7SgatE\ngyRT5ESTgo811s1i+MWaaCXYLwvyNZSU0bn+3VE+LQSVoVEPjotJGxcNIMWM\nydhH9hRluBrxVOt4IMuztjmF2GYly0TpfaSbBM3tvxl1ibqc8HcyrV0jo6XS\nw7Kv\r\n=vaKf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9fce58699fd402cd379e3fc0479b1875134a72b7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.21.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.5-renovate-major-socket-io-packages-9fce58699fd402cd379e3fc0479b1875134a72b7_1615547251869_0.03700163084950581","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.5-renovate-non-major-f4e0e47d7276bba3432d9a4f1131c3d462720f26":{"name":"@balena/jellyfish-client-sdk","version":"2.18.5-renovate-non-major-f4e0e47d7276bba3432d9a4f1131c3d462720f26","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.5-renovate-non-major-f4e0e47d7276bba3432d9a4f1131c3d462720f26","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3e53720c3ccc7e645fb7813fdd49a2eec464fdf6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.5-renovate-non-major-f4e0e47d7276bba3432d9a4f1131c3d462720f26.tgz","fileCount":21,"integrity":"sha512-Ev5lkgQz7Ipc+1SfvegXGRJvWaHjZj0dQ9gJMheMAWW8ByqO0BaHW/uFtDb2Y6KPqYoUM6YXOqFUEZOBZHQj7g==","signatures":[{"sig":"MEYCIQCTZn3IXX7VxWHh3e+bRktrdPjaNHBmFL6LQqNQp47o7AIhAJ4dqoFOnEIlRYy4JPrWZxjthfr45XITlhjmEeT+AZ3n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTANsCRA9TVsSAnZWagAAvdcQAJZAftsF/62Q2dBP7RQS\nYmDi/sFt9+/pPaKGOZgZEK7hFvXE8SOBEt0NxY07OSp9361y//IqYjMkLB4e\nVxh4QAbeH3d7trAwZZ5qRJBIyql2P+AXw1ZO3yuilahSo9Iv5SM2xK5Xl7D8\nGORW+j2wX8SYEm+cxHasIwpT2unAPwak+tMa+ewhiTUypX+oCjU/DHEgrlVj\nwWFJbywJ9cs2SUD7En9RyLkxj85rggDGuwEHULDoynTukgoSRWxq1C8EdfcZ\n6bzlP3bf3UzRuLtHc1igPjuhh05t376Q9fUh0Zcfc0NkDygNjAw+FLo4MTSV\nteP6RNNfZh9CmJwQZbe2t1QwXAPRUhLUin970kWSuSWAU3vD+kgfm44i1VqG\nyB8d8tYzrbfT1j4Fz+iwKbUNK9dzDNMq/Zs1t5ZtRh6GrU2SN7dDElLim22U\nrTiCnWL8oH2K5eIv8b9qZZvZG8RInkt4GRPHJurZ8hFK9vexzzfLSE1ksXLJ\nFGdbI/aEVxIO842aP3E9zhNhlTEktdjZaxIcQl+r+6GOM6XnY7AV2w+q12/v\n5VgOLzdue4P7a/TNx9TdX0c+EUf3htPmApgF4O6xJ4F6UG+HhUep6kQrZZmM\n6sVvTAnsTJju2BWUKDu7D1nFelmsdOZsq4pMgH31qjz9lvenpPipegYxcpil\ne9Jn\r\n=ULWy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"f4e0e47d7276bba3432d9a4f1131c3d462720f26","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.5-renovate-non-major-f4e0e47d7276bba3432d9a4f1131c3d462720f26_1615594347473_0.7490350548074918","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.5":{"name":"@balena/jellyfish-client-sdk","version":"2.18.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"adaca5ea0b0a82ce144e15b2a132230df5f57a12","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.5.tgz","fileCount":21,"integrity":"sha512-DI3i6K/xn9A2IRcC8XccRNpmrnL3Pi2xytw40XRgJvAbooEt5CFkbIF6k5bIUXoXuIfuH4XKm9QqpVAXt7e63w==","signatures":[{"sig":"MEQCID55e9y6seGouzs3uoGm2PLlaYrHDAL6JsHcbiZ7Mw/FAiBMqonBTwGSAsuCPoPygMxWBkEeYozQ8iHX+lzAy64hWQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":169634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTAQjCRA9TVsSAnZWagAASTEP/jNeIObhV6p8GwoG08/2\n2+J2qlQdVk+V/2xExLoKK4S8I2hZggmctPxIiqC13qmVOSbbg8xQjFs09aBc\nq1livYE6l90cONO76aAJj/cxiGx2rd9oTGPScmNrfBPNNzZDrWTVSry5Dg/D\nP7w6iRmQ6WjJcN1A4T2IjMdVxuwT/1mtYs+RElL31wbOkw1aMdPXuPhZFMUA\nKgdR0LmHggWyFc0ujC8Cpp+j6k6/C+4DCWSQxdNDh0skokBw8gaHoXNl5BjK\n5Jl23R5YiUiLGrVHQn6Dwvm2uLvFQtZfmnjRPwyEEcTAbQh8efPzcT88oDj0\nBwVfHcxuMMHpDkFJdHrgcXKMoMGhgyBdsrZo9MRnIEtm9QqUOCQjl6+tNKg+\nI2nbUnX/Dr0+5X5c+FFc3LBvTQm5FMeiAR5gdwsZ/avDVyRUKg1c6Wy5p+9b\n0QPpYJHuIYpxhbRZKyXSgQQA3UjVcXzDbZ43enumJ0WD+65e5gnFiyHgx8ak\nwiPHE8BOBmAtEb6HqGbBOOkW+zkadcJstxQ+yO7Zem5UhJFYJm8VZT5WmxRr\ne2u8rUwWF0k5nvTgOlZYCJxanp7ngFg+uJ6BHJGwkEHSqnyU6jFh+2vn+dI+\nT9c4ZNJCj6dVp/WQJh9BZJGN6tfYvolRgWKbnIMpGX0JUn9SQ1YRuvXbN3k5\n4kPD\r\n=LTqV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"8087f294b417d45f6a72e9e4351de6da948afea0","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.5_1615594531168_0.10366797796216964","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.6-renovate-major-socket-io-packages-0c336d3edd30db5b17a6e2c37e45f7e5c3e52f22":{"name":"@balena/jellyfish-client-sdk","version":"2.18.6-renovate-major-socket-io-packages-0c336d3edd30db5b17a6e2c37e45f7e5c3e52f22","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.6-renovate-major-socket-io-packages-0c336d3edd30db5b17a6e2c37e45f7e5c3e52f22","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c61462ab46e40a74f50f557eed39d5549789e27b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.6-renovate-major-socket-io-packages-0c336d3edd30db5b17a6e2c37e45f7e5c3e52f22.tgz","fileCount":21,"integrity":"sha512-ACwOO5psfEoCY8y1/wbV9bbwzrcz1YADXaaLd5KcuzmeIOkbyqzK11zUzmyTbuYW2Ez+i1U3HSuIbyEgjfwJDA==","signatures":[{"sig":"MEQCIBsdZxh+GtTBXiu+3IAKkxrTpnHaf6URGQOoqEI4JoEJAiAQX4iYcIVnbT0Wj9Vbg9wOxAZ6kgmI3uWEdMT7OyuUQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTAU/CRA9TVsSAnZWagAALQkP+wQIQ6uiXeX5tLbDoQZl\nBcujU4Xp/rrI1nuh45vN0oP90aZzs3LUX4pRczHtbqORhbnvuPGl7TF63YDY\n6iWxhpanzHtEMKyPlAdt0WKQFI3VSclKg78CeUhuR4Ie6q2Yn81wmw7XuW6d\nIf0uDWm+HtQtUiDrIGsjw0YxgE+dTKBYsNN7CEqIUe5f+Y3fnQyBC0UZ1zrE\nz7hL4IBwR1/qFjTU3uKYDj5izbMH/S0QKkX/9tzSdSev5nrlYfNAcZRQzHAJ\nFhKdvnw5nnwg2xtQwVxDM5TXyXybidRVKXSSDG04/JX7Y7xuSszxyfdTUnYQ\nSnZm26pyOqD2TfWsNihQCkVwNGaIcF3W3Re8mkqB95tZ6ciWAdrEcnIXP48T\nY44rNbZmvZn74GJ3l2Toj6eDjzJ5C6DMm/lU66+xpAw0JWYKRQViq5vfSQBt\nH+PrBmdC4kbRchNM1Q5aapRoA+1fguVqSKenBdD6tMolbfYwVIoVRLVB0jWR\nKx3TzmAv9nEdn18gNX2Cz4/WrUrIifxX4ds3gapuqjzo11j69s4p5PCsdTiK\nTx5pAW2teBAM5NW50V8jIWZqyIHgK12yVuOxXBDWfD0HJt37vvunYq+cnQiR\nxYNW9slPbdg706FLZH6DMmj1L/AIhpoyqtL1twJaBnOLBXktEdyFW1sEQnvP\nyks1\r\n=KjAj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"0c336d3edd30db5b17a6e2c37e45f7e5c3e52f22","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.6-renovate-major-socket-io-packages-0c336d3edd30db5b17a6e2c37e45f7e5c3e52f22_1615594815233_0.20058585430463993","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.6-renovate-non-major-78106af6a5736dc4711de495b54a20c8451e2fbb":{"name":"@balena/jellyfish-client-sdk","version":"2.18.6-renovate-non-major-78106af6a5736dc4711de495b54a20c8451e2fbb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.6-renovate-non-major-78106af6a5736dc4711de495b54a20c8451e2fbb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6b3df827a5631d17ea4323ba70711eaa02de7a56","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.6-renovate-non-major-78106af6a5736dc4711de495b54a20c8451e2fbb.tgz","fileCount":21,"integrity":"sha512-yCPqIo8p/63pWxm8dA4KdHyc3HrJINb2E4Vz2n5Gm07d1kA+mTnWAK3gKvjHWJIaN1XKwrXqm6/B28/9Ft/ENQ==","signatures":[{"sig":"MEYCIQD/UEVqICV5Pzvfr0S138jVtXzajKaQSOQLaMs9kgj6nwIhAJZyxoWIqX5QnnkcL4w9hBNWrSJ0JIPH06D71SRVN5o1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT1OjCRA9TVsSAnZWagAA4r0P/1WyLaGrSEisWCnwQ4I2\n2/lSY4f6i959mRr/YlG+n3uTsr00N8HrbvkqkdWRu5Sq7G1ys+MuZyJfux07\n3scgjo+ZMUecEKzmLTFF02ZLT4CHqeCQAgZ68lZlIjj1v06kd46LzpcVMZV6\nD8wV2U8Vd9jb7GcAyHvn6nJfOcxcj6GXyALkXDw4HING6fRkgfSZzs4epmi6\n9D3iwSeLEdBp5MUPglhBU1EjFPAtzhVgg1lHaNG8YNVpjhz+/1Ml9c6sC6w9\nMsfmDmIlmcgkaS0PDKucMxJXNQIP9RRYoS7xv0dqbskAzM46A4pKKqdnRhD2\nZ+wkfjMAX5bh6rJsHNEADxi+kokcnMM/TeAbzC6L54gsGEuPNL97mY8qyxNl\nWY7AD7eR6iOXIq0nvQqhHvhkCCgxOPHwzM24S1Y0+w5Q8hn5AWCSIGbcmO75\n2aufXPqS5liw/Db2yTvy6Chx0wa0yi1jn/ivQRLEUFtoONAIxKWTbLHQNaSh\nDJXQmyKVnDqX5+pZQ5EhPBAPky8attM47PL9oMdD/oHNLGtoo/5k0yyFrK+k\n54jPIu8pdcWI98gB8eZD8TjyvVhk8XXZ0apspbaW3WF1bi5xxH0bylJsOcxJ\npE3g4jXzoKx2SuUWLckKbBOhuqCBBGn9pCf13bzzKOo3AeYYnCPJKqhqSjlE\nkjt6\r\n=drxJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"78106af6a5736dc4711de495b54a20c8451e2fbb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.6-renovate-non-major-78106af6a5736dc4711de495b54a20c8451e2fbb_1615811490761_0.24697192140573576","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.6":{"name":"@balena/jellyfish-client-sdk","version":"2.18.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ba4af199aa77830c1abb7055e06e3c2df5290272","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.6.tgz","fileCount":21,"integrity":"sha512-uBFw14/M+RGFggX2jOFFfm71xZjXLa0Oz2HtP1BrJdKMzaZh8/Ul+Scc8ccOWQJzzZ2GvaXpTQtzHQFTVOn9uA==","signatures":[{"sig":"MEYCIQCYO4MYn1tWMUmozuMPZuxLT6AJxcHvfpvJZ15Z5Z3FtgIhAMlXiJoVqB3PPFTHfy9xWlV36wZhzDDJQluyRi7jIZSP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT1RyCRA9TVsSAnZWagAAYxsP+gPJWBs46+7c6AdhUYhE\nrvO0SzAb4CwDU4wYrrsR9Mzf1CUEw83wZB7Xnju7EULdEjTa9Oa3HXouXLH9\nDdR5LH7x5UQqSN+OAVDO9eerKvKTsUPSi4LVLmrt/nfy8YS2mtfRCNUFsIx2\nUgSiQwYixpKerIlF1QZqGM3Gm0lhMYePdMgNc1KVNmwc8+8/T8uKoP7I4YbF\nkweAAp99QzJawfZhUUP0WAsJxejUODv6W/xwDWZahlh3WyBS/EnqKSyoQinx\nW60p3qXTZlLISmPQCanP0p5eC+rug+2RwCqh0/fB7dOGHRZV+vPQwFGhCFoD\nUilFlEK9tLsbo2SZiZGkyP+8JSXc5XELrKyeI8ex35cI6qpjKJbvRWrLlJeN\nnSw03zVIo3X1kgvMO0zwhK4oS8fCwSes7vE8cwnDf58tkpGJFy4ed3IfcE6Y\nXgi//eiCOW1sXz9/rkZd7EIbbA8NdbOfLiTrinT4ZLW8sLBqy0HlqFVBFvQ4\n2QPa+mRruOzQSvlhfEljQPY7PFJPUJH0aF3nsQbQgUe1LFdn3lxhMuvSjlwm\noj1tvLsPSP3EDaqITqb6HEH6hMnewuZI28BFgD6FaMRNV0eaZvHPXbwtiNjE\nvElv1VVNSh1PpcqTnWh65sDtZ6cdYVAAA0xbyNOk6+TRcN6nbqD0bWLir7S6\nFKAR\r\n=p5eX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"d9665787047937e6d15f9df06440145d0127ef9e","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.6_1615811698033_0.8257901135383439","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.6-renovate-major-socket-io-packages-292465464d9e173b28cf5b89acefe24bc130a721":{"name":"@balena/jellyfish-client-sdk","version":"2.18.6-renovate-major-socket-io-packages-292465464d9e173b28cf5b89acefe24bc130a721","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.6-renovate-major-socket-io-packages-292465464d9e173b28cf5b89acefe24bc130a721","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d16c11012fb5e14a86129728ae2479a1229dddbd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.6-renovate-major-socket-io-packages-292465464d9e173b28cf5b89acefe24bc130a721.tgz","fileCount":21,"integrity":"sha512-M7OLsIVfJUOF6E+Z7qXssXpglQfme4rZUQ33ps1bW2+LP5IxxaqnD6VD+WUnK80sETLQ2YxNJJFwohuzUDi1uw==","signatures":[{"sig":"MEYCIQDpGCyBI4mpNU5NmNp295rokxHt4RhuKwyn3ZR9ZtnQMQIhAIFHMxnsir7Qf1dctw6wUjc7b0i8JTOMARaqJS/cisA+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT1W1CRA9TVsSAnZWagAAdsIP/1m1L19+pRDc3xuj/VCH\n4z/PO7kkSZpHWcEiTmenosUri1hjy17aDpqz6dDWXuYXcUrjYgpM1kDtDUcm\nBhGImP7NJO5gfCOXti0Dc+TiXje+HTL/CcYL2JMctyEW7Dkt1DQhIOlO/y7L\n2NuwBhJRn3rAr7fHbX6d76DIPU6A762UGo5K8XU1hLTdbbRSoJK1N4LfEBFZ\nR7x2gK71awIjc/olN2sJsgrxbE9r3RrvT4sP2wg65EQnhSGSzgqFkll2H+6D\nSHzu6kJn1VS3sayVFzvFAXLT3iH4bngxT2ftRJ3cOZ8BHhaVSQk/SHu2LS2q\nR+p2LAVkt+Vc2UvFm8oPesTdZujdICstFSAugZXmyyAd+trHygU3VfBQghtY\nz48pNIQ+XPoQZHulzZOPk2Eo7yOXUBKjBqC1afOivHUmltmCREpTJ9VSbd51\noBGtf5qbzdNHBqaSz78A0AJfkgGPVvAK3rpVk7dWApN6ykK7De+JNUrPXE3D\n63vxkQDyvFhSckzOXtf+neMVAz8b6K35KBx8me0qXqk7yN2TSYUjGwzsbNms\nG+joTyofCAwReX2MIu9Dk40vP02eqEiJYCGddfpAbzw9+JGNtvxEcIqkaUCT\n5ZmWzsqPx/Y0TnM+LoFTh38ftCeHlMUhykVNZQM9qomzLmzFhW05UDdlMeKA\nblSg\r\n=A7+S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"292465464d9e173b28cf5b89acefe24bc130a721","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.6-renovate-major-socket-io-packages-292465464d9e173b28cf5b89acefe24bc130a721_1615812020713_0.04192905896021104","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.7-renovate-major-socket-io-packages-54d57fc3811555c4696f2fd1b835baf59463b636":{"name":"@balena/jellyfish-client-sdk","version":"2.18.7-renovate-major-socket-io-packages-54d57fc3811555c4696f2fd1b835baf59463b636","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.7-renovate-major-socket-io-packages-54d57fc3811555c4696f2fd1b835baf59463b636","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a45e285522132884d241e78be449358eec9ddabc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.7-renovate-major-socket-io-packages-54d57fc3811555c4696f2fd1b835baf59463b636.tgz","fileCount":21,"integrity":"sha512-GhSgCLKsK4hw1QB79SClhJiqkeVs9aRdGpNHl0AYr7n3DjrNb1SSpgmRvTLmFnkZIk2n4aBscfwRUZvBbPhtBg==","signatures":[{"sig":"MEYCIQCwAQMnlRwSyCBDd4+r61v4gB0+5W0KWZAHmzo/uykZYQIhANfkTFhQSgsEcx8diNn7f59JdJ5/ODtq0DiLQI8tq/+P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT1ZQCRA9TVsSAnZWagAA8IIP/i68Bh9dLBAt6/J0mHdK\nEufoWcdR52LfATTjPMDBlsqDP8uK1tV5Q7THJ7iXySeRllwKt+nEMVQw208e\ncWpUTZyTyRXqkvQJw8j3YaQQwbnJxEU7Tdte/qCux9515pM3yda3WSHiySAA\nm9BVYjY0RcWIGmeHOFxGz0G1EGUemmRjJxqJDjjznUHm5t9BIhuXNTQvjh2b\nJOXUv9fIRWQiYHnUOw3l3wST7MUNh0o6dvbs2f70+2ejg9Hw6RymWZ+iueZR\nnIgDjBE5Jl7d2vRNB/wNM8LEWopns7lB+BjzE4zh5zvwlUeE1ftNzyuH+1Wh\n6WD1gXeVmwvF6QkEb29c5tJIb6YYpJTpQI+AD/o+IaJ5WBacK1zTn+CwD6Kh\nY7KCiFyxyrc3Z4YcofVP6dpW0U+AMS/wfRZ8MfF3KKOrnyvti5SSrJN/oMFc\nNuTdc4Hivy0rSl/ELeKHMjVlvrpmBJ9h/VO5iAZQVcRoo/5NKJnaultr/2lt\nQ3nDww3dukGAyeXNxpN5WUAtbKnCxh0UZ1Ufi52NNBX3vdyTkq7Ko27ceJVh\nYprJqUyj/yn6H41c0TFOXgbHMcHFBw6eSB14BzvxUgc2Kuze0+vGPFh53ClP\ndk3+wUpQTdIpmu9mqHPfbInOi9C5Rc6SiUPkVh0J4oFncc89mQsq8kK4PT2p\nEdFI\r\n=7UWX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"54d57fc3811555c4696f2fd1b835baf59463b636","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.7-renovate-major-socket-io-packages-54d57fc3811555c4696f2fd1b835baf59463b636_1615812175922_0.13907076311300703","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.18.7-renovate-sinon-10-x-9543a6a25e341edcda960b15a4a4ac340ce95cf7":{"name":"@balena/jellyfish-client-sdk","version":"2.18.7-renovate-sinon-10-x-9543a6a25e341edcda960b15a4a4ac340ce95cf7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.18.7-renovate-sinon-10-x-9543a6a25e341edcda960b15a4a4ac340ce95cf7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"94a3eb596e68858a68a078fc5e18433a9846e5fd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.18.7-renovate-sinon-10-x-9543a6a25e341edcda960b15a4a4ac340ce95cf7.tgz","fileCount":21,"integrity":"sha512-l0BW+3SL8ccxf4tHmV9wrMmtzobfFFevNN2w1Dtx1woMJFdapnzy3K65qUFGwK9ZtibYovyBFHVO+S2tt7B3ng==","signatures":[{"sig":"MEQCIAV/iIcDWeqVnFLCstoTFzZhjea2xsKBViAbyWeEvu5AAiBqzBlj+WeXcYuDpwK3PXmMpfScWavryMzwpishwWk5DQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWNX+CRA9TVsSAnZWagAAeGsP/jRDjsL9y9zOappwLAEP\ntvyHXww4NBo9xEhrB/HL0CbA5h2P1LzcjAIJqnE+ZX4OKtHbr77RBGNJ4wRG\nNM/qlURULqHFSQFSyIyMPswpcckXH0RZix0XawGmb4oUIdUhfczcFGFfc6eF\n/2Lf5/yhw7XuygXPEbdZqdJqx4ZSFnDo+Fwc8xeiICjeE1/qI8C6QPOTvIJs\nZj+IvMtkgdiRUEZGhp3ssjOaDoGVfz2eX/pmE/ruQ5htG944DjOPI/ZqQiIW\nuwEanBPIB30vlr5W3e3lk0FIL/vyvTTmVbv2ntfPmIVmRu97hCeqYxV44Iai\ntfuaC4cM1/Gtu0NWhNHDTKA/x51wvDT9T9Yb6xFt120ebZq8ech4o9JZ0EnS\nkKxmCwh8yOD/icX9Ko97RvAXf5kjFJSzK6/4F34UUXawcNLB9p+SMqv/Dnqg\n2b6yT037eKMWE/eGhf1naFiNVYODDpBSDSwSfU6SkpU+O1uQDy3hIK5yGsuQ\nlDW0UTSY+YnHZiEwascp5NGy/RAdObx0aApfU/knMtZQk69Q5Y1f1Gkg8HwV\nD4HkbQlwGgeyhAHU4OI2/RlPUE00SnfM4mDvB8+NebEGLmi6IvR5AegFwL0g\nEQ4gpYD5fB6GKfgbhNUDzcK6hqYFRVnm1L+KovQlBZ1hNtWZLWIwgSQxgdnf\nVDQ2\r\n=A47Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"9543a6a25e341edcda960b15a4a4ac340ce95cf7","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^10.0.0","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.18.7-renovate-sinon-10-x-9543a6a25e341edcda960b15a4a4ac340ce95cf7_1616434685655_0.9326187010578193","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-b5a3791692dd55dc022e0ac382a022fc5ee19760":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-b5a3791692dd55dc022e0ac382a022fc5ee19760","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-b5a3791692dd55dc022e0ac382a022fc5ee19760","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"105336a32f7710947ccad5717f874bda3f08b6b8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-b5a3791692dd55dc022e0ac382a022fc5ee19760.tgz","fileCount":47,"integrity":"sha512-sE/TI1z5rC90FrR8cjoM+ZU1m9AAMfayVtZKziloHJAYpCFcqUVzb/oYxA744piASSkQVtRYewZt1rSb6+8yKg==","signatures":[{"sig":"MEQCIGNYSnlWoRokHZK8F6f9FNqO54HH4WWlVQm+fdHc22RPAiAYTX9lkI1Sunok87uZRX2HJEUXCKvOW4K5UMBTATPprw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":312334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWPnSCRA9TVsSAnZWagAA01kP+wV4C0kWPXxmSItezJ9V\nwiazdBx1WpdTCxpyGNtBbX/aK/9OpUX7QxunyZH8oLiu+zKUWGjobz+GVRdZ\nX/vpzrh9X7jBynlbKr94mErtcnRgLT0ILJBe42ZnzP3i5n5KqGb7bM8hmuSD\nREQmY92mtnO30Xx1B92XGR3/w2B4zYQamtBoluu6NEPVFcuzChNmIwPInUjK\nfnYAv9UbIBMBuXVKEvJzqFHPyX19e6BN/15YWMpShQ4EqbFnBfFy+8o14y1r\nPKblN6hjMgJxlRABDtMQ814waTPstIZdh7VGkVMaPME2svb6bpSwShJeXhyE\n4XrjTF+SPA7D/H1DXy+SIrW4MugE8VAx4TMzuDRM8wXH+5UGKHYaq7wXRa6r\nCSMSVpeCWxQIRHOGp4YND4TqMKtHga4pAup3QqMJrsIKmoqDAKAjYWa0UdTp\n3nBRCDRzmsid95e41H1DsbYplOrlg3W0sF2XelpIklFcRyr9ich3ukAQ2C/u\nJl9QTpubYiqgUJzBhjrfiZBqoWYfx0Bw8VAGrSjiY529TidAf8hspITES2xq\nqc0nd8pa6WRgN/x5KCCMaCevfFWMeFB+XeAF2Q8tP6A0mHllrkjrr/Zhq5so\nLtQCbTs9plFw44ZPIn9pKD1Uwwifyxpumljf/jZjmGHsP+d6Sowf1Y85K3Oc\nK22k\r\n=XDW+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b5a3791692dd55dc022e0ac382a022fc5ee19760","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v","build":"tsc"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","typescript":"^4.2.3","@types/uuid":"^8.3.0","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-b5a3791692dd55dc022e0ac382a022fc5ee19760_1616443857740_0.2864436170175053","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-LucianBuzzo-patch-1-84580bd186540e4cc4a0e7c8fe717d11b14f9298":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-LucianBuzzo-patch-1-84580bd186540e4cc4a0e7c8fe717d11b14f9298","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-LucianBuzzo-patch-1-84580bd186540e4cc4a0e7c8fe717d11b14f9298","maintainers":[{"name":"somombo","email":"somo@mombo.solutions"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1e5db71d2be437674133764e8438be563206598b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-LucianBuzzo-patch-1-84580bd186540e4cc4a0e7c8fe717d11b14f9298.tgz","fileCount":21,"integrity":"sha512-LTUVwmsZgC1EoQ35jQ7vmbMdDhTqC40wtO5ydesF/tgK+MA0VNj7v9EgWRJXdc7+dumh3JNpPj9TSUhw927kBA==","signatures":[{"sig":"MEQCIBRMKKDPWf8vLjj+p1NGMhsQefEoFBn3WY54vwasuXvSAiABZz/2ygQf/ZyY2oY26OCjIzAs4IwM8CAaIyPGPZ9Elg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWaiCCRA9TVsSAnZWagAAm34P/iosrT68rg5k7osG4ZgD\nLrMVvD6g9kBXI2fyZLwCjb0deWnxloO2WYB8dhZC0xt54p0KzxEtMAGqYhkN\nRGatwD9cfybDK6CeKCKWwKNfFywfrfapMWLLmpupfJm77gkvef3MTXiv7LIc\nt0D58dOZGPALfcAnm45x6V5t68bVchw4qi0cKC0xw3SW6Gzus6S0L1lW1cE6\nwW1PTD3/sh524xMwW/PGHiUMCDhiFYrEWr+K0i6+8T5xxNB/wHuBCOQl1mR7\nQ7SX1JJC9TzG2lcDn+UZXAdCV8C1Ydg72tEJhqg5f4kcb0yP/V6b3XEm5e78\nW0N2DfL4hYMGB0Gm0eEvs8aXgX3ihOkJlFDx96OLy+YWOArBTgdSoj5oPfs5\nAgjn9FNQ8WGgEN3d4nT7OJ19463R6UA/4BQskEowFFCgn3qQDvpTay8bUbEj\n2kBYTG49f+c2yaAwLgyYoNtJ1PSmsNQZKSwbTGg/IWByocOxpX9tQHcda9hs\nbOJRBTAr/Zn12ew7/CUMqewIXuTKPNVGDUyl/vHroMsBwPITxm25k8WW6w73\n/HNfgdJVacRRFgjX9Y7WfL+/owKNLKt6p3GeaBNcXTZWfNDd/YDm3GNEEUBW\nJCPRcdJKcQoYm7EZvIg7mkMdcdFWNAC4CkdFMLKP6m2V6m0E7g05d8R8CJZI\nflJg\r\n=Cpl9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"84580bd186540e4cc4a0e7c8fe717d11b14f9298","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-LucianBuzzo-patch-1-84580bd186540e4cc4a0e7c8fe717d11b14f9298_1616488577892_0.42777408898348024","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0","maintainers":[{"name":"somombo","email":"somo@mombo.solutions"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3e2e9c36c7aec26382831ccd5db4b8b68c40fb74","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0.tgz","fileCount":21,"integrity":"sha512-FDYPelokgiyq6whbMCQmvJNdG6TXdHiQVkXQffvUNIWF9VEv8b4krkMBfW6laAaO5z979pDabj1bCOg2gMIbRg==","signatures":[{"sig":"MEQCICBNNNqDWX/LTH8Cv6fhfXoKaZQWfQWA4ZYTnRRNlGUyAiBBxXISlWz1FYgKENMpvDNXKjd1RrvwtTIVON+Jg/iMxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWcvcCRA9TVsSAnZWagAAnKcP/0w7avmjTUQQM6CY/Lvm\n0dEB8P9GPvgI4H9yDADb8NnDL7sOpxWG76M6Q20tKH0TShwM1mtSwwGMnzwP\nqyjQqrryNBljE4+vhPD/rSJ/J2Qdvnn9wmQ4/8NNxX/BhRFRy+5s41z9pkCU\nbX9FmyQawDE/O6t15mK6Xa3FPwrrNSKU9JlZgoEH0WAyXIWbbF1Cp1t6bKgT\no00L2KOB2hki3EXFdyeaoe+fLOFCoGS76p5rH1BsmVPaiOM0Buc0+HEDPf8H\nYN/EjdxITHujr/ZLya41lyk1rpyMhhYB3+1amq0ONeLq/S2RboLE1groLZaB\nYCAUjvKHjRhN7xKZ3uryNSasa7KzDCwqAotcyYn1JZRtZT4R7wn5TpaIYVzW\niMYvsd9TGNnBWIyxSKC7F0Afh91Kx/cCMWIecwjO0yHeO94BsSI6J+vrYFRv\n+byKUKP+HX+oPgx07GaPKPSg9qG+SRSR+6KkuBgLSwFVYJ1CTORAKe9vqOdX\n2aP1O27Sus+UzOqC/aEfOwtfy7Gm+UFJRgNM2V31gOfMzG/G6sCPHtWB8tfk\nw+veRPaokFkesGs6wWBxcarQGikBW767PK45exEA93nmY4siLlK6p2e9Y83B\nS1afTsu90huYeLlKGxa6PUlspvzQ0UFto4jCaq/6iACXgQp0soVYghY3z2Ci\nd77D\r\n=Sd+K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"32dcbc8fd6808e162657f97a125679b027c874cb","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0_1616497628085_0.06287481423760899","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.1-renovate-sinon-10-x-460aff8af4cce9fbfff7b8e4d6f294bc916df18a":{"name":"@balena/jellyfish-client-sdk","version":"2.19.1-renovate-sinon-10-x-460aff8af4cce9fbfff7b8e4d6f294bc916df18a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.1-renovate-sinon-10-x-460aff8af4cce9fbfff7b8e4d6f294bc916df18a","maintainers":[{"name":"somombo","email":"somo@mombo.solutions"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"95f04235ddf014c55167d19881d84e80f572299b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.1-renovate-sinon-10-x-460aff8af4cce9fbfff7b8e4d6f294bc916df18a.tgz","fileCount":21,"integrity":"sha512-ei95KcqOkMrp4AlOhOTfPgner/dmedNd/uWpszMPUofB7rJTU+wB2ZlvtB3nV9Obzew4QvBLEyzzUuyzZpYz1Q==","signatures":[{"sig":"MEUCIFUFj6zOBlYFFnRVMgyzuXnTcaJZiNATC1oZENUQqF3AAiEAxi11pKdRqO7fqpxDc3jnA1g8xXYT86/Xnx5ALoNIop4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":171311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWc0cCRA9TVsSAnZWagAAKysP+QBj5JtiOIyaenKZ3xXY\nGVRgKFYz1FuBgMwd9yi0Mb2NM8xAI0cvTM3foKL3aj353vxxwyzbTZbL3f6Z\nt1/2mi/Y2lWu4B88STOcwCewvyTy3WHW4L1uwPDfWLT0f14F7TiQ5+EohIa+\nDFAjA0hatMjPU+/SYjRNtR7938Gb4NwLNRTNBrbnVdHMfHWMJWT23jhVNVoa\nJzmXoa49hkM/2p1ZoFtMiYosJdi42fHDf0B37OSumVJNv4L3GldJTTAAuagV\nnNsIcKUQU5E5wKA+A30IU6iGGLHXPCo9370RLhdcbxSVjwVqcbxVP7n5Ze7A\nLHRmUGbhELCfKz30dXlraHY3BBiciFJBEiRorrTTZfBdfBpkadAfT47RlbBB\nbEVgk8di1y1clt853SrqTBl3PqJveyrR+QPwEDWH9Wl0MRHiF01IwtUQ4hbh\nX1NoAVaOtBEe86f+eQ1rxD8msjsyEqmmIOsFUhPGVEFm4umouvfSMAsk/eRs\nUn3BjCwz2FDMAxkTwXw5ph1QjTz+BvKpOmQ7DVjGyjBv14ejVpDZsyx4lVAD\na0sVHBi76VR4lLf9NuCXfjZqzXKJjATDRsM6Ivihi52SVYNlatKHWBbrB7fp\nETgZS816v9DkIeM02msnzfMXG3GSQ3+5hgyC3n6AlF1vOBBWVUcx9DYDYju3\n44De\r\n=6/g+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"460aff8af4cce9fbfff7b8e4d6f294bc916df18a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^10.0.0","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.1-renovate-sinon-10-x-460aff8af4cce9fbfff7b8e4d6f294bc916df18a_1616497948010_0.5564511333632198","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.1-renovate-major-socket-io-packages-5d69d0d3f65e6b81154bf91d2492c04fcba00988":{"name":"@balena/jellyfish-client-sdk","version":"2.19.1-renovate-major-socket-io-packages-5d69d0d3f65e6b81154bf91d2492c04fcba00988","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.1-renovate-major-socket-io-packages-5d69d0d3f65e6b81154bf91d2492c04fcba00988","maintainers":[{"name":"somombo","email":"somo@mombo.solutions"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8683463f0c97941468f7efed98a6484c3d4da05d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.1-renovate-major-socket-io-packages-5d69d0d3f65e6b81154bf91d2492c04fcba00988.tgz","fileCount":21,"integrity":"sha512-4BOFLjUB6u1mBwi2rFdutV+3lW4jRmjPX2uR2/K5kINCx2ZT8VTklUqKY2LvvrpWovfGLBpsz8wMRNYHsosH+w==","signatures":[{"sig":"MEYCIQCV8WgdPsCxtIaq5TiK1ZnKy+rPBhAwghaHb53gmOlNvAIhAO0HYj7O6akwpp1/BrSfYZkRCJtnvFo5BEjKtJnjUAwK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":171344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWc1ECRA9TVsSAnZWagAAmhkP/3hKCdEbynh3nCJcmiai\nku7UVd3xNYR4i0eSeQxOVe+kzeLozVLtq1SzMTlXkpz16QZWl2aHnmmFG3OD\nuKl692/ZfK5/myHXwDHqpxB9tkWyqn5Q5ya3MQLz9Y5M/t6kk1FBHhiuRZ92\n8i6PI5NRyckxnTt74LWPhy8c3aHX+pu5oOEUomcl4+8fijkGORurp0xMgrbd\nZswV+EANUY21k2ERCk6xJmdnV6pggRHtsHeayrgE1t0ab7K30BqS3Y1Fp/mT\nom8MN6gE6qJZore8BHQpP2TB1f+48pbrTegUmQuVlP+vi+6wXRkeciuYGpmP\n3vxDmS9LNg9SS+15q/zsNEOFtqtkaNE6o6cP4njoTOH087vO8z/ZVaxEc8qS\nlF63WpjKJ7WQEey1NH2+Fy4f63x5Hoh4KPi4AiHgRXp+u+7j3lpnat84OT9k\n26r1y5bFrKAf7gcbDYrSCTqxJWIk0PXsqP1hAJBgl6+7qX0IiMqAYUJ+UgLv\nhGwc7jln9EcK7wsklA4GQkvU2IpCCenJLmxo2IghbtE/O1drHkz+ASq5WpmR\nV2QavsKoY7LdE5IadXiHEEtvrdYjh+ChzKZMsDS7eHju0TANiQ9/k2tobl+k\n2TfUu1gZaU4r8bURda4jeAklgqbVIWS6ytITFtu7kQVMYP2M/gH0F7GCfz2b\nRNBn\r\n=bnuJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"5d69d0d3f65e6b81154bf91d2492c04fcba00988","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.1-renovate-major-socket-io-packages-5d69d0d3f65e6b81154bf91d2492c04fcba00988_1616497988123_0.016361802305889794","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-637d12bc835afe94e07c16d76e8eae4c83adea50":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-637d12bc835afe94e07c16d76e8eae4c83adea50","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-637d12bc835afe94e07c16d76e8eae4c83adea50","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a4926b97f6459c753d77f4a3b624762c47d29b42","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-637d12bc835afe94e07c16d76e8eae4c83adea50.tgz","fileCount":23,"integrity":"sha512-ZeCKDIaipub0qPLVhNw0PIELQiGHQAPRH4PAW7vrF6kKVyTGJPZ1OKfK3BF589UWt73p9JuBQU0CzT3TqSvOWQ==","signatures":[{"sig":"MEYCIQCwrwxPBoyiJFqVZYRw+3nVDc01kw0FOyfgGzhkWjkpKgIhAJNi/jWHcVWg2IvJ3u9fc5FmV9TP/9uSMIV1zMB5i1zI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":175845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW1pgCRA9TVsSAnZWagAAjDgP/28BnLidXSdEMk3DU2dq\nJHxgFU/025HAtit3wOo+ZPe7jazOrkv8Rbz76PSC8b+8Lh08LvyGb56ZKd97\n24JlPlJ7eyB79XSihJA+zRZf2AM8W7U8bz6v+lKCpiTt6CkgWIoqwgCO/Ib2\nDBaq3JmHWxahT1xT2SdphOoSSnxYiXwC2rWhaXEKS9oLVSYJx+zLeHxUqi7B\nfy2gFkS3pJvexmlrOk6V6hD+rTOgmEIOggemCCTcFQyaC2TCwBkYjInzjy/x\ntGItHTlbw8+jDUmDRkPy0kjv3/CwjC+GO2iaWvcdq4TxCB3D0OLv4CLD2fr8\nKBeqg5sMZ8Y3uEu5f5H5o1yA7dwq4rtt0TxdUfGU+ej1TQrcHhfwMIYJ6+Wd\nt0heVb9x+n8+Ar/NacEtKLc4c6pVBkd76mUNskCAVrQOSedxiVQD3Ce/EMXp\nUKUtu5VEAu+rTyJ7s+9DsUYoTSgGCsIdw21zzwm522u4TwiIKOPUIb38fe2Y\noUuR5E/eboJPYRCx1tYyvdZpCP8zGd8N0atdMxfd9epBk+2CQ3kUCBxDlQjP\n0ttdfNrzBW4jekRshNxqJ9wm3PVBTW2gOEu43+gN3n8ATuy4es4/+W9guGNL\n8D3CJJf+CXrGkqhTSWGuGbKbWahmQHccfle/aOBTPtzy6hIxG3+tN+GNpZCP\nk5r3\r\n=2WIc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"637d12bc835afe94e07c16d76e8eae4c83adea50","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v","build":"tsc"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","typescript":"^4.2.3","@types/uuid":"^8.3.0","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.0","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-637d12bc835afe94e07c16d76e8eae4c83adea50_1616599648029_0.6870522504477965","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-7aec679af245c8358704e6a09bab065e780fd952":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-7aec679af245c8358704e6a09bab065e780fd952","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-7aec679af245c8358704e6a09bab065e780fd952","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c13162b7c5f9f982b6555df422086d267e30ca6b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-7aec679af245c8358704e6a09bab065e780fd952.tgz","fileCount":36,"integrity":"sha512-DRqwdB/Kb6OhgQloo4d5uoM34rb+ZYmUzHR2lp1fS23LTD7VlkoBUuw2r7592gkutriZwJuN4S5ONNnEyqqK+w==","signatures":[{"sig":"MEUCIF5fn7H5/JuYUYAaGdfqxniLaF+nn0C6azr5pxwqOwKVAiEAjRPniDexr0HK8007lsPx9sI0Xby2Chm9BpVWOBajI0w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW4HfCRA9TVsSAnZWagAAiMQP/2y/u4TpIOEaI1YNxSZE\nhRURffNo3sYQLEQlizaxwyD2w8geIDNxe9U7JCirM7T03cwomMrHuCO/OHCF\nZQqb/ayyoVGGQosBJVge01Q2asOSk/Rsn9CwSQiLCg4eXJpuYfg+eFQ7bLfD\nW02Pnm1li34lrUG9S+C7hT0/miujMQjzgi9yD1H8Q2QalQfDiTF+NKdNUQks\nwC44WtbicygF98VifhmgHI/XtuWC/Z51gnr7ahDJg4pbwPMUcrgcwj5BtcmQ\n6x7VtNK7VPBi/HhYvMHEOzdYo9A18tSziVXOGvCRUwadkh+KVewVV3/9kuNQ\nF0MgLHGDdvcvMiiErTNxcxX2w4VFVtwKSjilvWbhRLbp94HNvsWeoA+WlWhX\nrQMHt165621cLOAQ34H3G4AbGLY/qqCg9TXWfs02Oqe0xcsQrZ6X/jXTjobJ\nejyxXITF6ltpUWyQNdowf1UrGM7Ua1rb8dkBOfZTCK8pEQXVa8n43O3dtbQs\n7dppEMBQXetoS/ZDTVKbvrJKY2jbeDHKFh+ip4uYjWkC+oXSOezHHwziV95O\nnHjg1lkfmUgRmhoGd4HoQ8bjkB4u3WcHOJuG0QquBIRw9Dj7ZbC5BqrzVSXe\nimlBxU60q2bS91ViTDgLA7SM6ex2AWBt9c5lmo4Kzk2wDA5YXQ9J7CkryX2U\n5dQ0\r\n=ygV/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7aec679af245c8358704e6a09bab065e780fd952","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/semver":"^7.3.4","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-7aec679af245c8358704e6a09bab065e780fd952_1616609759017_0.7213330723145386","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-fe6160400b18e05ac61dca7a874252b1f5e4ea91":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-fe6160400b18e05ac61dca7a874252b1f5e4ea91","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-fe6160400b18e05ac61dca7a874252b1f5e4ea91","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6d239ef41e2556c5261d078d36d44ecff10a1fbe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-fe6160400b18e05ac61dca7a874252b1f5e4ea91.tgz","fileCount":36,"integrity":"sha512-HhLknn2zOS0DlG8j7yGn+OBkotLkL6bFbIVPz0RusnS4PLufDgA3Z9OzpNw8/h9y+JrSVfY0ODGwt29D+jYF6Q==","signatures":[{"sig":"MEYCIQCdPbOod5Ws7BBDsXnNtQHKMbsgsxnF2Co8n9oeDxyhwAIhAOD/hbc9ICZ1xhU+Gsq8snVJfRlp+d5OE5dIV/VCND6W","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW42ECRA9TVsSAnZWagAA92EP/3MXDd3IewTKqrPP/fIc\nX5OAiL698qV+kM54S5Qk7GnBSB/TXxVZB0lKaHNf1t49CKi22P0CGf8+ZSQ3\nWyV7a63RnpYSEfCAwfEIhkLzXSy2nNxIUB2zWCUmeQUFAWK7+CLTx3bzfOtw\nHv7A5pFYqHVe0c02WN+NcLCxiHHIYrXQwx/Rhxz0HKekL0LH8YMuAiY30ZU1\n0vZwZJFS5emTOED0z4xmIscBYPfD+WKzl3YzsUDM1dRfG98vX3q7yHItQUdp\nEsfaHUm/05ti3MaMLnX78aMSeD0whZhirwRL8Wkm6vWSGAHrAyqkvXKoajGk\n2hSSBJidZTEwAjNJBeFutR5xVgz9xtBd509BiM+djZCvdr3HxMuwp4rHCuyl\nrs3zPWTFArWQYfp/ugEavq9rCXZgD1irn4pV54cVy9K2pgaUXY1NuAzQpbPT\n/ce2jKx9xq5XS9Ln7lDmpr+Ma0ZVS7NV5GqY016JZ2ZGSz4+7ZxuxcHQP50a\nazeGxo0QR4AMGS8Gr2f7CpUsaP246zwB8oLcmwDLOfXPrfmBaDAa339o4U3A\nrt1vaYfssd0vj1i+srypWI52w3CH/X75UZc02mR1MBk0af959peoEKt0IPIF\n0jAtvAgwjlXHi55eRyW6kilK/q712lMBdYB0Y6uOon7QHDSVczn/FrWJU+zU\nl4UF\r\n=GBPK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fe6160400b18e05ac61dca7a874252b1f5e4ea91","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-fe6160400b18e05ac61dca7a874252b1f5e4ea91_1616612739968_0.8727402510799831","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-24203f0e272894d77e968e46315d5a8ff81c300f":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-24203f0e272894d77e968e46315d5a8ff81c300f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-24203f0e272894d77e968e46315d5a8ff81c300f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d351e676a555341f81b0a5ca4f3ce1aa3fff520a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-24203f0e272894d77e968e46315d5a8ff81c300f.tgz","fileCount":36,"integrity":"sha512-g9wC9WnPICtTOOLYsM++XKFdfqlvC0vUYWthECTy+PfcYx9fSIOmkNbjZ8RqcvUxdYCop7NLC17Bpg4CKRDrEQ==","signatures":[{"sig":"MEUCIQCjOsrAWVPKdmgry5VHTsoTdBdVCBlFx7djEcn+Ebw8awIgFcgPjZh14T+Mb6c0tlocJRHK1wD+kUucbf7+LgFGlOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXGECCRA9TVsSAnZWagAAo2oQAJQ61UH45H2LBVB/WG0h\n3Y/UXpWvJ2QxO8k/5IZUXrrPi+P6Fyre+HxHa37LKhe424bBzfRtD4vBpNY3\nwBtIXh4NfTE4SK6v27LBC7pTLmfAQNQfVBENNF/J6R1l/l9g/e97PlEfmPkk\nuUGSIaULLc+rSBuBH/mT/OFGf6aXEvBPcRcIsEx7AvA2ZUUtugquw+rUNMRm\nOU4Un4CtiwUnQ5Qshq1kKVpcEve5Yx1sIFU5+MF3nooOzSXsu+Ge6V+8Bfz6\nUdqEP9tOiz8uDz6eNiktwfVDZ6I4nfAFRSBmkbNu+vh7xMYrUhcGJ4VXF+Rj\n54AwFqdFg2tcW37r+sZ0gawoQ24lBbHfNGqiyUyQ2qW3ZHXuDWk+97k7M//z\nT0kY7g3iXj1G9Agj1tCbwkxMIcTZCciHQ/nxRDSdtpH/6r+Sk6X+vLxCeIEB\nhBrLuRRcy7BOjf2PWYDi85QWmAAZ57FjET8z7h99JkOBzkS+zAJw94tkb+g+\nyLoQzP44P4NKK3KVsNAlOmzmxI7RvD2/raPJK5YwHGbYXqmigPXxgMDnPePL\ncsAnbDa3Qz2UmBmcHXaozyBEJafZpJNU6OhQoaRW8xFqhfRWC29F5bbvORdb\nbQYkD4YgomoV7Laj7QHoyLE2Jazq6VK8xC4aG7hpVdS7OxHSr+/auYqmPGbM\nVQv6\r\n=rmVz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"24203f0e272894d77e968e46315d5a8ff81c300f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-24203f0e272894d77e968e46315d5a8ff81c300f_1616666881817_0.9089741538302927","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-5c98dce4d79027258098f7b770994c9680180992":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-5c98dce4d79027258098f7b770994c9680180992","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-5c98dce4d79027258098f7b770994c9680180992","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"447e79e4d8583b757e0bd347e6daf2eac69a6cf2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-5c98dce4d79027258098f7b770994c9680180992.tgz","fileCount":36,"integrity":"sha512-3UOanjyS6u0EHuxXcHcK+EMzh/A9G3mTXl6HJrclNJZgPi7F+WhVBFaV2ZFxChIzEdfRX8RRe+tZ7VSLrs5qyw==","signatures":[{"sig":"MEYCIQCK85T9aZ8G4qNFDZxpKHiXjvJkWZEnRlqCf417KBLnVQIhAP6yUD2Wsg1qvsHMR8/sy1k2m/8UQK/uc7KraPxdv8Vu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXGSJCRA9TVsSAnZWagAAQkwP/igBMp9R2tB/JP2Ld1ac\nx4aMqwqfnST0k9qHVdJOcCMbgoLi01iqVt0vytiun/F71pnjmpf/82X6cKdl\nJChrY9j1tXx9pACZoTgr1b/ntNw9Suhkwy3Gktsc094VTPhorBlWt+eEq6w0\ny3ETD9t2ksrZsWqk5kH+bFPRzzCDTX+M9XolMcxaBv1Dwz2W8OIH0LjZiGW3\n+FG3ptM1t61+G+CZtqEwKF4u7mv0RZpomHNy7DI0n7MMZh7ZDPlRWVmc+iUN\nBUtfNHEiAD4LLLDyiUR6eS8KeneMoHkd6PpnyXae4tJhRZkOdFyzL4QfC+8e\n+V6PFziAwlKSCk85b4NRkadJIFxJsdcU0LFIKP1q0XeUIye/VxCkyv/HAKYa\nMCNHbZzVOYAz/IxR2gw+8eOmbIeSymACCd0azsQK1QlIbfnJLR08QpFV7Qm7\n1iUFam2E2JpiefLuDRwEIHEVJpzsCncmtUdXhd0bzEZXhTFnmibE5xVKfful\nLSO7LWNl2gjwU8518S/opkHsN+ok+znCjmgav9VGLlAEJmK9F+NiCYnQr9xW\nPLoG7IVwCSlbw2Bv+sp1mEUjskALmLK5bDOBOya1xJ5gSMk7j0Sr2c31zKGB\nWVw+OdWkRGHcRyFg6t8qTzL4GbkLfhRrMsoCuFTCDI9ap4fMhSN+chIXw3eT\nz90J\r\n=a13U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5c98dce4d79027258098f7b770994c9680180992","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-5c98dce4d79027258098f7b770994c9680180992_1616667785201_0.004577156745214417","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-be0ee89c4662348944809c9441a57cf0a5ba0357":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-be0ee89c4662348944809c9441a57cf0a5ba0357","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-be0ee89c4662348944809c9441a57cf0a5ba0357","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"529ced56e04015b19ece40219dba5556384471bf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-be0ee89c4662348944809c9441a57cf0a5ba0357.tgz","fileCount":36,"integrity":"sha512-BvXwaZaJSNNqlLtkrSNHoxJ9HmF0Z4rn6SdIxKob/2SKQuyALrfQpxUxh9qj7Bcs4Z8HM9KX0oJudSS0ySp01w==","signatures":[{"sig":"MEUCIGdsplu1I01HUzvOjDruI28NAyyqhgiX4OP05aeve2TuAiEAuj3bU2RcIXD7CqWx4QIAK79YEZ0gJUJlpMj/KXnY5t0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXGxbCRA9TVsSAnZWagAAHs4P/RtCsg3X8Cu7CVd/r3xU\nVV7Se5YJTmFTHgPxEhhLoUhL0Cu8mW7GcGyn9+V3nes0nAVTRFNb3NrY94Q6\nNCL1rhC4cG3VgnS3yneJNyZqJ/+2xn2pAlTFi9UDVs4xfP9gl3F6DykK/bN0\nH5m6bz8jSPI16/n3RsSZalfZcqHqLSgEmlSAJiZa0ViuUf39y8Gds5q2MTim\nZnZqvW4iUhbaao8R6458HyWEF8BWK+8ankY4VIGf+dDijGig1GWLvldyqPBq\n7Ur3vZuDXZlbqdBx2yUiDDKmRyAnr6uPAJo9uIftkxal023Ij/kscNuOn48g\nAd+iRjm5x+6jAP8Wu442gG+LMRL22IVCtbodZ5tjkL1gqWUWxIkXxWcI2Soy\n93h6crtAX+bI/wwl8wx11jKY/SKf4NF8BaRJHO2WoPb6zOcocyNpExsfkPm7\n4NcqOFGlBaM4Xmt+EzqzH4Ww6Dkdkkdq6pfbbjoQ8lou3VRfd016RcshdXZC\nP2gVOyr+W1sLxD2p/lXQLzQjeVztfdmZVxY5vV4+vQeJNekVMoYIgXG2/UH5\nFkQHu0Xp1dwrnJMMK3L/3IEwiUpC7Ni8jReL1lx96M4tR1f+VJG4IIzx14+P\n5bjaBjYT9u82P3W5WfCzNjNfMiDwzxuPZyK7LGKyuVNwQGjOrgTiaTwgdHD1\nTlfG\r\n=tvyn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"be0ee89c4662348944809c9441a57cf0a5ba0357","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-be0ee89c4662348944809c9441a57cf0a5ba0357_1616669787345_0.09309016170181361","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.1-renovate-non-major-c409dd8564bb34cddd9207323fc6b266e2f5be5a":{"name":"@balena/jellyfish-client-sdk","version":"2.19.1-renovate-non-major-c409dd8564bb34cddd9207323fc6b266e2f5be5a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.1-renovate-non-major-c409dd8564bb34cddd9207323fc6b266e2f5be5a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c3e74528182df09f3d3deb8ec61cd00d48232b12","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.1-renovate-non-major-c409dd8564bb34cddd9207323fc6b266e2f5be5a.tgz","fileCount":21,"integrity":"sha512-dfudnwbXJa3c7Yp4Q0oC7JaPatkFtlJqnQqHGS/X7e/YLVHtn+GT9AKoaGl5BY5fz7XD5A4GMNzm+7RsCB8nXQ==","signatures":[{"sig":"MEUCIQC4+pdGMQ1W0UQEVDeaZ41gEcyxC8H7PFuC+5jEy4v/vwIgbkQq6KMO7lUbCT1gzS8B1vFe/CoIN+a0SV6ZNm58U68=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":171339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXHiGCRA9TVsSAnZWagAADxMP/RiqFPgL0m3Np51DQ3oe\ntNVJE3f71lKXeh9kuWJ+Ls3NHrh19aRDsWiolHnCO9OdgUcYKy10pPiyKZbR\n/AzBwLZgrzosJESzhPvAH6w+Z4GM1KKLlG96jis8cHlSGOD6VQglY14mqD3h\nn/aiCqLbgXJ6LpAs/x0HqIjFScKZ3u98bcidvcspf/SdQYsv9zzvUjhWqtmR\nPDe2WOeV0wUG3HxItNEIQZFxFZAikGi1e4iWU9d/dk0zu31HZwhPNBDHE/zK\nxGqBB/sYfwqEo6aKKiWUzEHOVt1AiVaXJ0Cz1UrkVDg7g0SPTTTrNZczm1X2\n3s803rjdlgveUr6e/o/3e8OolX77beys9uhGoSL6JC0HQQTsiWlsjPH2K1n+\n5ni8pyb/iwOOYLl+UPed8nqDahfQm7gjyjj0XCivmetLB/4jzpLQncRCCu1r\nwCtcmZBid94FM+9MzVQPIj19lXgX5pMTzOnSfYcZ1GDCY27Tw6/kcYyZ2q1R\n+g/oFIeRQQUluQeZyfApmFkRS4M9YDYMlSRAJE9VMf22DvuHPidQX1zO4eg5\nrFNWdq1EYvQijMedyQbxDIoDBOIYWrBQt+VzT4uTGRIYy7q9tVQcBR/H2yCl\nh2cEyMJ8glFT7bvcBerXQgJWAs0GIlq/X+M004CQ0ufMRBWXNanCZLN3I/rU\n9pZp\r\n=nR+k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c409dd8564bb34cddd9207323fc6b266e2f5be5a","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.1-renovate-non-major-c409dd8564bb34cddd9207323fc6b266e2f5be5a_1616672902164_0.9834827255439202","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.1":{"name":"@balena/jellyfish-client-sdk","version":"2.19.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2ebbc06d201264a9cfa0412d1d766232e7940d0e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.1.tgz","fileCount":21,"integrity":"sha512-Owpwnfj4LVJQgljXz9psx1FCjYE9CZsBael4fLqMdNfPLv10zOAbi2VeRvyb7ZDWHmheXlzxpkKW21anpQsmWg==","signatures":[{"sig":"MEUCIQDoVaiG+KkUuaiX3aJPQG5NukgFjeRgKmBMJ+EJ5qPFiAIgXqCozCaN+zSyli+CZ6aLnfn51pe272nYzO5DxXDudNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":171279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXHmxCRA9TVsSAnZWagAAeS8P/0xR1B0UKCPVzLREChkR\nPYH8MvsaWaJOBGafht0wgA7lEb0G/UIoUcZaJSewWrhXo2QNvMQJWFRM9CsA\naOUhHYCaOzNo8wx0WgGn0BOWTbDgxF2r9fn082uaJ75Pupi379fZd/9GxbIK\nXjrUOj4WPCYS4+O+Z0tF9g7lKpqKwKh71k4a3VOkXnkzxz3opJxGhM/UF5tc\nEVwuxNRWDg5fNgDtcyzk9eJHw+wDOxh5EB4eIefrbVERZYo9Ajn9ExNCPj76\n0qR6myBY8ezAKJ/AWvvI4g3c8mkvL1BqGGi7bhBnALBG6KuIsjzYWnM4dI5f\nHNUX6UQrXH5JeherrvT0FMYVwEYIwF6+s147FNMCaDWyQ1GE+8Lrm8/bgoYu\nRO+9FV/te7Xu2HUvc/SBa+yOyYdzd7goITDKqRBskBC/Plovxxn0ejPamYjL\nR0TEcYhdAJfRNoCDSy21r6XvR6aIonBmHmY0tvhDXpHOaqhmIMwf+bL9DLfO\nLf5l5oN9cM/fwXxbdYev7dqq2ZIf/3a9LUTcqFwjkmF8ibQMB0aZG8tqcflE\nWKwK70C8QQZ7KShVlueIS8+ARuzeMqT3usuWodALq3lhxsQhSinF3Awip+8I\nmGLdyVNwUFUjPR4EAgUDA8txSJGaFHUrAVQD1f6G5UlF/7vPyUxjE0gHudsh\noEg1\r\n=tm9k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","engines":{"node":">=14.2.0"},"gitHead":"1d23a3098fbdcdbfe45a5da616f60011fa65fa1c","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.1_1616673201031_0.8957820273789072","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.1-renovate-sinon-10-x-c544d95d4aa0ab6a9f0206ed8c78fb08da78dd52":{"name":"@balena/jellyfish-client-sdk","version":"2.19.1-renovate-sinon-10-x-c544d95d4aa0ab6a9f0206ed8c78fb08da78dd52","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.1-renovate-sinon-10-x-c544d95d4aa0ab6a9f0206ed8c78fb08da78dd52","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"616cd4c71b5d6182796ba450ac32c8b498dfa55e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.1-renovate-sinon-10-x-c544d95d4aa0ab6a9f0206ed8c78fb08da78dd52.tgz","fileCount":21,"integrity":"sha512-gyivu2/XJNOGvjOVWahiF4t+yIqICgcd58A6KJ2ltQbsDgzPsFzRcVaj7e6XfKtEVTwSTZfCj6aZ6mWoGfHajg==","signatures":[{"sig":"MEUCIE5CjX/kwLU5j31Fxs3DgfheCMrp/WIi0O9vUz3sbOc2AiEAmtn6TbCyaRGXvNifun+ZdQd8HDKIEw3LZQ9BviYI1Z4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":171631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXHpVCRA9TVsSAnZWagAAKg8QAImphi45Yyn8tnlt/T5s\neW5Tc9Q97sJxQWLrhhsXHojWmqO64aea6+CVvD0FyXZJnB0Q/k9Gy31XacSj\nqqtXAN7m9t/cLEZDauwhec7edqzT9qHLxJ2xvpIuLTLdkEPJfEfpjCr5gMms\n+ggmkCZ1qAtCk5xNZdU5qGqBWG9X06CWtVTeSSXPi/L0QjRIegi4Jtmyv92w\ny5WsUAnyS27yISuKwAx24Zecm2PLbGUebfG5dXtlECM7lD9GhpIQ6WD8b6qZ\nt7kg3e1X77lesetOSuABNjH81fm8T2TWhx3IOV7stFPLW2k4Be9Pthxj2zlu\n8iQggPvICgNyh8mgCcePaAHi/Km8avJB0fHHXFoBRneWgqPoJkJ5cUnwdj1Z\n9gUq+cHswbd34UFMCHK4ahbUhKoVqJ74sqTm+cBM46w95HAG8W3A/8faF2jn\nqTMr2bybPuIDY9aceElfe3bUhBgsgTE9JKgDCGBymc6ZjfkMRHM+LyLEcYxR\nIle4C/2/xYzTkHuqshr/v5sW52w4eKcmN+iZ8s+7krTvLvRgdhHWwFB2CFme\nwIeszqP5BcfChjoWBsFOmyHEDZT1XhL0WTBgdFOJdThGtnV3/mfpsUMn6p2K\nuVxRevPo9eHnrMMzw+92CTUL3UZ5XEsNSP40YvFuKJi8xrCn8VRhnplEPBJT\nxQGY\r\n=OZVy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"c544d95d4aa0ab6a9f0206ed8c78fb08da78dd52","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^10.0.0","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.1-renovate-sinon-10-x-c544d95d4aa0ab6a9f0206ed8c78fb08da78dd52_1616673365502_0.8512848666591504","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.1-renovate-major-socket-io-packages-b77b2b30203515b53e93c03172d19c6fdee2d843":{"name":"@balena/jellyfish-client-sdk","version":"2.19.1-renovate-major-socket-io-packages-b77b2b30203515b53e93c03172d19c6fdee2d843","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.1-renovate-major-socket-io-packages-b77b2b30203515b53e93c03172d19c6fdee2d843","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4de1ffbdfe5d5211618a80901f9899b60253ee55","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.1-renovate-major-socket-io-packages-b77b2b30203515b53e93c03172d19c6fdee2d843.tgz","fileCount":21,"integrity":"sha512-EbvXOJCVxhUXcoZ+WrDwXY80XCLu0J9WPobI55fL9THWVDRbDzbcKQKGsMk+QeAVOFXfpOLeu9db7zkpylIHIg==","signatures":[{"sig":"MEQCIBJFGHQ3DhJfbKHl7vvMS942BDOesWkJYTDtZdDD2YqYAiBiVrvEQB/DhQlUUgOLqyqs2UjZER1THBIP+n+Y6Bc3vQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":171664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXHp2CRA9TVsSAnZWagAAePEQAKJ4Fb0tJQ0rhNTmcELj\nsTT30Hqm0FY5BtL3ROToaI8MynZuo8HHA7B+a1UElJICM/l6aBAU2XSJ34jk\nfmj0nrQrPqFycUV7SvfMclEHpEB1iTyy3YKXsQmQGaUOWEfa0pU+85QlIDQf\n4h1QNy4TtD0K3ojTLMBylOu/VMjbZNGVvgW04yfcBqPZRN8dHJVRAHSqnIMh\nwJEFThQp02X4kOeZu04JFu51OzUu5PyGsElkj/McZn50ZDTqD9KSHk77u49k\nc1b9LMqqHo5WQ3Pdy2sSHcIKnTFmDeBk9nTUQcY8KEQnT9NRNJW7/Q7a2U5x\n/OkHl+C6ahbCjiO6gNlq4w6wJJY9XSABXBNqjG94G5Gjw3ncbu64wI7t3pL1\nZ40aAtW8bG2r/mLjCP81WZg4LJHFBiYQRLs0MW7aV1VTyopwBQCZE9zzeokf\nBPK0rlUdEXZmQDH8BxzDnAfmsw3AgmNNK1w3+IoPTux4AGDQgFmuELZhpq/d\ngPEW3adYTleZUPm6X9g9Q86N9fpW/dwt35Jy6gg7goHUcrsTFDXVpG/61eFX\nlc8K4AuVFCjZTnmflz9Cz8CLhwPySy6BrGcHrtBK8drS70vgeAcAnuXU1Y7f\nZ4sENiMo/dfpO3tMd3DwXH1LomEpnhbNsP8rxUmPQmyRSVDnpfRMEonn9PDJ\n+t9j\r\n=IFNO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"b77b2b30203515b53e93c03172d19c6fdee2d843","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^9.2.4","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.1-renovate-major-socket-io-packages-b77b2b30203515b53e93c03172d19c6fdee2d843_1616673398104_0.5986279823703189","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.2-renovate-sinon-10-x-3106de3d054bb31f4e4ecf997a4c4c268c6b4982":{"name":"@balena/jellyfish-client-sdk","version":"2.19.2-renovate-sinon-10-x-3106de3d054bb31f4e4ecf997a4c4c268c6b4982","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.2-renovate-sinon-10-x-3106de3d054bb31f4e4ecf997a4c4c268c6b4982","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ee3a9d6c2eb1fa3c09b0e0b4d6459d57ad907706","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.2-renovate-sinon-10-x-3106de3d054bb31f4e4ecf997a4c4c268c6b4982.tgz","fileCount":21,"integrity":"sha512-/b2yQNOyILHkdgX/P8kkhbbCwXE28O0zGec6YOTDK6bw/AzwnWvgzvTh2YwznzJq1NdbMd1Dyow0uHgwhPfYdQ==","signatures":[{"sig":"MEYCIQDjuPtDH4ItI4MsGQxoabCKe0BS/UpCC6VdEDqjakcHyAIhAOfCF4slW3kvSDV1ko96f9VPeaG2My82ZqDnN2OQNoU0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":171718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXHryCRA9TVsSAnZWagAASMkP/0wnycQlLLCUcg2O8DWR\nKG6yEiL+ZPIL6VsZegNUVPUS8TftMjXh1sIAyHgwDwlBuUfSSKrzzApNIZgG\nf/IjUHOvKsrUw1YhPCNLTj+dLhCniI12a9mgCvRT1ORLRuv2Gcf6pLBii+uE\nf6+8UVgUrmqKFGM3dihr7mgrL8Z/rhtbzrJ8aVmffOb+nowb6SaeZYasHs/S\n7C3iY7JvPkPFtQuOLwI++GclwaRtK0b6iMPW08WMFgBqoVtAYmIon/ZWPmm3\nkTWhuJcnf+iolinhcqEd2ccJsWCkT5PI1CZEspmetpC79vx9Xh9LICjNOe2e\nyC4BIkeZJjglWfTGW6hukxMqSsFPELjkh9hNnRJLQ4sZWG2woB4ynZE2hJD2\n8NjkHYyPNX6FRM/yIBn4EBLAITq7lmbsYTD66c9eapikC6Em7tNu5CoaEifH\ntvT2pDaJEazNWvS8GAGFpxh8X+9TLCjEIzJxjVBLWFGCpIGeMZhANJSex3ul\nYOCv8k8hOqRdxgpxEh4anrLt5JWMHCG6FTSyra7iln+PpAsf9/dK5dFUs+V8\ngBE/qkEa96ockUKub4KSxEYe92J2KLis/ySydWWBixz+DO2+KchrCfiTl5aw\nIbPorKPjo3UnRP73CebAdJXqf5ixQjT/cJ8+lCnecelqVVR0BD1GqptegXse\nhtci\r\n=pNBj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","engines":{"node":">=14.2.0"},"gitHead":"3106de3d054bb31f4e4ecf997a4c4c268c6b4982","scripts":{"doc":"jsdoc2md --template doc/README.hbs lib/index.js lib/auth.js lib/card.js lib/event.js > README.md","lint":"eslint lib","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"ava -v"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^3.15.0","nock":"^13.0.11","sinon":"^10.0.0","eslint":"^7.22.0","catch-uncommitted":"^1.6.2","jsdoc-to-markdown":"^7.0.1","eslint-plugin-node":"^11.1.0","eslint-plugin-jsdoc":"^32.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-lodash":"^7.2.0","eslint-plugin-promise":"^4.3.1","eslint-config-standard":"^16.0.2","eslint-plugin-standard":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.2-renovate-sinon-10-x-3106de3d054bb31f4e4ecf997a4c4c268c6b4982_1616673521492_0.8628570835198359","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-f80a99fb067cff1540d693dd8a8ee2ae4a320cf8":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-f80a99fb067cff1540d693dd8a8ee2ae4a320cf8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-f80a99fb067cff1540d693dd8a8ee2ae4a320cf8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fea3f652a9c412f4b831256dbc5eb33f7e6cf1d1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-f80a99fb067cff1540d693dd8a8ee2ae4a320cf8.tgz","fileCount":36,"integrity":"sha512-wVgOdJbwf5c0vwFPTNGPBYIYA5fy2t5P8eYYHgbKXqW6hgMTNaIKRt8RaE8UyNKV2bWzzAmgZPcEsFDPIscWJw==","signatures":[{"sig":"MEUCIG/kLl/uk+S0LILbORsvX5WlIOYP9lBDIRGNznc3a7cMAiEAsHBoryOLncL36MVWjZEXZKfNyNrlkixiDVOh42V4kqw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXIKlCRA9TVsSAnZWagAA8iEP/Rly2x/D18hnHM/aVrNw\nQ74lUSSKnGhM8NwQ9JoHPHt8i9zv20BbBR23vkW2Hov8Fxtk5QfYXR7lmB0+\n5kKphRy5L53tWP5apLzS7Lg467pfJJ354nJ07iGeojc0uwS4t0cxgIi6TShH\nYzp6OMFUJ2FTAzBmDbZMzi4hqTreV2Vq65mYB1/nJdRM/XYBAUPc2laME1Nw\nYyhgP0/xF2pR7vCQkOKNwQxJ0E8cYKoeD0oupnsJFggEK+P551nA28AyWDVE\nNR9dN1wMZ7KjA3h09QQkK4+3Iw94hoDAzcSHfjRmWTnjcrayWg37vlkq8JLo\ncGO8HqwugQ4TiRNTX4qXwNOhut2Wyu5Z4iTHPeQr1ZQhBDUGGdkoIQv18DNG\nRPS6QnnlUd9hDcj75GoBmKxPnuqMLPgMZnHIgt2tDTB8Pbd61RUoVOtG5eqq\n1qH/K+xCMlAvukbAYxwuCH7yE5Wpq0MuzvYD7NhniM8sWvIeEDfF2/wdFiNO\nyakelF2kbmFbwKoP/ZLVohBY1GOhAw6YJ3CZ+nLjoy2EKRBwcdc+Gb+SMg8Y\nt/72GZRkirGg8hPN+bk+3ugrkRl1U6Y9ZNp9udsJ4KRZ2KgMigHwC0sb3KJi\nFPmJO2iTIyAqeIPOEsx50Fb1eYDBJllrHMuHipw+j+EeKvKg9NS/JxwzkJ2O\nFQPx\r\n=c7AB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f80a99fb067cff1540d693dd8a8ee2ae4a320cf8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-f80a99fb067cff1540d693dd8a8ee2ae4a320cf8_1616675493389_0.6380064252715152","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"2.19.0-to-ts-5809fa840ed707fa5e28457ff3cf9a6d52a5f291":{"name":"@balena/jellyfish-client-sdk","version":"2.19.0-to-ts-5809fa840ed707fa5e28457ff3cf9a6d52a5f291","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@2.19.0-to-ts-5809fa840ed707fa5e28457ff3cf9a6d52a5f291","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"402de1b63097ecc646d03d7913fdf54aacb357c5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-2.19.0-to-ts-5809fa840ed707fa5e28457ff3cf9a6d52a5f291.tgz","fileCount":36,"integrity":"sha512-g7KjZ++iTf9yiUeaGL3sKmSNih5ZT53ZdTw2qf8dN5XekIlEMGzTy/Oehl46c6FEbdCEdSbQttJrYTtB+5ZDTA==","signatures":[{"sig":"MEUCIBwnjxuL6GRD98hC6yY4oIZ+9PM3sxesBA07CMNL8lTnAiEAtgojUVsqJ99tiJM8MWgesVjB9oXCEGCRIYpaf0bsakc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":252303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXImCCRA9TVsSAnZWagAA86oP/ik5SLQPqQJAH2nODeyl\n7RIuNGw4VX80Cijj9Z8IjFd/Tqyo+vddygQx7tX+tgvSN+J8Xy8gq3BoWVmC\nLLF7/QyQbBBKc9pg9PhwYlkcCxeqWq+yU+uYPP9OYw8b20aY+rk3Gc/084X6\nNMCSdAjixjF/+sF9AOnsja/BNQAI+e6sx7ntlnj+H02pFCa46Z6kbfOmAezl\nLtwceTrQWZb8/EObtyeUrLBkBX7+7eW5DmTMj1WwCCW5EpsdVLp5V8C89Zt0\nXL1KaSHdYhYvIyW+oR2pTiGY6cj4r3hltC2UjBChehb3dTcU6t9+TEo4oRpA\nOsHL2gnQ/70WNk+XaIBFnE9u3wdoXllpUQuojlOB50ZVDzG9SZ9Gc5OniFhg\n7ywJFc0CqdnB222g/Gqy4qmsu+x5upnDLzPDCQyMArVxpu5bJJxTO2NRlXON\nkjeA3L3VpRrkMxBtDcU+gfvAcarc4LoYvARxdKpm+W3N3NNgb7YIGM1lZRjy\nZQqeJCMLGnxvirQ7aa3ac1vXDYOxg49DVIv1U1tJLxYiSIEC81p++KHmwDjf\nv29lThqhoNFMkEWhLM2MhO02xiNOpkpCDQWvOcUqhpYNrAPRwSrheUBpXn7L\n19GOvL6IC/6u2hF15ueM7vypr5m6ddUbaq9W6VzDS73k5q/3SnWyvrH9c6qe\nT5B8\r\n=Njqi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5809fa840ed707fa5e28457ff3cf9a6d52a5f291","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_2.19.0-to-ts-5809fa840ed707fa5e28457ff3cf9a6d52a5f291_1616677249516_0.5675005033999974","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.0-to-ts-76a6e8c1479c55db45a85cb83e312b8b92426d51":{"name":"@balena/jellyfish-client-sdk","version":"3.0.0-to-ts-76a6e8c1479c55db45a85cb83e312b8b92426d51","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.0-to-ts-76a6e8c1479c55db45a85cb83e312b8b92426d51","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6be758f24bf2e7f7c44ed61ddff9181635293ac6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.0-to-ts-76a6e8c1479c55db45a85cb83e312b8b92426d51.tgz","fileCount":39,"integrity":"sha512-RE9nninHMs6qBFK1IpbqCKDHCKDYaYv3z/qfB3sGkDfLEKx+Vg+/1DeTwOHuyj9/gtPxaKBb7/7wZ4tmseVHWQ==","signatures":[{"sig":"MEUCIQCVUfVwGJFNdHIUGrpt0UBtC61JSvNJhV5bneBsakf3VgIgNTAMiVGpXTgUTUJC/RCDzXX71R2eElcMSEp21JTjyFs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXZmTCRA9TVsSAnZWagAAMoMQAKOui5KxLAwdDWfxSikR\nlB6uDgffejCwNQAHnH62w7rcmHuaFpSs4j+ELspv07FIduUKekdBlwwOEswP\nu2r/Krs4LyIt2CBj83PXxE68rdvR7UT4aaZdWu5QOJsWu45ht81PF1eJYtp+\nbg8vaKQuBilTU/pz3FrOObmmQYw7xt1FkjCqfEgvtYa97/Lw7GF0OYWnPA+l\nzOPPkXWmpdBBScEB1G+Xg7bi6EkE1/FO5tEtEv+MnaxVR6w1DzXVYvMbU2Fv\n26WmvQHkU7wl7C5mzMVntCpcCuyjJT1gcAhtPW9WSt5uorx9HtZ+QMRIyGu+\nziVTJtX26CZCZqaWcVls/+m/iytE91I+EY36qlMQhHBNH335yxSQqnh3MW62\nqWqQSiohP1aeRbrE53I7Cf+n5KxgiSGvnPMJ1ly6gAnyN0tQByWyT2hA5Mhu\nftCJEVUquwizCiPxq4WjJ/BpkEaanS9U0Es0e22mUAJ2wfBEDxf1F0r8+/hb\nWO/fEjWZOcKFv2FNFn/zjNPJjAVf/zdGmGNCYIPXwPlk2/KqjKWlfJsQOkne\nPg0u7hFJOQGxm3trqd3m5yDUzJYhbx6nWvVvpisdoAOWCTw4UhkH2RjlJ4ae\novP9tpYR18/YnbrXVfwyY1ndzUSyo9U1Bp80icBUzp7ZMPrzqmhvN72Z0uTc\nGjmH\r\n=LgX2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"76a6e8c1479c55db45a85cb83e312b8b92426d51","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.0-to-ts-76a6e8c1479c55db45a85cb83e312b8b92426d51_1616746898568_0.29273639879666713","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.0-to-ts-91f233d870f7b9765a91198f60b10f2ae649d710":{"name":"@balena/jellyfish-client-sdk","version":"3.0.0-to-ts-91f233d870f7b9765a91198f60b10f2ae649d710","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.0-to-ts-91f233d870f7b9765a91198f60b10f2ae649d710","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7d8bd1c4c99816f5a8f0e87fa5fe259d85b2ee95","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.0-to-ts-91f233d870f7b9765a91198f60b10f2ae649d710.tgz","fileCount":39,"integrity":"sha512-5vrWsicelwi6WsPOXXnPGWnH3kSeKh/FmjtV16yNJ1dPu0r/1UbGD5JRC5yVCV994WC3IzIqaPPLCqXXTkRBUA==","signatures":[{"sig":"MEUCIQCOdA1i4ORQ0B0Kgun9vybCzBrtvGeuO1K3ePv7dOP/yQIgHboghMa9xW0LctT8OOx7Lo3ofFxd5asOWJpgBqCq8J0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXZtuCRA9TVsSAnZWagAA/60P/1uRnoD6KArUT55Gsn1e\n5odhsjTHzogfZYhbBPwjUaoCMsU/tJZfR9ZOORWbUv2wBoAUm2DHWKx+s7s4\njEcjZ3AftjH6BNGneO/XxtVP3zS9ZpTyvsft7iVbbHCZX6ffAPERYRuZKOjs\nHzdb23v04r1y/LJG4bxZmu9DL7/O+N+r9G3Ur0wZLG7e9uhcqmcRhNAlVDGk\n1t2U4CPmN+u5pbc4XLSRGFv5Wz4RczojZ+06IBmhMBrjgiNn83q2KdYkIvrS\ndK/jcZNfqbmbMoahx6ngAus93eMa0PETvN5P8k5u7uUqM8uXrGjTubp2qK5n\nMIIVRAGA+gJ7L4Pmz6mXtvMmcqn6Q7zuRp0qUxDUkCI8N3W5KtzdchwTVIlc\neTy9vS2X40KNGsc4QWSroMERTjdZ/pAr0EIobo6e1BEiaZMmX5Nh26+sg65f\nhSd6KbX44qZnCztXhcmSZbiztQ0E62+3wPvops/s0vOuzhrjmzuh+FpL1P3X\n+VXKVvFM3nsuZHjClT7A0nxgr70qyd6BwvT2gpM+c3W+9Scpagu1J24JH5TL\nAUUZiBPcckwZBKcz/YkRNB/7arhpvb6ebz/D25Q3jQKkNR8XmahndR9SWIJO\nEH+1Nuv+rL1F8RDM1NOYLSKB7ujtJYxeLSGAE8lB6bURVDp0oVbt5vlvDNeY\n8mAG\r\n=PK8t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"91f233d870f7b9765a91198f60b10f2ae649d710","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.1.0","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.0-to-ts-91f233d870f7b9765a91198f60b10f2ae649d710_1616747374390_0.8655313934868967","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.0-to-ts-74b79166de3397ab31c0907b3a4192bd5d66fd28":{"name":"@balena/jellyfish-client-sdk","version":"3.0.0-to-ts-74b79166de3397ab31c0907b3a4192bd5d66fd28","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.0-to-ts-74b79166de3397ab31c0907b3a4192bd5d66fd28","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c9c77270c5a429445eab1962fa0af9e12338a391","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.0-to-ts-74b79166de3397ab31c0907b3a4192bd5d66fd28.tgz","fileCount":39,"integrity":"sha512-ndBbayLM352I+t2ItnLbMb65xoAj42wRVaMKUAeOCW0fwOgmcAstR37OCEQvJsOtgbU21KkjuQVK4dQG6YV+0Q==","signatures":[{"sig":"MEQCIDa7iYcF3dm89BWOWbjuhi7HmLGXFZWX51kPawRa59VTAiBNNzyJRdzLzamPpLm8x7OImSwPlGS4BPkDZJs81L71dQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXZ1kCRA9TVsSAnZWagAAf8UP/iv7jB+2UkHKaVrTmgI1\no071t6sjkCeX2ZCokAvfKi+uM79CEqA+Y8gak4kDjvFOGUfWhqS+PL6xd9O2\nfz4WoznJGozUVX6R65KXcpOr+zbUp4kbdBawCKwcY2CevX3b/WETbSpZPHaL\n9Z3A7K9S5qENzW5wZRVVFKmDiwPITq7ZLjJh2wPBBLCRMkTtICreNfZpKMjF\n9UaGb59p66Vd4LLARL+rd65g7ry7V05WtaHY/KiZVG+RBhgSlGBk7imeF6Ve\n1q5BPWVx0k3eS0/6S4evUrgD2cDH/xH/oCErqpyHtjrQ0gfLcCzAXVN18yga\nLOtW+G7isf86CPP3TehbPwSGgMjBEXd9rQ5seeEyx4E7tI5YuaPNNOVUQ7Ar\nmH0BVFhfV1D0UoebISrFd5vMeVHrgymaRJFz9OU54X88Tj9PoTi/UCkvoGg0\nWUUTiDL0YWM31D+qYwEBhXrKiN1qm+9dktSXbFJ5BqEql9vETLWRec9ZBGbE\nJYGSoJNo9eB/l/+MMdTa3TN3jI/hMfQyROC7rdafNlpI/JB2ooMwElQaJXl/\naABDfIjFJ1bplGvQSMv3VcBMyYhxIE5cBUzwlgiwkPVV5ANnojXihDYTNkd9\nA2ADIBeKr0YM3GgpaJS40c65ZuwJykkCNuwuws5S4hNh2ZYhrfTaxxpFUAgg\njWjG\r\n=DKCM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"74b79166de3397ab31c0907b3a4192bd5d66fd28","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.0-to-ts-74b79166de3397ab31c0907b3a4192bd5d66fd28_1616747876563_0.932364371434268","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.0-to-ts-61ff3ee0d89a0eb8a2389d5d7be4a5ea854faee0":{"name":"@balena/jellyfish-client-sdk","version":"3.0.0-to-ts-61ff3ee0d89a0eb8a2389d5d7be4a5ea854faee0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.0-to-ts-61ff3ee0d89a0eb8a2389d5d7be4a5ea854faee0","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"85ffcdc1e5c50286fe3f8d170d84dfa411989ab6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.0-to-ts-61ff3ee0d89a0eb8a2389d5d7be4a5ea854faee0.tgz","fileCount":39,"integrity":"sha512-134364C1Zq71TZICW93CNswwedyc9BVzKTd+Sc1yJZOR2qJEndGl2oRV5xLI0xRq9eD47TsoG4mlz/AmQ3po/A==","signatures":[{"sig":"MEUCIQDc+B7eCRELee4O8QYcu0u4XeF83tmxp9WO7IQKNNCjAwIgfWdQ6uaSpKE+gpbwU2n12ZsjV1cWvdHQbRAYRFeaWFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXZ65CRA9TVsSAnZWagAA+cEP/Rs62v4eF9CbMFLcYpr9\n97ZsnsLKib/7w8pnBBnqffUfKr4kyySYvRxHZgJXBBwch24Pv3zP5WS4NogW\nIZOmHKniuADmrsFzRQoPAYCbodRJTaQP8761K4TH05mu0+jIyRqyCneySJF/\nK+C/dztkpLtgFSgs0u62Lt0POlp284VcvGt4mdEFMe/N0knagvXishO/hW/9\n0vWBPF1DoPk9f5kLIb+twb6SfZ6d/7UvbVQ4ATlVHaK8FopLF9uxjZDAsXi6\nzvdyn+wJEZ+fT4HQz+qm/hngPBfJyCoujuLHC0FAtsLpcMPyiwCBJd0GFMk9\nFGvsRoC9OAGPMAUcFfuGA1oIP9dNKVn/X2U9OC3QMX8UWuULla9Tc/VF6VQL\nqlKBh/jAauZtdzvrycoqTFWC/1IPiQuRRUqY0F8cM12lMisNqa3IikphgVPi\njDZL7QbEhWNWefDRyg4RtXTIHS3G75m2Jfts1FqHXUDI725bDsUVMQObc9H9\nWLfdmJ8C9Kxe6fW7CHQNyboR2QVD0DhIfuAUDbv+t23PdLJJWKHakO0bl0UQ\n+PIQrrAHIoAl+MBh1vms5CHkeWjdh1Y1FV9RWC82a0WW/5dBquLKzkH/ZG3e\nnq7/EtTOfluv1gkk8T/zpVihXmD1ajihfMj9o6plX8+vs5H1kIVCUDfuuiep\n76kZ\r\n=Pifm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"61ff3ee0d89a0eb8a2389d5d7be4a5ea854faee0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.0-to-ts-61ff3ee0d89a0eb8a2389d5d7be4a5ea854faee0_1616748217172_0.691150763661154","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.0-to-ts-8d86285be48aff12a56bbaa30a16405f774d7f02":{"name":"@balena/jellyfish-client-sdk","version":"3.0.0-to-ts-8d86285be48aff12a56bbaa30a16405f774d7f02","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.0-to-ts-8d86285be48aff12a56bbaa30a16405f774d7f02","maintainers":[{"name":"alidaodendaal","email":"alida.wink@gmail.com"},{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b6ed37fc3a32aa472d4409273a08019bc49f5797","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.0-to-ts-8d86285be48aff12a56bbaa30a16405f774d7f02.tgz","fileCount":39,"integrity":"sha512-r0biw+kFTENjSZAfnremvBfgUxYbcrxxGCcxzZO8DY3tfdoe4g+D9Qw25neXehADs+FQ5mhgbBJjxSdtSC6DNw==","signatures":[{"sig":"MEQCIEEQ4F8Gup31F20QhBOht2m9iQ0B7aUiQolUdrhelcIPAiAyjczv1F6ia7HZbq8wlqoEqqdsXz99GFytIhlNU+bO2A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXaBmCRA9TVsSAnZWagAA1BQQAIBQDiIQss1p0AiU8lPt\nFiPk2oiSQxsHycl5oNFoA/zJ9JLk293MC7ea46yRzehrkQ2121U5khylpZ4w\njyGqK5/PdK9KguCkvPLGTPatrgvrORTMlBd3sl3EDi1ATP6GyPWzaBinZM1T\nakbyiYyIcFpHi9FkuNbdJ3lcNnSMtK2Ugk5emC3wZxdzC44hBOMZdmZeSdea\n4LHXX7L8z0QOtiOFBXTmwS0LmcQfj6GvaRtirUUNj+Gyc5ajAQed/DbcaHYC\n6u1l0ThDbc7hvokYycb188HgHTeVMoHpumoRJEkszct/XDXCeJcKwb5JimOD\nxuMJsmFihV4jPvM+oCE+VzZnzvRn/jGPCK228BpeX8cMh0JsDsgB4roBd3re\nodNE98otD+UwDfjJabZhtbsxpllyog9jiCxKMQddo9cVjWR6IjWQJ7eYu4N0\nWoIXku5vSH0Netgk01KFhzE6lKyMM/vXRx4h7BtMxdjLGgzf9ZA0Hc764nNU\nYD8Wq3Fx2YBg2qSnnOvObyBOTJlvoWDXn0YZirzRbRUeuqBAAWMrDA2cJle+\n8kVC88PZmfqCCNcRlVzz0q5Nd8NYq0b7JRcNA2VT+6Xi95gd+UcoSztcJ8kl\nMymN03uLc+hP/zaeWG+thUWtduhtdv2CaPfdNJucQkMzZShMkj9rmUa9sAZp\nFTjr\r\n=3bFa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n## SDK instance\n\n**Kind**: global namespace  \n\n* [JellyfishSDK](#JellyfishSDK) : <code>object</code>\n    * [new JellyfishSDK(API_URL, API_PREFIX, [authToken])](#new_JellyfishSDK_new)\n    * [.auth](#JellyfishSDK.auth) : <code>object</code>\n        * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n        * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n        * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n        * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n        * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n        * [.logout()](#JellyfishSDK.auth.logout)\n    * [.card](#JellyfishSDK.card) : <code>object</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n        * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n        * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n        * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n        * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n        * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n        * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n        * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n        * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n        * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n    * [.event](#JellyfishSDK.event) : <code>object</code>\n        * [.create(event)](#JellyfishSDK.event.create) ⇒ <code>Promise</code>\n    * [.getConfig()](#JellyfishSDK.getConfig) ⇒ <code>Promise</code>\n    * [.getFile(cardId, name)](#JellyfishSDK.getFile) ⇒ <code>Promise</code>\n    * [.setApiUrl(apiUrl)](#JellyfishSDK.setApiUrl)\n    * [.getApiUrl()](#JellyfishSDK.getApiUrl) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.setApiBase(apiUrl, apiPrefix)](#JellyfishSDK.setApiBase)\n    * [.setAauthToken(token)](#JellyfishSDK.setAauthToken)\n    * [.getAauthToken()](#JellyfishSDK.getAauthToken) ⇒ <code>String</code> \\| <code>undefined</code>\n    * [.clearAuthToken()](#JellyfishSDK.clearAuthToken)\n    * [.cancelAllRequests([reason])](#JellyfishSDK.cancelAllRequests)\n    * [.cancelAllstreams()](#JellyfishSDK.cancelAllstreams)\n    * [.get(endpoint, [options])](#JellyfishSDK.get) ⇒ <code>Promise</code>\n    * [.post(endpoint, body, [options])](#JellyfishSDK.post) ⇒ <code>Promise</code>\n    * [.query(schema, [options])](#JellyfishSDK.query) ⇒ <code>Promise</code>\n    * [.view(viewSlug, params, [options])](#JellyfishSDK.view) ⇒ <code>Promise</code>\n    * [.getByType(type)](#JellyfishSDK.getByType) ⇒ <code>Promise</code>\n    * [.getById(id)](#JellyfishSDK.getById) ⇒ <code>Promise</code>\n    * [.getBySlug(slug)](#JellyfishSDK.getBySlug) ⇒ <code>Promise</code>\n    * [.action(body)](#JellyfishSDK.action) ⇒ <code>Promise</code>\n    * [.stream(query, options)](#JellyfishSDK.stream) ⇒ <code>Promise</code>\n\n<a name=\"new_JellyfishSDK_new\"></a>\n\n### new JellyfishSDK(API_URL, API_PREFIX, [authToken])\n\n| Param | Type | Description |\n| --- | --- | --- |\n| API_URL | <code>String</code> | The URL of the Jellyfish API |\n| API_PREFIX | <code>String</code> | The prefix used for the API endpoint, e.g. v1, v2 |\n| [authToken] | <code>String</code> | An optional authentication token to instantiate the SDK with |\n\n<a name=\"JellyfishSDK.auth\"></a>\n\n### JellyfishSDK.auth : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.auth](#JellyfishSDK.auth) : <code>object</code>\n    * [.whoami()](#JellyfishSDK.auth.whoami) ⇒ <code>Promise</code>\n    * [.signup(user)](#JellyfishSDK.auth.signup) ⇒ <code>Promise</code>\n    * [.loginWithToken(token)](#JellyfishSDK.auth.loginWithToken) ⇒ <code>String</code>\n    * [.login(options)](#JellyfishSDK.auth.login) ⇒ <code>Object</code>\n    * [.refreshToken()](#JellyfishSDK.auth.refreshToken) ⇒ <code>String</code>\n    * [.logout()](#JellyfishSDK.auth.logout)\n\n<a name=\"JellyfishSDK.auth.whoami\"></a>\n\n#### auth.whoami() ⇒ <code>Promise</code>\nGets the user card of the currently authorised user using\ntheir auth token\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Get the currently authenticated user  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single user card, or null if one wasn't found  \n**Example**  \n```js\nsdk.auth.whoami()\n\t.then((user) => {\n\t\tconsole.log(user)\n\t})\n```\n<a name=\"JellyfishSDK.auth.signup\"></a>\n\n#### auth.signup(user) ⇒ <code>Promise</code>\nCreate a new user account and return the newly created user's\nid\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Create a new user account  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The newly created user  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| user | <code>Object</code> | The user object |\n| user.username | <code>String</code> | The username |\n| user.email | <code>String</code> | The users email address |\n| user.password | <code>String</code> | The users password |\n\n**Example**  \n```js\nsdk.auth.signup({\n\tusername: 'johndoe',\n\temail: 'johndoe@example.com',\n\tpassword: 'password123'\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.auth.loginWithToken\"></a>\n\n#### auth.loginWithToken(token) ⇒ <code>String</code>\nAuthenticate the SDK using a token. The token is checked for\nvalidity and then saved using `jellyFishSdk.setAuthToken` to be used for\nlater requests. Once logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a token  \n**Returns**: <code>String</code> - The new authentication token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | Authentication token |\n\n**Example**  \n```js\nsdk.auth.loginWithToken('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then(() => {\n\t\tconsole.log('Authenticated')\n\t})\n```\n<a name=\"JellyfishSDK.auth.login\"></a>\n\n#### auth.login(options) ⇒ <code>Object</code>\nAuthenticate the SDK using a username and password. If the\nusername and password are valid, a user session card will be returned.\nThe id of the user session id (which is used to authenticate requests) is\nthen saved using `jellyFishSdk.setAuthToken` to be used for later requests.\nOnce logged in, there is no need to set the token again\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Authenticate the SDK using a username and password  \n**Returns**: <code>Object</code> - The generated user session  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | <code>Object</code> | login data |\n| options.username | <code>String</code> | Username |\n| options.password | <code>String</code> | Password |\n\n**Example**  \n```js\nsdk.auth.login({\n\t\tusername: 'johndoe',\n\t\tpassword: 'password123'\n\t})\n\t.then((session) => {\n\t\tconsole.log('Authenticated', session)\n\t})\n```\n<a name=\"JellyfishSDK.auth.refreshToken\"></a>\n\n#### auth.refreshToken() ⇒ <code>String</code>\nRefreshes the auth token used by the SDK\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Generate a new session token  \n**Returns**: <code>String</code> - The generated session token  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.refreshToken\n\t.then((token) => {\n\t\tconsole.log('New token', token)\n\t})\n```\n<a name=\"JellyfishSDK.auth.logout\"></a>\n\n#### auth.logout()\nLogout, removing the current authToken and closing all\nstreams and network requests\n\n**Kind**: static method of [<code>auth</code>](#JellyfishSDK.auth)  \n**Summary**: Logout  \n**Access**: public  \n**Example**  \n```js\nsdk.auth.logout()\n```\n<a name=\"JellyfishSDK.card\"></a>\n\n### JellyfishSDK.card : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n\n* [.card](#JellyfishSDK.card) : <code>object</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.get(idOrSlug, options)](#JellyfishSDK.card.get) ⇒ <code>Promise</code>\n    * [.CardSdk#getWithLinks(idOrSlug, verbs, options)](#JellyfishSDK.card.CardSdk+getWithLinks) ⇒ <code>Promise</code>\n    * [.getAllByType(cardType)](#JellyfishSDK.card.getAllByType) ⇒ <code>Promise</code>\n    * [.create(card)](#JellyfishSDK.card.create) ⇒ <code>Promise</code>\n    * [.update(id, type, patch)](#JellyfishSDK.card.update) ⇒ <code>Promise</code>\n    * [.remove(id, type)](#JellyfishSDK.card.remove) ⇒ <code>Promise</code>\n    * [.link(fromCard, toCard, verb)](#JellyfishSDK.card.link) ⇒ <code>Promise</code>\n    * [.unlink(fromCard, toCard, verb)](#JellyfishSDK.card.unlink) ⇒ <code>Promise</code>\n    * [.markAsRead(userSlug, card, userGroups)](#JellyfishSDK.card.markAsRead) ⇒ <code>Promise</code>\n    * [.markAsUnread(userSlug, card, userGroups)](#JellyfishSDK.card.markAsUnread) ⇒ <code>Promise</code>\n\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Extra query options to use |\n| [options.schema] | <code>Object</code> | Additional schema that will be merged into the query |\n\n**Example**  \n```js\nsdk.card.get('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.get('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.get\"></a>\n\n#### card.get(idOrSlug, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and its attached timeline  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithTimeline('user-johndoe')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3')\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.CardSdk+getWithLinks\"></a>\n\n#### card.CardSdk#getWithLinks(idOrSlug, verbs, options) ⇒ <code>Promise</code>\nGet a card and its timeline using an id or a slug\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get a card and cards linked to it using a verb  \n**Access**: public  \n**Fulfil**: <code>Object\\|null</code> - A single card, or null if one wasn't found  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| idOrSlug | <code>String</code> | The id or slug of the card to retrieve |\n| verbs | <code>Array.&lt;String&gt;</code> | Verbs to load |\n| options | <code>Object</code> | Additional options |\n\n**Example**  \n```js\nsdk.card.getWithLinks('user-johndoe', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n\nsdk.card.getWithTimeline('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', [ 'has attached element' ])\n\t.then((card) => {\n\t\tconsole.log(card)\n\t})\n```\n<a name=\"JellyfishSDK.card.getAllByType\"></a>\n\n#### card.getAllByType(cardType) ⇒ <code>Promise</code>\nGet all cards that have the provided 'type' attribute\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Get all cards of a given type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - All cards of the given type  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardType | <code>String</code> | The type of card to retrieve |\n\n**Example**  \n```js\nsdk.card.getAllByType('view')\n\t.then((cards) => {\n\t\tconsole.log(cards)\n\t})\n```\n<a name=\"JellyfishSDK.card.create\"></a>\n\n#### card.create(card) ⇒ <code>Promise</code>\nSend an action request to create a new card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a new card  \n**Access**: public  \n**Fulfil**: <code>Card</code> - The newly created card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| card | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.card.create({\n\ttype: 'thread',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.card.update\"></a>\n\n#### card.update(id, type, patch) ⇒ <code>Promise</code>\nSend an action request to update a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Update a card  \n**Access**: public  \n**Fulfil**: <code>Object</code> - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be updated |\n| type | <code>String</code> | The card type |\n| patch | <code>Array.&lt;Object&gt;</code> | A JSON Patch set of operationss |\n\n**Example**  \n```js\nsdk.card.update('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'support-thread', [\n  {\n    op: 'add',\n    path: '/data/description',\n    value: 'foo bar baz'\n  }\n]).then((response) => {\n  console.log(response)\n})\n```\n<a name=\"JellyfishSDK.card.remove\"></a>\n\n#### card.remove(id, type) ⇒ <code>Promise</code>\nSend an action request to remove a card\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The id of the card that should be removed |\n| type | <code>String</code> | The type of the card that should be removed |\n\n**Example**  \n```js\nsdk.card.remove('8b465c9a-b4cb-44c1-9df9-632649d7c4c3', 'card')\n```\n<a name=\"JellyfishSDK.card.link\"></a>\n\n#### card.link(fromCard, toCard, verb) ⇒ <code>Promise</code>\nLink two cards together\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Create a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that should be linked from |\n| toCard | <code>String</code> | The id of the card that should be linked to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.unlink\"></a>\n\n#### card.unlink(fromCard, toCard, verb) ⇒ <code>Promise</code>\nUn-link two cards\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Remove a link card  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fromCard | <code>String</code> | The id of the card that the link is from |\n| toCard | <code>String</code> | The id of the card that the link is to |\n| verb | <code>String</code> | The name of the relationship |\n\n<a name=\"JellyfishSDK.card.markAsRead\"></a>\n\n#### card.markAsRead(userSlug, card, userGroups) ⇒ <code>Promise</code>\nAdds the user slug to the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as read  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as read |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.card.markAsUnread\"></a>\n\n#### card.markAsUnread(userSlug, card, userGroups) ⇒ <code>Promise</code>\nRemoves the user slug from the data.readBy field of the card.\n\n**Kind**: static method of [<code>card</code>](#JellyfishSDK.card)  \n**Summary**: Mark a card as unread  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| userSlug | <code>String</code> | The slug of the user who has read the card |\n| card | <code>String</code> | The card that should be marked as unread |\n| userGroups | <code>Array</code> | An array of groups that the user is a member of |\n\n<a name=\"JellyfishSDK.event\"></a>\n\n### JellyfishSDK.event : <code>object</code>\n**Kind**: static namespace of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n<a name=\"JellyfishSDK.event.create\"></a>\n\n#### event.create(event) ⇒ <code>Promise</code>\nSend an action request to create a new event\n\n**Kind**: static method of [<code>event</code>](#JellyfishSDK.event)  \n**Summary**: Create a new event  \n**Access**: public  \n**Fulfil**: <code>Event</code> - The newly created event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| event | <code>Object</code> | The card that should be created, must include a 'type' attribute. |\n\n**Example**  \n```js\nsdk.event.create({\n\tcard: '1234-5687',\n\tdata: {\n\t\tdescription: 'lorem ipsum dolor sit amet'\n\t}\n})\n\t.then((id) => {\n\t\tconsole.log(id)\n\t})\n```\n<a name=\"JellyfishSDK.getConfig\"></a>\n\n### JellyfishSDK.getConfig() ⇒ <code>Promise</code>\nRetrieve configuration data from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Load config object from the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Config object  \n**Example**  \n```js\nsdk.getConfig()\n\t.then((config) => {\n\t\tconsole.log(config);\n\t});\n```\n<a name=\"JellyfishSDK.getFile\"></a>\n\n### JellyfishSDK.getFile(cardId, name) ⇒ <code>Promise</code>\nRetrieve a file from the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Retrieve a file form the API  \n**Access**: public  \n**Fulfil**: <code>File</code> - The requested file  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| cardId | <code>String</code> | The id of the card this file is attached to |\n| name | <code>String</code> | The name of the file |\n\n<a name=\"JellyfishSDK.setApiUrl\"></a>\n\n### JellyfishSDK.setApiUrl(apiUrl)\nSet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n\n**Example**  \n```js\nsdk.setApiUrl('http://localhost:8000')\n```\n<a name=\"JellyfishSDK.getApiUrl\"></a>\n\n### JellyfishSDK.getApiUrl() ⇒ <code>String</code> \\| <code>undefined</code>\nGet the url of the Jellyfish API instance the SDK should\ncommunicate with\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the API url  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The API url  \n**Access**: public  \n**Example**  \n```js\nconst url = sdk.getApiUrl()\nconsole.log(url) //--> 'http://localhost:8000'\n```\n<a name=\"JellyfishSDK.setApiBase\"></a>\n\n### JellyfishSDK.setApiBase(apiUrl, apiPrefix)\nSet the url and path prefix to use when sending requests to\nthe API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the base API url  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| apiUrl | <code>String</code> | The API url |\n| apiPrefix | <code>String</code> | The API path prefix |\n\n**Example**  \n```js\nsdk.setApiBase('http://localhost:8000', 'api/v2')\n```\n<a name=\"JellyfishSDK.setAauthToken\"></a>\n\n### JellyfishSDK.setAauthToken(token)\nSet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Set the auth token  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| token | <code>String</code> | The authentication token |\n\n**Example**  \n```js\nsdk.setAuthToken('799de256-31bb-4399-b2d2-3c2a2483ddd8')\n```\n<a name=\"JellyfishSDK.getAauthToken\"></a>\n\n### JellyfishSDK.getAauthToken() ⇒ <code>String</code> \\| <code>undefined</code>\nGet authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get the auth token  \n**Returns**: <code>String</code> \\| <code>undefined</code> - The authentication token if it has been set  \n**Access**: public  \n**Example**  \n```js\nconst token = sdk.getAuthToken(\nconsole.log(token) //--> '799de256-31bb-4399-b2d2-3c2a2483ddd8'\n```\n<a name=\"JellyfishSDK.clearAuthToken\"></a>\n\n### JellyfishSDK.clearAuthToken()\nClear the authentication token used when sending request to the API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: clear the auth token  \n**Access**: public  \n**Example**  \n```js\nsdk.clearAuthToken()\n```\n<a name=\"JellyfishSDK.cancelAllRequests\"></a>\n\n### JellyfishSDK.cancelAllRequests([reason])\nCancel all network requests that are currently in progress,\noptionally providing a reason for doing so.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all network requests  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| [reason] | <code>String</code> | <code>&#x27;Operation canceled by user&#x27;</code> | The reason for cancelling the network requests |\n\n**Example**  \n```js\nsdk.cancelAllRequests()\n```\n<a name=\"JellyfishSDK.cancelAllstreams\"></a>\n\n### JellyfishSDK.cancelAllstreams()\nClose all open streams to the Jellyfish API\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Cancel all streams  \n**Access**: public  \n**Example**  \n```js\nsdk.cancelAllStreams()\n```\n<a name=\"JellyfishSDK.get\"></a>\n\n### JellyfishSDK.get(endpoint, [options]) ⇒ <code>Promise</code>\nSend a get request to the Jellyfish API. Uses Axios under the\nhood.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a GET request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n<a name=\"JellyfishSDK.post\"></a>\n\n### JellyfishSDK.post(endpoint, body, [options]) ⇒ <code>Promise</code>\nSend a POST request to the Jellyfish API. Uses Axios under the\nhood. Requests are automatically authorized using a token if it has\nbeen set.\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a POST request to the API  \n**Access**: public  \n**Fulfil**: <code>Object</code> - Request response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| endpoint | <code>String</code> | The endpoint to send the POST request to |\n| body | <code>Object</code> | The body data to send |\n| [options] | <code>Object</code> | Request configuration options. See https://github.com/axios/axios#request-config |\n\n**Example**  \n```js\nsdk.post('action', { foo: 'bar'})\n\t.then((data) => {\n\t\tconsole.log(data);\n\t});\n```\n<a name=\"JellyfishSDK.query\"></a>\n\n### JellyfishSDK.query(schema, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, using a JSON schema. Cards that\nmatch the JSON schema are returned\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a query request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| schema | <code>Object</code> | The JSON schema to query with |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nsdk.query(schema)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.view\"></a>\n\n### JellyfishSDK.view(viewSlug, params, [options]) ⇒ <code>Promise</code>\nQuery the API for card data, referencing a view template by\nslug@version and providing its params and options. Internally, it uses\n`query`, so any constraint specific to it is also applied\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send a view request to the API  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - An array of cards that match the schema specified by the view  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| viewSlug | <code>String</code> | the slug@version of the view to use |\n| params | <code>Object</code> | the optional params used by the view template |\n| [options] | <code>Object</code> | Additional options |\n| [options.limit] | <code>Number</code> | Limit the number of results |\n| [options.skip] | <code>Number</code> | Skip a set amount of results |\n\n**Example**  \n```js\nconst params = {\n  types: [ 'view', 'view@1.0.0' ]\n}\n\nsdk.view('view-all-by-type@1.0.0', params)\n\t.then((cards) => {\n\t\tconsole.log(cards);\n\t});\n```\n<a name=\"JellyfishSDK.getByType\"></a>\n\n### JellyfishSDK.getByType(type) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get all cards by type  \n**Access**: public  \n**Fulfil**: <code>Object[]</code> - The resulting cards  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The card type |\n\n<a name=\"JellyfishSDK.getById\"></a>\n\n### JellyfishSDK.getById(id) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and id  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | <code>String</code> | The card id |\n\n<a name=\"JellyfishSDK.getBySlug\"></a>\n\n### JellyfishSDK.getBySlug(slug) ⇒ <code>Promise</code>\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Get a card by type and slug  \n**Access**: public  \n**Fulfil**: <code>Object</code> - The resulting card  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| slug | <code>String</code> | The card slug |\n\n<a name=\"JellyfishSDK.action\"></a>\n\n### JellyfishSDK.action(body) ⇒ <code>Promise</code>\nSend an action to the API, the request will resolve\nonce the action is complete\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Send an action to the API  \n**Access**: public  \n**Fulfil**: [<code>ActionResponse</code>](#ActionResponse) - An action response object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| body | <code>Object</code> | The action request |\n| body.card | <code>String</code> | The slug or UUID of the target card |\n| body.type | <code>String</code> | The type of the target card |\n| body.action | <code>String</code> | The name of the action to run |\n| [body.arguments] | <code>\\*</code> | The arguments to use when running the action |\n| [body.transient] | <code>\\*</code> | The transient arguments to use when running the action |\n\n**Example**  \n```js\nsdk.action({\n\tcard: 'thread',\n\taction: 'action-create-card@1.0.0',\n\targuments: {\n\t\tdata: {\n\t\t\tdescription: 'lorem ipsum dolor sit amet'\n\t\t}\n\t}\n})\n\t.then((response) => {\n\t\tconsole.log(response);\n\t});\n```\n<a name=\"JellyfishSDK.stream\"></a>\n\n### JellyfishSDK.stream(query, options) ⇒ <code>Promise</code>\nStream updates and insertions for cards that match a JSON\nschema\n\n**Kind**: static method of [<code>JellyfishSDK</code>](#JellyfishSDK)  \n**Summary**: Stream cards from the API  \n**Access**: public  \n**Fulfil**: <code>EventEmitter</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | <code>Object</code> | The JSON schema to query with |\n| options | <code>Object</code> | Extra query options to use |\n\n**Example**  \n```js\nconst schema = {\n\ttype: 'object',\n\tproperties: {\n\t\ttype: {\n\t\t\tconst: 'thread'\n\t\t}\n\t}\n};\n\nconst stream = sdk.stream(schema)\n\nstream.on('update', (data) => {\n\tconsole.log(data);\n})\n\nstream.on('streamError', (error) => {\n\tconsole.error(error);\n})\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8d86285be48aff12a56bbaa30a16405f774d7f02","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run doc && catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test","postinstall":"if [ -z \"$CI\" ] && [ -d \".git\" ]; then husky install; fi"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix","npm run doc"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","husky":"^5.2.0","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.0-to-ts-8d86285be48aff12a56bbaa30a16405f774d7f02_1616748646278_0.42524656779420633","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.0-to-ts-398f170062f5378d02f142fe8969a1cd96f72f3c":{"name":"@balena/jellyfish-client-sdk","version":"3.0.0-to-ts-398f170062f5378d02f142fe8969a1cd96f72f3c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.0-to-ts-398f170062f5378d02f142fe8969a1cd96f72f3c","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f9ead334fb024ac11d5e4ab4e31086835f09a522","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.0-to-ts-398f170062f5378d02f142fe8969a1cd96f72f3c.tgz","fileCount":39,"integrity":"sha512-OuOp8sHpEleoxuPudPkQNfcSngP5MN9kJnV1QZBJHT0GfQvsRA5kFR0o9nBEEvu/tRynJ1/WzUCJomdJKONIRg==","signatures":[{"sig":"MEQCIC2bmEt7rZDmyaJlzdB+aIzlDkk7yiNohw1ODjaamQDvAiAw33sB+Djg1q4g/8raS192by5icMgmw3ziuyDRzZE8zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXa0fCRA9TVsSAnZWagAA2HsP/jFBYY2xHWUy8j9DA8cN\niwy4+NoQq8FT/oWOioVQ1jkos2W6HJP/4wB/vjmRYC0Q/Kzl8FNNxk6MzU6E\n0vuAgOw8vlsiSc+33LcfgirglP1Ata408sC0RbVLrj3rzfNoyGGFFjsfaD5c\nXqEAqKS4aNAOxk8gFNkfZ9LXHL9Ju0fQni1q+QxbWgqjPyOO7TV1DaNcIjlV\nKM/Ff/WDUJEjWX3JiH9Q1U9v64e0yFn/w2saedLm98l1NRhsE8LSzXzt3ws6\n4wKRy/LgxL+qikXwKuhf8n6PeUylLN8owaTWtm418LqAcvyggpIbgPncQHG0\n72rqgs/s6hw9Ppvbtbxs9WwSx4wZSCupGmYB5QTVpIBAnAgweJ9+xxn2sniw\nb5zxBdDOXax5ZoGs5UUazS5Cf8JAegPlXuPbr2MIC1NPJp68JpKuw0DV16sQ\nYFjm6zhehw1LLQjcG0AJ2J7qYL/zwkM55ggsxyzuxxCgqh/UEvm2EuSSVO5V\nx6fAiwIAKpQZ0IevVyJKK/XPGX6KRK1IY1OLf69xXfA6TdX8h+Ab9y3YNhSP\nE4Awaq/C7j+8vOUw2ISsfU7o/EgCWabJnLB3OzEk8nrDX2FXa/WV+MIwVU+7\nVEJN9s9hcjYNettwgssw0kQ0Ml56BqdGKXZc7qMe5zpfrU5vwEpMDfCXi2Ii\n9mB2\r\n=IMkk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"398f170062f5378d02f142fe8969a1cd96f72f3c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.0-to-ts-398f170062f5378d02f142fe8969a1cd96f72f3c_1616751903322_0.8440299722306326","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.0":{"name":"@balena/jellyfish-client-sdk","version":"3.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.0","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a7bebb75b75419e2317817fbf011063b9320aa33","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.0.tgz","fileCount":39,"integrity":"sha512-tRUZZT+azHZQbn3m5pZWs0QIDrF2JJ5hV1r6PGs2j4sxNqJ9IfZQtjQ1fNxJQXejjt9M4eb4jIPvSEZ1K2C3nA==","signatures":[{"sig":"MEUCIGLbv4VoYODpJd8AWyQZQLqa13vNCBW4IAOE6nkzAOpfAiEA8vKmMtB+0h9x39m6cx9c8LvP5idinlVLR4PnVdFPi84=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXczkCRA9TVsSAnZWagAAzRMP/jchI3b+SDnAq/xCgwVx\n18yIiZ5sCKpsrf+fpBZyJPKb2AFobb+m8QoMMmmmwS05Thb1QfHegKEUQYni\n1drwrOhbjIAPZ1eNCCoFiLPByQDLRzDGydDyOe+DZk64TVcn6bfc5tcfZnrX\n6xZ5vlvBbdd6P6qkiIuo7mqKVRxM5zBRj46EO6oBougzyv8YtuoBQcr9BhYj\nIcBzgaeSG/rEaYT0kRN3cfUCsTvSzZ91SiIlTkD/Z1PS9MOq768Xe3canJKv\nb4aHulRm7vPup9uqQ/30ZFlc2X//e2V+2HvdkSLHn+1V/45QdPa2fRkDtpTl\nnbvQodCR1aMsTEukHeDyfz/DhwQT7QVBUEGxol5V8ttya5jGBzO13DkJeuY5\nUSLIKC5MXqZfkTivSqFNFrkpBhUlbSkTcaBBJErjiqonrHqPpPnci6SF9ht/\nvoWB+XzH2nS09Os1A/D8i3zqveggR5g9UoSxONMbtu+6JeUAK+i80huE0zFc\n90Wajr3Y/r8NdrD5jjhyz7A55SahP28DkvlAQlHRklTK7+njQVROTBg7G1be\nKEUMRiijIYvv8D2AdeDb2QjQbpFjYymfw3iCuTw9tEq7b71Cb2OripsTaHQd\nuh2BN8SVzNVhooc17R5EyzIEFlZBZW3QZurFExLCKnjzwHXi7D7PYw0Wo1jv\nyxUZ\r\n=oBRV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c59f54a6f47de4df3c728e3aa3480cecf9020c9a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.0_1616760035872_0.19808222880473658","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.1-renovate-non-major-54cb0cfc49d9518978df75b3a9fd47811a9dc1a9":{"name":"@balena/jellyfish-client-sdk","version":"3.0.1-renovate-non-major-54cb0cfc49d9518978df75b3a9fd47811a9dc1a9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.1-renovate-non-major-54cb0cfc49d9518978df75b3a9fd47811a9dc1a9","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"494ebd5b0ebb80881883d097689312234bc35cee","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.1-renovate-non-major-54cb0cfc49d9518978df75b3a9fd47811a9dc1a9.tgz","fileCount":39,"integrity":"sha512-P5PMxmPx3ImgqAka+3l+sBfuogRLT6Q2Xd2lzBOEXR/1PXW+7STznWR8/FzLQAeBzgMl/2x7AW1yx/rTOV9nqg==","signatures":[{"sig":"MEYCIQC8rQ6IXvKvbCI/uRmVnajMVtLbbm/DgcAl36vGBLvqEgIhAO+MSPoZrslCqdnkqX0XMjy1KV0o6Vtm5pHs3pIYiRt1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXc3MCRA9TVsSAnZWagAAXlEP/14f0kO+FfoqWE8d3mBy\nkiZfBXBueJeWdCJyY4x8QiAa/5WJlODNfgYg6ug3KJsA9ha4GZ1MEv415Nk8\n25HI07AI6oQTH3qma4g38hfS9Z+5+mskurJHZQDjcgcX6zfn9aDjqMKz/Ysd\n8d1nSvy4Lcz2qSoqQJBmBi6dqbJVmISN7I8gFZU2WsrUGAiOHr7y3TY+ulXP\nHzYCT+PUa6KWvmk/hOPCkNYk91xFMSsloocHVgS7ErJS0o8m3lLNM1LIQ+Ff\nU+JjAhqJld1+es5rQe+3qM4lwFcJ63s01lbcHLjZn3C5mqpdocpEMsDI/CVt\nhFNGzLIxMDEg+TGC+SMFyIAT+RfmC+UI7Q/X1psSnHqmjcAeHoh96ILLRMK4\nSR4pVPmfrLSCWrm+vl2OZkOTufp91bnvEY24PxtaCuKORw9xBBQnrROEqGCx\nvAIyWF5IWEJjjFkeD1kzSXvdUurSTaS8f9wwmofIOCMspl3BI1zP6hakri+F\nmGJj0n6SjuglMxTkf0TwgyGsyRAl7C+Yck/2CMZb4BlYF5fLTwVgp+qRmcwG\n4PtBj460fDuj7oGLI7GadpC+Q21GpX/S4tMCD9xOpqRR5b7NvCYMVSPKNigu\nbUn4yOE9toTbrkjzlS5mVpRjtDqVZ/qvcjQChTm6s15Kak5UNR03ysTBfFSn\nnM9n\r\n=/U/B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"54cb0cfc49d9518978df75b3a9fd47811a9dc1a9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.1-renovate-non-major-54cb0cfc49d9518978df75b3a9fd47811a9dc1a9_1616760268020_0.6543970489999997","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.1-renovate-sinon-10-x-88d4a40f16902c115eceb7d34a46cc6967db25dc":{"name":"@balena/jellyfish-client-sdk","version":"3.0.1-renovate-sinon-10-x-88d4a40f16902c115eceb7d34a46cc6967db25dc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.1-renovate-sinon-10-x-88d4a40f16902c115eceb7d34a46cc6967db25dc","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ec7877fa7b97d808fe9640ea3367caa7e0589004","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.1-renovate-sinon-10-x-88d4a40f16902c115eceb7d34a46cc6967db25dc.tgz","fileCount":39,"integrity":"sha512-eSDP8lbEM2xzHo5q+FQrmc8oyIi9TqiROS1hFaSZl1NO1TP0bjPaiXgBti5OxRo4XaRPmADh5Uyc3piRKWoodw==","signatures":[{"sig":"MEYCIQC1HJA4HDgyQYOq1u7LHoaRtlfeIIkZq0r2ZmlP1yOFNgIhAIZHiuJi/x0PB+5W5jBx9ywGGyMrGouO29r/BmZRATFE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXc3ZCRA9TVsSAnZWagAA9VUQAJ/QqPz0kUo4lcAWtHH+\nbnTF0P2FnuMkGEp127DbGMQtrZ41p9LoPeW5zn+vxn5DMNxLx39tkcZHTuBg\n5roF3PLDdZsWHRJhIgC2ACmwEn9Am/n4zP0mt3VPQe1mF4taSVrbrd9Mg5Hz\nNv7+Ylb9A1PPtET2U3st8fxLlFIWEaDPko9oK4FlQi8KN+5aEVMIb4oGQ+Po\nSrWo026fKc3mhzU6Dhs+QXa2bbXbS6hMjVqjFz5B6HhmoOrw2nCzdp7PpFO9\nOQ6nZOxa/8JLkre65RdkmaMG3McAY+1Z3ySmQ7L6Ddu0bt1hAcnJ1rzhM4h6\nQ5DXw5LF6DWMb47t0aUIQUw0sZihZWEE/hydRKRUaOCfu2TrrjluO/4CWyb0\nOg3CqtuZGN5JBB5jKisj3wrItXQM9zcGkxWbPbuKX1gfb8bTkM0boei/pf1I\nxBzWQSH+kZX56mRwc42AdgB90OSTRci3ZaeuHvfdC2FUTZZrHW8I1uzXCK0C\n8fsADpnks1htZLGUEL+0IBGomobtCXWQpU0eL7fqtD+8jA9Gp6YOYV3leaqb\nTap+E19vj3C4vc4YIPO6AUT6zdKtmryQUdNTm03FuZlFsXgMW9ssm/zpfLAL\nHRS6yT3vJlPEfCxtHHLfADGov8Mk9lO2319csORL7ncPfaTfrkdAnSUao0+U\nV7nq\r\n=aGdA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"88d4a40f16902c115eceb7d34a46cc6967db25dc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.1-renovate-sinon-10-x-88d4a40f16902c115eceb7d34a46cc6967db25dc_1616760280756_0.8172631839193505","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.1-renovate-major-socket-io-packages-800c02848e50222bf03f87d8d68d4a68c2a8107a":{"name":"@balena/jellyfish-client-sdk","version":"3.0.1-renovate-major-socket-io-packages-800c02848e50222bf03f87d8d68d4a68c2a8107a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.1-renovate-major-socket-io-packages-800c02848e50222bf03f87d8d68d4a68c2a8107a","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bd6a70211a545bd5a532770d16c09c45bc142251","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.1-renovate-major-socket-io-packages-800c02848e50222bf03f87d8d68d4a68c2a8107a.tgz","fileCount":39,"integrity":"sha512-S74i5uk4klcBbkU1y2FlcPA482KA5WgZd6arbNuYQr0FgGNVKh98bTtSXB3gzAXWz04K9aIeEwz8Kwvxl84MkA==","signatures":[{"sig":"MEUCIBJNjzgZqcUzwOc0TKBfuy7oulGr7vwoCeAEiiAaV135AiEAi7HKAwmwhnuxSgSNy0eFz7oqShwFFyvhx3jOsWotfcY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXc4NCRA9TVsSAnZWagAAgU8P/iCp4Z60KHu2XhgB54Yp\nkCH+Il4GuwOtijhfhSLy+5ib70Hr8s/SuYmzKNPlQNqKHn4zNCJNXJzbeXDL\nhAp+g8Qrd8vMOHosRgheBEK5Es/wE40HuGWJtCJZUmjiI8+ohOC/9pe0d2y6\nq2Wau5ibUzHgrb0dCtiH59u3GrwrrYih3tYamTO/yhvl1q02ZnoTc0RYqrJr\nFeXvPIvH0ciTLQ32pIWMzhtkgPF+ZiKPnqVZqo+LBILjIncP8D8Kx7go1/qI\npwqLMi0jgSxPYsnWNcCCBcy3jje5cFvfwjx5P5VUcF2wy3aXQDoRekdOHCfS\nr8biMefocN44VAzrjYWNbfqebKlg8uWZNxXlbxFNDY59wfa9mZzAY+RHPRxR\nh0sbWHC3tcbvOo9DE79Cgqor4kgHoLPxZy0vkjP+vfhGzlZkkm1nLqIpzTIX\nr2nrKXZuDod7Pl6QpoTGFsGSdqkS3yRR/92V3L6qpobOkGYu67YiRs5nxRst\nr8FIEvgyjSpSiTGwTLBnP/FPKu7f5DdhrK5UoOkAX2cFgMTuA0eGkHLuG2/c\nnZjq6xlgQ58JwxlG7H2mHTnUvrpTrRO2sswJKAkT1eUmcAFfKPU3uPBFNMgR\nAAE0aQPkLpG4L7CCxLC7EOXZpJkdSmt2uXXDHDJKMOruXmBdIQjrAM3nXvtO\nhJr2\r\n=DdZE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"800c02848e50222bf03f87d8d68d4a68c2a8107a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.33","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.21","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.1-renovate-major-socket-io-packages-800c02848e50222bf03f87d8d68d4a68c2a8107a_1616760332791_0.5658868125787269","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.1-renovate-non-major-ce9574caf4c02362714089dd33bbb0f4fcf92543":{"name":"@balena/jellyfish-client-sdk","version":"3.0.1-renovate-non-major-ce9574caf4c02362714089dd33bbb0f4fcf92543","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.1-renovate-non-major-ce9574caf4c02362714089dd33bbb0f4fcf92543","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"02ce0e9487fc55225825fbdce89e7766c2d003c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.1-renovate-non-major-ce9574caf4c02362714089dd33bbb0f4fcf92543.tgz","fileCount":39,"integrity":"sha512-dYVizSTS/3dWlgnMiMPLWNRxD0VUdF5BDLf5Zg7z1V4rtt27jUWPTO3LXvsxE+E4KmcJK6kdLTwP6wGzPsYXaQ==","signatures":[{"sig":"MEUCIF/mo9O81cy23jhCVFtJGt3XaKaz0YA0TVXJ4zD8Zyg8AiEA9TRJ8b01WRzKsQSbvRQ91kIa/3L7KfMbiGXkAPDlGkU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXc44CRA9TVsSAnZWagAAw0YP/3+0OWnqHRvRPt6j4nK0\nUkJ0sIzMQHgp0n3ZeXbN55uzGVBd/KJ4TEievPCIFhiVFmcs9u/trBPztgZS\nRg+mdQxx1nbijJFx6nbjuUg0yjv8RvGFnyuLYhfwNgZ2PtSzuRDyHMsdVokB\n9GLsm0vJvEawI3AUTHoU2ha2I6hPzhFXCbq8H5tpDA2pRJQ+2cSoHNE8hVtG\n3qwJKTLWE6WjxV++rXx1b2nhGqaYtMnJkdsofwT0QYFAvi4HeB0S1dKU4jQZ\nWEINRaXaFs9/XNEgNv4T1zI5CtVIpJfFXJrgQ4ulVl9w1OklMy5vqa/BjK2d\n3OAx66AUmAFXt9k5z1yCS3v7c8JFiWPjtupb1HTUL0Z+Ep1N50hI3afjFGcx\nFx+aWTdsYnYfrBpVESJ5TQiEjoJHwwnj7YQoxOSyWO8KYm4Ow7XB3AF9Fv/n\nkwNJvgzgAxQWLFDboxIJZrioyBVpuB5M4wbdZ5HHp/wgnU1mCIEKz79VPJ5j\nLnNTe9CFlEAaQcU2hLuROZUo4BFJV7TZsDhvLxvEMr5cCntvZOoxAhS+Pw3c\n3Z8vLD0Eofob8c/0MNqeUYJ1ljOp6ymQxJGixphqL7usbFE3oSAcflH9hGNa\nkxbJX127U2RUgjzvq30KiC1x1o2AXGTQetM82I3cTlmzCizVuRNlLbjOjaxX\nOYFe\r\n=YlkM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ce9574caf4c02362714089dd33bbb0f4fcf92543","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.1-renovate-non-major-ce9574caf4c02362714089dd33bbb0f4fcf92543_1616760376240_0.19295904506594264","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.1":{"name":"@balena/jellyfish-client-sdk","version":"3.0.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.1","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2719a81b4b4f584dae8da11642bd5bfb5da524f8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.1.tgz","fileCount":39,"integrity":"sha512-6LY3tk4fn7dbNrF+SDJ8Xw1exE83CZp8CHNwZt8Nlxqr9Ozv2g13vjeZlicGTl0mY2Yi5lXrAKDoFtfH5OXU3A==","signatures":[{"sig":"MEUCIQDxwhAVnywSrhtV512u4sUXdfk+PkJpncOowGzoSQPXxwIgFENxR1GbWmXRV7A67LnaGW9o5TodtaZi4XMN74hGZ9Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXc7/CRA9TVsSAnZWagAAAogP/3jZLSw8OBjcL8hN3Sgf\nkO9GljhQojsiq4E8eUM9a6GSTM9ydwHFtvMgJaiy2ziXkiCX8lRBks5Stf+0\nSXQtv6Y2g91ChHr1cg/Tqdlmfc8G1fFmkgE1J+Oo6tY4iXezyEICKzqtIPVL\ncQEMvR2tjNdVc6UGNFtcILInEBy0dJBjGPkrmhB872E467LBRl1iux1c9fC/\n0vnxdobweh9TSUq1DC7pa+rG81G7ISwVeaa/m4IkA99AE142k9NHyKCtdO1H\n2G1mGmRzmeoQExoTi1GKHP+6rhiJvVvD/mQRk3bnVy9n5zrDN4zGcQplPaSE\nPdcfhpgKiWd9don7wPfz3uHNujSWZUBOQla9fXnzczStHtmg0QRio85zHTOM\nBJMAvuz9NwlJDlOTEahBqqGyCiDewSLWAVZB0P7MPZN/DbTVUq5EQMw71pJj\nYJwY1bXwoOO0y2ABokwzG/kUon9WNSMm/socKP0dk+8vDnle2/YKeKyGw7Wn\n3jVP+6M+T/h4XXWIhZmVzxbu9LHe/bI2Rvx8/Gxmlkl2/9XWig9nbaDbaX8u\nJa7qpkSR9B7ZAX1IfuTdkQj/zLUkcR1/99sH8w57gqEzd3F2fUfHQrwcY4w7\ngV5A/PHvhpo6aaU6nMEYnYdq61brTZ5NRM1z0qPh2gtJvmFdsGVolE7Lghee\nD8F4\r\n=RmIq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"df9297aba943b670fb85046b5d1817f348c55ca9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.1_1616760574131_0.17528880282162196","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.2-renovate-sinon-10-x-d7c590f242ce10387fb56b1efb29c96d86b42b1a":{"name":"@balena/jellyfish-client-sdk","version":"3.0.2-renovate-sinon-10-x-d7c590f242ce10387fb56b1efb29c96d86b42b1a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.2-renovate-sinon-10-x-d7c590f242ce10387fb56b1efb29c96d86b42b1a","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9ee0a75b0e69bd9294e4f122187714c5089956c1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.2-renovate-sinon-10-x-d7c590f242ce10387fb56b1efb29c96d86b42b1a.tgz","fileCount":39,"integrity":"sha512-8pcIU1tXE/t5+EpVekOiSrlVoByDJbbaKbv0UZUOWEDyceY4p1nY+u1KnoHgxv7nV0qZiD0NYeaws6IOBJgJPQ==","signatures":[{"sig":"MEQCIF9q/fnoQtb1zIWxb9GjmE61CUXSHd28otX4fTZVPwvVAiA7E20G8mZZrcEMEqPo8caR3BZEJCvSCRztcqXV47NSfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdAiCRA9TVsSAnZWagAA0vIP/jwe4oxKwKtwAWjKlnid\n4x1rB+RVOjRrR/AVUobpkcqJ3vy6aaMGuHcy17tYQH+XWpfn42xT2vJ0AZ3w\nf/i1G0aWdo2N+DpyrTQRv/z1wufKqxzqu523FRwQSDwZSOpJ1aYzl/bQ4ttH\n3sjjN17gThYRJ9/xwQ86WwFIqKm942k4ZLAzL5y/hWNl1qr2C8bfNVgy6yRC\n4fUXLxy9BYxpQcwV2FmEaSMsMTj63cCm00k4q3Xopg/9w5Fi0Izp301xfRLZ\nFLeypuMXPPioj7IOs1nHySkFRn3fxzscMrZpJDxxR+d71v8ao070TRkHsRU5\nRGm9FXLMbtHp9I5IzMe94DxOJbmWNYGcp/mea0CzOKJGHq4RbrE34JO0fGrY\nBS3Y6hnxcgfgUghzmNPUiMo6WsW3Ssb9JvFkoIcwvAmwQY3NHMWKP1SYI5dr\nutZ3CDD1XuFexmue33aPcobl4fPZTZzjOwdU2TbcHe/XGel5KWMTjMoU10We\nJxAKqe7aym6W/OFDgv4B1XneYOf5rCI/qdYrTUJvrgI051PIbmzbEKe7uVhY\nQpGYCmdcdAJFm1YKCZkIDlPexstcQI31aBJZLtaL41MVJVlsenTnF1SWSZHX\nYJHsdA0B2bqReLMdwcW5xnAcbHQpKLhi8tRV8IiDhL7kJYPclYgpg69hGuE2\nDlfH\r\n=BSQu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d7c590f242ce10387fb56b1efb29c96d86b42b1a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.2-renovate-sinon-10-x-d7c590f242ce10387fb56b1efb29c96d86b42b1a_1616760865719_0.19326013379350382","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.2-renovate-major-socket-io-packages-ed52df6c6976f61933e4e2b70b4dbbb9a60fb247":{"name":"@balena/jellyfish-client-sdk","version":"3.0.2-renovate-major-socket-io-packages-ed52df6c6976f61933e4e2b70b4dbbb9a60fb247","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.2-renovate-major-socket-io-packages-ed52df6c6976f61933e4e2b70b4dbbb9a60fb247","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f7bbff4c08c6a4171b3bfd0c7d55c110e3c3b957","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.2-renovate-major-socket-io-packages-ed52df6c6976f61933e4e2b70b4dbbb9a60fb247.tgz","fileCount":39,"integrity":"sha512-vytNRwfPLf7Y13i9qRN91LswJpnAXs23NZ0t1T1FAj/hA2lyOAePxQ7Q0xN8R/Reay2QsMUBfgI0Oz3cveoBFw==","signatures":[{"sig":"MEYCIQDitL0pbeM9yTpj+4SmzPrvc89x85psHX8dQbQzpgEs0AIhANDP9qVpZE54UYY9EEYREaENfBmuz7fRHZS8kVsW/F2Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdCoCRA9TVsSAnZWagAAWtsQAI8tqICELsa62GV1GZ6h\ntlaaUgAxb71cOgPORm4vy4tW7xljTTwLB3hYkL/DeVdcGfuRSYgV1Vpk6qus\nBU3lrKlV3riPBe9z69tbhl7iw0X+6Y2+L/g4V/gJuuDLygIX3UDWDF8DaQOR\ndSenVseifJGthqJ4laUkK/4FHLvrWV8Igoib3W2f25+YjBrp0xiexbYVla5k\n/1vJ4y6KFHtG8H2jZEcvjd2/eYy9PuDQioNKRRxCSkiJVBiGPKCjDLjYQkY1\nigOewxl5Hl806tziBkEJG/lC2CeZgxyI86wxKtzzqSaz4TnciEIw33Nuz8yw\nYsbWt07aV6mQHK/eDCE62WEWv9YNMbvk42+UaZVBf1HPhW50uoycMKQUpNaq\nrvBfT6aHOf2pfOOdvdqcEhVnSL9A8auqiicn0jDY6jAJGD4qCDvI57IDtu0L\n37wLcYntlpCsGmMf3n3z6dD0rgqNCKa7FuMqAsEgHs5FlCd+qLO+d7rS9CY4\ncNjncnqKB3hOzVrh5ds7xMm/vIJ/jAuyOd6RmRrMP49+gFDq8d25zI7r5wKx\n3fmOCaJR+QKtGKeKHjykbIfeQhaleftn7jpmqd0Thz6jpxS0dg/fB3FoQJMF\nCeTHJLKqO6WRNzMRvO5hcJf0Hgu1UU8QBlz1THMcqFNoXCisnggBvIQHclN6\n7/9e\r\n=bogr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ed52df6c6976f61933e4e2b70b4dbbb9a60fb247","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.2.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.2-renovate-major-socket-io-packages-ed52df6c6976f61933e4e2b70b4dbbb9a60fb247_1616761000007_0.9293039142889663","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.2-renovate-non-major-97f0b883c9c15a4700f38def3497495ec859eb0d":{"name":"@balena/jellyfish-client-sdk","version":"3.0.2-renovate-non-major-97f0b883c9c15a4700f38def3497495ec859eb0d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.2-renovate-non-major-97f0b883c9c15a4700f38def3497495ec859eb0d","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"369d8102943dd68a85761386916cafee0465f8c8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.2-renovate-non-major-97f0b883c9c15a4700f38def3497495ec859eb0d.tgz","fileCount":39,"integrity":"sha512-JmQAHV6K46m5NUCIonXmxyyYWmvse50jbBSuXOO20nY3MWBOaXKktDGTXReJgZdU/iNZQvHqlpG4tjPvoIMVgw==","signatures":[{"sig":"MEUCIQCiuyPIBm6u7lI1Z/xWE+W8XhtUffowJeby4l+WdJ5DsgIgaQYUKEEimAog5Du9yJqxy1KnG1C3Ih8//SCZg8DS5kQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdFhCRA9TVsSAnZWagAAT+wP/2s9OQqVXhc28cyMoL8C\niPu7dz9hN1ESYzfAJtHIVvxLRCxb57hPziU5qzDgDUIjVpRWq7B3rnLG0Gqg\nB6sWfEz8rMJpZth2ycSaNiBSnlxB0VqiJfQ8LDZV6yXluCo0IbdvFXdL7QZl\nZuUrfO5IN7QR7DPXEvRogWjENISamhTv3ZoXr3Flw7LWRzU4qqCVIKJ6lXso\nKYDBEuUYABAqVXmWiFPFD2dvLVEqBN8/GkjUBo85O6CWqioq20/HoTtPM+os\nHKpzaDsjXFiGTdS/UeqfR1s4pZTYoyn68f2ftmCD5ODEA93hSQxl72GxGUZU\nqSSAIUKK7n592+pHAmostq9/H/M6qaDLO7NlYnqmd6ti6NEp5mhxkcxXG2/H\n6jnmhdv0hFxZdrYuoAzub6EPCl7z2CMZw55iec7HC0ZIkBUB+hyRExobmhdd\nvbxKc8lox/+mS5wXic+hM9JxhFzpym/aHhhPyipx9KdJeT3iEpFMhlf11erF\nyxx0iUur/NXIVjeG93tTKSWjL0y16O3KqGnuS4zb7GtczlcKMBlUvQo8uy5L\nTADFimqPgW+EStrfA2LXnyCDa9xLgGKXTiqSa01H9Fbyr2Yq1Hr5+JO7L330\nFVNNUgaIsJtBFg6SpdVnEsMo7OuRB68TplmzUUNHNnbisvu+RWD+QLP+GOTJ\ndGzZ\r\n=ah3c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"97f0b883c9c15a4700f38def3497495ec859eb0d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.3.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.2-renovate-non-major-97f0b883c9c15a4700f38def3497495ec859eb0d_1616761184706_0.41876159818731695","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.2":{"name":"@balena/jellyfish-client-sdk","version":"3.0.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.2","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a7093ce6668b9c49e314744d650fc495f8b5cb85","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.2.tgz","fileCount":39,"integrity":"sha512-P1wScwkjB4FzGRg5ee8N6YqYfBlAklikeDHIFoZZS+oc6BzmZFAioZSX8I6Qr8HbvqJuLLDWOUXZNBkY6VEYbg==","signatures":[{"sig":"MEQCIHV8O+MVFhxoUuh2OJhRXqZDZ/x1kkQB5gyt5kME2VZ0AiBnMHUBqXj/nftp4tPW5SPVyJ93M/isfLSfO+qrxEcdIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdI7CRA9TVsSAnZWagAACXAP/3OSrXW/RpeXBPcnz6ih\nCZxlyG9bzWHBodSDi6ryBlq8+BTDjA2v0zLU+jeZjpkQDDT2I6JmFB2a/fhQ\n8SRTXzTK104CE1xdc57eOLfhqK+QBxtcXyx5AsSmizmQXPIN4jc3t26v9ZDV\nSGeUhBlpyCwnq6Qkr0u2MEpIG4sfgmGoXUtnHWZFiKyL5bzaAeuEjJc0kHgV\nZj9B/AGtLAc7do868+31VHKNieH/Tx95K8Ncp7+Aq5IH6WzT80r5vwScyd0J\nmY4J5dSAOkMqG5m6JyhQGZb04IMSSWY9+slf4g9wq97BDpSfuZuIdwQZ81tI\nAYCEh2L3L1cJ3Lq2w52GZVbsdeT1531+NhsOiRNOVw1+Ef7R9CFs+evvBMPZ\noYJERYvlqT1miAk2rZQFV+rdjana9TVPK8vJPX7lP5sskkMcCZbXGDLRhrWH\nYmwVdeTCHdSKAhSnOn0i8f7RuBLGdvPF8G6StzYU+LmfrEdiJD68ABszknW6\nMzt5INkfoWjZ0jNMFDikUitmJPwXvWaUDpQ1KnIX9KmBTMUrcKIaHIxuPioF\ntEG3Zs4cHNahZtVC7pFukV8V3oYuAbgysWsxgOoUs8SiCEXVRIR96t9Qamui\nqetxfX7zXtGKlwG2/6OEO1HeloOflqhNLvdgedwaEqBuHv+TZPNzAbGDkboO\nx0RL\r\n=gBcA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cd40f18a089a1183eacb85b00a2cfa0658078c99","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.3.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.2_1616761402699_0.64149583037943","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.3-renovate-major-socket-io-packages-3e2b8f4143402e14efd701a9c33faa42c7c9ca0e":{"name":"@balena/jellyfish-client-sdk","version":"3.0.3-renovate-major-socket-io-packages-3e2b8f4143402e14efd701a9c33faa42c7c9ca0e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.3-renovate-major-socket-io-packages-3e2b8f4143402e14efd701a9c33faa42c7c9ca0e","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"797d6516bb1387b5a7f45847b9ea77cdf2cb66dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.3-renovate-major-socket-io-packages-3e2b8f4143402e14efd701a9c33faa42c7c9ca0e.tgz","fileCount":39,"integrity":"sha512-PKaVD+lS2x9fTyrg5myIQcYv4JQRQ8GXS7iwQu6fNL11yjBI5nts/d/7hMd+6v4gl0eXrv67OET4GKPgpTPu/Q==","signatures":[{"sig":"MEQCIBI0OHDqh5SbbEX4kc39xONEXqtfghzMdrDRAE6/DeGcAiBierr1gFvrXmGaproNiZEaxGSu3bIG1Z64049SNQld/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdMeCRA9TVsSAnZWagAAheAP/3N3aWdAUzbX1MlKlkT3\n+Wzyc7jBmL357GDUD2e6jMP2F/mK/YapzjdGRQ7141wfATltR7ij8cAPdqrZ\ntqCn2lgYkZZ5IegSK9NpVjwMf0mNFr3UKW3aGcdbZB+HN5HrxeLq2o5q1Jp4\nrfaAsl2wSbmUK89GaZQH9sN/g0xACdCshTNxhSFDGwGbfSFp8nPmnHtY/yFb\nwG5Dlfw3ZVG5rYZ3u4AaIyqtttJpMF7EwauyyB2GT0bm+2w2RIfsnpxXmwTT\ngizIIry5icXiGZMh410bIjYdDQkxz9e6lGjVgA1nVKsvqfHrztQ97R5lB8Wv\naOUpvF+ApAniGBccgbiwH0vP5gjRcXwe4fWkiFkZNiHlETegntHq05uUCjT1\n+jSr2pjQSkus3isdpNFxWUrpwn8nnVhoxj5BMwNqfl6pzM4jvrIYvh/5pB1N\nJ89GCY/vlBWSem0m+lmAftCat1tZ3p6DRh/vxqvFhkSe9Hxm1p9WvmkfmiP9\na6LA6NzmiRyUcISULw0IBMOrvx4YKs9eR10FdebK9bMePq0lJkELwvAFspZZ\ndRD+DZavOf9s0OZQVqrmvBex3FPVZHbAR3ugmMl8kiz/j4LPSivZeTB5LW3P\nQX2UJWMf68cI1B3gks9Bv/bjarUGNVlRWE0KPsGCw+4PvT9Qt2RGRVFzklMH\nilOz\r\n=oWi6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3e2b8f4143402e14efd701a9c33faa42c7c9ca0e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.3.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.3-renovate-major-socket-io-packages-3e2b8f4143402e14efd701a9c33faa42c7c9ca0e_1616761629863_0.060888144349383166","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.0.3-renovate-sinon-10-x-3c7070d7c5091fe1df049ee9a90dbbd85bcb76b0":{"name":"@balena/jellyfish-client-sdk","version":"3.0.3-renovate-sinon-10-x-3c7070d7c5091fe1df049ee9a90dbbd85bcb76b0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.0.3-renovate-sinon-10-x-3c7070d7c5091fe1df049ee9a90dbbd85bcb76b0","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ac020da2c79a5ecd4c7081de13a29ead18746f23","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.0.3-renovate-sinon-10-x-3c7070d7c5091fe1df049ee9a90dbbd85bcb76b0.tgz","fileCount":39,"integrity":"sha512-pFMs2hv/VH+fsOHMocaWSAEhGgff/F2TpTKtk+wKnyYXYVe6EF03JCaHDmZoi4JR3mprjiFhe0biYo4ARK7uyg==","signatures":[{"sig":"MEUCIC3vd331Yiwk6WRncJl4zLKCJ4bDvwN4DuqqZeWKSVbeAiEAt5orxHU0vnmnbvK1bV2tsy2YHKjzU/FOG9N/95k8J/k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdOMCRA9TVsSAnZWagAAaRwP/2GvLgMJYVH2HVHvVhTj\nVk8fhWpHPcz8EsZLljxUeXcc2sKdzyAePNPOhRIe9ElZRyzQuPFLOz4RsyvM\n6MGh61vc2bg1JfzXcWVBUKEMMr2mwEzStmvNPo7slft1B0pbN5tbZxgA5dxv\ngUgW+MOe5KUkqPTKPrPs+Y1RdHUBKlkI+PP6xQ5cWFQPWclE8/0vkViePx1r\nOxQ1o/nf02lrN2K4P6q4Y+NpXxrJ7fD/6NTrXMbQfIAg4sZIRmszMN59PWVd\ns7FWkpjG70bdtW+kmAWOKsfZZ/W0WdrQuOOz+SOlqw/rbr7GZxrEOQvAoPtG\nNaSe+nqadXVQMCO0/GKE4oY4rUiUf3sNuA/mFw5wYO/m1PvIY78OW2dx/XFn\nWGgbSM6QUxDtiuZE9cuZk2Cjb1czGIDrgVDgEhmn7xaTDSVhy8psZw9e7YnD\npwPKZiPbPcGoeejXQWX0kE3WuWQPY55hNtA4RgnpeTvbejjBnXMA8s09y9xf\nW5UF6saJw1BCkN9G5D4sOzp2Gz3yGmfVIOfiCQNO+N653X0nvJiXFrfYUclW\nx9p9mH8EJGBOeQinwpwYx4AxD/0BEZumjVUttozAs+ySmAK71kx0Nu1ekD0w\nGWj78vy28C3nYWuuvNYHxXwtUZWah9dP+/+BM20+hsmG55yyyzf2AqZzNAbM\nFMG0\r\n=3sEH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3c7070d7c5091fe1df049ee9a90dbbd85bcb76b0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","json-schema":"^0.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.3.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.0.3-renovate-sinon-10-x-3c7070d7c5091fe1df049ee9a90dbbd85bcb76b0_1616761740209_0.23181128206128543","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.0-import-json-schema-e5fb565c6f334f9c0fb85fc29600c22e5abd3e3d":{"name":"@balena/jellyfish-client-sdk","version":"3.1.0-import-json-schema-e5fb565c6f334f9c0fb85fc29600c22e5abd3e3d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.0-import-json-schema-e5fb565c6f334f9c0fb85fc29600c22e5abd3e3d","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"358c50aa6dcd8200674e3853fb9df09a95a4d493","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.0-import-json-schema-e5fb565c6f334f9c0fb85fc29600c22e5abd3e3d.tgz","fileCount":39,"integrity":"sha512-RT434hsHQwA5oA44ejyizb064UMkookmg6rIKWdblcbQUPh8iEKx+Cl9WjXTB/vVKz1a7eDek8RPsjFv3UqfQw==","signatures":[{"sig":"MEQCICd6EVHqx7ZSXv/cGABUJK/wgvLuUsbXRYB84SfzGqfMAiAs0aVyTrp+T9fpGeLSgmnWqCRCh0c9LDh6CnZ/synggw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXde3CRA9TVsSAnZWagAATOAP/3EHMjl59gJXoN7Jm7zI\nSCpxx1VLcewH6WQ4v3uIc1Sh9BJLT/GMojHBYqPkV3iQT6smkm4s23Zu6JWn\n6KFcCqh70Mvb8vlNINWz3b+EzJ40saNEZVjW/u8O3ty0sUjQghEqdCqiP3hw\nWc/WczeJUItsZSCv8K3SZ5Oc73LJc8rw9ZuF3PQehDZMaXezKYhosIzWmbBb\nUW2oKhrylYJ8Ud9ncj4d8FIPWj3EGtRkJpWx+uaXledp7oku6HCHg3O8oqfC\nbqdjAmVWaLVnOZqO0PCI6Yg9AhTyYMFTjQZX3cPX0nbk2lA+wo0l4terYh71\nxrnkGUHl4R5aSd9aSINSAs2eGPrpCEeHem4Llbj694oAsuXbVmPep/MG5AYQ\nAlfhdu5dR6NFHhBg8PlAtrrx93wyKw1K1QmFwFB7nu6PrPrIyLJSbMB/ECA2\nHXjdw5453fMfshK/+VhW19TclbNoOf7xI8AoLn/PLLm3z9F0m5+85CW1ge6t\ncCG5VDMjihZ/aljlAmOBM7WhWMzE4fKpMPev4BEJomvF8q8xlqxogTl3caXF\nZFTYTEELH8QzdAvKzXA4mhBu4LWql/h1Dwl8lI1LyoDeleZ5CzWbu/khzsLH\n0Hphj49lThAvxfpGGbjd+HjQ9hyISjM5fZI7yzVTO0GL0Hl8aht4snNkchhm\nfkcK\r\n=uQlt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e5fb565c6f334f9c0fb85fc29600c22e5abd3e3d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@types/json-schema":"^7.0.7","@balena/jellyfish-types":"^0.4.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.0-import-json-schema-e5fb565c6f334f9c0fb85fc29600c22e5abd3e3d_1616762806907_0.7984848839917258","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.0-import-json-schema-fae6f832903b0b87c454c1dd62f73a11d41bbb52":{"name":"@balena/jellyfish-client-sdk","version":"3.1.0-import-json-schema-fae6f832903b0b87c454c1dd62f73a11d41bbb52","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.0-import-json-schema-fae6f832903b0b87c454c1dd62f73a11d41bbb52","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"16b7366c7aa83f24981459529acad7a895441a44","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.0-import-json-schema-fae6f832903b0b87c454c1dd62f73a11d41bbb52.tgz","fileCount":39,"integrity":"sha512-mH3wINdsdKcQAeOzVy5mByCA3wqUdltYT43Nfu3TU9ZGDbMOSiZS5iDoK+maRgdlvsjQkkQYac4aZGCvQ0Z02g==","signatures":[{"sig":"MEUCIAaDGS83GOyxmSvGj6np2MgqEylOP84WsAsfrgorT7IIAiEAiYyedZZxEiIKe4HyHzXU1ruFhaG+VVlkA4zmlLIE/FE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdotCRA9TVsSAnZWagAAuIYP/360+QROL6tKVWTQUnsf\nX0SrONAD0klaktARBkL3DBfaOtv9Isj9wR8leexlw1jOQ66AWicQYiQfznbb\nkQoMZKil28BTvvWqqUPZT4VeABlHCgBDkwudr0wrt+NDod3QH2WSCJkBVORP\ncuslKZKt+fBT+qplFuEtcmXQ99EPLI2GxxwPjI2Vi/W0t8eKP2Xee5UicaIe\nsORZ1D/yGp70jpcCuaHHTcEbzb4/uWUdvSQYk+J6EztllAn+EED/l8LNJQNl\nRgy5U+fUfnPpzuHZMYVaRFeOM5svzbhlNIaDcZ8b/eMqFQVrmic14B9xx5cF\nUjZZ5tXaUUBmMwVMOhvV/gAWGvg5rGwae8GE5I3SxX9bsVNTdpUpwLQRZo6O\nb3Olv11tykKnfDpx8tnQyJz/c1EnmirAudd/BNBKJLXzr9wlozFBy3WX2I8k\nBxdl7wZYRuPDUsIx5W6TM2b94ibB2lINeOnX2C9uEtw0G5kWhxSilfEU9hqy\nuoTav+ImSOHQr5UzD3BwBOSITTdgLgGwAZL2hvvQx9he3pvgMzQn2DfhGZuT\nw0zeOPKjkY1LBVAQay1TK4PF8VyJb6hH6Iux7CViW6wAbKuD7rX4IcuWpoSY\n81mPzumHmNyWRuoCJHqTsfaURv/Hz+6ApeNZoiEZ8hBmt4cac5mlRZU6gnEj\nLMUh\r\n=mu0h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fae6f832903b0b87c454c1dd62f73a11d41bbb52","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.0-import-json-schema-fae6f832903b0b87c454c1dd62f73a11d41bbb52_1616763436602_0.4897097075755539","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.0":{"name":"@balena/jellyfish-client-sdk","version":"3.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.0","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e83701d2c6adbcd9f9d0e6cbd62e5e7208e7b37a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.0.tgz","fileCount":39,"integrity":"sha512-ASATlDKm3fD2Y8ZpXTbENeDzbwQl4uUvWpWQluRN1s2H9W7g4cYeovJYUj84LDe/7+nB+gFuWDqeL8BOD7Yu4Q==","signatures":[{"sig":"MEYCIQDe7JbGNMUlG09BKUerOu0476F5FsQAfyTf5vkXjhHBegIhAMnsTfovJlPUQMA6rkJ+6rkgw6gx7YhX3CojunaIQAfu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdsECRA9TVsSAnZWagAAPToP/1ZX+PPBDUi8bjs60eRr\ncXylJ2lniQWf1kjC+KaFH7AxiiwvaXnvhnNwQKA+NNywqFm17AehT03julSI\naHo+3hZTkOUbZ+JZUtlsNnyheycbTyJUYMsbIqccGPQFFWUlcqWQbKuez7C4\n4iI4YGbp91wo/KxXREC4H2Xuh2C3LzqInBEYcUeaVu4eR66aAcOsuAPAryTA\nXOq7W1r2r36zjt3G5HQU0gSyvDCgURbPAUlRzspnVOK91pWTkZ0DdqSk6+CP\nPCo3ehbiL/7lSa6/wOgZbRq14mJsdpkExloPH5n6HKTpEJPx3KRk4rZSKDSa\nsIVHNl2R3s9D3GumYm4e9wLUYAo4938eZfGbG+ctNruSrk8VDDRRfbRhlEwX\nXBtAO/k5u8Xp/DNjFoG8OplciSBiKZBsMYvAtQPyaFoWNiF7FpLKKYmSiP7W\nrj90ip+c+5FM67DywKJ6NquOqv0HiAt7ph9Kzmum2uWGveLTGwGOnjyrcZog\nS4el/9baSK0643EjgVp4bpnGHhK6F57dewzNirH+B4kGd1VPG1G/8R9XvMC6\noAp1AC2SnJW/QLR3KYTxsxMT5RH3LFI6iIVLTOWDvsqKzxT8pw3iG3/3au/X\nOnjwXtXOWAAbwn7XL/mxTPJk1VLahdEsgAzF/fNIDzRGBnuMXk755EMA2d19\nSzCv\r\n=fHPI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8f6b17fd293cabc60604fc3dc46acb00390d1a90","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.0_1616763651998_0.8275854558688656","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.1-renovate-major-socket-io-packages-24c45b9b6762f9c0347240b50c0c190ad825fe89":{"name":"@balena/jellyfish-client-sdk","version":"3.1.1-renovate-major-socket-io-packages-24c45b9b6762f9c0347240b50c0c190ad825fe89","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.1-renovate-major-socket-io-packages-24c45b9b6762f9c0347240b50c0c190ad825fe89","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dd9053ed919e11b7728ae9783fb5e23efd546399","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.1-renovate-major-socket-io-packages-24c45b9b6762f9c0347240b50c0c190ad825fe89.tgz","fileCount":39,"integrity":"sha512-U3VbtjdgdxKsAm12SzA5d0ojr2W7jB36wyvTGTYmJVtwXB6xc71yloMIFPUF73engwfFRZv34s9aTr1GCVronw==","signatures":[{"sig":"MEUCIGBQVdEO4gVfzo1TAmBxWgJAB4Gw9ceOb2hOTznNMq5SAiEA8Gk5x4s4AwrSUiF2maJd5lTPm5Ddf4micuN0ZFWmvBU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdyPCRA9TVsSAnZWagAA5JIP/R6gG85iGnFNVwn8JBOv\nne31yR1qnVX93qqOtE+Z6aib2LTjjBrmv2+m3MF9GudQJMXAcJjoSwiN3GOQ\nDSlCkC35KYzdWWsR9aY/Sr6seyUZ27N+S82AK4QakEOt6FAcA3n98nFGLGQF\nbRdQy7L8/a5DOQPcgVmOmu+sTBhGv+moUrVrhQ7MENg2P0vPuiIKM58eCDQl\ncnqGJNQatLWu7tKFx9//qzArJYVTWt3H3HWIiqkbbiA9NVHLzD4LShltXjWT\n0KPEyG4BvpzbY0tGWXF4sc6RF0hTIQPO8p2lwreXL+4QdPohZUSA1LxHcks4\nJ6Mn3N74TLusxpwqiIfNd8CKgsEyjrzWHTIiSZA9XDBoPB/mTDB27+KEANlj\nGnmeyvM5xZenAR3WwgaOElJmM29L/EEliOCFH80i+3f01NgmgPojrm+v3MPG\nJj2O79kcfHnWHC1/YdgerYca9ew0GSrJ9Imv84pXgUITvsV2g4/LSOZba5rS\nOfGMUr99ZJyxaa2YvQ4lcc6Qhzr1RaN64C68jqHBUaTfp8xOM98VG+4IQqlU\nwe1YuRcjmfNNRZsfxCoQoxj0JQRuldE976smdfdCknPxDXFHMgApsyd84vsw\n4CKgOYoVGOHnIPFFC7iZi+UFmQAW2HUJeCJd7zkqhdaP8ca4oRyp2DjooWIj\nCbAh\r\n=pnfX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"24c45b9b6762f9c0347240b50c0c190ad825fe89","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.1-renovate-major-socket-io-packages-24c45b9b6762f9c0347240b50c0c190ad825fe89_1616764046710_0.453813406818216","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.1-renovate-sinon-10-x-21c78ab29234eead213e25baa8a61083bf65bf6b":{"name":"@balena/jellyfish-client-sdk","version":"3.1.1-renovate-sinon-10-x-21c78ab29234eead213e25baa8a61083bf65bf6b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.1-renovate-sinon-10-x-21c78ab29234eead213e25baa8a61083bf65bf6b","maintainers":[{"name":"belodetek","email":"team@belodetek.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5c67481219f43ce2d17c9ff0ca2c0b3fa5e0a645","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.1-renovate-sinon-10-x-21c78ab29234eead213e25baa8a61083bf65bf6b.tgz","fileCount":39,"integrity":"sha512-u/LkUL0sgjX1/+UStfGlkZEwKzqAfCfYPpwElsYJKIqoYxyLGvZBO0DLHCMODut/KuRSR+a1MjJRZQB/7xDNQQ==","signatures":[{"sig":"MEUCIA8arPUGTCYpBVvjG/YA1642+CalejujyKi8mquobordAiEA+YBUsuIh1+EO8K/v+FvCmsX9ukv3rUx1JgU2cuU8CCU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXdylCRA9TVsSAnZWagAA5GkP/jxn4Ua05gHJD1Yl2FN4\noCIQAiv6LIbaqYe+CbTTYO2jMpazxj+R9oKNnPTFK5r+9O7u6W0rTthBGtzG\nKmqq67rSp4xrC5l4D4K66X3ejpowKZTVJOpuuO5+5KlQbjnETFaGvtN5+UYH\nAEhrBBTd/9z2KrLxi8VKbB666dQmLDNY0FNHXZJ5GPNX5m+whPZb2uwQvzY7\n/da7pVCmhbDpVyZFe2uCZt6ojAGPPHS5LKd8zU+P/F9omtk41v867JamrByS\nGuejeW9aDffSkWvaig2/Piixt5riGouWmQL7+ITwyZJU3BSQga8l4yKolac8\nyhRGymFMXb0xcczhEhnI7GYB3EmmFXcN7YOOC0uYwb91czlPTPLxQhxxY5CG\nl8/6RSoZGuQi8NFFLOQab4ORjgpyHnhtNj9Y1XyRatmKopBmAtNl4FMWN1+6\nAY/2/UJpcg8RisKnoj1irMs1RR/TiykxTyMGLZP5KzG5nu4xZyrRN7b6ggv7\n1FErLzC149We9AQsLFwt7IyR9m1wdoZlCMvOXht8eY7Sd7xbqbgnSj3EMsyi\nPoXA9dqM+NaeoCLlhv4rzbnrtWN51D2giVQQkoq53sPVm6CDUZUbru945kxk\nJETMIlLfEx3KG2xPDbv8HAJU2d+fRjvTuadYpkS0Tjo6QYHJTfSYdVD5CUbc\nwxN9\r\n=PoJK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"21c78ab29234eead213e25baa8a61083bf65bf6b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.1-renovate-sinon-10-x-21c78ab29234eead213e25baa8a61083bf65bf6b_1616764068587_0.9293050504212863","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.1-renovate-non-major-bcfbc843e4a677fc61eff022f1b36a8cf2564349":{"name":"@balena/jellyfish-client-sdk","version":"3.1.1-renovate-non-major-bcfbc843e4a677fc61eff022f1b36a8cf2564349","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.1-renovate-non-major-bcfbc843e4a677fc61eff022f1b36a8cf2564349","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f12899d938bc8ab79be88c67b10f602d3cf5518e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.1-renovate-non-major-bcfbc843e4a677fc61eff022f1b36a8cf2564349.tgz","fileCount":39,"integrity":"sha512-zNVE2JABjJXuzKT6h8heFc+4xVYTzzKEjsOZ/vrWXPGhFlV2tMWx0qFA7WsbV9oYLYgW8Dg/KptzSUHOjZ+Q5A==","signatures":[{"sig":"MEUCIF2ETuDItpdu1aBxd+XKOFq1ruerEoKuNhagf11ZKLEeAiEA4QAXpIjK1b6M9+A1fHMMkEbKXSqHJCb6Fm+/jS/IRDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYffiCRA9TVsSAnZWagAASQkP/0m4e/IbJkwUhvecsDB8\nHwM5TCt/NU80o7InsKl9cbfJjjBBIIoOQrhNC5/7pN4aDwmVHbf5oSq9IpqM\nq6zK0YTP614r9qXSaLocRgW8o9pVKW54WWStIiiRKetH/wDFG8+1dsDJL26o\nXbjBmTgzO6h5MMxH1Hfn5ynyN2t0l1H1HqZlzi1eiXtiWXQ7wEpg6H/xZdqI\nrf5IRGXlY5SDnsYRO9ElKh//o3iENlOWgaZb26s/bEjxoCjeztGw/cp/5bfb\nEr466wkm+DOz0GDJHkJ1fEXKsGzplJAb81nSAP7/AB36FUVjNiw8XWUr36kB\n7S+SqHMeZ+v1215ZhVTcboyT110D7vCVI7DS31l4BQ5qorodgaB8RK3It1U/\ng1MtvlMWuo97la/POHFrXb5VRva2z5wg2KirwKKPGBnMr1GfbLCpwTbAgRap\nd9SppDOfEyX4UaBMIB0uzvpSqzdV/tyd4xXE/EdXVC1wDNHNapvfK6RL+PBy\nniTCD/deV3/rrnbFy0xTsHbnuQBzDa4aR166LiOFqC8kiIyvU0cvyxQGb1QO\nfWTiq9kogWKWW3BKXe2y2k5uKQUYkgxkNWbN72Mer5bKaT4KO7XV9G9iktXe\nZytTvwyzQgVWGMWWEwXQoSNxiaHsN12AjwMghCmEE9mHfGl1aLwZkbcB3kRu\nqjBD\r\n=VNYY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bcfbc843e4a677fc61eff022f1b36a8cf2564349","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.1-renovate-non-major-bcfbc843e4a677fc61eff022f1b36a8cf2564349_1617033186025_0.20157261629757572","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.1":{"name":"@balena/jellyfish-client-sdk","version":"3.1.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7f18fb3e6bcfe74888e55effea44543082df24c9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.1.tgz","fileCount":39,"integrity":"sha512-h6hYZ3hY6PZBUkI4dB08CVqcWJOcyDmCn0a3F0Dql7k8i4AR5tI/o1Z9uioZUwQgXBQvmzVxY4svJhoNxwX+uw==","signatures":[{"sig":"MEYCIQDBd8vykJ/1WNT8P4WQV3i+U4IFSiB9Mny4SCetw7v+lwIhAMg0IKnYrh1VNlVAsYGxxiild/RUEbKnRj0JpdEXqJih","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYficCRA9TVsSAnZWagAAnecP/jTddYLHeQdHmZOpTDFM\nGMlAxLhqHARC4ZuIj48JCJykIJPgLDSiVLtrlDkjlFcsWC82vbyWw9E6+HGd\nHXFEYJKejUuyuxl1eWgvbvtehi/lJOdH/ic3N9BhKSH41Fc4DIpGxKOO7hCr\nGzpDaqXAnry4WWtnybUT79p0yMg2YH9h3hHnl0P8RCT3fGK2LBFKj2ioI+G8\nQV7tyStzqTFljH9Iw6Dnqp96QE7GvCYHFW+sT4lOXeAFtzA/vlyAn694VN1T\nS9Ua9KXAFn0lBm7d9bw/hzgC1WQ/vaYk0KGaP9mZ7IO1hHKb5wcQX5rnc1bn\nRo1qiXHZ0BJrGc4OQEtnfyZZBUakeEwp3jMknf3pCYY8ow1egW3wp8fHdT2f\ngsA32l6TjlQTiZ+48xvKn+IwNVyryxvj3VReKSsahFw99y6y7Boh6BxovyCR\nHymUQGquVRu3Bz3c7qRsi1XIwB+yWGF0Rem1OAv3XVrfL+mqLpwX88+qSNPH\nzKLXU/w2QP5kUv89YvywP3WDVUvytMpyg6/OZ6FBHE0O/8n0psnOdsPKK4FJ\njvQOB0ZyND4h6DtR9adl6oGe7gP1lqsIQ8D/6bqyUmKDFeLTC283ySjZdXaG\nU8fNA241CjAne2cquXx9jgwUao+Q0/M/gPoU7BkNqP0uepL9F+M7Ol76tJl/\nQjo8\r\n=aREO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e9c838c8681433574dff8abbfa72855afaf7d955","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.1_1617033372212_0.5328958005680982","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.2-renovate-sinon-10-x-2bbf4f6caee672ded1569c15952e97b98e278392":{"name":"@balena/jellyfish-client-sdk","version":"3.1.2-renovate-sinon-10-x-2bbf4f6caee672ded1569c15952e97b98e278392","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.2-renovate-sinon-10-x-2bbf4f6caee672ded1569c15952e97b98e278392","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0e4d8a41e26477560101fe99beef4c4265ca6a79","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.2-renovate-sinon-10-x-2bbf4f6caee672ded1569c15952e97b98e278392.tgz","fileCount":39,"integrity":"sha512-kp3p0Hs18tMFB9anPI0elYrijHYiazFpQ48ZptfKjPax7ouyLLqy6ba1nFLFbRTfjNRE0+DbLM9TkNBTTBHbHA==","signatures":[{"sig":"MEUCIQDLUYn9rmY+9uZ6ME32j4nkaI2GSreasrpZjO/I/Ssb+wIgPuP8B5oCdSzppaZOvCHSOzzrdZG8dVLRbpcyIctrR8I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYflvCRA9TVsSAnZWagAAww8QAIGOOtViyKwVsufK4ASt\n0L17TGc+x/M2W3msY62a8bH2mk5oawy3ow59QZGpe9NuYtAC0s6X1sCebOoQ\nQUu9tj08P2PLozrcsFi4BXIKx788fq+6SkgOUPQA8tpsIp0HySQIJc+HiGqx\n5/Ck0CQlkMaTxYeeczLIAX26bZ1wW0HgBQ7lfGIuGSHy+0rVb6smYzCh4VSc\nB+7UqIvbmxSYCQQownDVQ3K/BsQoyAMxQxrChESqB36UUvjfszmrfPTflfKh\n83ZZOr5LnpIV1pOWpMC5WydOD6mGf9qAAxOaiRBNeav2zubXWqae26JovgkS\noawCa0TXUojDqsNA9SHlcYW09kGFmhgHVwRkE+FJ0c3XvAmSPA4N+MpeisfV\nE5soAmqgMNBoeMKkFrUoMM3p8wljTOntN7uAXwtXlOIo6a89Erimezaev6C4\ny32RuPGhdqjs0/ebwH7GiTZlhDz7+wP2w7vLvqSBEbYLHqY4k5ZxEJRhDAm8\ncJSyDBu20OfXF9HgCGPlytpXRobfFQ6UDBEU6HEH0oLGg5InJm61wqLIYt8m\nSKOYRWuQCslHCP3fk/IuqOIp/HTfdVqdIVZwS2js4W3u0Qkd0Cn5s3eIaxcd\nRY3Z4BlMWRc1JI8O/7evXW0vCbiCMvhzk8OSRzhKYY8F9sVuOjAbJ9vlZv1K\nMS5X\r\n=BkU+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2bbf4f6caee672ded1569c15952e97b98e278392","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.2-renovate-sinon-10-x-2bbf4f6caee672ded1569c15952e97b98e278392_1617033583261_0.21743809678028336","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.2-renovate-major-socket-io-packages-733aa37e08bc50962243db005b200f35a437bbb8":{"name":"@balena/jellyfish-client-sdk","version":"3.1.2-renovate-major-socket-io-packages-733aa37e08bc50962243db005b200f35a437bbb8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.2-renovate-major-socket-io-packages-733aa37e08bc50962243db005b200f35a437bbb8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5f4e414cb4b8bd2dbda323fc05eb40d60340d713","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.2-renovate-major-socket-io-packages-733aa37e08bc50962243db005b200f35a437bbb8.tgz","fileCount":39,"integrity":"sha512-GfdfFF+dS1oH7Hl25c82uWGo+NIQ5Ycw6Rgj5R3+nzVQpY12efQW0R4/EKkX0x3W2+nAxZbw8DJCWl9SIOqbYQ==","signatures":[{"sig":"MEUCIA+ZV48x8bmHvrisyZJc77jNG0C4FJ448L1Z1jTCdHaaAiEAsaGtIu+spGTPXj+ApjSuzuKuGBw3YLdFGa0hMZbs0tU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYfnGCRA9TVsSAnZWagAA1g8P/RRxb3fH7bhqT7+/JPZA\nuY9NbSQ+emlB9kOkY7UNQSBu6pm07fo/4NN2dusXSizoK4GGsUQ52hfQeKpo\nUh4X7KempusMFAIeuLGc42M+C7sx9P+EigyIHoblkYDELLYutEgt5m7KOXlR\nUuVuWwyCQzeG+J+cAt6EmaIJU1D2PTbLKHML9BSbKXENBB46wi3amMgHATIa\nPZ5vWcOhy6yOOzhA1q3zMZsia9L+gX0K5GIkv2zCOfhKInDriUBJ49NC6Srp\nRjnTOvZ/NFEdxNMfNFo7tJ4yNCbUn9jBg5tcOjao0h7epvfY92u15TPKALPk\neD6TPA2jm7/FzrA/bYtJ0yrFKw3cbhEvXIkr+N2JKLX/hnzNs1sP3VMjGLpx\nIZzklyqnKeY/DZh8b9hlq/r9ox4CNGsE18jS6JleGlo8ZqXkk0uhPLTUKuxs\nEFS2qkdD6uNsW9Kls1yJc7UtHpqNE+Oijfo0gVyeYH2rdELTugLhsc14DX9u\n4O7ymy8D3PqWqdjJujVJkwpFXDcTHjubWwzrosbom1BqbY6zWzbOd/xfj/er\n9tX31JXadOraS6O26tUDRxWIWLsxCpRfMsnbAJHcoikpysbSBbL2iFp7l8bj\n/OnpxAjVcwOE+D8bjnS9lrvdayNqvsIQY32EzH2RlVB7HWXUb2I0Wglnm/Pl\ngS12\r\n=i6xR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"733aa37e08bc50962243db005b200f35a437bbb8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.2-renovate-major-socket-io-packages-733aa37e08bc50962243db005b200f35a437bbb8_1617033670210_0.8002995483800834","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.2-renovate-non-major-4c29fedd97c418ff7abcffcf3d7f423334894cdd":{"name":"@balena/jellyfish-client-sdk","version":"3.1.2-renovate-non-major-4c29fedd97c418ff7abcffcf3d7f423334894cdd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.2-renovate-non-major-4c29fedd97c418ff7abcffcf3d7f423334894cdd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"504dcfe9bfa3f0c735e96eb0f90647ae4f32fd00","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.2-renovate-non-major-4c29fedd97c418ff7abcffcf3d7f423334894cdd.tgz","fileCount":39,"integrity":"sha512-BrQIb2QWjii4zsL0inzxYqJ2Xc4UOLRZNpZ+k5SaJbmQTIKh5bMJHJ9WgU48TpbMTjZoc8jL9x6C2HxaKGGbQw==","signatures":[{"sig":"MEUCIQCMOBSn+Fm55D2rWlCfoYvVRIFignSWrlArOH+FQ43QCgIgEj6Vl9jecVOCHlsyv0XDHJD1dH4DK/ny3nCyBZi2tms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227044,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYlulCRA9TVsSAnZWagAAQvMP/1jZRiFvP9CpmvKNM5gK\nuz/4qShGQgF6QDD8plnXz5CPfycyAgZ6kfub68SsZ6Bz2OpEx77r6GavFt6m\n2aMbTs8cYhVb+ewAtd1UxaXUrsHLSgpLorgE9X4B7ysv0zx5AH+g8+wLlGwH\naCbgsPO8AAl1ZIPdDl1tqlNRLCJQTXA1rc5ksgkfpgKzj83jkC2j9PE0ls7X\nbV7YN4UC9uOcyasAma0DlyMTS+qSfg0r9/OgoAD6u0jdM/Q3Ge26nuEKRfjq\n8PXX/BmR7D5N0A8xU7G3jdda4DA5VxDb17lM3Lz2Gk5fZYPWQOZrkJm5FxiE\nQiw7aK4FnRUNy4DAup8Rjj7EdZnXbIrArJJk4s6CRgS+zxPvDQHavBap5HAD\n0JN4TJpJFznmGSlScuUc8Zj/TDDdfv7j8lnWplvYz9PJKu0tZclbR6y+c6NC\n4C5rJlJFKYqCsSXjxlBRYXqqZCKDGejdI5w4VIigD31A73IlEa9HHlxfqDCz\nDpE6YdCnV7U1BXLEIsS3WUaj+RH5fgDjLf1/cIh0ofbDVERoipAYh8y8VZDt\nA0kUmwcmpgI4bRUpgqq3HxT5INpe7P7ZBVu+94Di02QQzVpc5BU18kaZOpFa\nLtSyKqX9hIzQHiTdUsy7kBY1mIX0TzyCXjBQObBHTpZgkZAeeFh9piK7VJsI\nS0tf\r\n=HGZU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4c29fedd97c418ff7abcffcf3d7f423334894cdd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.2-renovate-non-major-4c29fedd97c418ff7abcffcf3d7f423334894cdd_1617058724585_0.9177975190931049","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.2":{"name":"@balena/jellyfish-client-sdk","version":"3.1.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ba807ef39a550beffd968138c61a25c69915b9fd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.2.tgz","fileCount":39,"integrity":"sha512-/E4QCCDC4I/ZFEqCqaGmQQ4QqgXLJjoPTpDMKp9DFWDez2RFrCsmJA/aCOVcnAPDL+ZJB7aLgoyul0N0qrhfnw==","signatures":[{"sig":"MEYCIQC+McQKI+w8M8St/Y7F6Xczs8BAlwuPAJT7zEpIl78i3QIhAOEeorbe2A6jD8nbqu0n9tRRp5H8ETxjJToYFnPEUMBx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":226984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYlxZCRA9TVsSAnZWagAA5ZoP/Rme9Tk+yFRat682WQF0\nzSuMbVAOoM7fVqeoCMURmmFNbV8fogwE3j+IRBBg1plCHWGdeXstb0A9ZpDd\nd7m5PCP5fG9+FkflwYQzkmvJ/Bcc4MF0o6MVEuXIVKe3rNC8cY6YpiZmLf5K\n+lg9urdU6tRbj2hxdi+xoinTZgAtU3wEXgQlROz1gU9AO1qD5p7z8+bIwZTK\nUkhF44zzzdnwCRUkFnDy8K3aHLNL5SMfFvFhTyiLkQEq/jOR4j7d8Od6G/tV\ndjR8zehs5Qz7OG4OtzJ379Cqtu3zIlJC/3H/1WOIY4nm9Ou8wW5b411yYilI\nJuuYcWu6DPrU/GI9ljG2Oec1VQF0HiesfoGnxJzy++28z0DKcBNusTJ36zZk\nIZlVbfcSiMzMfWmcdZxiOqTDKdA9lWsiMmwWF4yL7zGRb03qDwiCnffsD0/0\n68ComgHbzYc/DNVgQ3a+0P25xerdpyOz5EKnC37L++vow0GVRpOwPVGel0xB\nh2Cx1myCY7r1HKs9goS9TCf+y2itUjs599+3kUDrzHTpfR3ajS6wn/ZMAxzJ\nrMG03QI3XOaLKF7ydhy5zkrphMSLA3m4jWRN6upU5CUI36ZDHk2TZkNAbjcM\nxB6TrURyNoO223+ahWj/tFvCxDiVSRs9k41Ne/61oXHy28X0+r3aISyvPrA+\nC1iQ\r\n=v6Ss\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5cb1f0a2b1db0abbbb4f2ae2e7c13ac7b655e4ee","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.2_1617058905129_0.07754276801854254","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.3-renovate-sinon-10-x-ec128f7f965780c3f6f98ba4d39711bd1ac20199":{"name":"@balena/jellyfish-client-sdk","version":"3.1.3-renovate-sinon-10-x-ec128f7f965780c3f6f98ba4d39711bd1ac20199","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.3-renovate-sinon-10-x-ec128f7f965780c3f6f98ba4d39711bd1ac20199","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"31f0514c4578ecc26a55a92079e7aee6d8336788","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.3-renovate-sinon-10-x-ec128f7f965780c3f6f98ba4d39711bd1ac20199.tgz","fileCount":39,"integrity":"sha512-hz/XlFFUBIzyur99jSucTVarDYK4GRwnH8YkRijzfdCBqDjAsKng+27cZH/KREX1Kt1KYt7G5WJAGFq5PlBePQ==","signatures":[{"sig":"MEUCIQCykAS4Hipfa11FGC8t7cO0SJr3/3vQEP4ZEQFCf1ErkwIgJ94NCFQs/GBOAc8ZsisOlVBYYqZj0Otenh4qdn4/Cmo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYl00CRA9TVsSAnZWagAAVUsP/jIKNmllycGPbY1TOLrf\naknEHUm7DFL0s/3dyuTEpB3ra1tyZCrBrm/p6oJN3vjM0zfE0WkNcQvkOGQk\n6tdrC9rAgppjF/mKUpSqdEq9jOLTrzbduVwLtKU6TVPOGvHyjbgrDStF/Rh2\n1B3Crxnbz8sY/Ky2M2bCZefdpT30T1ZkOCv9A2g/uK8wtCkqH2eIUby0EeLR\nv3MoATFlaCPb9cNR2k1zxKOqla+x3jdbAme0LalnSg//yo8dDwvnkGxr8NrD\nc1zmqY2GcflYYLa+UnGmM2XA71WyHsuXsTuubWWagDK1fwP8sJpbLluYLcpY\nRADJ7FYMSD05LAK4dHZaHo1vI2M2AjnmVa8IRKi8z2rrSJosJxisg8SU3Atx\nWZT+aUJRag6IYZPkJjJzFMfOYJxSqqUFTriRvqohs2T8nM+6d3VBQRmHYUJH\ni80D8cQM7nhqhbgf7Ps3F/TwJh/yCB5mv31gJkA/G4vNcRvdXJbDtY0ieQfz\nI//mdTrsMLbLYD5dVzlr3ZghVpVuqAU3kklDC5i0wldG4kT1HVue3Yf2JNjA\nw4XGxLKLkEBsSuXZVwwShGrUoA2GEzYv/ILMrbWd1S1VWE6bOVvXl98vu+YJ\n8JsPWnFAfTnKXbh5XjPqJWFX65jajNgqCUfDC9/W/91ZG2D4Mtj6vcyJKaVV\ng4wJ\r\n=bVh6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ec128f7f965780c3f6f98ba4d39711bd1ac20199","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.3-renovate-sinon-10-x-ec128f7f965780c3f6f98ba4d39711bd1ac20199_1617059123814_0.7845038839427037","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.3-renovate-major-socket-io-packages-e3d554cb74190435d5314d9544e870d8ccd89c35":{"name":"@balena/jellyfish-client-sdk","version":"3.1.3-renovate-major-socket-io-packages-e3d554cb74190435d5314d9544e870d8ccd89c35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.3-renovate-major-socket-io-packages-e3d554cb74190435d5314d9544e870d8ccd89c35","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fd1df4ed759d808229415154c00d8918a8075dd7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.3-renovate-major-socket-io-packages-e3d554cb74190435d5314d9544e870d8ccd89c35.tgz","fileCount":39,"integrity":"sha512-NTGhkbxlcyPG32cTeO0s4ENJwAOK9HojwZ3dFAwf+v1TKcnTnpYca/BdSZbVQPWRH7fRC1kSbwEPaLVdowPOMQ==","signatures":[{"sig":"MEUCIFn0ksIXoFbu/3KrZOd2CsbvCMEA0GdQngvLOAFRA8U+AiEAzgXBSpRW8EZ/hucX8MnvGKiCBzAKq+7U6jk31HFr5rQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYl14CRA9TVsSAnZWagAAJLAP/iTxUOmHRpigaj3iIW3/\nfpTUMk3jn9W71U8mEU1VWBdIEFIhdWMz5a9ht3h2mIj5upgt5RKhTt0q3taV\n0oB3TMzHWtYQltvcS6G0E7W6F94ZeKsf1xRB9wGlcbHAzZ0YCisxVtk5HcYJ\nOxu4kev4jHrfTG2o9oZQxglKSV7LtsltNF+ooc+9fQeblQKAookiiNONa1/f\nfyoe0MViGnMTOd+pzgPBf2Vmr6PP/wtKolz5J3Neh41hJneU+MwjaP9ZV7qe\nn1ds1RU1efUcrQeKcssCVCw1tUqPTtUHOFVgOVky09eMWYzQmfIAEGot0rN7\nYkYvDj5+8COVJ4Ak2Qw5gILPI8sg/2ZtwVkDlwzt7GeQ4hz/Y3I09Av6ls/e\nDg6oecCdS7E8tqHiu4ppMMlE9pPmt3d2SdVg3yMfpbO/uwJf943fTuYHygvm\njPayYFbInpvSPHumJTohotI+g8nInHN62iq9/m0ff3JHTGloo4noVc9J2fAj\nM+m7yLKOLQ3GNsO327YktnTcudCtZWApbAEKDl9QbAPOfkxKKLVC+htZcpgv\nyJVAc5OPE8EIRlOyRrffmj/KsrPyK3bRwvfw1bfEYBM9uTuEq6FZE/JPgf5y\nHgyWG4Hjw8Q11imBRVEf2vRPcI4TxOYEbMlcA3ifALcW6V7gCCGcKFoUjMpm\nlmDJ\r\n=SVMp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e3d554cb74190435d5314d9544e870d8ccd89c35","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^9.2.4","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.3-renovate-major-socket-io-packages-e3d554cb74190435d5314d9544e870d8ccd89c35_1617059191794_0.23174227364896272","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.3":{"name":"@balena/jellyfish-client-sdk","version":"3.1.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"12abff04c672c626b70460ef5bcc91f3ea8545f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.3.tgz","fileCount":39,"integrity":"sha512-0yuDMgBRy+QOTlfgY01VtyGJ7yoM2Kaj6I3tc8kABPPB9xeeCoRvA90hwgEtYv23ui1qOd1ogBV4Py/x87ik4Q==","signatures":[{"sig":"MEQCICNsNZtQunaLjJWVoE7zFDTdVKEcqoc1pH5ehs51s6JqAiB51zPp7Uxnz5RYTT5XR9YD6QnmHufB8axL/O9BJBW0lg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227064,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZReGCRA9TVsSAnZWagAApIoP/0XqNz1fgAqSQrlt9TOS\n9M61cBpiOhKEAoPZCGlZDQZfpW8hzwyUtpBFqThzf0M2LiRI1WvypHMDbUuy\n8GG065FRaf1mlMvvO2Vuh6qk6LYgBxjbWj+yXgnyE/5SQ/DC31HKi//Ec3XB\nizUQjIaIfhw3zJPZe2ZgJuDAAU+CZevUK2syYTnAsOfsQ1D3Q5tVJj/WpF6/\nCSORiO9S0GS6FtC1zn0EiHJhfZXlBgMwiiU0gqTyiKEmTAc5BjM0TltAaHfK\nNxvOYzXkO1tyKkVtXTLQYC0H0AoulILh1mtRvVz7/vLGwLhIZXT4of4eCxI6\n/zqmosB40T4ogf+lM61cLxBqk5AN39rUgiLyNY+VKWjCmtuhIhy7ZAQP9anO\nAMpKDvEYVJg3jCDVUOJLKT9eV5jG60ANKEoKw+3RaiHN4949Y/BYcN+zXG1M\nfHlWEDYDo/ya5sfVbZjWjjtZMTqYO3F1oQrC/MOSgHC/aaNZ2vre/o378ZtT\nhpmP2m9o/J0u/L4snUeM6jP282tpeDY7V1hall6Ipx9agtPnQV6LCMKqovrT\nFBKVhCMSexVZO3moWHwBEZ9v+tpCFx/aaOMRbo7N/CF3e8NQrV/AQI/7p/em\nTq9GBra7GmeqYug0Udx7yxmhdqqsOyUquDOQZdD9wItXBmmvngQ4//Yi2od6\nJhhC\r\n=8UQ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e7619fb3317977078e02677cd7d0c8ce7e7e2552","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.3_1617237893765_0.6211737410811939","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.4-renovate-major-socket-io-packages-1f6e0d2b31c4f1dd58203155c633449742222f42":{"name":"@balena/jellyfish-client-sdk","version":"3.1.4-renovate-major-socket-io-packages-1f6e0d2b31c4f1dd58203155c633449742222f42","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.4-renovate-major-socket-io-packages-1f6e0d2b31c4f1dd58203155c633449742222f42","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"423904a95b5110db2db6273ab768a50150943d6b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.4-renovate-major-socket-io-packages-1f6e0d2b31c4f1dd58203155c633449742222f42.tgz","fileCount":39,"integrity":"sha512-yUVnYuB3PhBH/f3NPqyObcBbjKtzQJvQ4ty+H8rFMUS9U2l3pk3l3QF56GIn2b6Z6JEnat1F44bQo8qYd05zpQ==","signatures":[{"sig":"MEQCIBfK6oinRD/9kz98a+wd2kh9C54j/JrG6ZeheqyIaEWBAiBoBpCa4PJVVzwknmzYPhNr2UNkStBDAOhKa+y7cRxT+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZRhhCRA9TVsSAnZWagAAmd0P/ikYeuj2LvPj1CjArB8L\ngDh0FkqPHiSMQKqMKk3lFTFvyt8aWj/u9/jcVcsUm2BJBA5IFksY7Q4xgxAl\ng7Y0U6GcV6nquBEOLACDckVR4pgBgIaXl2p9K8WeluzM4Ichqz+6KnM0s1TD\n0QePKEiPC1aDe96TIxark2F6J6AJbvN7Np8jKq4aJSHVV+m+c/HZSHnQINTV\nrWIlEdB/igknPgG5hPSo8HNlSiQuD9AJW6JtyWu1Ku3qDcY8ws28UrXjynOm\nG9seBxlLR1gKJLNZZh8hlH5tQHTlRRJyBgwjMnGyLzsBsiYxHdkYKn/mGKh4\n7DVxMfhAjSXRerO9GD8URCjaBki6SALF2imBTTfrNevUoYJr9ES1F4Az+N1H\nMhCb5NyUvfRTyqvpWvt0e8B/6J67g/YaiqFDMQm4KlU37aJWUoM/XGPEOzET\nO0Rdl/kCgudXRQv6MC2H05UoR4ZRYyf39JehFazN34qy5/lwSCSptw4xguI2\nTw2jqznjlnIP2lcSNLghx3IJSvCsPQmatjsWpdAGH6UhyeVxNu0jd/02/JuA\nwILWJrWlVYk0mGygS/fA+oCNDE0NuoqzvXYMTeGbL8PtOOkZuTEqWnWu8Hi7\nGZpZ75EdWjOQXQeD1TlqKiQaIO68gbIJ0QG4EkO21UCfjVRn0Pb4JxnWjU+/\nJq+f\r\n=L3T3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1f6e0d2b31c4f1dd58203155c633449742222f42","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.4-renovate-major-socket-io-packages-1f6e0d2b31c4f1dd58203155c633449742222f42_1617238112653_0.3873350476484061","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.4-renovate-non-major-daa068573659ed52e9d4b5fbc4f775cead58b110":{"name":"@balena/jellyfish-client-sdk","version":"3.1.4-renovate-non-major-daa068573659ed52e9d4b5fbc4f775cead58b110","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.4-renovate-non-major-daa068573659ed52e9d4b5fbc4f775cead58b110","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1bdc63e3a927ea018818b2009b890dad055f735c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.4-renovate-non-major-daa068573659ed52e9d4b5fbc4f775cead58b110.tgz","fileCount":39,"integrity":"sha512-2CxU4QQRBCNhmoobOkeX/VdUja/nmAtENsAv5DpNK4YMkRDV/Q/H8zdcMdAQJagqH7ZFy2NGeQuEINvNlUnbaA==","signatures":[{"sig":"MEUCIQCUcDGB9g81Xzf8FBNcvIESCUyZLbkh85k598f9v+t63gIgX18xwA6iL+cR0BjsmvDj39eJwQ1Se8BrupG3Rh95HeY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZRnjCRA9TVsSAnZWagAA8iIP/1k9SPyHFEuZSMyrs7fw\nRKC+RF0iTMRupHECE9P2bKKiz2OG4p21M0KaXcElyhuEHeSEqpRgxhnIX1Vi\nrX9nNMFVuDQqyk1+HstouHSslTUiHFyxY2H5EOATeItmh/I6NGqC27jS+zTA\nhdnT0WJ6FjvihgoL/tU7BSpQfD/cFfctP+vgJ2L+7/Fx0cNqX7OdR9awPaC7\nZzKvp89RnHtav0WhV0mKz5Xnnn+midO9QC36IjZniEipmHWGSo5juvzWKeWh\nRjfrs2oJwnRkvwmyDOm/dxfa2D6Or1y/E5L5wi2rjEfdcOBfRDQLPmUvfrt0\nzy4XrPyGK7GfMvTVXwK9/ZPYRnYg/Mi1uHM2lXaUPYPQSQ6bar9lodLdky9P\nPLGYavHcHT9ptx10ySg28aGzHJ0rTVnXUA2GYbHp7hwaZxthkPeV10EcB8J5\nHa/SPOgkKFO49Ify+snEHFnyvbc3+8cPH3+QsJLsvOc9hBwZM6GARSpcGW/X\nOssSZTu0eMe/0Ml/s0x2XNC8ihsmDmjh2KWA/7U7KIImY4j1H09KJvn+vDNG\nw5l83bX4PIAgY+lnCB80LVqWiOjCjbizXMiqW9pv/ba1Xe65aV5/+J1i5eXv\nwCNs3pEOUvW26nzn9AJjNJJCgXE1VRdyq0hNiCDpHEMdVo90C8c92QCo8ds1\npSq/\r\n=fbih\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"daa068573659ed52e9d4b5fbc4f775cead58b110","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.4-renovate-non-major-daa068573659ed52e9d4b5fbc4f775cead58b110_1617238498752_0.11314179808311575","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.4":{"name":"@balena/jellyfish-client-sdk","version":"3.1.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"683bdd16e7802c8fc21a929ff1fc959150fd20ec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.4.tgz","fileCount":39,"integrity":"sha512-yzl5jtsdcptcYxgGGH1pj8ksYk43pZI3kLpk4SBzpTvuVmW0rdRotlBxLwYMpIkqofmd6nZ8bBWUhPWb6LUVgA==","signatures":[{"sig":"MEYCIQCTF4aZ3jaM+x5BKFmaq4jl3JWLGLyvXmJTVsWnIF2XJwIhAJM/h3kQ7knhBOtZGBX/19dwKqHwSfj5tFyc1Omw+6bI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZRrpCRA9TVsSAnZWagAAjfsP/0BN3lJznuIll6U2GoF5\n5Ig3XyaOKcF8HyzWt5uGT4hByQLjlvQ0F0yx9ZBv17Mk1oreS90ti+p3MASl\nQZwt+B08tK6CVoYJ8jneiFtZGI/UB/EfmeJvWLiRB+rl0w0US2B1khpk2n5L\nb6cUEzvQEtlkSWkVVijnqbNXvW4HcaSOm/Dkh4h8XbYJv5P4jsZyGIVXRcMY\nDUm27c3PaNrnTLUZf1VoNm05ARhVtnVlvxVO+KX51bDD1hMkzma2xgwCuGWm\nKUta+6l1AIlkF+DbQGyEHL2AzbzIZqYDKMNEBrnQ7xrMXPPh4UjRrCIF8CWT\nS3UBT8ri83YEdGNGANnQZCZHwRW+U59xOiNMOs+xbs5OjMTYMS7wL3eye3dI\ngQvAGwyDvUAItU1nkItd/rRWURaRvmz+2RcLuP3S9BZONYi39vqPGdKEiwhr\nybtclN2biUaML4463FOmOQE6aQ64rK1IZzivWj5eQQhaN0FSr9jcRSfmL7DI\nMFtH2RIR6/clZ66ajGMrV6nZMKAXKp+WAxVmfhiUaufQjPl1rL+rEx8dJ6gl\nN9vV5k8yS9uT9dLFooeHoCL6YUIdffYOIHdDQ/vnozkFNUkH9CbF+cEIL1v1\nlFL1uTRj18LXphd/jQTRKUc95t9i82VhBPnEojqqp4Y9N/BQiYkAI+t2N4YA\n/XHh\r\n=N03g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bbed7c1d2b6ca9f4c7ba8212b43afd9968a96050","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.4_1617238760561_0.15383166746752486","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.4-renovate-major-socket-io-packages-36f6b8966271b0e282a7433be90c25566801cedb":{"name":"@balena/jellyfish-client-sdk","version":"3.1.4-renovate-major-socket-io-packages-36f6b8966271b0e282a7433be90c25566801cedb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.4-renovate-major-socket-io-packages-36f6b8966271b0e282a7433be90c25566801cedb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"742b1b69f314fa54e144b0f67283e9e91f7066c0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.4-renovate-major-socket-io-packages-36f6b8966271b0e282a7433be90c25566801cedb.tgz","fileCount":39,"integrity":"sha512-Zafvr1bxpwR0d5cNczlQb4oGe+UrUIMqj2P4vKnGorQoORxcYl/4UYw5FBeYChyBzzUVYqxoDqmPEZqG5yV/hA==","signatures":[{"sig":"MEUCIQCQ++RPzGPaorM2vanS/mxy8mPxSU+6nOy8jIO4XAxSiAIgFovNOArR7S3AHwwUZWlR/KltEgVi/zavgQ9SzDMZ/Xs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZRukCRA9TVsSAnZWagAAypIQAIwITO0oZO/saOCzpqjZ\nmdfOIPXOwuizQpRaxQR1efnh/MRVJAdBlKyJ1KoFhKmAUaWpXfb31OjrkVtf\nCxWGmfKRteiC8WDy4Uy1UDQ7bDnFwbaEop/rPAphxLERibu7TdNLcvVB9TJC\nfr598Qp/LTLplfobrfsfwk5BzYoLP6uHqI9FZTY3nU/QPeFhyPtZaF8YG1NR\nYh3Jv0d9y0rAI+Y2I9yD/tjijiysauwOk9Ml08INWgj91RawdB6DGQBn2KGu\nt2K9ouyS8WFWFAJerkQYMK6H5AdspLAnvm/jQyhjXXOwyz8MjJmytoBB8Llp\nAvzK7Hshg7B9fsrK6kVh/jr4RcBCUvejK1FAqQRdkN2AVvVNBQxJ5cqzj04x\nUJyybGwITp9rArjRUSCOdEEo6L7qubRoAgPZjPj7qdOZSYTdJbIqSGJfc0iO\n1pvtO9kUncAej7q9Z8QCgqcpHAw5LjiAMM+vgMxsg1MKDesBq/Bg1P1en/e6\ncgylpkLLGwYbdn8RTzTi3tHvZJwEzpwE/5AJfoOHOXlRKe934HlpY87YdvhE\nY1nD437NFbzqCpJm5zBwIiQXzzD1dzuOjYm8qEjy0WIoNPxhDgWhKEIOFJHI\ndJCvBWKJJStAuOxQcE7uASkvpl0h4fEB5bpzSAxxysPmEBKURpCRi41hfP5E\nXkzL\r\n=RCm0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"36f6b8966271b0e282a7433be90c25566801cedb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.4-renovate-major-socket-io-packages-36f6b8966271b0e282a7433be90c25566801cedb_1617238947866_0.47129997125702205","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.5-renovate-major-socket-io-packages-7caa67bd06a282fb12368dccca34809bb522a117":{"name":"@balena/jellyfish-client-sdk","version":"3.1.5-renovate-major-socket-io-packages-7caa67bd06a282fb12368dccca34809bb522a117","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.5-renovate-major-socket-io-packages-7caa67bd06a282fb12368dccca34809bb522a117","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4dbb121455e9fd1b1e7aeb222cfa43bbbe9cf016","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.5-renovate-major-socket-io-packages-7caa67bd06a282fb12368dccca34809bb522a117.tgz","fileCount":39,"integrity":"sha512-+ppZCia6XaI2CStSDUEw90TUUAiBOvBmlABiRQhdzBbpd62udhuFvmqbPI7ErVX3q2fO4rTP49GJmAMq/9Jt+g==","signatures":[{"sig":"MEUCIDpsOS/piYC5siLpJ5kwQjG4+nOMbaMxK7wTgw8smmQ8AiEA1nKJiD3mRVymOPWsaB1g7rdIoDqKVRodpM8ZtP3Pr9Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZRw1CRA9TVsSAnZWagAALXgP/1nGDeoJIZf1MGLQwO8O\neRiK+cjgVX9Gqlo32OZALmF/PtRykf8SZPtV6zZFu2GclovGK/AkN7p0dsq1\nBW/zkZr08YuIajLxT/Hl3yWsDeYTslQ0/YuxmkjXXU1dwn9AGbdOwNrqS41C\nYvj7pG+nnu6bJBC9232+lsY+v+DgWhS5I9ZhuQ00xJUuyeCvB9XH6CEnWxhY\nCYBU/G/c6YNp2ZPVROUhj/NVd9I9IqUrtKRfM8jCfd9QWf1ldHOIzkErEBRd\n+DDHkvgson/N7ArQ+QgvCSneYqT1khtcZSacCYPbBowRiR04FKi3cj3OAlpW\nvcjh6rwYkeCGWnceJ0ocAF2FfmqBYIMXKX7jMgbkPpp4qntjmmAqBvT6HByK\nY87gCItSg2bgSXbWLYqugcAxwFrE/T+aFt50+HgF5YlgckMVYFdu3s6jWoDf\n3YKkUfEDzJIuZrivZQmKMCExykAlzUyXewdvakTwrB3b3Z6RPEMi/BhSH35P\npN7eMdeE8H4ZITBWXDirpwZj9OuDwn6xr8l+oVG9Z1B7tBWoraN4bajtqpNV\nieH/NqdirkHo1w7JhJlvQCzaAnp4zoLl2xc7GbKFrkXJyS8XCFvcqHUvFwAt\nV52F3IE80x6oHMDfQi2rSdRskWJM+Ca0vANGVPEVzNCtjYgnUvisJVeB+7Q4\ngi7p\r\n=oYSl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7caa67bd06a282fb12368dccca34809bb522a117","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.5-renovate-major-socket-io-packages-7caa67bd06a282fb12368dccca34809bb522a117_1617239092643_0.9401589063199218","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.5-fix-getfile-f2b506cc81613d86b40325c6da20defa2efe4907":{"name":"@balena/jellyfish-client-sdk","version":"3.1.5-fix-getfile-f2b506cc81613d86b40325c6da20defa2efe4907","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.5-fix-getfile-f2b506cc81613d86b40325c6da20defa2efe4907","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"039e8cea6f67fbca4dd659d09361fe2b4df6e3be","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.5-fix-getfile-f2b506cc81613d86b40325c6da20defa2efe4907.tgz","fileCount":39,"integrity":"sha512-0pcIQ91tyIfb3qH3mxbgWYZW/j3xk8Js9fG/R/2sBL8xq+YjJlbZ3bUbg6Tj9ts8B8b/9lXMfKk5nFIvApihGw==","signatures":[{"sig":"MEUCIEjZgnJt+gqmm2bFrVKQIidvjMIWrAsr4ybfauEUrpsFAiEA1y5BJ0O0QfnqoHNkHKJ0DWLiLyN+EDJ32VLnFNLnsEE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZj+BCRA9TVsSAnZWagAAtLsP/04k8puWnSU86Un59FVS\nlSCdV/Pv6aLPZtH9D1dJely4UmeSgaaLqi0TznZpKgmFrSvNe5Awu7zqQjzP\niueXufAtl0AMYGJuri8H5RTygArglMGVpTuGrc5mOaWGyuUTh09RDwiKyf7C\n13s/VZLP9wie8g7+PBTJVu+zeBDTHpSCGrPdqTRO5UpyHcixsoy96cMrhOMg\napXPoh0mf1YyU24DxoSsAhEpWDHS3/+nLjNMgltW4onOqfCSjdbShRGiGuXL\n8+Z6KIiHCdorp+NXJvKN5aTF9aG+bSR+XHSPJigIdqGU0zZ+1dYHVpjFLWhU\nc/TYSCGI3tuANGb1llzHXlJaoBtCibAM3rfM4xMYK8eAx8ZX8YCo8eVDWY4g\nivHATpk0YiF5tkbnLKpKjAraLJ0aXYgTxLBqH2cwxERu1TDOso5HlJ0K9cSx\nyKh0v5ApOOESjUkvUUoW3gWxMmTyrC+Kia4LPrsSvFbBdYYTr4LLjkvDkmFa\nM9XJASCOFjjk33bwiiat56OWW8ICOXLPAju0omC/XHmhKSwD/y7O/beooaPQ\nCRGyyE4IYnxqcp+H8HoGOcllLl9FLAGfrkK/tgkKueXyesE82NuqedVrgz+3\nWIVHGWaIfW1M/ytCKuEJDDHnvY6ashn2qvPDH9/BtidFyAa9yqnHcFR3J2dt\nzZH+\r\n=kxd8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f2b506cc81613d86b40325c6da20defa2efe4907","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.5-fix-getfile-f2b506cc81613d86b40325c6da20defa2efe4907_1617313665224_0.37774340883853963","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.5-fix-getfile-304199977e1e3c7b657fa6cbd61b4bacc5c2c675":{"name":"@balena/jellyfish-client-sdk","version":"3.1.5-fix-getfile-304199977e1e3c7b657fa6cbd61b4bacc5c2c675","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.5-fix-getfile-304199977e1e3c7b657fa6cbd61b4bacc5c2c675","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"50a0b8ca7be1a60de25da86f76cdd1d578f55395","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.5-fix-getfile-304199977e1e3c7b657fa6cbd61b4bacc5c2c675.tgz","fileCount":39,"integrity":"sha512-EoN7/eRvhhIF7ns5+cDDXEyfXnXa9c//Ugcs7OfRAuEMO3CEZ+GTs5X/vXd09ReosxYsKE3nNhaFwvHABZZycw==","signatures":[{"sig":"MEUCIQCnti6P0RrPocxIfpkt5S7PIwkTKqH2l9o07OU2uTDMaAIgVz1/LJc6aVIiJAL8B1zmABP81qENHR0G/dLp/CbJ84A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZkFyCRA9TVsSAnZWagAAKM8QAIdpjwuJsAVKQvw7TDfN\n31U6hwvCLo3iq233mTKv6AA5jNaFBmDI1ItIa7sLdUnKF9FuLi8xHa0KCJrR\nIbg6eUPr8GnpWuecegcKZSjjC1hGsnaZC1WEalXC3jkhxISajRm0Z+iMMmH7\na7JUEpnPK+SKrXnL+RuAro27Fh84OKzjJiXcaqLC4YeshS7xz7miGvxxy/oH\nli2/TwO6x7n/CkNZfO3lrNWJlpbF5+8uzEBRSk2KaJ34OP/ofRoutw0NeTQY\naoQMdm17k7iOm/8Ncthfu+M/dClOAxXEp39/AGUfuOmN9DsaKp+L4YEaYvPX\nAe3SOBEE6NTHFS2iwoODBo3f8wdAT/lMrl2qQmU0TclW+RJ1E+INFi2SBACP\n4KKFRunSz+xzas+etY4XcfNhK7INfHKhjXngNCD8tMgClcvgw701kr+Sw5xQ\nHQgILhIjsZD5kItYv6PqHimR3vByR0OTN1SZZXwPyrLFfMn7QCF6vApvIyy+\nameP+u6wfP4HrqUvfxXiscvwejjyOdpfiTeEwa0w3fIs7hk3FTJ7b/L2rSoY\nfK+EwkDboD+LiSGEL2z+PA3D9i67HH0upWu1c/MfxVwqUZfwvawV+YR7vYb0\nVe/xfWFwaGq3M08ZIxpEXdS0d1hCcz7K5mmY6x1shSqoXhjaGjcEFW5Vtpzq\nKeSL\r\n=42i2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"304199977e1e3c7b657fa6cbd61b4bacc5c2c675","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.5-fix-getfile-304199977e1e3c7b657fa6cbd61b4bacc5c2c675_1617314162397_0.4721311247052784","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.5":{"name":"@balena/jellyfish-client-sdk","version":"3.1.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4cc442f66d2f42c90d2bdc6dc8ac9a2646970cd0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.5.tgz","fileCount":39,"integrity":"sha512-kycFRJMK1fRvL7rd0/HeVnu+TzrbabKYxTz42kDt72Abnm2HN+KkVv2ZJijvvBMyTi9IxgcgNsITNfrnVq7jfQ==","signatures":[{"sig":"MEYCIQDfddYT7NKfRs2aZvkSGKTv+XJGXNKfzjrLskxe+6KdYgIhAPqG0RgqgbJQLF6PJzVdH4q9TiLWQTQDlPeLNcrODA7d","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZkLkCRA9TVsSAnZWagAAvUMQAI0LV7VFBioymbCnhQaO\n/8zDVKfFe3m7IiXUsidqpylKJBOqOulmlYXlbrbRlu/FRaoO9X1IAI7jF0H2\nvrWpHI5rlHcxEo+3YzIizis1oFQ/WaD3jyAndO+OEFhb/BxxxebHbYWBoxKq\nwci1l/s5cWwNxyKLzbBeymGs+x7KFPsU8qvYfML1oTNNGCvVhq+aQJfP6OI9\nAu2sX+5J9lkGgcXzFr5KUku0nXmPBOAO5Mf78WtIUtBEEDRgY7mx34un+dFF\nP4KZi+gFgAniiopwFlSpsC1vXdFaTRBcNREW06bPsl8J1u368ZMXbwL+sCU4\nxP0fzCSx9xHLI0imY44dbXV9X2b/S0D2/y4pbLIacQ95m6ROfJvXZFYRWUhq\nsvzESG4Rzz787sfJmRrh0p2T+ci5vbCNOO1/mje49v1+p3WLv0/2dqNTi2s7\nPC8D1Ykwhs9zNvI9YwmeAxDI/meoHMvgP6dud9pLmu5DZewJA9TwsruLvGLk\nOv2ZC+eZUidLFmHYOSTJt1WWqvQq5AigJcgPSL974PbIyH0JVuyCvSw1Uof8\nXNc4Z+c5jgJfIdeDG0qlhOkcQaKB31/cNa2hkjs/LyzDsK23QQ+xhh2T0pT3\ngX6nqnRKCsJvhLD/89JkIx110grSGJeRaI5qnbYaZB6ywY7a5bvsojsDHKf5\n4PwH\r\n=xVg3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"70063fadf545877abe448d2592faa2612b866264","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.5_1617314531949_0.9600143787652884","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.6-renovate-major-socket-io-packages-d8259ecf2f5e98f0393c7cb8e5c7410d34a4336c":{"name":"@balena/jellyfish-client-sdk","version":"3.1.6-renovate-major-socket-io-packages-d8259ecf2f5e98f0393c7cb8e5c7410d34a4336c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.6-renovate-major-socket-io-packages-d8259ecf2f5e98f0393c7cb8e5c7410d34a4336c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"32b99dbeaae739f814740bf8025d056f7b96b13a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.6-renovate-major-socket-io-packages-d8259ecf2f5e98f0393c7cb8e5c7410d34a4336c.tgz","fileCount":39,"integrity":"sha512-IN1NLT31w8aIG9NPLcRjmtDuAeEZ1cSE8SFgH5oD6oTC8e+2WoOIf3aHVo6h4v5m7uaR1prkyl3KTpNfJRODfw==","signatures":[{"sig":"MEQCIH7eImbtnA8cghn+fLU+BH+89fVlGfeRVsnhUlBHILKZAiBF+QFWWSWmhRSo7U9terbCyL0cVXtDpDN/D5A8tH+yhw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZkPxCRA9TVsSAnZWagAAqXgP/0C2Wo6RLZLtXgZfWcx1\npsEdv3UykMGpWQ0lr+GuMDKX9svbPtKyxoPMt3EVsGLNqw2HAHtRBCqJBIJl\nmz+pkbvtCXYwwvYf2Uca/hlHzvD1mELpXS0Inm7LiQNqSitz4TzONn7GcLHB\nyrQTYZD3b2WabPEsx5c5N5DjykrgOJ4q4IMcVhrkLyXUCO3EZz33tqp38QWE\nbbuLL5WGXNmLHdqhjLfdy9c6Z6BUqJgYMwr2jop1OTTQr0hVmy/rl7mRoec3\nRO4NfxFDXQDC5MCOnXFdRA6UOA+ewvnH8y2hX5aCso2dAnUlO+7vLIU3XmRp\nOn+p1/eu8rpM8WDYx63MdzysGu5ZeFBmmET0kQKgjqW1OKxb+Xwsm9U/bMP5\nWVdZ81b+oA3DcGYHy1Qgt+njQUv98ONjr5jfIix68QfX3PtIsb6XhOmE/ZcE\nU8jcV8qPhRZg+pD8hQEzGbNxHyPQyRzkqeSJbKz+Y8NuI1Ucf+JgQlGt5OeA\n6kKObabH2ayqG2gTpQkkptBgevgGkZ0CKPHV+WuejpGjN5wBwhzFZX4aod0N\nqIw8f2VpJA+vI9ENJTQqgNQASOBay5NsxUcqQb+RVDDT4+PGbt3W+jFKzp4N\nnU1kP6qZEv0Mc8pndQIMjVQjCTdXK/Ji6nFC6LbYScCmQaVodMDwm6fawqQb\nOSXW\r\n=0Yi8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d8259ecf2f5e98f0393c7cb8e5c7410d34a4336c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.6-renovate-major-socket-io-packages-d8259ecf2f5e98f0393c7cb8e5c7410d34a4336c_1617314801229_0.20764037102224475","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.6-renovate-non-major-bd5da268009925238972d6976c3a9dc7c12de460":{"name":"@balena/jellyfish-client-sdk","version":"3.1.6-renovate-non-major-bd5da268009925238972d6976c3a9dc7c12de460","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.6-renovate-non-major-bd5da268009925238972d6976c3a9dc7c12de460","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"adf00ee4c488384cb2817a9e20a1ac8cbd05513d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.6-renovate-non-major-bd5da268009925238972d6976c3a9dc7c12de460.tgz","fileCount":39,"integrity":"sha512-aIZU0stam0mlDw7SjGQ0NxgqV5TVtLpp6by/Y/CishYHYigw9No/WNAi6jqkADtjg02XXgwxeoRY578AGZpADw==","signatures":[{"sig":"MEQCIBo2AxAhb4WpWF+QPglwnFvUZK4AgF7BY6S+pcINeYn4AiAJCxNcI/K7YEqJIL04z880ndLQIFSRhDixV9lxavFSKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZlbSCRA9TVsSAnZWagAAh1EP/2d0fGF1o4CR8tpHEer5\nd40Gq4GnTGioHkWINbnoqOwB8RpDyqWtyEKaAyCAwLzQQxtXfpBDyuH0z+Bd\nsl3jlLRLzAAWN9NPQ09QU/DL69yF/Qs9oqcxpweinIw+rGBR3AUSAB7/54Zz\nHAhoaxxmbc3miOsnqJ7AmpKXHPFTT5GqZaydZgXfOOpMDwpl59yi84pJrK6r\n7Go3QYpI2Rn47Vu4AcMEHiNKqHkG+LKK/DduwFgT7Qrj3FDwtZVVLSNw3frG\nWoAJ/arO7v0ZObOKhy4y6ICkrEiHKx7ORFckdpviZXEN0IVDccQ73yCvXdn/\nNQbD2v82QVdrENWwnoS97OhSujoufOlM396YKimIzslLUy138UBi6bY+8sH/\nw1TrBTna1H/ECxXxgZeGtG7LnkgcXsO5zOsjEvaDkFgNM2xPUcFHK1laDdyg\nxRGgksMm6XErEMIl6Xc30yKxitlQv3efkZ8RK1iS51DzZUdg1ZpNd7N/PSRD\nVYlszPb6ih3xGda/XKNL0OFftNmIVN4GTZA+JA3O6qI2gNpPXClD1cVrqtMp\nWx2vOD/4Gp5TTAFcckm/m4KAJ1LMLdkci96ccet9PmHjnRbH502vpUUcoyYt\n42ORj6E7EW+poFqFr2ALXXn2eTmh9COycAu8yvNe+CAxk0H1n4z/gAOpVbtS\n0f0Y\r\n=EVK6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bd5da268009925238972d6976c3a9dc7c12de460","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.6-renovate-non-major-bd5da268009925238972d6976c3a9dc7c12de460_1617319633575_0.35479224450863156","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.6":{"name":"@balena/jellyfish-client-sdk","version":"3.1.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a13bea3ad999d8cd73e944d57ba0190d93652d6e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.6.tgz","fileCount":39,"integrity":"sha512-TEQHsVatr61rC2UOO91r3ziKWtkn2ie8mjE1297dIL0iUQkkWsuJnI4k6Y6T9xm4a4s3m99jiuIbzaXemw0UXg==","signatures":[{"sig":"MEYCIQCRoYFREsyzXRsn3qQMx/Zx2W7RSUymC7vcoks3k/GPdQIhAKTNk3sRFy5dxiKmdKuyJuSYPiL7QsIP7Sdi/9TxRgm/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZlf5CRA9TVsSAnZWagAAbhgP/iSNAJrMRfApsNpmpDwc\n6OC4al3ZwfFVOCvv5r3vkyDrMQkhDogPap/UxWrkLIbwqMbHZ+n3DnLNiaTk\nLTh67GB5GzVptKO4//XhQaZATNS7AfSvg6t/NiJOyVrlqY/1xdmAcBVYVt8Y\nDPaIgqCDi3EhrFvWxT3560J22z+jTM0anyvO3zXhogyo9wMb4XFHt3UK43oc\n9fummEyXkz52D1v9R+GUJMVl4WaeXhB0oCSdRq/zZmy24rLOQqaRHVWPVuUR\n/DoLEYU0V0uRJ1P7L9fCjs21Da+OmrTOxutxc3nvp2OiiPOxtwtu1S8xYJKw\nEwgMI0+SIqeO88D6dnMWISTKO59ak3lowNRwam5nS1X9n7F9stzIcw6GyKAn\nK5roWABlNaqUqv9jUO4s5kZzWZCKjmzedGcqKPM3MjKjHa0fvsbO7+0+yf97\ncQmV3CZPN5R+dMr/ExjUxcB+zzkNhww4vCfRu+YGfgktfWKzQJ18quWwXINx\nU2Uz+9JGitNneDKD18zbeHLJMCvWFWvsYhReJU0sJNFFXB9YYvINIOODdmXM\nUNcEVc8l+Y5HPtYuLncHvkmD67JuDwlHfxyo1GJft//C3yWilRab3Vr/hV6S\naLJ2Fw7jX2snpNswEPTeteFVRYuprKEmP1Hj0bPkJ6ix1TJdJBCYnsqzdq1/\n0G8h\r\n=KO5W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"320ac26f84f2ea2d4cb7bb7c8c87b438bbbc2a26","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.6_1617319928506_0.06733631335753132","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.7-renovate-major-socket-io-packages-6dd57f4e20a6ba3f14326747d8a8745f77c3637b":{"name":"@balena/jellyfish-client-sdk","version":"3.1.7-renovate-major-socket-io-packages-6dd57f4e20a6ba3f14326747d8a8745f77c3637b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.7-renovate-major-socket-io-packages-6dd57f4e20a6ba3f14326747d8a8745f77c3637b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a9c5b6cadd84b2d51f6f64fb8c166b88c39d414","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.7-renovate-major-socket-io-packages-6dd57f4e20a6ba3f14326747d8a8745f77c3637b.tgz","fileCount":39,"integrity":"sha512-pd0JQJwaEXSh4OA4u/v82x7ZbGewvcIm7LPaTV4nGQYSOGpGlrp4R4qsCkEQMbbb/4Bktoe8ibiWqVlkc8O9tg==","signatures":[{"sig":"MEQCIHc9g3PVcF9adSEFMzNa7SM0RCCrsa2wzvCII4hfer2vAiAYGhtJ9UTkIfIl3T1fA1Ahyx/6c8aEFoDYAzg/mUff7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZll1CRA9TVsSAnZWagAAv7IQAKRxeECiP9uNZdFiO6er\nkjJ6SPFfEtjq5nwx1jEtLbmrXO1bb4VTS29eudGHzL49yL7mPGph1COE8zIe\nBdD3JEPVufztFGot50hW4y+manVArfHNy7PCwqya4vkNFEaJc23WV/MZjUYX\ntebv8NF0VJyj0dW3hrEEpTAMWrulAmFPGwb3qcfV2OmkXG6oP+d9RzLjgciB\n+3sG3nnRmxMRmuCEUnb4+k5AoS2yakgeYbGW26APZ9BbC5I++DqKsPCVzT+4\nVqvjW1LZIOEb21JgCDxxG+6SvJU917/EZrhzUfuNvBdaCHMMUGPR5XkKJNAD\noH4cAxt0VeV2K4hWFIiAaFoqkExwrFhN9mVQ2hq1PGWTFCc6qQtfnHv5oeie\n66n9V/kohbeBadIAtWFHqB6saHCVcBbv5oiytuGC0UJBa3FHTSsd5U9bwZ73\noI4si4uBJQvSW1KikTggJeXFDjeMTkH2vDNrbHmDsfg/dZ+uAvmQZ8N5Pq9G\ntNCbBN0zJJxI/tDQcDeLhy0Rs4pj25CuXMaIY1fktg7N6siYnArxdeigGjiE\nKNFyOwEf1znlvXOM91sfO1AqPvAMgR8v7MLkob1yOoPkvONZmbbxK4iqfC9g\nOI/JD+tzyGneXwM8AaavrBmMFdMLxhenNGsPogUoPA4F/2pFRC6ehcsBRNUS\nEaT3\r\n=9hPn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6dd57f4e20a6ba3f14326747d8a8745f77c3637b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.2.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.7-renovate-major-socket-io-packages-6dd57f4e20a6ba3f14326747d8a8745f77c3637b_1617320308860_0.4443422517786013","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.7-renovate-non-major-7d6a5e99cec5d5e400826a23d4c9cf6c8c2c99ed":{"name":"@balena/jellyfish-client-sdk","version":"3.1.7-renovate-non-major-7d6a5e99cec5d5e400826a23d4c9cf6c8c2c99ed","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.7-renovate-non-major-7d6a5e99cec5d5e400826a23d4c9cf6c8c2c99ed","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fb77816d3f22152bc6a58b9fa094d09e648da109","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.7-renovate-non-major-7d6a5e99cec5d5e400826a23d4c9cf6c8c2c99ed.tgz","fileCount":39,"integrity":"sha512-0R3RGt3iA1jA6wPnOOXEziBjoeXTN4aOGd5e/hX4McpFsL6raeqtgmUcOgd+DR9ot1pan6ueeG1S3fcQlHoBng==","signatures":[{"sig":"MEUCIQDaInTWXeA8bg/+w1BQ6OvSeBRUP2SBZDZkIPj/bshIxAIgJoql5jkrs3BtRr/gJ7BkMwNpLVY3uOZ50IvygGSv93Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ0g/CRA9TVsSAnZWagAA6F0QAJDTUKi1DH46p7xm2f/V\n2tBrw2PThbkB4UacmQIyD1q99z7mTJ3kw/sZyxQGqdSIg3TysofBMFNx0SDk\n9EiPYbdqhnqazoT+/zi30n3MPw/TtR8EUMJRNJo+iq54zKF4oD591KI00SgB\n6cXlYdYOGGbtlH7EDLA219mxDcUzijIKLTFhjB6UXA9CcEkZuxVOkFNIkBJ9\nWHW1oxRs/dNI1d7T/yCKoTzyS3v4YqIkH8TvwibnVB4L7PuJvcASfV6Cu65G\nDy6FZgAO/O7QH0aNuRDZ4MIWtzJ5cg+J3udc/1cBk2M/wIQf9Ihkk/kf0Ltg\nGeOQnsgAub1m9tsluZ/cGLUOeaQQbUzXFTUkDPeIi9NhHpbKgDX/QPZtUSYJ\nxoo3y4OPvsmEOwnoQPKS1Y4bF5U+IncI1an1VJq/+JfpYU+2OU+GfhDXWoFk\n+7Nf2b3YSRmya9smOkYNSbJL5xB5c2BQYTM2/RyqrFKPswSTlWN4Slpa7iS6\nILe5YuNbZoxUbOsHjA7NswGVR90F0Ws/+6PK7POlSeIO4OM9DdTX8j6uzlxb\n82JzXzocEc7aA89F68WHuYG/1jtByoxkpXE1PDh9FGSm8FfVOyayGmbsotCA\n+olVEf/VqJtAyy6WZtyhAY9a+gCNNcn7UXUaCcm834WP5q7GtWbgO35WMn5I\ntY0U\r\n=F3aR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7d6a5e99cec5d5e400826a23d4c9cf6c8c2c99ed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.8","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.7-renovate-non-major-7d6a5e99cec5d5e400826a23d4c9cf6c8c2c99ed_1617381439040_0.5836797544167371","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.7-renovate-non-major-3e561304944176d95cb789865ff194c095e1983b":{"name":"@balena/jellyfish-client-sdk","version":"3.1.7-renovate-non-major-3e561304944176d95cb789865ff194c095e1983b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.7-renovate-non-major-3e561304944176d95cb789865ff194c095e1983b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"065ed2618308aab55550c59f814aedd1db0e52e5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.7-renovate-non-major-3e561304944176d95cb789865ff194c095e1983b.tgz","fileCount":39,"integrity":"sha512-0zNmxC9xEWxHl1YCZzuXuq2Wtyp1kKTZhFENNtbTiaIWECmkLdCA4ZMR7LuTArSHqYCVT8y46X4YKvRTrylJYQ==","signatures":[{"sig":"MEUCIQCYini0vgfas6cghMJeKmjo2dbj85T/quMPoJ8RUgubpwIgGIPDKCpQK0SPHTYkjCswP69eLZyZ6r3vCbIhfEWmV40=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ0lzCRA9TVsSAnZWagAAtfwP/0iN96jSMpma4OM1D28T\nivc5F2u0k7DeenXgBJtXjlF6ALfoUUSu/74l5/SHzJaCyLueKc8o4NYxaO+b\ntGCXRWBjXrfScDC/z9hlY0al8IkFKW8QhVON7Onbs+Yh4M84JDyRu9cLebAw\nwRWqGXwuLKE5ob+/bzwqpxgFvjp4Q46PdUcHisNCsPuSyX+NKasHJN+vFrI+\n9EaGXZcDW6duSqgmLFu0o4/dQXcsUF4dojhRBPenPzaexQAZXEMl9++R9iON\nd2xTwwKdQ88wkr+N6WDrcypEgwDOaI7FWlwRK7jAMKN8rNB8IlvS/h/ZWw0J\nD+Y5EeOut9PbJupTGvMQz788m8LnRl45g9wssS6+/EkKnjBf16U+5dGzha8k\nOjJIKlqJ4NgP/o5bp+TcpA0oRAW33xtX9Bt33AqUZPszc7uJFAhdoOlH7Z/W\nejlti6GYnWYQhZS4+GpO72PHVdqy6NwjkWxE+E8lhpSJlb2wMQmZwcWNSxIH\neV2EuOckg6qX32EvKlJJ39GlX3ufoNEOnuaNMvGU2YQwT40VXVi9zgTHb1QK\n/2UPXnNizgMZip8JVWjb1SRi01JFPMNz8bcxxOEMhyvuxj1nvfxViZGIE5mh\nscbLh2hkLMKAhkupQDUmj012IyzDxKvJKIqqa5vsbriqGwfitb+YrEzrPBE5\nlHs+\r\n=7tX2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3e561304944176d95cb789865ff194c095e1983b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.7-renovate-non-major-3e561304944176d95cb789865ff194c095e1983b_1617381747314_0.4650482738047583","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.7":{"name":"@balena/jellyfish-client-sdk","version":"3.1.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3a2741b8cbf64f7b9422c72155ff21460ae34fe4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.7.tgz","fileCount":39,"integrity":"sha512-GHJJlRu+7Nf2p17momJsE5oZJPpD8v1/JADbLVblySVuMZecV+JXxeMkzOV+mWNenvUh9dVN/Z+9CXrH/LbpnQ==","signatures":[{"sig":"MEUCIQCG2jz0IadMxP5hZ0Yw2cmLrTIRQExR93OJEuxUpTlzKgIgA6NfGw+g23vR86rwq4E2OtqRZTV89EcxWlwYicaihCE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ0o2CRA9TVsSAnZWagAA9IEP/0/89jg5icrc/Z8SOALR\n5rFv6sY+9apk4Kzca1LA3I9UBp57P9UkYnRAtc9TtUTrYs8LxDbLs2iCHORm\niNRWY2E53GanzayHURXTI0fxXPBHlikdKTbLoA8HlA7J5uWArdBXAGtV9ZFz\nPpJuYdHgW3H0vbX0QPH9YD7S+71cSOGkd1rMYEV3zaDfh6uu+wbWxkAii3kM\nL8eyX/fJ3Dc631ouXU+U4n14e1DKgePEyxP1i32TkyVFrPDFQ6+hICJRbDMR\nvZDSo8JhHsSUVh5868xD8DZRLi5aYZ/4/gscHTIYLZ09hPWDelGMccwyKrtC\n4cuBOvtOIfYk48SgBLLXRnzoIz3UT/d3g/dHnmxnQ11oduSzKbviYhfwMPvT\ncemqauhj9h5Lf789bupJO4tNQdkuj/SPrvGSmXY39rIEtQ+iyxB986JDL5Xc\nlOrhWNZ+W3FUFtkLYN/MVexDZQEosnwTgry4SjebJLbIXpZtUe6F/3LeZo3O\ndi2eujyVDlHMP5fV76xaakkp8ZFPsWmxDQlUYs8uSCp5pYd6Tj+PERuqT9lr\nKYfZt3ykhtIQhfUwgHSkLjG6Yc5e7tp7zW8xEcinMW89Ezc1VZ1+teusLnNU\nbCsrHFivawJ9sTG2aJENetwYhlCi1WxNOi9/NBR2eEnehEjM2ruLdcoevVtw\neM7T\r\n=1GD6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1a25b7f180ae248f811288aaae15cecc0e960340","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.7_1617381941491_0.07951137880148518","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.8-renovate-major-socket-io-packages-3040df47ca3135bf6ae2cbe398ecce47a3f12fd5":{"name":"@balena/jellyfish-client-sdk","version":"3.1.8-renovate-major-socket-io-packages-3040df47ca3135bf6ae2cbe398ecce47a3f12fd5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.8-renovate-major-socket-io-packages-3040df47ca3135bf6ae2cbe398ecce47a3f12fd5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0ebdba1ab63cc0af86dfadd403f6bab49b5ca10e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.8-renovate-major-socket-io-packages-3040df47ca3135bf6ae2cbe398ecce47a3f12fd5.tgz","fileCount":39,"integrity":"sha512-AtIrVS/+a8Ivxr/rUXi+lYtoynQ19QWmRL0v59IDbyONgwtfZ9BZaz7uFBx5BImzcRakFzbmaPqnusMqb3uhRA==","signatures":[{"sig":"MEUCIQCo3Stky7bFUCLBpBTmITEjC/aeTehRLYzsp+O3NPVJmQIgdBWb3G2dS5D7eJNv20VB7WrJoiJml3XQT2HsgUXKiTg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ0sGCRA9TVsSAnZWagAAn3kP/RyN/s5k7Xgq2peoNvuJ\nnxVsip/w8EsSx4QK0qTMAw5iYxQ2EHFw9/jmsbwxbbt1+8OEPwGSHLVWFWod\n2awugbjgVmSYOOcJpxCxvMA/rctSUsO6eDviKbezB9/wHTSPGgpe+8q5XQoV\nBebOsvJ2C/PqFJRX7arufod+dVaKfZ4AI46Hqf2ll/8TObSIC4BE5YGP/US8\ngsXWXhgsV5s2C5K7eEXYdPcX746GWZmH939O1hXfzxq7/QoS3ecdWpgs1ElI\n6WzGboyYo3vHvAdPcmgTKWLEEByB3qnocSRaZC1nQ+7AcT5d6CwMpNM5q4b6\nzGRw386Yf52Gw9hzfB/iKHKjK27LUeTRNQf/2OA+1SP0Bj05eTFQSMrn6E0u\n1XIZwEDd8xerK/Su1IEwXq9LHG7vd8e8UU0973cZyYdbAlm0WJqKyDQ+j5RE\nJimv2PlQSxoj+LqmZUR7vwZ/2dBput/HoDH9XyfPyTqoda26T0jVsIO82IhV\nJu0iFHhTZSWaY/dle+blEitju6xJAVybrkWJ7S6bBulh+kEULBaejonBFdgl\nly1qANm8xnxCLV33ptlNMh5YsswQBC+rkKhYKC90dV1zA6MTZdo7nJ35Aukw\nZFgEbauDL8h/JorULiutz3gW6VFYZ8jgB1wAfKguazpYG5yoyR8Ut6qbu2kb\nWkB0\r\n=ETiJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3040df47ca3135bf6ae2cbe398ecce47a3f12fd5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.8-renovate-major-socket-io-packages-3040df47ca3135bf6ae2cbe398ecce47a3f12fd5_1617382150092_0.8629584609294119","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.8-renovate-non-major-5553afb8c680cdf64178f407fa0b067695114979":{"name":"@balena/jellyfish-client-sdk","version":"3.1.8-renovate-non-major-5553afb8c680cdf64178f407fa0b067695114979","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.8-renovate-non-major-5553afb8c680cdf64178f407fa0b067695114979","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4f172f2ba88f90e93db1d640a948bfed22bd00c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.8-renovate-non-major-5553afb8c680cdf64178f407fa0b067695114979.tgz","fileCount":39,"integrity":"sha512-dtxFHZ8ApcO5RCCeHOG8We2nWatlB9DFSGfmC0cR1x336mSGpgg0MbP6DT7Lm+AL6Kgj81Er4BLPCO6/G/nHWA==","signatures":[{"sig":"MEUCIQCp9tm95itUwKb7GF4uzwSpXQJ/ShbfCsm8pxUMpiSYeQIgYgH5IFOxpfvcPsnvQfnchRyLHagK+f4Rt5FyZwT3cC0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ2QlCRA9TVsSAnZWagAA9AwP/ROvLiyN7ZqhyRx0/gSm\nibAdym4vkFrUe8FaBwDRztIEGn+VWYUfmYkgzquuED5vlvJ0Bbs2Fq3h6hQ5\nzl5fWrNTfCqWtq333DepdvxWghocOxzTu+ktjKPCGIcB9hZFWKH/Tu8crGLz\nkre4Lh5+QNLDuKEorzYitC2hdRbS+QigbcoPveWJhc4ZSs6OleVQr6ifMUfk\ncbBiJQl4VoF8+1FD53lN3x1VFItiqfzdLj/OVH0Pz9VVm4qmfESOOBhleaP9\nqHlA8KPEfb0Sr5nXQs0wQ2qtO/0HL6ZaZyIBqtGVoVE5Vt19dcMyW6+V3alP\nkgDl4y7n8d0JtmyZ+ZcF+24+F/u5/vX22uTTmgKjM5pvNbyEit7mvR1cm/nE\n4Uf/dGYJJkkuoCKnmK3RFG1mVvmr41gWmibpmZ8mhMMwIDvf/Ap5mg3XcGcw\n2iM5lmLJrisCvhpUgPr0gzr8AuVLlAImlM/F747Nl6ddRfP+2/0Ct0qNDgdj\nNTLD8FmfKYKQJIVIRSbR+cVRz8Y7xSxRzGkpXE5H/i1oq+vggkQnrFCjX//T\nX1ocNGDcyBPFYVJNFW/S2b2WzAb+XmMVgVvmp9xTLpQItsTBLPPOpbEPoyiJ\nh5feTSGumDDUDgNbwMcTeJWgfKC4lVysiy2BWOfjE0K5sQeUlsy0g2NE8ZVg\nZKF5\r\n=SA2r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5553afb8c680cdf64178f407fa0b067695114979","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.8-renovate-non-major-5553afb8c680cdf64178f407fa0b067695114979_1617388580872_0.1384790811873442","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.8":{"name":"@balena/jellyfish-client-sdk","version":"3.1.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2bd953fc945fb89eb560171f72f0468917c8a502","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.8.tgz","fileCount":39,"integrity":"sha512-rFrWtFqa4xuTUhFmI9UYzUbDdKpgU7ZNmnoYY7VZB8r76SmvFXdJWxSadbmvLIcTne+TbKlqg4uUuYCw1Hrq0w==","signatures":[{"sig":"MEQCICk/SP7XvZKMNU1a9jchqTz6Adtbh6fJUvWAeGIcLe52AiB/CW81kC0Fusxca640UqAXZmAOwtEl8Kjo2LqkgVviXg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ2TFCRA9TVsSAnZWagAAwHcP/2oFlyQyBwLFGdMkzl21\n5urhgmebB0rBHaRLrpXNRdjBBVzwJgEPuQlLC2rxOFRLvQ4pKS9n1fEohTLT\nu9c5kHATj3gH6KynVpXCCfLe+u1e37nRnZxnXQf8CAfHMhihCqwafF/t6UVW\n0Qv1D2dM2RCpWJSRiGKVmZvN7d9TbsEb+mTa+1KHM1/szEUuyAccJdp+uUoe\n3tRkyKOaCYI9JocJPL9sHRw47na6iGH8kVQ/nE9Ww2Pcuh1TShDVSB9WIp6t\n4n7RmWs5U0wyQMAX3bG65E8sOoyURcGOPxJFm2yvUjv061mZmO9vgcyM2WJk\nmuaWA8SMMsnoIs+LcMi4H0Wvp8KnvjahmTojvzKqEbU4pAjsgfYnZLmWat5e\nkArIwsxAzKnF8s1Kn0j/39/eq8Uuxi4dqy9STEdCiYsQa3qMFTZC3krAZJyg\nu0wHilNBgK9r3S5msw4otQhw8oShGWu7AqRAPB7iMQTtkuOcx2+LBy4waKoC\naxuTQ2afFaagYx5kiTLcauGwVVL8xH2X8i0uLvtrfw+JqHUaVDTW3qJ2d0h1\nbwLcY0w1INJ86KFv9E5pC8sqtqkg3NjZVnIJpUqlLO4DGmCNaoucWhqkXm9L\n2rdaH+tI963Nf0fhbAypuIdmqdy1LHJKgdC3bMPZBDfZf1PDfR3eAtKkbddv\nbgNx\r\n=dTgS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"96a168393ef8b818e94a3b1ff1d3ec183a44bfe4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.8_1617388740450_0.6551818692481117","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.9-renovate-major-socket-io-packages-d39b99c3f83274820d45530ed29748d61d575988":{"name":"@balena/jellyfish-client-sdk","version":"3.1.9-renovate-major-socket-io-packages-d39b99c3f83274820d45530ed29748d61d575988","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.9-renovate-major-socket-io-packages-d39b99c3f83274820d45530ed29748d61d575988","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca977e460411feb035edea1d29b6a948a71d3c21","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.9-renovate-major-socket-io-packages-d39b99c3f83274820d45530ed29748d61d575988.tgz","fileCount":39,"integrity":"sha512-i1KiZ3pJypOP6sT06s+7eWUMNXSOX3oxPZj4wbNfRLhH8qee2Xlgi8fA0lTUtxPg+RfLzO2qrRXElIj6//l9ag==","signatures":[{"sig":"MEQCID/paB4Ezhae/20D1Q1Jp7hlw+NfEaI4kYl/GHvr11mjAiAdo3f/Xb4bN4kkTjT4udRYev8yCqLtiqBwhXEjyEKFbg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ2XVCRA9TVsSAnZWagAAaW8P/A6Utet9DDxqjT0SCej9\nLOhKokEgVFlXmqSwr21Hzb2C+Iestebj5pa/CpiFsnh/xKKg8GvAmh1RV4sY\ndlQeI5iix4QWpSn9ZAXC6GSWC0PZ2nekzXqibkX09Q4TshFogOtfk6uiBPHM\nZn9oAmwfdBc3qH96PsgDI4DcnMdIEBkDmLux/n1eYoxFmGF/TgL6RRaw4/xt\nQQuaEBpr0UGwhBQEReCGAVqWoBLnsj3RD1o9ASH8q4Q38mxWeq1EBAi3CW98\nlc5srfbddYPsUDpe92Kms7Vgb5bdj+99vXMeuPJeVMmV54Dz13WNuCU0GAbK\nCoSbiOcfhaWm3u4BAiP4OZ72eJxp8/G+MXMmmpHLTpzqrm90icuuYyRhrmWD\n8D/auw4nvhOcooiCV1db5e8jlyWkXVLIJYMufR9SderPCmMIeeBJaL0wOCJg\n84RkMaXGBHtHpvTUNPoKlyub6zo15Tl/304W8UDj/2YEpgRfzn3PgvOTNg/4\nQaXIwhiCYuBHWE7O/wwOvYNjYp+qgHT6QBhQzfcIcAHfzNo3pS5Ebv6AUn/w\ny5wjOCYOs7lbTBIBL5JUr6ltcWeI5qHXQxXqiEjmKngA+PfYpK/wxe/SAIQb\nLbX+cESnihDbyRnEAqCOp39CJOrfVTxheFH5ZChc32JwP6Y33C+LOIeUTOsQ\n/bBL\r\n=V5ZO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d39b99c3f83274820d45530ed29748d61d575988","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.0","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.9-renovate-major-socket-io-packages-d39b99c3f83274820d45530ed29748d61d575988_1617389012700_0.2845135693568188","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.9-renovate-non-major-623fd1aedc58bf59240dfba73df225db9a36c774":{"name":"@balena/jellyfish-client-sdk","version":"3.1.9-renovate-non-major-623fd1aedc58bf59240dfba73df225db9a36c774","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.9-renovate-non-major-623fd1aedc58bf59240dfba73df225db9a36c774","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7732691b2800e5a21b41ed4c6c485a323971b30c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.9-renovate-non-major-623fd1aedc58bf59240dfba73df225db9a36c774.tgz","fileCount":39,"integrity":"sha512-+3iQiFCLS+uf16WmlDCOG7ljmWMd0XfOEspS4vvvsVSH3ELxR13JQZvo1rUffOgGX/lk9oR7zlP2nb0SW0kAnw==","signatures":[{"sig":"MEQCIDf4koCAj51PU8CTi8cK9RvywxdM2flCLifDCy4DFYctAiApKdLrjk/ZiJFB7gis0JbjIpcIp47MLo5wnLYFEfn9yw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ3uTCRA9TVsSAnZWagAAH3YQAJ+jdpLQWfpQwmdM8SIG\ngwEqnOpmurOm5CwkHqhwLFlcKUEXwiROAM3dD6TOygYgIu60o0vB3IJHCED3\nyRQRiIMsrWmthbH+sq2EsRV5oLftgBRqemuEmI+iWMw/y21t/fINBuekOFI/\nXTxiWxg8861GKAMyooF5S1Z5cCaBSErwXKXoKwJMyF67SOMXeFg4Kp+iEQOp\nEHrrqySYWW5R/Blx4fdFwEUepEmsUk9jNR/ZqvNqmU5H1e7UihnieGFQAcpM\nHIgqnE7FRsCa6zUXdoMaTqyeQXeKC8lWfw3ps3DrD7GTY/D7SR+rNgNsHPCt\nJowZGp3YUacu/LxfTierEpqH1pQIPaSAsKWLsutxYFoET8Yd0aUpJq2gTAuA\nT1Uo5FyXnKRAGqXF0ZKvXCzbc0rLfE3+jUHWQAE24Bm6JtpsAHQJCUdvbLLg\nntgIwi+mG82NcA3bT2uloowOKwLh+BXMxL4szrYxpetZ0eHW7FjUO8pdbr4l\niERDY0OxHaXyFD+hqou9I2hQAz/qfqNFU80NbAd8ZbUIsljbQaIpRtITecwZ\ndDxLOOha/Ufkp3/i4J9hLI3L4w7x2AZxYxV8x1F6Jj0uaaJJ3bh5Bgg5gjSN\nQWPMBDCd07b7Np1uFbk2JBwLhHAGc189GLWUdJyJgTVsSdG5R5uEnqISSctA\nxxUo\r\n=87Mp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"623fd1aedc58bf59240dfba73df225db9a36c774","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.9-renovate-non-major-623fd1aedc58bf59240dfba73df225db9a36c774_1617394578908_0.614971460116108","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.9":{"name":"@balena/jellyfish-client-sdk","version":"3.1.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fc5ff8b421a8a71607ae3873f6452ff7d8b05c00","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.9.tgz","fileCount":39,"integrity":"sha512-MtREm2kullQtARcAxLBs9s9PYaNwzEVEDFyNQH8yLJ9JzVyCpzNyL2wBeueW9V1pInp8530dx/2EeGfmYl9MXQ==","signatures":[{"sig":"MEYCIQCuotoEjMmcTpUGV3rPw8stnQNriT4XeRnlBRhdFvUGzgIhAPHep80YfYiI+oNwdA5TuA/HtwRNpFHAxGLxNIx564Z2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ3xbCRA9TVsSAnZWagAAZ0cP/j7AW5GOWI2f8GLZ6ECq\nf9axs+gPrg3PNKlbNNee3jw0r9KuTpVsUMoJ0aJaGExpRo+FywMjWg7hbWta\nBDPKzY+wzkEY8paCtOPaY98TvrakBOY93TlN0OT6NJLbMvUGdvt1Q91f2smL\n9K+PJ36uSEZFRhB6nNw54lMaUlXvZyh2lpGsAgM3q7AC2thSkOTO+XCoaYF/\n4Wy5uYBQRNt0fKk94Iph1PtVjydhoP9BxBwRvj94Xoh1AxlSCjl5FK/M5IkU\n35fLNnjGnyn/mmRQYaFk8dfxmTIgadbY65QzJ3qys9kxUHJCXfJm5o4c6jMS\nvlSt2ZglNucXSUzbilszIE+MPxI1nVxiJEpS3MREn0tzytfLNywH8vj87Qve\nbF6/1GvdDCeVjQzD7bgZES7j0Ma5ieyDRvjXoiYV+kuYuOT4ppJF5Jve+XFG\nC6YVCkLlypDLbajK7Q22vfFI0DtzKaiugoIXwNA/qIa+z1DGqvRpbKVCH1yO\njUZdHgciNXLJsZqLLb0HwcnH3XpXd9tg71k8l1H3QtwPMpbiEb7iCWF35SEt\n9gkcYWvD7JHeAfjwqD3U4f1wa9l9pp3Mxr3+WBRHMwAytoewYF6btY5e64JK\n4wcEsHPYVKG/3mdbAY3bksU+HbBCotoAjFYqm3tqOVJJaDa6dVxg4u4A46Lv\nuLMb\r\n=N2KY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b8215bb2b875b27079f4c07d56ca4567ad7efdda","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.9_1617394779346_0.9027857621908542","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.10-renovate-major-socket-io-packages-ceb2fb3edbd37b150567a95006f536aa0f287ec9":{"name":"@balena/jellyfish-client-sdk","version":"3.1.10-renovate-major-socket-io-packages-ceb2fb3edbd37b150567a95006f536aa0f287ec9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.10-renovate-major-socket-io-packages-ceb2fb3edbd37b150567a95006f536aa0f287ec9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24a8859b2d2476145804444ebb1344bf98e83b64","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.10-renovate-major-socket-io-packages-ceb2fb3edbd37b150567a95006f536aa0f287ec9.tgz","fileCount":39,"integrity":"sha512-kOgHrkZ+aVBTsjDxN1u/+qapgQ8K1K3g0Uswb4YMlPmhajE82Lp80gj0EQup7FZV4jJjrgijRAzi/3t1P/rPfQ==","signatures":[{"sig":"MEYCIQDMPh7NI79mzReEo6WrxH6Dzh1DWkFgOuCsOQxqq0DtvgIhAPbputD9h0sVBXYuq9EAkjvivifbTpQAfd+zuo/ebz5S","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ31BCRA9TVsSAnZWagAAxisP/2gfAtrY9JzBHeffJezr\nWq6bqgN6t2U7/CzCMSq3P9GsWxBvLHoPr9Thg0Zysrsa/XTEVYBrI975uDVo\n4NIIw3S1WmlyQBWv2vyjHHrGzBXhUsGNonkjIX9RhuaDzw9KPUFegm1L+jpy\nFpPbT8IeITvYkvo+yitFaCw2nAD9TmL5cQIOyjGaIme2pvzw5IAOrnaCwg7X\nAlKD8gEAeB8gFZ6h1598aGmxbf9UnxK+PNlgxgvi9ukICpr5+IyavoRZTELZ\nk9o93uRshBfsN5mUztiVTqqDQg2414QWb9fUJnrGYi+jE0K3sYTLIW73toYP\nsjpxPPRWwNnx4Ul0ZFN9349bsacyCXuUPVDWwaRshvgMcmbfhTtKRak+MFxM\nCEIFQG9UJ3WrDdie3UwkiNAnbcqLUaWZEldNJqXGjr6IFlkoiNwXn6VALUyA\ndZA4to5L5X+jRww/YoE+tKap0iySL6tCKz0FrL77eoDnSEvYkbAyrMTrhyc4\naSmDkL/hUwkGRTQa4rcQWf9IrjiUFYjihtxgdQcCwJbEp6/FTqeH/oLQNmeR\nyx03kY0I7KnR40oj4X/0PzGW8HriLUR0nhQ7wD9z5QeEZq5zJye9VgWFgHVv\noreFs59fwmGdvsqmjJSl/76h7wbBVpqZnhb6sj+cdNdQFFIoT9OfdH+pix9P\n0kIf\r\n=mk+l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ceb2fb3edbd37b150567a95006f536aa0f287ec9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.10-renovate-major-socket-io-packages-ceb2fb3edbd37b150567a95006f536aa0f287ec9_1617395009101_0.691523220569999","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.10-renovate-non-major-1f88cb38ad3d047f1253e2065994a7b071cda63b":{"name":"@balena/jellyfish-client-sdk","version":"3.1.10-renovate-non-major-1f88cb38ad3d047f1253e2065994a7b071cda63b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.10-renovate-non-major-1f88cb38ad3d047f1253e2065994a7b071cda63b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1d99eb671c5158bda47520fd05a417054ea1e5ba","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.10-renovate-non-major-1f88cb38ad3d047f1253e2065994a7b071cda63b.tgz","fileCount":39,"integrity":"sha512-rsGSlDJxSY5PloSBPeLdBg1jxHERuopSAwJUdlcaCus0eWOQ9YfMcrHv47pMRUh2CIbFcxSdi9rh6s8aa3NxKA==","signatures":[{"sig":"MEQCIEHhQxTUvjysUhDek7VlsSuv6KzrLMj9InIa/HmudHrcAiAcqjLQrq9WGSja9OShqiq4fnb+uIvWPSpTK6lYyuBy7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ5SCCRA9TVsSAnZWagAAblwP/iluyh9ij9nvJB7CMmGZ\nUWvkqq9/o6DuHNT+Wc5cW7t6H/P5IZ4YrkDYmOroqmvx57B1nyF1smt8bP0X\ndkOPrYV2jlLFsVVkz53g0AAt8OdlOj9KF8CwI30SxZ6xvQosSI1GmvXSEhZP\nb2wEY1eB7rrAakqm0eJzV4pWx9Y/fIj1kVgkQCGNd8OwFJ7VK1tBBd+p6ZvZ\nClE/S3XXmpPK39am9rJluNE/z9qgdpK3KtjmiPVkQsxRYSEkzVeHDuw/3SRd\nlGFaQ1x5jTjA/hbufPsVAcp3iE24QeKwxxYuUBNkVsxJ+9ZP1DBJmoykXiKj\ngVe9fvSC35Jp0O2Zrecx3lx5Mb52WAXv9xplNHurKBDJTE8mT6fxFnTzSmC0\nrS+RG1TUienFZ4/GMg4rtIzcL2VMentmgOnLMqg3qjVHfCCSiD2ULf4WUUxQ\n9iPlAd1N49PrVni5X64ETRyrM3LuL1Ut0rfNamgTyrEiiD80KpnFnB6iKtJh\nZeqGd5a21cCcSdeyHsTaK/DzqubyoYQN7lIDD8HvKvQTOricpjfMeMnsYGUK\n5W+Pw2CuaMldu/fwX0T8HD3v5mlDiEH0MTDw3wSdDJmHxGDF25iMEv+34maE\nvLcNWdAKyl8M9TDtFwwbID+t0OCurGPVKr65P/ZtOKcc4us3h0sVkoKKD9/l\nRC7f\r\n=1RFM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1f88cb38ad3d047f1253e2065994a7b071cda63b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.12","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.10-renovate-non-major-1f88cb38ad3d047f1253e2065994a7b071cda63b_1617400961997_0.9160160051359951","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.10":{"name":"@balena/jellyfish-client-sdk","version":"3.1.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2676e61ab56aafc2c7cef7a584e4594221f3df70","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.10.tgz","fileCount":39,"integrity":"sha512-UIJrKgiwmPHGWoYMCi7LS4CYoDeMTF0o3hNqXow1s1SI1AwTtUPE175Ncb3wdyJxLDJyTOm8rLArkm+b5HF3Fg==","signatures":[{"sig":"MEUCIQDWe4hHTOjwh7UtSrJhSWM7MQUgVPMlnr/9ovfmKImQVgIgPRIQiy8uBaO0kGmS3WU3Sln4vOQPTgDjFMI/WTqk6k8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ5U4CRA9TVsSAnZWagAAg5wQAIhfXHKXHrH0MTd0RdPv\nILb/elAyXC/bUmoDapBkY1WHdcj/QSE2jShZeEAS+4K1LzHp025ovLPq9LU+\nFORIbHJQGP/v1Dzkb1SgPEcS6zfnu7XBXWiw1ZHMF/gutjF/Sy5/heCThzfz\nmvgD5vB3DE/dJ6aOSyjRATd0KNwYdOpCkRumkL824+BjkD/O96+Ggj8LV/IZ\nXEbFS+St1l33XjsDvi4lG6Tv/hDr0En/2LrAI+PebbGGWHHiP9F/xVsMOWjT\n5luXdlgIte1EwlAKM8uTB/vJWOqoCYVJanl/4UJXW4kd9VwQDXlu/ZMLY1mE\ncIMZl9c58CCK230QQydW94HGpYOJhDyZ/n1fu8rf7/TaUwUgp+mmMooNjzC9\nBDHKDfHB4ujafoNNNHKMOg7tO7hyotQerEbPKLEFeWUi8vC92NjljLHb1o9z\nxMzu+bCXKlycm5zMyRmRutC7v/wZcNwbXzC9Ynj7eQ7Jolv6Xf8CkUzQwDjf\nxYtrrKQvc+qh9IkxNbZWDrAMyI4Q/4mglGDMZsGFXlM19cJdUptCWFO0Ht20\netzJXe40w+N8Hq5CgBywkQ5yZm4+DYvX8YlImRjQPCejmt8bWTrD0FiqYSpz\nDZrOqfY+xi0z7gzoS6iZXD5UO6KeEoNirkQVpOttfHNBAggqOusoSnBQp50S\nlL2b\r\n=13YO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e92a5b8c80f1a511b7f2f1113583d907cc06b5a2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.12","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.10_1617401144183_0.1382993629449849","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.11-renovate-major-socket-io-packages-e6bc2e6a1d78b3ec3d8b3004d79956eaf0ee15c0":{"name":"@balena/jellyfish-client-sdk","version":"3.1.11-renovate-major-socket-io-packages-e6bc2e6a1d78b3ec3d8b3004d79956eaf0ee15c0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.11-renovate-major-socket-io-packages-e6bc2e6a1d78b3ec3d8b3004d79956eaf0ee15c0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"48fe63afdcb726a95e1aebec6a2597f43dc7efed","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.11-renovate-major-socket-io-packages-e6bc2e6a1d78b3ec3d8b3004d79956eaf0ee15c0.tgz","fileCount":39,"integrity":"sha512-8pRtBfv6sFtyHlpV+vsVQs8ZXe9IncyE03pEyS3EXqu3F46r2Mb+jT4r5/3CLcTvil+4md1eJn/XZfqm5+3g5w==","signatures":[{"sig":"MEYCIQDvQ2y7UJ9aw/hs+VHw8e4Fn4+mc7RACxFoPAvlhtlxmAIhANtLOVZb9z9hY2DUkIsxXTPC8Kk2n7IeVcFhrXEbRVCD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ5YZCRA9TVsSAnZWagAAnq8QAJQIYZFR7KnA2mCDH1XI\nYGiIzQB4AJFTdIxtyZFNontJSkghAKdFS0fniiSj5PhiyVJhbTsjG6zRB563\nuza+pfP6F74UbAPRyl0W230O7/58VIlnawF6d/5I69RqGJdwpSik1XNyR+bK\nM+LCblYeFnwzA3N+tLnHQaBhBsU5eBaRd8vtRaK5yIdRWwch7KWoZjNaE5sB\nzMD8rlDx8D95qMPJr50ffaDeX7FNk0eo/ehTRMKTTs/o+whpyPKe9BVb3ORK\nSmAXkbQ2b0bJINfdeegKIRoE3NzfSw/DrDxcB9EoR7y9jXdP6hP+FyeuJ7HS\nlbTuHUyeq0ckyuY51yDMN17utYa2tZXggxODVhoznqxS3faGeIMjDPRAaL7d\n9VNzikUvcjjeQiPlnCekrnvGhV5EgSQJPHF8kAM5mQnuw1wNGoYSWg6kFCkW\ny13GMSrPe7/wXb9kTC3HUzFU3Ki0uvA4Exur0enKHPrvdViEZhBdf1ZHh1Ak\n+FbhEFSBuGI9+9q8mAb56DTvNupfJWL9it1k9O1uhflyEm4UIvKR+qeNAvvv\nzgg4dBJnXzgkQ2UmRbQq6NORy1Py+nLPSDpukuUCKnjSyAnEwq/tcumxSxmn\nU9RKAXXBwz5uTSf1aqTkBe9UmWu++rOmh1fO2D72z7a3v5YMVYqUxPfBZXlX\nJSXN\r\n=RL2H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e6bc2e6a1d78b3ec3d8b3004d79956eaf0ee15c0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.12","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.11-renovate-major-socket-io-packages-e6bc2e6a1d78b3ec3d8b3004d79956eaf0ee15c0_1617401368488_0.20774875118615688","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.11-renovate-non-major-371d39b39c47a02fcdd7674d2b522f21f27f8d74":{"name":"@balena/jellyfish-client-sdk","version":"3.1.11-renovate-non-major-371d39b39c47a02fcdd7674d2b522f21f27f8d74","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.11-renovate-non-major-371d39b39c47a02fcdd7674d2b522f21f27f8d74","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"35b890a0b735a32d23a6687f2d09a4ecddfd0e9f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.11-renovate-non-major-371d39b39c47a02fcdd7674d2b522f21f27f8d74.tgz","fileCount":39,"integrity":"sha512-5jzfqJdASYtZFdZ2h8MRThBbSyEgAPTX15BNS48gRscictngjDGRSrFMf8qGoQGVnYJUTnPV9+0j8BHKNUNxXg==","signatures":[{"sig":"MEUCIQDAXX7yLfRXtH+EgXFqdvS1xWU9rSFFliEehm1GBqjNjAIgKVJqtcAx+pbWJDYvqxtuThoXUQLAmBwzuG7+98RpUF0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ65pCRA9TVsSAnZWagAAEuUP/2Nh/y0F8zxgsv/MUjJD\ng2QBLdo/9oOGXrsoO854O1mQio2g/AtBGyTq1W0EOMzL+scrzzMEopSSLY1h\nhJ8GmKyT9cVE1xnDjJP46TPTIEt+gfQREWfh2/OZFyE2+vPzWCcSwJmFTdHi\nP00Ak+4z6/RQFBX/0VKs47oKWdc8zKV5MqrSmmQe8CX5N+qVbCrftow9+KrO\ncQIhR3OHCiiBjbeoZZWieZTQ3wPTvfSAN9SV+1UaAeL9p1IK7B3Tk75j4t4D\ngfdjmLlEQ85DSVcYBIc+7f9BXbtC7X1Zqn4vQbP0MHgcGXqUptpwj5xVEPH5\nRb1pu9hXCLMX/iUQAW7Pz3XcwFN7JXt842S5K+BzqaSA44an1WrWtFb2ZjnE\nVzLRItJ1YOJkoP15GRHf4PCH+HZ2ZG2k9pNnjiFdGHM9cdsRRnPFBVhs685B\nsuYCPnpLykdaREyGe7XO+w2I/6G42zSlsNXCFzCp4TGskmKrKc3AeGCic5TJ\nF0lhZS2ODP4ml72NUGQ0+5q6KZ2e7d7YTGWtBswQudakVRKu4Fsr9SdkZg9m\nLg5Pu/TSNSMsEEEkpeGyveV36vqUXtMxODSb/bhHouyKzhwwrhUecCxWQ6Pw\n3Z1zzLSHoS0EPLbH0vJ2fcQCapPa0jHGfRs47mQ3pSwqGvqRGMD6nNKwOnVT\noykL\r\n=XQ5H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"371d39b39c47a02fcdd7674d2b522f21f27f8d74","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.13","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.11-renovate-non-major-371d39b39c47a02fcdd7674d2b522f21f27f8d74_1617407593169_0.7219379586262771","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.11":{"name":"@balena/jellyfish-client-sdk","version":"3.1.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2edc46bd69bf522ebb5992f9529ab3a599c59435","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.11.tgz","fileCount":39,"integrity":"sha512-nwGaUQXISL2z0KTWBm+Sgnczn+pifJnALRLdgHq/ZKgT+o3a6PhuBd7YBf/EnolU1zxor+c28NIv8Fyy+5J5Hw==","signatures":[{"sig":"MEYCIQCU1EQcNxfuyzPYG6KJ/4A9OYPabAkB+gcr60nfBIH0kgIhAM14hHlbhIDeLrravkVpZyG9gOEypYcYEXdtTiu5eblj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ69GCRA9TVsSAnZWagAAhBYQAKM34W3z3kcYwsSl415W\nULil+6o1qOGnSsLaILjfg0q1+/86vtEPT/L4htt2i2kuvV6ChBf7xuniLuPr\ncT190xl3ZyDzWpxNowNKAsLeJLl9ZWrTnNHtVttZcj90Z2a1qL1famw6XUFh\neMS3N1RbeAGKVee3Foe53PxCCgH5TkzhPXYMCbZi1g0pLHj2StedQx2phTmG\nFJwLRCiYGaWn14z4gEgiPc/MNtu+/HAtiYIX2K+pYUKcyiOVHM+sWZV4vHv8\nHSFXZh/S3+jxsWW8rjOY6MgHL1ax4Y86c80xhDvCBK2QcujirMtvh4sWBEdN\nof/npPeaLV/zORfxTHNn/w7RQp8V/oQLS9nTyhfYyI7okT5S1GYePS6NiB25\nX1GgGOY+FA8tURfD9PCYrfY0JeXcYqwzui9gbAhTWBt/CvemJzTc8jy7X+R+\nnArTX21PKzm08SkaTv3/XCs/EpTco30No69G8MVNx9prPn5nDggeEJ2LeB7d\nSbcHWXPUyBGBMLM1GXS7r1DJIY/I2O3xLzHqALqtvOWPM33OWCRCHTjaIPCp\nlT7t37Q5Gt87gujR8mBob+pxUvKPBVghea6fCDFSuJH9NTYJmJMWN6Hf+TJV\nxrYOnLNmlyIEMq2tQiYPx8Pz5m2YoCag/DttdJrsKJnH9L1nNmU0/N3OJ/DO\n8px+\r\n=i1Z1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1038b2a8d36b3137da7a0ad1e15aa4ba84a2dab4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.13","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.11_1617407813762_0.6390845537183927","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.12-renovate-major-socket-io-packages-99c0be885c624956f640c8673a6b9f0682dbcf0e":{"name":"@balena/jellyfish-client-sdk","version":"3.1.12-renovate-major-socket-io-packages-99c0be885c624956f640c8673a6b9f0682dbcf0e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.12-renovate-major-socket-io-packages-99c0be885c624956f640c8673a6b9f0682dbcf0e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"705992141945791e6a8c3e3a9e208280bed72c70","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.12-renovate-major-socket-io-packages-99c0be885c624956f640c8673a6b9f0682dbcf0e.tgz","fileCount":39,"integrity":"sha512-QMMezcMtLRIgeTPCWXI19przzLaRmMS3NkP79HYQqOSCx/h3k4+UqjLPiVE8gy63Xmog3j6lAgg380GD4GV8aA==","signatures":[{"sig":"MEUCIGk3oMWJALt1uhL38i4tzeU1CgnRxVb9T+aFz+pgt6JCAiEAnmvFS4hFie2ryAOzmY5tMXmRSowNS8HNeXLlfdj9f8E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ7AeCRA9TVsSAnZWagAAODgP/2vWocQqf01IIIaMVfO2\nfC1a4OWTmmeh5MFAlQeuxpNJvDMdr3HFETEwbyoIZRy2pD+y+cbOOFJmW2l1\nHtqaj9EcfBGm1Xudmc/O1a+6csPaV1WGALqYFc5dPjzyC/GHFzVt95dhKz9R\nZAAUt6OEU4vGnlDRfW44vRBnbr3NwVQQMgih5pDyPapnOxR4G15RhTVOmjid\nbIYmvp5UGQJcXXHjEK/t0Nlc3CzAsMXKKOTulcYy36t6yco7qiXAHXQf0sTY\n9mWgbVSlLy69ooKlNMxAxeOw2dS+rMZd1b9cdAw59tzD/UqesGnOvDjNcdEJ\nZO5SK0EURS9Bg8LaGEI0YvIm4Wfjns+Q+faAw0NBJd0uTjxtXvgoUYYpKawX\nS+cmv26MyyMwZxPC693LRd0D0t+y9rhxht2DajqOdh0jCEniI2pf4joCnpDy\nuDxqZWg5EWFikgk2rT9d4TNU5bIJWAdfG+cyKcqNFZ8dSVK9TrtSvdUdrHOj\nlKRYL85+Hb3+A576gbhzjHK4XnBPkqPBoo7vj9elAj+PDnhbUmV+y93diKbR\n4j513ZKGNpyGkl7McK3TIuJlmb1I8EdTRggRfbo/wtSf59k/glbdA1+PWrLJ\ng2OpnrfWhgfwrTX+SqcCNm27nNT5ZzAU+zXohR/jSEwvehQxZpknoN4WsC/j\nsJqT\r\n=Lgi1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"99c0be885c624956f640c8673a6b9f0682dbcf0e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.13","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.12-renovate-major-socket-io-packages-99c0be885c624956f640c8673a6b9f0682dbcf0e_1617408030074_0.5506978063805206","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.12-renovate-non-major-e1f968301953ae6d4c41169b831fc351cb28f729":{"name":"@balena/jellyfish-client-sdk","version":"3.1.12-renovate-non-major-e1f968301953ae6d4c41169b831fc351cb28f729","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.12-renovate-non-major-e1f968301953ae6d4c41169b831fc351cb28f729","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24b3e75a57074d0a56c41d7396481ef5e08d93ba","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.12-renovate-non-major-e1f968301953ae6d4c41169b831fc351cb28f729.tgz","fileCount":39,"integrity":"sha512-Idd6CVuBqDOJ+ypZGAKWQs3BsH/6Tf1fbofuC+1gJqWw47VhGp4RBUkht33iE1mQoG2RYo5UPRmCjbWPQ7O4jQ==","signatures":[{"sig":"MEYCIQC1bwPSxlA9+BbmzVbGiaONbp6g1Ve2irFWdaAJ8wQrYQIhAItri6DMLsicHaT5JG1KigIdFrW6qBsTwghepvg2O+0X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ7sMCRA9TVsSAnZWagAAGvwP/RYoT5ORkl6jZ44vB7Jm\nFo5XZsViX9kISQiEzmGq7e/aFXuxTvweyvxA40qIVEqIz697VnYQdXJlP/kK\nMETo6RUZDuTlq3AwrSrZ8WCaxw8fxiuwso7fqUcE7bXGCkrjCXtldS44ZIDG\nwFVMj2O9Hd8skvL6ISH75s5ogiUBoKJ/PV2/6assDsVsRiGCVJLgznpdeUDw\nfZtoKtzoCy0v8Buu+ToTpAGqeIQmt8z2B9v0ud6wIN4B/tYq7o94vX1q1NWW\nNhOdbTivFkF6mJKlgQE3+20up5rc4YnouRE2Y4K5GfppVVDo7aeTarixqY/T\ndbSVdlzn57fVrzgZXeASNP4O+ySg9uWqxeVqt++uJuH3BG3fzeR7m+YRfRni\ngL924TR0gwfNyE4CiIcVFcT+bT+CQE/vs6bnHlJF4GVZT4ZiGb1SBzAVuBQA\nAuJheQJGgF5Oi2+um5O/lcOJS0AajwcySb5JCpXAWlESNZ/R2MwDu0bouCHJ\ngLzRE9OGz8GMm8TjfKJsytpZwp/q17ZCh1EX8Hm/rQx5rKldd3iWREHN03ar\nCjX3K8zQx0LfDjzWqqBK+yzFbnjUb6Z2lak6NeaIKDpw68fRLwbQbTANeEAr\n1A52a0oYreTufHQBU264mGuKzZlmXagkeGakqr2NUcSd7kW97OL+UGsWydQU\nbReP\r\n=9F6v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e1f968301953ae6d4c41169b831fc351cb28f729","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.14","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.12-renovate-non-major-e1f968301953ae6d4c41169b831fc351cb28f729_1617410827874_0.7821589501914701","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.12":{"name":"@balena/jellyfish-client-sdk","version":"3.1.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.12","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"16d6c140d2c2b0959226b2ff7521b7892750eb25","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.12.tgz","fileCount":39,"integrity":"sha512-T1hdoRsGZlTYj0gB1kGraxNqDymCtKNtQwS0W5Q1m1BLxOs+UWnkVkIU9J5GCZ/1yfV6V2LqbsiFpOt2jAjzWQ==","signatures":[{"sig":"MEYCIQDS86QO0l3fbGeInOxXj+/QTT1N7R97es9KvtC9MxJdkwIhANP9amX+JWliuQDIQaeuRWRjAfJOPPNbfOp3gvigL9Wg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ7voCRA9TVsSAnZWagAA0MgP/27i3sU1WVpfCwSr1+3k\nwAY5jBMLqKgX5yaT5WJUEkXeo9p7cqMqzVE7KyQQbeawDiCKkdV9hWEocONs\nhE3Yoyx+xYOyB+egy+C2fSvvWf59RzsZYu6u+LbawFFGLZnHMBrOxte65HH8\no6OdTF5SLM8/Fq5rXZwaPfbh9P41eK92BoanWnMhs141c9Q4To9WCsGlc6Fb\n9SubG4fkGXkZidQoeuwdJoEszII/oJT02ztF//4nuQHPIoiELq6Gq8ntTwYT\nAtbenn/uwkwj9MOpBpTuoC+tR6lxmB/schtSOabCbAZKq9LRjm19G80G6cTt\nORM7+rSFfKH0Q9QA+wQ5TbHmfV1Vk4epBowIlvU+RTP3boZmg/v9mTW5suyi\nJfn7WqkrwYaE0ELE/FVlMIlrOV9mOGTt9VgTorLiNTcJux6uCfIdvezOlMpF\nxcW8Vvyy1ioz6Od0TJZgkGQc4SVdOFYH9hhnc1Q9D43S91zc+Xb5KCOtKfwi\nA1sfRLY2l1H4vY1KYJAIm6GXeufQ/soxJnV9xdGiOcNeaHOe9cANC+/sssKt\nd7hFp0JuJ8+wYFKiLCY8jJ2xFypWAFr1TaNmokrMiYKHAf9LiD7Po62siT7G\nnA1esViyhBbRLFsVAvxDim7QBoVa+JaCHkMkl/FfUYiAWxLfzeX5Sp2i4GHY\nsFvG\r\n=yKHW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a4cfabee35b6253ff65fe8c07c8e028b0b3641a1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.14","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.12_1617411048353_0.44859673738917216","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.13-renovate-major-socket-io-packages-a77eb635ee75949138a4d6cf9f2b18a468827ea9":{"name":"@balena/jellyfish-client-sdk","version":"3.1.13-renovate-major-socket-io-packages-a77eb635ee75949138a4d6cf9f2b18a468827ea9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.13-renovate-major-socket-io-packages-a77eb635ee75949138a4d6cf9f2b18a468827ea9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"02fceea9706ad23642c383a5f56824b1e42a7d58","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.13-renovate-major-socket-io-packages-a77eb635ee75949138a4d6cf9f2b18a468827ea9.tgz","fileCount":39,"integrity":"sha512-Cvk5w6/+oF5ViVVfHRNNBDwhSFvggc7C9QS2AdT0lTwXuPCqkZs0Lejo0f7vtrX0uxRHJg/ngmqdUaTjSalVnA==","signatures":[{"sig":"MEUCIQCf2qzKm8PxLzBTrUieu5/OQySC/BuSFM2lPduP4wHkfgIgeLucGKhWHEODm4BalpFtIRC1rKVVOalKnWH5z+rJ0Ng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228084,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZ7y0CRA9TVsSAnZWagAAPWcQAIWQbsow1kPYwxqO0iok\nPLx9foFD6jRcVyl/PReaVADR2FiHmdwa9XlaRhFWYLT4zQlFjr9DP+HdpU6X\naWy204ydsT6bWKuvRtl97FErN7IqQZk2OhHXxgbInFN0c8/x253xo7sflDtt\npW0vlW8yIom84dTfSPGc+cnopiMrI/IoTV71XUnl/CmoV3+YCZw8MLTgUn/w\nU2fJaugBoPSKgHKZktIU8ktufX9sbKrYQFH/nUYfNExyjmCyW734MOwQ0Osz\n9GNIImRaWZ6Rzhwfh+7VRudM2pcOjr8ZOFL35EwBz/4StgJhkHB9oLrbKpym\njKIdykZzmUVFfxu4xk+lp9Oa9rwljdCmAMsdOno+ncdS54rI60+2P0sppgr2\nBzh2c5RAqjkGyLkoDdymZoQuUTLtT33IAb84sSTlR++/iIwtH7Aaa+aWaa+l\nyugPT3hTCgPPsKxqF0ndrqVrgC9+p/4xRCQQbOZA3ZHK9YeJJyvPXluBZZQ/\nlquLAG/DLRZ5UolxIG7kwmkar/bELq4MYKaELffHm3VLJvSCn5lKm/6iesI7\nU8q/eh1sHyWc7elZoV7Si3q1GBgNxmKXXvArJg6iMpwRVpQQiwy+kIeyMYhB\ngrb5UCbYJQEBWd6QnsLG3KP0VvEQP/dG9nQ8ubDpJYUkqpwCVj4aK+8zZZ5M\nItEP\r\n=GToS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a77eb635ee75949138a4d6cf9f2b18a468827ea9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.34","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.14","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.13-renovate-major-socket-io-packages-a77eb635ee75949138a4d6cf9f2b18a468827ea9_1617411252277_0.6419063406280945","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.13-renovate-non-major-68357d07d6a34f3ca796a7de88ea1092c6b803aa":{"name":"@balena/jellyfish-client-sdk","version":"3.1.13-renovate-non-major-68357d07d6a34f3ca796a7de88ea1092c6b803aa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.13-renovate-non-major-68357d07d6a34f3ca796a7de88ea1092c6b803aa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"739cd3a0bdab1fc5fcbd762df0028ffba3ae9f94","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.13-renovate-non-major-68357d07d6a34f3ca796a7de88ea1092c6b803aa.tgz","fileCount":39,"integrity":"sha512-GIRvgjkKHh2T7tevXTQLDVPxRo+yQZCzulYPKIN4x/PJ99241OSQwLkYt+RlyN9YCYNiKFkwGbbMku1gbZ3wmg==","signatures":[{"sig":"MEYCIQDkCFqBso6ZlVxl8qkMVEmzth9b/Z+z1D8SoCPcyllpaQIhANreRCQJKsssvyOWqJkkD8Z04j8wosH0312DMUwQiQrh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaNkmCRA9TVsSAnZWagAAsx0P/1V8v3Wf4a3M9nN2ZIVx\nkrYW2MUNPSp6WKYd8oq3Z4985AtIaNYXZ4TW51y+VodiNvmUhqs4/D6aVkLe\nkjixWakaBe0WN9VpuvmdLU3tx+EvB0ObJGQNXl7fUo6y2ocPmd/pUcKowIeE\nRAsz6pcP86b67KQU5lQNh9FIzMEWsMHId0POd72Y5LLN8ipHII27hFynLmG0\ncAJ7DMnJc1nd15IU+pssLn7P8KEwZ0IgQwLX+mT3H33tpwS1Xu7eLjCMWWd1\nBadj+7w5cZviF9m/Vb0ijQvYgEXwrDyNIFNJ+Ig7WY013i85nsuRtZmYSr5O\n2aIRFD3dAa56HeRfK/mv+J7UGHvyEJgcpN1A9q1/eXWUelP8HAG1rxK7obsf\n7imbRobybRUloUezlnlJFhSChTfUFB08jpxbpypfZJ74P8seds+45MA8XsrQ\nQRiHmOGoEdYy9FTNupHZTVoPhWr0eiehPcHoF2UtwMipx65Cv7eM75P1XJLv\nd9K0hW98QysZHPzI0L32wC+HEmkiumg8fYlHYyohgdJDtUXpErSVl+biOWAw\nvQKIYL1Ld/aLy9iU5sfxbrX/f9XHAVoTdtzE0i//VbHmGN6j8Fk10RUM5nzh\nzqZ6FO4X2vHUUmk4kLdaQ8oMjpBf4haCriUhoZkoHmzmgNAC44Zp+zxpdoyK\nIaNd\r\n=uS/R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"68357d07d6a34f3ca796a7de88ea1092c6b803aa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.15","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.13-renovate-non-major-68357d07d6a34f3ca796a7de88ea1092c6b803aa_1617484070230_0.6237952789086594","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.13":{"name":"@balena/jellyfish-client-sdk","version":"3.1.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.13","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"29476b2e2bb3a0d20f2dfdfa631b3eaa4f801e84","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.13.tgz","fileCount":39,"integrity":"sha512-ONdC+83HmuDGLDr4Asnj6ZxWMuBQA+BWY+y1sTxGLCQx+hEQAyK2MF5MDckPQjU9talw3VCcnD8m3/rUV7yD3w==","signatures":[{"sig":"MEYCIQC8OxZyS6Bg49tVoGf3U4WPJj1gnr1saYblOEzWESZLNAIhAJKgo/KyNWrCR8C3h+nxMz+D883adiYf9+BHFzba3v1r","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":227985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaNnyCRA9TVsSAnZWagAAuf4P+wScGdARM6ErIuCmz4SH\nF3x5/aStX3rXzBmWxnpTsdEsh33dYd3fqlLMa+e9RS0BSnJMipkg+N83mDLR\nr/6wwujDDMKNNI2roMDVWzFhjMkJDM0V1OX3vlEFDfcjyIEU1VRqCoAt6IXj\nTZ+nVjaftoU8NjySexkTUrdFyfdFb88r3nXV8CSbWdKVtivpOtYc6dhwLeAA\nbDOz9eMP8LoDSgROj3yumq0UR7xGKwBn69Q4E4oRm2STdl7S4ZmWbhUuug0x\naxHRggcviPZGRZfaEODtjVthN0ZLa3xLSwerv0fv/S0H68/fqnCQyIFfyuOd\nG3g+JdGeZGmTzU9jhBrJRXR6Q/5l/ZgsV/57p/K/I89pf3ldQC6LavIs8jw7\n4+6Oqcx9d8TA1gMqspfqP8wKkkKiRszn7zpMhRsk+VFWuE+CYuAmfa0FRm91\nurxdodygxrREaN8xtDYG3ikcfzcO4+gFUSPLnuk/UodyTb7YbvzCZwA/jzyC\no7vkSsdo1msc+ABKxuybrwIPko+j+kN6NwKa0tz6KjBEJD+ijXRAC4u0qMRm\niLk2NUf5n67VC+5DgM+H3ZD5QVDVRYG25u0c19pstGuQaM7hH+X+IMQoSIDC\n+Y71hP+m2CMII3DUseU8EiGL9VuyUkkmSgW+AwUX4lN2f0WzI9XzMEw/6c0m\niNIQ\r\n=pIIQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"57b015865f035c4c281ea01da8ee70375563ae8d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.15","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.13_1617484273771_0.8505278301946781","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.14-renovate-major-socket-io-packages-76568210268c337c44cd3c8a88162486b8a89a22":{"name":"@balena/jellyfish-client-sdk","version":"3.1.14-renovate-major-socket-io-packages-76568210268c337c44cd3c8a88162486b8a89a22","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.14-renovate-major-socket-io-packages-76568210268c337c44cd3c8a88162486b8a89a22","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0e54bb41358735692d80b47b67bd7dbafeec58d9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.14-renovate-major-socket-io-packages-76568210268c337c44cd3c8a88162486b8a89a22.tgz","fileCount":39,"integrity":"sha512-oqFxz7uQAxE4Xvx4z3pSoI9ailKJdz5ZatvDcHUN6LqcsvZOmMlkt43fSeZKyU3qFpDYBQVw65C3wkelUpV8EA==","signatures":[{"sig":"MEYCIQCaGrUr3WyLWi14m1+7UhcRcK9YJqwGgwTJ/itbCd3v0AIhALWJDYxW35geMDrHlj7KQrX9qqiUSapARliGTn079zs6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaNqwCRA9TVsSAnZWagAAUVcP/A5WpWc8DXF/sw7vs7fI\nyhztX0ztSY8Pmsj3lz3V0l88Guie8+xx9hHrK9rnt7vA/LxXEKJ030Bj5Bkh\nO+xoW/q7hMg6LaXEPk+fDXFyxkhU5uO0mqdY+gk9ben9qUibnSlEqC2MoJG3\nLWV7BRsq2MTaarOAfQmIPjTCOHvx7c4aDHwoLcXuHni9Jg2ld9aK/wI4QJsm\n27fbKeZFdLzZYXJOm4yUCBUwOZODRlRXpFRUq1SJZXxtmUkzVesa5/+TIaWl\nY9Qi+nDBx/1QnlE2cCfHnsovfCnfhgJN4Ug9HLsK2lDzYi8apLHLbTtnkl/h\nvUg+tnkbdOiFZZOcppetDxDeuUaQ3OIIeCFG3h3PIumo7bIrClNUq59V6hMw\nC0jX60vgUPuRFuJgXlho205edkPOWC5OKeTe9OK/7PRsBzNdnl2kAal7b/YE\nHrjmYyy0NvGn1Ocx8mUTMRjs87eIu7Lr/hjeLOF+Tg5INiEpU2wjKtb0gg1R\nokiFDQAirBdzIT6B1W+MBgBYNK2VxHpUw8R7nmhmFlXkW+5ZQwxWSQjp3hau\nOBoszf3pq1vhXOCmynQSFX6uzbq8fE0DYsCTZg3GRQZHOQUzcCS34p5nK2lz\nwdaXBUirigazNvoGOjtopLZmoqE3yQgeGYXwpSO5lHKdzQfMmojodZ9gw20g\niTfg\r\n=Ipol\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"76568210268c337c44cd3c8a88162486b8a89a22","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.15","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.14-renovate-major-socket-io-packages-76568210268c337c44cd3c8a88162486b8a89a22_1617484463577_0.4397446162825194","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.14-renovate-non-major-823d19c843228a9f80431216d956ece6e08c57f3":{"name":"@balena/jellyfish-client-sdk","version":"3.1.14-renovate-non-major-823d19c843228a9f80431216d956ece6e08c57f3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.14-renovate-non-major-823d19c843228a9f80431216d956ece6e08c57f3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ac8d4255658e266e52064f72ff8fc791e0c8c095","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.14-renovate-non-major-823d19c843228a9f80431216d956ece6e08c57f3.tgz","fileCount":39,"integrity":"sha512-ZPyMNbFWQXqMuGwDZ5NwZvVScNNuZxP4NI3zKIFMwWqqN63GVNJOFE6Ya31levdZl18m+wLMv/puiGQ7hOhpaA==","signatures":[{"sig":"MEQCIEm4HjB5JteEbi79hmGpIemmU0umNVTI31u4YKGNFFxJAiAdyqXXrKLKIlsfnUuR2t5/6xWJ9wnx7bBIKqcXlZALgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaPfaCRA9TVsSAnZWagAA6IMP/i9Wm27WzkfXU974PaxD\nFqf1hAnEnDbN7DNKhs89Txon/O56ZSo1UECIH5oYkSurZVGqjxlZ18fvkTkS\nlU3Sld0mFkNI+liafCGV6CseOXaB2JSV/bd2pjclPRZYo/gGot/jxKpNtiMb\nO0hy9XMNFq1DFo7nuDceTG1SqprcYPKdPKHP1Rd6bpw3TDqoL1rOUJAoVtKX\nb6suJ72i7hS/TAG2NHd57EWCxZUL/ztLFy+N1MeWIqmvL+nNmjPhONVXEah4\nXGbRGYNrQaEDZjbQebqcdeNvlaJJ74oSSez5uu91cgt+E490BV/TChTYvRjq\np3p5BrHN7qtzBO2aIW2JSu0j8nrnjap5BK2gzPzCOFZHEpmUi0A0gVFCfcL9\nVwe0GhFcbad9qr7akdbX9M55aoiV5b6cXUnFbvnx45CsPuzXYbUv9/thQ/Bl\n7/fNPajT6lr5uckm/oUeXHA2ONdjvPhyRO29RxvgUb+hHj4YiSWz5vt3I7IF\nxakbqyMw1bwfFA5u2lvPaTXVKWidWxAig64qUZbXFIvY2JxS9hUehPfHNfjn\nVkb2GikqPHLbJdqze1JOvD3zD5mZNdDt8LnGlnUHdDj9crN+V4KooobKK81b\nSxeiwV+BljorXAZNHKp6eIkHaoxiin0zAgjrEVAf/NEPBh4kZ9ikwa738Rg+\nepNB\r\n=ltUy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"823d19c843228a9f80431216d956ece6e08c57f3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.16","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.14-renovate-non-major-823d19c843228a9f80431216d956ece6e08c57f3_1617491929527_0.8786084356703647","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.14":{"name":"@balena/jellyfish-client-sdk","version":"3.1.14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b7ab82ca8851cbb4b4d9de3488fba1ace33fed32","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.14.tgz","fileCount":39,"integrity":"sha512-qhFP4oTScyMWEZcoxP/ANGbDZ7jAhhMKXy9kIH600C5ckM3UOt4ZULxk2dAP8a7+9DciNvzEtqBcFRZ2Wo47lA==","signatures":[{"sig":"MEUCIQCtEefitO1nfqoceodndsHWbglN9090Ql/EpuOcbVlNSwIgBrN0RJAsYzUgh8RYjP7PiWxKeNwYMkKMFbOeq/fkUbc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaPidCRA9TVsSAnZWagAAlPUP/3DmNHG0dwejFmu021Gf\nNbHn58FHN7ypKl6Tt2WAyxZcS/rw+r389xfsuLaf3PejWyQBHx2aY6mxoGwU\nzARjH+QMgQCIprhWpa3AlatAkR86mTwTYRJMlyyxUylH5xBSaitv3pngccSP\nBK4JlbM7QYU/eRtiJ57FW6xJwNzlh+65MSOeaQlCwQ5DFURhFK3VLMdQiNdM\nYMyRTH9fyxeNFjL9XBGMzgKKWx4Gei+j8TeUmnhPCZfksPYErRNm3hZz86KY\nnF49Say6oyWkEQ0oYRKwd0PPQHBUFCDfjjFGQ10673ndB6RV/7SsV8tc0QRV\n2ZNaJMK3Y8GQ0PTuxvHl2HWfifBnns8sG4O9XgR54/LUEI1DAN0fznTs5Bmi\nFmoy6tA6GSU7ZCDZpLTeIpKT1kNfAdnzjPDMvDiPo3L74T2OfCmWseZROtnt\nCSVixiY5TXY4r5Q7Pd/orbw0i1+FNckxyxG/CeRl1seN179DHExU8OpCD21J\nLCAF8szW8L69AjrjgG4Tm7r6Zo8piBkkVL/oRWgTNfy8MIl6MRZtHRzgFXn4\nFoJ2YJ7nUszjB2+nOJxyFXLNPTp7HlNRHFctA/dVQB+PZSZAWJyswCIf0k1s\nTSDnytBwoJ5P510cwFMIHBI3ypZDZCMYN17tInpxesP5MYn1BhpA6uPQ4jhg\nTuQY\r\n=j+i5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1d1bb35fb6139390c12f97c29b4c320b775ba9b8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.16","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.14_1617492125410_0.7549589583207337","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.15-renovate-non-major-74ce41e13ab10cad9db8a76125c8d674bf1f0cbd":{"name":"@balena/jellyfish-client-sdk","version":"3.1.15-renovate-non-major-74ce41e13ab10cad9db8a76125c8d674bf1f0cbd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.15-renovate-non-major-74ce41e13ab10cad9db8a76125c8d674bf1f0cbd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dbce933ae9da8b685ec3c355b9ae72146a40ba54","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.15-renovate-non-major-74ce41e13ab10cad9db8a76125c8d674bf1f0cbd.tgz","fileCount":39,"integrity":"sha512-6ef8vSdRxachH3LKdxgF2ORw2HGPnYqEYgMfQhCEFEljIZ0//bhqOARWdlqunjGAsCz/BAFBZI8UnJA8u4VXTg==","signatures":[{"sig":"MEUCIQDeWaJtBirmlOhw43r4uW4Wny76JUmk5fQBPR+CD20vrQIgLG1crg/yRaDyC2ff7PUevJZuVUVmyscwMm5bxJ3Js0E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaU1KCRA9TVsSAnZWagAAQYMP/3hJHJKbUlrUpG3qV6aS\nk2M5+WlEZks0n1Rm4f9GCxCOd/1YuC+3cEfHPNgeVkC+dO8SEhPstkTBSsnD\nlrypc2gFDBRw6OwkOgrqPJ+ZXk3jHELSBlvsheGbHG1cMhggUzfr3crJPe5X\nQhMOtmeSJPN2IngD25h9j2HKKRvb+I9qmOra7xCvA0KZUXKff+JrB6Zn5lDS\nJ1w433SmXzXoGIZGRFtc6x6+AVNfug+teF92nUfu3ZqgleoBsN9gO5lWRqPp\niRe7IRHDOsL3RZwbDhIQCu821RuHXdLeb+frI2eUfHJmZnMA6TAUVNnZwyUB\nKH4tnkn75TaW+XM7IO7w21eacqg6Vaa0Jvb+pQC2xbxVl9DzwqTpwNnvSS+I\nfm/EnDTx9xjojze+2GxMAYaQC4ERd3xxS1JRdgpDF+mPzMSVcC8bBF+XxIo3\nK7273m+oy4/nPZml8ZTk4iolshQeNAigF+Di+9tKpYZp/DbD73v/nIqS//qI\nNJRaW2aAJl/FK1D3ciENRRpqCAKucCZ8jisQ15vmeCyCWRczQXjzKppY+/4b\nJ7HpTa4EKwh2yw4hXjoEkv2suTWVMnsYNZWSjMQtlff27R3W0/ItksNzy+0P\n0MfvuTWp/AZ0nLXy05hmUBKLPz0tB3Ty1XZu3XrHxQV2DeK1nS3xgSLuyir2\n5yUz\r\n=HCTo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"74ce41e13ab10cad9db8a76125c8d674bf1f0cbd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.17","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.15-renovate-non-major-74ce41e13ab10cad9db8a76125c8d674bf1f0cbd_1617513801866_0.3614869133876455","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.15":{"name":"@balena/jellyfish-client-sdk","version":"3.1.15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.15","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"18ba0dc3c91f1d7c516b3fcd96a75d590fca014d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.15.tgz","fileCount":39,"integrity":"sha512-H45bg7KlEoo636jxMhmu+ImfK83ARmAdwIw+esU5WLnj/8TkKpJLBMwgqJ0K1NLOp/bCRRS2nW2OYg2+1eLlvg==","signatures":[{"sig":"MEYCIQC/HobkynCw9ZRFi5Y5reSJv36g2+whZSzR+jjE5l39QwIhAMG3EZXvSJua2nqnzIgU4vXahEa++F3poklLGhPptddN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaU4WCRA9TVsSAnZWagAAnc8P/1XPa6DZiLvTUJ1LeMPt\n0JFvGvotnvIo4gYyKhN3Znu/fXKLI8U9fWkNHGtb6yDG25DGl/TbAghb/DqJ\nyuetOIgaEfA41v67pyY5X68VojzRm7WdWf2iVtWpvl6CRs1w/krxLxED6DYP\nnAGyklZlqoEy6YW90oLozd49x5HsYTsMtrvGGZH6YXZ0LEKuYsucMRoao/A5\niFizYdLYHrBSxtxwr12lrHmHsYx/eL2IYV/qKLJYw2mIYp/UuxcJjAOVLAhu\nwkZUGTtrnEoAGxXqmkHQe9p6o9gPXdJqaaVBZEjVZQIFU7f0FiW5V4DbKZJC\nA1ypXOwySrEiN5QpvFL3yE88IjtgvVpN4uJ17R9LYZVyC3rXi6xCZfZHT0rf\nY5lyDD8dFDJ9E5ArYv8HnHMoQw4BGuzqsrgCkjwHV7gwDU3DWsCOPpVoELy2\ng0+ObMxlC7O+TKOmRp9YFoqWT4YMUkd9NAbOYqwFkXl62MQczsg8a5ux83G9\nutboibjZmlavXFVWDvaH3FDWOObz4FoHUAvTo82xTY/qKbONezrpyLRD3xyI\njcQKTpQZpuwqkOVQFVQY1607TObVL6TL4S+6Yw8GmtjG4S0fv5r1PsYNL2Ed\ngfy33tpFfjbu3jA1vadPVACnSdoao2qeknRViOqIUB+FNvqID2RYeNucsN1c\ny+I6\r\n=3Iz6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d986ce2e366b20aab830c148446e152155a4ca39","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.17","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.15_1617514006405_0.35389824467922404","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.16-renovate-major-socket-io-packages-1f919936fe1597f160adaa0d621d179accccf939":{"name":"@balena/jellyfish-client-sdk","version":"3.1.16-renovate-major-socket-io-packages-1f919936fe1597f160adaa0d621d179accccf939","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.16-renovate-major-socket-io-packages-1f919936fe1597f160adaa0d621d179accccf939","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b16ebb4616e49bdd8fbdf6423188468bbd3fc147","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.16-renovate-major-socket-io-packages-1f919936fe1597f160adaa0d621d179accccf939.tgz","fileCount":39,"integrity":"sha512-JyQPm9j5SRg0wzIEwAtigDdFDXxJY+k1Cc5XGlnT956VpnY3jaOXSUyUrQOIdBH7mE6cDNaNQm++ItqEh5ACSQ==","signatures":[{"sig":"MEYCIQDTn4jqDhPM2yOn/+7JegMmoaclsMnbsCwBpNC7xhtEAAIhAPs2ktykHBv7sriFCnZZGi2ISQKRCuw99VfS+07TEyNU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228354,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaU7zCRA9TVsSAnZWagAAYpYP/iA/PRm46YXK3KWYr5o4\ndPAd8QBpusiqaMmKdLAp8gkTzk1PkZoeVfap0/742SI6Ck8Ul7NJdfbkVxYt\nZSyQmyvYBOTXtSXGdelyzjdiKAOloq5fXjISmcaSnIQnri1k7SY4Ld/mNMu9\nPCt9ZGOBeR9vEwd1Yuer4ZJFL/WXMa8xo4/ytPnTgRGwZXOJKjnQL6kPC263\nWW66scHqLosy4yvan+/WRo6FrwtC34q31tVL5waYF657aBMxGOsELH3m6LNN\nXu/AOzwLxaTPsRTjFeBZC+a5K5CPvrfZ63SF382wfmMSoyIX8OX3js0mByes\nE4Gf1sYqRMly2LtePzKF0dl3hJOKWJAujDBXFwnw/w0InJhyESZLxuV34zRZ\nrNt3evH1mHKGQcVYJBF/aftKBKy8GVDAYBjfcTOrLfamdNFUIowkKnNjWe8Y\nAQfuwCBgvymGSKZkMCuEvu1jTRywCM/bJMlKCr9gFGVsi57a7T3C6pJX2Qit\nDI61inbEM2C6LxclZTJGgszFCGH95E9UJejyHutRyz5GNdun4zEK6Xrw5QFx\nlTEGl8PIlpuqmEXzDHbcYOoOl85nuoMFt5mqZ6cADNvkL87flOhxWq4iP9dF\nxC+KE49muZRRtFUJE5HgsSviJSYcA+GF2umx0wVsqZWOpdoG/VVivKMWePil\nUjZZ\r\n=JVZD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1f919936fe1597f160adaa0d621d179accccf939","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.17","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.16-renovate-major-socket-io-packages-1f919936fe1597f160adaa0d621d179accccf939_1617514227025_0.8931982279457815","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.16-renovate-non-major-44821d85e436508149cf87488936118eed14f8cd":{"name":"@balena/jellyfish-client-sdk","version":"3.1.16-renovate-non-major-44821d85e436508149cf87488936118eed14f8cd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.16-renovate-non-major-44821d85e436508149cf87488936118eed14f8cd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5313bc53dc252a38b0be166d65981ba50bdb61ff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.16-renovate-non-major-44821d85e436508149cf87488936118eed14f8cd.tgz","fileCount":39,"integrity":"sha512-qKy6JVilaAwLQh06bscp3ycg2Ltt8kTb+/AJ+TjWs+xPwF53xz+FgtxE8isZfp+PrKQipH3u06MrnNVO1zNgHA==","signatures":[{"sig":"MEYCIQChx9xkLcOaj3g4dxQVQ8mmhHUp23nNKTDxaA5YBmaruAIhAKCx4RYeCl6t4g7yoJgIVkA+N4skghvggCpx1p+qU4ii","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaXbDCRA9TVsSAnZWagAAaHQQAKNOy7d4iiVjHpfLcxl+\n6KNQcOwtTvWCVubTmkfb2lw34Mw6F1SMUtfalwe21WfSRDrqABmn5SGzuhbH\nlUBWrP4ANwvTJoDRo/pHzFYPj53kMBAjv1qjra3p+o/v9r4VNRhfMnmfmmbh\nq3GpRfqtzSJHc45c2tLEgZi7wv6e2kpALfLv1hrh3E/0AuxcO1w6ioqhOK55\nt3KqVNpNNUcnbyltnUQOvE+Nley+VHEXWgFnJvZtQXgOZviFH5VjoU/2cOaX\n/rc/XkfKLCKweD8eOGW4HwO5AMOU9qLpCrmz6QWwhf/MlMRH3d5A7rNlMQaF\npNn8F4SKvOS1NiZkD6sbTWO7B2qnAho13jVmLphFphTccGWs3+Bccp9BtbhO\nc3VQGf/zjW5Y6FStYIKtBo7D9R78S4QNwfT6dyAqqx+3JUcHtRFADh0kIjc9\nsIuPFYY8sJAXMpK5NbIqIDFC5ZyPPrFzVzL/XzfNlUUYbOpWQci8u1KRksdw\ndDpC7I5nUkgP01BOnYhAcBk9dQ1CBCXyH792Foj606CxJ0VNdb16D1z7R8jv\nW2tEmWXdXY9E2uyckjY5E4s97iJhAIxedgnjGwh28mga1fxeaukT224UCVOI\nVK8jCI3CEEx9IGikj9sBtzHMXF0WRkCRCJVt48QWUrQq1jU4eBBlLdjJGdH6\nnUUn\r\n=EPTc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"44821d85e436508149cf87488936118eed14f8cd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.18","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.16-renovate-non-major-44821d85e436508149cf87488936118eed14f8cd_1617524418960_0.2223850796340867","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.16":{"name":"@balena/jellyfish-client-sdk","version":"3.1.16","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.16","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2efb29a0bd538d47b94793188218374c865d9b35","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.16.tgz","fileCount":39,"integrity":"sha512-4lr8fi+GddViLYcI3T/PFxkjx8Zx9Hfi5ZENIZlorqGp20qseejT3qBmirQV4ilujc089Ctl3bxusYbgB9i94Q==","signatures":[{"sig":"MEYCIQCdli10baPcdmHsTBRLdlCqN7nZiM2Pa3Ar8OaqkGOX/gIhAL/TW+tUe2Aj8kCMz2G8p4Rd4ULWTzJiPcQCLojOUe1f","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaXeNCRA9TVsSAnZWagAA3M4P/30T7+s1KdaF74GLCt4g\nfiBPHIet2/tLquIgGetqVtsx9eiyAih7gOHhRDQgBaQmQ7MfzsSWYvY7o+OS\nkDu4UPrqcpyRIq7YdSwYhZimOyG2/QOTzVB674uSxOTu9hasgjc+IaM9YtRO\nolGYt+6++pcrEeK5+yoVf4fbPEUvMtAp+8z12iC81DkvCPeiVNLeK1XmB3WH\nx8Q9cCnZ6/QcArK7tJFeSuffz0SfgX5JjDYKu72+EP5HFCSeDp8u1FoH9Fy3\nTIo0dJIR0/D454OkRTAo3pbNUxBMSHGzGBrCwdrXtOc9NL1nzkq+o7u9kDbe\n8UEoRMlFLSCbDQio0EA8jOpjoIbladHljs24YSWBK8zKDxi7gXhQ5QokVebL\n6JOLZjVKDmSy3ZUmMHzbz8qerrLdte5mF6ASaH/i52VSZ/1hnltSd8MAcCTr\nAE6yGxXl7wS9LHpjhz7NBU8ROHlgCzmSYQvxGogmyTdbdKEZNjDrUYsdeWiH\nCx1Uycsv7lBzKr2Lypl1CqHwTsM1fX/rHzMyp4gIAm3iFh7c5+wKOr6icTaX\nFt1GX2VlZBlmOeUBonMeP2xzsjaae2THeoX8oO3D8BC5sbYE+g1dy1SPd8lB\nXpGhBvmOCsIyRwlm469tkOle9Y9KEcs0icjIkGTORG4HYGdJmZS0ck0782HB\nmDdE\r\n=EvKR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ed96a86ae67497d058b34d37d61209b67d5b4985","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.18","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.16_1617524621384_0.05978463206773332","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.17-renovate-major-socket-io-packages-52b112fd6e36f8146c45565f7c29e911a184d470":{"name":"@balena/jellyfish-client-sdk","version":"3.1.17-renovate-major-socket-io-packages-52b112fd6e36f8146c45565f7c29e911a184d470","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.17-renovate-major-socket-io-packages-52b112fd6e36f8146c45565f7c29e911a184d470","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f0def9c21222538a8aeca3ffd66660c0703c1fc8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.17-renovate-major-socket-io-packages-52b112fd6e36f8146c45565f7c29e911a184d470.tgz","fileCount":39,"integrity":"sha512-70rBe9utP7lUEa5Qf7N6JhAFqthTnf0ZjHs5EgJb0ELX4XJGXGa6Mz6T/S9uEwNyGiqBo4gFki/DeTOEJlFyQQ==","signatures":[{"sig":"MEUCIDOK1xVSxBbRTAzzNKpVP+uK17p3HXvvTIrJC00SFuc6AiEAy6TfJsYb3+poHZs0szqpPtyUpzEv0W437VRuk5kbIs4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228456,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaXjDCRA9TVsSAnZWagAAhToQAKM0I1CVnFZiBV2UY3EI\n3WH++of8qsyNV8LOlw0ZbuQ0HkSXUMS/Sf6U1HvGv4XpQkxNykGenwQxpFgx\nVa7MElX/fpwAGqF+g29fPl9wiatml4bvDr0RWqbeneGUKN+jJQ+YMwKEA2FC\n77ZLPULEL4eas6tuKMRaCqIIXQC3VXvj2GQwtWtvmfjZ5ouRytWwnbSw7oIi\nXFPji+8ZllpY94oAzvQspE9e3LlXyn52GWrvBImEqSnMs9IWsJVxhPW1S5y1\nF4Se+zbNFtqX5EZhS+m+XI1rNXUSg+OvCjv3fDG8MOgTBCrYI7mEnSz30qwH\nVPWDfQf1aMu1iqhR+2dxfcBSM1bVgMV9znHExvAjUHW6HRiCA/Uy/bBFS8+a\n+Vx7Pay6ulqlyJkuEG32IkFw326k6HeUxeFrQLcclUukyGivzRmA5KjHgP69\naTDbe5xtIEuLWcI/eIqB89Ws86BNqUEAIv73FEDBC+dWuIJtEjiknjp2RqKI\nmslt0x7zvvfEPlZfcsfzg0/OHFv/au/JkoXcLkBzY3g+p9Wp3raZ1SxIt8MN\n3IyeK4furwoA2fFk6Ib8F8yYKivOFnuHQFTJBp/sYiSXAQoh1pDDnutOFeP7\njvinLybca5I5oGdkneyJlJaL+XtuVYmX6J+DmYRhE+O25NOVjoQagLWea0ss\n0dmM\r\n=xcuC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"52b112fd6e36f8146c45565f7c29e911a184d470","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.18","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.17-renovate-major-socket-io-packages-52b112fd6e36f8146c45565f7c29e911a184d470_1617524930882_0.17338921859396383","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.17-renovate-non-major-d63965786840c8d49f3cc04e30d3f532ce2c5121":{"name":"@balena/jellyfish-client-sdk","version":"3.1.17-renovate-non-major-d63965786840c8d49f3cc04e30d3f532ce2c5121","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.17-renovate-non-major-d63965786840c8d49f3cc04e30d3f532ce2c5121","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"18fd8207d0567fdfc7dac6699814c04b25952b65","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.17-renovate-non-major-d63965786840c8d49f3cc04e30d3f532ce2c5121.tgz","fileCount":39,"integrity":"sha512-/Yi5llSnw0A2J4qPfxYGREQCilzjPwMzO5cxZ6ybPKcFpLcoUQLBodR6mq0ccEP9bxdXZokvqyKFcICSREAtnA==","signatures":[{"sig":"MEYCIQDOW0ie/GpHmZbTHRW46sZeDBPGfLyUOOVFV7ZhWbel8gIhAI2idF9oQTU/BedixvbjKVRKPPyEjmvO62K7o9JuR7Rz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaZH6CRA9TVsSAnZWagAAL+cP/37tYyP6SjOlfxCPjesw\nIy4OVmnr1XRyCQ/utzPMHzAgdFp0pvT2YpUQ/9msZrRceQHlTmOuLCWx0tev\nK+XtjeMFXcX2pKbl1+EL4WzzhSidGcVgiE//M6etHeAUQISuSAhnjKtFWF/q\nTm2qPPKG1pona3FWWbCAfrUi8FFILjIxs337FIh+ci5XkR3bcFiH0WyuXFYn\nlwTFSm6s4GHNHiy4ZnyPb0XgTdgPG51yfx/zjKBO5320mqwB7RUy1uM7FBl9\nGuhsTJ9dFkAT3RtFmbHjkW2r6smIyY5HL1tX+BgyZ7in8ykqqsJ0xcYBVgyE\n0E2NBCWADvgWS/GW88JSkZTc4An/Ibg5XXMtAS/sDECqo4yPgGYabPmp7wUb\nEfuOl15Je6f3R37HwLD/juEo+06wYgiUBn6emTIwusFFBvHJ5/b1gphCP5Aa\n5sdWFjtz0h4sLe0WBIxlAG1P/dBa0haArshCJWAPyUvWMPTcDzBt+Js+foYc\nU2w/G2SVb2zalYY7x4f1RKox/Ijzq5fcQctTl0n2BGi8KRGL5Wbe+YeKl3on\nO5QpkXtsm3lbToCs/K1xTEr9nddhx6R8aIGlGJQvnnsWGb34s0WoBZO12tov\ncevmH4ylUIpDgcH08eqwYo3vJzLLPv9TbW3ca2aFNt0fi2JkAvFw1kJ/Vj+A\nY/0t\r\n=k6pM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d63965786840c8d49f3cc04e30d3f532ce2c5121","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.19","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.17-renovate-non-major-d63965786840c8d49f3cc04e30d3f532ce2c5121_1617531385453_0.23450345340707823","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.17":{"name":"@balena/jellyfish-client-sdk","version":"3.1.17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.17","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"885dd2e5b876fbb505f2b27b8f6463a875134eb6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.17.tgz","fileCount":39,"integrity":"sha512-1s0F/LI+4+FeOdGdo5WrrpLgKptwVuUs2zwOkXwDFgijBMjAQnE2NH4IAFly4XM/DSjMOjOk4kZzoRb7VvcETw==","signatures":[{"sig":"MEQCIH7eURrzzs5Cvqc8PoHAVTGiGNGrhGjz9npxrKaaBhZgAiBqJr65fCzCSM5zfRSCTg72wGmcH7yAP7fSO2Iqlg5Hfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaZMKCRA9TVsSAnZWagAASx0P/1uWpeFrBKgfABsnt8FW\nXXvaj8rVXgSuAuz95+0dIulImQzKI8Wf5iYXoXBZNSGQk4/5wpG+HnvOho+A\nSAelbQuHM95DRXK7BKbmwDHEgygcxfKhDJnqMZBFlNPSZOmLCa8i0f0PU4XU\njBqogtb8kUKiNSArmpBOjfVMwLwcv5tMJ1kRC+8ffwTg5ng1j8T3u5UFpwic\nRJv2RbeIlJMUcnR/KGts1IqtQNe2KHJDWw9/LFw8ZwtZbcn8SFFhIWK9JDQy\nOHy1kv3DW1RG3uOGaP0y6Q0tPEiXI6kV3yfrAuT8BFpyi+T5Y9uPeN4Nwzx3\nhQ2GftIuPdoFnKcIESP8DM6Jpxo1kKBksTBcpxsYm3xX2JZRweE1/Na6YgdA\n2HP6sVkS6kWJFFICu5vaIJvG42uFN0eFCt3+ntjSg7M3wK7a27qCw8qIJDwZ\nAyTIgkGA7b+VN2wXC2ZJcUMS8S0qcCLYYSO82ETiSSEzLEvUChexqhFtDG0K\nTM7xpn5PGlrNVRRiEZF2TrYz2qW5i4+Bzu1g8E3jfS9Dwio11g1j6WCAlCpn\nwzX5QqvBI0CAplM7tmZSv4ALCGWpi2EYO5kF6sOyvCa5e1+bVYdrKGkIOtYi\nIyEbwKHHRww4sVfk1dFS+xtlsKX5WJlhAkawTRktkey17y5MpvU8aq5m2sd7\ngtyg\r\n=HpUS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8a6800a0101599e9857dfdfc73ddd5c5c7e3b12e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.19","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.17_1617531658115_0.42404083331257736","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.18-renovate-major-socket-io-packages-ca66966429f0366d55cbc5e81d1a3edd27299645":{"name":"@balena/jellyfish-client-sdk","version":"3.1.18-renovate-major-socket-io-packages-ca66966429f0366d55cbc5e81d1a3edd27299645","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.18-renovate-major-socket-io-packages-ca66966429f0366d55cbc5e81d1a3edd27299645","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7bf3d2d5eca9d99ca17457fa6fb93630eec2ff22","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.18-renovate-major-socket-io-packages-ca66966429f0366d55cbc5e81d1a3edd27299645.tgz","fileCount":39,"integrity":"sha512-k/97XbgNvOm2PCGCPoXCmOS1CInqMnCk7ufQZpMIyqN1yvCeC4ekuTXsY4wQBVvo+dekKOoLgKZdr7hrxgoAEA==","signatures":[{"sig":"MEYCIQCqpxasM5H9wmPhBTWTsifGLxeLV8llvt7PBQ0z/iFP1AIhALk3qgJg5/I0aeos7fgQb316CibDTypwHd3oxuD5A5WP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228558,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaZPICRA9TVsSAnZWagAAO/wP+gKkccACdwz2e9GrEhYu\nHW9BvzVJ8D1ecL/tRs3X7drnyqkgHUm/uKO0KEgf8iaC38dkmzr1FR6esPUA\nS1IBcVQG3S7QM+pXjmW9nzmiGL+v2ID2KaZ4KMCny7cdwQGiiWm8gNFW/rJe\ne4r3p4JRfBs9N8R5BErdn1LASLEVZbMVahvovFjwcGcAy3GeagZDTYg7yXmT\numaPEZbRvUzn7V+wi0bKlnfHRd+ZSx1MbtESbxndKBUqMvHGplKCqL9qoNeK\nZfORI74vxgmsVW4b0NVykJGVcex1VLdd35bki4fK16xTpd9EmLFXBFAqIW8d\nZ2Y/mOxLvQtSqKH02bs0ARDBfBDKnbuIy+Uspm80PW7Q/vvvlHvphD5OAtEP\nCUE3JguF6e6O3sBztCSKrlQVmWPYoDXtL5heBTXD1BqVcDHmwi+zUMezH+Zz\n4uqwNqsnCUet12H60Wy7y5SQU2LWQmgYdMvMEuf3l67VpI85/37GKRsEFjfR\nMRlGWzX0PT7P9ykp2VRVPiOvCA6ViCsAgabjahnx4XuBOanHwPHSQi4M+hwr\nG6O0dQ+y1h4D8HIqkquWNtxkX/NRx0qVXCJH+HojQNEqmRXMtetI0AttK/7e\nSFdha/GbcbN2Hy0AzJXcR3rx5D2SJ0JmNILaFH2mikrNBzOj94INgg3/0jgm\n3hZ6\r\n=ukOM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ca66966429f0366d55cbc5e81d1a3edd27299645","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.19","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.18-renovate-major-socket-io-packages-ca66966429f0366d55cbc5e81d1a3edd27299645_1617531848235_0.09779903909866094","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.18-renovate-non-major-6a53279c270ed823ddfe5a9a00e179a9db01d330":{"name":"@balena/jellyfish-client-sdk","version":"3.1.18-renovate-non-major-6a53279c270ed823ddfe5a9a00e179a9db01d330","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.18-renovate-non-major-6a53279c270ed823ddfe5a9a00e179a9db01d330","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e8c88d00ae484ffcfcaaa84ec54fc5077e36934","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.18-renovate-non-major-6a53279c270ed823ddfe5a9a00e179a9db01d330.tgz","fileCount":39,"integrity":"sha512-Bt6KV/ZSh33Z+V0LGurFz3UZm4ZAvG9GW2/Ew74UVRDgkf6IZvwXd3WPo7XItCGIzp2DDRceanbuwJM7mpSTwQ==","signatures":[{"sig":"MEUCIQDqH7DxhCTC2wn3si7wOuiRepOVHAGUdogMkzRTcVBIDQIgbS2sBkbf3DD2R6FgPwOCWw9w0OBWHFxGKVfe6dpQqmA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgak7jCRA9TVsSAnZWagAAxucP/jS5+DmNYTc+wEspk2IZ\n8Yzb8QO/zcCsYBVz8uvBBGhQ/vScGoLm2HjIEFZJZG6/cEjyDkQlhCHnz+lS\nv+a44SUYxhCqIGHCPnGiac5wxRLmFltnj0A2g0Pa3CxV9wsWJ3tDt7SewV9n\nEgame3twAQW+4T5zV6+LtM9oLTbBHJnjNcOuVQ4ukXt9lkzJif+j2w0VNxpK\nWNG/mv6P39DTiTy9AGrSevW0fBzPuFcGXPcAQ8rBoHZsCYf8F1yWmOuP8eWj\n+GzpPmo2Czsk35h0c/bGKBoPewK0wxcqUqpRIwZKfZfI9UVL50jb1QPWDZUa\nxtc1OFw8q7r+ODajF4ipVAkjvOAKT91JBPAZ5ywLGarslZQ51O3vKdQZ5OEv\nwFtt2xN35t9UrTI5WPxp1BzCWgAndlCv+NqBUQJYi1U5DgFkk3vD82i+xxRm\nRH1FrO7KQrrZIOcc8ehjRtiVOZWYIivmgrzeb36FcWCUB+U6M+orFsPGnE6p\nGDVrrAEfmse2Y0yi82lp0EdRIfg7zxcZd0kXgFyz9k4dqUEV2N8gM8octaig\nPCh5wDPclzKHU948SayA3wOjy56oeOclv3BlGjiiiAg1NYxzwFaJ8/BFwFzw\nyAZl9wT4KdVVAbSva68hm3X0rmhoxgZc7qjsENiEpmPpFLqEG4KSzJDIKA4C\nfLjH\r\n=6dWp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6a53279c270ed823ddfe5a9a00e179a9db01d330","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.18-renovate-non-major-6a53279c270ed823ddfe5a9a00e179a9db01d330_1617579746999_0.29035938193626754","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.18":{"name":"@balena/jellyfish-client-sdk","version":"3.1.18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.18","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5002565d88613231610cdd79ff84b95138b758b3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.18.tgz","fileCount":39,"integrity":"sha512-ahu+huDIGX3J5q8PHvDw6dDAyHN2ceLsCrHf+xJ3muZI9y41A/Q/oAOM4CQs7G99DyyUj5h5uwtIB6bNgzLlTA==","signatures":[{"sig":"MEUCIQC3PpH6fwObbOHTDeVqyRbySCEfcDR6Ly4nEtH3w2+OSgIgAWYoOdO5jgUCmc5tJuYrhdS8Ej5Q5VXm3bkQ9MWF3Is=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgak+fCRA9TVsSAnZWagAAfgcQAJ2zF54UsKHDeWQoiFLE\nfXENoyTOTaZbopuk4LxzHRc8yr+eWT9Rhv2DusnTM7TZio9h9Qawv5S2WurZ\nNG+HU6qYzqAzRzURD7XycRTUQRsbjIHKElxhYZFnVq1CbGLJN0JRpNU1YL3R\nFmFIxMH4xI/ln1q0hmj/rV2JpXmBfB/TRq80STmdfvdEGykiBZIZwqKrpZc6\nAUTwfYVqhKPwbcdBWWg52kq3k5SRyEO2Dv4g+0PbYfZaGBi88uKHlTH9i+e5\no0+FIRZWH+s22AfENX5SdgmFnay7DT7lHNFLlMhFHLZYOpsSJyvXkDB2vDsC\nCMz5TRtpHgw6COpTT298zqeRW7QqUoIl+e8HFHbkMrJfO04zMmZnwHm01kJn\nWmr0Rl6J3Af/J9MhvMTLJPfIEYGgCNhiic5dobpO4CEU5pxHDvCP3AjW2yIW\naRy5fRrc5aH64eMemKKfualhUEmmmGIh14bgklJt6zPnd8SZC+893UKHw2SG\nu1trwM1b8wMKb9+yrIMhzDqOBKfwy+uzV2yzVKpUogAJ7dEvqICmgGWPNClv\nJKiP0JbS9gb4JAz3iYjmWE4EtJBt/HR4bOJpQaZRgSwKz13JBZx4gNteKIxw\n6oQ/9zHExCUxaVYixvWg9xQNa1p6RpqZlQVL9H6k3+Y5ySM1Jd2iB2NQE7zY\nw2ej\r\n=6I6k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bf7a251d4cdc2f32d7699936d44295639c25eed4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.18_1617579934516_0.9006091199479522","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.1.19-renovate-major-socket-io-packages-a5968d570bb4e1502abc57ada09c9f5230831f69":{"name":"@balena/jellyfish-client-sdk","version":"3.1.19-renovate-major-socket-io-packages-a5968d570bb4e1502abc57ada09c9f5230831f69","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.1.19-renovate-major-socket-io-packages-a5968d570bb4e1502abc57ada09c9f5230831f69","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2c2e6be2dbef7089fa73385c21fa97f2913acfce","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.1.19-renovate-major-socket-io-packages-a5968d570bb4e1502abc57ada09c9f5230831f69.tgz","fileCount":39,"integrity":"sha512-ZPmoYtHcdBO9egONRA/3yk8ZzNQ/fZ3PI+ZlYlpjOvF2hZ7uWMvbwPzvNkJzK0537Cf3zxMPtIYLU70PiRwR0Q==","signatures":[{"sig":"MEYCIQCe0gKRUy0eOHo5KH4sxBQOpO68BUc5wnOyXLpE2VvNOgIhAO1smGnJtWX0Mty7IkmsSI82QBBqrbpDZ0aq7OKpjwnq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":228660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgalCUCRA9TVsSAnZWagAAjMEP/1ZzoOG81GG3DDqmHtm6\nRC8V+NUGslsZggmZSOSw7W6WWPVN/gf76MijpiZW4cORgmqZvEwYkzKMf5nm\nKl3oASoyRarQduKL2XhL1F3HDrT0q1UOf6R73nwhw5Zpqp4LMxysJhIobVje\n20o08bkoIVVRjCZ21qm1Zky6eAASzkHShR4wtjk/AzcJpMb9NLanFD4NlM/+\nGWB6y0smEs8wAXV6ozIPD7e80DIdbin3cVYMnMNcjlYphZbI1/BItjk5UBjR\n1atmWo0VsVH3u9qDicFNUomFEAquVRM++Qz/7nRx0hg61pIPEeU0MmIbNRlg\nWOdjswh5V12wTweGla/coWVflQzYYoei6ZmcXVaCOz4zWqRyzkP5GezzRF1f\njNmqzQoSWpS+U63XPDoStI3yImshRxsID8xfy0gWB6rRhbBm5hbkeshkwL2E\nLeliPja3EGyr2xC5RRiUve25g4hC0X2/j9qcU/neYlmhMTklOYiSiH8P7ABc\nMBavMxvOeGaavMfTG/5woQ9NCtxCRu7h1jo0CgEnWtFBxrMotpsJjvHUl4Uz\n4a12isQ1YWXS6igNprGyY+BTf/g+YuMtooy3aq2xQhoDuz8Yiq/Ze8K0xR6W\n3XNAfNvheepzyUg1dRlFeRwQOgoPbefk5HPRYKhbvFbGT2kMQTmBJtvscZwF\n9Cii\r\n=Niqt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a5968d570bb4e1502abc57ada09c9f5230831f69","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.1.19-renovate-major-socket-io-packages-a5968d570bb4e1502abc57ada09c9f5230831f69_1617580180173_0.13780157278610594","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.0-export-links-f7fb01bb2c31d094fbc1ee114eb568382efb3690":{"name":"@balena/jellyfish-client-sdk","version":"3.2.0-export-links-f7fb01bb2c31d094fbc1ee114eb568382efb3690","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.0-export-links-f7fb01bb2c31d094fbc1ee114eb568382efb3690","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d1df0d6f78224c7f2363f8cd75d7f741973e4a3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.0-export-links-f7fb01bb2c31d094fbc1ee114eb568382efb3690.tgz","fileCount":39,"integrity":"sha512-4Y0sPJcGeVhXfXBqVCeoHSEBdxJwi69/xVihHFLTza7KMTEm9qRdVQtcGabOf7Cn2xWvR4w7SACcEPoaa7fTdg==","signatures":[{"sig":"MEUCIQDCzBx0N79w7PByJ0ThLimZgj6swEvhBpeRomQVAdn/twIgOjhk2SeHGC6xE2Zaxv2tn78xsEFyP1dFkDnJky7wcCo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbEagCRA9TVsSAnZWagAAkQoP/R5X2wez5S8jlck1ZNJA\nof44akGTtIrE8LBeEcOh3PJd5/E55I0cvE1DH+6OmpVZTCZzGVNVKJ5XgRHR\nh6dN2X+nBWgV0kCgjgt8qPq7p4rPGkiM6UzNGhMXceT97ftWCchi4DZb4ugU\n7JXh2/q4UWS78BbdYgmj7ZgKlPIe3i0q+osQCj9OkFFLDGDiPn9m7Q7QY/jA\niC1A3D8Bu6Dmnw+K2h6oye7ZHl6rhToglP/Co9sD6B0RfpNVJgva3LqMNTiD\nye/R6qxzZxHopn5GvQ2jv6QTQ0+v1/3CwRNCllFPMN7MG56LWW21bZNzwako\nzP4ueobQozF0llcab+6O9NfDxR4fjOYooWkA7ZFLt4SFR2t1SuQOjdmNYQyr\n4Ao0sC/0dKcG34GplUfBf4cKZhFIZhlJ+kZCQn3H2nztAx0CGm7cGU0+Efsq\nEy3RGNhgvjPEhyZjknnL6QyNH7We2PY6hPmGFiGRN+POrcC9nGs2gnrWInSJ\nsn6AB+Lxa4vtpPRRkCMEf53e08GmNuk7rQqXOpjeo+qam++KNF+VGUxct6Zr\n0hC/NPKEqtSIJitqMrUT3D0jfhhTLr6osJZd2aDmUN/mMO3jXwx9EF6s4I/3\n1baerxlGkFW9UXtFdJ9ZUHAB11L++z8pRGKvk2Wnx4hmOCM9IEQLmy2OryXu\nWoc+\r\n=Mpl+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f7fb01bb2c31d094fbc1ee114eb568382efb3690","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.0-export-links-f7fb01bb2c31d094fbc1ee114eb568382efb3690_1617708704242_0.9877207996535524","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.0-export-links-03907424283e334b495cea95239b1b50d371c165":{"name":"@balena/jellyfish-client-sdk","version":"3.2.0-export-links-03907424283e334b495cea95239b1b50d371c165","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.0-export-links-03907424283e334b495cea95239b1b50d371c165","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"446a39740dcdb086aec27a6e37f7c1742aaa1036","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.0-export-links-03907424283e334b495cea95239b1b50d371c165.tgz","fileCount":39,"integrity":"sha512-RXzjSdtB7ARnxMD/3Xfae1UP/i2pAoxT1FPXmgnapmCEo+QzKlUXqu0vqah2C3Bk4W/zv1msFSHY+fRd+0im7A==","signatures":[{"sig":"MEUCIQCBLWX5ut3wn5TDRZBh9mKON1YFFc13hq2rjcbct/FNzQIgN6i/0Dyu0loP6lKkoy5EBN/4Sbj7JFrUbN9s1/V+O4w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbEe5CRA9TVsSAnZWagAA9yIP/jbN0yhBA1oxT14+MyXU\njUTFDInHAlAmUrcByDlakJzlm4Ag6iRIMkf+O1EM4nexhShxN5ezBcXHDGV6\nljf2UXQFlRSwxmpdN1qaBIcfLHI5YrmgSYZwbC959A4Ue+0QgM9XmkuC2McJ\ncJyjNU7sONCESy6T+MSN9NxXzCN/1Y9EaxIYLA4xH8Erosd/V5cyFit+Dhez\n9epWUiyX4NIBUDArLC+Ij9QVzz9dX8UBDcu6BIHLeCfg+ROLbiF7Y7Le3RqN\nuLl/JVRC/e3o7VN/E9RDwZ3iw69RdGuUewnK09OVRvGRsf/At2CSG6641R5O\nAQ5jnhC9qZmeZWwPQnetF61cgvpVOrArRHh7dakHkSOA87hEZdP54/yK4WIw\nOs8HMlZvsInArVNP46ryn3SRfaEeyZ182wsgql5ZfTXhRsX0T8cHVXg7cCsO\nnqvyG5bUoXn25ynNvlhit7mQeSM1gC+jKMslpNbPQgsOlpD5CTgb4jFRmjFN\nPT0WVZbVpvfQF3ky0tabMwA7TCTF20POP+o6vj6V6g/iF9Zz2+ZXjJG5okDn\nck5EfodqOH+AeOeGl9zZub43S/lCymfpb8yJYj66Vm32ZIm98UqnDytUx0zD\nnIVpyl6EmA13995sv7ODTt60IrG/8DWX2sfnN5DJbV3R5auw/cp988Ekht+M\n892s\r\n=l4OU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"03907424283e334b495cea95239b1b50d371c165","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.0-export-links-03907424283e334b495cea95239b1b50d371c165_1617708984571_0.09482478617489387","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ff24ac79439ad5b922efbaf287456b5ae649effb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.0.tgz","fileCount":39,"integrity":"sha512-djwbdTkVaipMPimK4GTeqtHVUNUUP5QtlV0VKIUgfgxfVaX0x99O3C5gVL+KBHXDRKSscnbmqsGnKRby/LLs+A==","signatures":[{"sig":"MEQCIF/C6vNMYVZNkv4BP4iA64vuG+E8AxTjgP/gxjhA8l7BAiAsyHQ5NnqgSoNthyiSlDYhhd/3EPwf3ioHfCdSFKKcJw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbEh3CRA9TVsSAnZWagAAq0QP/2SljermZTTg/WwpbRoK\n3SnIR1wGYCsUc+iYI666HAkP3B10wZsNdeOUjfebnVYSzsKrlpn4VeJ6MoHv\nrO3mv9EA+wjkzAmOl5v9MLmvEdKFdHW+czVtye005sdi34eovkBLx3UsIcSL\nCT7GpUnQS4g3JnYPZYPFQH0KHUTmf72GjYVkf31LYQMDMGCnFrfIzvfrn6ak\nfQhDdEfEy5tTnaafDW/CaJBpg7aO9mBIVcPc2FsFuVFB2GzciVZbZK2Uj8C4\ntvmH/TVnurme4adkRuLreYGhISa1zrGZXsFCfSEonvAtuJwXGychYIqCBQGG\nwCO+FXS8EL4Y/fyw1eBX8BmYnAioYVqbSVGjomPmKy2zB1bdbDa9Msy5hcay\n/lABF6z7f0nSOzLcmUi+UKvdECDZEWUqiYO1O1kLLq3YX2T1qzqYBBUnSLAa\nnAWM/vPYxY/YDFDMFUKwBQpnVJ2npbpeLIJR6+ysnQSw0HoC+vzLNaeQVMCQ\nbc28JKjl5474JBU5IQc6xbITbCyLnleqbo0wTviqcbq7ykVbxps0iExOP9lK\n59zgx5kIFIcv/OtUCByMDfTrgj+jBVsZZwQt+5LZ7IQTLH3bdQkV5Sz02kK+\npURqsTc163aeJHivGGj+cMWWoEC149BoCTt9SAZ7HT8DuVMCHruyn12b9Gjj\nB7wH\r\n=k7D+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ea9719da94ea3792fedf71ced4ce2effa2133cd6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.0_1617709174853_0.12906752324061666","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.1-renovate-major-socket-io-packages-5755e49926aea51388977b47565222f4fa1e1109":{"name":"@balena/jellyfish-client-sdk","version":"3.2.1-renovate-major-socket-io-packages-5755e49926aea51388977b47565222f4fa1e1109","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.1-renovate-major-socket-io-packages-5755e49926aea51388977b47565222f4fa1e1109","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8faea9a823d40ef1542726758da9199043ff2c07","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.1-renovate-major-socket-io-packages-5755e49926aea51388977b47565222f4fa1e1109.tgz","fileCount":39,"integrity":"sha512-WZBUkDHxgFJ1PYNw4tGUNnRy08V724mXCMB66vxQuVh/tn6xDQrX5sJP6lV7bUEhXEX5iprvjWs3EuNMDI8sCA==","signatures":[{"sig":"MEUCIQCIVc82F1ri4Fb7mTdBaOBPEINluNGN1Z23fbgHCvmIIAIgKpriblOM3ZfET9TpmFPDLmCTCZld1btAg1YOfwzavDM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbEoMCRA9TVsSAnZWagAAVdsP/3j8bqCEi/9UjBGGIY6i\npeWLQNMLEjiAC0Z670yZ3W9SKji0L+Xogd61siXH6pMDNIfsx/AcShn4nlxV\nVbUHH/ZuIC/mVQfP9+gywDy8acB4P6Hv3qza2usjK77XgTex7Rkr9ZDVIPsf\naLD45CoMTZYmD+xyfEKdn+px/1OGs2VTB35MReiRFwlAHK2oOfLBSKY+iDoN\ny0FfZ/anavLGzKlPFpQugO7wwgV7LEg7slNEfE1sj9qGo3hkiCprN2PB8209\nqez9JWLN6uPvQK1207XVBnU6Fzrl3mVZ9oHQ2OY5wE7tZ2xzgya5zsYcMhw8\nu6McLJFR4LwMtmfWRaBNTw8hxqzM1Lt9sWaONA662OuQI9LXOc27iezo06V3\nEEwK5UP+1XFXSMwVM2qSAi1ldtwRuYkJG/fpN4AiVKli3+VIZQtlP/LRj393\nDU/rfGdIP5icZilVXZ323pUW1rXv1MHLTyeUHzkSETeLGN1GBomntyiE6geE\ndLezx5sZYG5+f1o/SkjuRQghpxrst0VvjiUWhgHBmu+CrpAy1nLbqOhskg4Z\nz19i6J3WISbgJRr98C+G38sSP7eZfh8BR9zngsEgunKpK0OqRD/bZpjWz8+y\niNYtB9s27al9rdcmtb2B1ffuhnkeV389Wz3dHau3z9kOfwCpBf2N2QAjOIHn\n6vzQ\r\n=SX6M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5755e49926aea51388977b47565222f4fa1e1109","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.1-renovate-major-socket-io-packages-5755e49926aea51388977b47565222f4fa1e1109_1617709580222_0.5428694776974377","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.1-renovate-non-major-bae62bebe85f337abc11a8b6f439c984b0e91929":{"name":"@balena/jellyfish-client-sdk","version":"3.2.1-renovate-non-major-bae62bebe85f337abc11a8b6f439c984b0e91929","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.1-renovate-non-major-bae62bebe85f337abc11a8b6f439c984b0e91929","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"89e2790a385cd7841db06870d0d9be8a2b7a5a18","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.1-renovate-non-major-bae62bebe85f337abc11a8b6f439c984b0e91929.tgz","fileCount":39,"integrity":"sha512-wZ1zNyQrCs/RF7zbI4NrAezguawfto2u1KpDNCffwZ47QeaemkSrczy/1M8s7tR2jMk5VUzSPKgkjX9hUBOKPg==","signatures":[{"sig":"MEUCIQDYK4Ve7wHP+kT9rPySVXWKZjhX7Sloe/fZqAAbmP9YwgIgOUxMQPMkz7LEf/KKzmwcR01Sl1I3cUIL/8OIhJ0KVHU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbFVzCRA9TVsSAnZWagAAoKgQAJrlF9riaj86diUtgpNG\nwWGZELpg63ij9lN3uYIFIxPyKReLr87OLTfoPYsaayiPuZGoFpb/KT2vmWEZ\nbdc9Vd/OK23DJD1P7t7zeRuUGnT8FJNgkoJvp1FlC/rzsyIXhPrQL6Xkans6\nX0E59/OFNVPzD94dnj2dOpwqiBrgXGli2fAsyizrjkIql/XEp3vKlmkspzrP\nuU1AYDpfMoh7z3Vw03j+fV1lUkUqVfFzq85SrZntIOHwU3EzMGab1FR68Qfv\nsjTPoxSiZOLn0Xrg9ZyoXanC5weO0Tf+ZwdWNONn0xjHk2q/b5xZVdL8jfHT\nXGQsJqf4nvPWzCt4DAJhRvQICpAluN9Gu4MfSVG3elBAUqvC45Vq/GkBikSD\n7fl42NllDsiCo2wPhIL2D5M75Q0iXRKQXblkadtnBQ8ESoS2oylujtzJ9QoW\n8kqsnnAGPr9niO4BHkJ7eqn6QuQ6AAuv2yfaibuyx7x98bt2EQG+WUpdAsKV\nNYMuKdP2ZljBegAWZB1uC/YdwwyUP+iiQULREVogzvwVYpycj6SBCZQ0WNjW\n2n6dTYG70LoWeM1SjyN2E5YsNMR7CtGMojwep9BRZb3fogESM7Y5M/r2U/P9\n8bZ6Iyazc9j4HDlD4DArV1ZLeudbrWKCXp03d3Z9QD/ev4hk4MT0Pv7RBgv/\nCQcg\r\n=rHMd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bae62bebe85f337abc11a8b6f439c984b0e91929","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.21","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.1-renovate-non-major-bae62bebe85f337abc11a8b6f439c984b0e91929_1617712499191_0.1981306322384515","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a693401e6213bfd4721822a826d1dd6b96e65acc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.1.tgz","fileCount":39,"integrity":"sha512-p7FKUexXqAzphd6dl9iTdZJz+lj1sSyfI8nJIYMZD/XETRuQ0MVq8VY0Bwx5g1ct5veEMONFJXdJP2Eh8UVDAQ==","signatures":[{"sig":"MEUCIBlf8afA3CfDbKiiaTcjVx66ptcCkvRoH9QBssDtVyUGAiEA3oZWyYTtyYJlMGjRTRtfom3gWsxdE4J6OlJgo2MiNIQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbFZjCRA9TVsSAnZWagAAEDUQAIdA/GbL3FrlWaQm4s5q\nQvWjmuKsctuTBYVkJuBbQ/DQ+caHzwTJ22nsPFKhjUSRh0juvYnMbs0rnR23\n5tH6gfFngDYxtIE9gyGJxczZDEJ4Rh/HCo+u/bVy45nlzbnB8F9LZyVL0klD\nYHEz6J3q4E7GuALrR4Uxm0uhFHgS7jcOFwVKon/+sJYixr80ThS+RuL6ZgYX\nlfagpDzQRQQvmQrFznHyINdU6ffDvHsKms7CqBJw+DGEgz+qkOpGZqgquXVA\nQUcARC9rAe+tcyw8WKS6L+ceWw1Xrp/Jv91AZYl5z/T0N4Gz/ub9Eoq6mjoB\nSwbEO5wt5QLmCVI6cORhBAz37Y7PM69wUFDowedKULl2f2MjcddHN1XlvGJS\n4aj8ZTXRtqfwJZeKdW6hVLcXZQ8/6ymIDWdSTaQ7Przu/llk4m2Lf41vJEIE\nqDRVzZxCUAS24DQkR5DWUa9W/thjxD3BoaJfgGhZ9XdI/QkKn3FLOA2UuU3C\nYHaVGyzJOoBXC93s2bMctvCt8gzldLkc3Vmkt0dKC9YfgHvv0X2F/VhYOWhb\n4Jgd/3PWqPgGF7aT4vL+H1UwaceoFaU3HG2ZObXhJhwCoSY60ck4AOBq/s59\nEgHzosf2aRhFXPzBFGTcJ50Ax+9IZP9fLsWq9BmLEAkZMxiKVVL2WW+A3fWb\nko90\r\n=RTtu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"316e6262637decbc2fbf9da9580cae836f15dcd4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.21","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.1_1617712739017_0.49730810740193054","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.2-renovate-major-socket-io-packages-74409b4b79b3428f089340cf2168a45523cdd10e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.2-renovate-major-socket-io-packages-74409b4b79b3428f089340cf2168a45523cdd10e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.2-renovate-major-socket-io-packages-74409b4b79b3428f089340cf2168a45523cdd10e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c888e2ac389a1ce66930fdabab36ed9d486ba3ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.2-renovate-major-socket-io-packages-74409b4b79b3428f089340cf2168a45523cdd10e.tgz","fileCount":39,"integrity":"sha512-hW/WX/elKfN4qEMbt4qvflHsciLBgxZB13Mw0mvsa/YArLIxZmxr9ZmM2As1h27KSAKlKgFl6JybTVahaF2ypw==","signatures":[{"sig":"MEUCIFLnaDw5n1HF8Zp2Bd2NPVy/1P9G77M5+tFf0Xtu5E0oAiEAhYPtWs+2po+AkCEgwCYNGQCQKVNEb9hjs5gVg2XIq7c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbFckCRA9TVsSAnZWagAAK3gP/2OG9G4prVEJi4L9iH6O\n89WRytOPm+eTKNe8a7brlf+cyFAE1AH98z/V/ET2RZbsupCUzsetNfKrIu1a\nRFMFSzkUGmpo5IOYDMmTW7e3mjfjRf+kXoKihOM4au84Zw+BT+qDx+lBPBjy\nk1tqKuunt3+UEGyh0YiFUk/+aMRIxlgBsWstBk0JjJ5SejeGes3MJCQgMgpn\ntmJfpQ2Ti55u7MzLoSllUlHsFq/7g6QIRk3G7XjVyYYnIsBTk0+aBnYbIKRQ\nar/czJqKLbs11t34Tg8IK2sBJMbZsZsrWV7CwzC8NURHQ1q9XqR8x/Yn+FMD\nF4kmbfDCGAMHkw3zXlE6RVB74LIxl9gMT/ggwc6Z/vkzUjNlQiZDulQ1f3s+\nyfMkXpxgYA5PRBJPDkVcCdxmGixBDPNqz4SniID5Vs+Zsi9F/tpVYlR1PHd/\n+RnywptgU031GYJ8Cneho+xVYLkFRJBaPNJ5cnbv7flKF3yb35Te2MXIW2oW\nBC+L1x8e47x40CE4gzA9MOpT1F6TQrvNS67OtDbK3QxVfrl4YbdX7+9NHme6\n/PlPoF25IMyOqmjE3QutbM9ImhQDGmUmZUziYqZL45thd9aOMASF+O4/7o7C\nr7Qk3n1LyCZYctE4YaKaFw/MM3sXRVv7oo+HKll4c0uW0i0XNCY0cqRw77l3\nDldf\r\n=tpCM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"74409b4b79b3428f089340cf2168a45523cdd10e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.21","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.2-renovate-major-socket-io-packages-74409b4b79b3428f089340cf2168a45523cdd10e_1617712931524_0.2639266503696345","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.2-renovate-non-major-77c4a6d692abfd4b016799eb20d2e45bab584b1a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.2-renovate-non-major-77c4a6d692abfd4b016799eb20d2e45bab584b1a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.2-renovate-non-major-77c4a6d692abfd4b016799eb20d2e45bab584b1a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7dc5225d9dd38ecb2cb3346e84ca8b827d9405bf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.2-renovate-non-major-77c4a6d692abfd4b016799eb20d2e45bab584b1a.tgz","fileCount":39,"integrity":"sha512-b4UJhpSGVw6uZqiG7lE0EXzADLwdPbdqM6H49PRCDZoh3z41xmiYgu0KcIRHbdIPUxcELv6ErF+4Y+ZG/13tvQ==","signatures":[{"sig":"MEUCIHLZeaKOslyqdTRuW+LFwk1zhI5s4k8XKRZjEdWYwfbXAiEAlqGXLo1gVDxwXTSHPXX1x4ftvYplbsFxwewUTlAMNB8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbHnqCRA9TVsSAnZWagAA1QQP/0Y1oZlS87Hnc33j80Ho\ntuwUY/48oxv5vr41ov8iEsQoBRZ6dJl5+P6fJ4piGlqcMfILnWlRSd6H1TfB\nyuC0vm3CHtSR/Bq6Fx0q+/RTZJidokUWm4kSBTKHcglFuNpHaEbcT4/qC29a\nCYBrd94x8cruXo6rgiSnULrZKP6BfJJYcN4pctQ/fn2n3YaQH91Q+4ZGDXeT\n1wtJu6wElcE/EB+PXxPOeaxITBgcETzTg5SUEfiW/cnbq7k9nGx2d94LONLM\n/8gl+XQdQ3j9IK6tltQhqTkM2CsfFtyz+/kv5rx7Pxbs8UHamoWbqaTRFs/L\nv8dbv/Q1CmFENjj5uRo/WQ+Z2w0p6Wis1rNiXRbGpdNERQ6nnTuVqmLu6BcN\nyIj6jlifrITa2Np8MiH+F/DQlCrp+DSyHsQeE0872qrb3mmJY8cRHirsmmwe\ncFSyPSl2iCUi/g6HmNPvlYiQkcoqhszGxqo3C/D5ZZEvhBZy+cwTs90EyOMa\nWD7402TO4rnowObrrPJSLLrTi/LAJhigAb1njc1YY91rM4hSlxNk5vEbb0n6\nZcQV1FgjxcRcM89R67hI+CI7CvgG4T0I8dO18WLGJRUg2fUoM4JHbWKg5/ZU\nwErqxK7CNX0utwJ18ByI/VDBoeG3IdP2MupNGxowBshah/5tpTRCYza2eH8o\nyRCP\r\n=+Ckm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"77c4a6d692abfd4b016799eb20d2e45bab584b1a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.22","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.2-renovate-non-major-77c4a6d692abfd4b016799eb20d2e45bab584b1a_1617721833678_0.0042783743542205155","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5891c17fe7ac80b3a39e3597f381adb9077dc09e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.2.tgz","fileCount":39,"integrity":"sha512-823dUTa8uZV2p/PL1dQvX3h0WyzEX5BYkctcYtlwnwO2hZu/WjEj+kfe7CTXhZj02/M8InFyNR4Xas8trfJktw==","signatures":[{"sig":"MEUCIQD79psMaq19SUVtHveXnqEG/8NybP2W93W/ljU+djwUrQIgQHUlcupkC1GKpIVjQG8YZUly0toGTByeGt7yWYXU0uY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbHrKCRA9TVsSAnZWagAAfqkP/iG8xc6A6gHqYqO0E+/s\nd3Ccaiu/nAvtRGWwV7g0AievFHG3CHrirPG9pZnVt1Fd98CzeTSTMpagP9QM\nvAIRtPmpAu/WSX4cMZppQntHVGmWiVBdRyYTp8U5NfMJh+S7C/HXddj04Z49\nMszum2Jaq/a2w9nRtqHej0tT6wQnpcZIGy2nzYFY/XVLwAIzOo53ZaaBZAa4\ng0mMqNQQ5dUfmxIZ2HxVLdr+tl/dr74rVGVW3LMK1W9x7e/T4TZTfOfhLETE\nr1l6CFoqfg+9clgD/+kWA6sNEODC4MKy1jN31f62Hmk6R2YDrCYSIbSszNVF\n9kLYhc3lBGfQ++d5kF0JnkYeDiaqSbTirWN35yUK42k8bu40/dgI3u4JSISg\njl+/xswje+yyaCyM+KnCR4EzgsZTJ8EvTPb7Fxtno1IaBFZLJTS9Vxukn7Fm\n27+nopJfdWIEF35UPQTk6Sae4DJkL9oCULXoRebklZHxP3nce1LEiVhdm48m\nM56w2sitTNqZzBcqkwy3wUFrRs5mal9aTuiOTAKLcxvY6WlwQgpEhpnYCf/Z\ngw+S/UnHZjJ5lW2GdGNIAT6FfgpaKoW25FnsCgqS//wqPSWhTAvtOL5kS0Dh\nwsVSgJtjJ5Z1NL9QhipHFVm/goLCyNRIjZjwHI2pgIAD/ZkNDJmG2S2yMg/Q\nPUDl\r\n=rQqN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7c2d50eb112a2953fad286d005d147b726cbb3f5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.22","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.2_1617722058165_0.37909363357829884","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.3-renovate-major-socket-io-packages-ea47c380364475f74a3eabf98226865df9247fdb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.3-renovate-major-socket-io-packages-ea47c380364475f74a3eabf98226865df9247fdb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.3-renovate-major-socket-io-packages-ea47c380364475f74a3eabf98226865df9247fdb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"334fae408b7b76863a53cf5ac00768c557b7f11d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.3-renovate-major-socket-io-packages-ea47c380364475f74a3eabf98226865df9247fdb.tgz","fileCount":39,"integrity":"sha512-oFxqTJjrael0h6R+XM1u/QJeit5ecO+llGjNMl1wHGTpeJM/GllwjfFufaVTMui5crFYw788RbI69ycwOOPYag==","signatures":[{"sig":"MEUCIEmc5Pg+n3spFeZslm0vGiAOOlgkkpBOYiKnPacWJ+VtAiEA3cFDdg9kgVIFlC6oyIgObdt2FPMoXQFIxLJW1ZHHVmY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbHvHCRA9TVsSAnZWagAAr3YP/j7tqg1ed4I3nHet9LVr\ni6ZCs9BwbfI6SG4BBmMe6sDk73YbVeTHvcfjGUXK1sFWi7expQNWPo3EWfmh\nL3Z101VjUyG/8b+Vj1qZw4pgKCarVu5f0kUOtm9Rg+IIH5mCea4TnFhjzVFq\nl9rz8JAani5WUG3FKFLXyp/q6oOr5JcxmYP0SdXgKn25Xsu5e7Huuu4altiW\nl4kMUIu6r12egnX3XbHzsOl0o5arUwL+92ihSmd5vDEpUr6tr1P5HgckpvA1\n6Fud8vCB1rOirfKowdHxITXeQ7ZpFtyOBWP03Fq3aZRikSh8AkrbJZQJTqey\naDRY/uCR2fqiPEAP1Q/V+6R+RmuL3ap6t+7YI8erqKlUCgbgSd/Va1SwNt/n\nxkHGzqcIjBbdk+f7MApyWRvSMMpdLpf3vSSHukn7SgeM3ujGAxeWHA52xyVi\nod2IhN+/NL4i6m+87SWwnUwqtOvJ2XVdkFlzsuyfRGkgyqfyYklLg1fFXGGx\nV47hRh73gmraqRolx4K6ASFeXUJKDq+5XZud6ReXpPuKroqXxANdEuYkWrtt\nZloNhQq8N5nYjterKpnNVI3+RdXRaPVf3EfOOhdRoR2mtxVJi8syWCx17rQo\nBiX7rUjtfdRs+gREpYtnPhAkl+mmnkaeKW3pYa5ElHHTBu87Ytjfnpa3pY8x\nIWxD\r\n=BwfD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ea47c380364475f74a3eabf98226865df9247fdb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.22","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.3-renovate-major-socket-io-packages-ea47c380364475f74a3eabf98226865df9247fdb_1617722311246_0.9668253295522076","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.3-renovate-non-major-0bae3f267b635e6b32a8627d4f220e88000ccd51":{"name":"@balena/jellyfish-client-sdk","version":"3.2.3-renovate-non-major-0bae3f267b635e6b32a8627d4f220e88000ccd51","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.3-renovate-non-major-0bae3f267b635e6b32a8627d4f220e88000ccd51","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"64c87936b5f1576364d6e0b6f788b4ef8f30c153","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.3-renovate-non-major-0bae3f267b635e6b32a8627d4f220e88000ccd51.tgz","fileCount":39,"integrity":"sha512-cqmtPqxhe5JjEM+I4jw6ix3C+3u24dRKNBhJFCaAHrx3b496Fxa3afv4KIRlkAANCYYroP4jHmqySoGZ0mM2TQ==","signatures":[{"sig":"MEQCIBnMjTEe7PUTxwHie0plzuIiQkGou4gVYXYHeN9C6qv1AiBKnxMDejRSV4zH+jOCHep+WRJPFItaXDb5PvVF6BSU5Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbKUSCRA9TVsSAnZWagAAxf4QAKCvVgBfMHXLgHUkiyB3\nXFASKPQa2CcQj/cDxJc/qtdbfbu9htgUFjjrMsBxL5H4totNdigb2koxBBXt\ny1tCb8TUHVxbu61Q+0KH5uQiWZXPZJ6usyXJwrlH5PL3kzwdFQHtDQY5yL1A\ndA0KCMEJ3ngvVpOF+0kOll/6+TC1myUEc4/O7bnzmHqmE3FlknFeaMsbEX24\njxf4Q3GulubVRqF6Lxzi34TaGT52YLxf4kWvpY2Q2vHqYilQ0oWdl1TVPGwl\nCjoZDdt3+bbfO/5S3Vm3fqF77DXDNlEUnUKpBAakTxAJL+X7HJ5hEM1sIAvT\nvQkJr7xyNaNZ+FT6dQ7syZxle9so7Pj2QtGWzSnE6kjiYiw2WQktpr6Bbt92\nwxz2pK0QH3z3uI+Esu1pjzm3M026EV0N+T5H6Ox1vZIj/HRsJmsw+rPQ8rsI\n4W0Mx+mQdcuzKbI0f3ct1t1UwBIgp1hy3WxGCZDK0pU1ZZUZbEhE9CS74ADI\nPsaGGXo1uU6PG4tS2bLMEiJLZXrqNCVVKpMt45WXW86FsCVD0ZyOxxc9infp\nl2WDtuxmPsTgqw3SWpFZODQZLToE5oogjOgq5AbMT0Vp9dSmy+bIJnRgDfzR\n06HTAG/7/Ue5nB5dJu3T1+yTh+BFBphGntaaZCA+2i6ddz6TU8RUhk+e7fZQ\n+YQn\r\n=pJ6l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0bae3f267b635e6b32a8627d4f220e88000ccd51","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.23","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.3-renovate-non-major-0bae3f267b635e6b32a8627d4f220e88000ccd51_1617732882441_0.10077532310609594","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b290d3d0013c05279e0d4e0c0a591f74ce58f724","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.3.tgz","fileCount":39,"integrity":"sha512-OUQJYyFTh5Eca112ik5cGObIHldcF/HCJ1ua+zOhsQdIu4RTUxDrdKCCRkyOgR80PAxJuHLO3RAcJwUrhLDf/Q==","signatures":[{"sig":"MEYCIQDFII3U72osNlGTpTRd48jVZ+2fg27mr1lWe3eWvZsCPgIhAPTtke+uJXnqZCRCYZEFuMdefRTR3uZdhJm615DzoIOf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbKZZCRA9TVsSAnZWagAAZ9gP/idtQMBDmH0b53GIUtAY\nYaGCeQtSDNVtakOMBdn6fPUObcDo8HafYV1W6p5vlwJ7MrZ3vCPARgo+xP9Z\ngNnWOn6DViE7DtF5eG7AcLmrruy2yS7wMEdndv2lDuBkyB6omCiYU/aEt7mt\nohcAea6+ctbh0OFUuLd3ePqnNlFP4lBPaQ1YmBFWzmf5JNbW8ihl7JNFZgbE\nvI3yyKP8l4SMXrmYAMbk3gDa4gbY+Ykpy/jwZkyHdEB4YwxJ7bCfXp1o1lCx\n3d5XjLJvYZC9GsrGX3/51CaRn50ZRxLPHtRyCWGCgRL8G0fXxE+p+A29iE/S\nYrutDCMSgGw8qjgDImEPm3oT26oyOv2rr3AIsYTtyq+WvwWXkTpFAL8xEn32\n/6k937xVkOUuU/UFcURwD6qaKsZX4A/dlPK3oUX7HRjWRRJl0SrKFPwWiIQy\nbwca+DCxRb/tF7S0nFooJkeuZMvoEL98qLS8Sp68z4K4248poIqQs94gxQHB\n38rMgMTRuFSpXCnkQ5QWmAxEGNzc212Csq4myZqhMxGnFd8m+clS8Da6GQ1C\nyYGCVkNPCnfZY6vXuAIKI8PKBxmQ/yA82WCV4+uHCPRKUvWzwlzzdjzDes9g\nt7ZLOWRhL6m4/visd+FuvcoAvai6s+zJWFIz4w8cOo6IN77o3llKJzs1CYBy\ntNG+\r\n=L2dH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"85184f9785579c26fb03ddaea9f89b466138fe26","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.23","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.3_1617733208895_0.4465769824278849","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.3-renovate-major-socket-io-packages-4f064611a40ca33ddfa8aac7e26ce230013534f2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.3-renovate-major-socket-io-packages-4f064611a40ca33ddfa8aac7e26ce230013534f2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.3-renovate-major-socket-io-packages-4f064611a40ca33ddfa8aac7e26ce230013534f2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"47e057f84c5695b09cbddabea9bc9c85cb3299f8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.3-renovate-major-socket-io-packages-4f064611a40ca33ddfa8aac7e26ce230013534f2.tgz","fileCount":39,"integrity":"sha512-JhNj81nM47zY7Y7vhpn+1ZRdIze+JIcpITPm0W+KYFh2csJNP7nrmoDJTEaZB0S5ZHVEY/1huFNvoVhP4OI8FA==","signatures":[{"sig":"MEQCIFF5TWQ5WwPZKHH5E5QMg/wDZ/woq6LCggeXvyjJC4IfAiAio0BNNNDyV5L9AQXLDjTE9S2v2xgvmV0kjjr3c8dKhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbKcvCRA9TVsSAnZWagAAxEcP/38o981+kawdZlvBTz1I\nZpoTLX1rRJqlIN9Sshuxl0nyXY0fj/TuC1kks7bJtYj3iLDIELTKOmGuOaeS\nGZ2hPt78aLo6pq228NWqSPtk8+7QiigxEMcpm2qZM9YY+E3oblSt1yyDu5PD\ntCNUkzc31TovqrF09hRmrYg1YK3Jjr8uuK/3gKFxJbBhZV+hmuXevHCqxZsc\npWyMPftoYeRXldnbbC6iRWPL8tv9ACumUKYjq3mQbwqIm0cLA0ZfCMbAkcr6\n8K5B3RRKlXeKPjrXGZQHJCyqItaQTon2f+Z4gf2pwRCjonCjBcz+ruSrAh3Q\n0dD+Mped4BQjXf5mlf3OqPSu5iZqy6iM8Y5TaSX5rCQNP6s9UEpFESAezdzP\ng2vAIbA3Sp9rDp+GS8vYXqpy//tENw0HVFpNCJ/lBwgyipCrpn//RGLEjeSZ\nHJvI+1/RxMpswitL4gP9EnWg5GpExVaVSHnF9efclLf7lW64pQImk8k5Gdw8\nxwNd391Ciwhpp9fmDi6KdFJsnexb46aQxw8lxcaAHtO5TTvwa4QvNLCNh6cs\n/IKH0HJJhoxMkFoHcOr2ye/ozTUV1aulxQuCBDl5G90Oe/2Yk9DtGjZq/+1i\n8jtD7J7j08KkVmFGL6j5IGEoh57MZf+doWYNkk9e/RKQCJbs+A7D8BP+YXKD\nPuOr\r\n=b9AB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4f064611a40ca33ddfa8aac7e26ce230013534f2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.23","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.3-renovate-major-socket-io-packages-4f064611a40ca33ddfa8aac7e26ce230013534f2_1617733423008_0.7854596618416063","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.4-renovate-major-socket-io-packages-84f9c56ba0b7062453aaac14410f0f6b22888c3a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.4-renovate-major-socket-io-packages-84f9c56ba0b7062453aaac14410f0f6b22888c3a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.4-renovate-major-socket-io-packages-84f9c56ba0b7062453aaac14410f0f6b22888c3a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a6d6eaa08e7cef1ad697a189c302d6ff94d0688f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.4-renovate-major-socket-io-packages-84f9c56ba0b7062453aaac14410f0f6b22888c3a.tgz","fileCount":39,"integrity":"sha512-h+J1F6PhXN9CQNJtT3GLlIIAMBKKYXcB37QqlP5E3NHNkvc+4leQeCjkCX4QfZIUaUmF+OVjFANhyyFOW6/TxA==","signatures":[{"sig":"MEUCICghn814IwIH5BsbdtwqqYtHiaJqM//j834dPkvdg4VhAiEA1xVMmFmW1BrutgAYNqegnRYyLIQ1k9myd07XwIyjEKc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbKfuCRA9TVsSAnZWagAARmIQAKC7KJMAw/EjJKcmrKCa\nuZexBWwfEhXgpSBLy9ewG+3M0nKIKPHns+EcobGI2AQBIvw48UI6d4a2HrfS\nXs+XyDG9wFYnb/F1B4zh8dbgbFFvL7rw/l+KL0jROVO/y35t9LMRJDqLxAS5\nT1lrcHjTB0uO1zj0OIhHOG/rj0dBVfaU1mSbgxorsMOr4lFriJembEvu0v0K\nl0YFQrk5+vKR7z2dsk5KgHnzHLXQT++mn0bap/iHkDYOKN3c+PVZ99kQs/Om\nBRAle7qutoctnhQkvpLprkrErFRa092NqGhlq5gxw704Jr/Q/Aoc6t/JUi26\nUFdUjkExytIizJqGxn2BVYhfm5Q8oLlns3bZTxxRoTaXAy1g2//0jLcfiDA9\nJV3A10SoVQXSVsH2153UN2m9mxJWmeg2NBTTDbnv7mDX/VoT+NCDXC2KI/Ex\n3DjPE8DEXDpjv/PXswd22I7c6CGoHLo3wXz5Mvf7jYt7uQaPI/m4qeJmy+hW\n9ElYtrOr8pcj2ID6esndyM5uJH6MvNZye5xszvhr8ky8TzJXtEvBnG9vl9qc\ndPQNQ89N3smc2/9bHJTlbxYtn4MoXLRlCBHrMVigBtq0mhq6ibv9/oQ8jVND\njeOH2fb8mhh0sQ16h5Y8l1nSCG4gzXx7QGtoE8KOpj0ozOqC4zuUSkwAAJRT\nHKrR\r\n=ngzu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"84f9c56ba0b7062453aaac14410f0f6b22888c3a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.23","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.4-renovate-major-socket-io-packages-84f9c56ba0b7062453aaac14410f0f6b22888c3a_1617733613851_0.772018015766547","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.4-renovate-non-major-9ae3a5cd811ced3fce94e0973d13fdd491e744e8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.4-renovate-non-major-9ae3a5cd811ced3fce94e0973d13fdd491e744e8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.4-renovate-non-major-9ae3a5cd811ced3fce94e0973d13fdd491e744e8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"27e25165b9ce1593e489c89a10eb9a70268a7a18","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.4-renovate-non-major-9ae3a5cd811ced3fce94e0973d13fdd491e744e8.tgz","fileCount":39,"integrity":"sha512-ooxIiCeOGiT5jMt8IPI2EbaD2M1jLf8qubsGCYluAHhFFsCUZEcMtBk2vaPxC9oj4QD0oK9boPUYm5xNCb2GEA==","signatures":[{"sig":"MEUCIGRBhYhdXUqAK+iBtNthXK6sMZ/CqILfxb4ltMfZprR1AiEAi9qrPBrtsFd0W6lKnbRTr1inmzWDoDkpdh4hg5NtJJ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbL/BCRA9TVsSAnZWagAAhbcQAICyWbpdWhWD9PzNK3OH\nxZRuHKEih0d7XskZXL+fmlaT9gcNSxiQ+gbzGhcYexBAZ6IN/1aiwZFPwbaB\nVRsPz/y69m5sTEjdnocXRCubCAafG6dh3Jx92Nb0vXKCZFebmaFwetbCrD/x\nIihq7r2Gs5XV7CRBmoCPa2IQ2Yi+PXMBFPwH5LAKtfhRfOq9xc8kz44U4dJd\n+4u1HzOkP2VUSyalNRSELYsCaKWXjwHtqSDoEnpr2IOhA4guHeBmK8fTEcV1\nK+FeNqiyiJySVGO76mHuSP5zzqHjdxBQT4KzXcd3dnd1pb3oULduEqLJ5yzI\nWzQMrKSxLCp47wUXYQxY60nV1JVojHcfBpkFzNqYLExPkMpaMna4x3lvq7WS\nCVD5RWswh4VqvpwAT5D3DD1GwVB0CGCPTH6qrWJq9zEKcl3m3ByFIGGHPV5s\nUlciZ/rXbjjOh+0U3DYHfdA1VzQ8pCs1GQyx/+l647bSAQoTkB5JHFUEM38X\nNx+w+cxIXKqzy1pPrKH5400mLmTZgAQW3SZUdAdZTCeuJorFuLtoxLC5NG7e\ntDavOhiDA79pGLxjDjK0K0isi7cxBtWW/aOVGeO5hg4hr/XsP1+GKyHZFqCJ\ne1d876GtiDhGcWlO3+mBpNz3FI0Ph9WnTISwht1X9ap6cfxVd2iz14jEyoEn\nFAHL\r\n=Ju/S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9ae3a5cd811ced3fce94e0973d13fdd491e744e8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.24","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.4-renovate-non-major-9ae3a5cd811ced3fce94e0973d13fdd491e744e8_1617739712792_0.9342488064062049","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"63baf8e616ff89fe8ab6bf2a87ad3570ba59cd97","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.4.tgz","fileCount":39,"integrity":"sha512-XTjpkOyfPAHnkVPWtfxEHUp1OD+UHRoEFdcOjaiFXqk8ITFJQAYel9s7dQhCKJVaoFkhvESpP9lDXNcIj88vUw==","signatures":[{"sig":"MEYCIQDArsQ2jS7urFrBbHyLzZkqTpNc4OIGu6kzH7n+Csq8HgIhAO587xAFUaZLG7UvyyanxRMx1bwg7XcA07ma+oQYKrIT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbMBvCRA9TVsSAnZWagAAemAQAI6Vp9F7fty9irmQfrZH\n/Y7/A/PJdgstMi/Yhg4LSuUWWLMSa6xboIXOwegUiqHlkwjrdeR7077v4h6R\nbsQtL1aDcWKTY8te3dM7WeueK5VW/Jl0gBE8lEBEDkck/tbLjvk3L3Tzp4PD\nK0WzAroi3kAaLJeHFYXi1Cn+wAErDrkCc8TjkIdjNOsBTYpwn/2AFeNNUxep\nMsbina68sb73t7PSuoOiuS4OgSXEVGQ8c48nn00iuYSeguKI+D0dWyxw4G3V\nK9CW23Fjdp4uBJciNsHcHioKYdjJD3+pCZYzXd5987nUgCP0mTydK1szF2Sd\nW2Dix+4Ir0c9320W2Q/2gx8Lh7SjerWrxw9LL6wLGf5qIw6+0Mkqh1WbyYzG\nWKkGqRzZvTSei20uoVqkh2nPVwCMybRntarYZqvNfWd0rtClfCpw0x7t0iEX\ntG6sqg4O93VS5gdJoMrggMjUJ9H2eR+a5Vtl9ibfbbT6S+XLNYP2Of2Kp3gl\nsaKfwjpJUa240nM33mxrRkb4G/W42aUWAXsAQJMw3VJqWW2+HrX73dxPe+bF\nCQAm99c+nIbG8bgb2WqCpZ2r7N8zP5PSBdLmrlwMNX9eWV+O8Fe7IfyFSthG\n+jgAVgTZVeF2nxOfgBPCo6RenQORjCkdjzdFJD58nSTTc7zJNA29MiNRfyko\nlunA\r\n=Tbps\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ad51aed0c8c990bebb415bd4a76e29fab4eef67d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.24","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.4_1617739887321_0.19056392616730156","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.5-renovate-major-socket-io-packages-0132391375282b0aec0e5569bf00e42ae106022e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.5-renovate-major-socket-io-packages-0132391375282b0aec0e5569bf00e42ae106022e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.5-renovate-major-socket-io-packages-0132391375282b0aec0e5569bf00e42ae106022e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f8d3b2a1495ebb2dda4f192907fb0d7f3f424942","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.5-renovate-major-socket-io-packages-0132391375282b0aec0e5569bf00e42ae106022e.tgz","fileCount":39,"integrity":"sha512-waS6IeLtwRRgGLTZh1gWKlyQyLRs2qxl/tRm6rJxFymGoBntLeC62DtsyXWGiLY3gz0p9eLco318bvkDtdlSgw==","signatures":[{"sig":"MEQCIF6qChZQxoiloxtb1oAZPTrMP6Fmh2d8xzcp8CXE/QUXAiAW9ne3CdvL8ZZ4405fWZ1VubXnDwDPEFGH7XXDJOs6Yw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbMFnCRA9TVsSAnZWagAAfsMP/RT+J9QmN8rglrNjSRLB\nLMaUmwKpmE5qgEEZ0KGh61gRCtcYsucg041xsRX23FdHQg9fLfZ9Ebqf0onn\ndnWCINjvgR1kD4Fp8gFDmXAjdnowOsUCC2srGmKix5gjGStGrYwpYyqZYdF4\nReLKd1LjotRksku2DA2SxrglBQsK6ajpfGavPSe0gUKVBQOSKnAlVoQ3Kcwk\nR35nv8GzkdyieRqDpMEEl2aFQK5I6gWpeY4OuMvJx1Dk+M3MDXfM75S+qHhs\ny9wpEWuEafVG4UevZqH9UZ/oo7TEckkbp2hZ/2ye+ltSyjk+GRmd5yh7LCN8\nY3YQiUKfotx4lTXr7ZEW+yWHxMFIxIFVYUMqH83MlZZi7Z3gLCXxR+kOB6B7\nQj6yaEv2k1aLioRVi+krEF85yDqpoRDKy2RsyTXKeGifztVK4p7O4Jl8ZRTn\no+5QfdXPiJrlGfyhKHFHyaqDHSqPwzjSBj9ZwcqU+mAqpOjPx+pyTjHZsNks\nONHoAONjGImPIAC4DReT92jn0zouEpSeynDi15pBm7l0oQZhIMpjBH9ti8jP\naV3Wx/BvbxHcKa5iyeORckrSMQVU2eKwomcQIOlVhcNqIyy55LT1aW0IfGun\nTedqgpIPLC8fAmzkKidHQD/gwCAugtdoYFe3Lt4di4uHlf1lyFbLYFoFYevE\naQTS\r\n=H5FM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0132391375282b0aec0e5569bf00e42ae106022e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.24","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.5-renovate-major-socket-io-packages-0132391375282b0aec0e5569bf00e42ae106022e_1617740135419_0.1854254902370831","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.5-renovate-non-major-bfcb407e107e044bce82080aa551aed8250b5a1f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.5-renovate-non-major-bfcb407e107e044bce82080aa551aed8250b5a1f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.5-renovate-non-major-bfcb407e107e044bce82080aa551aed8250b5a1f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fe144531c9ae926b811352c3ca095717643db130","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.5-renovate-non-major-bfcb407e107e044bce82080aa551aed8250b5a1f.tgz","fileCount":39,"integrity":"sha512-F85h0uhi0/abrOyfEg56bweSwVgQPVzSHv3qQ5zPxo3M9Kgrr1i6tROcaHZGZvLxPWGEE/Js9T9Ga1QdPy6kdA==","signatures":[{"sig":"MEUCIHMIfJvQLIt79jQ+h1CO4miFvmaDnep1RzCIX/7/lABVAiEAyQ9pnzC3t0CY9D0m1JgtmGsp2df0CbHe+6coAq7dHcU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbNTeCRA9TVsSAnZWagAAzW0P/2qs6BzQp0rHQtq4q3Lv\nTo4agGAxhuw8OQkFZFbqm0NO6t04RHNMo4vc0cDAy4Aktn2l16GWLlaC0cxe\nWdJr/jKsfNs5sABX7GFWSIBC+ZILADfz4bVu0Agn4WbVUHI+dQEDjWGNr3lg\n8smcuspc7R5SxD1W+0KJpw81UkvKnrN2G+vv70fkqc5GAT+2UbQL+gUVhn7p\nuliSz2yLb8ZQmufCHDXs0I1LLYQkEZdwp17tLjOJKzCMisc+NmswJldcimdV\nje8sqEh76RL+UhHfKBcH6esO+7Wqyvrh3rP36ymDAcf4FcjtOzfX2IbOGzyH\n9G8QiuPQJ9S67BIZYCjRzYjPKh4JYYuznVQWa3YtfBHV8lW/7MQkvGoYO79C\nHI9GGZdSlwf4odNzLOtZ4Tludhk7g+4Gmx9610CZO+nCUA5BjDNIGAVjLX2W\ntJslQNh4SwYz0ngKRaU1NBFd6xIasd+BcX7JwzlCOTEkoUvJMd18YSaZDhpv\nAbZfGnGUa2sehyfZE6JbaIJk6/7t/t5AWLj8UY6hDud3gERA8kWYdAjfIuwl\nWk2aLscWC1q2qnj4B+Layyh6sILLhtzy2HyUZ1IjaheaT1N757mSIMSNQYpo\n0Ql2ez07mr78/hdCT51Ra5x6/PGW8gicJXdHJIXHGDT7IhFoO8dmNLQbFlWk\nb7si\r\n=0Ajs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bfcb407e107e044bce82080aa551aed8250b5a1f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.25","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.5-renovate-non-major-bfcb407e107e044bce82080aa551aed8250b5a1f_1617745117955_0.17471742831220127","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.5":{"name":"@balena/jellyfish-client-sdk","version":"3.2.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b83638d165d8fe2a133f6a01ad3f713df2df85de","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.5.tgz","fileCount":39,"integrity":"sha512-nyKA+nzpxGzS0yqKq1Ehd631PAsqIJwrNssgQ/iNuiUotFw2FwJjG2VrbORvzlLaRlG7cCM+C3YZwa9s2/Ge8w==","signatures":[{"sig":"MEUCIQCMdePtSbhgfRYBkHS9jJLBOiQu0rooSjHT/p3J7dc9awIgd+NHiM9MF+PMBkCm8TYKxQeiBCnjn/7PJdepvHP6O6M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbNXgCRA9TVsSAnZWagAAZyQP/2ZOkg8bxgxZNF1ZsdqK\nb5d44NFk8kOq/YBgA4K4Cx+ZBKHG4c/XaSsCEqLJU30ViSJXMC7p3qgQZJsW\nR7CPBBXh03DniaMUnTY5AWWWRmllw8wgwc3+7BnsOhdHark4zkAx8YWiub5T\nZUDPX2Oag9pMZi+pIQ9mDmY/tfTExNFlpgvjdjvv8Nbo0zd8JBwQynXy6Agt\niOuW+YnD5zw1y7d3Yma9MagYR2YGtD2bx/09mMasnZzJei+whVd6ByYPn6+O\nwlqWoKOhJjLNRrTJ4N2Ja1TZrDqIfx6FWHwAi+FDfE31T/+dXb8mTDMHxSet\nsMoZSWwwXFRIIQKACNaqnGdMF2MrI4qAGdfdnPmrFekXdIAp9Oxqpbdja8Gg\nBBEHFcppbdoROnO6DregmyB23NbDt+UGX8BFGzHiDpg3FeyCDiA/AtwiGUib\nHs81OtLAlXVgEoUvprDQLLur7DK4HrYKWPT4TRjPG5IB+TMrFD2MogmRaJrW\n+m5gpOiH4HjtcWtna4KesfNJV8qoZZbYLbdSCZfSQ2kkidth1fXXs54LlDil\nFVMwF6RIPuKrLj9vF59Je7jir+WHxcpR5fIyDw6ODtd0cNtmEP89LDWfP5/0\n5ph9JB2dftXVpFZnOKprmecHDq1YbZhAg8qOvhZnG3DDnjwRN26e0MMJzVzN\nDmtY\r\n=rfIf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a4373696962c12cd422337857d4efe3d1a0dfa87","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.25","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.5_1617745376061_0.8763767949071672","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.6-renovate-major-socket-io-packages-c0c15da4f414815f15ab3e7df48a0983f9fb80f5":{"name":"@balena/jellyfish-client-sdk","version":"3.2.6-renovate-major-socket-io-packages-c0c15da4f414815f15ab3e7df48a0983f9fb80f5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.6-renovate-major-socket-io-packages-c0c15da4f414815f15ab3e7df48a0983f9fb80f5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2070225e27fa0449483a22b4e1787a8c28f99ba3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.6-renovate-major-socket-io-packages-c0c15da4f414815f15ab3e7df48a0983f9fb80f5.tgz","fileCount":39,"integrity":"sha512-2e587cvZQ60mZg83qCzfl8zaChmyFgwokVJjuH8yZMMS+5Rl355N9RNW4FKavNokX8U83Yb+U8yncaYpLGWVyg==","signatures":[{"sig":"MEQCIGtSgOBBqL0A7sWQrflm/j/eoAui9usuQueEoMOYncAmAiBhQX+KYshd9DZzJ/O6l9OXNaVBOXjaTzggp4u9oPXvQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbNbOCRA9TVsSAnZWagAAsX0P/15stdzSHHxoKnFHjHgn\nQ09K3LRhxjHw957NuZiHCAsOhonsW1Oowsmdy4tqpG8MnBeeTWHhU2352bT8\ntt4WMl3E1fV8XymdxHl4WtfWPjgA1U8LTw3di1wm7Zs/v56zwzrQI+99nS88\n5kuzhktuI9BR2mdKpQ324P54b+/+/EsnCM9O7I2xcSUECuOStqNT8NyiDGsC\nFyLLE9WsaD+DOlUmefN8vboOT929TM3JglprX/geR8PA7U81h5po/RmvgQ8r\nY1Bsh9ZXk+/gr1anfMdttGnAjnNTCMgzHZZ6FQrEklqwBW9Vz8cvImE21OtF\nAUdUC6EdHxKQNCaqmTS3+STPbKvEajIBaQfl6OVtBjmuSO8/wDelOsVTnhnK\nMWKVuOSfIHlJRDy08Ezk6nGkmpkwP2QhF+Pgr3jGnU3uDg09KIbmVBCfJOW5\nFSD08dQfx2LvFov5DRkti4AjWD2Y1E1mkoUKIQ2SAZiJh6jbpI3hWHe+9c1b\nX4c7ndrEZUUTyNcgevD+zTT/AGhlMgapD206uT2z5NdX/+jOKd8mpYWEAN/K\nRkmMUWYmkhnOBg99Up3vHkykWYZbcovm04fvo9qtGeVTW5n0BElwoZXMRpk2\nuprN++872+ZW3r7s34246e27a6yaZUwAYQUV13suqIyRFWcIkAJkBMv2J57C\nWFHl\r\n=g0Oq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c0c15da4f414815f15ab3e7df48a0983f9fb80f5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.25","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.6-renovate-major-socket-io-packages-c0c15da4f414815f15ab3e7df48a0983f9fb80f5_1617745613635_0.6307261977037939","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.6-renovate-non-major-c03860c7346c949c4145a8b9a98a463378d44795":{"name":"@balena/jellyfish-client-sdk","version":"3.2.6-renovate-non-major-c03860c7346c949c4145a8b9a98a463378d44795","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.6-renovate-non-major-c03860c7346c949c4145a8b9a98a463378d44795","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c233e38147e76ebc321d3bf8f9dfdbbc44ed7be8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.6-renovate-non-major-c03860c7346c949c4145a8b9a98a463378d44795.tgz","fileCount":39,"integrity":"sha512-DNVsgl1CcCxrLZjs6OOg7XViHtb7nIrFzqSZzFjEy5UmEDruA7v/xAFkgRy8w0YbbF0njM/dXH3FX3GO4v9yCg==","signatures":[{"sig":"MEQCIDPpRpR4d8l5Vjdr1oVehGr6Gv8kOg5YfIZ8JJyhmeLbAiByRilTfBkoxnR8ilEWODJDV3ZMrYHnniCkL4sMsqYLYQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbOXVCRA9TVsSAnZWagAAHoAQAKIqwKsSmIeiStz6ZHFz\nT0MQZTY9S8MoB3R6Iltpih+spfJZOHdNa7CtWeOWiF/eahXfjpdsudjWTgTE\nMdUeRVfciehHGfPPUKylLzMwss6cT3elQu3sxepWusYoz/axf2J9BV1uzhV8\nXLHmGnh3S2MATlDRcDmkN6AxvQ2GMD2sVgWXuh5NYBB5BiiMrdN9zEI28PHj\nNk/j5kqpvuvwe10VrLKlHRVc0t6xnPFpPzH7u2ooIg7v7t0zKN9zcu+wxrtM\nNsFMFE7DwfIHkREfiJd9AkvWsPaO1KuHQ0cTeOxLvtCAGrkoJ4GvIS45Mfsl\nu1CuNGpcUeOLSArf+Qx8y/YWMZXBXWZYNlr1ZP8mG8RyXs5qmyGEZkB5Izik\n7jRPi3bJNxSfk8CVOflBmvgt9vCmV4HfF61rD8gYqo03E1eFh+9a+g9E69pI\npHE+6AISTSixeYLpCT9Uy+I5joLS4zL+Kyr9AyJuuKr7M4Jc1wHG/JuS5hzD\nOa7WoXfhB9zKLLzUKZgEVz0FXXpcL1ZrVDZ5br2ZzQJYOeCja8GH9dCs3ulV\nD9aLsuwdqO7gzEAElFqxSNYG+ZCq5ASo3ABQcncEx/0U+ZSeI7xt13T8FbSQ\nLYfyEusNVQEntrVvS0RHma/+5ZfYFjZ+haZf1+iXOiwWIAgD9HAMobr4PvPa\nxvb6\r\n=Qc/6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c03860c7346c949c4145a8b9a98a463378d44795","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.26","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.6-renovate-non-major-c03860c7346c949c4145a8b9a98a463378d44795_1617749460288_0.7249997283439666","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d62a46bd8d6bbd5f96324933f6619d83d2cae1dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.6.tgz","fileCount":39,"integrity":"sha512-3s9R3y4CvvhkJLQP+j3stPiI9NkHAKpJ8w+N8vpabSPuv496AHhj1suAxCJ7r/a8T9XLn1va9GdVZhmZjZsk/A==","signatures":[{"sig":"MEYCIQCT7LOZAT3OvwY4MCL/VgM4rh2ghkzd4KNDJoG5sSodZgIhAIEVbhfUfyW9TXcyPqZ2FfJofkNFKwlGtK+6McUIrVIx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbOadCRA9TVsSAnZWagAABJ8QAIvd9otQL7wzBEl+MFbz\nnvS9v6qOTuDhXPOqYo5CohDSkf5DkVDXUER/C7MyDeS3d4Jku8dr4Zv/XHll\nKSgw32fU0BrSXgWfHsKGF3KdtN8um5HiKyrzK25aJMYZj8yz7YBGkvatKHOv\ntjC2rfLdAeL8cLEjYFFiNWLETSx0eJL1fx96beW7eQ7cZwISY1negWXzISW/\n4gMIO4PDpjhUOeMQfSJJuD9J6HNMpHsdwNfIkyhHudFVo1wPJ/VhZNXnkI4D\nFqbCioq+DzOUt13hd/v9IPdjFYQS3immrKpiZMk0lWOQQtgApnA59xzcy//l\neMVP07INlaoHN/329XqDaAM2knJr/3XbtOR+w6a44KbUBdbw9tFV3AlD6ueS\nC6LxmGn6261uH0G4GWLiHJ3G4zoxWSQwhUgNFILaSsmDrt5+g3AX0ICGl8Nm\nShh905uh1Qx0gIeHvFg+H0/+NXYyZCg5TisWYCuYBowygF34ws1xHGDw3deK\nhWCyDjCJyfTxK2ZoL0/yc75gVihhBSFFRNoRz4ZBfo0jF4nIRA8iUsGSXnXT\n2nMHTN4WDQFAOdeLAwOtZVoQ8K03FPx+/SAcCX+T90o4h+YuHgmBcJ+7k99m\neQVaDWN9M4Gw93ftWLh0mDEyPtNbUAl2NPXrPD6vplWoLywIMA9DBqPXzD1r\nxX3x\r\n=ALhh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d4d75fa217cd24fcfa1f70cba76f60f4cf9f9ada","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.26","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.6_1617749660947_0.8392879539625806","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.7-renovate-major-socket-io-packages-ad5be83f46c33b36042a30729bb6a5b565e45fa7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.7-renovate-major-socket-io-packages-ad5be83f46c33b36042a30729bb6a5b565e45fa7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.7-renovate-major-socket-io-packages-ad5be83f46c33b36042a30729bb6a5b565e45fa7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d342daa9e22dd744dd48680288df9b16f75eb6a9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.7-renovate-major-socket-io-packages-ad5be83f46c33b36042a30729bb6a5b565e45fa7.tgz","fileCount":39,"integrity":"sha512-aT0BYG/1tegb/4BXoUTek+wWTnMRUJk4UKw6UY9KqUI6VrRHTExubQgWUiqGnHqVTXl/8WKqYy+c9OBYr0mFQg==","signatures":[{"sig":"MEYCIQC7FJwzu7nvb8dky/ABjxfSiuTFbbE2/AT5anD7aMeK0gIhANRoQeBRYHEYLM3rLKRFRad11932x3CrkKVIxxbZfCCZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbOeGCRA9TVsSAnZWagAAvpgP/it0n8eyZpUJya8OqnwV\nlaFWZIlPG34kTqDL/hoq0zxRQO9+JWqkH6sWsB+GxaArvWOggEiXP+kJhREU\npLV0qnLZYKVP1U2sOnJnVBKi6CjF5ejexlG0qqEEjUD2lAnYlpWQFMZSMufs\n9utOzJ3QUGNZCy8MLFDzgbUV9GbjZqZ+XYQu7EP+ud/VQFfUX/S0fjxfAE+D\ndckvLpE7J9xtxlALxipjfCEEnQj25fvRNUYuScNeEz2U+ToQByM/KFO2wy6B\na0KmjxX2uWJp2LoMVQQOsDNVD+u1EqXGSmc+AggwX2uEHsnSRG0USL2VVVu/\nvRH6a5om2W8LsEbCHxpeSBptdfVceSGiXNYBGEJZ4YOkoW7uWxGu24MytE72\nZ0PjoDiWMyEUr0SgKWw9Wz1v+RZzGK9j+VyNfL6H+NFKEZ0wZkRmECM9Vith\nD4lEIsikGJek9ye+v16Plid93d/Jig8MgaBAZZMgQzXipHVEY6SjJQlU+FSP\nXrdlLMVjqIDWGUSWqfEubEOObuYLJhX30yx/Hk8a3Um4YVFv4lB5xaChQjTT\nHLhx2n//IfIKU0a6YS5TUFEq4r2oQ7DR9l7/goQGhy/Z0RIcD7ot/Xfn+a+r\n97ARQdMJIDCMJQNrpojOA2FEDmULv7xd+kjHhO2ztVvUcC3mefajx4SZuSsn\ndbyZ\r\n=nShu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ad5be83f46c33b36042a30729bb6a5b565e45fa7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.26","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.7-renovate-major-socket-io-packages-ad5be83f46c33b36042a30729bb6a5b565e45fa7_1617749894238_0.42042124530044744","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.7-renovate-non-major-e33d33141c233cf2e2fae2066d4416b79c0aaaae":{"name":"@balena/jellyfish-client-sdk","version":"3.2.7-renovate-non-major-e33d33141c233cf2e2fae2066d4416b79c0aaaae","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.7-renovate-non-major-e33d33141c233cf2e2fae2066d4416b79c0aaaae","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"054a76e32576e214f8ef9da6e22d7d4e34e6de55","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.7-renovate-non-major-e33d33141c233cf2e2fae2066d4416b79c0aaaae.tgz","fileCount":39,"integrity":"sha512-G1/+6DI+iu6e+pARhLax0/ep7idiO+R1fshKltMPsz5asokMPpitOIrIvD37Vnov9XVNhBeNUBueQbgaEGCouw==","signatures":[{"sig":"MEQCIFAoH7BYfEL28FioLyJ501zn6jsThEDeH0UAbh0iPiDSAiBKocOrexSC9YhmKzeXJ8kXyVQ/kLIDuk9x6xYJeR3VzQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbQCJCRA9TVsSAnZWagAASlUP+wQwegi8AIh13IGZ2GV1\n6GXWH07ZFfMPn4v/Zf7bTM3VX+K0+g9dmuWt8KAye8qk8APBaeAvorm+qD3A\nati6Piepp6A7N0Kio3aw3tOIIDN00ADTOP2pvmp5ou+WR6ltdmk1lxG/HIGN\nbqxMcjR5gV/47gC3Wks1OP5jhlRmQd4VdbG9qmIKSAzvLwUM6JTf777m+33e\naJYd9k3KGn9p9+ZfxhGZ3SKxHH/iby4FG8iPdzR6q63+zWSDFUP90oa9Clzy\nGb+mBX6U52uQzxnbdDyEaauU97TzZI+4UYjON+fQ9kHexu1B3TSQy3OtI5lw\nkw4CW8nntmuHrFlrX5KHYydQ9CnUBGcmk8kReVuRYOp04jc+nD/JIP6bzoAz\nu0dWjm/IoTyhJa8QUvMlavjkNkx5liHl7tJAAQsdy+FxAJkAIQKYoFqaqnvr\nNcLPKU0Qe1c3pZ9NO937TqBYqXCIAFYZ4qr5K9tP93/zijPHvVBnv9NagCjW\nQa1+3MlPEalfnMWw1KWTTF/zqGdyp09v52SnuBgoJXqEO+NhS8Kd+drJN9SS\nVyA57WE/leJNLHwgsjk7Gnh+SHdX3wle2q8V3aE3PxvmSyyQcFVQAP/hjz3n\ns0jUHQYoWDM3Ttxt4g39KjNnUYJ4qf/g/EagI6+r4Ud/m57HAfOhTQB6ub2M\nyhE9\r\n=G9AB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e33d33141c233cf2e2fae2066d4416b79c0aaaae","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.27","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.7-renovate-non-major-e33d33141c233cf2e2fae2066d4416b79c0aaaae_1617756296856_0.38973965025761803","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6dbeeab75f931254e99dedc2eb80656603233168","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.7.tgz","fileCount":39,"integrity":"sha512-jKQ947t5oukbkt4uGkHPEImmMPl40x0t86Y1jsAQSthqMRpveViuGmUxIesbye+HpGdHh38bQ+53sxDha2CEbA==","signatures":[{"sig":"MEUCIQDAQvyBN6fJh0GHaDyEYX3d4Tplwqa220sb1nX8olQ9xgIgBxQaXCk4jApZEQ2OkASsG3+xsx1d0g6npINqrfHER/U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbQFdCRA9TVsSAnZWagAANPYP/ig8qRJI4mvUYXzPHsMG\n4RTYxUB2iWYUSKA9/iUe888qSHfalL3E3vlgE5Gt4pjKsyrxojMMzU5irERw\nG74UYuIyq2QrEK17ff3idMP1iiwsDDSWQnZfw96cYiUaWekAyK1fFHsNXnjS\nBjyqId9P97RLLTz2yiN32gupO9TBpveUDRXaHlnlXwNCWzSg/Cl3WOxhFYOy\nj41ege78Zq37Q/V2n8KuyJY6nXVx7r4LugGY9S1Fnw4TrUykw7VXhZqBGuR7\nzvsa2qZjwaik0rZMLaKZbKA+B9qjQNaRlItIxZchM7QjeHlGGltG7uCJzatQ\nkDSGLhUfZBnMG2VWtzTPI26iCOfUPaR7Q+oglshmFnY3kRuQ4wY1H2JpSfpD\nav3WEftS5j9SToBl1aJF0LzwnF5naDZc51Hu2CKATuN+NVhkOiIRCeKagqqz\nCDnhHypLL3lLnsFHQZkmhIRDFtzokWPB3WRdYbazzIiQAMj71ICzh7payJl1\nO2CnkgSY3UcPgqwbEQxQNjZJ3YhYbI9uCqNRh2/nS6sXm+H0c5Vk9nhbqxK7\n/o8iIC31Alv/qKv16wFJmPPTmIi+bYSc8t2WFXXM6rJT+byvEDlJ7u5qQegA\noqvMH7Ae3Ll/jQ9fYELtlqZrpbwhN+sTSC9W1tBTqIYkwFY4xJgEy1zO4V+5\n1dUR\r\n=gc7b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1e68f0c8dbd3018529576bb3eadcf263070c8516","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.27","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.7_1617756508964_0.34548531755383505","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.8-renovate-major-socket-io-packages-f5d3efd8c9f03a9f7216d0bffacfb5f60b4840d6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.8-renovate-major-socket-io-packages-f5d3efd8c9f03a9f7216d0bffacfb5f60b4840d6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.8-renovate-major-socket-io-packages-f5d3efd8c9f03a9f7216d0bffacfb5f60b4840d6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ae389e30ee4f76840dc3d62a15394a6fc63f9e1e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.8-renovate-major-socket-io-packages-f5d3efd8c9f03a9f7216d0bffacfb5f60b4840d6.tgz","fileCount":39,"integrity":"sha512-l2UfeiILchzoZ0gQGbAK6TXbL+8hxwAp00q2wdrPAL9G7bMOzMhBQLNqmSOL6FMRjt4Bz/Pc+5YwDudddmakVg==","signatures":[{"sig":"MEQCIHTbla5VjU+jF2wb44XJxghV2ZMjS3Bxjuy5He+GaiCQAiBuWvHgHO28NOLX+/xz3Cj3KkE92pacitQmKDzJl6AkIQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbQIkCRA9TVsSAnZWagAAAh8P+QHKuzZk9+O7jpDF6tW/\nrlxbYom/oxnrHpQZ//H/5h4+0bHSu/6Vmi54SPR5bORHDK5m4YcGOWj/vg6C\n7r5fC3KiH4Gk5+oCP7pEaL4jrdo48PVqK3hJzaXF9COgC2W5q19hNxK7Gg8e\nz25r7HkpEc5XFKHSZFk2HQXyAUObhWFKGkQitGtbR7o6rTapThEsuiAfZCMw\nRq35VMnJqN1BRKbJPmpsdobaiwXawNlf8hHFKuK56be2OEO+XqCm5UX2X0Xc\nIngWr0X6kXEIan7D2vkOCQp+h3WqZ1kfLrjIeGPJTZXseTunAKCkJidryeT7\nxVVJl0/DSIMeZ23bAYdLZ3knT7Nkmqn0R6iFSYpA170FrQnl/43PsqpMasQm\nmpoDb4pCH0bLq5bXXAM/z+ZqK3XTR/yUKLNqoOrmx0+Lrr4YLeN+OCrVxypv\nj0LqI/56EpqZkg8pLeydaNZ7Y3tUyC5dYHUiFYpTUmEKVVOeHnkaB3DA/PwT\nsDopYJB8IK5CHAWCTb1Cs7BP3w+d8j9fTs7RanzSR1PC8UzYKqXPaK/70pGV\nrqWoSbTLqRevTTQiZ4M6ThKB44wmkaOA7Os15POT+n/5WAAoLAYIewLbhUTp\n2in2usIGzaXSNnNpurafjEfpErWGn6D21f7xNJf7FBXZdIp1nbHtq4IIJZT8\noudm\r\n=vdQt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f5d3efd8c9f03a9f7216d0bffacfb5f60b4840d6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.3","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.27","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.8-renovate-major-socket-io-packages-f5d3efd8c9f03a9f7216d0bffacfb5f60b4840d6_1617756708070_0.26785898830816035","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.8-renovate-non-major-c4267f8712d2aa9b96c0317bd0e3d7990c417c50":{"name":"@balena/jellyfish-client-sdk","version":"3.2.8-renovate-non-major-c4267f8712d2aa9b96c0317bd0e3d7990c417c50","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.8-renovate-non-major-c4267f8712d2aa9b96c0317bd0e3d7990c417c50","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e02d90bb43ea729fc382647791f32f1ebab55014","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.8-renovate-non-major-c4267f8712d2aa9b96c0317bd0e3d7990c417c50.tgz","fileCount":39,"integrity":"sha512-t7ah7l5cmkTQAjlKJmpUVrgP10jw77D/FnX78TtuaLlC1uRx29v9KcssD+bmNc98J5oZdk8PIgLrmYQ64GHWSw==","signatures":[{"sig":"MEYCIQCWBGWgk5DdHNXqP9mYMxt5csdAz70y5u5r0uz8kUE4qgIhAPCNaYbKuSd3DxTmVJL5FPDPEzciteziCIXlz0jXGfqh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcSRRCRA9TVsSAnZWagAAijsP/33nr3gRiH1bgFrTAJxr\no++dH3lWHkNZu3V9eSyrJiSrGW98e19b6WM4jwju9zqzWzmii0K1WoNVC2Nb\nv9nrnRhylkK9iTjk27EIkekl5slHXGeUKgkcnQjbo2pxyo7wlEGWhd57pkc2\na/9hazzwIEOzNrnQerN4y4Gmdz7WKV/y6xda8piZtWsq4iKxmRGrTaS7AaBj\n6Qvm8qdCdFgraIBw2mKpk1L5E37zDL2a82rTuRHDkwDJmZerVU27SE58dT7b\nWSO4e7i54LyDPrTd/E5eaGD/s/oHQp3gcZvpa3ju9TdWZfosVxdHCYXckQHT\n4iGHBgXB/yt9ap1lgKGNEboQ7StCqPDV+M9KBwftLgmUNNwJMdSes6nGKqZa\nlm0RjCQXABeQZdK9JlM5+zP2cTS0VNOm8KW/Guvh1VyzplW2cbOupNcc5Dvu\nxX0cJIi9pTRcIsCMcLltSN6+PsO1i/zkGb0h/4zdvxSIBf0RoPXzeyJofzUv\nSsAkQgJsilnpWxn6dQoE1nYYHPbdkATUo7QQ/6WI4ICwpa6ODd8bZQ1wSnYP\nyzX4nJ8EtSgq8aG9if6Hon02RbuPtCWdr6wh3dyVCVfnQQM3gk4Y1t3tX9tw\nyz/sLC5gy2OrYarpJ85Q+lV15u7l2VG4SLKbR7Q6tByBcWTZ9sBDqF9AleuP\n6MEU\r\n=0xgK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c4267f8712d2aa9b96c0317bd0e3d7990c417c50","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.28","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.8-renovate-non-major-c4267f8712d2aa9b96c0317bd0e3d7990c417c50_1618027601248_0.46525970518280624","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"949dbd430dfae553c3f3ad3c64a58d4d74ee7f5f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.8.tgz","fileCount":39,"integrity":"sha512-T0jzINi9rTxPyYH9pZbnyay0MOo4AUSJ9AgKWqq+iV9wGbkNF9goVwxXdyCeSkxagapuuqiuJwXn/dLSbOzK+w==","signatures":[{"sig":"MEUCIC8oq3T+S9jgNGncWosj2jtPKUR4QIsanZitIMI2/plWAiEAtBT1wos+x6vqiuMaXnrK7Maxh7fpFULkzGlpUp+XkuA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcSVJCRA9TVsSAnZWagAAu1sP/1lDQCCF9PSa3k7UgpFi\nb8LBawsNdnrabpuAaC6oLA1cS6L7JGiivJesLkqt2bfXYo88gzurDi8wRrpv\ntD+zbTFq+EZxGmk07AWPF43zVdL1wS0j7hjFiyQ+kC7yhpZDLdibreUzLRpM\nY8qGqwH69QpQA3TGmbxN4qs663B6UmmhN+K3E1DhkCqugTtt3iGPkyEC7AAe\nKIGlMMsE7okFih8qP/TmpPxFxqlkeoS9bYYl/bLfxVo2tr33mdJeyRtJesj6\neTg1rD1Q5NaUX4oZV1SAqSEJokalyZeFCJK/rhzTqHxqV+RTkLuF8p0sZx+r\nC4JgOqXcYzmhHD8Y4yZj/h3z0bnaBF0tfjOdJn9Jbq6XlyoNsgb5+d28IA/N\nwdcAPFCPnkTEtmn/lfrUMl3kGruagquUu3pjohvcODWITygOFwkwPDv4dbh3\nsogbFLat9TxA8ofQGBueOU1INYtM0elKtrTg1BCC6YnK/mROeZkPD5n4Yizg\nOoj9BmuV6IPHTBb+5jQidWG9HTfRhJxUD7rJfcnzHOByL2fKkqTDxlQlqLmb\n4VN9+NkTZFGtZsM9Pyiep0jlym1EhwrptfDXIB97VBcKchYRfg/IVrdyGTOd\nJh3p/7VGhO0SoWIEln2clH28ojykPzIArEinC9Y36aBeWSZEOC/T9mxVPVSn\nd86m\r\n=wra/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"eecac978486ed80ebca7a0f5076c17d3efa33439","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.28","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.8_1618027848692_0.7131330345746141","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.9-renovate-major-socket-io-packages-30402cef877a62e14e91f48d4c1afdaef0b2199f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.9-renovate-major-socket-io-packages-30402cef877a62e14e91f48d4c1afdaef0b2199f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.9-renovate-major-socket-io-packages-30402cef877a62e14e91f48d4c1afdaef0b2199f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4841fb6089a93c5cbbe0ca89e60410c11d1d0c2c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.9-renovate-major-socket-io-packages-30402cef877a62e14e91f48d4c1afdaef0b2199f.tgz","fileCount":39,"integrity":"sha512-rP4pbqRmcNIIeEHKkJtkJtjS55LPI1VXlK+aGulrN5G5dTl8RoScQs5wjuQxSJgzpYyumeQSH5aM5LEXtnyfMw==","signatures":[{"sig":"MEUCIBwrNaey1FFTGnbrsWad4wc8v5Z9kC8EEDv6w9wpvlFTAiEAnR1uDmisWjdHkebnUzO5Dx+IUQ5Id83LyP3SaCFXF0s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcSaqCRA9TVsSAnZWagAAImMP+QAM7L/cdCGvagxirf/R\nehj7vkuRGKgbplZmCAGzRtReLO2tdnwqJF+9pKOMkOiIf2tkG6UagI4cQylF\n06jma6eoUzlo0ZjP3j8l9lMSsoRCEdB+xNigGDP82vAFUD37NOxqXelDybFV\nTVxTf++z0WkwKRYEckckoQI3ST5buRDaEqyEMCuCAKklcxiYnQdrkevWFwkj\ntireWhTD09MojnL8y+5vnsWYZ0Ld5jlR4W29iSb7OC/HJn6QyLBCpbiA4BYq\nzR1aKeRXBXEICr0UCl/dUvn2tLlnMchShOvUgW4riNl2ULKdAVUvEIXpMU8e\n6Kh7v0V8mXp0O/JyBYPNWegGF05nnU0qNIEp9HewZeV4c8XHMfTanuVU+5/T\n/JVWL4YiomifK60bhj+jqDXecBv1fc9ok9puc6Wg6qZnUrdcj78q33vU2XYT\nGicJ3IjB+I/lglD12B/4oRM1hQ5t45IQkeZLQA0pWIKPlblm3A4K7ID02chB\nzEwU/E8mNljUlkTn1yZ/mj+SJL5m56CWcojF8KUAsDbieZSedtcXkaCmpdjy\nV6iVF+y0+SYuX+mHG4ORU0+BCuu4ddvSxaIRZSOOab/Dkflhm/etg5hGc1BU\npEnbcxs1J4SLzGBqJbZtHCRhRICIcaRKScL6Fb68W5b2iLRZjxrJY67YqIjD\n6QzA\r\n=XQQ3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"30402cef877a62e14e91f48d4c1afdaef0b2199f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.28","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.9-renovate-major-socket-io-packages-30402cef877a62e14e91f48d4c1afdaef0b2199f_1618028202022_0.00612437950886302","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.9-renovate-non-major-41c3d472560d7e4057d35ab3bd2b9acc0dc1a971":{"name":"@balena/jellyfish-client-sdk","version":"3.2.9-renovate-non-major-41c3d472560d7e4057d35ab3bd2b9acc0dc1a971","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.9-renovate-non-major-41c3d472560d7e4057d35ab3bd2b9acc0dc1a971","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d2c793d226e65eadf1db4e1a39c9d5f54545fef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.9-renovate-non-major-41c3d472560d7e4057d35ab3bd2b9acc0dc1a971.tgz","fileCount":39,"integrity":"sha512-dUVuSiokrpCFB5j5cRR7zG9r1101sLG3jAehdp0dTeDthEKg9TBS2G/LeZ5El9ykK+n/v/3HavvIp2XznJydYQ==","signatures":[{"sig":"MEUCIQCN1encYEZPOkfXo8HcDac7eRqtSbUb3aRnSPzzT/q37AIgWET2VzNY6Lh+jM3w8sT/TG1DFRKg4zbd9+gAjVc3pBg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcVsFCRA9TVsSAnZWagAAxoQP/1rfvlMW55p9hkvDhn/q\nzZAca6FFltudVqpaiCTFDM/a+S2Srn9x7bd1MKB1/ZbuEc3jyMX7vRNLl9bo\n00IvKY8Q4JERNp/vet67x6sAuSjfyUtFD7O7cQ3Pnu028TnzJqzxj2aSWdKr\nqGXItbAykvCP7heyuBh66RGMuNqjd76uOYGHnpcsMEu/jwIy7q6cdbIkj2YT\nZIretrEb4gUZe/dPYwjcX4NLNUd/QMyaHMQfRIOqdPnWJfJirihNQ8SGMNri\nKL6BCuzqbUeykN24JS2ezrCaJZmSF8E0LXLxu01mOQtbpmHGsFMiU0uV9D5e\nf/pUcd/APrV7c0gU0UX/KqO1X8r9KiC6dRPJ0CToSqmiMCujZNfZR8BI/LTI\nczA8hh9jy5qiISf9Rczz5XEtTXMtqBpUjvsFKGXw2mix5rFLrCoGAGrRF+OL\ntddhm5YkF5rqlbl4GfXEmf9kgPEkAfd8uD1qIbSr/ZkV+I+qa4iF/Oyf9rKE\n/Lh4uC7jndPL8BKULKAmpda4KzKdF0K/vuYAs5i1uPUiY67eEcvTNQQMRPXO\nrLgGFpmOgGrWUSo8rENwTdmzUwzoMthQrtD/XBv72XAPCyVc2EOQYyfe3QN2\nPW+4nZ3MRuKs2VnwxYADqWGTGLOY2PNQM7lGKpmliU83ZcMC/ygYjqmavNKW\nSNfP\r\n=EPG+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"41c3d472560d7e4057d35ab3bd2b9acc0dc1a971","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.29","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.9-renovate-non-major-41c3d472560d7e4057d35ab3bd2b9acc0dc1a971_1618041605074_0.9509442739382377","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.9":{"name":"@balena/jellyfish-client-sdk","version":"3.2.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d331c759a6e2309ede3c445f04d0ed3d7374d6c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.9.tgz","fileCount":39,"integrity":"sha512-fmfuUl+mikroiMsSeqP0JM5QLLlYe2Yvg3es8+6fGz8aMXoP7UUfwwtPNBVKdAQIuUlTT+ThEX+UyLydzkm6jQ==","signatures":[{"sig":"MEQCIEzayMA9VK+49WBTMASeXUdwp/deehu+Pob+sTecHzIJAiA02iwBzD6/e8j/WDJxoeVMKeQ7Sv1wf3O8GIVlVCqz/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":229956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcVvQCRA9TVsSAnZWagAArtkP/16qPUimcVH2dDY89828\n7EE7vJsTMQY1K+4BDZC6Lbr4pm3ahbiyCGhByltAHZJYVWn0owX+bYp0lqbt\n6Dmnc1AqXPQc5s/sQ2hwiKJitkOR+aldmsPCTC03eeZUCri2I2rVDP5zzyj3\ncNqKqOW7/gC4rL7vVwUXeTee+9f3lHe7kf8yqasX8cVRYpxu2wBtKNUIAFji\nmtsBZlAPpKGU03NHAsLTwqwlKOrk0wDjoKh/8rzHpDMJKd/P9vGZpg3Jco7b\ntyDMsChwIngOMPK5ZLSzgpmqB/vsNQilb5nANEAv6ax0fHZmBkR4Fd+ct1xP\nq50ksrJ03gcECnvn8xmMrcpDOPVuH+oyzmIeIBVpjCDfcayfAf1OhiRH+W/8\n54RWVDEnmE5u1aud0rPBE/uewyVV4oDzLYSI8l8i7vjuD+2fUbLjwpGFtMN8\no0MuocewM+hhr7t6aerN+hm09DZvZuRNCTUISG6yYimLShXUF+kwDrvBR6VR\nUL2ZwQjQpbWZ8LnY8fBssyC7EgOJ6ahIrZYRolxdt0GdB7cgRll6QrbLC4RE\nyGNFPFV6sZpJeN6UsyCJUWvwOLrtO2bosIiYSfixOhJqVtoq8xf7aGu452Ny\nHPrsFA/CDtvLYnNPBK8fiY5AfSc43NBOtsKBLPEnVbJpY7+noHoymMzKkCB4\nggeA\r\n=fZDT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4390d9d845d6ca7e8b388f476c20a6e92f0da41d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.29","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.9_1618041808234_0.32417605590310905","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.10-renovate-major-socket-io-packages-bccb5ff85f437b37c35213d412d9a36600a020bd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.10-renovate-major-socket-io-packages-bccb5ff85f437b37c35213d412d9a36600a020bd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.10-renovate-major-socket-io-packages-bccb5ff85f437b37c35213d412d9a36600a020bd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9733d1829527d4cbae58c31d1903c438ebdc9ad7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.10-renovate-major-socket-io-packages-bccb5ff85f437b37c35213d412d9a36600a020bd.tgz","fileCount":39,"integrity":"sha512-MlsGGm/tJFMJ5EuIBOTux19OXKTG7Kz5fhKR716jh7F6ldTOBqm/EJZ4wj3R1v2VKVBJaNmXrUu4Fw70WqIjFQ==","signatures":[{"sig":"MEUCIQC39XtmL2STII8YyoQbiyHo6eUNPHcm5IBiFAGMADw4zQIgKn8DWXIT6su83cTY6ZP9shsgT7YGYYrGDq4daKGoBqU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcVzkCRA9TVsSAnZWagAAsdUQAKCuAUP75UvSU4+l6flR\nQsS0tIptvkLZdL/L+m4gtHnVBT5XdYCDCo+82Ezf58OC23tUc+JQ1RZFdNhh\nSa55hRkXtc/Biwk7QpdpkmcMMWveF6V/Alqv2eLqwZv7IUxMVscADIcO0i9J\nhXukjPk3wJbMP2A9H7UEPioff+t+imgC8Cg+lGdM1aGV2Z3AzY3Ba1nkhYHQ\nFG2OaxPJ3xZdS27uHXNb6fajjkJGzCDZpIRGStmymlkmVTqSCOjZBsV4uL/z\nzoKP9TrwH0vsxqhhRGv0I1EV/0Zj/XtxLaJZ2hQb9Lhx2L8gu3lTVHviSEFQ\nMA0WQ3/MjeueUX19Pk1AyuRyO3qKHXyVWQwTk8yYpcsw3D/0X0yt621bsxo0\nRq5soKiw3+mPCnnLMd3oPf0iT9BozUmlXRMxxiESa+Dx9w9DGuCugSkYfiya\nvw4YRt4rbUCm0rAVMogKkct9R+0aTZnni9eaD284Ht930NRvT0Jh4XA9ne9k\nDvokGosxR34EYK9chmgOLa1gtPeBsuJEU8fnayeA8ShkwlocadJOj7JJBd7F\nFRmwTWAuudu29bbrKccZqRxAyfj25HdqvjhhIqQTBI2LVDQ7wxror75TS4fF\ndytf0ILpcc9J9o8SPVrHfMcRpo+4foRD0mO9lRH6DXbeznbl5NVztP8lBpR8\nDLGj\r\n=ySvJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bccb5ff85f437b37c35213d412d9a36600a020bd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.29","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.10-renovate-major-socket-io-packages-bccb5ff85f437b37c35213d412d9a36600a020bd_1618042083614_0.9585401143961754","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.10-renovate-non-major-140c587a359bebe58ed2e2650fbff64c8e93d23a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.10-renovate-non-major-140c587a359bebe58ed2e2650fbff64c8e93d23a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.10-renovate-non-major-140c587a359bebe58ed2e2650fbff64c8e93d23a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2a85ef972f611240fcf69a713f46226b7ea2fdc3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.10-renovate-non-major-140c587a359bebe58ed2e2650fbff64c8e93d23a.tgz","fileCount":39,"integrity":"sha512-7agSl+rOcohv4cHYSK0g8zrsrXemk/L3fvwXn1JEE/9OWqUGE5xEKHhGMXaKpVpC0pQJLTSuM6ZEvY7rw1oHHQ==","signatures":[{"sig":"MEYCIQCSiSceJqi0ZsD2X4QSOwveRKH7VDhGXltz3rmCF4tJMgIhAMU1DJiJXgt+mEcBfTg73jqkmpWWLFzGoOUWAgd9Pmpd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcXDWCRA9TVsSAnZWagAAAW0P/Ap/UO7SzEHpQUqt6paa\nEpifCjy7YAAbhUQYglrIU687noxfsG0Nf717TewiQd9eG2oqgLFp6MeAvM9c\nYKmmqZ6m4s2e5dUTY1vuh36Oc1cwO2g3Ofx9UZCG/a/DKwfnqK+4jbmmysHb\nrg5Bz0TCvHAPj8T1BhZ4PJ2GaMRs8TwzFtv0qTDNQB+2mSRU0O0R/h384s4R\nQoYc0r0FcN9xvOuMKj8Av0LCuL3pX8hdh4bZ7jRrS103A1rpqa62gmRjSX8D\nbQql/fAAs6PQCR2JlvtOTgr5MzXNgYOiQgeGlR73ok3Y7vfDtV8QB0c6Y6OB\nq/iPzMF988no7PhcTKe4jHlWIpoHiTqtv0+i2JtAFMWQtcOnNgnRfyzTxAVK\nxFA03tzNKuZeVopCYtDenDSg9hTfOlu58nCLnE6D2iFEP8gExQqPt5OpZCUF\n7TwWmdKQPWIOz3/ehW8SYlHxLbZC/bH7QjyKPCS+ReTU7gY+lb2OvTUDW+z8\n93P23eu4yjnqBL6DvsKtbmM99RMuxclmWpobb6tIa/zitshQAD1Fm9MCUxWm\nDTNVpXDqHptFyK048gAPCKAjZkdhq6uX12iQ75eALC0IFzn2dSoiWWNXCRrE\ntaLzJEe4laQieZmRSsOdth7AiIPIheZKKv1asawWjmT4DhmshOZSjQTnGt3X\nXMDR\r\n=fx99\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"140c587a359bebe58ed2e2650fbff64c8e93d23a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.30","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.10-renovate-non-major-140c587a359bebe58ed2e2650fbff64c8e93d23a_1618047190315_0.0778363420511261","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.10":{"name":"@balena/jellyfish-client-sdk","version":"3.2.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"db7cbf1dac529a485f5512411729e5658cbff245","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.10.tgz","fileCount":39,"integrity":"sha512-IFmI+ZT8lvgzJQjsaUbKy2MB/YJdM9cFTeFGqsgOaUxT2cxDl+UgK68o8Jn0dKhHnoXfTVzd9rBmZrWHkYs1jg==","signatures":[{"sig":"MEUCIFulsno2K8ch+sI65X6EsZYrDIoWPpl5nv0anSGbuKToAiEAhH3boTiAS4Mmt+9E9dfRbiogqZKqsAF1XVLFwE8i0UA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcXHDCRA9TVsSAnZWagAAgiIQAI9lrXp/n1u9RNH5t2z6\nqLtRJCMUaPF+ekH+VT0z0zO/OmfkWIGhFVkX8I5N2D5Xy/QsnY+3sJAussX2\nzd1yUu2jraLfkkew2DsFhvuV+iUhQGeVYTmh7rURHE1Ymx2WRX0QX5KO4A0w\n/laQO1rhbs3VI0shHSBugn0WUFnR6J/DSSr7wJ+Gt4JrpmwuEf2pg8CPWHQy\nT/Ffk9YCcuKV+U73bQ2ixi1iAXV6yQmHnXjfqzOm4G1MUPNUIzonqaxM5dCl\nVdnSOvPJml1y+BwwgDrW7aoWyqY8542rBH05Ja9iGYErQ0GDuOEVPhL2fOhy\nu1ae5P92jRNfZAQNDmIce+kPtpoZzuHpIW9DKlglGGWuSH3cys0KNdo4mfgM\nlRmHhqr1pfIQFYAFoz+9ma5Jhrn52jMEKUkGL/s+hYP//aAaRZ9+d2pxToCO\n9PuCWAnekrbtH9YVBB67CDNgrhyM/nacSm9T/x7uHdByUd2r48Twg2SSYS35\nKPhs5CZXk1z3Yas59lPUC4/yWpRJGBhmFoOtMH4oDrS6lZpTT7qAwca065h1\nuZaRMgBBnxpwdjTi6dmkHy8b2nCglYq5eB0oncS28xlQek4BSqC80XAx4k32\noZTTbh+ekAz4v+DCNMlwkxQQVlCYGIOWYml1BXmztTrShLxJTKyi+hdLgqSn\nWjip\r\n=z2Eb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"82199c1ccc94a21f8b9ea0e68f1cd1b2a6ee98c7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.30","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.10_1618047424464_0.7857511976909359","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.10-renovate-major-socket-io-packages-62f19613671f847638638712ed7581d722925a34":{"name":"@balena/jellyfish-client-sdk","version":"3.2.10-renovate-major-socket-io-packages-62f19613671f847638638712ed7581d722925a34","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.10-renovate-major-socket-io-packages-62f19613671f847638638712ed7581d722925a34","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1b0ba49d9b1c2f1bf97fcae151ad23eda77fb76","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.10-renovate-major-socket-io-packages-62f19613671f847638638712ed7581d722925a34.tgz","fileCount":39,"integrity":"sha512-SImLzHqfW79MLK2Zy+fNaFIxWMEjA0pCbK+aJlr3Jst0bw4OetaXR/ewlSgEkuV2yJykhjsIkFPHMGp+iqhCNw==","signatures":[{"sig":"MEUCIFnwXUw9KXsRzDdAdToF7LNKkZ4/HcjNEX5abVVVLz/VAiEAyk5F+EGh8ax8SbYEvUoSFSjxOHWPMKRG7N1FP2xOlnA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcXJ4CRA9TVsSAnZWagAAMzoP/j2Z3ylBaKMRwYYeMCiP\nWbI0OPo4EAnNqriPd03fCy+Wg9sKOqrCKL3ZSRZgCqm23eSkN8NXhU60MlRQ\nCCSzoshOao2clOAXvhnVX++3MPI3l0iZBCxRLFmQ38NueMZr2q2CaSD4lgK5\n0CLuUjo7oJ0kvi2p0+4ch3J8cnVU2N3kl1PjPHhkXUAlTJHLxfblxAphjmoo\n5QFBYww63wZd85OuVB5SOjgYZ5BXxT5+P6/hFkQlo5zVJTZ5YRceZRtAlxvZ\nDK8zBOrU92FGtdcVGYNcocgvYcv5JNRBK7Shmk+4Pc1lri2V7ozwAtKS+Tai\nhpv2tQ/YLsvH0qXAKc8nnRaHS8zGkwvLzt3Gt83WPpcoVu9z+zEz74yKrg38\ndb6KqxUMHT1N8vipCoK0dQywvqM9cfep+4/IKWgRZ70aFPLONHahNz4iH0/g\nbvlC3XyOLkJDseedwjJ0fZCSgZf5bbz+AdyIgHI1D20goP2Zb2HymSo97iss\nq0ilfDU9j8e530hwqz1l8TbD40yNuoaFae4Zr5iEQ8ocvmjQHDuTo3CF1Yax\ntisq0GwZMKIS1FoMXyRtiLLR7CrwP2dH3nesrJ5XhIHtdJgqzWaCehxtI+mq\nt3ppHwpxpOQKkm5X0G4EeQe0Cols2dq00XtWSapQiEu1QQaGXs04x6qQZou/\nevH+\r\n=7P9C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"62f19613671f847638638712ed7581d722925a34","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.30","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.10-renovate-major-socket-io-packages-62f19613671f847638638712ed7581d722925a34_1618047608199_0.23648618033635516","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.11-renovate-major-socket-io-packages-3e57050d639a6e448e2d9ab704e59b4179aa489a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.11-renovate-major-socket-io-packages-3e57050d639a6e448e2d9ab704e59b4179aa489a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.11-renovate-major-socket-io-packages-3e57050d639a6e448e2d9ab704e59b4179aa489a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"928d8e398292a3b037b9583e5bfb0efb03702d30","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.11-renovate-major-socket-io-packages-3e57050d639a6e448e2d9ab704e59b4179aa489a.tgz","fileCount":39,"integrity":"sha512-lkbx2rxtkBaUeXCnmlTUtueHmqjsMEz42aSAXZhvMEpCyZtOY7wkQXcHMp305Jn8BTNkCmilgoRu4Cj8VkcvNw==","signatures":[{"sig":"MEUCID9VSjXisFgD6PYBjtIdBS8D7+1KLLcpMVYKiGDM0yL1AiEA6PX6TNPPzFPSEzifsAE/sWbc0FFBlbBIMYkn0RnIn74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcXODCRA9TVsSAnZWagAAUX4P/0/svDQeIZRwpiU5uBng\nbZXwnmmgfWA4CE24s+awJe2X7aBqAdBc0ooY+C0B6RJURwpco6+dJyMwGHIR\nzi/aqlCxE4KIbEEA5uZi2+FFH8C37Nx+oQNo5w6otpL75GNFGZ0gk9dnJFdx\ndLimQBnZUJWmb2PMQrrzNROOn7QzfS05G+9G51tQabvUJrfFU+DVswTrCtTr\noSHzyiXNg7vKD7KTzpQSXGSIRtL6AbS9rQtVifVKie+sMnKVOXlpne9N/lKa\nE/awYeMZE6nx+ZZCv8G+y4vcQX/HeFi1QEN41dEouyRg6HwWd1/utfhNAm0F\nyeO3/60Z3VpcxVIqwec3glZnW01sv3LH1o3TA/n5ydBT3I43MlBMyb/ntkne\nGO85vhdGlCJDMChuhqoECUSPmSm1ttiDBUzayODyBU7w5FUW/BRPi7KyOd7v\n5bV+rC7gcYYNZ/KjEl2ECFx71dz1iW0yNCVCpW6WjeYMTB8WWcDU9tnYt2Qz\njhT8cBqEVTdlk0xd/rSrF+IumITzUXIR+kKk2lCH55cX5OsGCb5nRzK0WSeS\nj0ZIXbo6HqAT4FEd215FOihK0XXcOsPio2cFb7fUk1C94BDdFynVLp8U3SQj\nxTzba14yclo8Y40IV+aAYoDTyaBO+c1lXcKrUYKDvUICeT7OSnhfnJNdndeg\nnQ4x\r\n=XzA5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3e57050d639a6e448e2d9ab704e59b4179aa489a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.30","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.11-renovate-major-socket-io-packages-3e57050d639a6e448e2d9ab704e59b4179aa489a_1618047874941_0.771177500108972","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.11-renovate-non-major-64ca2b44802a1248dd6fef170499e75c4d5309fd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.11-renovate-non-major-64ca2b44802a1248dd6fef170499e75c4d5309fd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.11-renovate-non-major-64ca2b44802a1248dd6fef170499e75c4d5309fd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"45072bd21df9c658f143645418f2a5d43f5a3fa8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.11-renovate-non-major-64ca2b44802a1248dd6fef170499e75c4d5309fd.tgz","fileCount":39,"integrity":"sha512-u/k/pTvw8k7gIMRWrWaYZ/Qob+lTtX+C0DkM3HMywrdoOw5BwWNRfV9CfrtD+3h+8OqGSyJ1Dg48L6R7JqBeWA==","signatures":[{"sig":"MEUCIDI1Ghr5z53NINp3AaQ4e/hYLzgUdDBuWYsvXSuRAeXjAiEAlJoETM6odQqInd+FyRC2BhyLJjrDlihGXP1kfeR0jAI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcZU1CRA9TVsSAnZWagAANx8QAI2vDQlp6JgQjhqDPMIf\nGinCJ7wplyTtHhg3Xebo+zV5jQhjc7ytAVadrdgj5VQ3qg3mJamHkI6fwp8p\nR/AL7If3E7PCj7RaBKDgEQb8tr8w4wp26K6nTZoYnsr625J9n3fPtEv+C0oc\nLWXpVpZf6Jvlsyh473fd3CAnIEqaJAMddVOkBI/CJoOHamKjUhYumRBZ5/HW\nGJuQ9+W6e8qJKMeDymvAiysp++iSngEKlOTwybG4Slps2P7x3bggjQc3uknW\nVoSz8clCoDMA6KoKCOnR+8uA9WxAO6HvnYO88CrS344UoUaz+Yg6uq2iVddC\nEznU206CIE3O6JmSW6PQGL9wnYghjIesXBAbxkxlhaOYIUD7V7L4eh1ShI9C\n3Tjx3WEiRStO3CREtFD1Qsmuzr4Kx/Xv7detn8S+Sl2eZvcfGPF9YSz+5pXV\nGA94OvZfAqe8R009+5YnFMNegzOFqCIrMPkKOvd+6bE/T1YkV7gl/fLHQ3GG\nCGDjgqUtrjx3AyioaidxXJ2lHIlWqJVxAUaZXJ3Ap5JyDVzGqeP66Fcwvfno\nprz9hK6awT5BCJ0eVVzwrULPyNXhgOXkfS3Sprl1o4bLhiMMBuQr3oyjM2yy\nZwIYRYSnsFYziMDACcjYhw/X8l897HYkpBfekpsgEZ1hjQWBCC/sLNfOhHM+\n8GnU\r\n=SByu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"64ca2b44802a1248dd6fef170499e75c4d5309fd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.31","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.11-renovate-non-major-64ca2b44802a1248dd6fef170499e75c4d5309fd_1618056500757_0.25808843716614005","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.11":{"name":"@balena/jellyfish-client-sdk","version":"3.2.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"74170997af8c89a010d6b970cad4c4cdd7fadeae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.11.tgz","fileCount":39,"integrity":"sha512-sR9cpsluFwW0DsZAm70oGSl0ij0Yyukbb8s+Y+PpHBiWdmhxziAXGrr2QrMQjgoAASJoxk7K91NutgR+2VN9FA==","signatures":[{"sig":"MEUCIEl4z6/m7D2WC9rH0mvCaVpORBqWKGkBqI7xeqpTrlcAAiEA7NewHjCGcM78/ppaf4WUMkb9F0e7QAUJpvvs3dFOybg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcZYNCRA9TVsSAnZWagAANIAP/RwAhpAESqX7SvTHOxzf\nCSbcfbGQBOaj0a9ku6QhKc0e2UZbuTqHHL7Eih/hlKV+/8VUcOWKkI7Hm3IG\nS5naqe0ngo3h9a9eEKBt+lQockCxMFymUl/vWlQGdbgOJDeGqk7NMb460/rg\nmRgF95OUnotY5aMz5YR0pp+5tjn8S6csRxRoPzTe/Thbk6S92N+G6iSx3rFu\nPRvy6c0NBd5+F5ujlx73yyVV28AK3PaQ3rep1Ua0xkI9cGPSjA+GZy9cj9MJ\n72lydSf4PR7X8umQAQ0GlUURg+hkrhE9z92TtjHMjmNmhS1c7YKehzTsl/yK\nTmC4EQEr+zWEby6NH3FLaCk7cqsnRZCPE/OpuQzKWmmdZst6GNFZ0fbMd5Un\nxeudEVDoJjbSqJxoBzefji/xZN3AfC/Gip8G8pNBCCHpt/b94ls0RaRSqidp\nuRrdew0rerRDiRoD2xXLRQlCMe+zFUv9kVvnnwAI5gwCP1y56juPFzEkcMBf\nvtr+6fFejmHCFsGYDcunIMCLN0+57HYPvG+7bivZxhiqmfWvYSFa6vIj6Ikx\nbrfMP6zY+s8Vq2BNabVUrpCZjMvVSkKRTLPV/w/5aXwPM3M2jfCsh2ijkm9H\nhjqjIROAn+J/rQjgWMpSNecRkAao8soPmnLQBaTFarBWGOckl9ZhmbR37MxW\nlL2h\r\n=DS0h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"510e18a7afc0772db5508e15f30aa2f595ae6d63","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.31","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.11_1618056717266_0.155429753183552","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.12-renovate-major-socket-io-packages-7b769af08aa321388516d645bedb8ee12c56a91a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.12-renovate-major-socket-io-packages-7b769af08aa321388516d645bedb8ee12c56a91a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.12-renovate-major-socket-io-packages-7b769af08aa321388516d645bedb8ee12c56a91a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"58800354021447e37041d3d271056459da7c33c0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.12-renovate-major-socket-io-packages-7b769af08aa321388516d645bedb8ee12c56a91a.tgz","fileCount":39,"integrity":"sha512-J3iasXaqo+ZAbYR/2eAVvipYTy3nQiT15ZBuWI7OQqNNu4umA5+DKpg5PP7zwU0lT11BRhEeQGd3KtIsUd3prQ==","signatures":[{"sig":"MEYCIQDRnOkROdqFWJQvq5rZSnVcVpJx3enFeicBPl4ELKiuWwIhAM7EQ4F8JxZ1VcH/QOaK+yLKquMQI8axhuFq24JhLd+A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcZb1CRA9TVsSAnZWagAAEwUQAKFm92dmzf/6E/VHecoR\n/6F66LscyOsrUpfJfF4rEB9O0X+g4YKq7KdTNx+76zq6AVgEODhphGeWfb4Y\ncX28xJ+tbf6aK591owKblbIqvxYvwdsiaf6LJwPUP6Bq/JAsFqQUL0o6cOwN\nIH/miNccgg5NLinvfavEvPr/3qv8KNp2lrYCMRQ4j2n1gJ4khEtS56Axl1J2\nnLHOBeJJ6TiwOe7aGLqX1Ku2egAffbZWyWmsTJDr9ZWGQLy4Tq70UicbrAXO\nKdFN+B0wk8iZ81Suz3qxCZ2LotUsSSGoFXJwRde/nrqLZUuChwjnvm4Ytf8w\nmhbcheB2Jor/RsykqxJmKaidPKm8wJUZFJWLyMDU88xywck4dnLysEH3+3Jd\no11QzbzAFlBDw4H1N95xtJvF2m49+ptXDDzN95OEO41+EDfJPwhq7cm8KWaF\nAfE38jp3e4RxDkxJPq2kFvIt5QW82NgLbejC5ooSsoRaZo9T8RVOLtdI3Tbo\nEJovATtz3K0SwpTPAhxNaPmnWaI//OcYyLQNdZ5bCFBoMIuhq59M0WAcQTSH\n7bwI4HgpsCbOZJtm/+4h/KXOJ/atyNN1vJrBN7WbON1BDBTlKzzsePpsX86i\nFAP3O+jHtpOm/NwzY9ct7yK5fMQkA94+Xm3y6iAwZSRa2mhaYJAghFv7XhUP\nbP2R\r\n=4xYc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7b769af08aa321388516d645bedb8ee12c56a91a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.31","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.12-renovate-major-socket-io-packages-7b769af08aa321388516d645bedb8ee12c56a91a_1618056948833_0.9500145391469434","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.12-renovate-non-major-8ee8e8e07a1fc9ce7908eb1d9cc28bb5bf3118a4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.12-renovate-non-major-8ee8e8e07a1fc9ce7908eb1d9cc28bb5bf3118a4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.12-renovate-non-major-8ee8e8e07a1fc9ce7908eb1d9cc28bb5bf3118a4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9645b3acff3cfc6bbec6b97ee2cce12b1ef5cd21","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.12-renovate-non-major-8ee8e8e07a1fc9ce7908eb1d9cc28bb5bf3118a4.tgz","fileCount":39,"integrity":"sha512-yudULMf5K/OJHwQhwsQZgPc/8kAQyfD5UM7/n44lr+RX1gCgaHcOIgBsu8sPfR4t0a7WffafDXu5ygD/jWM7/w==","signatures":[{"sig":"MEUCIGfvpx4BSOi37LWiIbtY4YjfOtockm/N6QXFgFbPmsYNAiEA0eM/TJyNs7LF4g36gQuViNlWvwGmMMJi2FSqkj9WRlM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcbjnCRA9TVsSAnZWagAAAtYP/RKc6kyWID/x1zdQ0HC9\n0N8z0MpIGSkm1e0m6Na69RozgjleozO2tLFfTWYRCbAGBZF8TYfgGvifoKkz\nOv0sTkVL1nz/LYfo/NCAAGlYcSIV47L1ahEjtHqqE3z+RUxOvd0sfCDI45EW\nUW3FAdx5RAn7r99ZEW6iG2oBRh80PO75Ej+PtI9ftLRPCIz7WjLtkAbRFykJ\nPrLpmAbEqpR2kYsR6OSrZpF9EpTbCbCev7hET1G1uTX+O187osR67Vk/S5QK\n3go/xFFRPp71vWCaojdcvPIqa1oJwO3M0Ylp09btZKc1L1kq9/ybS0Sslh1Z\n79fHFIr4rJmYomjWEFPFhJoGfwGl2FipC5Kqli6kgKT5vfGfZwsld1RTWN79\n/iZFGXfdtX+cCTyELMkcAKNjLpqcsoujDzwVPshSFpJEiT9vVEy8N4SJYY9D\n4ilKnsBduxfze5kak1/Vv6dc1aO4gIhprg8/uM9gi3BUGB3aXMZzmfj2cYw+\nR4O8uxzRiJ4QWxwfhba9JMvRvwwn/3Xd+VWzI/lMIAJGL11VZ03Mtel5yO/z\nQRrMzGwtVuSmpBJiKp6S1A6Cb9wlqo7dbeMN8pKjnnCnY44X8IushBuAxKxs\ne8h6vE9FdbqabvhgntPpEu6gt+YpKUt2ZAHcEWzTof6PRRTZLs2QJYgFVI95\nAVki\r\n=SSTr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8ee8e8e07a1fc9ce7908eb1d9cc28bb5bf3118a4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.32","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.12-renovate-non-major-8ee8e8e07a1fc9ce7908eb1d9cc28bb5bf3118a4_1618065638870_0.03868637346579007","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.12":{"name":"@balena/jellyfish-client-sdk","version":"3.2.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.12","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"08cc98b900c7615c45f0c7b532b775aced3d2567","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.12.tgz","fileCount":39,"integrity":"sha512-rnprd/nAU8w0ExGhqNbEz6br/Nu0s/s2PB65tbLGghltwcJjp73kGgLRIbYY4b2OCU8rWVEsBnOPXUI8QU0VxQ==","signatures":[{"sig":"MEYCIQDs+DNmyAqFB56y3jUxyaWcuoyfwtvcXvY9oK1YZBTQqgIhALbg4MJUPKhjYqKXRtUaq/rA5safjDy3VDuz+SQ2UdCF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcbofCRA9TVsSAnZWagAA8oAP/07M28d/Y7fv7Q+U7tO1\nvyPAdoB/erqbmSiovADfLclq9UpHia28rc34Pn6qMVYQxuVWvZRH7rzopQaB\n5HAuZT2ZzF3MTfvLM+2ACDCSFLcWSbhbKFsRUouljZ41Cf1xV2qgpW4tB5nF\nm6P0cJYjSXL0DfMO5n9++jO3EvCd+1iYH9NGCJUDyrKz6IMP94IjAij9MR2W\nJQd8LqX7nKetnF4VlJtXqdAAj4k3mMzoh7MyWBHIJOXmIuxRDyE3Ow4T8upw\nEXvLx3NniYnDw4n6KUMwvaG2OV4Bb/E72WNMlr3mOj1BuLG5WUwXoZaR1Eg1\nA4EYGFtW50h0IN/JvGqZcTjXIKg6en7GpiZaeoM4Aa58lTQl+TSpyJ+D+x7j\nN2cHdECTxm/ju8nUDSxYVqVLRYjMz8o0ZDAYQ0Z0XgBlowN+GerZnK2sVmS4\nisHVjZF6Cm9+tX8Xs9m606t+1GhsJdvet2o9KVEQVukN/Z3wbNGZkcsmMcqp\npGdxxUTV9/MUEMFrc7znKQXMRGQREBsy940VR07wODwKqFDvpNYxvIKa6Ibd\nca0TRXJhmhHuenTT1Sh+2fcB+LQkl9Rg4HkuWJW+yFba8YCLr9pN6m81xsmx\nXK+YpDtOBqwzyDOPWNxwfQTM5AxkKlSYXagRrr8NizHa/bl+IiFR6B0xv8yi\n5zbh\r\n=oGan\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2becd93e1e7b72d88febcbca572ee778b4bbe202","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.32","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.12_1618065950806_0.7336249459350528","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.12-renovate-major-socket-io-packages-2c0e0ddf7aa2d0696c612e914806c30d006957b2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.12-renovate-major-socket-io-packages-2c0e0ddf7aa2d0696c612e914806c30d006957b2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.12-renovate-major-socket-io-packages-2c0e0ddf7aa2d0696c612e914806c30d006957b2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"879c448c0b32086a55e8c60ddae38f75d21c76ce","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.12-renovate-major-socket-io-packages-2c0e0ddf7aa2d0696c612e914806c30d006957b2.tgz","fileCount":39,"integrity":"sha512-SPN/LCeXl9R1NS0w/OZIK8pGjEN4Ev9+NgBtVqoUVyDckQcymdMgwg4Co2bs35r2fiS4st5gZjdS+mf/7QAvMA==","signatures":[{"sig":"MEUCIB4oC9CLjE5wnk5bDh2SE5EGt3nerNFKCuSMerueJx5PAiEAupJCvawL6RcsuY5e34Hl6MAovS1FYgRgO5H1X+YRejI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcbqCCRA9TVsSAnZWagAAVlUP/jPo1IEaW0EtKGXQ79JI\nkm6Y8ame1zr632iQvne62gJGdpvFRhqw4rO6bDkTLJkU2cOe3Yy4YYgCwZNz\n8iT1r309dBaMrUUqRhekNHGHl5sEGgQ+C+73a43ldHKgoEeXt63nEuvMEBhn\nDBE11/6Ns+2A4Cc7OoXBOI/CJ8wuCnBIvKhKKW1EBnEI/hLD/VmySERoZHRy\ni4x/HcJkxJbOPoO8ivSHCnpST6c1XMtdGpgrNCHg69OaJOkPwmo6DLKwR7a4\nCLeB3uwMc2B5Wu44h264s+9s9cpkjjLCYBIBP0y2q+ZfMNK+1DtV9wOPQLLy\nw7myJqja/pa9J3BD2tlE7TkR9S3RmBfXk3cUuhuPCtXQEO2KwiFd1jxfvLWP\n/hv1ClOLSRw1I/w16VfdgIFsNZp5zqydF8qnh2ZoOof4LcgGHXABi7bKxH0q\naHnF2KvvLp3ZvPbZD3fdlYGvUIu+FSFxOaEsKuEHw9VFXJw5zz2wtUDaCDtS\n+eX/bNI8TjDB1C5LcoMLJuIX4Oadldz7yfwnOM2LmnlBnwbrAEUi7yjzGu/5\n70bvKT6x7pXtNrDMjGgVwTRpo1jdqHu7HX51SGTnJ3yrFi8RCxAxK7+K2C3e\nEwFatK0RTcA+4nHjW5HZVpaYGjvlE/3cJPJtqOpByEXr8i6Y4hUDdT+HLFLW\ne+v5\r\n=fF7s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2c0e0ddf7aa2d0696c612e914806c30d006957b2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.32","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.12-renovate-major-socket-io-packages-2c0e0ddf7aa2d0696c612e914806c30d006957b2_1618066049663_0.8457374322476556","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.13-renovate-major-socket-io-packages-be71e90d1bde49aadcad51ab4408e31ffee6febe":{"name":"@balena/jellyfish-client-sdk","version":"3.2.13-renovate-major-socket-io-packages-be71e90d1bde49aadcad51ab4408e31ffee6febe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.13-renovate-major-socket-io-packages-be71e90d1bde49aadcad51ab4408e31ffee6febe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7d759e9ec9445f5eab6fc4b737d166e760eabe6d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.13-renovate-major-socket-io-packages-be71e90d1bde49aadcad51ab4408e31ffee6febe.tgz","fileCount":39,"integrity":"sha512-Owp2uMM6DXWnEen2VBqu6PRi2WkCi/vJKYvcCwBg0KLtChj45eUv+kmXFkTNDPyjhlHeAZra68w2HIt15KumAQ==","signatures":[{"sig":"MEUCIDSMyT+5UnlL+lWIxxuWXnBjHYUvHHivGQ5HhMxDW/AbAiEAkIImVAK6p+wb2ZysDKBIxS3h8NBV30nh0+Lv1fFY4sc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcbtRCRA9TVsSAnZWagAAnq8QAJfL/jiu5xUSpYuzJOtP\nKHowwC+myki1l1P+VWeTCoUta+E0UVnQRXZOLeoNsD29E29RrcmqF0rohvIg\nctkmEaDHDaDJlN4lYHLiI0FOdD6LxG6BpNmRGdjWjc/mOzkd97P7IRsifEUx\ngadYE4IdMyjRvCbLeoDGCkm9AF7xLrQO1n2OPGm8iyQ3icNOv72TseXPiMH6\n7KRk1QE8fz9Qf7b0lpw2NfAQ+4k4SD4Jw7C4mKJ6jmdaCXuE4iv1Z6KX5a8z\ndb4vmnAtVGNvtooNKo2MQ/HX/22+ETnyl52v0RWHlA/BbmmjHTBvT/X3mv+x\neGJeXkdLPxLgST8CxvJMLNwpq3sDLEg0pgkNLR9w996LprRQm3gLPEuzcOtZ\n4RfCpX2IYndhUUwPT6hp4vKVAqpqlXyJ5GZ7gFO66jDfheJdqWfZmk5x2rOh\n3PFGJgJQ3llkzCQIzbHrGgsNk7KENh3Wo7xUE92HH74iXO4Cxdx/GjylZPPy\n9m93Ln1t9PbgqWyiptVOaYryvvByKq9085gNpZXkT7+4bJJfG9f/MI2x799q\nVZLboIN5JquLKwhP90exWpjoxyqT+FBeS4/wvZpTWYE069mLUsPobCEuwc9e\ndDrwjAowXMkSYWNxbEFyWcqiWrEr7sk0pXQ3Ly5yENyGeRNfwEN7fvh1ccHn\nO3Rf\r\n=fh9d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"be71e90d1bde49aadcad51ab4408e31ffee6febe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.32","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.13-renovate-major-socket-io-packages-be71e90d1bde49aadcad51ab4408e31ffee6febe_1618066257526_0.07847587602043005","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.13-renovate-non-major-cfd85ff9a0758cce8a474163939031959f7ba0e7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.13-renovate-non-major-cfd85ff9a0758cce8a474163939031959f7ba0e7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.13-renovate-non-major-cfd85ff9a0758cce8a474163939031959f7ba0e7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"beb14d7ca9a8e3389e927b9d36b6b949559e4efb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.13-renovate-non-major-cfd85ff9a0758cce8a474163939031959f7ba0e7.tgz","fileCount":39,"integrity":"sha512-H9MsxuIP0U2shXCYLplWNAqVAyLoHjnQPURlc/nTEvLJBtrcFj0kfh3dtCrNohkyPgr8lCVDcQN3uJtzGRSA4Q==","signatures":[{"sig":"MEYCIQDTv4+TxvMc6JV3FWJ9G/6NElJimi/g7UDhIQrGiuHSBQIhAPHyggUmHtPBpNBk+LCiQQRaZ8wtr5e75TSxA3zSP6ta","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgccqbCRA9TVsSAnZWagAASI8QAKJf3gv88J2xcDA2YiCA\nctkd68CZJnlb3IoeYktOVE+Ch3miV8qUX2CK26ELAmO5VxnjpLULr/AP3O2p\nhUKQPhiThCSodLAZsPN4d3fTdB/NhGnkRj6/mtUYe4W3cXRkdh8mIdOpWKsL\nkVKV9HtNPUkZawnWtr60INlT8E4AugVPbCCqnXuoQ1PaglyFIZTYu+WMN7GY\n2ZwVrhLcPpw5ST2weK6+AIF1XWvQ95oo1xZlzye5ZqZoslepLwTrGXNcwo+C\nMzfAsFi21Nm02NDjjsI+kheAflsFD5b5oJhWnfEk/PqoazKojQmO8P8ej/f/\nDP681ZGa4OHaMA1AvGxkV3E2vIIEQnvX3jqbgVKVUMCEjs8CIwyyXxNXbLkw\ntc5OEiHyuYv8z9hOy0YmnIRrMC7FpPtNAINOTiKsDUzz0QcwLNqcEtFTkPu/\nSabKF8GJLXzy/AZE4oavysPwRhJNtjAFSXf7pIXCYW9UP8rjibHsmUgK9Wld\na+juICgije9tUxUD8ldTFOJkid11W+Tq8X1C2ibF6Cdo8My01Of/cmIbDNCW\neV52uxLD98zHDf9URrq7mS7wmOg9dM52tsW6souTDAdP75e1cDYPKoz0tYpP\nR0jNvq6SoubV6x1DjrEdrcKHcwDMz68A8fcvz6YoljkKCVHP5w5N5ObWyIX6\n2ZcP\r\n=AqO8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cfd85ff9a0758cce8a474163939031959f7ba0e7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.33","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.13-renovate-non-major-cfd85ff9a0758cce8a474163939031959f7ba0e7_1618070170698_0.4256292718862549","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.13":{"name":"@balena/jellyfish-client-sdk","version":"3.2.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.13","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5ff6e70e879638b92ef44dfef695e2868d45155b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.13.tgz","fileCount":39,"integrity":"sha512-T78hZS7rXpqd+KhIduQg6ql6bqf1kC7c4eeIwWkuME4FZQJxB9l2fc9ib1Og1fXTeieQ18Dgo+bRVXNN9jKZsA==","signatures":[{"sig":"MEQCIHDR9/zugHPs78pCl73udqm3XXUFOefCmm1aWJ6puaNtAiBzwUa7x3Es0ig9Ju45Zse6lwoegQCIiXws/wLCSZqouw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230365,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcct4CRA9TVsSAnZWagAAZosQAJ76kcg6VVyFostXHKfq\nIaOJ+SHRZSRWaGTki1JLh8rUNz3FbPW/d80ejtbiXsuGL3GLOgBEiYWa+cWn\nZDrpj3iAezxTDpFAq0Zn5pSundHeXeRI1QM03RDz4W2RlpzCte4R8e+jERtB\nfOJ01rH9ZfulsCzd/ZjbDObC7HNIb/wSyNIpQmQo14t5CDAxZm727OvYYOgt\nwQ7OciYzt0ApVrRs/5EOvEggkKfaL2Pu805LSNIe9bnAhCeiPy3Sh0aYZgg3\nqzUe8hEYWexaozGSgiGfzhChk1J2hHGA2W87gcaqOV4TSG3HyXXAZFkJX7g1\nE/Bo3jHmvYCYn32OSpSYc1uAE3ZgMIhcnoafqE2ryN2/8YgGRrMYLF9Pz/51\nFcb+liqpM66bjcHnCN6s3aJRwm1PkpzCcmaVsarfmO546yccDYZt/jgT9+wh\nv4pKSY3btBtSxkiFY69d1/nA7cxqgNuQOBwh7kWmUqIg9kdWJGNXlrjE/5kT\nZybGJiwoRSObt/AQioqUR46c5/llmmF0oQd39NH8ihFXNu4uCDkhPyBy+Ob4\nhCik6Xc6peGbdZhjiqxShwuUWdQaVD2JZl1eLpz0eq9Q/mMwtW3VuMp+y+ge\nZf1ezYf3vEtB2CF4VJp9GI5772or9xT+avE3a53704A5tPiFYZcS1sULYmi2\n/VM1\r\n=MwEv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f5493d387e364cb2658c93a708c12812205dc19b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.33","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.13_1618070392313_0.21781215849352353","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.14-renovate-major-socket-io-packages-6ade49ff8a79b6e53ed63cfa50d58e0b3d650789":{"name":"@balena/jellyfish-client-sdk","version":"3.2.14-renovate-major-socket-io-packages-6ade49ff8a79b6e53ed63cfa50d58e0b3d650789","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.14-renovate-major-socket-io-packages-6ade49ff8a79b6e53ed63cfa50d58e0b3d650789","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fbd9216e3e18f675106783df128bc6841d3b1ae9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.14-renovate-major-socket-io-packages-6ade49ff8a79b6e53ed63cfa50d58e0b3d650789.tgz","fileCount":39,"integrity":"sha512-zeYh64C4mEi7AzTP2tM6HuLVWJyxGneyoGZ6DtgA18hGivGKfFh5siw5dQX0PNyyoFWQZGx7syIUQFWaKbCOBw==","signatures":[{"sig":"MEQCIAWGBE1G73Tf34gC4unQLzktqbW3TS3tNYKpu4vt1zWwAiAEzHQajeK1CeoxsRU8UfYdLCMeZdO25GHFO6PcAiuQMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgccxECRA9TVsSAnZWagAAZNgQAJXdCLEn7mro5iKkX9Sk\n0O22wAdButR+qHbm//BEpbjSZouXBbWJ0Lb/vPoCC7iQVvQ71EaBbdkmgCL7\n84WjUp5ncuVNixc6Cj3qUvtuFuaamBKzL3zM51QSAQbbFR8l8c0SH7z+yIVL\nzerFWVyYPTF8I5fRIBp7u9njXz9J+pPHWWljPARwicVpDwiaTm/LmwR08Qvo\nEWutRwEzoKbIWtZj5NGe7Ts0RIQZYbGdGkxVSb50hcpv9nmEGAaQSI/ZVukc\nZIl2UXeS0vl7CN9ny8Rrk+2Lqu1zDrxuW9Pu558CfbDpZPv4rUWU1OdN2Opz\ntLwi0lzKjb5nosrlpAhHwm/2uyoZzINfGid54i7pAjotEbrg4s7B2ASYVcdg\nm48YBMReGHPVHAwPNRMN2vA4gj+PQIjrlgvQzv04e7k/Qxhi/EaS3rvH802H\nZw09CWdxK4s29Dj14qKpt4y+8u5ZYDCy/HdSdFRIqW7Fw8/Ej1uum2BJ2edP\n554QMT/dW1YXOo9wM0KRvOghIM2n6rN+/XTt1Pdw2DpySjguWA09dKGyFzmf\nbsv7HeXXclk7Yh2nuTkJqHvuzYASEGM0U75k4F4A5tVynMgKqY6v/helx+Rr\n05734kOhF4e3TsDnxKltmMpKGxVp8+YFafMrT43ws5DYZPaxtbwG8Gyqi/br\nq3Nm\r\n=wPXv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6ade49ff8a79b6e53ed63cfa50d58e0b3d650789","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.33","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.14-renovate-major-socket-io-packages-6ade49ff8a79b6e53ed63cfa50d58e0b3d650789_1618070595401_0.1823197647399275","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.14-renovate-non-major-d75024f5f2dc11c821757f585e64b4a4ff2ea39a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.14-renovate-non-major-d75024f5f2dc11c821757f585e64b4a4ff2ea39a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.14-renovate-non-major-d75024f5f2dc11c821757f585e64b4a4ff2ea39a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0fe57625304adf91d0bda2c1136157278642493b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.14-renovate-non-major-d75024f5f2dc11c821757f585e64b4a4ff2ea39a.tgz","fileCount":39,"integrity":"sha512-hPqEmGI5t3iILSfHksQfOGXBPYrTioYYM0Htz2L19GI4bhev0SZfKqjntCGLStslZ4NJVf8WuXIEP8OVqgWd2w==","signatures":[{"sig":"MEUCIQDGVGra5SvcAkrGjL8NrFU1AyORvX26T9Gd+odsQSA9IwIgLYT2Z+YaYKNuARRID98jrFDEyZuMJ1YVM8Pr6fGvVVo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcdzrCRA9TVsSAnZWagAAiVEP/i9RO8paGiri2YFKbfnZ\nbABygOBLHs4aEoHdgYHv4jQBMoSjhuFdZyobrTiYH71Jlw46xbT/sHJF8GlB\nf7QRB668M4bB6GkualHHoIuQXf8N/3klvleCRSsrxR/FdUbaY3ekDGbkZFpJ\nFrE6c1oYyfYLuxiX59obVy2E5oOqlHRVC84WUONjxu0ktb9eQ84po7r20ov5\nBN5yA275jw7i/VzpXst0a1+aAGEdPF+OmQ0gClkr9K4fweGp/PoVaUGSnzqC\n8mcrfKtDzArBFqfs0GmMccLJvMy65789E8husk/VRlIF8xTGFKPgriwRwg5q\nC4V3F22sMVSo8egt8Sdaoa/gq3I+Ad2EfWdjgCZpuwTlFTMvRMX1Q8qWcqlQ\n+l7GtdcmUlMk6mGhkM1k6maup626QH1dmPSsbK4BTxa6kRhMAKsmpXFdHTwm\nUW0y9+2+/iiS7M19qs3iJTzALUfNvc/sl6ToFnrgKnrnusR5VYAdVb7IB5T3\nHwWQQgoyf4SP0BKCONGXo6ZxcQleJHeCtH2xi+9shlv+a9yImcUw4fPmJFik\npiQI0GuTHkor4UCwC7Yvx7iu/3QGnYeOnnjSxsWmKfb26shYCvQO+P847+CB\n++T2PjdlzUB6JfFbdOkAssaufdNka/rNKFrQHsF3FtjwVS5aKw3h4AhUG4BK\nsUxd\r\n=CYEQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d75024f5f2dc11c821757f585e64b4a4ff2ea39a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.34","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.14-renovate-non-major-d75024f5f2dc11c821757f585e64b4a4ff2ea39a_1618074858534_0.5537368922800205","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.14":{"name":"@balena/jellyfish-client-sdk","version":"3.2.14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5470e8f62f64c54cb1bb820df5dd255c721b07d8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.14.tgz","fileCount":39,"integrity":"sha512-RJLxrskZ9cTEN7eHd+OAGGy5S3D/GSAofC6DKO/KxEpd/0Q8ZOpvMe0PsOyALb/4vsGpZVZTaL7VpV/yDjx8Ug==","signatures":[{"sig":"MEQCIGl9ygdEfFrD9G6S67SDLqmr74mWCnpTe7h3K+bSyCv+AiAujByYWuHV7s0phgV8Ind7xZvq03wWQkh4PvhIis66ZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcd3bCRA9TVsSAnZWagAA4sEP/2n8vLkeWjWOlBmDcDAo\nSB2RadGl8nQ0zpZ957J8p3osyqD2eH0WvB23TXrxy1Wqbkigb3/jWIyTgGjg\nAH1m53IL/7/kxbJvnhLNxE8yDc6aNwZN7B2MpV2g9ZtHcydi0JIrb0pm7Dqv\nF5fMl0zUKKxjqi7QUdUwvY7yh6ESjpCzsn5LoP23oVxQFEuPCJhOi8Rwtv67\n4PJctHOPjYDysiH8UaECn7VJf6F0CdH+U7geSB5Li8CEsF9zw6CimQrCMSnS\nPmrvPTuE8Iela8XYEmTRi8hPVyk3PPxAKlt5IZdPeRYZpGj12NblzHqJbNh8\noJ0LEROECxIRa/5sz3URsZSfsG4u2DDEWP4dFS9pgYdRIVU6JAs5kliH86D+\nmXxi08iIsuYLdWW/W2kkvoMnDWWWHI09MpTt1CauUxSQdNTvrrwZviP87+Ns\nPQYA8XWYLnnT9F/3kobVFVdERgy1iO5KlhurhR+yM2k5jU5pxG5Vcs7A4EyO\nFBV90uOuMeENUPzd0x4bVTrLIY/Zgt1peLiOnewRz1aEc1FYrCwY0DnYdSa6\nBH7R1ajevsH70L2gJFagYQTSjvyKV4ub9O72Uj94lC08jvgaQEhJva/bjldQ\nf343UJSufUIKZVb1DeCYLOgXSJyuUsmgrV9yYIZt1H0ivCA0bAZ0q30YVB2i\ntZ06\r\n=aoNp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"68f46f19302f24ba349a1f56aa2d738a57fab4fd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.34","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.14_1618075099515_0.9043006892280485","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.15-renovate-major-socket-io-packages-efbfcb0f3b260bd8bc1fd25aad7307f02232b332":{"name":"@balena/jellyfish-client-sdk","version":"3.2.15-renovate-major-socket-io-packages-efbfcb0f3b260bd8bc1fd25aad7307f02232b332","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.15-renovate-major-socket-io-packages-efbfcb0f3b260bd8bc1fd25aad7307f02232b332","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1731724f8868249d4befcfa77752c306ccc61e58","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.15-renovate-major-socket-io-packages-efbfcb0f3b260bd8bc1fd25aad7307f02232b332.tgz","fileCount":39,"integrity":"sha512-OcmTESCZel/FeCXPmEco/z7E+g2dL4mozivk+ZohWBuo6zQjibXtb96qfbczVjxTyFhVk4UJ0L8k5ftyMJOuQw==","signatures":[{"sig":"MEUCIQD+rvEjUsrynFWIGJCSXusRNJH4bDIfGaERQaq6fFJgSAIgF2DVc9VhVLBGUXnY83g4SEzsft5lVcvqMyCpT/7YgNM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcd56CRA9TVsSAnZWagAAa6wP/2vrRryOAT3tJbGe3m0C\nvDRNPYEq5ggeRyL3U/elSKHJA4AzKv4a1CaplDwSmuFoZl4qINPUQHG4bxY1\n01ScY0Vfqv+1SuZAF2hsDpmCzSTRlWeudiwD5SfRKwcfeTsTW6VqoyyBz7Uz\nU8R2tcsL+jLE5gGNN6Z1dhXCHphQXiN1F+iZ+h21oYN/0Dv0jJu9kiB7B4v6\n7fG+GRrohpryydSkAJ1K7cEDd+QEIYy0rwNMselMoWKLD/bKDtRv3WcRBRIV\nhQaUg0GFE7XbPfPjfgsbmBESlm+dmPsn5e/o4YBfhqBae8jrTRXKqJoy6Me9\n5/jD8L+esu9xJfLF2A6h5fWX2+DcmkY6EUMvWgsOZGfLWz7uKZNTJAJu5pVR\nCzrdeK1k3CMbT6/L3Phgbcg0d1AyYNKP390B579dFjDrNdu3nZzE+XVwUZbr\nL8bosS6cnkVTL+joq7JGwu0SdHuQDOwSFNwa+8ssBKEGGEW3EoJdL6F6yYva\n+8bYFnEnSpyiPFfl3jjvvxswftZwk9EngE1bTucoVpegeiBEPKr2C+zGFqKu\ngy0VWHl9sveabUJ3Q1tEFLTZkLG+qxlR6b1tdATuAor73+LI5qgT1IMbTOQJ\nKKBy9aoKbhWzIykypyEoaME49HpMlZTXENT4P1YJRigjv05KlVZbqU2zpagU\niKeV\r\n=KI46\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"efbfcb0f3b260bd8bc1fd25aad7307f02232b332","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.34","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.15-renovate-major-socket-io-packages-efbfcb0f3b260bd8bc1fd25aad7307f02232b332_1618075257901_0.06011511540049996","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.15-renovate-non-major-2ec14944d108d22ebbd8e9405166a3879ffb7eb4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.15-renovate-non-major-2ec14944d108d22ebbd8e9405166a3879ffb7eb4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.15-renovate-non-major-2ec14944d108d22ebbd8e9405166a3879ffb7eb4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c21cf26b123a8098ce8129e3e7a79802e44e2169","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.15-renovate-non-major-2ec14944d108d22ebbd8e9405166a3879ffb7eb4.tgz","fileCount":39,"integrity":"sha512-cTgjD+VtCv/0Qkr67qiBAzBL8GO12py6yXe0gnkEmPQhCOwAbjgml0RzTkobYWzaHJFWhgeDbsVhyCy/m8RBKQ==","signatures":[{"sig":"MEQCIAZGqxPNhZ2/S2cm1cY5AqwOFAldTXVXFHmT7Oztu8PGAiAqYaM8lip98FbdjYPO0iCTS/fxT4XOS8Wl7A8P06mKrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcfJ/CRA9TVsSAnZWagAARKsP/1u64VolRfnrm9PbgM/3\nPKHXYAIJQdRYMc3mZXli+YGDy4CmU89dUkWdTTXPKdtRIXYxMPPjsp2IfWSN\nNjvATYFYI8W6cGxNQC1fdNi/e6B9gYHYOnLGqLR0bXQtESEO6nHC06LOyS2N\njTlh1KpnW+kVBeE3yvhvAYL6H5g9nLCxmBB/sq+dlK4PWNkw6leCk/O1YCdE\n8DTYby+H2ttUA5Vu26YtAYCCtd8x1D/xsTOmp6W55V1PyQkny049c4VHOQ5Z\ncQBiNqLEKu2n5lVNOlwkvC876KWBiTdUmpFGO1CMkIGH4jZYfxDqTArEdB4g\nwKkBWrQx0hvvMBxxQcKXCax2ViUVg0IV46TG5mNeo7fzalexWzVurSEw9j5W\ni3aBAxwvawrE5ib/LuEu0wNLwUQ8FjlQKEbuQcD+hsZtd0ZGFIsGq3ST2JS/\nwrEg6tJ0EEu9vAW1/ZRF76Dbmkiyv89RAS1UlHMiH1YwPlb3tYcJbfPCJRx1\nayQgnqAEwu/YaBdSGsr4GNJTRKY4qDEkT6Z865SRMMcq7ai/RqrcHs/L7Ir5\nv0tWiPJdhyMQG0+70pc7qScwpzRM33eVoA4t+PbrGOh667u4aQS38ASOL9gN\nr9atS/aKAmmS7/sfQlIiwncwR3MMqZD+afIjjdqqrqjQm6UF9MNA+Vf2wb8S\nQwVV\r\n=/Q+D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2ec14944d108d22ebbd8e9405166a3879ffb7eb4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.35","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.15-renovate-non-major-2ec14944d108d22ebbd8e9405166a3879ffb7eb4_1618080382828_0.5869484482716121","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.15":{"name":"@balena/jellyfish-client-sdk","version":"3.2.15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.15","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"231c55c9ed7560366c655bb41ed7f09b612b0afd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.15.tgz","fileCount":39,"integrity":"sha512-6XstjtdYptY6xndlY1/Ah4yusuOWl1OLDx2Dk3JxDX500dQPxv/exALdIzuGLOhmYjfA4OJhrzGA1l663QQIng==","signatures":[{"sig":"MEQCIGhHzc9TR2g1s3IfLw/jOwZZX05+wBRQrt3hIkIQCTyTAiBLi3DK+4ZM0oAgN7LqTmahZdoq+STyMupaKLVD5WYHoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcfNqCRA9TVsSAnZWagAACXcP/A/KHh8VYM7zTu1VekrL\nil54HeIh3dOz6Wv660QJwwqJhVkqJlbMMiJSISUfps+YkyCrH/puKEVy5Ygt\npuI0jjKbUSI3hsDrINrr8D1c1deWyPYjdi4JfIlH+TVhCJAytR3pVFr9P5s7\nMfz/SloAO73CVHw9/1wVgQsSNmbI1uG/7qp/GZ5eq3SdjqPkUcDiFllUEgee\n6FAzDpUF/VBb3kga1L/SkRokHUM+GJxZ4qVSl9+rpXU4BEhmktF5ibDjtoQJ\nHi63WFwb3gzJqKw8IcvP7TtBZzW8Lh2o4YfBAf/I4SazRG7hxj0YX3kUqu6M\nXyyRhuWye/lt/GWuI6PUx5bsQ0jNwSfRszPeyJqKppCwHjflmzX+9Zer5zZ6\nWe49SFvUVDDx1kAVdmvF91JPAwUp3Y656iJXlGTtBWMOS5xT14rTFSYBasjE\nsJJVgYTXNC4LVURyggI5nmvuksOZs7QibF83Nfu9JH32pdtcId8NgRs2aXoi\nNaJ9JmGLaty1TkRD1PquAa/vgGkShMZ9VdVTy9cN8c6pAbLkgfmaq6/AWGQr\n8UcjkyxfOAHN0BgQiIHp7Z+BEz5Q/vORVtcI1tclFJfEhwk0Fuk+6/dgBsPt\nl++/zULI00Pf7S7XdLKEAvKWuqSqwFp3+7gBGSi0x1eSvsujcf17XCiCs/w/\nT1Qx\r\n=3zbl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"28195ec4da86862d8d399128ce24f7c41cb00b8f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.35","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.15_1618080617825_0.17287306543855552","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.15-renovate-major-socket-io-packages-2e8f0834aa5e4036e917cb44af92737cf0ec9aa0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.15-renovate-major-socket-io-packages-2e8f0834aa5e4036e917cb44af92737cf0ec9aa0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.15-renovate-major-socket-io-packages-2e8f0834aa5e4036e917cb44af92737cf0ec9aa0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3fbeae5174ab8cbc2d6a3482c85c8f371702a1df","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.15-renovate-major-socket-io-packages-2e8f0834aa5e4036e917cb44af92737cf0ec9aa0.tgz","fileCount":39,"integrity":"sha512-W7A42cPaelr7qbupikd2Vko7+ZmHAixztC0Aa1Shrc3RC9o5g/l0lDaWORar0SBDLsnKlg057CkJk4tPeyWguA==","signatures":[{"sig":"MEUCICGdPLx1o06Vn1I++EGAv3nlwaVBRC9ukPyYtio20T/sAiEAwyV+6+RW6BgrlF+wH2G/jOnsfHWNZY2kiayLHBpk3NE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcfQeCRA9TVsSAnZWagAACI0QAKO8idsTvSnibhmeexzn\ndSIuSCXjZ9lDkBXcUc1M8+pr7723lv8uTk3sfybaeGu5ftjSW0SxqsGRyCrF\nIrsdM+Trs5zVWXqG3lH4hLMXOejlmawrr/2rUuzrFBa7UWfKBRuIRwxszKVb\nogZbdxvOkfPYMnPZp4QqYM53F+bMFlAb2w8Qh4XPR8FkCOwC5Rra2CUBxTtj\n17PzD1KovYxV+6B+iDCdSe+RfA2r5pLUzt7RJ5QK2z3gI2SOdOC9WuNCmvQc\nIp7sKduprzK59kG4Pl3/jLwJ6899bDmblgPk525mepYcmVGbFYj58FPpqUdQ\ntKjy9numCLonOu/YjxbXpLYfDe/T3UYR2OKYujjH1BviMOnWWdGG2Ndu8X4M\noG6W98SJQfQh/XJu2Tx7VNm4K6zToyvB/cM11hG2m98R/yJ9gHKiFMZZ+C0o\nnMuS6tB2sEHLWymLdcOKLQXe9IsBqHMYNmo5ZdHmFv4FSDdZeIkGFRq3XbWE\noPojJxBzCYjJe/15mxSSo84gTKOomcBrDDOo2HP6p625EL2963lNKWE/GN9h\n9JmFF6LcxmjONrr7MqK7AgRQXiJQfVP+Py9z0JL/OJGtls7hZP9l7X6/F/H4\nhF3plfNdnTd+2SPyqiMBNQw/XQi/VKa5SWuVqP1CIXiCCVdMal9bD9bebb6u\nheWs\r\n=BvQm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2e8f0834aa5e4036e917cb44af92737cf0ec9aa0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.35","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.15-renovate-major-socket-io-packages-2e8f0834aa5e4036e917cb44af92737cf0ec9aa0_1618080797852_0.3348459543229896","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.16-renovate-major-socket-io-packages-0e1f07a5410dc64aaffae34069a39229df1318fa":{"name":"@balena/jellyfish-client-sdk","version":"3.2.16-renovate-major-socket-io-packages-0e1f07a5410dc64aaffae34069a39229df1318fa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.16-renovate-major-socket-io-packages-0e1f07a5410dc64aaffae34069a39229df1318fa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f418c2929322ff352f2a4d2058b28e4a4869c67e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.16-renovate-major-socket-io-packages-0e1f07a5410dc64aaffae34069a39229df1318fa.tgz","fileCount":39,"integrity":"sha512-X9juMYBxbLsu9YQxM3YKiEfWlRqxuF4+a5PLs13mywC2bgDEUdCQT/iLhbO9TjEF3JwEJns85W813V1AaJgmHQ==","signatures":[{"sig":"MEUCIHozGuON/RZtIwGrVWFhL6ZTe//QYrkkAwQNwkb91j3WAiEAmeqEG3uZ2hhDN28g8xOrVeGX5tQoErYPVaIKhVA8+GM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcfT5CRA9TVsSAnZWagAASv4P/0TIyvXLhmvwxdEcXOn0\n3ezsi5WUzvliqF+RSWdB9Ct5RfiO7o6mi+PfgwxXjdVDwYRhUxcE5/3ZmmZ3\nfKNQRjZqVDnkip36xxtHK5RQoe4bnFSN4AOClBcEJVt93ipGpX76xDBuXPnI\n5bntVHlu2AbavXZ7NwQ3Z0FORcGbogm86YcldBI+ZgOfJ/aSG+raEpROq6p9\nflUTu5rMogEZnV2cbskSNmYNBVMF6dvXGfUM1W161tOZ+bN5oVM1YsetxDNQ\n3O+UPo8glQTxGmPFv55FVLJ9RedSeBqYndroEFEQXPj26+nxWhUpB2KAfPMj\nBMILVCnWzyDh+Q3ylq/80LEN2fMk1KukLE5BP1+yIGPyi03EflbLkMwDXIPe\nY4iS6LHt98CwBhaZph5E1mKL98off7xm9U0YniWd3H1kORe/4H5+a65dcRZ3\nPfMFS8sgXT7gDEhb4I+1lZa/MwGnOMTyvFyQqvYFMYyishOnIovk5NGPp/kI\nBJARRVVyPX0b8mJLPKVGC8RCpL5a1Mhxc14i+xwbgSvN8640SpVoGG1IiV1S\nVfW51WiwOkBnzorI6o28dQRnhVJ8Yy7+NAaNfqqFfjEZO3j66CYftZ06ksfJ\npBiGIB3WOC62+3ovrZKSptSZdCnX/HRMJOHmZFwY6+4n6TABiAQi2Fbwc5KS\nydMr\r\n=VmcG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0e1f07a5410dc64aaffae34069a39229df1318fa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.35","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.16-renovate-major-socket-io-packages-0e1f07a5410dc64aaffae34069a39229df1318fa_1618081017508_0.9279252723471338","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.16-renovate-non-major-37d0545b73f5fc59e66e46c5f5960aa299f54fb6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.16-renovate-non-major-37d0545b73f5fc59e66e46c5f5960aa299f54fb6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.16-renovate-non-major-37d0545b73f5fc59e66e46c5f5960aa299f54fb6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ef9af33f356132a9b793012e316924020b5dcb40","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.16-renovate-non-major-37d0545b73f5fc59e66e46c5f5960aa299f54fb6.tgz","fileCount":39,"integrity":"sha512-hTwPOe9OVrLVz6gxrakBg9d/iv/5tSf0SPY81o3puGjF40Y+Gz9gaZ5fP4ORY/9Mmwv/yt++6J0mRh69XZibUg==","signatures":[{"sig":"MEYCIQC9g8SfnmA1+nC/6vQUpfP421ZzJQT7TXwlKl3AGvtYTQIhAPXtfgJT44n9cJLIrcV0QTVvK5L/q4664R7e31zyV3MY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcgreCRA9TVsSAnZWagAA1pIQAIbbjfYz14d8hBXt5zMX\n+HHXuUUCFDpgC19vpKEDAIdcFE1VawTxYkFt6MUrZ7K+K0ia++jd5vqyeBbP\nD+qk2TEjb697GyXF0v6G0uRHtO3N8yDWcb0eXTzeZwjXs2oEhXoWkPZcIyu3\n/U8Ug9L06r+yoLb9bPVjCFlpnWi5dxxPtt4HdmmZInMzpb+SPwP9PD/19F27\nnqP+usVe3tE2pMsgP3cJsX+Vs/NPb5NrAnN4oJCwQ3PY2OLnMYvnzkra2982\n1O53ez4NuExJgQx0Vk5mtXgTHF+qXCrlsfT8gNBQ6q9wCIGrfL85WDjY3sGy\nbQG2a4SVBhQ9poDu+tV4FQPUoqWB2pGY0F9CPh0aXX13rtYT04IxtFCdDU1s\nMuTR0xVfwhmWvPES4Z9oKZKUZMMPD3Gekec3J+wlQ0VTqa1D4+nYji+LyEp9\nymCNJSeoFHabStui+wLX4VihL4qbWQUxF5DXSn4wSHfmu+mUH9CKOG63biXJ\ndLdgi4Q4leMHiZsZQwj5rUpJ1icVESQaU515DMpgN1MBkRnsYHPZfJ70D+AN\n6GTxtlp5YHfwlGePfQQAn6bNlh82VJ6RoBrsr32dhjdivSc2FIZjKtT8JCUZ\njywm4yLCDssEZmEJP1noYZN1t/uspG38WpBCnrMJhXOVOADySbCmz1hEUL5i\nUaON\r\n=lBWf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"37d0545b73f5fc59e66e46c5f5960aa299f54fb6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.36","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.16-renovate-non-major-37d0545b73f5fc59e66e46c5f5960aa299f54fb6_1618086621846_0.7468886610347478","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.16":{"name":"@balena/jellyfish-client-sdk","version":"3.2.16","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.16","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6a33a310b123af20c32ce95a7690915d00ab548e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.16.tgz","fileCount":39,"integrity":"sha512-D3Zm/ezQ3lG8OT4opR00hpwRDdnzA6Q3aknXxjId/FtM9Na+d6yU1ZCCfn1Aq8PgtktfPrIXXa3oHOuuyrlh1Q==","signatures":[{"sig":"MEUCIAVmMqMtdzZlI98qku6v/hxMyF9AkHYuW5U5yQP71qVkAiEA3nCVJeCKh2RIL0d5+tlhLRP12LkyunlWf5Hn6ezbkiQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcguyCRA9TVsSAnZWagAAfFQP/0lH3xOjgbobqk5w2b8Y\nttv5Ij3hWUcgACNMtfGHp7iP89hywRm+Bm408D8PmuRn57lcmScixGmuY++w\nHemMvOroeuXsGnN+QXwLIUe4L8km47txIUVei+ST9OWm5ZoqWX1ulnMMYs7C\nH6FvvbsmqcIW5zNbkIkCZaJW9Y3eKriP7A4b5uhwwnPY6ux5NwINOWrD4VfM\nf8Vj3luFwt2LN5aTf71PwR8rrq7/yHS0YDoHv7k/klAAryYRiUKPXbcBmc+F\nHmotUlgE0mT23HOYXz1uTzlID4gmU2uL8w1GFYuaY+crzSJY8N1UUxOQ9oO+\nkDqaYn4KGArxI2AeFPGWPJMzMfUn+o8s3WDgyTzQQEa2BuH/5Q4ObKi2yUQz\n5txEGGOCdUJS5fGdOHSWp+EEy+byEasNUB7jRs6eXDXGQVTtVMnOjuQl0G+N\nQdQiUpFs8PP65TZ0wFTocE+OQ1vFte52oEXDKrMm6X/T0z8kQDgvgGv/kyPh\nh6kLvblxqZOzzE1vCQuPRXDL6FWrelJPkZ+XJl8fxfYOsGasaMKQzuWdlVtR\nyU4Mi7+Vg0+A70DVrJ+FPd/XnpHLBMseurt9Wd82H3BUZmfXsKJ0qdkN+dNz\ns0XMQ/lWoqNNgcgwE0AHH1xpUUZt9dcvcXCSdv5YvKn6yZeIN99XASQM/8fn\n4GAi\r\n=K75O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"81b4f606d137e56eb6b6e43b3bc2687bce2b2243","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.36","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.16_1618086834234_0.5004855429848092","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.17-renovate-major-socket-io-packages-8783963b44492c1f7558c6cd8e2019cfc6ec9da6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.17-renovate-major-socket-io-packages-8783963b44492c1f7558c6cd8e2019cfc6ec9da6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.17-renovate-major-socket-io-packages-8783963b44492c1f7558c6cd8e2019cfc6ec9da6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"183af31c5cb6c98e144a152e9571406e624d6638","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.17-renovate-major-socket-io-packages-8783963b44492c1f7558c6cd8e2019cfc6ec9da6.tgz","fileCount":39,"integrity":"sha512-s+GD2eH/W6XqyLpLmB8T4MUNszV7S0Yc3Na4mXprdlPbHbN+SJ/Iv4kHdM5CdjcGDmxbKvBtOGIx+pJUmjOjdg==","signatures":[{"sig":"MEUCIQCE4pF7Q2ykS8GaTFQEgWcsqgelWiSuSJng3OZO4NvOEgIgHK+pSF+I0mToxzbHeJ4M1diI+X5BmVWDx9axf4BIu6g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcg0ACRA9TVsSAnZWagAAYjQP/0hT50PM6IskRpRtSSJL\nBrRreCjSXTCHVvXKZhp9XflslfNEATZwO47DqVjG3WKVjKKSX85vgyNt8MWC\nRs8Ri5tx5bq6MHd9JLg12tpJokb3wHdx8FiuhqC2qytSRCg1n30a60kiEFY8\nStTsQk/SVCTHSQsLRDpPMlLbZl9jYGk72t8IN9H6FRijiijMMZPAPsP57Kjr\nrNLW387RuJConPnpthynUqaxMmjrvdvEk+mozcuDoQJkYRXKdqGCemE9h61a\nAWpzrOl0ONZdjIqgP0hvR6MAsJrNs0q/f9QnotrcJmlymUeIzqaMPWfDN+A4\nXDFrGTBPceoIqxYTZJschWicLaPPkUnuQNkplYd7y5bwLJOWU0bSEk1DJ3kn\nxfNVShUcCPMQ9EKCFMUZHpQ1p4okcd/EE6QzwkNY5XeYwUI4x6H04PZ3DOPV\niavfjXO1efc2Cj1EQXfbOT8BILswYpwg3Q6feRd92mdFr26VmOWCFtItGaVr\nGlTMyA0EDMsK9PDheh1osS3fHH5OY/uF9WBJINojdfZ4ppUgRq2RslbadMdI\nM3XzTEjjgFxNRCarpPgz2p3dBWHwjAV44MT3LK2FkN0sMFotlq0OgGwjSLYh\nvoXojBFV1XLnyyPlw1P0K6h0mqRGTwNP73mo800fMjr7pJdYxmQ/Xu3uaM44\nCVJC\r\n=r9RR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8783963b44492c1f7558c6cd8e2019cfc6ec9da6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.36","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.17-renovate-major-socket-io-packages-8783963b44492c1f7558c6cd8e2019cfc6ec9da6_1618087168289_0.06007927818413639","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.17-renovate-non-major-077cb490161d78db41822b567d1a0fc63ff02db8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.17-renovate-non-major-077cb490161d78db41822b567d1a0fc63ff02db8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.17-renovate-non-major-077cb490161d78db41822b567d1a0fc63ff02db8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dcdf82aec10dfc7678ab792ae953ce9e59c0503a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.17-renovate-non-major-077cb490161d78db41822b567d1a0fc63ff02db8.tgz","fileCount":39,"integrity":"sha512-EWxbhsTQSHF2rP0Pm0u8EO+/Rkj8/8jYLsGnBRzFcW0chzGKlJzAjaYv0yxsR4w7qIdgrh8Rbx6AwbkgMO/UGw==","signatures":[{"sig":"MEQCIHEDKPd81UpydanByfE7Gul7pHo8t+aAWsUCwAPP63hVAiAsDwoOinGEB5LxKQ4iKG6ciPELySHP3CG52GZJPvQ22A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgciMTCRA9TVsSAnZWagAAXS8QAIBrZZoMMX2NnA+lp78y\nek3Z7+G5XWhO6vz7eowMCKQvXRGJ94L7NrLwn+0FaqZWOjv+TVhYilVOBqhB\nHR1g2GIai42cO8CV+cXoupWaezDje1toHn7dESuVfK7yoVNwxVhtuzcgT+2g\nQJ/RWEY/y/kVPs6+tvqRmpXpMDxWXGndMn6bJhaZrYV8kGDI/kWlzzcgtBn5\ndZ4fwz2rvufJUmbFGGmMgfDQ494UOgzC/CANRz4yADHnz14cPxu2WgBOtkIh\nA6/fxPmd6z/3LKtKSqOHDOHPYY+FMDmHiJMNjLKjdN82M+sAfwsrY3Qk6v7+\ndi/80eHTba55EkkYA8xlM0FnR696j2qqBr/9OOWIZ2dfUmD0M2T48xad1jXe\ndRA9iXRcLKi2TOUsPQRCQ+DwsbMb+6+fTR84xpP5tq2tHTVCM/7q3r7UEBJN\nx8PmvWO+67igBDfUmo13RmxWUokbUZrmcCbofWVjxB1AkA/iIWhwE5nfAhVc\nhJlMXm3dLL7Azztq6VU2RG0Wtwv9nEgkDAdXzZK2WJQLCvNLhT9szqk9MvyB\n2QeXIEnjwt85YjWNZA6fr5drKTNTCAzQuMqwXJ5Rz3W5iG6yYhIn23e9EBGq\njbIDBpcdxRQic26e0C43U4DPCF/qrd04wKCgW3hdcWIbt/ScHud5HggVV40A\nPzZI\r\n=syMA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"077cb490161d78db41822b567d1a0fc63ff02db8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.37","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.17-renovate-non-major-077cb490161d78db41822b567d1a0fc63ff02db8_1618092819391_0.10261020454261605","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.17":{"name":"@balena/jellyfish-client-sdk","version":"3.2.17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.17","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9d18c69c9f1b3fa7b2f9bd88a9fc49d82e540b01","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.17.tgz","fileCount":39,"integrity":"sha512-r33qYwv8k7dC0drFTEoMAuV+vvz56CqYJU6UwrhsKb0I+dkUFwUbJ+ATwigj8OGoObrd+ZGg6s8pheFPgZlqrg==","signatures":[{"sig":"MEUCIQC5zaHpFAp0r17dnxkaMoY8KvaRFWq78ASvHpSWxuDyPgIgHNsqScfAxfGwwRQFj4PLPQWuUNhXmbM2mqpQnjlrfHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgciQoCRA9TVsSAnZWagAAxpoQAJ6plF/HC2jK+iYWk0dg\nK3TnhxTR46G+gGsOzPRhB3cP+cC6gKnrR3chbMwEaH/PJDENfpfs5pAExwki\ntbF89ivy40Q+WGeodVd6M/IxNhPJa0INDFqX/dGR3vTOVyNspNKY2yJmvV08\nu1JYDgasROoutA7j2dmNSF2QcltksgcCH+JHy6w8VANOnRwx7jXGDkHXXVWN\necaUyf6jor9aUPfeYtJlJYWIDLABfwVJnAXtpVt7DCByVLtubf/3Bj8DudhA\n8JhztbV7lOONe/neO86WLI8NWdZ0Rzb4ZHSlVDoC7sjJXuDXZgeONFUPklG5\nLJkHOWnOIv9/bozmrE2nKcvPmMRtqwi3gOa4FkMEH0Dj7xQ4fVjL+1uXKKnJ\nwjOXA/+LiE0v0frek6sF6JlCp7SOlhcA0bdVPckjVQAgEe/xBaxyNooej/DS\n5eB30JjVBsGgmABIwsWD6bVmuDgizAiFSfSLEObXBujl8/SXBsuow0h2BTCj\nqs9KHU9TFxq2DOruGLYI5/ys/iQDLj5puBQtYZnsoJTf84zo+8q9FJ6qX3Tv\nm2VnKBe8eNtgmU65Lw/A3P5zojKXjxa4d9AqWWS+ReI1FAfqoy4tabt3o231\nreu1lnFRWKSPrfE4bffgk9GAos0s4CwrPSVLnAj5KtSopUcSSFnXWeES+21n\n/hCN\r\n=wmaM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"68e4f3df48b0552e36b0d629e1fdf944304eff7e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.37","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.17_1618093095536_0.8988113180938868","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.18-renovate-major-socket-io-packages-166d8586402f3e9f6177736f5fb78f0cc1d32da7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.18-renovate-major-socket-io-packages-166d8586402f3e9f6177736f5fb78f0cc1d32da7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.18-renovate-major-socket-io-packages-166d8586402f3e9f6177736f5fb78f0cc1d32da7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fc51793123db76c9bebe37cc71b13859a676faa6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.18-renovate-major-socket-io-packages-166d8586402f3e9f6177736f5fb78f0cc1d32da7.tgz","fileCount":39,"integrity":"sha512-+JIiCV738RbEZZhppPHorm9fAlItC1wGqCglqt5eGsjaZHedIOE0PlWC94POKArTZLhNhWZEtxB+SBAe8ElRSw==","signatures":[{"sig":"MEUCIDutkkmHaUBKO367a+YaQjp7Qjk13p9pAhWS4SPPLXVqAiEAnBVh6ZYHt1ACXPVDNc4lNnK2zj9+GNPrAnI2DHM5sk0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgciTYCRA9TVsSAnZWagAAHcgP/09As7/+tx7RxzLQM1nh\nXgS4QVMkglFOEy7p1S3mWT4hGT/MrtdlrMhJ7w8ZEIiXFdE9+6tYuGlT0JUz\nf5mUEAoUoB/EZnkZ5HEa7ZP8phM7sAez3Edw5f0Z8gQu+rbZMaMlOAcpkg3n\nomh1nwW0LJmxA/GR1OB4nzE/ZjlQyENNyWQi5NsnlYIEea9voKs+qLfJ1WrO\neVpZYkaHA6w0x32xj7SV1JIS+n7uw1f28mByUlXLs86voMpJ6SI4DTSUdlLs\nWjbt6D0aJI5/g8WKXgApyxWBPqe7tAM1s3Mw4GaIJWX7bLSCavZHGIRM6XyX\n4siimpLQLJYEbhKea3DbkUR08szY9L+Hdx//yHMNPmAE8sA3Pq7uogMOCtNk\nbTZkwOIyRqFBI0324Lky8gWS0ZRJwTGynk9UtR/16nRdgZy+Dvea8FzrOQe1\nEtZ+0gzHV+LDfDVEHExYNR4ugwmhkTupFJyX7YVwMoJzTQO11zsMhGvU59ej\nUUcNg8joz/PumfIFOqQwnyfdCUXuZHBIKDbiboe0V5tfwabmrNFQ9vxN0c07\n5MIimSAlcx+lAFI1+6729C+hniVeQI/2CAS63FzR1k5ss7zLVcp88NyJS963\n28VnNSNlwpDhWfihHDLZWvWIs+iamReV9AhwaXCLxqWDQHIIDjp+XyLEeNxC\nCkm8\r\n=aWt/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"166d8586402f3e9f6177736f5fb78f0cc1d32da7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.37","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.18-renovate-major-socket-io-packages-166d8586402f3e9f6177736f5fb78f0cc1d32da7_1618093271976_0.5906651162278274","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.18-renovate-non-major-74f47096177fd935ad67d2ab67ec33d56e266ae0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.18-renovate-non-major-74f47096177fd935ad67d2ab67ec33d56e266ae0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.18-renovate-non-major-74f47096177fd935ad67d2ab67ec33d56e266ae0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"38bf06d1eb3cdcb99d1af05f11f70be44ef0cb18","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.18-renovate-non-major-74f47096177fd935ad67d2ab67ec33d56e266ae0.tgz","fileCount":39,"integrity":"sha512-w9SiX6NurbLC6IWJ/RFFExLZiWrD7NfcsukRHoAD4kraUdXpnDSdtbIhTBOROogGMo+HdKj2TfHDz1PAN09Cdg==","signatures":[{"sig":"MEYCIQCXxn9KM1v9qHhl1GraO2Gm1I+dRWHHw2juOBNq9ETNXwIhAIlPZAjBSBam0KEXxY9WvmNbyVPqgnLATwWLBrSYaD+R","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgckUhCRA9TVsSAnZWagAARlEP/RlSYgXtCZLfRAtfXMjN\nx0GScD38lmsgJuoyPIC5Vu+1tlKJdPBnUODVdDbjSCr9rBKpoUztjsQfF2gH\nR3epJ0I7zSrMsKYb1tDHUSHiS2wM8TJ4/3msTtVN9hZn+V71QY48KyRn1WkS\nDC2WUHmH8LqKXD9H+6OAirUV+u/WIno8K3k6cz/dIgOPQHxsUeL8jQU18u26\nvqOF6+65LUUp5jolqMTQvyTI/qQWn/ny7QOthVNCQakuC+DXgEkUpbNdyqtb\nYhhjtd1RARXv4DF7gLBmn4g4TTLIb4lkuKYYUPeZ4AQ3LPwRz5qfTXNN/kDp\nCXQY3xE9rZ7TDXWvrMt382mDlPkEmEeo17QYvHtgLOb4FNnoqtp2jeS+gR9s\nK4tZG/Y5BNHqll+Seq4U2P4HpfC0gzp5c+oB7cASyyMRDWh7LFs0rOFtXHJK\n7FSwUveY1YFJSamvk7SE48zDhSup1T62PvQnlAdOfr9wnG2GN+0bzxgGbhhv\ngh/ELMSbf7C0H52PN7Djz810xAbMk0IGYRP9V4VktZi/+Xk3E9J6GR8aFVaP\naPsHMDEwR7tXvueeq4SHw0ku6zLvXw7UjyOne8NswEUMQ9FhqWPXmc8l/oPd\nDYUBkOJceeFDcmhP9ajAWvbbCdfMIBY3T38E+krGB7j1F3QX5CNGjmLfpoJx\niOOB\r\n=Hht0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"74f47096177fd935ad67d2ab67ec33d56e266ae0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.38","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.18-renovate-non-major-74f47096177fd935ad67d2ab67ec33d56e266ae0_1618101536887_0.8984902433058304","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.18":{"name":"@balena/jellyfish-client-sdk","version":"3.2.18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.18","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5768feb1962e2cfe58183a20c43a1d7cae39026c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.18.tgz","fileCount":39,"integrity":"sha512-S+v/Rp0rL6JeFOBsjPKxmf2krMSC4+1M3HlSG2DSA+C4SopiUiM6UICyzeWMOOST+VCp/H3JjySe0psGTWNgTQ==","signatures":[{"sig":"MEQCIAzaVK6zfFm7X61DMwhXjQ9N/iFnj9wJMzeczxceB+rgAiAhpfxg0rGXNQ/mqqmLObLn0yCDQEyk/Z6Z7OOIE6hUqA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgckXzCRA9TVsSAnZWagAAZw8P+wSpqzWw4FaIVDXpgsEx\niMycQLjJn7Zao2UXZFFBaStcL9qc5ubLUcZXwNLsONgLt80iGnVxS9hE2ENh\nIizhEqvh40NunAHV5WNJqIOTu15Ox/FyWpnXlRTASX8zF/0MFOjgj9SuhbpE\n6s+ihZN5BRXWK5lIjkNRIPNBS7aBWGB+pqB6nChULTWv0n5NiJXyf5qFqlfd\nK/82E6jJm6s2wIRxgpmLep3l2c0nnDhJXQ4seEeIeeyFYqhrEZfVO30n6IcW\nOlLVQsPU7Yf2xcu2lCe5zXYEBwWyX5uWD9FAHcVxXHr+njk/JLDXR1lgsV2t\npi35NBg+pdugkj9+ns3UJVj2GQlFOqfIDDLYVogo2bf64OvvRgZKtwD4flhK\nYEX6ODo+oqYOS+eOB/l4DlLd+KoZu8bQP5ZcUsywPt6pr38RD4uRpYnzSJhl\nKJOKzrcCbN2OkjIZ9tP+JV9O+xY1+tITtfUflR78N9msQBzf7pzr3Bnk6Zch\nxdrW0N8mF15mH/+ixPEEqvnxzSX5wllLPMtDnTqA2aA2SEF/Iy2dHsvmrV9r\naYwsRh9jl7OmrbyTxV8wb201KHbZd6W6aXN3pi8UVrtxOJ/1XFpl6REgrZAv\ninfJ0suyAAWNf0NWgdsfAfm4Llza7DTGKiFj6DiaPp0jJXDX9FLpqrAeGcFh\nQHeP\r\n=noyT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"09a1d352c193b7059843150c75d01c6556f7df90","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.38","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.18_1618101747456_0.7845622488242445","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.19-renovate-major-socket-io-packages-6e1f22806cc18919097f79296a1d32a2dba60972":{"name":"@balena/jellyfish-client-sdk","version":"3.2.19-renovate-major-socket-io-packages-6e1f22806cc18919097f79296a1d32a2dba60972","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.19-renovate-major-socket-io-packages-6e1f22806cc18919097f79296a1d32a2dba60972","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"39c38648a7c1025e04f7196b0287f9b978c3c66b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.19-renovate-major-socket-io-packages-6e1f22806cc18919097f79296a1d32a2dba60972.tgz","fileCount":39,"integrity":"sha512-Ow9m4PvZTm6dWTcE59y9O9X4kBo3dVUT/ssmvVYPZB8pwlztR8BPm+AKZU62QtrR0LxREJ6YSFy18gszQe81tw==","signatures":[{"sig":"MEUCIQCGTdGzlSR80kg7z95tnm4vBX0lkcyGb+XDk3JvDFHblwIgCL3wgkanb0dklFjZKgzAJNE4SlAwWnm6D2W7EWo5ThQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgckakCRA9TVsSAnZWagAAi/0P/iSo075mXj4BIe8KmuHp\n7Jnhm5th6Mv9dxYNzZpFEdDz7yZCOo/lvhTTklJ0zeU3dbO0m/p+k5g6CIpu\n9fbzgsDzUI1vTsLrElJiaQXRf4jNJFEHnSZP2dTkNsGvOrCinOHdpPDYaP2m\nCtLT2+aqCkenh1bl9vIkGettc1+3iISzpLdMBc2DOKDrFFGtgHY+1ZkauJDr\nErq8wZ982VdZ5DazH51sTZ9NAnwb4hhXLMtbWpOQc7LbRGi4ntjSLo+FznuT\nRV3rG+QcdzwYIHgwci6kRSgIP0bpPH5Xd+Np4ATpCdckUX8j6rG2lCPQYR3z\ny674MBCE5Kuh+3xRIRAclpEMwsjqTf2jCGLYWbne9PwUVzJSJlbvSM+10s5H\nMXW7dH39SMoL7wdnHrBBEk6x3hJHpEPiSCOLfV4Z7j+xaHdKsdpYrIhwYejP\naWpmP0GD6vCzZHx3dqis2lQG0xiqwqGat4ucdtIU03jfdRN6HHqDTHx3hBTb\nUsFhmhP2onuZ7exwo4ZjLSpCSDgvNUeNFHobfqUk51Rk89ApDwEYORgkKqdW\nFASs9UYZGE96qGbG17Q0buHS0objWX1P7D0Czzu1VkgiPf6cSbBoNUwI9tCw\nXJdmUAocNOqerKu3GW13z5yVmN+qYIy3bcR8qfUYmTU9hstauMqjRBt/xG7s\nCLJv\r\n=72Oj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6e1f22806cc18919097f79296a1d32a2dba60972","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.38","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.19-renovate-major-socket-io-packages-6e1f22806cc18919097f79296a1d32a2dba60972_1618101923751_0.2102614453427487","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.19-renovate-non-major-0a39fa22bdaa245ad38e13776d767b7dd048423f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.19-renovate-non-major-0a39fa22bdaa245ad38e13776d767b7dd048423f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.19-renovate-non-major-0a39fa22bdaa245ad38e13776d767b7dd048423f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fb38ad14b87bd25c354d91a1707cb8e0f422a516","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.19-renovate-non-major-0a39fa22bdaa245ad38e13776d767b7dd048423f.tgz","fileCount":39,"integrity":"sha512-4hkMYcKzdQTF0o/3RogC+q8wU+c5OUn1BH65wL3vMuqBntFlbIGfy8bORt//HhP7XKDlBo3dDSFoJfO+uGgg3w==","signatures":[{"sig":"MEYCIQCorZLwWQLylB8P53Zzt2VLkZmcGI6tuS4Tq2e2zdZz0AIhAMBFWdeKkp6nCrhBv1ewSESzt4+lrUEo3S50nFTEnOFn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcl+vCRA9TVsSAnZWagAAR20P+wbJbydFVZLmzn+t7gKf\nSVO3t3L0REbvMrzKXK86ZTKV1+YG2jJHasG+LaBxfMHl7iNt5XnbCL0ffXML\nH4fGgAJY2v0S3PVIoXOedoVARkjJ8AigvHVw46D67gl59mfqCTv3cye+QGej\nZomTjl4dmlCqsDLuWrMwoUS8bqLw529waXxAnG3twjLem5SpfLp1S8JymluM\nBah3lU/FWr4YFibU/FjzF3mFjixumU552N0z4hD8HKSGcBXOxVXVGCZAVmsJ\nppK70yHM6d6m3U2yf3i5WxnT8zuetT98UEqoIoINVr4CLk9MzGp2kN10DKbM\nljmds6tN9u27ePCIn4hROM1cghePSW+PWW0ZV4tv3UsvX02UIAfTWirGtq4r\nFZa2DfPSNey/Yma6ZfyiXXQ5pMrPZ8a5zC/vzTJn/zuASZuNwHgC0m2wM0O3\nWxT6QyuD1ohG6D5e7scz6QNeH3HE2Pu1HOJJuizFrBWuKtIoMbdTxoD6E0Nh\nPTFPrWXGmqxgvtKJjDZw8fuJqRnSaGkisdiIrnsHLDtmg8j6jfJagKiuOi18\na4M8Ppe2tRXj1scUvDHqUeSgu5X388PuxLDhvExg5MuG/WWgV2GxGqe+CjZ5\nwIm3Z/l1PboPqktC4/EPq6iIrYamA02nuqgtLn0w1eVaxjWeXOZxnqueq4uh\n4H/4\r\n=HP5h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0a39fa22bdaa245ad38e13776d767b7dd048423f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.39","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.19-renovate-non-major-0a39fa22bdaa245ad38e13776d767b7dd048423f_1618108334893_0.1481145047785053","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.19":{"name":"@balena/jellyfish-client-sdk","version":"3.2.19","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.19","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d89f3e3306430a84c2fb068935ec6f74f3f78062","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.19.tgz","fileCount":39,"integrity":"sha512-WWcrbgcT5DCmrNMGNv0qCh32Tougt/EuCcI/09O/rGQ5cS05zrhT9IcJbRz6dMU1+XCNdmnCXFbd6+DLL+lGYw==","signatures":[{"sig":"MEYCIQCE4TU6CNbNHw+8vHpSibqjXU0m++wk7DLerMQyy5/pywIhAMISxHoF83+YXWdzoKoi2g2GDxolZC8DeY6qOhoOEP6L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":230977,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcmCBCRA9TVsSAnZWagAA/18P/0zxD+UpNzFJ7VVPHf14\n6U0RvkJIFrIUd20qhh3GYLSEvfq9PC6nBl7Tg8kTxq0hmFaIQHmts++zrHkf\nXn4B/cJujXe8NOJ0xhlHOEkneJ7LzCreJCrFnZeLCLXZjeP9yiAv4dPsoxsg\nouA9YBl0Hr/nwdY6q6aet4CqwNm1NZyStoj9W+lF51iZTWJWTrm73tJZd/Vi\nO3gt4U3rfyxAeUwb1+kHu7PJvc4iJ3Wn2LGtbABA2WyXiBQHv0JUAc8Xoowk\n9lBP/ZvbhBx7+KrcKaBZ81toX28bGLMUiv1kP/wNe05g7/Ax3H3zqqWe+9FX\n8lqbZGOdt9kicSEYkWhXIQp4bGcL2pmeWPvOd60eLBewG0D8b31QJtdDHAlq\nC8ymc84nWvqWzqg+ehgyDbEpcLU5Z57U6TRhwMimPBc2lrpBlZ3KO13c29LX\nEitzO9rgD8BmWbj+hPYzgtf1ub68ZohJJpVKkybxcih7aiPnlOVaDQlwibV9\nk4eE3Vb0C15yIs0lgENNA251oezqgrhXsur0sa55O7qbOX+DbsUVQxRxhdgf\ntE8F0UV2pL/C0Yrzne7EDPYfLYu3/owseY+Mmz7SiozxbD+8XR058IOC2Bc0\nGv/j7boHkotI6K4LuQqz6y3z1/CddtXZ3T7POLahtEid814Tn3ktK1gLuzJJ\nMXQx\r\n=Lqch\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ff016ca606f43ec18416510e3de28a01f55061c5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.39","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.19_1618108544807_0.3355485830084952","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.20-renovate-major-socket-io-packages-2ed2ddbefdf5310c91e90bbc2c2ebd7579705ae8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.20-renovate-major-socket-io-packages-2ed2ddbefdf5310c91e90bbc2c2ebd7579705ae8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.20-renovate-major-socket-io-packages-2ed2ddbefdf5310c91e90bbc2c2ebd7579705ae8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6a5479404031fbba970c2db6e5e1eb9049deb914","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.20-renovate-major-socket-io-packages-2ed2ddbefdf5310c91e90bbc2c2ebd7579705ae8.tgz","fileCount":39,"integrity":"sha512-Imm5WR2JyVPvNsv4Ke22kQz5y4MjcvAqQtnEbK8UmelL9NIe3tg2UdFzJtcsedvDqed1tVsTcrEOYGMZBWD4gA==","signatures":[{"sig":"MEYCIQCTl8WzFFY6PKzBXdySh/BJZ7qpBPPYNP9RnfgJv91J6QIhANtFzl5r7He3HpIlyjJVEifDKx1aAVyz7pKypoFQX5lv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231142,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcmIMCRA9TVsSAnZWagAAwncQAIG11x8XMPHjJ0HWUFt7\nhVW7p5K+LQeXew0rMqvCJOZMK29dWio7p2f0GYZ4q5T7I3Btki/qo3keHmgP\nls4oZGHdQGVH3IzXXkeH1YN3RoII20EfDKNuOdzLKRx4yBeJkdFZvp5mO4se\ny+HAtSX+SfjeKLy1D7QWnXVUAsJ9BpygNbpEIpIy4EnNYhSqA5ogXDDyNLkN\nnyT6prp0yvQ4Eh1Hw2sq46wvbTmUllSkpz42Um9HvvqC4vuZwnwY+4xuVtpr\nVcr2DGUUvK6ZZqmTMm5WNEViPafWwQHhw/eAJAYocZEUhSB6poap68b0b5Hi\ne43vcRNQ8u8/DkjIIwcZRz/10qC+y4ctVHc3pHfFssAMh6AHIQZLKqNfQszL\nUG4lkgX1kl/6oZL8axpSflOBXbjFDYMyS+TL63KWjCSr3qbQr1HXB2ng4C70\nQ8QVkmWrBmZ4BMfWh6pZq8nYiMpLsTVUK06TFNQjYppMtmN7W0iSFZLk6OmT\nr4gzXVb0XiJ0u02XOB2p0xQxT2YP7jn9PLmqHK7jN8W8UvIOs3MxmAEslB9X\nQAzF1eG3T7dWoXOco+AEV474+nseH53rh07lehkpCnrXUXpjTiDP99zJav89\nuz/ULXHzmxNFfQsEy+1xYTiGfAJIBgHb3GRRNIphAI9WA9qVJQnuxwaghjtR\nVenE\r\n=WDCY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2ed2ddbefdf5310c91e90bbc2c2ebd7579705ae8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.39","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.20-renovate-major-socket-io-packages-2ed2ddbefdf5310c91e90bbc2c2ebd7579705ae8_1618108940362_0.4067952113589355","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.20-renovate-non-major-1423e410c17d27abfbd97ddf8d6d069dd666d4e0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.20-renovate-non-major-1423e410c17d27abfbd97ddf8d6d069dd666d4e0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.20-renovate-non-major-1423e410c17d27abfbd97ddf8d6d069dd666d4e0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9146210eb64eb916a3e3f2d458cec6dd9523f9f3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.20-renovate-non-major-1423e410c17d27abfbd97ddf8d6d069dd666d4e0.tgz","fileCount":39,"integrity":"sha512-w0LCm3hCWSjA2aqmSkCClBvzEY14Lz0/1LRFecoo5WZeCQdRRv75yifB6q5JWqUdZLTxmKuBtV/pXlGXOytrJg==","signatures":[{"sig":"MEYCIQCDc4roygBh0ESS0tRNPRlVPaS+f/3kaBzKdw8YCJ5cngIhAO/08DGJ72nZHRyKD0b9WOkcBy+ro+127bZi9LmSxffp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcn3ACRA9TVsSAnZWagAA53sP/iuuCAKtws/t2Q76uIXz\ndo+0AJPo5up3eysDZzDiyh3gyHK6iDZS1N3bvqk/Y45OZCNfwwey5vNJ/PJz\nSU6kybVfqsPc9CIeIk0i/FMIufKGYxmYmgjQ+uteeAO4YzWbenczGF+A+hoa\nqvMnPwlFCmLvV9sQubbUYc/cvsL49MPZei+sNbI4FPqywgyy7oeX9jil65d/\n1+iNu5/zc61umttYdJQDcrL8c7jLJ3JOB/bweOJWvF0nsywaqwuVxENp00HP\nJoFDK01ud/S5c9vx5+70iXOm59dROHTDkpeGktVExd8JN5y4+e8NfOVZ//WO\nQN/oNrv+85HqWYi07TCpEKeSwaDcVSMF2G6HM1anTxWKZPvBY6cb5RAw0O+u\nsIZk1EfCXi6/qPrFgO3MZK8GqwvKUFxhXx/USZUZqpkw9eNx/WoYtZeGP0UQ\nEioQ94IjzourkyYNcH5J5N0voRSny0PnpP610jbDJulAZcbHd77cWa6jlxbg\n3fomPKeUxFQAagF4vngSMEhGeRoKRfTtHozTo76tDIaFXl7xQNLpDDUoUSc+\nn0mEzsVa/Jwr4/yfzp+/7KGN4SaQlS8ArhIdtAKCNwiVoP2CNhkJ0wKJ+q0p\nzmvE3h4FIML2W2UrrZGyDNrxwJ4Q3lQsRn01nb8mhLmUF4MUjLxYzIo2Fryt\nWKLT\r\n=gGnU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1423e410c17d27abfbd97ddf8d6d069dd666d4e0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.40","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.20-renovate-non-major-1423e410c17d27abfbd97ddf8d6d069dd666d4e0_1618116032346_0.8616328894100231","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.20":{"name":"@balena/jellyfish-client-sdk","version":"3.2.20","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.20","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2982d295970f6e7038ef4d1c3c87558fe774d890","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.20.tgz","fileCount":39,"integrity":"sha512-J/ngYLi/wKdqshncu/6fU1Ck8xUDrntkx2L8dm+/CuyCYI+7cHe0wRYO+X+uM0Sks03yGhYpgfIOqPDD2OwJZQ==","signatures":[{"sig":"MEUCIB+OY3U+A2NFH9Qr33lTVlCbcgW7wsTyNrvL1wKmQ/LYAiEAkrrwyVN2MoLYfo2dDboqiSn1f3oHLxrajBoy5ENHwGM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcn5+CRA9TVsSAnZWagAAs2YP/0qOuGuHGiTs3zh+dSF5\nSlUnneFwbTt5gfZuoaPuCE1JyWIqRZe4+8y8JGB6NqtSxS1ep+LwQXdKXHf1\nFXD+5MPy50SquWNe74B4g6IwRyKpenhBheWJ9hAxcD5NBCAhekmPJ2JiXahH\nYsD1rwwlylfwO0PVtI39GVFhBkeOqswnBMwGNj0E5/yIlPv451j51crwTjLS\noyBIAkTJqrDDlcWgyqiWAhRUHQodytHIxadladIda/gSZddHjCNgIhfcUcs2\nuZ9BlEnMgpt5YFTfWRT/mxRusx+j2eIbHL9RnKq7NVCorNwjNcZ5kH1rFz+f\nvIgygF95Kd+I3PJmGvX/vfioCGDNjYTIv+JyrTe1FDIosio/bWAXnglTcYsS\n0Lz4qQvNof2LvOmiz64MArNNEhjtyDiPWVJnyRkn08f7+SdXtbC27Ed5MSPG\nhs3zXueEHNv/N7qX4eRuvTDU4GlHE2DFo1AiFFXZtZFU3dQJ62EAKcz1pW7s\nYyfrt/Ja+sjLom8cQE7dhIIkVfpRR23rS1ZlI+7vRzXXQ6d9HjYWlu6ZtH+c\nehW3DilW0kJ6qe93nMv3F0wXoNjDOropENq8NdxA4MzI4LbHqXtZUQdyC9DY\nExCQo0Vl9rkxz5Hz9/ddDvl+r07NwwM6C54I5FAYeCdiaocsZFduWBC8Fxce\nud6z\r\n=i3FT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"190ad9fda59adc64d27642cfef6ed4cd02fb2f2b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.40","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.20_1618116221641_0.32450860077681853","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.21-renovate-major-socket-io-packages-8f41ee2fcf066ff7bc0c92f3070e1e5a90a64950":{"name":"@balena/jellyfish-client-sdk","version":"3.2.21-renovate-major-socket-io-packages-8f41ee2fcf066ff7bc0c92f3070e1e5a90a64950","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.21-renovate-major-socket-io-packages-8f41ee2fcf066ff7bc0c92f3070e1e5a90a64950","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"031f81bcdafe1e9630aea5f34ddf2626ed4b5320","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.21-renovate-major-socket-io-packages-8f41ee2fcf066ff7bc0c92f3070e1e5a90a64950.tgz","fileCount":39,"integrity":"sha512-lK424vLuI5kNUH0LgwTt4JVegX9kfdD/sT3bdMwfqqnKeQLLrlpp+UiOrrfjVT8Rh1mSm4p27B6oRj6Tx0ZuaA==","signatures":[{"sig":"MEUCIBjdRUE9sm35FwRbqmbW0CUGzmXKEsBkmgNYOCaQ0rHWAiEA7W7K9Dcmil7VL9wGDDnc35t5lKQHSwNkCdzde9JVDR0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcn/qCRA9TVsSAnZWagAA34sP/32uhRr6FDqezm6qy+lF\nCABSL9/wkeUCRvukchW/ecMNnEatWxHzOlHQekVTQykLwUXmKr8lyLninQPN\nuiI+pU0XnzLLUYkCrxfgnxg02G0z3GxcU/tvEbyQ7fCf2VVodSGTVUZoqh7l\nfATsoE8wAf6HL2RBFHQdapVHoQEea7v6G8JG8RGx96IUyR77mHsggjO/kzAi\nH/x4haGrFbUi/11bWZdWUgXTNApkFqhw+O7+WrjWcv4K4FeqhTI53BaKkO/z\nqbQ1xUszaLmGxZTw4BN57T/guE/1Rxohv9lkFAKZnXrSeFSEobh8pcp3wjcT\nGRK2Hh1tVf4q01pYc86tStbYP1tao/80BzK7RhPDvsSUMT4TWqbuJaRhSAvi\nBHX5Q17fdCvWtf8IJBQ9cLgHuuQFeAjoT/nhzAMRAnaFtLU1UZuwFeRPy6Ep\n4cVOUsX8gxgd9x/JFbvQ0kodnJBDxbeafPEr/q2yZf1vj2nnap3LXN/lCR5a\nZkboewtMCELa9/0AJK5VeM39yo/uodqJbDksjc/M5dSvkq/yVQK0rlZX9kBL\njFxPsPGbHffqqdjuTPHGMbFJD0qqjWMWeRSUW7AZ9uwgnpNA4iG8St9ROiig\nlh2PguQvLMmV+lSTeAzopKkjC5rI+oOwPpdnvU43FiUBCALaS3UgPXcZjoWG\ndd7z\r\n=kL6Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8f41ee2fcf066ff7bc0c92f3070e1e5a90a64950","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.40","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.21-renovate-major-socket-io-packages-8f41ee2fcf066ff7bc0c92f3070e1e5a90a64950_1618116586122_0.247794436020512","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.21-renovate-non-major-02bbe0b96ac1c7c3bed44051fdc14f02ea541a9b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.21-renovate-non-major-02bbe0b96ac1c7c3bed44051fdc14f02ea541a9b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.21-renovate-non-major-02bbe0b96ac1c7c3bed44051fdc14f02ea541a9b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a4937da2effa5a9b045b2ce62ea2ef68da3f3657","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.21-renovate-non-major-02bbe0b96ac1c7c3bed44051fdc14f02ea541a9b.tgz","fileCount":39,"integrity":"sha512-mgpClKY+tOuoF9a9FW4YvVQAZt/aRoxCY906BAWNC1J1QXvBqG2kSCUlIYrxEQEa/dRySmej2gUTMDrSkbRVZA==","signatures":[{"sig":"MEUCIG7osT5ojJi2HmGRq/MFw3oSUFurv7vPGZMVHh3PufAQAiEAuOHn771RSDB1HkB7Fad6HqqpFh9rMJbCQeUsgF09a2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcrHLCRA9TVsSAnZWagAALLQP/R6aHB6rXIKdDzpCVVqF\nNpAp6nQFV6VuK0HlQVli/aso7/nI/hs5qZh4x285xtBGr0UrG49RJ0IODqSm\nLmRU9cLEREuwbHSUxFd4rFQ2D+danEi90LBOuEgK41gNCtBVLJuSvmdSobsJ\nBu4qA3k4ebDO6TStWLRRLnrzhfaFkkOBuHtm3560huzFPbduSEGhEp12g1dA\nmNG5a38uJtCY6oY/7jxI4IYh9Y5avUj75J8hlBIIY7gqdvF2NQsz6J/u5z+Y\nq2WiLFltD9xpnGKYCKtuxJFmIjSDzo/xR+VHIWkuMXWU/JqlHAtT3Xl4u5yw\nQ5HXG47HS1jqjyWR6IKAfONS0j64OVNJ/zWqxiHEm2ML2ZTcbXM8/rXZUQ6Q\npxq7mDhaXb7gTEkokdVznM6Pxx0nPqXCuPSzsNGtvqn9OabFX0znjdZ2fi6S\nd0juPXPRLebWcbXTHdBToSZc7wcXiyPzqRzaKxrVIRamx57DGI5P/XdwqOQn\nv0FTn2uiq3/OFaFYJb8wxIu3th14HysA5FX0BdlF4nJa8bmfLKdXYFp8Ve00\n2zBABrTii2kQnY9h+6emjtUQqVrqwQN5ktCJK5MR2pz4MKG7QUnOiL2oNhGo\nM7LoTSHTP62oo6CxQerlV4r7ytW0kz0IIQfcppUu0nbNI5BIrMKoP3CSGUzN\nS/A+\r\n=mtil\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"02bbe0b96ac1c7c3bed44051fdc14f02ea541a9b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.41","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.21-renovate-non-major-02bbe0b96ac1c7c3bed44051fdc14f02ea541a9b_1618129354824_0.5481836877716519","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.21":{"name":"@balena/jellyfish-client-sdk","version":"3.2.21","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.21","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2b72266b855882b265e5215bd95f5509950d788b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.21.tgz","fileCount":39,"integrity":"sha512-jvdoEE230bVRE4QcM5DhYImU2dcUu9HUlqyyiGOU/T0H0jBqP/ofFpCEv6qtwpHII7hZ6CEpsRhf7rgmX9R61w==","signatures":[{"sig":"MEUCIQDZjz2oK6kx+1PallelO2UuKqNJ5pRrikfuiOFB8EbWqAIgJMFXBgaMdcQkcmgdOduT3QsaqoXGzl8p7/ZP4tEAcEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcrKwCRA9TVsSAnZWagAAOkkP/RbDczuBS13B+Z04lP4j\nVsiYOaBJfAEJG8QgqcEUtNF3fZdxkflt5so9wC6LYthjlynofYDJI/IBlGGx\niof377rzdJji4FpwIP7op05pVGLsFUHU5Ro28FXTpRfFgCot8eVDofhii9vS\nTfjF65wjE+4VENms2BYpeFmTJZT4zZG2aldrMWkbcqaO+glfj0tlTCkpgxaD\nUIcZW6D6BXia2s2C6pYctr8clP12KeJ/Dc067qJR2YQOv1zeQgoZO/eKO/nk\nt4an8bXpmvmg8Hyv6/GcWiuebpxy7bt9urJY4qJwRJYLECyDuQeRTlRPxMIF\nM5D1OA2ZkuijwLKt6OYJFht0kF7phyLB0Lgw4Db5irREEvxqntx+j6qAPJs8\nFRNj9suuC9e/w7MZekvR1l0bA/ideeIueLp1x0FBAFmSSQGk6C1FIn82BX/7\noHZboVm9yN0lAO3rDl9twJAGq1Np49Yn+2DkcEUUXA5/h7PV22GIUih4ns7d\nd0R1sieyoyz8lHQIEKYH4qT62gJvknCp00qbplfkztK6EGK2xdkPS+f3A2Cq\n5AJ4oA5Ugyu6zaIC+nBkvvuxV7iKH56eAI2W5sBgPc/irxDCiKJoqDR7sX1X\nTnapjsj3xZUJy9s8YESJTRmyWhVuDW0p2ZmYTlO1vRiaz8Ill69NkVmd2cux\nkRXh\r\n=7E4N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6af453db1a7af84f256ad0e829b34160c7972fbd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.41","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.21_1618129584298_0.6769749029254397","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.22-renovate-major-socket-io-packages-8b865bc29a72f8b3d76ed42a60f2ec4a25c0aa01":{"name":"@balena/jellyfish-client-sdk","version":"3.2.22-renovate-major-socket-io-packages-8b865bc29a72f8b3d76ed42a60f2ec4a25c0aa01","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.22-renovate-major-socket-io-packages-8b865bc29a72f8b3d76ed42a60f2ec4a25c0aa01","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"755e1e18387c7c2a0468e34bea6b7f717378c14e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.22-renovate-major-socket-io-packages-8b865bc29a72f8b3d76ed42a60f2ec4a25c0aa01.tgz","fileCount":39,"integrity":"sha512-wlstwj6NoFWUJ3+q6bzSDMK0K9dMi41HL7KcHQLRzH7kVRXBQeIhIxSKW1ml/sbSr80hpsf5L661d/pxMtOomw==","signatures":[{"sig":"MEUCIQDIbX4YMJQ60lwQSiezHMhcn1zt03iZqUWcx11CBdJwIAIgOIAXjVkK+zl8cHSggDkf3y44fGtI5K5L2PuzFJww65U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcrOCCRA9TVsSAnZWagAAcVoP/AiKfG68btpf8uWO+8LI\nOVVgo7LITVj8kJIk5I+sWuWxn8afjMHNr8hS6gwqoQ/5X1LCEEEFrO+Zm+LE\nbNsMe+66QZOp0803utcrba3HT3Q3iikxexQr1oQrf8wp602DdAyphKPW1oBH\n1NFGu+awTLUCMugLycX+eiSgiAplkCLefGFd4gi1QYcT8qGX/+6vpzNzcEjr\ntnQ3PEaFruq9ObqqDg9Eb/aThAwGchkzEb1XiyKauyyaIyH4kSYUBpKbb6+f\n54e6sv5I2OMs5Sk39uT1WZ7AhlfP9Podfjrb9WKdH36bIfiPDi20vT6ZKL4t\nZyxWNtqdc8s05BAozlRIl9gh4zgrex2pHKX7P5QiOZBIQeEw8o+wW9SXs+bi\ngIRmu1C3kAnF1MMRsKFc/qlDtx2EhcYpzobKgrG4mAOKjr/h2O2/XLWRXjeI\ncV//gtFjZPnnIJV8I1hIHwAOelgFt8McXTCzuCHj1l7CvM+8/VCDP7zeWHMZ\nQfkdJg+rJRQWD3qUk6U4MUryhMq4NhizIU57QkuYEhJQ5F/cwXrXUYcJXxGR\nSkKDo2WRol38Iy8JgQxouy9dc/Y8uNYVn/BySk5M7JIFhUd8l+lk2fJtiPY5\ncB/jWrdLw1F43jz8JRaIsbysgaVzyHsbLuz5OzjuzaMv84VWCoJ03wxLn5R4\nzBUA\r\n=W/Lq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8b865bc29a72f8b3d76ed42a60f2ec4a25c0aa01","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.41","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.22-renovate-major-socket-io-packages-8b865bc29a72f8b3d76ed42a60f2ec4a25c0aa01_1618129794423_0.06534835684190843","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.22-renovate-non-major-e65cf0337476dfa85eabe9964cad45207e6e7ff7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.22-renovate-non-major-e65cf0337476dfa85eabe9964cad45207e6e7ff7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.22-renovate-non-major-e65cf0337476dfa85eabe9964cad45207e6e7ff7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"db2ffe0ce421f25077d2d672231feab274eae995","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.22-renovate-non-major-e65cf0337476dfa85eabe9964cad45207e6e7ff7.tgz","fileCount":39,"integrity":"sha512-ey7UqYFODyQYL4srckfsuWZuK4vJrh0qeKX3GDjmKSYoPMGd7oiofmxVKtF8QQg/Xp9V8Cq5/ymR4Zv8+l+UiA==","signatures":[{"sig":"MEYCIQDZafWYz+XTe4Ouq8tQThaatkZhklZKR1thBjfxfr550gIhAMowGJNgAKlodP2UPX5sqMyq2W5sQyKZFl0byz9ivwTj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgctDMCRA9TVsSAnZWagAAF6sP/j6dBzBdSq1cm4oomobb\nISebKytOhdrmkHY7W6NNSUkV6TzmzbYa4P9HRyQr7QRVP0+Icc5dG69zXb+j\nERQwQ1kyuQ2E/6DTfeCD6gRWlJKKruCKvozZYuIg6a0X/O/z/kKN1/+hJlhT\n4D06YqYnZonTE/2qorNrM6y1mq5oXKHGcGua7p5BgsNEtQfmdJF8UljfVDC6\nINWvsxWI1WSnOQK4uSlXAbyn6pIxUaimnh2IsJ7+St9L7EFl9SQkBl9o3PiQ\nv9Dv4869Rb8hSAldGOnoUmzSor6IOh9sn96orTNUz8zriXAOskgGZcEmuKiX\nJ1JLQ8++aIv1DlYK+pq7BrecS7dWfmMmjp4hNSN0SHYnvE15BMXAIMrbYLOB\nukXt3R/r/G+3vkhmo7IHqhWLmGje3sUQU5ESIyPUFu4VczGiaIESS2VikGl0\nge9hPoazpqdTy5qNc3LtjF8yq45sQ6gceAv8CcyPknMtUMFKG3yC6HrL+iC6\nkfJdN6M0MB5k9dduyLdaJtxdTmARju3iiJ8CCRZ4CMxWhjmQcv8AB3NkioRr\n5acBKdnbdH6OP4n117rDJRc/Ta3yFFaD5KlDhGpajcofG8zgZ08KQzZO2uNM\nSuOauybbIh0KkN9UlVLDElMV0+Yus5IhY2WYljshsKfdPq3OnZkgYBOmte61\n0epn\r\n=t5/j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e65cf0337476dfa85eabe9964cad45207e6e7ff7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.42","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.22-renovate-non-major-e65cf0337476dfa85eabe9964cad45207e6e7ff7_1618137291523_0.6756455395916563","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.22":{"name":"@balena/jellyfish-client-sdk","version":"3.2.22","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.22","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ae726be48657e3e144f22aef5bd07f6e6c0a0e6a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.22.tgz","fileCount":39,"integrity":"sha512-HamN8kiRcGyiGUbjG+ePhkqeUMQq6d2yGc4Qy7EN4/UyBtx6I+6HXjWRgS6oKt8BI0SXjI9sZjmH/Z0b7Ibu1w==","signatures":[{"sig":"MEUCIExns9661bEpRl1/c2REimorW2C5osa2QQHftvxmi0cOAiEA8R8e20d9z/pHGrl4NoBYFKrteEA4Wu1dMZFGplUc56E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgctGXCRA9TVsSAnZWagAAb7YP/Rq0evYurpwxsiKb+Wo/\nHxJBff5dRGMmOZJoTmTWkWbprPFkyVuS0rUczSQ9cgcHoLe065XuAz1mLDqW\nKArBUi3kicG3ejJbFsiW/1B8o2q+H8PTguylQQBndU7OKlOPvA2Q7J8KMsXF\nsW0ExQ9uz9/eN3xboaxTxJqY4ihpJpeJCrwUbPJmPSZ5CS3EOA3mOV7HkxEq\n80a6p5wpk1FjJvKcDZ2KnH/RzKpt7Hnunu8I0h2apHffBiLxmz790eqs7XhD\nXKm4o6oBvEbGwImfjbVCYag7ok3oe2yZTtUDzw2NxIQp3kuhJ/oa15IS4o3m\nkXKbP25DHsnxANcIoXQ1G/UCwmNm9kc3KUg3Eyyd9TQxOJxbrEN//4FgdEnQ\ncLddCqwdVkET9FisxJCxDoHy65SG4iXiLt1uEyhOU1bASnqs3ZIWiFwa0qZb\n2LI0aF15J6PjXRIH0hp+vi7MOFEGxeLD1azdlEGwwHTwdONz2tOwYRaamDTY\nID2FWWPHBY4IpwWicYFqJI7xJ4XLfPlCUKfxgvDwh9mTNFuAe40v33tmZEWg\nyOfmrqQOObiaunow6stwAbIr6Y13kQKzQwMrra2l5ag3zv6brjnMQOzp1cQ0\no3qiWtYsAx9uDW+MKSZP4GvbwF1zEbNx6hOpoofor/y+FhbKQx1V3WcmgFgA\niJTx\r\n=j5yF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bb2f9bf91911548dcbdb4fd3ca4383676896321e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.42","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.22_1618137495078_0.9889145883519008","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.23-renovate-major-socket-io-packages-ec80154af95745c33df0a97437b8d7969bc1f64d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.23-renovate-major-socket-io-packages-ec80154af95745c33df0a97437b8d7969bc1f64d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.23-renovate-major-socket-io-packages-ec80154af95745c33df0a97437b8d7969bc1f64d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"55fcdd55f25d54195a9a9bb0e439510dcd53ca24","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.23-renovate-major-socket-io-packages-ec80154af95745c33df0a97437b8d7969bc1f64d.tgz","fileCount":39,"integrity":"sha512-7OPFIKZPk+TQfNea6w2b/050Rq1DawNy8TdJRtBZk5mdZJey4q8dzyszlp72/xWlfm1IzYYJ32dxSQSlXoMbDA==","signatures":[{"sig":"MEYCIQD+NV/XRbLeE4RXyxUzeDmmuTYV5WBdkUsWgViRD8recwIhAIPXEuH4YfrbqRxqPlGFsniulCjHEqnCJzOM8b9bYte2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgctJiCRA9TVsSAnZWagAAMhUP/2bJsqtncVyfZO/SWRgo\nMOAjVamvB6XBzVqZO7lBSUbxEz0yGIOP3muwRDieM+PJ8+YYglqnxUnlg3VX\nOP4xxrCMA10TWtI+8NBot8cIm8nK6s770DMGSzLPtK9e412Pi0wAtLMD76FX\nsL/JPUM1woEq8NZ02wk8hWuKyIsR1ELZVyMfTS7u4FwGtDkv8QVadbUhUYNs\nFBPfdoF/JfFm5lpPGxME94XrSMKMkAO3Y8K7VVkRgvSaQn9T1q6jVD53Htzb\nTucgjjY4wkCo6Cr+kBd8esUcOBDzWTmDapJG3oLxDChOylTi1/kncezdmEQ2\nGqc9xUfThTnnXqktY9oB4Y1jGkIlr4btPS/mtsvgvcYq5Td/WHg9ubkOvcpK\neeQPAK/WwS3CeuxaVg4ZZ5wJ3jUrfn+6chdn+u7nxIcBaBsQX6UiZ9UKP+Uf\n/JdfPK85mWdUD5WmITxCRw8+vBduuUZMlYuQpy2EPkXzYggArdWoPWAC5/md\n6/+MxdbrE/jzOSRY28J8Aqt84TNvJTpYYSFDqo8dKnQ6NYCvCkEUxPuLBRhd\n38IdQJyNSPTu0mX21wjWI96tyjNNz50ea9waz8AzXD8IkUnC/h0MeLOhu6XS\nSHNly4fqUO5108fmB9dw3xvrmf9tdlesdqJNMd1qqpLXYJSrxMwGqgbDM4EU\nCeHz\r\n=7Uwn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ec80154af95745c33df0a97437b8d7969bc1f64d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.42","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.23-renovate-major-socket-io-packages-ec80154af95745c33df0a97437b8d7969bc1f64d_1618137697677_0.14168136822351718","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.23-renovate-non-major-bbfda0a45e077522fa022e2c44b5aaafded918c3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.23-renovate-non-major-bbfda0a45e077522fa022e2c44b5aaafded918c3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.23-renovate-non-major-bbfda0a45e077522fa022e2c44b5aaafded918c3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"afdc271003737250d5e6697b8f55454047c340d9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.23-renovate-non-major-bbfda0a45e077522fa022e2c44b5aaafded918c3.tgz","fileCount":39,"integrity":"sha512-1Bna57vtI49z+uLt99ymHzjLuGBjrakWjxggSSikdzv7mIlpXcWu8hlMdYpeLwgDl1zHHDShcOuOQKzf3XhfHw==","signatures":[{"sig":"MEUCIHJAvzD88jUU52KlFo1bnzGGVs0fL1b47Z35BzBkxVv3AiEAtb8x/Y9auPh04fr9vD78e9bnghuYrc0jj2A2zDkHNY4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcv1SCRA9TVsSAnZWagAAhuIP/1h0UmB+7h/BSTJwmQiW\nhw6tdPyn6a26Pnsh0dZzuINT7WTKc8dw+rfa9Mr15s0jJos+fjur9MBPn+/l\nm4rG85c5rsjb6ZYTyUzuCXPMr7/Armt1RgfTDO4NfVSxqdn6kuOgL6WccWXw\nA5Ukx9lmgFKyVHDmhAWVYlDEv2uX52a+8DlM8kEyDim0Gg979vENhN0lGt8X\nAAORYwA5czTsC0q65bU0tRHvBCeL8p5XT/G1GUYK9iQ5zT4LF5Bdete/Usw2\nPtpF8gbuHPAn6HkyO/3nG1GUNyZ6dndSPeJCgpuUh9xnEx9ZBkschCNNnSbk\n+uGllWHMEtwWB1eqisCuV+tOpQ+x+FK06yie8s+wvQpLG/hE7kf1O1X6pi8r\n9LNgdq7WFZqAH0XBUoAulBoM5m3AMhNiv8YUJmSLwTRMDhvKtyzI1dHOAQKx\ny+9+aJR3Db+Z760koIZRKmAQt5d6No9Oar4zOma3/0koaTQt9OCOyRmim2JD\nNnpXNOxuROc9mV5cPphUNZqWNoPWQ538WNSVGZfoE3dO+PL/Xm5iUNrL9vja\nX7UJyP8ia8rKCMftvb4hW+mX6c+6B6NhHZVbdCsNhh1yiR7jEy+tqfvmG7xd\nvyajrqAdTAOdkmwJFbYniK4akUCGm0Ta4rjfByztFkKP9lyBUxFeQ7nQuEGp\ndBwU\r\n=+LDx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bbfda0a45e077522fa022e2c44b5aaafded918c3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.43","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.23-renovate-non-major-bbfda0a45e077522fa022e2c44b5aaafded918c3_1618148689651_0.47370924076667875","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.23":{"name":"@balena/jellyfish-client-sdk","version":"3.2.23","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.23","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c4f9020d06a7ddbc0c5155cf853f1f283adcd4c8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.23.tgz","fileCount":39,"integrity":"sha512-u/wTOyRJ4nH6Ma4mQmXknRoMVsVn4COtlprXgsIM4vq4HOWBehOQljhb+DTZrjV76f5gwWFYddC+pEKZ8Z7aww==","signatures":[{"sig":"MEQCIHFRPMINlmyi6D0llW+D56VbBNwvyJdr7D3amIo1WJ4VAiBQ4Wk7Ir0JJvlpWKSm8mAOwRATo2ApTVZmvAlwUynyIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcv5bCRA9TVsSAnZWagAASy4P+wTjQCjeD5/g4HQKbt0L\nL9/5Fs7Jw50/O8GzR27hBSY47OUBoSRBc3/xPNjmt/AOyvcH0O+GlIIilSRl\nQdEGQx5pgwALXJO6ynW5vII+pZGyII1YAhu6+FIj9kS9GukUsA4E5do3ZAry\nd3rM8QWkkAAiUoE8y+EC1Kl8ukEqoLLJ1YyehbBj3TZISwnL0r/kTb61oklu\neVTRhkmS5/6X0n2+FWrS/Q/JHfwi35phUTLxnFvtM7sCNpHbclseK+6auJ0Y\nidJO3zCVtq5EoMreLUGhdndXR28LKo/tZjFFkwwz/GvF2WrEaOjH/JaTrahc\nLRPBhaTk8Jv+ci3WFU+92+AZgDkq2VzEuKFBleHd+k99x18hjzL3XbQCmaA/\nZljLYxd+O/PyArkG3/opeuzDwROiuCy4pgBaPN275aqZ0G006WwYw0UfpMTl\nOtxy3ZWOXdpTGFIHLsi6oiC0Roa9HvCT9gUQIwmkQQaImkkzqwbySCxrcgMl\nL2cWBnDUJ1aoMt8uQlA/Kd+oftaIHzO2jUlVt9o2tD2eeblkKx+ltfaEpur6\nn5PevQmUjyPzvg8hxrg2tq8Fz4c88eRaMPu9WCa5yHVih3X2mPisu0ypy+T8\nnJUODOvAakTkC4PQjixd1F8UXYvWueWndEroqreX3ltSe0AIxkKA28muSdgx\ni5lB\r\n=ky9T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"84d0bb997dc03f3cdd459a517794c5b8de6c59a2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.43","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.23_1618148954927_0.8218591958931027","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.23-renovate-major-socket-io-packages-735f448c89b00830ad2704e335e92066e8d74ecf":{"name":"@balena/jellyfish-client-sdk","version":"3.2.23-renovate-major-socket-io-packages-735f448c89b00830ad2704e335e92066e8d74ecf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.23-renovate-major-socket-io-packages-735f448c89b00830ad2704e335e92066e8d74ecf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4f9fc274cb1956b954e218b90847e22a955835de","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.23-renovate-major-socket-io-packages-735f448c89b00830ad2704e335e92066e8d74ecf.tgz","fileCount":39,"integrity":"sha512-+EIb4i/HlByABKtIWGVrXrJkpwGYWaFHxFH3FjB774jOMAlldIJfhlmQiFt2xHt0uJC65G1BGGyLrEsUKM2HLA==","signatures":[{"sig":"MEQCIHK4FBLzTTpV8OhNUXycBk5tyIgH5vyN4ObAUAeTpD26AiAaG06uV0tzJEJnPruM/HOOrTvaDrybqGv8qEH1g4gWmA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcv8cCRA9TVsSAnZWagAA2VcP/iB7+g5iC3S/FxRDkMB8\nNdYL8Wi/hDChacdbYBQ/ETsRb6wkVSuX2m8oAnkwQiZJ+dkxJCYyPkMpvJ3P\npQ4/KOxT9iw0SQ1yZibiWsYYt69qpivUx6IvdEQrVlTv1BJFWDmFTwDrMLNO\nLWPtsp/y+ycag+LPrKzSmNh+9H+WheV6dkr7l+0OjiHiLaR0pCtBdmzDR+xF\nF3mSZmkNwKJmNt9Hg9a8urlRNzrqI9BRu6YGxnP4LSMMb6Uughu7+EXdlPIV\n+wKLH3bKVSgsmI7Ratj04uL9GFB8CxxZXVsXIpxtEQ28cMs4STec94jzQ8Ed\nhjcXv+pHVvvN5IL10ReOLera/Wv9em9ry1ziMWnpq6UlgHY3/6Lkn2oreyCf\nI+8oaXOENowDHFD8x2p6cHwJ4Yj4og1Oi0H9XsYukw5eayY/4lg2MctWrBCR\neMUR8QwKNrZITGa+N56l/5mERC2UuzM2nWIuEM0f8FeyIMaSVSlxa3PgDolX\niqkDT55JWKNNwbNS/PQTvGZJG/Veceqf8qLXgCtGudcir0B/BKN5a3jryL1G\nM4Vw9uUPxVxSHKXJQW5HhS0O5SzmMg9V0srvkJFYodkG8qC2VmaUkHmkr31K\nLxab/TU8sSfgwUmItc424Ot9muSeTsejlnjGfPNp5p7MT7LbrvjkkvN6c46Y\nDNrT\r\n=yBhq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"735f448c89b00830ad2704e335e92066e8d74ecf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.43","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.23-renovate-major-socket-io-packages-735f448c89b00830ad2704e335e92066e8d74ecf_1618149148062_0.5541938232323056","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.24-renovate-major-socket-io-packages-786a532fb72f50ab2c9754de3cf6a56343397995":{"name":"@balena/jellyfish-client-sdk","version":"3.2.24-renovate-major-socket-io-packages-786a532fb72f50ab2c9754de3cf6a56343397995","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.24-renovate-major-socket-io-packages-786a532fb72f50ab2c9754de3cf6a56343397995","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"43778cf6f7c2445df10b8569b10ab61111f97ea8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.24-renovate-major-socket-io-packages-786a532fb72f50ab2c9754de3cf6a56343397995.tgz","fileCount":39,"integrity":"sha512-BrVWRA15cJ8bVyyBbx+Lynx6e3PhaTvU1OU2cl/hn/T9a7iiSPLlzguGwQBvz99MpEggYD25lRzntR+eTj9G/w==","signatures":[{"sig":"MEQCIDtKHQHsl/zEqcwFdj8nZ4Ot+wnYcZ/BSIVBrf6uIs72AiBvtFtRmgeZpZddFMg/osbPaPnQD3Slyaf4Rrk3WftN+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcwCLCRA9TVsSAnZWagAABJIP/0TP/2r8oDqwXBD5mCRs\nKtdBp210nlqe5YBYLBcnlVE8p46EJ2GBjSUyQ+UqvHf/peMasxrcjwuxiVGP\n6PhfOK/K4r2fNrq5tKYZqaqggIor5ef/+JVSDGosuO7k71xXSyHzlJttau42\nl7jlCuJOnNgRrhrxTKHYRQb7PbuVKrXQEmnt8+36GjvhTjL/cQ1/WCQbC8Bn\nCfoqkjxzPM2UjQN7nOz+w5No2x5okFZSj2q7ut3qsGe8ZRFbOCth+n6BUDpp\nZ1yVjH9fClfHeyYMfXVfVLC+DRlvrxxbXI71v604npF6KYvmfXH7x++ITJvD\n3EW//8VVNx4vQ3Q7ntcI1h7XAOZahKDpO9yMpovlsLXz9/H/JM9aSDQO2Wew\nXxlKDPN49veFzhBfW+qP54j1oLEbdk2Y3ozvoEi80cPDEpM8jNEJYayBGWVy\netH6vcDsngmqlSz8TI+nilUmEYbXUzr1MZFpwOa1PMI1yoBLS14l48OKu2s6\naiBusRgDPqIXNhH9EBvb8IKwAkjg3P7o3dikE4aJjE0NK1fdqpK1yNCLiTc7\nrsYiLNkmr5AOZM9ABFUlJxB6NyY0rp8toO84FH4rjYmnSu72kGDAyW8mhdl7\nflMi4bm17/WQ+DaBRkkwUhqdFhBju2HxHOAacdxNKZTJJjOdys7nhrGEg4Xu\nZt3h\r\n=PHSM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"786a532fb72f50ab2c9754de3cf6a56343397995","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.43","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.24-renovate-major-socket-io-packages-786a532fb72f50ab2c9754de3cf6a56343397995_1618149514892_0.4768277269192698","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.24-renovate-non-major-8c5f6052a3bd22018071a6e032725c52dc8906fe":{"name":"@balena/jellyfish-client-sdk","version":"3.2.24-renovate-non-major-8c5f6052a3bd22018071a6e032725c52dc8906fe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.24-renovate-non-major-8c5f6052a3bd22018071a6e032725c52dc8906fe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"448510fb0e34f715de3c9da61db2d33407e8542d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.24-renovate-non-major-8c5f6052a3bd22018071a6e032725c52dc8906fe.tgz","fileCount":39,"integrity":"sha512-VPOHrWIYHlAnk76TCu6VIA06za2vsUw8+JiIs4GfCDVyJXFWkzDC08WJ3kH2BquJhfVv9MW2t47kG5XcyoG/WA==","signatures":[{"sig":"MEYCIQDmgypYsGVAVj1eMOuHw+eFMhwHWxI8Qug5IHNM9MyLuAIhAIffU+zfSUboM9iM61IFT5zFEHrNa8CHvf+1yDVOBTli","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcx8GCRA9TVsSAnZWagAAOekP/1UCphTfCxhWDGlVgfGa\n80DBrCpfrg8k4vGKC6XBxyvYaFyYl0mCUSOVnOWiZeaqrHVAAqhyEMgj/DMO\nvoQFwNIPo4bAu0WlwdzFwXvvUbKjaV9Qp9FUNSlUwZXmXMoxOTRaSerRR7rh\nfWEVq3uI+8Wpr7nqbCmo5CSmTqD05rpqBXPqL2/BiNzPJhHKI7JVYymtCLeh\nvC6Cu7Tx14vEMiBMzJLyhtQ70UCN5yuwTHVca/jKoUpssmrxppnRcv4Onfde\nZEbdOGvaWI2u6NrDeZjXboV/oDYZes9St/KcAcpqVTYjeLCeXIDz+1CP4yuY\ngRWdG/pfXccmQSnJqjp6NeAY2v50TFZ3Reg919/JSiITkUnMrlKT+buCCo6w\nliVbahQjin/lWtg2P2wWuKs5yoyZj50rySZlQ5ySIj2DTUaRq4rKcxMkuqgC\nOng3KZnLHAW0HeLUaOnsWoWcsirKiUk4KNAMZ3TdblLKXtatZyKmLPI0KVoD\n/Lk4XXB+4yoG/zZlQxU9fTQHvoPNqxSYDvwwQT/NGGh0V8dGIMdVyurHqetl\nHYVJBg/0yaoh4mCuLWy3p997AblrJ++z+0aiDbKaNnv0RIbUYrE4DWs+Af3w\nMWsVl6kIrIXiHSrj/zBrMYbl068kjyu3MRPWq+SwBZaQFgdBl98faTps03Ub\nfamv\r\n=nYRB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8c5f6052a3bd22018071a6e032725c52dc8906fe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.44","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.24-renovate-non-major-8c5f6052a3bd22018071a6e032725c52dc8906fe_1618157317348_0.5135937784011044","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.24":{"name":"@balena/jellyfish-client-sdk","version":"3.2.24","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.24","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f773f50e0f0c8f0ba5298eecbc5dfba13aeea657","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.24.tgz","fileCount":39,"integrity":"sha512-RRNpH7GRX94PZFsKUu/P86vRwCmobl5t21mfH05qL1x0NSiBb6OpqGnjsr0ZwhAefQeifAeDofegxASE5ciHFQ==","signatures":[{"sig":"MEQCIGSRc/bGf+rnsZlfPbW3tZgzX85XoVbb28HSu/HN5MoSAiAVhcf/GrpJ08rbbU0vfBO7TXjMdJCOwSnHu31vUqwE8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcx/VCRA9TVsSAnZWagAAZjsP/iK07KF8IMig81/JnXYM\nCz09vaZn3dzs4Zb/s3dpZBlnvgT1nOJs8SmOyjEr9khTNxFH8/IzThhHiqG0\nAFop1bq0Akfbzn5PGsyEBu/2c+vteo8KceMhSuue8uy2zyxkdavAF8VYQ6XY\nWTBIUi3FjsqV86rSDS9gJExn28DsGdBc3GD+vKnKjA+QAaUtNTuXLgPM4Nzr\nqDVbZM0G/TM40uSec/Tv+e037TPMALQ5ejgwaU0G/dUGIdL0abmXp53zPa2t\ndTiRWo0K5iDy6uNKiRbjaQWGTZdme7q52tVbGFsIFT+HKFJSurLc4ENaQsQf\n9YvcPbvp9ia7z9r39xj3B4K1CnqXTtH66DUX47CFo9RiuQceGu/a2o5J+jU6\nCSNjbMgpvmFZqwRUFZa+YYGNro2ETmHehoS7ZEifa3R72HS9UXn7DftKBtYD\nEONuEfhcnUAgzk3MTQe9hVRYVQe+/rEs0uRi0Se6GyIXJk0ReaY/SC7Uc/ES\ntUoYLwkXSnJciTtyoASYg+e9tCeMKDjCHVrGcGc67uhWjOmvZDZ3UqROlVVM\nkh99kb7Synq8/G2noR3HpUwSEk0mpZemQbRsq/oZbAbCtnQkr6d3dbBySIn4\nxCkiAX5kxiqAJxhflMp1vXPF+eOoE6Q/f8h79R6HUSPGyjY7sV/KLSzzSIY1\nETwB\r\n=tWx4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f7d1056a813440c99582e898a692ad3bbfcd83d8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.44","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.24_1618157525393_0.1258943255043805","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.25-renovate-major-socket-io-packages-d89ebd256cdee0979675e7c94da88aaec5eeaa84":{"name":"@balena/jellyfish-client-sdk","version":"3.2.25-renovate-major-socket-io-packages-d89ebd256cdee0979675e7c94da88aaec5eeaa84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.25-renovate-major-socket-io-packages-d89ebd256cdee0979675e7c94da88aaec5eeaa84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"447827c49dfd32c8aee775c8f0989ce7cb68009b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.25-renovate-major-socket-io-packages-d89ebd256cdee0979675e7c94da88aaec5eeaa84.tgz","fileCount":39,"integrity":"sha512-I3w9ZiwC3VUmXO7XBX34kKKSS/1peASK2xgNGcLaJV5x8Ad52CHYRPTQaZp1wQS8DY0a4zviVQ7W8u24tzCRwQ==","signatures":[{"sig":"MEUCIFs+5VgJTQLx6P8gONkd7RXREXNGKhOlmZ7oqNTgKZpCAiEAkOCnddwUphl67AwcFGJfupT15idiQogp9xDhFaTnsn4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcyCLCRA9TVsSAnZWagAAdsgP/2EiNseBkDp95edXqyr7\nJcPxuIqR+tYBUKkWOC7RC9XZwtGngEBuJiaieHwFPPxx/7Ojd9/3rC8HXbHX\nyTOZSTjdQYLTNLxINr9WbtC4Xn45EFluIOme6gpTjRa1me1A19W0qOrp84zr\nxLy7xcnwwSnpyYrzatY69QLAetANFHGoaW2nifdu3QWTah9x3NKyML7Pc4Ak\nP+JwZr8NjTQAG6h52QP/rIK0hzG3Cx7Hlt+ac2fEsBkCKxLAMdej2RIiPYNI\n0aXC5ii3PIigLq6kka6yI4dLQIykSAP3C4Pws/2K5xDVOfbGcThXMzO2Lst7\ni4Q+2+rvTlX9deXQ7KE2BnTenMDwYq2L7VkIK3JqB7dzJVMFlcGjSRVYUMlV\nNEwJQcS/r/W7dihNlQaJbh+DdrY+wdS+zlPhd0tpMKOmw970++jX28340t3B\nRzopzqQFiY54JENUum5xtbjUrLAHXN/NXDBA4r+Ly07i4z22BDWxhpHo0toW\nJOGY+e17RjWa9Acq9DkvEvd4bfIimSkX/jtqYtO91f/10S9larO7eoreQ0bN\nHAJYyFHeKOZpQr4brFOoK2MjHhWCTzPpnnrgN+o8rDojFaYWHHMuON0u7rHt\ne2RyWaq8ucXWlv1g7o/kqVmenXfXRcppMvjKdotopUCHQ3NmPDQobzqzwAfr\nE597\r\n=vhPx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d89ebd256cdee0979675e7c94da88aaec5eeaa84","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.44","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.25-renovate-major-socket-io-packages-d89ebd256cdee0979675e7c94da88aaec5eeaa84_1618157707055_0.4756360093290939","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.25-renovate-non-major-0c66b67998c43d73a012816405e3633c99f1deb4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.25-renovate-non-major-0c66b67998c43d73a012816405e3633c99f1deb4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.25-renovate-non-major-0c66b67998c43d73a012816405e3633c99f1deb4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2f05c71adfbea200d8dfa92664c59f5730d9195b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.25-renovate-non-major-0c66b67998c43d73a012816405e3633c99f1deb4.tgz","fileCount":39,"integrity":"sha512-LSDeoljs15KqsEfzlr+YnAqac833TLI01jYQEs/zbvz/Wiuvoh2fkhgqzB9KT8fUzXmKCTm+/Hw0Nq3LdRaE9A==","signatures":[{"sig":"MEUCID8FdqFpPCJhvb5zAZYM7wUzja/fIYgiqoeTQjV+DQ91AiEA4csW2d82p6fJmyZSgyZYLn6t7okh7EWJPNp1uzmeRnQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgczcZCRA9TVsSAnZWagAAxQYP/jgzX3c2IqGbOqcIrx4N\n4NQFf1/zVhdmy21pQO+iSyLJlmVYqO+orEhRR5xESoDrXA7rawF7tnQS5f15\npsezQLSYmG92EVAIYN9M1THwFlgZQqRGjx9pTZjLy1cZO3w2ZTZz+bf3UQ2e\nFLFi3bZahrHOa0t19wiFD+972G6yOarLiQSjRnT+vdf/byx6slRc/+/0IwYJ\nydnGaq/oEnblMW7MntS6cFSGvsyRZxsEsYXjyJO2dUQFslF3MGYx3OBSkPBY\nYF1vutWodOu9Vo13Kfe7OFbbxJ7mzMNVZf6eIBYSEepS4qwPVhZVUtSNT6uw\nfWvBD9k4N8sExAjEylg63nFJpdE/tbg9/HhlzlmZma5NfqbFjmGGr+E/EbN2\nKJyancvpZ9112tZ2LRpcM9bcVHZiEGk7hgNAGt3zcLm2JRd9AJfFAvBBSAsc\ngvXrH9nXfyCqLOLJNJwj+IRizNC2BKoJUsqKIiHe65gDQ3hgH9TRFEzhUdrx\nunhzpzy/CDyk0bnKrNlKpU/aG1+Q7LAJN/8ltednBHaHq01jR6BuA99VC/+8\nL456N0+pZ4nw6NkW29JzfWT6ZaSClP7hPCEIZz4rmqOt+5dZqPk3qlSo2gQY\nfXnH4WlHpCzMZ5vbK9y3A0EasDNbCtU8HBGN9M5MIOM0eFCugaVlJ7At8uRo\nly/s\r\n=fKRr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0c66b67998c43d73a012816405e3633c99f1deb4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.45","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.25-renovate-non-major-0c66b67998c43d73a012816405e3633c99f1deb4_1618163481185_0.0564260760488946","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.25":{"name":"@balena/jellyfish-client-sdk","version":"3.2.25","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.25","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"03be9a02a1c8d7ed06e43a4877f43b3441438477","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.25.tgz","fileCount":39,"integrity":"sha512-DYPxGzfPf6cEMUd53eyyhiLxBQjsOX/lVtqXzcOIP58RSLc09jqYPKoqpa/bb5COefxBVCF9dLL/o3oMC36IKQ==","signatures":[{"sig":"MEUCIQD9sJDBHUr8HZd54dOPtFGDJYnN3Qod3Nu0quj5vuEYyQIgVJ30YPSY6Um4XQREyD9/sHiB3CEYn5CEielXeE4ZhAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgczgqCRA9TVsSAnZWagAA3qkP/jb9aT5/CFbE04gZ2NAd\noTjzYWwgoxYnQGSWwwXp3fVsOEcqcKxEFSIJ02lscn8+JVqNArToUddc3CWh\na8BRJerpS/++GcIlyk2krWElC5Y6lRAIAlYNZQiUHPqfF3gOmODCUnooupQu\nHvd2Nn9FNqK4nG4j729WyxRPEXsM+Wk8EqylwKWfSsdLZfNXAAGHYX3DNV2v\nPRipVqc4whywpgkv0enD5zxi+sjpSHfjnfaRT+WkAJ3YRhTlaqQlNwU8ygHT\nMbmGsuDV+X2gpxf7mYMp4AAUsU+HOOvMEp6xaaGyT5f3UV+xeDZOgYnqdgRY\nfwbr7EvF89Xl9asfRQ6buCPySs+S/wLPBMzD/wuA01gxXSYDXOCmNq1HVte7\nq1ij/sl+RJRYXF7V4DBeIzSQQLRX4dZxOTnSPFGd4pTzohjkq7cG4nVPmmKs\nUrqt1iCawo2X8Yus+5oW0+8fZT8Xus0UHrc3eNzoHBLJmTowiF1EGWwAr/rd\n4eWEiTcxjtQjw9oYS9MijDW8WwfqpKY17LODR1UexRpm7CwaQfsrYltwjmKS\nbwSG85vePlpYGX+r3hH4DmdPWpJX/5qNqZJJy49t/cTOX9vDSt+NUSRIgP3Y\nsfFuIVjJaPyfRSiROeiO3hV28d0azljJJA7w0/8vNqQPez8EBv1CorDHOf0+\n2Ssk\r\n=xgi4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"54a188b16c601e87e7c9284008321de6900eda32","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.45","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.25_1618163754052_0.14529750497569593","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.26-renovate-major-socket-io-packages-3601fde9baa75cf6146341c39551e01a6ec0c163":{"name":"@balena/jellyfish-client-sdk","version":"3.2.26-renovate-major-socket-io-packages-3601fde9baa75cf6146341c39551e01a6ec0c163","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.26-renovate-major-socket-io-packages-3601fde9baa75cf6146341c39551e01a6ec0c163","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d46e50bfac77ecde8d8a50a0a6402adec95b8ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.26-renovate-major-socket-io-packages-3601fde9baa75cf6146341c39551e01a6ec0c163.tgz","fileCount":39,"integrity":"sha512-g5bMlVX3lzaRTTJzw8oIi0AdjAeiCwQ/hTS1PTr/Ya/mOtNyDGSMq8qoH/Q1SEB8npG5XdP+N2q2qOK3ihZMsA==","signatures":[{"sig":"MEUCIQCzRwSkcdOIS4SQLUNOrFcA0sOOsi1nor55+cA4mWMhWwIgC84w84Ja+mRtXe6WjlXgXvRH0GBTqoB0RSMa7KOjTMI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231754,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgczl7CRA9TVsSAnZWagAA2vUQAI5g5iFqbQl6M2p0DC/v\n6YHxcrtu/tUT6LaGnYF99Vm52ilLl7/O9FQVO8hti3y/UuV9KK6yvSCLWIHu\ng7Lxykpk/2ZFbsotmO0DSZ4FnUcg8V6Hg/HynjB2gsW8Xh1qqiHgGyd+Q1CJ\ndAU4HKsbijqF8FNdfE7MHc8KuUrIYv6C64W7YCvNVo+rNhqF1g0xiOwvffqg\nWHrZ5K8RPV0W/AZZ/TPug/DE2DkaGPIXye4hTGAfOeUJQ8stSoevE3VqLoDr\nIoxEnTj+vpjWEdHSaYSd+GaqOso9zW1b/PspMoOLtUU/fqDg1il4Yq028F7I\nIM0vup0dCbUS0mE+tSlOuXdp6GLUJyluF0MpawtwrgFNvr95PY0aOMtYq959\naYiiak7K54zdYEpfIg/vX22U65HC0ZYGHILLG1woKs/4FCpQgv3ZR5YuNpf4\nFXCqVGxnLcG1w5Bgihszc41BN74u9KbZl1fRQQM6whG2LOTpEK6LxKUPAb5q\nDM37HIn3gbZBa6fZIzKjzedqfeLQuvwNWqPo/pXsNZ3iYiaiLO3T4ikymQ3j\nlbsr8x78PnXZbvheI5Hzwn/6d4jFv+sIeFNjKcTHoxvW/k5uQrPBBlZJ15rY\nzkxS5Npz2hzJjt9l/kWj84foxYd3Pw1ZTTUOr7aoPIxor8vBFb02GiTrgZZ/\noF1A\r\n=xh0u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3601fde9baa75cf6146341c39551e01a6ec0c163","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.45","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.26-renovate-major-socket-io-packages-3601fde9baa75cf6146341c39551e01a6ec0c163_1618164091348_0.2572181757947447","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.26-renovate-non-major-a44182e23c3d15767d28bf4909c9a73508d3789f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.26-renovate-non-major-a44182e23c3d15767d28bf4909c9a73508d3789f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.26-renovate-non-major-a44182e23c3d15767d28bf4909c9a73508d3789f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9197fe94bc87d6ac06bf7f711ae53495933c2ed1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.26-renovate-non-major-a44182e23c3d15767d28bf4909c9a73508d3789f.tgz","fileCount":39,"integrity":"sha512-wISGqGTBwToJN6hqkWPvDWJ4HGcN8wnsMtAFRCWgtWjjTKJafeotC/PXVKteT5rvgD95zDmjuaAbURMZGrdivA==","signatures":[{"sig":"MEYCIQCxOBGxBpP+QF0Dgq9JXIoo0COEo64yJ99XBFLSZTFDzwIhALWGfX4ui2vYp+et3am/r+9tVcE/lEn2BI1qqCnbt9kT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc1MbCRA9TVsSAnZWagAAlAoP/1xU9fnrfBYheWpQ0XVH\nVo1AhKV1qyR06zakZDnj/FicyeAAveCkaST9GoS2fSpapebfHqh44JaPonLW\nOeclQPEtb8TY9nP1oH6ag4Sy7FRQlyiXbU/k5L/H4V6PSLI+AaIDSxudsmzA\nQ/zQCpiAZD/ImqsR4nE5IMjOQS2LDhB1m8gmiChnRyMDDa4PqJwnatmXrIK4\n/8tTAJ5uyXrYUDN7YVSV+vxNtr96vELpFPLnvDUQJHEXl2+I549oJ7woofjW\na7D7iIxsJnGC1HuLPz9R5edZ3WS8j0HWkRfWfvYdA7wo4DHY5SDrysRq/31R\nS3fWLwoSgzS2WFbZH+0aIoTs0+QJp7sqEorM3t2hQebZyUlbuVXCKhTzjXps\nBXgTCNrB8KW5UmL3bau+brUR3kXbxoPJfnptgIV7t9rKBfgtLEWvb4JDAvu1\n+SZhQwoAnQ+yo7N+su0V2Ysu6EFOI0IhQc1p80VRiopdv47Qn/3xd9rx0VW/\nAs1VLIJVm3leM++tpm0wtYHlluGgN2eGIc1pFUCdjY2TA77bFzPAPguW90MY\nsx2IHVnG/M5YLi2mKIP1IxYDQH04KHqMi7he/a7cnA0kI/6WMzB50i7nHlSj\nyRfqT/CIi1P/jByAhtVtAxuLhxduP/L9CQqgiMTIJ559XwN+ygjkjU6IsMoX\nUdqe\r\n=R8J3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a44182e23c3d15767d28bf4909c9a73508d3789f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.46","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.26-renovate-non-major-a44182e23c3d15767d28bf4909c9a73508d3789f_1618170651334_0.04150928210517413","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.26":{"name":"@balena/jellyfish-client-sdk","version":"3.2.26","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.26","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cc0e411d8d0cdcfcab033cf1987ab2429906b183","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.26.tgz","fileCount":39,"integrity":"sha512-KgU5g9gTtGOFn6PO+Q0V7hX2C0JqAqwocDAuOxulh9Iz/COXkCldvxFyV0qbaf126msvXn4AP9BeVP30qlVoig==","signatures":[{"sig":"MEUCIHAh46y/6MA75K7xc5zrvQQkWLA/+una79rMPFiTimUtAiEAnwzoEWaL2n10QjKUpZ+UC1nddXQZHEkqJ1jfIte8d48=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc1PqCRA9TVsSAnZWagAAPJwQAIXlD72BR1S2O40uu+Zl\nm3skZ4CD6saUp5a0HjFw73VVgIhBljns9yEtIBnnjM51xjCu9Y0zStCdO4P4\nmAnNbaMQkH7jpLVUUz8Li+idBTdvB4dNAth/WckVnUDZ5090uOORVW43CRdZ\ntcuXNQ5Z5uuOZHRD5jWq8fj23bkX13ofc310Asnw8Z27nIzWMMafyT5cCV+6\noUv6aGfDCd0wwkNziDn5MLgTjyVsQkWM+RAWmSzmTPr4D0qcxGOWMq/yX7zK\nzYxP+6xpesBydAebV0dLisUmcFXqvgjupYBa/j8le40y4w1/KtZf9KF9vz1k\nKPQ8f30lGrMInCdiSzer+1i3cVsJEtpnX1BzCU8VQPw0LNnMMQDLTkQF275X\nd4FojmlbEmKlxu16a3dCHh/d/cMj1dGd2HwGTXZO7RTKzUlFAy/sbz763BP6\nNNjbze0SeaLrOprDPPx0ANi9lDX9gXV0KFbPtoNTFcAck46Pqi5tyciih+kF\nyBJAJ80ssad3gKzU2harz3H0WU7KnEQiY9d3nIJs3sADHbu0QK2usTZbqRSv\ncn/6M82P5ZSAzkoUf7yBaQZSAIbY9RmRyQEEFoFbWCdypyoKDJKmmkDPSPf7\nNPR+5tYANo72Npjfg/qa1Z35O7l6vZFsgsM4OaAA5gHsB5QKObqxy69OkxOB\nVHuQ\r\n=1rVG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3c4ed63a0bc433a55ebaf04d3b6840487a934304","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.46","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.26_1618170858401_0.4501369207817547","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.27-renovate-major-socket-io-packages-b0b12f0c1402ed1e6b98b2c72c446280aa778a53":{"name":"@balena/jellyfish-client-sdk","version":"3.2.27-renovate-major-socket-io-packages-b0b12f0c1402ed1e6b98b2c72c446280aa778a53","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.27-renovate-major-socket-io-packages-b0b12f0c1402ed1e6b98b2c72c446280aa778a53","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1d7215d4e88477b8ca1334043686af51e4327e52","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.27-renovate-major-socket-io-packages-b0b12f0c1402ed1e6b98b2c72c446280aa778a53.tgz","fileCount":39,"integrity":"sha512-LsRLh4XSx1TASMxQ85Fl9UvIo1J7D3Yc1BjJyGtm9cki445sRnr3Ixb1NgNOJkaKPzcczfpFI66+RSEYlkTIcQ==","signatures":[{"sig":"MEUCIQCLhPivxn7o8oaDhnOXBrhbzQ/3wr8SR9MA7mSKkygXggIgEdt6QvDe/wUxnve8uE7g4rfjQ8uNGR4HNgXqpqCiRsQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc1TKCRA9TVsSAnZWagAAC3kP/jJqOPrcdG8ArWMz5iYJ\n2Zt88aAQWWqNPb55aT8WPPxNrQPRIqVPYbCIL1uOoNhEXXukhSKNYFoSuJ1+\nSJYyt12zwgq6Z13Ge5CRLk8DTxMrjIV/LH/1nO4gnWt5jtZe2plsilI4Jzff\nDe1eRQA0AHyjJ5l5qJyxIf2rK+aOKWfU+UCN76asNRuPTHRUElVT9CSKS6Ex\nyKHzTmYoPWXFhPbZuIXtR7Pw1/Jbnj5tMDkJJi1Kc4hokyZzD9JF91saS+3M\n5hVhwxVDYeijQKTSWP5DrQ1hXBKaJ6sN5Cd7uXrKhL/hyUmJBDJL5cbhWUjv\naMro06EQXhP2u2jeKFNLAPPLwYw0jECHYB2yXvLQ1rMltzuVt6ZJeXCTUnjn\npa1dBCpL0ndzr9EpRHiozvTFN4sE7Zn7/UCL03BO9zOtRFmk0ZlV6ZScQGoO\n9Y6Hl1IYCtdDcJfUgEtAP6LhVZz/nqDamDYizDa4myTh9OoHgn+sAaWnN16q\niQId8Xs6lVnG3M5fVV830Yw7vVZzJvmB2omfPfgLBcVLSf1NEKQp79XYQY4q\n9tSqkEzNy7Wst5+eJYNv1OWGRpzcTTC3f7DQ1UFJGlpjd1zdq9CN7M6cmxye\nLQ/Du920eDQGjYMa04TZS3MvpG8YHedC4kXtu1ncX7wiMe3vNasxta2QJtKW\ntU7Z\r\n=S46r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b0b12f0c1402ed1e6b98b2c72c446280aa778a53","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.46","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.27-renovate-major-socket-io-packages-b0b12f0c1402ed1e6b98b2c72c446280aa778a53_1618171082268_0.14681928537460776","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.27-renovate-non-major-9f5361a09ca99842b3e25050d7796ba0f3bdf8c1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.27-renovate-non-major-9f5361a09ca99842b3e25050d7796ba0f3bdf8c1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.27-renovate-non-major-9f5361a09ca99842b3e25050d7796ba0f3bdf8c1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"46ecc55424be2ae1d1d93e34171f497e405cf24a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.27-renovate-non-major-9f5361a09ca99842b3e25050d7796ba0f3bdf8c1.tgz","fileCount":39,"integrity":"sha512-y/gfVv0JRi+mQjhIYKURtDlGzGeOzhYIniDOnjne1CwiV+WRtvdovYHx9GTkjYkdelEfiFqy3Dnxf37kUNGAbA==","signatures":[{"sig":"MEQCIFvQiacKCNyzzdJtZPGNc7gIvpLlaAb1GrBogxDYQ3rQAiAIuCI6ZdIqRmJ4jZKLPXtvx+otY4ykYsOYyt0c0gBxpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc2SbCRA9TVsSAnZWagAAceMP/if/3WhvwbA2e4QVYMpR\na2d0ShFW4jEGCMj5LELbFxFhiNvVWzWuxJP2AsHEz7dVfm3KahZlp90CT9SG\nlSfFm1tA2Y4Z1MkOIpu6I53hgXgCAuL25yus5p5zGZnajgvmDkrFx9vljG8m\nGCy6Z9K7CKV/M+6r9ssP7E4KnNZB5Z3ypTWMOrByNEgMiMiSm4wj7oihUPvT\nMTA7XF3tq5Q0PrjzUZ4BDP49ab4bATmoRmtnMOmCSH0n8/K6xoDBZzRK5K/D\ncTlMkKPW+yQm5glX3wkqVkFVH4jT6PtXkrpoZ/cBYbniArbgy5S5RM15+FKM\n7gszxuLAj1MLJwEiAtkiRzYs8Kk7Z/x3wv8ic0C+A7WOh9BgnYIj9WoOLvqQ\nZvpEuDAmPxmEOOeiymHBUaQtArWPcxG6naWdjJd6R6TglojjBEznf/whGFva\nED05QtLiCyqfcFXn9MYSm4A7seZzllnuvIBzadUi/dpxr256bcLxoKdE7GaQ\neBDZBaNAUuln0zzDTuwVapApiQ31gTXU/+IuRPwI8AaAYy4FtjOKU+mZfgrW\n5aNQEmNtp2pNtAPYHTOmpJeEdig0B/d9efdNQYiuPzj91CjwhZGKLi5yOSRs\n/zGuxzm8HRJIQzRsUM02Y8FIBJnpph5p4dFxK+VX/5gkTySmko/NzSfuSly0\nODQq\r\n=uA/n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9f5361a09ca99842b3e25050d7796ba0f3bdf8c1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.47","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.27-renovate-non-major-9f5361a09ca99842b3e25050d7796ba0f3bdf8c1_1618175131476_0.9024506668980974","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.27":{"name":"@balena/jellyfish-client-sdk","version":"3.2.27","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.27","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c3e18aec2f4e4e4db193a2a8c107d01da81fad7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.27.tgz","fileCount":39,"integrity":"sha512-SBSLQRqvC0giuyWnow9o1KsXuefmlV1TdBjw5dAS6vXfAzAi+b7UzsnqQSx9erT4PqGd3V4tzkWI+UjwrStKzg==","signatures":[{"sig":"MEUCIAmyMWf7s+gB0WMOqXGhZzr+3zOfg6nXvNvVliKpIVU+AiEAmLH5YmUFElx4eiqAdgi5LlqpsP0a/jSXD4B/DOH3FPY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc2VrCRA9TVsSAnZWagAAaeQQAI0MFbEetvcrV5lXwElf\nt3TVpYr2cgB2VAccK3iPNZtJk/gLiP0oL4Lm+aRSF61fduKIfHrY9MxinujH\nuuu1gLIdeztu1SZyp0Zr1FcK4AV9HFhRVt6is72tqT/EXO2ciqTz6hwaBCqQ\nHOMlnrQp3CRMRvHnCCP3fr28xc2Z/v/At3StdD3B2l1vAEIgo3b093ukXUqo\noivnWKD0q3BmtwRhA9id/mE8i59P9efvvMK71RaTymwPnOpD4HKSUwhOb6TN\nV0uROeVk/FrzLMa75+0ivAHIDCMHE9rysWkYOSVTwKcdcDhxJXWvP/2UcrIv\nSMOS19JmWi4m3aN2zps29Wu9NsWsJd+Db2v6nmAqLLOxladBswap2T7n7ukE\nses9zvRpE3uoYTti5qjxvI7+cZ+Km6VwFskmSRsnKavY4LzmzbHQUrsYIsrh\nCyvNc8REAvmy5o1yf0YyZhxdRcgxTdj1e5/XA8aoTkZV68lqCE6R6pehpPne\ncRTnjQZ3i5ddnTy7pGS3WY1lYPjf48gs0klqaaK173RoDqbJ+iFnFaam1+et\njHAb8MrN4IBd4zvCJF3zG5mbkpkaO3IcQerEii9RqA+8x7CncOr+0KPJpwlk\nTl8dxG+HevlZ9A3pueQMqHjpCFpE/azEHDDzpb8xdGoRbesq0r9pW26mpHJe\ngcdr\r\n=nJtj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9e2884e168b94645b71b90210b7a30728db5a90f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.47","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.27_1618175339026_0.21155621037387262","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.28-renovate-major-socket-io-packages-941a8ede6e5e4229b004d234f412d633cf17b18f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.28-renovate-major-socket-io-packages-941a8ede6e5e4229b004d234f412d633cf17b18f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.28-renovate-major-socket-io-packages-941a8ede6e5e4229b004d234f412d633cf17b18f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"05093d23a3ccdcd1e279d4ef7666856f592f37d5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.28-renovate-major-socket-io-packages-941a8ede6e5e4229b004d234f412d633cf17b18f.tgz","fileCount":39,"integrity":"sha512-QoAiUvc2kwJwPNDVpn/rnPAhrDKa20vzK6N6aSkY0NHAzjYIslfietONbMCA6jO3bDcrHKZKH3vs4FjQUaXYWQ==","signatures":[{"sig":"MEQCIFbZDVnzYEgNIL0SiCR47AhScAetZZ80+O5oAUBizjI/AiBHDngkW59zjQpH5l/v3oU4RYaXjYeTSoQwreapzc5X0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc2cdCRA9TVsSAnZWagAAE2gP/j3bJMOCSxT3ipblJHgI\nEDIy6z4ZtQJydNyt9C1INctHGFRMGX1PBwOY+atljx8Ypv1+iqrYf1IM1e/O\nSAa/wq1Hakf/lY8yiOtQv6HhZSPuy5LJNc3351Ac4Bu3OJ83fSITcPIi0h8e\n8BonBOUstTjnEt5/yUN9IUD3dGsh3fDHeoJN3RBpEkNUvwuUu163iANlOStM\nH3eWN0DUCJofFW8xtEPhbXFEirf7OZ5H+MUTnZ5vX8d8994dAdw1y6JeHnms\njUhptvOju/uDt1L7EI17FwtAStQ5DGYJyPi0N33EXYX7m2CCUO95NOKPVRkA\nZVU5Y3MVe6BoVWRBvwBFk2Qbk9ZrrdjSyli1l/3RzKZnPB+wRcP2Zmp/SVvm\nqez/5iVwuvdIpTJTgD16J7T6pfv9ssCkR0gHEuwkhtrz8r9Au1RBd/d28j42\n04THi/XkeSMZsA9XpGUp3VvwP3rongGXSWEVjcOdfdCflPp8IKJ13lErVHtU\nUtPz9lKc7SLM0Won4JopTLmp2T1QaskH8+1hwxBDcBHPWC6Le/RRzhKQK2ya\nRF6t7gm4fOA2J11036g6seQh89qfi8RDqkMctMbD72JXo4GCeEQi+PnMi/YA\n/mttyPujvvVb4SU60Yl6Go6+0z0bkUzRdT8+cb2jmGwVuUpoLyXcEabA6x8u\nCE7t\r\n=etNc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"941a8ede6e5e4229b004d234f412d633cf17b18f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.47","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.28-renovate-major-socket-io-packages-941a8ede6e5e4229b004d234f412d633cf17b18f_1618175773016_0.3732862745964318","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.28-renovate-non-major-a8efade9004d291589e45ef252390160392eda39":{"name":"@balena/jellyfish-client-sdk","version":"3.2.28-renovate-non-major-a8efade9004d291589e45ef252390160392eda39","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.28-renovate-non-major-a8efade9004d291589e45ef252390160392eda39","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"272cbd6d298b2401f60dd77f091eaf0a2dc2867e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.28-renovate-non-major-a8efade9004d291589e45ef252390160392eda39.tgz","fileCount":39,"integrity":"sha512-fLq6cvX2kRkK2RfFS/JvttzS6kxAb3mocQc23G26hBiJm80LNkXi4Ygp5g+vZl7naPiIj1i3sA3sDYFhZYS2AQ==","signatures":[{"sig":"MEUCIGmhYxamnNJHydlcU4QNeQWrcR4HxsXQk0J1zfHGkxhHAiEAwHR/wPmjwLTQyjKm9oPxp9oCZqoLpmqTQDt5xdZ563E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc6KaCRA9TVsSAnZWagAAEWAP/3LKBLOBQwt+L2jJlRev\nZ3i5UWLgvxyF0enomVIBBCh+yWOu+0H1nGlaJG8dwCkh7QMh3B1I5nQjP/ls\ngh5fmnl7DoL1PKvvYCjhu++SF1EDZYwMavE4IzkSE8GCksHn/3GoRoZ3Abv5\ntPjoph/qO9t85isyMA4xArfAoBtWnC7UlxFPV70mGLaUn8CUIFn7nXXadQIp\nFp8sSx+0Ze6jD8b6CSW+TGnIUzAyS98K2WFlmPCZHn7n+z06cOYkySz7KCAX\n//56KBHIKUL20yl8m2dUVei3brUrs8sW5cAvaM9sZhAY9FAGM0PsMb8znStv\nbXV/eVPDRlRcAlY6mCpUTw6kNxhqdakeQikUoHFggZmT0tar7NX47fZdr3ly\n2AIiGT2EAWmuZVzDVJqehb5ChIMiW+KRLboXRgfa+laWs64K4undzIWNBtfq\ntxiQItyxqQRszUisnpM1o5zskoM4OCsgNvjmdORFxTBTzMOHQf13v5gnLgnq\nvtTbcwSHJ/aun1y6utMDwKT7GrXdJ/GWDaWMRwB1OLwCINBZVPAvSEn18632\nmW25Cpw+zPitpnGXv3qazQ3Gr4HoAkfc6HMXeEb43/p8vzpe18Husp4m9/Ad\nhApZTjU69LUz2e3XVqCnbRlSLYQP1OJieR3PVHGFKty11a47AQizYHe0bUC4\nHgXQ\r\n=Wn8G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a8efade9004d291589e45ef252390160392eda39","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.48","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.28-renovate-non-major-a8efade9004d291589e45ef252390160392eda39_1618191002341_0.6517693566064824","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.28":{"name":"@balena/jellyfish-client-sdk","version":"3.2.28","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.28","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2caa1a6ecb7f2310f4e745d70cc7a8cd0a6b324f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.28.tgz","fileCount":39,"integrity":"sha512-WKQo6UDuiRJu9kUY0WDcBDv/ojoAiCfj7B+yjUlK6BQXddqLkNffPZDegTqdrxaqDXN3bb53LFNZoEAeAbBL9w==","signatures":[{"sig":"MEQCIAtm3nBwV3I1Dodsx+QQDYZRe61SUQh10Fk7CPcpjVd6AiBtz0Y29QdpxRiNhJPW0nUS8obRVSWx98LhbIMFOEdUEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc6OpCRA9TVsSAnZWagAA7bEP/iQa/36nSVbGuXG4IqWH\nLsgsj5TlsDF5Tppf2ZCYCFEyJ9tvEc9Pj/L3zcdp99KdUQ/tUhHwj29P1G/I\n1jAJJWUlX3r0hwfKNA0Ial8iuycCCl+YXExxiIP8IkJEbSDRYsAi746KuIL6\ntYO/jofRHV1EcmeitofLOwtMZBEAxRKHyXrGqcA01QT7ZxsCV9cnOFY5Czxi\n5Smuw+O/YrtW9sxn6vRv0F3o6WpoqOjm1kytVOSzi+D/32lFXNHvmD7SjMxr\nNiKWMDc3Am02kiGFD4RMS2TrqPIkZkU6jm6ZSq/FEV+7tE720iRAYTLnOLgI\njlKwOykL3IHcC3KOheIZXhV4RcW+IjyJI2cANMAw05/4sa7KFqD2X5YE2ufl\nGYDwSSC1tUVXNzfbq12+j8jc3Ts+i5NsMu+QZrrIK5jtnVOC3w4NitlXREOP\nTuEJxqO9qk8a2wd6x1w4dWsTiA4RPg7FWAZCmPA8yGfXHF7UZtp9BHVUkevo\nEL/Tx84ybl2n0ySoZMkYRNWiHYlcx3pMyItPbEdTW7bskfqYjF3yfFl5TY/v\n3kVB4uJPclcfc1jhMfoBp6aB/E/yF5WNaRGNA0m1Hcz3sWpgDz9NBtOae0x7\nSFbzBIP9Bax8mQ65UO5EEgjY6Q+wQWncPNGCS0Z6ixkG28R/90I3zamU2DyS\nGYLT\r\n=E6+5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ecd0a5bb239b7105fc64fc9f73308b0b5a0874e0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.48","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.28_1618191273398_0.27651662332358873","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.29-renovate-major-socket-io-packages-d31094215ba3cf327d5c6b808bb08ca8eac2ecb2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.29-renovate-major-socket-io-packages-d31094215ba3cf327d5c6b808bb08ca8eac2ecb2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.29-renovate-major-socket-io-packages-d31094215ba3cf327d5c6b808bb08ca8eac2ecb2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e2ddbf4fd472373a64df4b506971a773931eb9be","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.29-renovate-major-socket-io-packages-d31094215ba3cf327d5c6b808bb08ca8eac2ecb2.tgz","fileCount":39,"integrity":"sha512-qZhZufi/XrZeCFn1KZT8slxWCtyAxERRPawm9PIAWqYh/zS9pQRiXkBoUMz3vNrdlEhjcRjX7rv956EGevYXTw==","signatures":[{"sig":"MEYCIQCBaUZ5JV6lntglM0txzqExlemP4dzg2XYQvpCU2yJiJwIhAJlXrIM6hOOWfKcXxAy3byVKeIOPLRYS25+BfOf7T4z9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc6UFCRA9TVsSAnZWagAAJ2MQAIkuwNJid6Jh+xirRLFP\n/9ckAs1IP1bdWB7iMX6QzQuYIasRK7iZW6t/Aqk9Z6xGX1in6K04kLxzcjAt\nadV8iC+8vIo5PGLreQuise2a5ESfT4MDrLD3sN0fzQCvKCO5H8TF3OyJlAth\nGmG+O3+zdTpXzM9od4L2aLsY/WYosVZ9/O2E+z+l/zl3vYdHWpd8M8cmGTZk\n+DI7kTC/TWmNIS+R1CJaB8VLbO45HxQes31PLMIfYjYeWG5NndlxxCVpsrXu\n4wCcwYrVUf8JvAHagiHeDARtG9N5sWFztt/FLm7cd3pYgdvGXnt+eKO/Bli1\nYNiMc9HPlIibkfyq2DZlmpmZmoJRQqiMi+HUm+PUdhaHjucSVPQSAbB/4u23\nW4NVHGIV9YVDD7zomrzKAogQcdzbgEWXcF3O6xc3n5CUvbXj0xgtc9xpeRnd\nX6l0QxYQ6h6WVCWy9L/eU13Gu846sp6Wgejy0ftuKuSpCKDuUrY7lTe32wHd\n/obv5J5PnNT8Tjnv8DN6o5iqGXqdH449AYtgYk7AxA6uHZoslObex+5EuuRA\nI2x7uuqa9MVcBp1EQ1XJ6P+L/IXw6kXuNtlTT9G/zoQV39UuQMIeUszk1XiS\nyuerHKq1u4qzcgRhBDM3Hz3Z1bSBvumfahpKHVzZKRbvDpGUEsmgceSZcLpH\nchPc\r\n=m9JR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d31094215ba3cf327d5c6b808bb08ca8eac2ecb2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.48","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.29-renovate-major-socket-io-packages-d31094215ba3cf327d5c6b808bb08ca8eac2ecb2_1618191621356_0.5105740666617025","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.29-renovate-non-major-aafe999a15753a0e8cf6ec8ba3b25bc634802b23":{"name":"@balena/jellyfish-client-sdk","version":"3.2.29-renovate-non-major-aafe999a15753a0e8cf6ec8ba3b25bc634802b23","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.29-renovate-non-major-aafe999a15753a0e8cf6ec8ba3b25bc634802b23","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df5410619fa327385a3af5dd466c65a99db8d118","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.29-renovate-non-major-aafe999a15753a0e8cf6ec8ba3b25bc634802b23.tgz","fileCount":39,"integrity":"sha512-+/LnK6pWVtG3++78EkzS4ELpPRo8sbqEKpmGDOs7GuayFUXjnr4P64AB95jX+6KI6W7W8AopURmgqo342bVaTA==","signatures":[{"sig":"MEUCIQCnVX6o4JlPDlxgQt5NghonlOmRJ5aPVmBgIiwq/iyS3gIgAog4Q1mfRXTVTDCxmGI8lC4mQFvwTXMY7za4bAnAB1k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc8Q0CRA9TVsSAnZWagAAKwsQAI8gTSYLUFn4duNnQrH3\n7ReKYM19OIeZGBeuwiykj4OoIQPccZQ5LWBxBsGq6Zy5Hx/nogx64SUvBENF\naIcU5RwNCmJBeGGaFY+pdaSy7EWtiuTCaL5ycJaDHLL9Q6iOgrypnN1SaZLm\n9LwE1pC5TKURatiV93QVEHTp0mJxmdOTHsh/8DsD/c97+Q2p1Wfksi6vV0zr\nuRv+r+PSsx9Wb4cJItmpOlNp5/yo+EfHQJrKspYnQaJptmgIQT2NnMMFwvYn\nvq8W2sL2jsWj/92WazxiAneBI+sWqBui1xN8n5Rte/FUJ3iiuG/QaFVSGy8d\nBTxREkACCuGjXvW0/q8L2hUMoDHTxyn1yrJwiGI6OPmVbviaZDIhsBhF4/6x\nK7D1o0fCADPmDGfeBCO+com7Av+hNKlh9kEX564vqg1mv94cLNWgOGMaZHqR\nKzjHRvj+qx4aidRJKoUgdXUBr8lvR4JEAN76LuSr6Spag3iESG0D6jvMGeRB\nV28rrhCK/1iMccZpXZb/At7LVygnhP6kvm4HRlBctmVhHWqiamkk4IIavBTr\nPpczU7z/Mq9Y+lCleK6RKyzwk12VLBo5RRHdxsG1EnE6qpcaLm6wrbh6Poy/\nsuWLc0GtiiQ28GbavC24BxPsAZgvXa3/Ct2mRhThREzeZIJq/JHvz2jXBu5/\nxWqk\r\n=c5gt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aafe999a15753a0e8cf6ec8ba3b25bc634802b23","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.49","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.29-renovate-non-major-aafe999a15753a0e8cf6ec8ba3b25bc634802b23_1618199604553_0.6985449035522742","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.29":{"name":"@balena/jellyfish-client-sdk","version":"3.2.29","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.29","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b8a2866e89bf7ec9686ac40a4391a1e95bf568c1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.29.tgz","fileCount":39,"integrity":"sha512-gBWSYS+be5jseKcRxAtB4FXvgaOisrlkLs5ep6eC9xQ5WDF0DJbJIjYw7ceG74pRs6MrSkrKDOM6D+KQfwl6tg==","signatures":[{"sig":"MEUCIQD3QOvrlXUq2phKM2OfswHTYDwssjno/CQJFwiSk/nZwgIgXp7U0859xkBqzEG46JVNUjz5T0hrSWt1hdtPlomqiEU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":231997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc8UNCRA9TVsSAnZWagAAzRIQAKMMZ99HqTcAMoj0BTUh\nHZ5cTZHEB6AJjz6AJXyJCbsTiUpWCiOJqshfFVCe0/YtQdvFu2pTrZGOk2XZ\nHM57rg9WOlS53X8kI/1YNU19OwQuuT2Y7mpT/jVUPIHV4qTZZwbWSxPmU1ni\nAy8fzr+7KNjmkk/CFCsmqoRcCFGuEAuHRpZ8ds3/Gk6USMbTNMVRrZRqejsD\nQ7IyKX+WVlliIoy6BsNb+kuc8ZrxhtP5MqnMLkaUjjz1qkYHgd/Xa7WrBxFh\nE0sGzijsnq5ckkC7vxEsg+wCZ07ojHkvVzufMs7Cq+dSgH88+0EOFt/RYWTw\nBqwBBDMRrpUbAYUNQXyORnKmwEBJTdkx2Yv/AvRowm7RidohtryTZn3r/NRc\n9puy3fBV/AJBnHEGABjm1STWzLPcRGPzbBbl+sOYm4oXidz3a/JObW2jyW81\nNwZBd2ae/wsJJ1VbLLRNWHcKCu7raOUEKJmkYqoDMVp8Vdt3IfBjSG697yrZ\nTAUWKBVtbfvLqCfWocwKywCd5bg7hV5hgK3jiiubo/1ZjvRy73Q2tr4RBKlh\nDWe+TzSRN+BbYwg3K9z63feyfmiMjJlu1MDcLGdpg1wenmDfY2WwV5BEr+9/\noSM25+s5q8ujyXP54NccUz+ajC9L7gIIj2CD0iszMVpJjqnmUz8jTEr4vVta\nrO4M\r\n=fcPx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8cc4eef224f025ec716c4ed092f086359c81b3a1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.49","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.29_1618199821420_0.746698295961481","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.30-renovate-major-socket-io-packages-45afd95f546a8b3d80156671b7066308bfb2282a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.30-renovate-major-socket-io-packages-45afd95f546a8b3d80156671b7066308bfb2282a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.30-renovate-major-socket-io-packages-45afd95f546a8b3d80156671b7066308bfb2282a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"091036f145466773a551474f62528437a25fdb08","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.30-renovate-major-socket-io-packages-45afd95f546a8b3d80156671b7066308bfb2282a.tgz","fileCount":39,"integrity":"sha512-fID+ihvkufHiZClRH8ezPLyCPJ1FallpUMlKHp7cE07ANRW50XIgDLSfFIfnORGJr2DqFpDd3UmP5W84P2GAJA==","signatures":[{"sig":"MEUCIEQiRoDlfjr4S2g953vj2zrtoW4MnYdEWTQLsxZUh1zaAiEAnU5T/Z2WeH2O803iL9UZU4m8FSCy33+DLKH9AiXAJO4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc8aDCRA9TVsSAnZWagAAadIP/2Cvoc+y4XMSoMwVOePi\nC/00DZe5hPDgp8kuef2xM4id1JqDPtrBdB82uyMdH8d6S6JZFxjdKveTEtzl\nU7UaQrSbT4Eu89xlisHij1HEzsebZ3O/9eLYiJkEj6+4fUTzZjZ8vDhV5UTf\n0GiJw5hSY3hhkFKBbyY+3N0BfKwxKvS+DuAp1tMucHS7BLME/YVXWqjJnlJ6\nidoWmnRYEAnqRjQSLVqxEFs+GTCNvYnafAnmUO2hAqp25Vpj+dS3DAP+jDn5\ntmhYKhPKJDa4fIeYS9LgXfSAxljWQibNwcm7JhtrvMy0CvebtymU9PEJWZLw\nsqFLtGgKGz6ljudJBElc5B2twI8pH24Q7vPCkfKNm4BKPaisruqIzQECjywR\nYedu21EOzwyvhWd2BDziJqX+qDq2ViDtSSyT2AR6WgXE312MXGTX+2eF8QVH\nhOcR2r9GBP4YVkIAvRGkCWQYfxeXdu6qyFdesgrm0uqg5PfM/vocjFoSTtke\n3UiTATwKuayK1LxhquiEABsp7PX9mHcSaagSUbkmHr9oW979mRqV+Cj7eehp\nWdpf/mnfeNiXFQSElfcbDHe2afDDrO0h+C8ITPme+hTo6QoQ4UhfuXIIEuQ0\nbFW9W9b6OlHob6CGShS/xPlyjXACGes5734FEHeClYVW3xITq3CXY6fviuGV\nf12T\r\n=re7G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"45afd95f546a8b3d80156671b7066308bfb2282a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.49","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.30-renovate-major-socket-io-packages-45afd95f546a8b3d80156671b7066308bfb2282a_1618200195391_0.5096133069741735","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.30-renovate-non-major-80605ab9dbed78b253a52b2a60f6b659de88c60f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.30-renovate-non-major-80605ab9dbed78b253a52b2a60f6b659de88c60f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.30-renovate-non-major-80605ab9dbed78b253a52b2a60f6b659de88c60f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7144325e3eaf8e3cc6b678ff196b01db2d3f1b71","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.30-renovate-non-major-80605ab9dbed78b253a52b2a60f6b659de88c60f.tgz","fileCount":39,"integrity":"sha512-z1wuX6W/QFYHuiuw98iQqwB2KL31plny2p96WG1030wfp4szfhF/elX77FpTxgfvxw7DBV1tKBik0X+Tzh5RjA==","signatures":[{"sig":"MEUCIGI/oTeOpn7jO48gKGl5b2pz0EsIVTxu0I0xN3tNkkpZAiEAidv/k/2laIKMzYB7UWEjx75pWOTjdnB+jIEuSTVBan8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc9niCRA9TVsSAnZWagAA53AP/A1svsbrtmdZUDeEUVct\nh/AHvCFh0J6kwTJ9KKBWns1AhKMc9e/hN/TgTPjO2Ycl3psJ2pp7bxI+63yB\nCFE5xnm6zsXc6btYw6K6HcCTa1226W5msgWmEMJGwRriZPujVY2tYwE7nNhZ\nh0WyOfdAMsflfgCYF4WdfG6H/21VPnxBpWU31TSkjQkNdMhEfrOV5l9B3VZ9\nB/0WAr1k4gFh0Lg86OTyBB/0j/siTrCL99xI0o2G4Mrt503jwTNM07lLSE86\npwuVVR0qhPk/eYK8f5aHAVUcqwfknnch2wnjaRgvR4yWYeCh3xcXdzEOyXVk\nKf1um1e7CtJHEUpmuC7TuXV+YMHICbdlOB2yjCfb8wltUqLqH8VVTL+azEIL\nyhDbN4Zs4zBKt3nfLWz5RuofKieLHKQMJ6Y2XPDIJE5xstWpZN8MntwJTIEu\nDJbxOpOaT+yABA0Gm6MGOgfyPxigTHsLnBalktCmhJiNUG+yQlhh/Ne5cLsU\nqSX/MCRqdCWo5Y+X/SspoZMBF5sY2jA97FeWilAUS1HSVrK5zqqETMZyqedZ\nUDfNMn40HTuqbU4m32tXsw7R1RpzLh/n0BLBHXPUb8JW2n6+G/35ZFtCVy2Y\npebmdAdPQHjMIaqm79boQivMAg94VovltGWuMuUcAfGk4rfnzWEoUQTTjhLo\nwue9\r\n=oFp/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"80605ab9dbed78b253a52b2a60f6b659de88c60f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.50","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.30-renovate-non-major-80605ab9dbed78b253a52b2a60f6b659de88c60f_1618205153747_0.9250899037572289","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.30":{"name":"@balena/jellyfish-client-sdk","version":"3.2.30","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.30","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cad568b23da1740719ecb050b97ad7afc4756c39","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.30.tgz","fileCount":39,"integrity":"sha512-dio+vcRZMan42vXD4k5B+Q1dXNj1PrU/jmqWZO8z8LIEnPFzFPUA65gT0B0x9gP4CuH669NErsp9nRKSdxlM+g==","signatures":[{"sig":"MEQCIG+mn/Z0gVu1ewdfvEvxfNtdNR8oz4GL/tSe5vdJ5dNLAiAueAWiOiklnMggfZHO4no/2G1PAdNu0k6i4F2xlZkrDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc9ryCRA9TVsSAnZWagAAuQAP/1dhMGJ2/vV6ZMKR30WP\nASD6Ed1Kc9jacrvMwXLFJmf27iJ6tNb7BZkYhkj8sNEG2z/QtSffu3ugFyUL\nB3NEXBa5UrdUnGUmcZ4t+yDM1VUPxxo7V7eULx/Ljv4XfJ/+6/czB0gHmH19\n3Y7XVOqsPI9l0uOhbYnI30u5YOBL77UiOh6ptkpSxyUTCQiaVEdVPAy5dzSN\n6Lx6BKg6ctLsJi5vx7OB/d6ZGwJbkPCvYu8v6A/HJlccZM6Hnj8aUuTSQrJX\n7eC/+1E3+X0PPzg2LxqSySKbrSD6CA4bmtztGXc63vT28Jq+ZgluCwo0Q6tr\n75eLFvwLcFf055ocruiC96vZWR5OuxKvCYTe+71rzT8bAamMoG0FdzSUgQvv\ndrzqMVyASBzjpwn2NZKWpVrY4Smwol/e5VFxUURuJrJjtGW7lCcjAVUShH8/\nEq6b3rsktdkDHOteJWPQb43cO/SrZLEQ/pIZghq6RckY8jMus8umr3XL0REQ\njQbFzLMCLVn/aaBb5v9d0gW2EitjZOKqheFYb9bXfiIdNRSfeMREztU9dInk\nKwbNvCglMqpuVqBvWwJFME9UHKIElVQIOC0urcw2tp7zhbadPb/DgUs4eYc6\ngWNY7Kl4+UZsfS2kdp6ixtEKgNX02z8sJKUvPt1NdXEjFQDthFnDGUcXlNMR\nvyE5\r\n=ijhP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"196dfad6faae21434e2036dfee934430dd6c4cb0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.50","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.30_1618205426268_0.9671850293006621","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.31-renovate-major-socket-io-packages-cbac1acca3adbc3feebeba5f00b68b815b5d6331":{"name":"@balena/jellyfish-client-sdk","version":"3.2.31-renovate-major-socket-io-packages-cbac1acca3adbc3feebeba5f00b68b815b5d6331","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.31-renovate-major-socket-io-packages-cbac1acca3adbc3feebeba5f00b68b815b5d6331","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"614d4a0bcef2d109d51c7c180b6731ada16c5629","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.31-renovate-major-socket-io-packages-cbac1acca3adbc3feebeba5f00b68b815b5d6331.tgz","fileCount":39,"integrity":"sha512-VdwsfeKI7flK1seUJIbRrgQgma/b2cf99a2hwIMezBgSSudf6CXtEeykhZAQvGolqcXA2RW9E1Zhd9OFhRagcA==","signatures":[{"sig":"MEUCIQCqF7df/VPFPg3tgFjhgyZUyalmd9iLLsmfZn91gsh8CQIgXbdI8M+AnsefYAHudhgADCTGCivryql7l5zu2ngjPbU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgc9v2CRA9TVsSAnZWagAA5aUQAIQxE4hjBDkj67jJutBb\niol0jFjCxRNQkMrkS9n28TlhMp3gf8UXZ2VcYAUoJJeKVr2vR7rQKSaANBYA\nGMZ94wOgsdwdjQmCxzfsSigTUViQ92VFvVZQ7jGAgf+kA6Pkj8iv0cTYwjXZ\nwd1iuuRdExadAfNWlP59kTMtNU1cl8mY8Fa/wu637vd9O1DxoBzeOGiklElc\nJ6hX7cV4MrMCZLOupN03zF72IEviiMPLyUWr1Pct7ncrLjlKjxDB5etbJzG+\n3Ou/9WfR1mPItn75IF2UkLDLTP/72rMNrV7ovLZxgwrwRaSmHVH7dIGjRSjt\ngRPZs6Y+2hnKkx0cc7ydfIsT9dLXiEqLHsiPrumt82A8/j2OcW5cMe1uJfFq\nouDmbh++wSpjavCKzv/1rv6hpiJxuU1oN+RS4P6U19OMwqhZ2lP4F/w+X/iZ\nqUNgX8uXfgFZG2CLp0iWM613J8nKXUuzn3SKv8xGlZ+3GaKtbPVGDLRdqGmj\n103RfS3Wbok7XY8D2BccA5qokRshXqYocYvglE67rYYJOyXLCxm5kVwO5umb\ndMlwDKax3CSnAdX/gWMHOWgtiAkbC9uwnjIdG1isV50MYanX7byV0yWw3YPw\nOiV6UwoPHFstd30lKofbf9SQYw4YAVZFCcTJwl6JI8kkqO7Y/wQhKXxFU9Ag\nhQlZ\r\n=EkFM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cbac1acca3adbc3feebeba5f00b68b815b5d6331","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.50","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.31-renovate-major-socket-io-packages-cbac1acca3adbc3feebeba5f00b68b815b5d6331_1618205685822_0.10541311822990673","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.31-renovate-non-major-2a769f070aee0598187c8f0c3a87135bcc565b53":{"name":"@balena/jellyfish-client-sdk","version":"3.2.31-renovate-non-major-2a769f070aee0598187c8f0c3a87135bcc565b53","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.31-renovate-non-major-2a769f070aee0598187c8f0c3a87135bcc565b53","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"36d05979c8433019b31efb19490b954e3b9175c3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.31-renovate-non-major-2a769f070aee0598187c8f0c3a87135bcc565b53.tgz","fileCount":39,"integrity":"sha512-bCU8B+E17EKK1IIwW0y3Axvcd0+P8RylWAMOKlui1/dh8gAqnmE4eRWJgUZsjsI6SQtyzt7hfIOp0Ne316XN/Q==","signatures":[{"sig":"MEUCIQDZDiOGH01vEUA/UKqZFN71DkaAynWwHR5AS5QAIm4/wQIgKUthbuL1zgn9mrn79IbmcDFpWV4YJL3nY396dRrndLE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdA/hCRA9TVsSAnZWagAA6TgP/0MakgYRwaYm7uksgB6K\nLbu7co5rPSzg508T97yGJpmsNAopVVx+0X7iz7MsOnxfY/wIm8nKhI/xhXjq\nwiVZbRS6wAGANQPlnixevbr56IR3FJVe82j6UjnAtDNY+NXUws++YpKuMhCH\nModTYyBB0Mq+tyFBTHk0AW4vPOWXm0/y/4iODJoTy08fkxBXQHwjy/+OhimF\nLW4fXESrczTeeZYWB3kjFcgCFejbBNuiCCvICuq7czZf5ylvGd9MPhZwiWIu\nZAIKwDlt8ihi2oVMmwFaMVyoCwYNv8jq++1z2M0MG+n+6YsdLLUUR3CJWfo9\nm+REI+VqAnKExkEfTgQoxyLKUKIW1QsPrd+VwWIamlrygcCNmASP+wzVn/mr\ndba27/aGSl4p1aKqK7o/QXtuofop0GC2AABDKKouY/jR4qMn0NVMHKm2varY\nYevPz6q1UemDLKUGRUnxhH2ODKx4OZrtpzSrh7wtCzVxF4KdcWPDEoe+4TW+\nfw1PIysNMR6K45W2UC+tTRNMa1sCTgVG82nkc+a+aS5/OVjy5iV9ym6xj9aa\njrdrTePJPPDlOiCm8hqeH4Y0hL2ckdXp0MXWiEC65JlYnqA2Ll17T6iXTbTb\nGXwSr3d6s8kV++nb9IyUoj8caye28RL2neq5fBNvooCb5jIy5PyBNK4DVD8M\nXaLg\r\n=KFMZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2a769f070aee0598187c8f0c3a87135bcc565b53","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.51","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.31-renovate-non-major-2a769f070aee0598187c8f0c3a87135bcc565b53_1618218977039_0.291046677094275","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.31":{"name":"@balena/jellyfish-client-sdk","version":"3.2.31","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.31","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"748c70fc0b637dbbed3cf275f5ee5b248c89e981","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.31.tgz","fileCount":39,"integrity":"sha512-TXB1pIZGcU73FQDkd3P7MRtAn9IJGuPG/v+pfYBO6CTcQr+gzQnggaBRiBL3qwCth1u2y4n4RoT45wzBMFkH2w==","signatures":[{"sig":"MEUCICfdR04126rGIbYwlqPmnRgU/UaPQ6EE54f2vYCacL3pAiEA+9yzDv+4EEPelZWh+bmVQpeSXqrUf1xoDGQIcwqovQM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdBDiCRA9TVsSAnZWagAAxPMQAIV066yDNXLo1r3q2yok\nw5ZN3bBfEt0NQkF/529zDEF2Mg4uly4c8P0HQeJJxPM+fN//2kgtUYhbMYEW\nvSV9uofCVSgRZ8mH3MQmX8XyFsDaYGPlpSJvHvZho07Ri4y3NWp5R7jUXSIA\n7Y0BUYDHkd2OIFiyP6YrmSxA1Y5tpzUmf6JQbxS3GvnEsQ0tZPJOHrUtaIkD\nH0bHAWDdshTdglgPC5+vLfZXK8G96qlLpqjL/XlyeTa8oQK1t0t5BPMfEzuU\nbvwNb0x5FBO+y0c9xnNWZNzGyp//C0TmetGlQ+K1vqKyQvhOXw2RdMgqFmn7\n/32CEqDtn+CcqmrvbHvbwNbBx0Q76n5XD3zMzAdIglJpqx7xT11ZPxNKixTG\nDRHpwFOhLnA/2yPgU8FABKWcZJEZwKGrFJoUSsqejYOn5C1FC20tzjn9gxB5\ndTGYDETlVfYXPvh9UTF1558UnEbUM5mXyxgZbzfBmRYqogcMwn2E61N1WM1B\nAHgt1cfv6X5yUsxkgzJGSHrnnVUN4WOCht7wqKXfOGZpgvXEF8LuFo3lSpi5\nKBsq74HfAjJDwIyIRX47d00ARlIQik1HGMOH7GpEe2qHHVki7a7AN0eFgXT5\nNCH1WR/wkn7Qkz7Fb2hS+lydz7pe3rBlLFLd/GIokfL4Zb/Q3Scm1KDOsGLb\nCovg\r\n=04aK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2d6e6a5b6e7c20fd5d7de5ead17ee4a0f426bc23","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.51","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.31_1618219233563_0.9074572028318875","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.32-renovate-major-socket-io-packages-f3311a9da1f0a5bacd433055840d0a8c17116841":{"name":"@balena/jellyfish-client-sdk","version":"3.2.32-renovate-major-socket-io-packages-f3311a9da1f0a5bacd433055840d0a8c17116841","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.32-renovate-major-socket-io-packages-f3311a9da1f0a5bacd433055840d0a8c17116841","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f60a792f8f25b72ab953682e4a2f14990fc09619","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.32-renovate-major-socket-io-packages-f3311a9da1f0a5bacd433055840d0a8c17116841.tgz","fileCount":39,"integrity":"sha512-ZmGVw0BRn3RT7CGMR1jeuDxjNLM1WsV7XAq9k32YddvkoITcUerCplQRWU0Nn20SF6NpVLO145saz+YjOrG4tQ==","signatures":[{"sig":"MEQCIG1eRf+KaEftvMXLCuMsxIGFLNZoNEcYEzpLRxOdfWmQAiA1/8OZuByzI0AF8tMHDccYM4QSYndrVDiadSpk/gmTgQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdBF6CRA9TVsSAnZWagAAFDUQAJqYgGeig0GvwUgTziBk\nXKQWeeZxJ3BQ3YgcWXABKmW3dC4RGPUoKclbdiMIrHxWebdbjoY6ftCtV3dc\n4Wy+IUZi8VbDUUjKBiHsAg2jJTtNOAqtVscBo/JRh7k8NZDuDBAYQSY+AA0Y\n+K2VR09WcJw4P3OgHdu8Vr/5GGo4e3j2THRvy+KQ1EiVrfVmuEHeHH7DYp7U\nIvHv6eCR1fwKO67yduBfiw894X9tMRsFSpcnH8HRqF7QIZpLerqjsk4SOQcC\nQVdCaqUFDYNEUzLJp/qFL2vXJSF2kr+oVAEkz3tC+8Whd3C5/mZdkTR4okZs\nOIVIq1R6U7ufEdw2NjtcyEuVA/X1rJsgkLuBuwPTIPhKzAFfiXxDbHNoxdVI\nVfOrIibodSWZjpxmk6SV/Z0WYJQk2F5QnV27mzP7L4h01tLWEcS53NGcS1P3\nNNWsQb6GZLR2T1Qucoog80kN/Q7l5agMi8/SPIEBqT4jmR03KepPcQVoQS0v\n/v4FSqOVOME2VazCzzFga9OozDvKPI56GAW/1yJBdwXTqYr0tkUU8XV+aBAQ\nliIXv4POFNsWbybuA6gIpIYD+SdU1igqRsfp98Uj4/2mNlqxlQrpJ5cLaiAp\nIoRjwSIMsNJylxtPYEre8wsIQKjfTtDn3vnF7D3iUOJatZWBL0lSbET1Cv48\n70Q1\r\n=YSB/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f3311a9da1f0a5bacd433055840d0a8c17116841","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.51","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.32-renovate-major-socket-io-packages-f3311a9da1f0a5bacd433055840d0a8c17116841_1618219385513_0.02456262609470139","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.32-renovate-non-major-38a03a1769f3d82e0ae50b8db3003246df295764":{"name":"@balena/jellyfish-client-sdk","version":"3.2.32-renovate-non-major-38a03a1769f3d82e0ae50b8db3003246df295764","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.32-renovate-non-major-38a03a1769f3d82e0ae50b8db3003246df295764","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e4c572889b8ad0206a3320da9d12f57965074567","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.32-renovate-non-major-38a03a1769f3d82e0ae50b8db3003246df295764.tgz","fileCount":39,"integrity":"sha512-qoF7aKxhTs1kzLbxDJB8gWKq+CZ9gyCfYpYIdumoeLjd049caYLeKhPAAq5/qTG3Q0LsXnXt4WhUnbM2EzvL5g==","signatures":[{"sig":"MEUCIDzy2Qx3EG6ZZEf5guQ8uQ/gd3LyAIQjsxKJIBwnLHC4AiEAkpWQTNhljp3BkEU+uY5j83qyULAngGuzM1uQh0PpoeE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdCZNCRA9TVsSAnZWagAAMdwQAJ7GUWumJfOdekWOJebX\nXbsIBBRF8n0ueE93b+qKqSvHNhTSTQnL3DlCIhMzZPxLN73lZ7PtwSjuuxHt\nL41qxlwxHYJBToMIrobtYLLzOyWorqZJkOtgu8rYUDzAUQsmpBx8XzfZitA1\nP9z5I1VSlol6ZabWeTvNywy0DyZ+Lzc1e3D4938sWZ+R/WM8EwneaSRo6vQC\nvJcY9pGaKD76qCG9zD6waFzPcgJY6cliWYLHr5UYblyMe4Zc54whfNESB9dn\nr0l256Xv3/1XJ0fhHAmEA1EeTzc624+Uwx7Ly1jLvEwOt41Ndb77BrdB/WW3\n9cc1uf8GEvpZ41M4yo6r8+eiAOsmOcUSMoiJyVopvN7peyoViSy4q0kY45CT\nz0YuqKmS2mWFNUJNh+T0wY+MzqYQgjhNc/HQJ2eY3HrHYfWaSbLYC5ihASj1\ndU4zLRecVOQM2HbcU+CiKRpseuBgqtNVVHmMMYEv0fktMh9ABpLrrfzVjo4w\n443TO2sXwDFMiJ4POklIJ+hbsY6etaLh7S6hPn/bcoys4gTd8QkDfmyRBcFd\nbjW/kDTZptm3B8+pNluxzTqFw7sWZxNbqVa8KQ13iWmdrZHTEzvjaXlINuve\nPwn86FNkpiBmVwW85X5pOyNmDK16NG0GRaTPFbSxakDV1Zc6q/8rit9qPJdS\nC0S0\r\n=0ucB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"38a03a1769f3d82e0ae50b8db3003246df295764","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.52","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.32-renovate-non-major-38a03a1769f3d82e0ae50b8db3003246df295764_1618224716440_0.9517339430613705","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.32":{"name":"@balena/jellyfish-client-sdk","version":"3.2.32","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.32","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"29330787829b46d8b71a463b8ffeaeac538ef5c9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.32.tgz","fileCount":39,"integrity":"sha512-u6MC7XPYORsMapCQLk0h1lZ1UdYtuI7GviYbbtCwcSHbsan2SFM1kHjNnEc5Lfoge42BckM/Vb5u3tKPbWVn1A==","signatures":[{"sig":"MEQCIFdizrHA7031gFSI3vPFDu0yVSO+1ndAE5FkBKtpyKUYAiBQPx3Ce7X6Axw5Qwzi90XSdT9CoNyFElNHGEcAMviLpw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdCcwCRA9TVsSAnZWagAAMhMQAJZ+YokITR/u0NZ773gv\nZRBtJ+Wl7ayalp+ptrVZb6IMmx/2PQ9sgh+1vL7lLGCGwT6sutxb4Gx8HTMm\n+gVxPJH0E8mduKRcMxwXCAg6a7Dtl8dfL8LX/bGndHv2VH320MMt1izprEWL\nYDpF88M3b7nt0r7vUR76ztQ0Vp/kNJtxazvFNB1V1A3L5gXi9ywx1Iyij/tY\nEP+qhOnVeuGibg1u1P+g2/stXNaGLaZK/ejuapH3qUyuYTpeo26HKRROy5Jq\n02eCAvhGIwsak4ki8pAfLNl3bOgB/VbSRmz0Le2gX9MJ3vqsiad40CXANMyS\nLpv4nAKBxcE6usOBKXYKYDB8SSIEyv6ij+J+foC0SVMihnzmzv3MGp4lWl0B\njYFmHdQ3q1zf3msrPFL7KCX0J/ETyoKNB4q9WjD8eTDNypG7jkkW7NZ9w/xz\nNpl7tu482PZlV0bhoEOKUI0PeBTCSrnayzTdih+lXA/JbwzuwyrApkiEeDbb\nJVg0FdaRpyy3Hc6agZanGUamSfJ8fdg8PF6s/Yt3hLoq8mGfu/ziNVF0zXod\nTxgK6mEaB+aG0v4fwR/AZJVf5SdC0oM+RZgeCNmta/NCVH6ZzMpol3NAmPD3\nY5XsF67LsVhZJCFkITOprGM6/uWkF96mV53IWpapr4mwI5Mmr47AcRN0KT2l\n4ndv\r\n=qeaF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"22fd1ff8e718a50536a632b0d6de671162f30a09","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.52","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.32_1618224943846_0.289013117379477","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.33-renovate-major-socket-io-packages-547dbca75a6ede06a180e641f25bb09829228ecc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.33-renovate-major-socket-io-packages-547dbca75a6ede06a180e641f25bb09829228ecc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.33-renovate-major-socket-io-packages-547dbca75a6ede06a180e641f25bb09829228ecc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0cb3f870bfa4e88b9e88a0b8a3d295f6f081b807","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.33-renovate-major-socket-io-packages-547dbca75a6ede06a180e641f25bb09829228ecc.tgz","fileCount":39,"integrity":"sha512-3wn9zVyI0O9PQkgMwqPqD0rOGjr2HKfwhRK50tx0PV4zAeHEmlQ5yhqymldj2BlO+6Qq5RXTvyAHLuPfWBJ8Zw==","signatures":[{"sig":"MEUCIQC9jNQYuyWRqXsn3AuIDQ5ih30sU+yoc2s7SnMmGzimvwIgQPwbbeYw9bFWxeUmAHy74wlEHnfDz/YfDI9/ST47Fl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232468,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdCfnCRA9TVsSAnZWagAAE3sP/R5SSmrMaBB2vDd8kNsV\n4utrjX8guTB+l8L+ePgZDpXgvcrxLdXDrXhXfaoq0timhq+VZBpAnKAsFSRE\nhao4UZ28BQzHFiSXWJ+wetdERCTIvCNsfhQK8DVAjhFuPDI3pXTHyjue6qUt\n70grooMWVJlZrvqnTOtQopQxGuXv62w9Y3EakGKDiv5QoVBEn+J0Mq+lneYk\naZOWy14bYY2ibeSk8ybC1MjSfIhdBj0si0u+ZFmf0uL7cgPkJiu8yXqvJuhX\nXcRMoFU3qqMUhJGerBdgQK70RFWdTte4MC6Enm3AMErE3JZp1VOWTjqSZkB3\nx/la1zyq7RY/bU7YG8aOOqqo3Mh8eHccQpVE2yFegWGH6ahaKCKCoMV2Dy7Q\nY7tx/PlWCRsaQC8QZRCUNbLnrsgSvlgHgJfpH5izTiOuFjxZD/RdH/pzfacS\naeHZZ+7efQyWrZqMXBmZc15vNLDcCgchIiBiIiN8baNSPkEOUc9J1+2dFwBb\n2w7ZDQJMnv2HWdOeMVMnonkFAufPEnhLhayNewNc85R1AMapfXaH2ttinMWk\nIV4txOyazXct5vlMyUqfr3OojU9XfdiYyc6EcKsKrrgcLnfp4gFapRAvLTk6\njdup4fPW6cJ0oHlIc116sfwu1xjcrSqT9OOJqCuZks1rNVALmVBhKh7bL+bQ\nnpYZ\r\n=PHJU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"547dbca75a6ede06a180e641f25bb09829228ecc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.52","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.33-renovate-major-socket-io-packages-547dbca75a6ede06a180e641f25bb09829228ecc_1618225126550_0.10632929044724082","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.33-renovate-non-major-1540fe8275a2ec912e2740743796e76e227f5953":{"name":"@balena/jellyfish-client-sdk","version":"3.2.33-renovate-non-major-1540fe8275a2ec912e2740743796e76e227f5953","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.33-renovate-non-major-1540fe8275a2ec912e2740743796e76e227f5953","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"103e800efb0f3aeef177409d691b036050560b5e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.33-renovate-non-major-1540fe8275a2ec912e2740743796e76e227f5953.tgz","fileCount":39,"integrity":"sha512-kYwTPhtmVoTYx5VGVc5egjYrOs8zYCFhl+0A+LmOV7ly3T7P2YLcaGYNqRt8/VUNb6UCDBkSbMthTtSch/KUvg==","signatures":[{"sig":"MEQCIHYUiJ78f6npTn5mbDYM4IP1HUHQi1hAuBizMJO4fF7zAiAD1+eWALDkrbWP+ZCaBxWLMCRgj0vzeMIUHX30ZpssQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdE21CRA9TVsSAnZWagAAK6MQAJHjxbhK2tawNdwlBsJn\nhK63TEaKNi1UN0JEPBbN93Bzb1sN2c5xivKGd3gJUPDMvZN8YCDqqN9xey99\nn+f4SCqtis9JYlqAnXwyGfwQI5z6BoUiIN3yu4ZJEccElrml27K7OlYMZiMe\nNu33+l6vDC0NMWJYjOw1eDvLgzRG3FtPUJlIa2ZB1TgkRqQuZ+Cs3dixdxLW\nTDD1I260EeoyYT/Bn9eHHpCzpjzWOYNuic1MNbxNizFH569UHQ/AEfWg0Tt7\nd70lZGST1TBMZwnTjLBynyfPDQEoT01NgrOINC4hsy4TaZDuQ6VkUu/0yH45\n6EMw3xYyPa72nnUfh68nzp0wuPAUNbfJTvb/BMsokJKG3OJMN1xY8XgZ3uXm\nOKm/gnKawVci162PSqqREBaRqWCeElgH64YfBgQc+bCcKQ1QDLmUFJsdB1WW\nkpO5I6iRjYHOYgT8agPwy/T1/f5WhAx6RI31UikPRi9rWO5bMpnqWFfrcPrS\nR+GO/XYa9WeuPPhPioWMB2rIGR1gOCOE2ko8Mr3HJnov8tYY8RklfBZ3y+8w\nhIkNTSQ5O6Iwx+FxOVlKK1ISzZtJl26Y8AkexkjjlLrQ4zcMouDg6XUh9/f5\nfcAkSJPHnOCg/Av1Oe1n+WlX/FTNcsCRWAoboelh/wMqR6NqJuFJ1Y3LkURl\nE0kX\r\n=4bRr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1540fe8275a2ec912e2740743796e76e227f5953","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.53","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.33-renovate-non-major-1540fe8275a2ec912e2740743796e76e227f5953_1618234805079_0.43122168186112253","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.33":{"name":"@balena/jellyfish-client-sdk","version":"3.2.33","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.33","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c438a7d8c3e9f7435c8c31da64ff910e09672555","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.33.tgz","fileCount":39,"integrity":"sha512-J2uJ76OOEfoB7QFL2M8BB4N3lBc+7SK5UcYGgRqgJRfT9QVb8J+KIXeXHKghIfvJYLEIDELCfuj2t79HzW16fA==","signatures":[{"sig":"MEQCIHKuOr3RqQUR3D0tnk7YOH2XASvtDYnp58cMLkTHrsWAAiBi/7s+UY+b6MfBShKFG+M6t1WjxwUu53ummSDg1GKDAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdE6qCRA9TVsSAnZWagAAn68P/35+0yQyULML8+c2hGZo\n4OvN/12JDdW8sDNMSLFZUQHN0XS5yyNrkwjirBzx9tE+FRXhgAA48HIQ7XO9\nTp8i62QHCjGotDm9RZ3qd2bNn17ersq1QnBfHkBx9l7zsrzFTvwJQSByVkMB\nZ/9f0TfuSBCskQZ4uJibjCOoKMxoMonYyY0KIgDlgwYFphS2FSBki6ZbBSUm\nfpxve0bYpraQh28i3qpuMO9RzspCbch3oBhkkohhlnZCd3GFPN7jNw2aYl7d\nEm2ZoCHoLEyVGv8bQlJ/yxeImN9pB4is06hn+S8okABrKW6TaQYf5oLeuV0a\nL4uoiHTk9RhcNrh+u9jBZR+Eb5nhQ8m5NY2VuZ2DGal6/QwiVEygTqn46qMf\nOzTVWUUQINUlpYXZ+1G0A5qVjdJ3SRsdH3w3yqYT+bS5cFGHR4eI73sCdn1/\ngCYCB91lFDa/m360Gu5XppYdjxdpwP5zT6iEQ2aKl6MH05Ip+HrQBbJ46nFh\nL/OGDAfpObazOKmGjN+tYqACvFz0PkYh+W5dTWR+qY8+Lvnwzer1bJ7Y4x6a\nGxEfm2NyEC+1F6mY3e+LlE3uESXbaF71cXGnc6fO15dFjNmTcEjtUPej0Rql\niDOaoS3AjpJ2mIPZecNzsqxz9xZfEZkbSfu2j4jaTbL6lXe03xqB+whPfAME\nPCKO\r\n=w88b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a20115e45c44db5c97873d30bdc600cd0044d30e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.53","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.33_1618235050006_0.8496812092557819","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.34-renovate-major-socket-io-packages-42f5f3dceaf51b9baaa6d31651ff75053aacb30a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.34-renovate-major-socket-io-packages-42f5f3dceaf51b9baaa6d31651ff75053aacb30a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.34-renovate-major-socket-io-packages-42f5f3dceaf51b9baaa6d31651ff75053aacb30a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8bce8a87035dfb3309a498113a09765d57604352","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.34-renovate-major-socket-io-packages-42f5f3dceaf51b9baaa6d31651ff75053aacb30a.tgz","fileCount":39,"integrity":"sha512-ork8LsQj99sBsDDgJu12QF0KXxZZVTQ6bB/PnSFW7VFLrCV+S8FMsaBaqFqn23vBeOKrbnEdzCyZ6OiseqHmMA==","signatures":[{"sig":"MEUCIGHvsycEYHFFjXceAYhyIKg5o1GhObIdkZ5rug7FtJGQAiEAirA+m9wmHVb1Gwa647JyMP9PEx0s2XVleUXzNezFNuQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdE9nCRA9TVsSAnZWagAAsLMP/3N0tW92U/njJxdH2ed9\nld/qr5OwT0wUTe851WgjnBXVLHQFTWcs6FyOjRFPQHZoBeQKOCsp/5muTjjL\nozGqCstAEjfSPaI+UpX8vqRrOsEkcMCWO/ZQfH1I6ObNpnvCOM/jgbmAURHS\nGfOBHzzZQQ0ascLevJzYb1D99dGobzjGSQERPMmT5xVja/yCnpwIblmfD8s/\njWHsKwXZiBVVIkxeljlhGcKs9LyDM2kHbPq/4qb5CUiJoRrfjysjqDWln04Y\nfjRxzbgI9A+fc5IzAv8CWNQgRZI5ivXedtRAd1f54/eFjvJw124RGDmNJUBM\nsyUZf47jS9wSKJKbJDntwbY6pbArhBduUHwnkRym1G6a9HpYKHxkEVo0wbXa\n75+uZlYT9kiXmIrpz2QhEH7/DAb/4Cu6cFRF7eMts67fZFAq2hnuahwqNHiv\nNi1LdNrXOkiKZmUXwrOFUYD3Wv26v4DYiBcjhBxqkFSKYypKb+yIu9K0Se9t\ny7b81BFlWZHs7RisWR6cOPRpFZql3J5UIzdbQgJSlTVpTG9W1ypMprLNXhGa\n9jCjLABymXpuUkGa7QNPr91yH0mcrYUwuh+TLlW2mkIBHZVShnrbFxnOnRK3\nOf/nZkuTpRq+8H5Qm4S0mhao+KJPVH01YEybj1j0FZ/xDZDXSjIWMhTOLZvL\n8x3c\r\n=sR7G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"42f5f3dceaf51b9baaa6d31651ff75053aacb30a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.53","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.34-renovate-major-socket-io-packages-42f5f3dceaf51b9baaa6d31651ff75053aacb30a_1618235239298_0.05062054834317942","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.34-renovate-non-major-140c4e20f048fd4ecc47cb17bb5292fa9b0cbe18":{"name":"@balena/jellyfish-client-sdk","version":"3.2.34-renovate-non-major-140c4e20f048fd4ecc47cb17bb5292fa9b0cbe18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.34-renovate-non-major-140c4e20f048fd4ecc47cb17bb5292fa9b0cbe18","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fe17b9f76bf43633466dba8353a5ba5c7697d0c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.34-renovate-non-major-140c4e20f048fd4ecc47cb17bb5292fa9b0cbe18.tgz","fileCount":39,"integrity":"sha512-Qr0jzYtC5zO6Rq4wuhikH/dCfgpC7AMIl2f9eGRBXUGXd8WYuy2zcFZ18U0Qfht6hgmIPtJ/QZMiXI+9QCV4Tw==","signatures":[{"sig":"MEUCIQDiATHEdRtR2BiIcdvhZPuTEtxHucYr3m5IJroW5IOUJgIgdoiZH9ls1tMZmOZE+IGiwi5g33ZImAUCA9t5ChBM5gM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdGbiCRA9TVsSAnZWagAAsgYP/RStv7I35qBnYeDtIRNQ\narQfiFAzA8pHwQ2ltbnG86f8mGhBYh8YnvHfse79ZZ7rkkNl/NKvzufaRdgM\nngoWRryTCIhtrXkLWeD6S9tpUsaN+wiuS8wbjRFQqM8OvHvgmayk++cMoTNG\nZidu7Nq7x/11x4R1stL3F5kpINpiYUKUcJTxHD+DIMevjwr8pDl68r5DSOrD\nBhC4tTaj/vWu9kEVxU2ZsSfGvTnAemPUpzx1xUKpJYWRa2yHSX7yQRIHbh2o\nCC/coplbCTu4SQqRCzW8qE3yX7WBi6AhZgAWU36g+/FkpHIsxp/4c6hM2Lvv\nNCi71HIYD1RTOC+3CicuRyt/LcxBosahESnO3G/FLQso4L9G7lLPvHimxvIg\nkt7qOdkSi6I8DcSD6aOndNuUSeizorVUskImweJdsHP+08+7RrNxJlETzbnf\nZiEMalX11CATia82l5uK4Ve5KpIkQjjOmrBDFtCsM06XaQylf6nYzJGtQu85\nkA22JoMY/kN2ziup3DEm16dT9IKFbYaSRcI11LewTHvpP18wUDn4rnZu+P78\nEN6a4CUVtSNWYRwU20fvaoRPdxZY+gy4tGDKi0g9FsLWykJsSZDOoK79GDhy\nIhJQ8TfWyYdzYbg75EKJiHZP4iG/mwn9+CVjaRbliCkrprJjI9hS7am5Xafm\nVwUK\r\n=Fw1f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"140c4e20f048fd4ecc47cb17bb5292fa9b0cbe18","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.54","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.34-renovate-non-major-140c4e20f048fd4ecc47cb17bb5292fa9b0cbe18_1618241249884_0.8616640644869551","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.34":{"name":"@balena/jellyfish-client-sdk","version":"3.2.34","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.34","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6b52cb5c8856fbb32320f38fb65b4b4577f6bdc9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.34.tgz","fileCount":39,"integrity":"sha512-a2/hRI0EdC10cVNN/RI8E4Sy8YqrunNVjVVTDl4WdKMfe2mQtLcaHcAH8eWQsM77Pj6UG8j+6D+aBpjiI1KOUA==","signatures":[{"sig":"MEQCIGOsuRlSGH+Wk7QjznEWGMgIHDQ7ZCVBGCSHPeiBnnqSAiAsWyw/LcwcPWzjpF2wI5Cy4uTVoHieB1vh3KBcgpExrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdGe8CRA9TVsSAnZWagAAzB0P/2+35tNYBTMtXnaxPlGF\nknWzAbliwpz52zPW5Gc+eJCvNzSl6H1xl1i9LlksacV5kWLpLAcjAEVmsRt5\nIlBOl0JatvFgORiKDISRDGzmZvn9PUHBcW5CWzWOSeC8+ii30IKcFGIDBwiR\n34zGYl7DZVbGh5DwCKprNIMmGLzlQIBNSS+RF4YuQ6zvnf12USjwXHSL0d/I\nkuHx7+2CNCx965gZxun+ecBaK/2/M5J90lQw72R45JJZol8Av+AiXYZGQTpn\nfma2mBA2hoGOAIlkxn0rpnajyrNDDt0UNVI+cLBseZ4+a2H1CTA4GLXsVH+c\nAeG9vLocSVthJcS5YPYqN401zC2hENZbRU8+bNyMWbFCEkZa58nSXCuBH7aS\nVYP4kgY5gwPIWyDWc3PC/8engv+RYF/BLHIeBYaSpdirFO18vCWvEdp5G9AC\naNAgY5byv786+dCG0dJddWT0FM1AVAqIjkwzng/4hZ2/kLDyLpWcfqRYoDic\n17lsV49Do4LnuEk5vMBVhPNLW38YJM3cyeSE8p6DTIdp+fRunIQDIE1Fog7i\n9xc/mNS2XVp9Vyv1J4ONjjrA49uexsngcc7M98raNGuhglYTyESSv/vQ0G/O\nKDcyA3xD0Wd9Nv0ZPt+G0bRC0jdJ+X8KiUOHtX/0UejSEIwbtuOczyR7WsKC\nmGld\r\n=5Brb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f2b0b5f227ecffc22a731a2da2ef4f208c726626","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.54","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.34_1618241467845_0.047987681821099804","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.35-renovate-major-socket-io-packages-b81592409ed9f7e35e52fc38f3c5a5728d787fe6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.35-renovate-major-socket-io-packages-b81592409ed9f7e35e52fc38f3c5a5728d787fe6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.35-renovate-major-socket-io-packages-b81592409ed9f7e35e52fc38f3c5a5728d787fe6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8930eabf39384b283d770da7d1095fe30886d072","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.35-renovate-major-socket-io-packages-b81592409ed9f7e35e52fc38f3c5a5728d787fe6.tgz","fileCount":39,"integrity":"sha512-IKENozXO5SSPOg3Qt9I1d+3p1Ikdx/gbjhjGRL0+9nCPdSTya+1qxHFLqRkcsZBvpV8EkdB+cja0swFkapRC7w==","signatures":[{"sig":"MEUCIQDxm0FBw6KIveV0OuDVemPRKMk49etesVN4NeApnS3fHQIgPUhRFiDxsjxwvXm3oHAx+haRRjODAj4OHzwKqlAaU1E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdGjACRA9TVsSAnZWagAAtuMP/j8OWp4QNahZlpw7mIKU\nE3PLQyTqUo1KPaoyxaHventXmwtQ6kYTdFX81dAjuSZpaczucbdRAEs9MfR7\nj+t+bO4jRHfqJIFoDgXvIaVc/quSd5yrsYquCIJ6Woz8ZJwrP7y0plc6TZLh\nbv8dVLwIgw8d6wEEhj/5CW6JLog0dVcLxhRpRqIl1J0HbuFSavDJI2OFQ4k8\nZtyqwuc+LNomcqA4GaIenCNQewLCCDC9GcqqRWlPdW/9Y7abvzxOU7vCY8mn\nATz4y0UVPztTXpmCUmmw3H+B5Iudad7uU3JCr/TxDa7gi2WB60PkbWt9jB3l\nnufh6eovUCiOX0D0EkUkEbsHW6We7mgT7EVe2fVT1n/ona10KPOaK3cmHGYD\nm8i7r7j/HfyDdsm6+suvUIDghyXoaxwez/zqQGnZAyJYq8ll9ogrcYP15+TT\nnRtJPvRu1Gv/0+G8+evwdR+Imdqww3Qp5nfvYYnS5RqJp91ABmaSevmF1iTI\nltxo6Wm/1VncoTIWrwo5WoVBW8sQL/G1SNPmPUaETQjfqhLM0NsWv+VFXrPV\nwUFVBMgNxEqlJYAfziC9mO8rxclQaeNoZns7FQFYejlpS0s1SRK+qfb35laN\nFuw+GwkiPjz11LCFk4EbmPRtaknWTlPSWZQSc1KS34rIRDTdQKWznJiDZczE\n6cP5\r\n=x+nZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b81592409ed9f7e35e52fc38f3c5a5728d787fe6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.54","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.35-renovate-major-socket-io-packages-b81592409ed9f7e35e52fc38f3c5a5728d787fe6_1618241728284_0.317654109472413","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.35-renovate-non-major-21aae4d188754df6116ea731949ea0ac7be8cc33":{"name":"@balena/jellyfish-client-sdk","version":"3.2.35-renovate-non-major-21aae4d188754df6116ea731949ea0ac7be8cc33","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.35-renovate-non-major-21aae4d188754df6116ea731949ea0ac7be8cc33","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e1d5ce3725f921333d38afac0ba6650afe6a8ee8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.35-renovate-non-major-21aae4d188754df6116ea731949ea0ac7be8cc33.tgz","fileCount":39,"integrity":"sha512-lkqeAvRq5NS30YE7d025+WQ5fYnyb84dX8COONSJQhv+nKMxp4b1mgrSAnwuRP0weqQN/2TP9+dCbdWvWD+m8g==","signatures":[{"sig":"MEYCIQCBu0of8CO2hPUNgqWNEPhSZPM3URbGNQbNqgzW7RTo2QIhAO1aQHCMnc6Xl5RvVNFjKbTgr1eqMbUSkXuIjeOIBeoN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdKDBCRA9TVsSAnZWagAAeyMQAJ5t7iBfCnoFEzY9xsTJ\nKXuSdgH2wLpRHst6skg5sC6owIWU/gaPpPsWGsdgwrZQMUXXPzMeEOZmPGa0\nyRvBnSCF78zKr5NMTBRqzzSerqcmUjFiatsM5Uvj2rmlIfQG8ZDkcGBjEv0z\nYGACXM1e/UO/DiTUFkAEnHCmd5qwZkCszBLOQyeqc1PAVvs0zvesrA1vou7k\nbjx8hzlCw6dHgwQtynrv5ju+FKKugEHIU5IlD+KRDLZKuPLWUIjAyGVMjKbo\nM6x8l04icAc3tUrVDlEas5KUmoiC9JcAEw/LagemDo50gDde1n587vsQ7scv\nbxBD1n+xgrkx7YkJfFo0fhr1vlWHV4C4QOQZXpGTBKPFnjh4ZAPT4rubuPXg\nwTacwH4m9C40L0q8V+rFxb2NQ7zIet0euv6eLA2PRggo3aZuQXsyk4QHgkwU\n4U0yIelf58ee7oBtTYuUCA3/0Ejx96ykYSCpamK2kUHjFetLxtxC2ZMT788e\nohUXkKp4l6MA/kz41Go7giV85k/Sy4VNokyXT/WcWsAroeTnEybKiyUnVFkO\n7ey9l0bNMJi94FEVCd1klpTLupSHHNk8mpUT7hbCACNgHBqx2gbhJInQvd+r\nPvHKZefQqpeMMGKOJcZOaBb5m4XKRkGatwX5fDKFHq39y4IBESr3FdBJtW6D\nTAJM\r\n=RqqA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"21aae4d188754df6116ea731949ea0ac7be8cc33","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.55","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.35-renovate-non-major-21aae4d188754df6116ea731949ea0ac7be8cc33_1618256065195_0.28053942891211414","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.35":{"name":"@balena/jellyfish-client-sdk","version":"3.2.35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.35","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"38ef60569ba8314f79c93b2f4e3b9bb12ba80fd7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.35.tgz","fileCount":39,"integrity":"sha512-hX5MgNCyl2lRBLkI9MwmyHWULZZ2phUmTHTJQNUF/vFv0PLoB3956OBmSyF3tCoKUbfBREPGxy4bWSeKBRWz0w==","signatures":[{"sig":"MEUCIFoZUFKZn2GjbHWcfEfoFesDMftfIESfr7hLq8IDPn8KAiEA451iqmceeVGrLsmESIKMjqYVHm+uBmbPmTtQhvLV+GQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdKGeCRA9TVsSAnZWagAA8kQP/3E8xOBKs6faFxOJdQDA\nxeanLX53lbgqACcOQEPE/Afpe+LvJL5qLkwmKFV4IutnewrwWhDw/HrgLh7L\nrrya8Vh7LpP20+MKthQ+iatpTMk7J2Dzs+FTxma92jf0vCQdIS2ZyOUpjb+B\nbZzkZftpa6XgjBMkrAxccqdsU41AG2Mt+4S8ldA/Ni+fAK0shubUfMlDGuuP\nox7S3Rrg+MobqZvqU93n3AoBtB3iCIZVCwFJAO80PeZHhpomZMnyfLyvYe8W\nl5LQULDdBqcIYXyPZNejGnmkeP1XiX7jLTpLsUTOrMJjiRj1rLn9/xODTbyQ\n2FDlCRaYltuoTmKzEX6rBDBmbWZA95WTAMF9n63vc9NQsjn5WcWOV0qDg7bM\neUQhsB/7AijRO4n9Z5mahh6ygvA9bUYK6Wj4YF5JPbmpjiK6v+pIbffVlPIu\nkQQTsRELxkI+mYhhszgpbGNBi8iIQRP+kN9hVBwUkKovG1iXjJZfsMsTqAg0\n5MI31yk9p3Ekf0qRIOg72DzsJUtywSdZb+IkRn654CT6KPkfEQ5oRmKoDe4j\nTcouz7kzFAPzGyleSCMFVE1K6M8koWLD2VoTgYzAxlCP8DjqV8Bk9UIq8fCE\npNyIrOcMhmwK800mR9HkKdsElc3GxL66/fIj51wPtm3zWOxh4u7cs2msaGgi\niuff\r\n=KxTg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5ec3958b41e97785aa45cb44798625440fb4aff5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.55","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.35_1618256286236_0.9191728509558472","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.36-renovate-major-socket-io-packages-3006f66a7c2fe666ebd4ca2bc83dddf4f61d9ab1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.36-renovate-major-socket-io-packages-3006f66a7c2fe666ebd4ca2bc83dddf4f61d9ab1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.36-renovate-major-socket-io-packages-3006f66a7c2fe666ebd4ca2bc83dddf4f61d9ab1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"68cdd4485ac60121f43340fb2cfe941075628a32","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.36-renovate-major-socket-io-packages-3006f66a7c2fe666ebd4ca2bc83dddf4f61d9ab1.tgz","fileCount":39,"integrity":"sha512-OVnAm5iJx5za+tNQF3h8IRu/GDyiZMlGJ8IlRPt3FOojaNNQEMUcRlaVCGDtRF+dZl1XIxPV8GaAVeLr2r37EA==","signatures":[{"sig":"MEUCIEQOBdymiI/dOzTMqWBmn9o7QSZvXg7qS3ybtK6vlJ1TAiEAnGVFAfN/u2NHCTp5sdslHVJtchR33BW4qN4/owCXPh8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdKNQCRA9TVsSAnZWagAAvr4QAJDCDKiERvvoeo5lkfqL\nhohHigUqvr5ntIz6brg7R8Wm5FGEnWlh4TPm4oKwjV3HwOoWhHKOi4QjgBMb\nDtkj5fzyPkPdHGmPjJgXhNHFHNLcBpO3mX+jGXtEe9eOheQ6lYn1a6QiSH1r\nRqq85ZNhLf7UhhkSL9jNaVYnXtx4cQzlzbLGrfsfk1Z/4wRjL+z9gxdnX98B\nbXFDVqPCwzDdf+TkcWcMeHQBZt2dPj7eQaOGvft5JrkFF7CSQInLnp9hu5WO\n6ndEak470uvRV14ynxpibiDcgkEKy5cfkkVDqtpsGIJSCTsK3QLHxHEskRhe\nYR+mqiEW28UfaOehqiHxEyWiavO62AhgQGzkcrBrQVgVjNqammJQxh7DbNN3\nCYgC44ghk5t+EXfgxRzWzKfQ/Zh6wy2WISpIxjE6RTGNHE7nFy/8QDkHPUzm\nIG4FuJIxanIZ1VT0clynwCvrUpzLaPs1H9HQotBiswKatK2i29mZdX7Ct2fs\nfaRq9KaU05vsTuLNt8Yj3eacE1bQPa+BBQn1YaiMZZvjyHfda0ElM+yU8rX4\nfWU6Qu4boNAz+pRUlVtwN+Agg7XIOVG2ppmmPNjYcJH7r3JUpdTLvtleR9ie\nl7tSWqMGSW2TiT2qF+hX1Ue+9xX768KLLIIfe3XpvDQwjK8QtZI5FBhBO7gd\nLUMv\r\n=gJds\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3006f66a7c2fe666ebd4ca2bc83dddf4f61d9ab1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.55","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.36-renovate-major-socket-io-packages-3006f66a7c2fe666ebd4ca2bc83dddf4f61d9ab1_1618256719688_0.06240919523303634","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.36-renovate-non-major-2898840ff68ad82a222d6f1eef18330300f73784":{"name":"@balena/jellyfish-client-sdk","version":"3.2.36-renovate-non-major-2898840ff68ad82a222d6f1eef18330300f73784","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.36-renovate-non-major-2898840ff68ad82a222d6f1eef18330300f73784","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c86274230246b76802b5126262c356d4d85e59c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.36-renovate-non-major-2898840ff68ad82a222d6f1eef18330300f73784.tgz","fileCount":39,"integrity":"sha512-fN+FI0kuSqNMSHDFndaTQe76BOgKM0vf/VgjDQyHlCfXKzzUsjv79SVZUD/VmGdSvwSuliXPjvrki1Wr/0MMLg==","signatures":[{"sig":"MEUCIAYzDfA9CAyVAr3rLkzG+HhIY9eN8ZxhE6LibFoWVC2yAiEAwJaJiOUqkVJ7+4Nx86TKPm9bx74tejr4K4dlo+8UIEI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdMFvCRA9TVsSAnZWagAAsWoQAIENXrzJiclKdLjtmy5l\nOsWzh/DWXxIg90x4alXR78tkLFTiEvv7P7Ub/qe1cuQ96cRpABNTk+x88Hsm\n1zYgaKyaP/AubamTo5mxNylwmPk9k4Z+IbTGgH97aGpXFhZdy9hZKjm9h9BW\nf9RkBt1eKptvLaOkSap6K1UwpXQEC9LbIYig4ZEazThpSTZGFzIPGBw0aFxn\nAmlfGJdMwzZm+zwe9JB5OTg9/IqlspapmDjj0al1StvTyQ7oKrPOgskIF8kh\n6Le2oZ33LKCe/83YyMJQb+5oF+YM9fsH5rbMnpu/e3i8tp3Eigyv2Oefhejc\nHkCjOaPJT+yHqF0MklfPfSj2RWGyo7BS14uklfRsl22Uyru9KG8C7o322Yaz\nSnBh7uPu8n+6XxQ370whRsfJheIK3F6epATBvBea5+Mc0SIF5B61PEH2fuGH\namuBHXpFJuWwrtKYzMBvejrDmYUE7gX3KpCJJFjUGsUAxIOVBf3B18hrN83m\nvZArKeRuAk9H52PHhsOLr7UgM+1QYseCvmgO01ylBDL80ju1VY/m4Ccoh6fM\nZVSbypA/+AAFoVFqTHfaPA6nnx7nT8QeSYjsJNZXslyyjPfiCEIm6svITz1Y\n6ql5dqW4+NkLmDVIfCFNmVQD/bZP3ABF2GEjbJtAIu6Rnm8ZxDqmkLO3M0Ef\nfjeU\r\n=wauA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2898840ff68ad82a222d6f1eef18330300f73784","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.56","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.36-renovate-non-major-2898840ff68ad82a222d6f1eef18330300f73784_1618264431167_0.41698558850825096","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.36":{"name":"@balena/jellyfish-client-sdk","version":"3.2.36","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.36","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c7ac33c56b5ea7319a3512266bf263c8a5bc2ef2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.36.tgz","fileCount":39,"integrity":"sha512-07WIAIcVJVfAjnNBH07G//NoF/WZY6RYx/D1HbvKDayKlclT2TEiztM6NMZX6W8rtEST6zkE36hJBeA7s4RLzQ==","signatures":[{"sig":"MEUCIQDnpJfiEw0k3sA+OVldp8DosBX/rpps33erSxPyZ3FzpgIgSCYxHxBOkEbdabmhSY0Kfym6Mm1ax/6Thpo3Zetnw8I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdMKUCRA9TVsSAnZWagAAEIMP/3z1TfHN8SYQn66MOIb/\ns5jfuFl4FG0Vxviy96eWELuWFxFcU3a/bHSH47mn/JMTa8+Qul/dNBa9pqii\nEHvgTAgue4EhA8RHfeMj2JYa0padIRFTqjxPVykQQOCc5gV+tZS2QmTv5xIA\nbHr+1spmEYBrguD7R7Nxgr4f2q484Q6JBcMERi9AnPWMhkpf4nBFAY9LEnk9\nLA7qar+kCios0eRELtPdJjC/n8KIbgh8l3tUaTuFDA8eDdEXiKhNcZSYVKfR\nqyzqs3Cv+1VRebkh880F9QrGQ3QtR93Po9PGgJOU7LiE3DzAV82aGH2qbfQy\n/H0qKKB47YX8WfR7KbSKvFEEKx8g0zLi20/O1RH8dzdwPr3hwr7r6XwyNNtK\n1dOsHSbEAare/UEgsdLu4XddEU+BmPZisbAEjw8wMtYRb3LU6TPKu1keGj82\n5XMFnWXUTGTBsDe1lt28eXmSSt2VeBAcwJZD09onFEIu+KfaKjn4Rrp6qSse\n3nudBTuDG45lrKDgA6WLOQ0RCGGEf6EIzO6G3sPzdHZSJ0cuKcQUBfXSRpOY\nF/t8YHWUt6kMHODM7zYOj8WCfoIWXBQ95mnoF7/30QUWac4owx35Fhk9TwZR\nhl3mag0oiX/IjMUCkaaA9huWCqD+B3OgVNA265LrqG0Xqc4xhkG11jd0i0ZP\nBDDU\r\n=ULeG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1ab5989b6782522c22e7f31fb7efefe25c325ae3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.56","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.36_1618264723577_0.48802073880197794","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.37-renovate-major-socket-io-packages-e134811eca40fd55a44968f182b0dfc60e80a1de":{"name":"@balena/jellyfish-client-sdk","version":"3.2.37-renovate-major-socket-io-packages-e134811eca40fd55a44968f182b0dfc60e80a1de","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.37-renovate-major-socket-io-packages-e134811eca40fd55a44968f182b0dfc60e80a1de","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6577e742dfdee251f14b6425af5d4b16766e286c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.37-renovate-major-socket-io-packages-e134811eca40fd55a44968f182b0dfc60e80a1de.tgz","fileCount":39,"integrity":"sha512-tV1UvBerDPrggugK0D+sCvuQReimewdcZI76egwuchpWgbOc7XiJR2d/0/h955aS0dZOoJHfnh5DHIFBiFMWfQ==","signatures":[{"sig":"MEYCIQCrmrfDH4bGfnpKu0FNMZqnqptAmz6l3wPqB9Ii8UchAAIhAO4Gua8Un+A5+OjfRpqZcyepCsi+R/t08a5It0avq+lz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdMPzCRA9TVsSAnZWagAA4BwQAI9QeGcfddaxktaflzag\ngmD2fT7AROvfwhmk5YOGYslpSfGmjKSrMdeyRwcia7EaqqIuKFykenXgGpqV\nzqz0Zh1WktnmVD0wQ3QaKpBxnEkJeh3yeC30YFBXUazXGlHdzWIeyzE+z7A2\nqAs9Pc9JReXY2JFv0Pk7xPcchHguB5PYZJiCWaw9YhsU+wbma548HUe4hPys\nMPUVRHxYMakyMkeezgmreHlmZabfGMZO2b4ADHwue9Zj+zFB4O38MvnnQiPw\nglp0cTDg7ZhfbI53NYIRPL9TOG/3OIJKPW+gN7zrqqZHnUjhhAfRJ1BXyxpb\nskfln/CjLYmmh6Et6X+j4b8+c/KXfHVVQJqV8spvKHemgJk2+wcTYAxxSR50\nB0GhnWyPAJCgTel9ZjielESw/jB47TSJUdpqlr9SSTEvbDXkRjcG8aF5RQvZ\n0d6E7pasN7yquUzFI/LJ08RX4MttIwVtX+S/g+up0aRs4rKdRFNSXh0xLneA\nw+XbUkyRY1G0UaGzHm8vaFUVOfuao/k3oIY5RTubGwf1msOdeko51hs0UI4D\nfZUNRt8+dFtJ4gUI4MZSqZuW4/CV1j4f7+f7ZIQql6MNvzh+q4GiRDFRZtsU\nfvoGrfWN2bugzIZDO4oAFw/WXs3e58xiZQShQsW5X/VS0+rdYT9k5gF1EN6Y\nx7XS\r\n=CeeU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e134811eca40fd55a44968f182b0dfc60e80a1de","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.56","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.37-renovate-major-socket-io-packages-e134811eca40fd55a44968f182b0dfc60e80a1de_1618265074714_0.5961069462553781","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.37-renovate-non-major-569b54b373af8f16bd1bdbd05d7bb1caabab421f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.37-renovate-non-major-569b54b373af8f16bd1bdbd05d7bb1caabab421f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.37-renovate-non-major-569b54b373af8f16bd1bdbd05d7bb1caabab421f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea60f04045f44483bedf90e79d1d6024ea224c3e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.37-renovate-non-major-569b54b373af8f16bd1bdbd05d7bb1caabab421f.tgz","fileCount":39,"integrity":"sha512-Oc35jFmnbDX1IsxrUqNfkRZuu2VskDLWluAYnaQwkJ1rvp+HgD3xXQjCKSmp7xlVHVWs/evEf1kjxyU5DHTJzg==","signatures":[{"sig":"MEUCIEZjRrqjtDfOE+DlSxDK+q/51iQDCtbVX9nmb6CyivjvAiEAo+0+eCraaY8stqkoXMIQ3riTPP2jWZ/bbao+vBGtHxY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdNdYCRA9TVsSAnZWagAArw0P/0mLdU29s8eTNnCP/QmH\nKuFdBdLLnZL6a18yc7PtSX/yYKzo6bFJHG/oxf70ESUgQOLfDyCZlmEFLyw/\nsXo5A3AA10szxEWRVYMtSRzeFpTr9BGGZINQCaYaDU8ON7hV7PmQ0crLEuGR\n7XccyfybA8Un6Xx+VexSIyvwNs3BUsbJ/89fBwPtpkhUIBSH5t51vstaYngr\n7FBir9wTp5IdHnGjQ1gFOwBaVXzPyYuoNprRcgponro6UfdpqTuGCPwFnHaZ\nCnA9k8pRBBcP8VXWuo8ktgqYCP7v3MaPzf6FfspjJPdWNhE7K1YAr3SFOz0p\nkOucC0+sJ8CjbmbV8pF77c1NeU+PE79c4GYD2umwjC1GOAREurX50+tKnMTD\n8AVwhx8WQCUPInO0+c15eWcnBq6gTeW1xYMAIKkF70hehCs6vxbBDKa4YdTz\nn05TdaXGH5OUUE51o72bKz6XVSs2p1ThxOkATXHpzQ02Y8ZKyiQpPGU4gkET\nyieEmthihbPtj2pluZCCv6ubSuFRQQbwlxQd9zcxjcJv170c198DxBOLMaxu\nY0hhY5ec+WIcNTfE5ea2ok91eXSn2gTbs33O4f37ertUFb80pnuYn3E2Y36v\nAjnV1UufEkzMruo5qD7TmNrApKzYj0sv2ElleC16BNthVDJAoLF/5+t3K9xy\nq5ZM\r\n=Y+1L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"569b54b373af8f16bd1bdbd05d7bb1caabab421f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.57","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.37-renovate-non-major-569b54b373af8f16bd1bdbd05d7bb1caabab421f_1618270040341_0.5777065916648285","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.37":{"name":"@balena/jellyfish-client-sdk","version":"3.2.37","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.37","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4f62f13884afac63693cd2ef8200116615a61e3a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.37.tgz","fileCount":39,"integrity":"sha512-++qPWpr8DtrBkK1TJh2CFrDSrdxKrUBxMjQP/JGHh3oeGhSbrwAT1vFR1RobdzXgbQXy8k+Xq1FHdNQewZguaQ==","signatures":[{"sig":"MEQCIGn9y9JWoscslTLXVXIR4doH6V911fEVlOzEy+Z3pThpAiA6qSlOeESfjwAWhQ/sq4bwFbRW90ycA2xx/QbcL6ETiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdNhGCRA9TVsSAnZWagAA8WEP/1QwCd/cT+QWwv2RyDPT\nAz7IRqF/Rpx45MupTac2My9dpFqqb1Gh/i9LpJNXq4QmF94Fs99dE1u7D8Y+\nwtyjlYSXa+mWzSuqILlFsNmjLQojVzeriFUfOdg8tGYQ0OdgWNr23Q3tPY99\nRPnOxktNvt1cVEbKEXAmUzU2pZQEDc3JF40uIiWJOmXrQjQg7GCDRfWULEps\nAekWPbBVPzIZFh6v/BIj0HscvaK286l/6PE0DCbZ7YW7up6n4M1Zbiv0bdE7\nXukvqVpxOTj5iyQDuW1vv4eXNh4XPmgCgfH9xFAExMr2jOYvWqb5RQreGpQ2\n3H8qZnGay6E6OmDdNYsrgRcZ+gKw3TpRjhLUBRXRxm4Q643hQf8f9yT4CkxI\nY35prGU2F7dAJvn1wd0oyHc6t+D2Zj5f8GuXMuIPxEtmYx3uDQNPOZQjUcaU\nf/mriPUP2bdpqfbGVWv5loWBw8XX/eWh1cYRPCmFKYiOjBf+C8UAgonqRR6b\nk0eeP+rBGmewm5YAk3WyNsqhRan4KQ1rNxWkZH5UYjbwfy1dS6YRCy/pAZj6\nOeka1rsl3YqZ5W39uBLoiIsexR+9WKIFGMak36wnClGyAXBX1kATbsUlbQKE\nE25gNuFiAJRA1MkL6W9Mcqw2ZKO8sRjhUghpLjbKYOXRbH23VwvFcFtsl7ui\nilBP\r\n=2HY0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e919ad2f8437ad0f41dee7d0237ef134ab11b932","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.57","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.37_1618270277712_0.6811025502835304","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.38-renovate-major-socket-io-packages-fd2048102309a34243f909e0bb5c23df45d88f6c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.38-renovate-major-socket-io-packages-fd2048102309a34243f909e0bb5c23df45d88f6c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.38-renovate-major-socket-io-packages-fd2048102309a34243f909e0bb5c23df45d88f6c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fc0c34042476f6e6896282f68f90f7f29f4877d8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.38-renovate-major-socket-io-packages-fd2048102309a34243f909e0bb5c23df45d88f6c.tgz","fileCount":39,"integrity":"sha512-0JPJVbl6EbydeVivXDaO0oAv2UPptvunX1JGNg/pHXlJMtoyqfMoyTmCmpHOPbwkOm/URxnFNQ8JyMxuARgdtg==","signatures":[{"sig":"MEYCIQDEaw4gCBN0BdJmLRrkHP/DWGMXu661Dgfbbij4SceTdgIhAN7GAIYhmk26nukY/Up+gw9HtcFgAXegzFWTgdzp4aLj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdNj3CRA9TVsSAnZWagAAO7EP/i4LRA2XCH8Ok/1Czuap\n7Tjhn/xgHty398DrsGgZj597nS4op2ueE6gi3mggTmy97dFeDceUl9M7qtp7\n4FAhuv0ryYTp7NFkhiGwbeJddrfCaj4i5TIVTHQ383gZF/nO6X8TP942dQBR\nKovIB0WG6cju+K09gTvYry72yqO6BQfZ+RXUX4GVvJ/mlIUaau9icJ9hKxzI\ngY8zfSOqU1zv6kvyFfGXa6K0SyrVXrGjIRYZ9H42db8HFIFrUI468AeTuRXN\nVGWt704gBTwWAO2I6th2a+XRa0rcHtkNM1ICkFMs/VmaygTHsj0atJclRwSS\n4cbswlpymp0P3nL2woH/8V43QDQYhmwS6Z1GdDG1eiywhX0v1/3j1b+l3Ies\nNAfMUdx1po0OwuicEfA7PHFybCGdUbpwRVhNv795PThLtejMYF4eS1cULDz7\nxPjnJH/gyR8zTLaxkN6LKgncpk9DsDKIAFCLa01pUoohdb1FAcUrtPbvEKmu\nCX+KNreCq5mcwkYrqShAPyQUww83DccShgTotGy1X9c4NHCemdoHP0lGDOWi\nH91nG96uXk7n0lk2+5h7tqJ1bH+1i2xNVo6TAOlcvRthtowKgF+n0sJlt2nc\nEYAwLukCkH0gREUemp/tJfwNGg54oEErPCvkc6+YHO/U+ghnlimxSUsm1NXG\nXbCP\r\n=FPfw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fd2048102309a34243f909e0bb5c23df45d88f6c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.57","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.38-renovate-major-socket-io-packages-fd2048102309a34243f909e0bb5c23df45d88f6c_1618270454987_0.42632306468729686","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.38-renovate-non-major-0e17d7a8a6d7886c495aa73093bf6e0934d91dac":{"name":"@balena/jellyfish-client-sdk","version":"3.2.38-renovate-non-major-0e17d7a8a6d7886c495aa73093bf6e0934d91dac","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.38-renovate-non-major-0e17d7a8a6d7886c495aa73093bf6e0934d91dac","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca7b2fcb67dead3d8ff41e42562f8a1f3801f5bd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.38-renovate-non-major-0e17d7a8a6d7886c495aa73093bf6e0934d91dac.tgz","fileCount":39,"integrity":"sha512-EP/Mv73b9xTXoJhDix2qpOw6mQXvjjt6JNl7QfBosjm2ByeuISDVqHzk3xkhplJKr1vnO6vIa2m8bBIKlp9Apg==","signatures":[{"sig":"MEYCIQD45maFhcAGcu46QZ2E9U9C3KDVNr9SkhhqBaEglWsC/wIhAN21Zbb5Sd/e0u8OqOmp6+yUQiHvS7q2mQeeVGvTg6uw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdRYYCRA9TVsSAnZWagAApiUP/057r48PPePVN1lWTZLd\nKzaRWFL35BaAj1sH5HaJcnYMLK7gJK7ydcFIIVmPPiUEs8PkglfIaenX/+5B\nhhNDJib/m0XtBbwmBvpz2mxFEV0Wna/6eVADBz1u2ChM36pjfiRVhDmT7uWU\nJLfqLSFqrzNvSFZJmJErpqwltbQmh4uifM3i5jHOm1EiCCzORtbt7Ox1Oct1\njcgRpQ+OvkRiN1LwyZODfAE2VEjDjTdKNuFKGfMdECoSurJCw7FJkjh4YJ9+\nQTDRdSSZP6NH1EO2tOPRGoiTjSfOYmkpejcl1Oxz9IoXd+TMX9aWRmC+vD9L\nqWObrWRheiNhwJ2a6g1kojEIE9LuAgVSzcKR2suJG+syoxfDQALCatUlrW6x\nAU36Uiyq8cr2/X+fTfo17l1AHjCuCKrnAUyIKNbt8SIgucWs2kGex3XV+ziG\nwURcQcaQ51ZvXqEs/wbjC4XQdq2aV3z47/0VWtQv5mywy8e1jA1N6W4tVzcr\nejNTW/uvKOBjZxtFVOu5Vn2bJzN2yYS9roDHknNvOw8wRqQBGIpGO+BJga22\nS3IXkCWxLskhmVPAdd5Q+Y8Xa7Dl4ZFwlQdRvhlcm/hxZO4ZqOK0FV2aa0Np\nrkbC1mZUEBaoMkfTqTRTbvGGajJaTiBTJmM9q7rKdEz4SfzpnZgmWth2b1DR\nTUPk\r\n=8mGK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0e17d7a8a6d7886c495aa73093bf6e0934d91dac","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.58","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.38-renovate-non-major-0e17d7a8a6d7886c495aa73093bf6e0934d91dac_1618286104102_0.9391200520932848","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.38":{"name":"@balena/jellyfish-client-sdk","version":"3.2.38","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.38","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"50d6cc97e7d0f9fb41b6c49fc1197acc55d89db1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.38.tgz","fileCount":39,"integrity":"sha512-dIfSSy62VY1Gw4XJc50uNFSBJKffHHc1D2dW0SJRO4D6uSYP1bFn5NxOitHVSFaMCmRoVTV4sVFCKSYIYlQujg==","signatures":[{"sig":"MEYCIQDv3u5Xgwu+G7N2rdC6wwnlvWYwW4+VMj1xsww05++B0wIhAInA8g6HM/VVRHa6vS9/00RuXhmcLrPrNvAf109whVWF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":232915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdRcWCRA9TVsSAnZWagAAsIwP/i1g4XEEEFA/mbPOsn8S\nihwQaTWhGImdbHYkrDwz3IvFgupX+crkdu8W2IVnPgAzprsFZqXVK5VcbQj7\nIhn6k6LXKGj0xyoKRom1U981v5fOvXmJa0TMIKE7XdY1sTwbkHbXQDlcpUFv\nQYlRozmhmofc8G+zm7rRH6St9ezLBNGiW8/g8myHCxmMn2wbDzI1edgEizRc\nYP0Xxcyb2AUcp61B0yGMxq3UrXPOSHfDKgPbfWtHfdvp/skVf4yDNJSzE4NS\ng08Za8iKMHMATQk+k0MY+FKTKYMboH26LaDm7MFaP/woPs6LXFqgShM9V9u2\n+dsltCGqNKhOO9yBsS3DNiAu7FJjP+MWSgz/K33Ou4Bwp7/jMm0s3WfN1rvn\nSgkzRlAnlMvnCt7b6mrngpgKtRZ6bcgvdZsaIz+0rr60/7RO85TUaBOLsDas\nK95Ug1T4tShnd/GCy3LHPfWWmEd2rS9/fA00Y++1qf4ueGJ6LNRU3vdX9jWK\n4U/YuNAENdtjBJD/zbygZl46VaFFuOEiTUX/it1+wKJiIybbbzOedtpEhWY5\ndAe+NlSEZwVyR1Als+8GfcGn7kUaktWwfboCunroghDTh3eQmJhqK9bp7Zec\nhrq1m8ZnyW5zXPmHSqh1+z2nT31HzuNndmJ1QxA4xMPfe6zA8L/raEU6Rti3\n3xgf\r\n=8twp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"72ebe6e0a28a1b9d45f26fe5a3d8009dfb01d046","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.58","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.38_1618286357631_0.27987994081097023","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.39-renovate-major-socket-io-packages-75f807988d782f0ace9028a72d12fe22d5eb786f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.39-renovate-major-socket-io-packages-75f807988d782f0ace9028a72d12fe22d5eb786f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.39-renovate-major-socket-io-packages-75f807988d782f0ace9028a72d12fe22d5eb786f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ccbffb126b0a4d86b702aa0b470b6d7d2206b9b9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.39-renovate-major-socket-io-packages-75f807988d782f0ace9028a72d12fe22d5eb786f.tgz","fileCount":39,"integrity":"sha512-MhkxMUnBB3J0OslIf1fub9jIUFvvZL2d/jzJael0c5wHznridhFicE64dCszrmRGXNTQ9RiJEcP1dQZOuCsbkw==","signatures":[{"sig":"MEYCIQCpjgNY9LOvxdJB1wbjf1kZo79hgkn7i2CS/rVf1LrGGQIhAI8/jvurl5EBbb64+3ZPtzV9hIQVih1FqDC2HsTprKK8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdRe0CRA9TVsSAnZWagAA2zsP/j/2HjHFieAIqEsS2fIT\ngF074d41KVy18WTgjl8AElounYbL2Me1xd3gxNVgxpruHRlZMLfUdAgvaMoo\n9+9xcKq1UoCfty0RXe/a61W3ZJrm2snyeP0gwJlzM7nNhxCGSKz09BQ0+OxS\nu2qYafBQkDrB22p1JnH6fHXgK2L3MfU7hvYCIUtsCNqOe6I1are13efXG4Dx\niK6hOheOrhZnYsI+I3mVzWSqsx3Iyy4TPH30EAzZ/cp1E9dlFzBYdLmyNihT\n+2hw/qQ6R8CxWf9IQ1JnzKqwEzW357Dch8xJ8ljQwYtsulYuuaXcfxlMAnwu\nFl2bQ7rRobJ8L0IslOjz0m5VrlUfxzMo6h2Nq2Op7qp87LekgqLyh/osgiZz\nmiZ/5oK5kKZ//cmhDsFZSXGB70Hc93AHW60MBRfOeDNvEl26RVPaZOouEPve\n0jGeB4aXkWbgPq5CjeEf25JDOYn7xcxKcUkLh3+K3ttgWt/TQ78csjwa19jF\n9N+SYeTH5OTjiZPhqYJI3MqR8GciOAuyddf4Az4gvrM8h0sd4XS0I8sWu8B7\nBRmU5L7PM77VfsDgzP0brC4VyeJnAkYAET3CGwjKkN/NeJtHqBTx9UdDJZTx\nvM1s9wC+RHxZYUBJQiTcNC1mMt0FE36PoLcxk4VKRIqEehCm13TsKSx4q3pv\nTPq4\r\n=YzdX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"75f807988d782f0ace9028a72d12fe22d5eb786f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.58","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.39-renovate-major-socket-io-packages-75f807988d782f0ace9028a72d12fe22d5eb786f_1618286515987_0.8117776893971671","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.39-renovate-non-major-4b198682f4a767f4764cf68f26e8998a0ff62b28":{"name":"@balena/jellyfish-client-sdk","version":"3.2.39-renovate-non-major-4b198682f4a767f4764cf68f26e8998a0ff62b28","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.39-renovate-non-major-4b198682f4a767f4764cf68f26e8998a0ff62b28","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8feeed462f499e7a7f08470b35ff5d04eeaeacc7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.39-renovate-non-major-4b198682f4a767f4764cf68f26e8998a0ff62b28.tgz","fileCount":39,"integrity":"sha512-dBv4meWAGAk0NFrOSGQEOKmPnCtO6E4bS/9hmD7pmFy5QpZGWD/bhuV0Qc+H0sYkKxnLa5uiSEqhCG/5jc/OvQ==","signatures":[{"sig":"MEYCIQD0rdzGr7xVziez9kRcRM9zkEC8e0mlbWFC7N1cszWblwIhALfAG+wsMkBqtK/RlhdwYGNfrNEp1BpXxspwIws/5bb9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdTDGCRA9TVsSAnZWagAAtPMP/3S6XZcQ0xvEmw5lhcEM\n2TjyAAn300HffkGC84SSWu6m5nSAyLB2b0YKB2d1pPimE9zRvGDI9uvDL/o1\nTXEr6ltcQT6N02Kk5F8j7WkscP0tWBLoHSAx76OhvijdSWLxLSU2E12ZdxgR\nIu5xOlYpPdfQgonVKjzpGnAR0Xaj9ORiti7e1Z6qiz9iTnnS/8aUvDcj+qli\nHa91x/RcbrM+wQNhOOyYDYvqYF3u9gMbZzNrnH7Dju10ZGuwZa44ex15/ZyQ\nDNXZUsqSUbmJE+liHAIi7RSj4jQF1bQrvJs7dOvPpe53Fj/QXmtzhphK7WTs\ngOeZNUDEqp6E0SY2pgx7w5lJLB1Fdc7FKnmst/xcJP0zmJwJUdrurf8Pz4HK\nKcIR25ZrZQTYLmXEhn2h9ER+wRL3+oJP8YtccaKcBhMUetQPc6gOqUC0gV2n\n36xxAjWOZyIlzyNi2Np4+tDbyZvdGXm1JYzfgbasOKUiSVEia0jsa5hEbpnC\ndB6Xnvbei/yeqTDdEmqXLLe5LeanhEBxdIn7toG34/hc1k7DyTBXPTtQ4C+9\nKklpVCfKLSpzEnWfxF+a1yERLg/qlcsVMqsiJmYdhza0px1ak/dF8znqqHzA\nuKSZWp3jlcSs/G8+M1371YJfasP7+NoJOr2QVBV69raaurQlYbtieFPzEmA2\nOUZT\r\n=nZ2O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4b198682f4a767f4764cf68f26e8998a0ff62b28","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.59","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.39-renovate-non-major-4b198682f4a767f4764cf68f26e8998a0ff62b28_1618292934306_0.7235740338081154","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.39":{"name":"@balena/jellyfish-client-sdk","version":"3.2.39","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.39","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0c515056715da01514779637f5634e2b10669ef2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.39.tgz","fileCount":39,"integrity":"sha512-3LE056lY+glWf27kFw6qrIjbbskcNg53wC/nlLjjbISZ8t9NyJSKtoz5+IFWUvsGk7b9OOHTVgyT79oip6qRTA==","signatures":[{"sig":"MEQCIGddsuL4qm7/+ZxA6wnl7dTSpKgY2q6LpMJK8b3J2uczAiALaF6PxAUp4Xk6ogbketeEYdmZyByyWMbwZ2kND0It1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdTGGCRA9TVsSAnZWagAAxHIP/RYn5eN4Ey+FaF670QM/\ngB1TB1NqjKkccYfIeolyW/6p4uZaXusindklOD8/C71UImNnNlIoVh+IkOuv\naylE5RuiCHc9trtpbmlYZOAN5OxYdOBf42GF+99kP67XyAHOi1L5HRH2vi2b\nJpBz9TlaIEx7bbE7ijSeLsxfLbEBo0NaHkKjIJg1bmd84rV4Mg+oNSEehjxs\n8ktbe3fLVAE8WVazcdo+FPFTDIHLcy17xxbn+fJTYrRPHAxiA2qlXQXq5BSK\ndHBbYEmXH8KtLPvccIIZL+UiOMj5ckRBFYe6J+Yb/OLjpra6fWQJCrrpLxEd\nhCXsDA2TT0BexwqAj6qq4GpL8DDxLn/Ex04NVi9uLqosxLFyjpmt0Wt0nVZL\nu3dsJ+v4d7MJ7Vqd20fo5/Z+PXLqzpsz6KdMgj3/wwoqfXxh24NecvIXbuvF\nJLB1l1kuRtp3nlZ+qD8anLXzH+y43WMmtAQjQW5htRxj8QfrE1WMGprcUSPh\nCWobUBnhNaTkv4PPIVeVLj9qf81jIglVgiWdz7OVdia6KPQ4sr4UfVE/Mu7i\nQGZvJweh0x06bsHtUqe43BE6mAoyzDOJQVa5S2EzB0FmuJDyEw6rYj08x7Un\n2O0uwa27ZD6TLmWA+o94Wv4kqthpfEuawMT8xIcnFZcaqvg1CPKA/BfbhMhZ\nFqm+\r\n=5T7b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8dc4becb7f5fef9758c1e359bde5e287094ecac1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.59","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.39_1618293126189_0.681174704369242","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.40-renovate-major-socket-io-packages-b64319c0d3690891a6ad5870435589e2b9ccc82c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.40-renovate-major-socket-io-packages-b64319c0d3690891a6ad5870435589e2b9ccc82c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.40-renovate-major-socket-io-packages-b64319c0d3690891a6ad5870435589e2b9ccc82c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"801f39842cbd5bf523a12cf95f50ff964794a55f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.40-renovate-major-socket-io-packages-b64319c0d3690891a6ad5870435589e2b9ccc82c.tgz","fileCount":39,"integrity":"sha512-x5ycoDYUwxah4/MFb/Bf2SB3NaEpSlO8gDFj2n4whmAhx/ViM1mWsIxoq4kUfs1DU2qb8BgMpPKpu7oZQbxGSQ==","signatures":[{"sig":"MEYCIQCrcbPGvL8UOqfjKHm0CSUvTIdmMQKfmYR5uatjM2IlBQIhAO06B0ni8AHF0Ryo/ixzwy/DGf05QLJu92FIwJUwgagn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdTKjCRA9TVsSAnZWagAAtzsP/24lBTj3bPisv6OMi2jz\nCN3nE6VwLUSksVtFPyA3BR0GJpHgjPEOx3LKQPX3ei9DfBTA/7Ry8XrMqRJq\nZXetxEqFIoCHEGNu8bsQpFBPcSOp5Bj1z0OCSbjhWcmk6UDApasdkiDJIH64\nae96sIZBq2hSR6A6gqbEGxQwIF5ZjWPOAOCUsE2j4R/9NvMKtUE9TYLWesRy\nQBm7ElHY63kszgynW2o6MAFbP8FlBjYp6TkxUFjM1Z5nWtiapoSmf19d78nn\nj5Xatmowk7i5s/4z4lJGQ2Zny+35FY7iyxnCCXbdxfIlejv8lX1HlMlixIbg\n/bObORmDynvUTWkatzYcVNwn1OknXW3RYtyCXj5YjSdfbMyyW0ZreqckJWQj\nDnDWGczY+dxEtTbPbhbHABGLdgwa6SEaYtRIJUqgS6A05cyl01hokSx4HyAP\nhD5tf1upM9mNQ3a3bDwG0KF9/rBiL/2gMQjlAZ6X/ydbJ5qlwP0hz92JUuVj\neHyCMov183FNSigTbZ9bVT9q8fg/gUq1sgHiheIHNPvcjk3BDcnmnKvUp1MZ\n2b38zTjNC3tcQVfGxz/ieAiOhYY5O28Sixgt8sssAqqLwT47wZa+9dCIIDRI\nDdlio8jcHwNyKqeNwpVD0My9RGUxOQCvdrBnCrY0TnDtX6xUwqlfWOUbyvFe\nMrcv\r\n=ZUNk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b64319c0d3690891a6ad5870435589e2b9ccc82c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.59","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.40-renovate-major-socket-io-packages-b64319c0d3690891a6ad5870435589e2b9ccc82c_1618293411410_0.04302102625340165","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.40-renovate-non-major-df1778b49d11a768c2f508d65cfd02888d3c835d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.40-renovate-non-major-df1778b49d11a768c2f508d65cfd02888d3c835d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.40-renovate-non-major-df1778b49d11a768c2f508d65cfd02888d3c835d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"47cf454b072d0c2f79236a15b17c2a3e0ea3c95b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.40-renovate-non-major-df1778b49d11a768c2f508d65cfd02888d3c835d.tgz","fileCount":39,"integrity":"sha512-XXo0rhghSoWbUJ/zR09sI8WaPLNMNaxc3dVrSpjBazWSBsLwRaEq76fK3Y5c5UBCQS9BuohrbRCE56+BOlXv+Q==","signatures":[{"sig":"MEUCIBN0ofqa36H4cdfKWRajGZfk8Jk3WyPzS6ZjOlWn6BjPAiEA6zgKpf+SXHsGXcdeLXyy7ToDNIjtL3j8STHa/KMyZGE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdkJxCRA9TVsSAnZWagAAL9kP/3NCwvofxA/tGcpKESo4\nRuDjeesU4qsIIxa3rQPSObqiOuPawoiw7k+tcCTMCoM/O+ZHXE4m8SE/PUk5\n4pnHXCm7yRCJXNT4r7rTtEKKCp+QeL2Jbe2/jKGoEmNPLU//d7gn/7JfvSD+\nUKcvQEb708JFYQKWnNTzx/HtJ8xaGRcic/r3N68H6IHyQZckzPXYXWA3JeFu\n270nlqKLR4VDgYz10TknzfQ7uuybuG62AHwyNTV7HTND0P3U2pA8AGoPrcgN\nI2u3tFqiNblZd4cfW138Yddoa40lrke4khIk2LCNclAAIAesxdYNQfgGjQwq\nCizwCNcU5r1LoTbHdtuEFgsiLnyBa1zMOu9kVZNCl6Tga0CFeevkyrsQeLLt\nes60wk1nxV+ctnP5gHbPyHi6FklPvTa/VgN5u3k+YRSyrrZLJT0ImygnHT4i\nFmNI+2tOZffpc98Xs9QAxGslooCxqqyHeEONLjL/+gcDc9ehR9aCblRlr5cG\ndrkODM4d1w/6vGz4jVjh/X08rbgiL4OTb4KecCvDUbIggJ6VBga9uEa/zbbe\nE9McKlM+wMTbtG06UwzWEshmjy4P5c3h8IxUJuKVKmKQf7EaCKOMpa1y/uEU\nLojTsTQbIhVdCmglNmEuphfxhezlPVCEcYjljHD9fhMZEyMxsWUWn2+Fasp2\nE1bY\r\n=Xh0w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"df1778b49d11a768c2f508d65cfd02888d3c835d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.60","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.40-renovate-non-major-df1778b49d11a768c2f508d65cfd02888d3c835d_1618362992577_0.719535929802049","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.40":{"name":"@balena/jellyfish-client-sdk","version":"3.2.40","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.40","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a59b2cf5dbcb542ced4dbb44ef49c0d42b1db9e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.40.tgz","fileCount":39,"integrity":"sha512-rH8xSnGmaU4qXF5z9WJ/MzWlq+zgMFl2xThjzCY3BsWLvnbzJLCBgjQ/VYaIuGp6aioBS2ZwgJY9VuV0LI6dHw==","signatures":[{"sig":"MEUCIQCxpemITkhSaihMtSi7s2ShWZH9b4QYPaPhLkWoCCFXvwIgSxZ0rog51lG3fNzYmBMx+WvfJFXKRfK5xq5aDyFH0Cg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdkNWCRA9TVsSAnZWagAAh2wP+gMQjmIxRttAAu3TZcgu\nAcxb0rnFz+0yAAvkBi9x0KLlKS7TTFvFeaYx+BfrEeKVbFKvNDhxfMeytVbI\nGezONGueUMUvhLXG2ZtxJi79IzMc0WchY1sgrprJj2822OvthXp8LXuQnOTW\ndOyFHWPEFu1LGTvXG7av/zpEb7Lmis0BouhvpesToEd8cj1tkvtQwgPZ8d5m\nWzR1mU/esm56R1t0isI2Wf7h6LzYKzWH6cVinmCbMuyEYe5KWYrM05iGMyuu\n93/23bKSqgITSeEt5oHYZlM/bXQ2NdPeS6PdMoH0qe+vK31X7c+BRL2mI/VH\nd65cVDegeIVu9jB1AdKms4JQH5jXupIcRcvEcaF2z3rrgr0xzK+JBbovUJ4L\ngUknHaYHZcGmeqb3p3xn6kjJJ40iRTZEuII+VJQGvQ8R41rFiJ2ZzVzQQj6V\nkACl4S1k0xHj8cX+SFdsSAt5BuqeXWIgvjFE33kk/K4cCVL0Y7pmK8fZktUc\nxw+Rkki4lbHzeNusMEbRCJv3NM7M4sKknrDEBJy0M+VVfc/YXK80Yk0RgXcx\nWkNlC2xCFPPMvsrdp1b9TF3DSNndtQBFHEGuicp8zT7Ce1BYjF1ar+ArWQg2\nxt80c6kcKrkJZdjmg7LHRVhZ2XMV/Tz66gbWs7ESojpPbK5Iy9Xj2XA5di/7\nGE7S\r\n=xnIo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3b1437cbe7b447de529b821ca7a93fca1f0fa0ba","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.60","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.40_1618363221486_0.24938048503867138","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.41-renovate-major-socket-io-packages-603adb5289339ba3b0b8395ff59147677410ef2c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.41-renovate-major-socket-io-packages-603adb5289339ba3b0b8395ff59147677410ef2c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.41-renovate-major-socket-io-packages-603adb5289339ba3b0b8395ff59147677410ef2c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f0a354ccfceaaf281cd38599327b8621c054507b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.41-renovate-major-socket-io-packages-603adb5289339ba3b0b8395ff59147677410ef2c.tgz","fileCount":39,"integrity":"sha512-osVXMpIt73/b5XKo27yjDKl1kWuu+aFPSJGDLNCqYBagcySlcFKyjW9QBqxoSe8dkSuxNBkhLnMZasC/BnJEWw==","signatures":[{"sig":"MEQCIAZ6jAx05mzZ+RZKHYHAZqExgFvlPjpBmb1fg/a4yM05AiB3yOglWLrHFR3Kz81IEiw6pO9mWFBQcQE1Q2pEZWQAsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdkS7CRA9TVsSAnZWagAAQ/QP/0yeoQTBGvoJ5TP5bWx5\nFpODHJkeRr+nn1NKGuQyLyNJ3UndrGAgjGaV5Otxv6qoc/vZWiA45FmtY+bg\nJ2ThXd0HqNFNhaWPbHVlEIfoMhg+xsulIUBuih2JEkPPQ6O6vzoTiq1oB3tK\n824ebSRDPXQFx4YlTPnSWO924icaeQDfdZ8miTYjNVNIrJ0b+L6qPuBjcE6A\n1b2a0w+ZssqYMb0+EzaJpTZh4CCokt7q7a82lp0a43rhRn6tHyawbehJCuTW\ne75aOAwj7P9kYmY0yCeiAcdx+z6t2paWZeM1naARMmyxlr2OP0SzWDYyF/eR\n/qGZY2FV2ekUqBsYgKA3X/MRs0u7KJJdLYk292o2phYSN5nchOKDGpymK5E4\nPkCOqznL+jhsUxtbBpx+J2BnbvsM8lse3wR4ASpEPAa5Rl6yA8H6Kjg0u2Gh\nUAbPU9077PsEt3t2iIIGNkQjFgr97qWht+aqPVvcvFpXMJFZEAShF5BSB70E\niEnQyQ/EPOs5tJlwPNDnEvgRu0ri4KTW6zELpaM7wf6Y5z4nAln/brYJKwSU\n+RHsKfYEvreTY68d6FdDumpZZG5AYBLuODxQS8wl7AD5F+loBgXWuurEnXWc\n6k/+RjVEjvzzwWO9Rowyi4WpIo036dhsbx3rlwV43uKhz2Z6TM7EjlooLx2J\n3XZG\r\n=SBXJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"603adb5289339ba3b0b8395ff59147677410ef2c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.60","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.41-renovate-major-socket-io-packages-603adb5289339ba3b0b8395ff59147677410ef2c_1618363578415_0.9943341390047042","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.41-renovate-non-major-50c37450ae9c62ac9a3ade09253cd8c30e9f5c66":{"name":"@balena/jellyfish-client-sdk","version":"3.2.41-renovate-non-major-50c37450ae9c62ac9a3ade09253cd8c30e9f5c66","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.41-renovate-non-major-50c37450ae9c62ac9a3ade09253cd8c30e9f5c66","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e7597e602051381d0f6d3b2379714c6d005b7b3b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.41-renovate-non-major-50c37450ae9c62ac9a3ade09253cd8c30e9f5c66.tgz","fileCount":39,"integrity":"sha512-llZy97Fxu4UDftexlnRUFqF+0R8FwAR8YE5nTjfRk+OFtoXDeXfGwMs7CsfAkSWg93qniZWfWMW5oLT74mGcuQ==","signatures":[{"sig":"MEUCIQDFUgVz6NplxxU4mj3zTShJhnnJQ4KramcKoxDOrvtq+AIgUH2LSNmp/JUaqep2s5vh1z8wBTsQuA86RABZrEnG3ZE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdllqCRA9TVsSAnZWagAAgKkP/j/mpJYa0xDQzyHU1bL0\n0J5JuU6Qq93OAyte1AegCYM+J8pKCJJ5xeJtfPdCwSa5snS2vC6NnCn4vpBd\nwkF4YQ73IPnaAPFi7ZPq85CX7r5uIp0b6W2zogw5txqe0Kl9ENVPZls5UZAw\nXfH7rasmHwVnE3n2+fDpPXc49iGfgm7JNk6ToS9jcaObTp7BkNw3IKZxBjij\nNnoxIUOYTD7v0sdjbNlljRqRJBEUIhNboVSHFG1RkMwKAShBJdTYniNT8KgB\n+7oo60WLRcwU1NcsZSMSIhAcdq9AUVQcAlFd+R4fEMXAFzPPfqfs6r9834UD\nR2/qxBwehCyb8zCEOKENEip0dODln59Jy8Zt+sE+dn3fFOvdQJc5hzHslFgW\nicrsWHQapUurA1JSoUhaMrRTJSejcq8o63m3oT6Th99StfFcI4UnlyTb+mJ7\nPM7PPoRjvlgMGnVRMQu6xoE9cnZTLx7B2V8FLPVzgapNs2MRQi7gsBhZO54A\ncq7PhAmn+qiZTSkolD1WL21xJoN69xxc6eCQb7OmB3FqqR4oBtsFm+sZeaiU\niPaFuZadLisMSJBD9FirWg49fX2/MyP7+8r4vexp84rJ/awEBoztNeraC2lr\nX7UM9GpU1P7Ivvl5qJXYG9UIKKXc52nVknIgZ4DAqgZmXjFOHFAKegFT8OE/\nkKSy\r\n=pMs4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"50c37450ae9c62ac9a3ade09253cd8c30e9f5c66","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.61","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.41-renovate-non-major-50c37450ae9c62ac9a3ade09253cd8c30e9f5c66_1618368873848_0.5885824034524973","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.41":{"name":"@balena/jellyfish-client-sdk","version":"3.2.41","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.41","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6509f1412387828ad9bc4b4b179849c12f0eba46","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.41.tgz","fileCount":39,"integrity":"sha512-UkcW1kJxHG9823lxOvYj2ehQfWDZ1t6o4BAsQio1TpdqcG3FrrZEihimBgpU7uikmcmmEeOkHuvMslT9DUFsXw==","signatures":[{"sig":"MEUCIDxWn+SC8+Q0jqYbmjuuKIhre+UB+USPc1tk/JgdvkF4AiEA2DcNUCnX2Q9s/a6i/lquiXd2Y9lYP1S9nwb4SjY75L4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdlo8CRA9TVsSAnZWagAAZNkQAKDHWuSu99xq2ItPFoRF\ndC2UjKYPMs2K0bkCxgi1zjpISsNHB+JcIgqTe1wl1D33WnYK/1eUeUPmeYY7\n5430Q4kEsbrvWEwqmYAydN/26hgdNhFXYA/58lS+JIzUqTnbcvqe3mJDE6N9\naUC9uVUftqFjdM9w/BovDyhrTG2e//0Kx/Y5o+xR3X+C0uMrtEjiIQd05eS1\nUm+plnvILdJrNRK/GlIHZ6GIwbPzS4bKT3R7/kZt5kyyAheC2cdocYhtT8E2\nboG/kedP8DmE/pOKlHZPolG4oDHv7/cq9djbv1hC6xxjWmqhRw+iifLWFbgw\nadSG1ZnUT3bd4FW6iOf8iVE9BWudFjoEJpguAbkNd889IGJ0oCEW3d9Yhfl/\ncDZPcxhVcjf9A4StNq7pC6EQhr0Nqvmoc62COaJ9AhyNKfDrUbqEwt0IIsTT\nxye74w+OBiuNI6xFf3QBxiP2rDYlmGCfFCe7CXBZx+cX7usHy5NjNeOfQgln\n6ZQvB4DDMz/2mhjYYQVHLrxjtBxWmTVO61XyGQuELKe1/2rnixCU2/RfLLol\nU1OF5BKfUO6D9e2YGcccmkcX/BfqX+VUiv/GK38NHV7F1x4xy/q0RpD3SiFK\n9mWYd8IdX/NWbads7bBOhxRbkg2mvd8DXbAhmULe+ihelk+yfaSbhYPPm4CP\nWKMs\r\n=gMfn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ac429fc0147a54962e5849e3ad7878fa99689e99","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.61","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.41_1618369083972_0.21853050748383152","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.42-renovate-major-socket-io-packages-d613caa174102e1173fecf74606701fdd665873c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.42-renovate-major-socket-io-packages-d613caa174102e1173fecf74606701fdd665873c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.42-renovate-major-socket-io-packages-d613caa174102e1173fecf74606701fdd665873c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6c43d63d83ef74b2f4f8170e5c230e7aa4586a22","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.42-renovate-major-socket-io-packages-d613caa174102e1173fecf74606701fdd665873c.tgz","fileCount":39,"integrity":"sha512-cuOyXTiqeo8FqRdRidt22emnIKFP2r/D1sFt4lbIPAzsVue2nCAViZ93etMXQQ8wXUPM5aX7m+Oh0A0xVUxWZg==","signatures":[{"sig":"MEQCIFjA0HxMECGbKawL9EyHEH2iFH/likQktJ0WBM9BMIIvAiB75xtZiqmHC60MW8/xC360Ou47XYJD5+qFiZkk3j/zaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdlsZCRA9TVsSAnZWagAADl0P/0OAnBYE/334cikI3DzV\nCsEmMCJZb3pn/IMLr8DQH8GuUzvTrYRDobWXjTWqNhSIK2hyyhnC/NisruPz\nZoPn2cpiS19Az9f0I3Jimgzma6JFzzyCHP9bbnSSd9AhC578I5Ilvp111zzw\nPccjH/1EoskEKQrtG+5579tgceMW9lHmixK9b2Sa3IYCSe8/Aa/dG3KRec4c\nOMvrUuDfWyUgzRSoUqbdulQh1To1Lha9rm3ceGXBcWFCgxQhdqjekHVbAwZO\nyQ0OzJMzzK70vy4yE2atZLMUsKdX4wDUM0qyOHON8BqZB9StfeTnSyDHRlk9\ntl6NWIUImDdbQaSGYqSYRP0ZE/WUKxHzIIFS/eboQUWKWYSBgQseMMsKBqbv\nQ9n7yE4NAsxIMMqyxrnEeV5O1QxFsBnWWxAvye6SYvRZLL98TB7XEsX2AzjU\n5KCSH3Hs12NwKwyX+q6/DRc/NTXH8y8+UD4LFo9XU6UwnR0fqXlqi+i2zgWz\n3NcPoomc8Fb8yVAdxe/9ZzPjNrJRbVar/rXP+mcprpTbndfK7D29JJrlitYl\niZ23905ejby6K3TOxOhYYQRp1Ys86WOEbNAGLcvZUaWOLUndlr2Qs7xbbBup\n8TrtW70Zo+930e/31mAKfDwpd8n59dq4TA3BJXeZXQc/pbsSWFTfRP7O2pFj\nIhzu\r\n=+sC0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d613caa174102e1173fecf74606701fdd665873c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.61","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.42-renovate-major-socket-io-packages-d613caa174102e1173fecf74606701fdd665873c_1618369305174_0.08446916281118688","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.42-renovate-non-major-23796c2da703ee93ce3ad8a8032abe6f64571026":{"name":"@balena/jellyfish-client-sdk","version":"3.2.42-renovate-non-major-23796c2da703ee93ce3ad8a8032abe6f64571026","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.42-renovate-non-major-23796c2da703ee93ce3ad8a8032abe6f64571026","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4aba1dde47aea7fa59f308cdf1a46ee3518cba55","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.42-renovate-non-major-23796c2da703ee93ce3ad8a8032abe6f64571026.tgz","fileCount":39,"integrity":"sha512-q3iRdH0D/85GH92m+aXSWIv2BUGq0KvNEun1gY+7Vl2zF9532FBzsfWAUH+l8blaOQhnMe2VxipLYWW4uS1LUg==","signatures":[{"sig":"MEQCIEs8JiQUJTT7Ct2GtMNWWY/v1PjJ5U4pgyzg80NUzpXxAiBu3XUGtc9lel0irhCO+iM8qV1/5hb8mEko5R3x03PRbg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdm9UCRA9TVsSAnZWagAA53gP/ix3wcYErMWmDtG3xBFa\nAegGr6JEO404LlKEUoLVmwCGt9JLcGGe4z0P0HBG8soYygJfYYLZR7L9n9WR\nr6N7EFNRY4wrAz6q84dGf5xKkE9DikhoeyOEQpDv2lT2QkefaZi8srTLf+cV\nTRM9QdBQD4W+9g/G20CMJFHYGDgTo6UPiWKpxuOAYN7heIs+OeigNBCGCqXh\n/oJMr0KpoZAMk0MFHdVwmRdT6kh9W1aResPrRvc/OPVMCCtR1oG9v7TnNIgI\nuUNjKXMoG9Vdpc0RYJ8P+FIPq9PqVLtc2yDslF7EXPUpPYZKAlUvCliiqDwR\nsZUfwTZiVMhH5awjHl3woYw2nkDV1wAPKECuNVUkbYYYWuojLW9XC26ChqKw\n8rJ3klQoEuAkgmlXw23Y1n3uXaDLF1TfpRlb0CRZRNVDUZ/On7mSku7HQ0GS\n2Hdz1nuD+xCAiZYJut+spsv2OxY6iMv9kCDuDskY3Q0IDot5uyUNDksCyKhs\ny1woP5vgEiPVkej8jZzpGSz+s0aehY/DW907Y0N3SlGPA0AlG7pN0xaPPXcz\nGoAk134xhSaUL5oAcqFDnMuYBLwIe46c6F8mY2D8BeBqIE7sCQwrCw82x7nS\nKzgdKd2YQPJfLxHOs8YGHCBTC4cX6l4wyhMAPWABo+iD8OYZH4QTjQ+6xilo\nk8VV\r\n=rCA5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"23796c2da703ee93ce3ad8a8032abe6f64571026","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.62","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.42-renovate-non-major-23796c2da703ee93ce3ad8a8032abe6f64571026_1618374483762_0.8715168523522103","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.42":{"name":"@balena/jellyfish-client-sdk","version":"3.2.42","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.42","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"133402981fe0da7d30e0c222438c86fd915afd72","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.42.tgz","fileCount":39,"integrity":"sha512-vGink8keBQvTTT4CPyEZCReG/0X4ydnnDkMOKVRnMLaPqFbP8wDak+K+YZNypwYbzmww+fCBSgheAXjOKx30zQ==","signatures":[{"sig":"MEUCIQCcOwy91WgRIYOLlLubHc5xWic/PBF5WE/GPVhc2xZhkAIgEvY8Tnd6kUwoWT2sIhGeGQGZDC0vpHp2uY2G/4Q0Uok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdnA7CRA9TVsSAnZWagAAW/AP/ifQD3xOESElgGblW9/H\nCIz5sK+PD6+SGcXwgaTB5JjAykcpBbm50LxLi/42yDBaAqBb9jZV1n1kPrvK\nZfTX6R51dQvXdyIuWRWwTk5M6YaTtQt9F6BWRGP6trJdcgZqu/slRxJZ78ZS\ndZVjADWnNM827F0IeRQqvCrW41jq5XQ3406CIKI5S75gKo3FhZXjtnBrITgo\n4lwA/FAyLyW3tX8CPTBgBL5d5t2584f6leQA/u/eYBgnuxwQ88XD/4vGKVZY\n2Fco0kfHRAsJBbNRUTYGrzN4QTijpv8+I1Paams+K/yCAUdlzhuFE0GBFVTT\nNW4fK9JnAqo/Iy8TBjbMwuLm2KO+fhPok7BZhyZAzK6lsoASERWBROhcerdk\nu5Riv9GzW5LW5Zb1VC1XwTd8TyzWpL4yCwOQ2uc58wskAwpe5EJu3gZYT2vb\nW1aGQVhFMw5xpBE8lmohdKfzzFaxkRK0nE4cmihc70hfHrACuF6mYdKDprkQ\nqbuZkNMEyhs5RcUjqY8DNM7T5Wi0ErYK/c7cC1R7X0JsXN8CJl8zN9s7VuSb\nRQ+RzUK+iQWtc6Qpq2y50xVoYX5hmM07A/t9tHaJY39zudACPBj+aFaQpqhX\nztNoJaYbTgHLqXR/BKllhfGZFf7DCU9eRxFECe8HNbEPYFzfxRBL0I0GdF0B\ndvEw\r\n=+niF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b8c6582363dadbb50323832a409e63d55ee81bb3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.62","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.42_1618374715429_0.041816299725485395","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.43-renovate-major-socket-io-packages-5d5c82511da958fa8c9502e2cb7ea5656270a63a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.43-renovate-major-socket-io-packages-5d5c82511da958fa8c9502e2cb7ea5656270a63a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.43-renovate-major-socket-io-packages-5d5c82511da958fa8c9502e2cb7ea5656270a63a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c83b02ea66294a775f322c4d4005daae0360feb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.43-renovate-major-socket-io-packages-5d5c82511da958fa8c9502e2cb7ea5656270a63a.tgz","fileCount":39,"integrity":"sha512-wP5rL09AAk30a7w5KhmTYL+nucmN85PpIfrqkgAjljCU64e2vPA33S5v2RTs8Y/Zs9AsmeuUa2eI32da6Nh2WA==","signatures":[{"sig":"MEYCIQC0uncwX233MW7NYZLgt/Laci6A+zeQbAUfoo+DkKxj/gIhAPfKtypFd57bqUh0I2Hzs+VJnAot8ZRu0PcoPrKGmqjV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdnESCRA9TVsSAnZWagAAeakQAJruJxUCFBqeL3LskQiN\nu0AUVWBnnncuHppbsWm3Lc8mi5CruiMgYVY63HyHdorbqz4jmcNRn2y5YpiG\nOtXnRblapD+SPRnwhhUFgdigxrMjv0diRjfWsf+zenwEkX4MlXyz8yxuHhtW\n4Wnaatof5qJLF9mf8vmuvACvg4xEOFKmnQbbJwYeWTYwBUz512zBkQh79CaU\nCR9ev1xs27o/OUeKFG3CmRL9BbJw0Cip43JdQEMNz0ABpBNqbAADpmu3gJ9o\n+NVWTMiF2hwzkEQTWvxmv23o9PmqPDEdEmMuZaLqt1n4I5cCMijcFOJ1t3ez\nmI5cHrWG0kNyzGA7k3K7tBYQ1gHtYH5rxLpgLQLbRbKdGkLffeAIf+W9J7yX\n6AhrRziF36FTnH/74MJN9eYuTNfMdxcJ/ZlMw7UtZHI+bKnj6rYZShV4GpSI\nmY5Y+Kgr2tkd5a589FvGdbT+lYIhxBTqqvyypopFCJAfQl6ogGdWOgsUvskx\nJ8CzCyocsUPMo4DgRS7dqxMObFtgBKF4bwBQSEarfzjG7ruX2ZYQ0DhEUmnW\nNSNzsLPPVbrZ+AnA/IOWBFFikOGKc1l4Jth7aZ8kGONn+BsTDCO1la80bCPA\n6WmJTF11Ao5z1HbKtjJowtFaFnRYqsfoJmT5EC5q2bD/NUJ0JjzmlqYe1+dq\nHFlR\r\n=fEcG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5d5c82511da958fa8c9502e2cb7ea5656270a63a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.62","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.43-renovate-major-socket-io-packages-5d5c82511da958fa8c9502e2cb7ea5656270a63a_1618374930172_0.8162593567026273","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.43-renovate-non-major-7d81246c3dfd41cb95f1d2ef85928a12cd7af400":{"name":"@balena/jellyfish-client-sdk","version":"3.2.43-renovate-non-major-7d81246c3dfd41cb95f1d2ef85928a12cd7af400","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.43-renovate-non-major-7d81246c3dfd41cb95f1d2ef85928a12cd7af400","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9597d3f457ef59f22a565225dfe0ad5206791ac1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.43-renovate-non-major-7d81246c3dfd41cb95f1d2ef85928a12cd7af400.tgz","fileCount":39,"integrity":"sha512-fRC38FgOIgX96P8fnknDRweUFWLifGmIUZNHNrPU+Nf7aR9k1mF+cuqU45Pb03IjXV3W7wOzgoAhp8b6ZklRaw==","signatures":[{"sig":"MEYCIQCQXvh+trdvuf8KbjBAEJP9507xcbD9Lvof1YxWeTuTtAIhAKzMC4+Ibzq0PVxVIbn/N509oeR8/zs9+H0bC0ITadN+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdraoCRA9TVsSAnZWagAAEooP/030W23Fg59higARvurk\n1jqqlrGB2yw7ntqunCMTdBcR+npkaWG1oAcs0BiYWbu/d1kp2IByqyAY6rFw\n0YKlWv9O2P+2dlInpKQqyLc9k11NS3Emt3geiaeXlCdbXaHYv5JfdrwGk/CD\n/GmZBQiFCUOVEvcPUxBDkV+D0M3fIXhB0SoQQMq3kVO2f7crBPy8ZohVC856\nrS8fZizW9SDl/2XWxWDk/6F/XMZPA4elvbjeupKEb9yrimJs+ZOSOKGeAFWd\n27ihyhVUUYCfIOMjaFIjmXGNXPy5gwwNKsNTOJvChyG/90O9CM01MW2uiL+Q\nqh11JR/414+phNzdZruLUaSohLegaCKYU/6FKPJlYnq1l0RM7CrvF0CaRKT+\naIQJCjakJ8GsxCEoOzlCUEbRMFEacaaC+MLEzNOYJCXDN/I4EzFmUY9jtikz\nArfSB5LirEIVl4d1EleW4fBi/KmoY1QYxh/yyNSarRfjYKWsfNuOIdGDfout\nRf3zZm5oJMybfIhoI9QSUpUH7kl4Olz7VFsEftGcX4cmL6mZvyuZe6NVTXyr\nbwgaw+DZmcpyP43TIphJ5lP+KCS+UmQ3nD6terTgMGjNmaNaXGIEAoVfr4VU\nggElZCJ8UQvkAwFk/JJmzyI6KGLTrWOgOMA40+VW+XJOR2v8uPSKxAhcgADw\nncT1\r\n=D86K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7d81246c3dfd41cb95f1d2ef85928a12cd7af400","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.63","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.43-renovate-non-major-7d81246c3dfd41cb95f1d2ef85928a12cd7af400_1618392744299_0.7460954876611234","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.43":{"name":"@balena/jellyfish-client-sdk","version":"3.2.43","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.43","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"401caedc1af98506af42bcff7ab5c999c7456c24","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.43.tgz","fileCount":39,"integrity":"sha512-2Sgisbpl9lwHjUTWcGxvtSwWtXlsc+FbOgwoJEp38ilp7/dCPwVvhnY5hWqTScgIwwFKvPwBaB3d+3mZ3VX8FA==","signatures":[{"sig":"MEUCIHN9XznE4fCixDCOM7j2V9zUaSfPrQE9tBUZN/3czrzgAiEAhbPx7wwFKofVN83h6uykgawAENXfcuD+BSn0+zTlebc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdrelCRA9TVsSAnZWagAAJhEP/ib/mWkXR4cFC7PkbyaD\njzaAtvCsKdojkMGInYGtLkEfUCf6MFv383fjeQEWD2/HtqSV+SxwLgXcIbMC\n56xhOqrsPSZr5c9Uce7CMIWN0N1sTYXcE28IxJT56NUXtMjgdrF5zX6og5pc\nXQ27iId42iTu4a2VwL2ay9hMRgBN8VooF8QmzOqz1rdy+qtgtTUCZR+6QsKI\nnC86rgENuiAXlxTo4QvjazjFWXDFUHvzoj9jWKGd+R3UlGeLRVRumWyWgI4w\nK8ID30Cvi0LCc8MrYchCc/Bt1MM/COiVIttz6Me1cORume/qP1Vj1LxEO1/M\nLvrvtXtU/p9/vcXhsxinnIC+HjUumThbUaRpxpgUHMUzRf9EYZt5lLrvjHTZ\nLrpCtofhy/lRK2FK34Zi6qZOKp5WznVBSYZzmgMnr0r+8uQBaBX1FzyaOVDZ\nqeitMIwfPVjX8eDhiAEIht9woxdSSH9YNv5B/Lt4bD8HGW/KF/eNxzxN6tCA\n+vNME4IJvOulxoHGEezknscYeQgGZpIbfeJgPNgDHjHXUZPVH9TTYVyb1fs3\n11waBJY5yDX8bxDeXtPpLqHVtn+Rw9xxFtQvIOin95dxn+iQV/JQyEkL/wjf\n5r/aeGZ2qwju8CdTA/P+7qcWrHulYwyisKsTdvBejP48kBU+aG7ebmGlTeMw\na2DP\r\n=2CQZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5d5e37334172069b6f99ed93d1e72e57802b46e1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.63","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.43_1618392996689_0.5283210128151961","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.44-renovate-major-socket-io-packages-b35b15fad1d8a9ef1e572efce9a5f6250e2d89b6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.44-renovate-major-socket-io-packages-b35b15fad1d8a9ef1e572efce9a5f6250e2d89b6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.44-renovate-major-socket-io-packages-b35b15fad1d8a9ef1e572efce9a5f6250e2d89b6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dc031d80f7e75e09c22ef32c68f850007ec30bad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.44-renovate-major-socket-io-packages-b35b15fad1d8a9ef1e572efce9a5f6250e2d89b6.tgz","fileCount":39,"integrity":"sha512-TaTXtjsNFkpAiTnV+b6SsfzhX4O7JS5I5r18z2N91r3rP6MVESlsvWWvDXzhS9wKdvuLIxCzn3xi/Wr1V9NYCw==","signatures":[{"sig":"MEUCIQCwIzMbZANOfIBczqxpY47X6MYQ8wLBy1rW3fHH8T0AggIga8S3bboM+1v7zvuU2c3oPoCy9VAeHNJiC5qIT/Ew1+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdrwkCRA9TVsSAnZWagAAvXIP/10bbwDimG7GYwtq1vMv\nU4oRSZcu3Mq/DIhG4ZqfLl4hYXWLN79eSR70RS+MQWq9tJc1mhcvZXLJfBpi\nhZHU7X6wyKC2/tvYKSbjk02zd/Nlipi5/fXrR0J7w2jmt/XJ1JumS4JEmBt6\ngJlo8Bb/gUZDi/i3wy2ivmV9fkLdOKlWuVlYewxyV4Qx3LCbCcTRYYdoKYYj\noPC4LBhb08tEM6e+KMXpi79gw5aNptBS+gw8Kjn7N0yTuwS141YTy9jSOzmj\nNYqbdPCA+HnyIcwOcyRXmMtj5DCSZksM/cJptXpA2XbO1iM+tbaoPHq71lS4\nEyLhObnqnNNcqaWHCzGwk8nA3WW1sPl2nAF6+pDiZBeSlPHYODerBJ4vWSbP\nSFxKQIoyrf/iuayG5RGgMWEi0TLXcaCfbs+4SkUgo3ceDmmr3FjsDVwGWZvs\n/2iWux8ljT94tXJqhUFyacYbJUaRMsnG9QSK4HFJIPJU3x/fPRDDlahX9Hq7\n0hTleXhCyX7Nnvyqck964lsAdN0LB7/yeCipE/kEDhqHZPzrXQ4jVvU9Tx+Q\nY+/wxnEDpda4Bk9OJHSf7LJNKZG4VDRMqGkbQjPjsXzq6JuUFbfYECxPUCg4\n1EVt82otGD/lfUe0L5+Sws7NnMeQyM/uPkLPhgcTGL9mLWRbWrOVpce0MgdK\nZQVt\r\n=oevG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b35b15fad1d8a9ef1e572efce9a5f6250e2d89b6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.63","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.44-renovate-major-socket-io-packages-b35b15fad1d8a9ef1e572efce9a5f6250e2d89b6_1618394148128_0.29893841131782617","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.44-renovate-non-major-3662addae3fb0ba834d962d8c6bbe89a4de7faf3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.44-renovate-non-major-3662addae3fb0ba834d962d8c6bbe89a4de7faf3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.44-renovate-non-major-3662addae3fb0ba834d962d8c6bbe89a4de7faf3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b90509bb18d161129ea23b53d31990c2aa880a90","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.44-renovate-non-major-3662addae3fb0ba834d962d8c6bbe89a4de7faf3.tgz","fileCount":39,"integrity":"sha512-FgcpvOH2k5t+SsjywVbNslVpOwcObFEBwWiR+wSCDbrv94y0Zp/XjaJo7Tajbjazj6OAElJRkG9qoXqEZIanTA==","signatures":[{"sig":"MEUCIQCE8jjEstDWR208kBPO5jn9kfyrrUDpBkFH/in08+V5BgIgA0dq7IQRoQTQn6Nsf7rut3hNx/9J1jH6NUK/gNDEx2E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdsxCCRA9TVsSAnZWagAAdgwP/1B1IIe0eGZT4CODlLVW\neFzXfU8aggZruHDFGFbhOBxPSbVmwi4aVHpOWRrVBaX4+LmZ642dySKK8ASS\nho3PgLxY5M6Aq769I0Cbr2U/pv2Xp9FDrCSMj2gdpxF+F4TkKxqLFqIFIGpJ\nki5YQyELsZsBHp+/vx8A0ERAv/2KiWjXoTrMqCwzDgiSod30QqY1V8YrYxa9\nNHosM2Xu0dciqJRTOR9sDp6CWfDsPwVgD0DE3JePTeH7+cQ4s8/ItbQwuOKU\nAjzLTHbYM49pt+PdwpgtIysdVlyVmoTOcIQEZ9T1twayeMoDrldTMryQBFH5\n9OiCRChs0Sq0QPn+yGRlgMKxGS+VAgCHU9aBpoWQXfdmD63dqCKekVpqn1Ii\nF77r4Qbeqy4rmMjhjJcpy1CePi9xUpmpZrJQCDpcs9b5hDdKdQi8WzKeNniX\n9esAGe/nNyJMTwfi+sDU4gJhBULwwmLSwcixD47o5NSufg2FQxES5D1dht+V\nZKr3GzyOJo0Dws+/ItZOnwEXeI4YxUXGm9WRkUXW0uEd54uguh4eSCq15Veq\n1tq3aclhJRz66vuj01fKsNURXqEiDFulfcYa6nsnKfsBmMLxehV+XQuSxnnA\nx+OItUoq4/TBxa9iEs5CRAyOSFvmnQXKgg3TMPAx/AM78twnXZZ4c1nJ7Yt+\nFLFN\r\n=LGan\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3662addae3fb0ba834d962d8c6bbe89a4de7faf3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.64","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.44-renovate-non-major-3662addae3fb0ba834d962d8c6bbe89a4de7faf3_1618398274220_0.9372087717214646","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.44":{"name":"@balena/jellyfish-client-sdk","version":"3.2.44","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.44","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"15b6b4693e700e1ab029c04d0be8a2e272cf61d8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.44.tgz","fileCount":39,"integrity":"sha512-+RGVh/swqZvcNzFgfzagYXevmZ5h4VoNb4LkiiNNTvOcmmve8jxXBGefgSCpNUqV4fN6t1xCgZqFPIpIDJAdCA==","signatures":[{"sig":"MEUCICEndq7nDhpzogObWYSD2riIEJ1gPqvBmbHGepdyTovrAiEAiIRVIgTzaSyzXqIanNmuwQQWTjClRfLlQ8hMIWygl1w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdszpCRA9TVsSAnZWagAAnH8P/RhvYik6wZfZSEQ4efG4\nZKC0rlR7o7ZXpJcxNnuh3J0oiK9EEmLp2qthTApVeokqIagHet/V4Cgs1/1K\nNSO2DxXpmVyYry4c48Bh/h8fHwf3o8H/prqQhj7nHqMN5DyKoFKKOXU6ZKFk\n9bpDz8VIxuCwk0WyWCFzjCtTsuaoMVFPx7S6Vqshxt4nLB+AhZpRn6XrmIXd\no4K4iwvE32+B31DMCT1VN/15ZLj1dRjwV4f8B0lQB6MG458tB5G9o//my7UG\nJvs8bV/kSVPay/QGbvLPoBx41XzkxnqDkDPzwgZg9ygnCN+B2nMAwJp9vqeS\n5UahYy6l5N6y9wUGdIWAC3uSi8PzZAvUO1j+B6Ed33umGHA087YiAq6d8Is5\nTmT1WoEmY8JRudTXKSKu9J7CpTEFcK73Er7fCrSTVss8nx7E/UzQRo3GGFdU\nO3s/z6Gpfq+2k3rVLwNZ13Lb86gtN+f7T/JHR1e3SqipgpDtfTERrRhA713T\nluOjUP4DOKGQ4UGBs7bWLbBPKY1/+Ia2VeOueyOG5gmGGmpnFg5se44/ou45\niDEtZuwHKwqUCXvqmRSzOp/tM/R72HTA+/n2WHC57D5ONE8soLBm6uwrkFvS\nkJX84ryOgT6D1fgQcDOd2tFLhgvTF9WmnF3NdCeCtZTNPcaq+sPg/6IXgH9A\nBkTX\r\n=Js5k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e6dca5daaa6705adf8e9821eb0bcb27d80d8d3a0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.64","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.44_1618398440771_0.8501573815421091","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.45-renovate-sinon-10-x-c4a5be4960b58326d2aa5eadb43c07e97e146409":{"name":"@balena/jellyfish-client-sdk","version":"3.2.45-renovate-sinon-10-x-c4a5be4960b58326d2aa5eadb43c07e97e146409","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.45-renovate-sinon-10-x-c4a5be4960b58326d2aa5eadb43c07e97e146409","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e8931e2a70e4b70493b4167cac96f1f47f083d4c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.45-renovate-sinon-10-x-c4a5be4960b58326d2aa5eadb43c07e97e146409.tgz","fileCount":39,"integrity":"sha512-tZ5rarCKCnjOC+XL1TKJ61TMO5saMEKqY2shIbRoaz3jYRBoNj4FKgjRVp4dKPZjuWpCq+xi5vg2twDt12Tnnw==","signatures":[{"sig":"MEUCIQC6UEHK+5GYyeLETpU00cKzAsRXeIz0jHFmGjknuDvfcwIgUmgVbRpy7h65fXlpC4Iq37aoQsEDzU8sSeeNFzDoy5I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgds3fCRA9TVsSAnZWagAAOKAP/1VVNyyeVRiv/sDdkgw3\nrl7DvxOy5Bq3F2pFu+B8MBs7tTgkDY2E5pfCPAUgkPxKhxKenRLzt6t4ffeR\nQ7aWMVeC9kRX1GTSH8m5GrEmVLlBC4czkICXzTzgEU9Dn/WA4ihKIcQyU2YW\n+WztzyEPs/gAR9GXcvr21u9WE9K2Dg5zfiVCfV2+L/0pt+i7GeFX/g+y/JvH\nyp5jOLLkYVwu+Z5/TDbnpaX9ZhyPTl7nMlt3eSPP4QkvKMJiERZJu0r7C1mv\nHFekVYx/KKGncF77QN3nyE2HEwlnaf3mXcixbczK/DwcCp/GHO/55TmAs4ut\noL2lc0t0NrmT9y2iXuvQolvW9XUlfg9Jsjxvx7sn5PNF+5Mdpc2KGHlBgiT9\n+kzNdFAXKuA6Dmeg0z52G5geM6Cxsw3aUcumOZN5n2Cp0UgksQF522hAgKY6\njFxaYsXLQ3TV8GlmqycBrZAS48O0hqc1ohWf+g3JCoj7aeR6vfAMfInKfjhh\nwvQ4U/NZNk4SEqNNulNYKNdYSoOpez7zr6wXQKbPAhaHx+nDCse2M7Z4OePb\nBF0Fp45Pn3JZZD/iB7DpXpX/nRmQm/3vgCGnHZsrIo8OPT1MCMB8L5y4oDJd\nBqSPwgkSmOPxZnJUehWpHzyebCwNwSM9U9X77ym4DUV1FV4e4AtORTk23TMT\n5Wf0\r\n=XBai\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c4a5be4960b58326d2aa5eadb43c07e97e146409","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.64","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.45-renovate-sinon-10-x-c4a5be4960b58326d2aa5eadb43c07e97e146409_1618398687092_0.9445631823613283","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.45-renovate-major-socket-io-packages-9b21bc26a7c1beb3bbac2976c365301167e52f51":{"name":"@balena/jellyfish-client-sdk","version":"3.2.45-renovate-major-socket-io-packages-9b21bc26a7c1beb3bbac2976c365301167e52f51","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.45-renovate-major-socket-io-packages-9b21bc26a7c1beb3bbac2976c365301167e52f51","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a51805dbe93d378f4b2fe97ed13005177de68e30","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.45-renovate-major-socket-io-packages-9b21bc26a7c1beb3bbac2976c365301167e52f51.tgz","fileCount":39,"integrity":"sha512-tKyzFjJhZRFDQjiYbIDwjZZOO4nxqSqU0IiX0F2r5GYMXwUs1LF8lOJcXoMo1KbuksFwpO4lzYSF4OnFL9jQyA==","signatures":[{"sig":"MEUCIBMkm1VcWOMPfcc839+4xrm/NfXXIrUnY8KNOxEA4KFyAiEA7sXdKcO8Yhai829FFy0Q9mv6zIsH/sGMO84g+45b/aE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgds4ECRA9TVsSAnZWagAAllcP/iDNB6sUkDkMeXcXdWN6\nvWj+uBGNnvwVFfqxOi4wjSbybg09PxuJo18+5nvgqAQJMRDtzH9l7jJ5dczj\nL9mK0sLXdwkg7G9tR5HcikAzNnccbkCR58zD2ujD9G4VJv3sT8o4AXm8pemv\neHwxuLbLXvPf7ndkDFlA36c9OvZURganKLXTIlYa8mWW9UQi+2cuCN9uqSfY\nAAO4/OqOiv2GxFIZgzH32M6pj5RXaf6CbSg9imXpix7FTHvBuAVPYbxMXILS\nLw4zyGbYK8khfRynBccGmI+gg/yEH6wT+M+L+OBCSslJyCrmE/olTobuaOYf\ngq/iv2NdeuzuHtXy1+OO7MJ/CmrDwSmYPgC0gIw9gCS+M/ttW2H5KF7l7Wfe\nDt8j6+o5YdQKYMaggiMwon39s9O8pKVJ5SupjkQxm+ztB1va8XtWWLHnZFP8\nBafpRQPcczomAzTBWsNaw3lozPN5YjfC5s/L1mda47fdL4cLhDGFCs5XKQRg\nOYadDSpzdIPy6/LGsHTfGBwaKK+LeQVcLvuNe5OokoZRWlLtp+TtPYf+oeSc\nh1ugc5Rttwn6dEFvnwC8Tue86yIyMXXr+N2nOYspyH0ZMWcimuwmrraitMkl\nNvsB2eVsYK9sfsW4ds77JaLFoNSg8Cn4PjueXmIruMeRpVEipCaRP/IndFtc\ne4Se\r\n=TzXO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9b21bc26a7c1beb3bbac2976c365301167e52f51","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.64","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.45-renovate-major-socket-io-packages-9b21bc26a7c1beb3bbac2976c365301167e52f51_1618398724125_0.06666548912982329","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.45-renovate-non-major-37c266085f7496a6d2f786dde8bdcbb1cf5b0ff7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.45-renovate-non-major-37c266085f7496a6d2f786dde8bdcbb1cf5b0ff7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.45-renovate-non-major-37c266085f7496a6d2f786dde8bdcbb1cf5b0ff7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ac918073e49edc513303df344b1b79927d351f51","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.45-renovate-non-major-37c266085f7496a6d2f786dde8bdcbb1cf5b0ff7.tgz","fileCount":39,"integrity":"sha512-6gOQ/O+RSTJxyuaGBG7y1SHEhMVVdSggS8tJYSM0XWoOefqMz1biWrC77YLuo2VbumvCaorcUlCyHfq7DAbKSg==","signatures":[{"sig":"MEUCIQDGygjkgpxiVPVwRvUlSHP7jXxGc4fJuAX1RkWLmmNcsAIgCahFKM/9FqicSJXXQ96xDOIcTPHc/XVvrey3YhLTPCY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgduNOCRA9TVsSAnZWagAAd6YP/3ibQXTWIKvPyFkYW6r3\nrVF+CMHEsj9PTwXDLkOY5pp4COq0+7VtnleMd32TDYTKXP+yhw5zsiG/f9iY\n7dzfTBo6wOR7ugRlKOV4RGtnUeduQdLW9NCPtiOnyvBczKknIFhpK79cACXT\n0OjrcB97VpeAXdZVZuyYjWBgBzclhZo8gcZTTU8Qzl9O62+X51Ti3BnlBM04\nB/L3QWTZlUDwncsL7o2KIohYVXqhpIAbb2D/+XAeRxjMOVJMtd0xCs+U7AWz\nztwwSA5Zv1hL9AC93P0CwHkp54GrAQ55fapLsaGPUJEkouqi+hlDOX4DBnHd\nGUWI4BhqjSisEoWM7wIA9bLHShl1y2AXYQEMJqCd3CD8qZbIt2xulCVmoD9f\n8MzRwZSsHn8JQqDVnZaOWYTFfhgpoCfJTOjpA8yB8n1m148LHTlN48IH6ico\nrvBiGoM2vIRLf1exTOgIzKh+pVrTX8sBSmptkHv2cBLLbrWDYYBg7I8j4iIe\nmfaNEQhT/vhttS6+kgIplmjqwyAUMiWI/WgsPQHZ8K6Prz968lPQSxTATTWA\nKh7dclU8KtXqyyPKqSE5uXBKliEQFI2wD9LO3skDPpG4FTrhVUop67etWW1t\n5Iu52Frk7HCLpzqG1QBZra/Uljbix15kEN+8LLATnX7nDKIp12NcSlpwr/hG\nQL44\r\n=8kr4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"37c266085f7496a6d2f786dde8bdcbb1cf5b0ff7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.65","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.45-renovate-non-major-37c266085f7496a6d2f786dde8bdcbb1cf5b0ff7_1618404173721_0.6419923954983102","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.45":{"name":"@balena/jellyfish-client-sdk","version":"3.2.45","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.45","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"870b1d05d963d3432687dbd0a9e93606aec21deb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.45.tgz","fileCount":39,"integrity":"sha512-ZbScu9lNsq7JOKLu15hrCwsqVRbtCOsH2h9+fJ9nNwLy9Z/Y1G5aXMZ3yjrlgMSwPUWE6ivyXbozxOCVLHQMHQ==","signatures":[{"sig":"MEQCIAGxj2znJFMIgk+MzzCvkn2mjq/DCsc+GPZe4icBJhC0AiAW3HF3MG7C2TYq0ACfIlp6havkzStU8xprDo+DayN37g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgduQkCRA9TVsSAnZWagAAEgoP/1jeDvIgLRO0diBaEvmo\n2T6ZE6yYoZNIxmqf2AHXTTVyDiSBvesxiJzZzrQI/nuP5njMGPwzrpON/aDO\nUaNGo4fFNNmS/jAbz7Nd8+cHmuIG+SL8Obzz2l9Mq0TD14Pkbciu8Hrw13co\nKYtJ+RuJ/74ceL4Wzexq/pCon7GMdgChoL2IKLICvacc8c1/hnuZaTGhn8xz\nim9tWCss/JaXlf03nM82msi/BPeLM8W/PQ0O8Gk2+1gSPNGr8Rn+1yE66uUg\nc+UAFpj77LKyry6FZ3ZBxW9Kcz15EEZALJvDYZMpQJ2XcWD+2U3r886QPJ6/\nC48Kr5hXB1S1mJ6125xtILCyKFkLDn4ew4ZW0NyVdtTjnadTzAdaKfFJ8BWH\nLR44pVjvNETlNHm4M8B5v8cmZx7sdxE3I0yBjvR9FtdZpcovF6LQm0KCn7sD\nSAeKa7WO2GLrdS4G5ajY07mqmJsADj8eX/e+HGmt85J7/KrSI/lcdnL5lqvd\nKOt/zhadKGtzkdjmCjB+vXObfnyAz5mafcCtSfbC6jojtB9LhEP4GtfRyP46\nXTTcDqR2pOWI91UbAgG2F9mrVZv2sspqsxpYSepVQl+frEfe5HyVrMh+B9us\nYrJyzD382twRD/ZITnAcNYnujrhAkdCyPKRj/fVTDyvxdD7EA0IrmebhsMEe\nUU29\r\n=fxFy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0942b69d897f8ce4511d0942b4d916090d4dbb01","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.65","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.45_1618404387593_0.1490827401069592","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.46-renovate-major-socket-io-packages-d7b350438f25ed90d55581b3c461275e759e150d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.46-renovate-major-socket-io-packages-d7b350438f25ed90d55581b3c461275e759e150d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.46-renovate-major-socket-io-packages-d7b350438f25ed90d55581b3c461275e759e150d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"850eb5fc5512ca3b0888d3383b2d320a3f037646","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.46-renovate-major-socket-io-packages-d7b350438f25ed90d55581b3c461275e759e150d.tgz","fileCount":39,"integrity":"sha512-nRKV6bLeSwpnHpjEbF8lj8/9Y9Bb1ltpTtXZOypDgrOM4DydHW1MGbdfftR24Iai/bkzxlU+B0/AB8+fgG98tw==","signatures":[{"sig":"MEQCIBl2X/9DhG5yK8jyRZ2dX9Yx6c0jK4naKP+t1kEDdiKNAiA9Yoy0vns2850h8ywKXzZ82kwRVVHrwSyBIG+Fnu1OaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgduU5CRA9TVsSAnZWagAAhSkP/Apg+zI/+DiniMm+enpV\nVMiwrkmPInlB0TQUUIAGd6bv/zcrtAt5dCfGufet/uizuMYyTyffYMMq6Iel\nIxsOEZPCycwH1KM80BlJTn56b8dgedwkFNDk6/b9VW4j0EPeepu8GzjUtGfp\nFtF74eUdJx2hlqx+aWeyjLTyfPHZmRszlaozUFpm0BAKN/1ZpoZi6XYmKVrI\ntXfYwJdhrYgu4WUZCxkoT41lyXlK93V0eL7b93h37Mtwwcg5DYOyVoVf9zq1\nQqI7sAnVzJFQp0EBIn5/Hn1D5CeIRKLOM+vh+h1CRLHxQJdlL8bvTubn1AAi\nizaAiDXjQuyPizkfnR6G19isG8BkMywtOH21VMtf0mgOILPyEfg/GV+NgwsH\nKtRRg0rmuJ1vhgARj2G7fvAT8k/UxvOO1W70XZxFh1vTvBxpT+glbfPUi3gz\n6qmRMShMWPrSdX1KAM1eIIL1VLG6Og4qfQLVNHUbe/437cnvy7O1o4w3zeSF\n3Zv0cCPItYXefGVkJuIAxv0DmdWp3J8o+fqWHMTuY+iKoz3de6M8xm76k3Is\nARydi2JZPnmN/GbS6M/oM44cdmbWq26QPlp7v6Qreqgcl3cQmD37gfNLK46v\n1wn9F7Rrq9Mdpk02/Hr/CZiRrlTMCu+E+v+OXVCfWzeJ38eV1/9uz90DI7ua\n6Hmu\r\n=JEM/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d7b350438f25ed90d55581b3c461275e759e150d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.65","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.46-renovate-major-socket-io-packages-d7b350438f25ed90d55581b3c461275e759e150d_1618404665228_0.8840612360627031","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.46-renovate-sinon-10-x-7e8c4cccc139de49456bb1a518e75e81d7ebfb8a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.46-renovate-sinon-10-x-7e8c4cccc139de49456bb1a518e75e81d7ebfb8a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.46-renovate-sinon-10-x-7e8c4cccc139de49456bb1a518e75e81d7ebfb8a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2466af0d38692b65f20fd387be517e687aa57238","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.46-renovate-sinon-10-x-7e8c4cccc139de49456bb1a518e75e81d7ebfb8a.tgz","fileCount":39,"integrity":"sha512-pscKnc+VJRL6oEYaWNYomRcO87jaZD7jOrwTFxEgZir3GX99B2yLjzoWi/mI2Iy7e9jjqzMDdkhVEQQYxCKhnA==","signatures":[{"sig":"MEQCIBHZtiC9RO1yr0r4LC+fywVXShbANOKpOmJfy6inv6j8AiBGCXh+4V+sHOa1Ug8r5pIb4T+6GLv3PVhth3UQQdCQAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgduXLCRA9TVsSAnZWagAA+koP/RjVhhI+1d6BaXKIcsmM\norjY3LDm6PCT4JDHIuvONz7W0y5b0tJvzQI+7qh6ABoYNCgntCeaveyW3Nvb\ntMGnYX2YfQgfkX61hf1OsCfVeWis3Nb7Za2+s6IC8QLODUSsqj1pbtYH8sYt\nc2APdWoZiUGquFt0pwiWjWZPVeuo1AGNdvFe0xdvCPaqNFF3D159Le9NkGOm\n65oUAdp+WX+CggOaRJNX5Z/labwyIS8Vix6+OqvarmcyIY0xS8jvdq6o2JZO\nVDqO10A5e9Aq/XIvTTAEmJgn/HNWo5Hx0+ti8+AEbUCNZVpNh+omrO1dmNBu\nzScOwhA+mJGVpphoR7h2x2lz0B+3ks3Dcbry9xnaPknN4QcZkVZkekcjSPvL\nzmlIWgSIoagNiuduYlfqMIceyizbV/vyOsGmpVHREpIh8qgeHGb25tbQ1m4G\nMWPhREVxA7X3wbXZ32jindzcW1Vw8LRb4GC+CGbma/chnwtVNIQdTBKoYQxH\nAKeJcVGwmLjcMUOaLy+O+Yfdujwo/+wOjC4HOFN4vbyQYKN/uWpjqsg3iBOl\n5+XBco2JpTY0+6r5tgyvOBnD3Eaa68TXvODkUL81ATt0wLWCGGtD7lFRmwAA\n0FU0sbOaGuIFhGfTBz/NOU4tgnwvQBGM1AGPefOf9856ALGpSOUjrXsUq/fi\n+vzd\r\n=i3OT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7e8c4cccc139de49456bb1a518e75e81d7ebfb8a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.65","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.46-renovate-sinon-10-x-7e8c4cccc139de49456bb1a518e75e81d7ebfb8a_1618404810659_0.1392324812498611","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.46-renovate-non-major-3a3616d15524075049868418a61633494be316cc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.46-renovate-non-major-3a3616d15524075049868418a61633494be316cc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.46-renovate-non-major-3a3616d15524075049868418a61633494be316cc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9fee82ace15c1c392e6890be34feb57fbd7f2eaa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.46-renovate-non-major-3a3616d15524075049868418a61633494be316cc.tgz","fileCount":39,"integrity":"sha512-tJycWiMnt2PjmafUgCr4LARaHb4y5tkkCqO/+5mg/F50aM43EOtML4tY/ImecD+RjGChSD7RpfN1bVJAth010g==","signatures":[{"sig":"MEUCIQCujh3WkLMpGCFepJlwzv0ULz1ebDNebNI3bp+MGTliJQIgbm/4IvyX5AQPc4/nKG0Q1+rPVTkMFKrWmiznTd/k5p0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdw6HCRA9TVsSAnZWagAAl2UQAJ1rhvLYzL7AZW+qSbXt\n8bzE/lVtGEQSIqYxasf9YwyXM1ZHR/g6BXbO+qsWH4QsmTATHtkwHTdB1tYy\nj4WEKpZdHxtBPssEbY53i+/MqryOb3s6oVC8jamTbGBtiXcdrsiysy8FInla\nrKOl2S332oQwg4KJCUFr8yPyJXzGTEwcDL5SYhpLMyPyFDzrkW8n3UTgg2ls\nkM+cndhVLLdPjjBstorRfiMmovDezAZwbZjuXdAmt+E9M7eDv0H/uGJ/UDlM\nx6cCaLx9R5yBQH6cOKRfB2Uvv4UJH3GJHdKBsWYy1MZVN1Pd813NkQzq80Rk\nKT1IKZ0hE8B0DAI8LSYVTJWRe+tOJzPwNiL9bdBE9KPAw92DSf8kRBKz4Etb\nzcUZSfoc2BEyqnnI1LK8A3h1XyPWHXwCeQmojeyrUr5peU5R4JoG/x6h8LHd\nVd2RzEMyHX2auokwQP4Q4HLeyUoBAWxGxy7s/rIq0AbPfTVDicep54cL819j\n0kWQ046CMSccwr4TvEkctvaKKfOJ3cbNUDzed/UjS06Mh778Vmd+0bwWLy/n\nix6CZG/EYzjjnnJ5YRx2dOb+VrYNvwqifbkoIeUdWgzhO+wfs5RuJdOAE/BE\nedhNdDcYU/vEDofOZy316hFVx2h5wvFZPEc6ZQ+B8lQDjvb9Uam5eTiR6I2g\nL9vC\r\n=NzCi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3a3616d15524075049868418a61633494be316cc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.66","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.46-renovate-non-major-3a3616d15524075049868418a61633494be316cc_1618415238757_0.5912067067542364","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.46":{"name":"@balena/jellyfish-client-sdk","version":"3.2.46","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.46","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"daab20a27c56fbf950e901ae6c0f71fd38d0239e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.46.tgz","fileCount":39,"integrity":"sha512-sqP5JUGnvyc+9vKXTZKtfjBk5EHb/WGTRHXFdu5ExslLTduDAQSyC/8p8lEBCxrPHpMayueI9vpFCTuC+Rrqcw==","signatures":[{"sig":"MEQCIANFxrGyeixbydpYZf0YrahxQCHgsv4VrC1YdtRN7odlAiBYFoEkh550oMIDA7oABXkuJ1xrL0Z7mSb3bu8pAEtyeA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdw9uCRA9TVsSAnZWagAA+gYP/juyTK9gikRJUFQHK559\nGzkzoB6nvpdlVSFX+1rFNfIBdl+EpgAVI82sZLYakm8fUH8TGxpHPgtndg7k\nKrlfv5yZuFZ56X9yWjB2i5QvfXWaeRsEx0hio/HTzj6SBpk4AzdXFkRrC4zq\nmhH4Ond3eiaMsClmBdt0IKjglD+9fDrAMEfu7/xfvzu5Bn3JSCIUgxQQpI5L\ndApx45CGzQmMFX7rk3nw0EX9V4Hb0yy0B4lCTHNGqC6IfGL43ux1ZKvH+Lnq\nyR9hH7ClFH2NCXG2v75qgOtUJAJlcfESYygiGCUUXRZMGiAsL1HPSi7TFXUN\nHhjlQdXoZU0xBjxETdLpbZUsJVzdPlFUw3UY49N8gs3jpj/FBZyCS0UFHNVI\nZs6uSA4gKZIPIITKiME155jXWIbGXzB8YNCrkdZsEA9CZAY3cik9kq0SChYe\n/y2oND2aK2TPMdL/b7mhuG343aSbbgcQd+ddg/NF2cPVadhDWhbQq3Gnhd7s\nzuw/XE6+Lrmd6GfUVu5W/7q5ekNS6iJ5bkssPuTgQ47n1+j4VLsrbdZd+yJe\n+nYkx7oCARL4YQD6UDLkLLwkGBJuleTA8Fto7Tf9lfTaNgTQnAWzn4zl4Hv+\ny9VPLZk0K6ibaR4eYTeKMYx3r+pVDQHRJOHBP9qfN7YoXXftG1Xtz39aVM3S\n2mvL\r\n=spYN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"41929a2cb188de8176a9ead607841538c773d9c4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.66","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.46_1618415470205_0.31017894437563664","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.47-renovate-major-socket-io-packages-8e374cabba30536d940e2134b94b7cf1704671e1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.47-renovate-major-socket-io-packages-8e374cabba30536d940e2134b94b7cf1704671e1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.47-renovate-major-socket-io-packages-8e374cabba30536d940e2134b94b7cf1704671e1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"14828c9051c7b63fba9e566f045e0244e50b4e4b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.47-renovate-major-socket-io-packages-8e374cabba30536d940e2134b94b7cf1704671e1.tgz","fileCount":39,"integrity":"sha512-DvYXDAS+hRIWGhETBlEQOt4eQMCCEBwSBk8/yaZGfJnqOjrfCeud82jcEu5ab2I0zyn6LPSUmeB53gkZT/u6fw==","signatures":[{"sig":"MEQCICdCwB/rmWNoBUJS4dTV4qXOMuA3WZgNo+ajdtfKF3D3AiBsjGi0q9Xt6tZ/XRU7zYwWI7Om7SyNWSyTl5ScHnDJCg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdxD/CRA9TVsSAnZWagAASJgP/RyUl258Hh/iVcU0R2Vv\nI5XIij5T7xelluLuburhXbGSX7MYyRA603S/dnr/AqmUmZ2p6/tQm30rhRsO\nuLSxsRWzYGfANg4DFAWXpQ3uSCRWUOA4PJo/1dUkjRCeL9tEiHPviYuqV4TU\nfC+S87C1Qdkjqd8T1Pp+69/99BIaTJd4a+xLrVf2tBtms5HUeCKnIPYZBrhj\nWsl2QSIfGrG11tM0VynSm7Ouwx83ILB+HQ6DMFpqz+sNnBsbqAUh8vjL4vf4\naXrTpqY6m/gawVCbWKzoKk/GMnzcUAeijuP1MjEuCoASSSyPWHptzozRshg8\nbGWKWn0gkxc6zKAGCTVt6be8zJiLQanVz9/VoN38Kf754BuoFalTgRHAGHkk\nykr9sBlFSEYpPyfMIgzIg4+iKVDa+6L6ycWYREgVQlxLlxivb9dGIq7Ekn3G\nP6CKBhmoR96OEZJ8ZDLdZ8/7E4XNPBeAuI6Q8vrZRokH+S3GDnHjVWJ45EYK\n3O4DmiwXMW+xJ+0C7sEedGgw2NA9kUHHlLeeo7XlThzsgpBGXWE0S3Jls5kU\nicFx6IUVn0lfL0Q7/TLHvtjqvhkX8yOTZcVCoKT/Cx21inhAaeZ+YqG0ODzL\nBshOCEF6hZPmu08d8yZzWiW4X4iU04MN46IFlAukaevXKQDoxNV67Hrr9AwA\n8z5y\r\n=GqmB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8e374cabba30536d940e2134b94b7cf1704671e1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.66","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.47-renovate-major-socket-io-packages-8e374cabba30536d940e2134b94b7cf1704671e1_1618415870448_0.12669238838806862","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.47-renovate-non-major-fd27c11a865d18f81f276f36bc5979b55c924dfe":{"name":"@balena/jellyfish-client-sdk","version":"3.2.47-renovate-non-major-fd27c11a865d18f81f276f36bc5979b55c924dfe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.47-renovate-non-major-fd27c11a865d18f81f276f36bc5979b55c924dfe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75c374d479731d0cc9480c9e7dbe4959b1d0d1d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.47-renovate-non-major-fd27c11a865d18f81f276f36bc5979b55c924dfe.tgz","fileCount":39,"integrity":"sha512-u84AZ8IhA2pKhDTDfeDSoWQec31nmOmZlPLQ1rICk6rX8ki1TRgOqs7OET0pFsmS8DgU+znxv9KJuQaMsPruxw==","signatures":[{"sig":"MEUCIGK4XedjcOggBO6l7XkH6nvgny0Ica870Q9NcPqPpzWzAiEAv24BXbY74qRFf8lFykbUPjZsGgvZwZLn8ku0QIlrEzU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdyBOCRA9TVsSAnZWagAAeVYP/183RQEG2Wo3TOMjX9Ht\n41TLL7C7E1AlZnWyK0Ok2r6bKMDQ7ja+LtANe+JLEbWNF0cbUlOJUH10UUjL\nutXGeoSBOAGMbPti0BoNSsVDaN9dMVYMiuEIeg2hAqIoATEgVqJUaI58lM6m\noAeYCEwjF4Nb1u2/MLNnn4ce5XExiz0JWhBg/Y3+aSuhXGSsnmwGMLRXls86\n0YMhEjkKIUdbNdYiCwASerbEUyRhURhnPBtsHkkeRbyntaDYGqczpgVCV/xD\n/nB9DIUwBYpCNOmppb7YPWusAUU+DdWmXSx+1uWEHdFCz2m8ckyECm7bqHXp\nx875Wt4ZJqD7izK1CNRu9o9e84LT09l42X9fk3hML4NK6TXVkevPNi6ro0rw\nScia0yYZK+zLlpIgsPr5NkEXg8qtwfZOU7z6hE3LL6m4mI6EcgQuGdtmBx5G\n28JBKf5g1AQu30kfohyfLcN1HCQVv52577zWuHqQdywQpV7DUbBhQy0PChKe\nATSU/ZLKJcKyBb17zQHbDC99DyN46q1eZUx2eRppTG4isHaQAH7CNBta2FaM\n9ZmkC63vKqklpQJNmmlk86gD1ivr+wY0+4QsULQ4poys2x8gvyjArq+IDnew\npkxS9X9NM/HIHnFITBPcKq9PzpTW2q6m7eZrq3TXmam9At8KgL79nqGDs1W3\nYUlA\r\n=LWIx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fd27c11a865d18f81f276f36bc5979b55c924dfe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.67","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.47-renovate-non-major-fd27c11a865d18f81f276f36bc5979b55c924dfe_1618419789960_0.28811071728584947","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.47":{"name":"@balena/jellyfish-client-sdk","version":"3.2.47","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.47","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"56c77b1e9b1c71e072d000a361beb02eb74b6187","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.47.tgz","fileCount":39,"integrity":"sha512-VsQ8t6U5T+g1JyMTzAdOj0IG/d1XNlcHUk3/9nVYjdl1a8XvxFVBGeLjYR5e15iajRX+mJFAV55lA5h53iIxPQ==","signatures":[{"sig":"MEUCIGny+zNc6xzrMbcqwFFxNmmb4BCDDPrZ9hhYIj7Xmnk8AiEA8gQ6sfP7QutJoHSGqW2uqoJngSYzvYzo/NaRsLkIoKI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdyF/CRA9TVsSAnZWagAAJBcP+wR3Do1NK7lfK6jmdPfI\nnwgUQqZNV6g4Shsz7qPIJ8mQMi5+SJarDAiFWAeSRqrmwfAhsxvvFbXi4RBv\nN0M4cpqsankYzz8UOWCWf5RD0q4JlsVjfTs3JHQcR9zARnXZ2gwqP52eCzdB\nTUaCPOvGZYz3ZJtwAeiHrhbr2eXOv7EDV2tVD5asIOXFEpaMUGBhfBsBt3DH\nCIYcRlYphYLuRO36BpUAgnxZTNnfR2wwQDMpksRBJ09FsY2uDPboTK75Ybg5\nFX0sz5oCz7kkADXNRLvK4ixmb0EL1Iugxeqna/xkgrR90A4b5GiRCezg1cnz\nu/g0oRgP3EcQJ6f5WjKYLh9mVKfbZ9CEaGp2ULOf1lrHu0o67wuxP+xZKcmr\nQI021sTNXHziGNwer7VZOLOzcfUIAtelmTb0ONFv6J8WeEeX4TjLkwZ5gwpU\nMsqCI72Vc48s9n74LOtI7iN3euzYIaHx/yHTL0pzRFfbrHOPPB7g95o0NTc6\nQ7J2WdfIj+tNG099LW7/gWA2kPUpT8KQ83YBSxMljomOIURfEof/zPIYrVt/\nKKm/AnPB9jl8xfZnzOdtMGF1ccKZ77Zk4vpCUK98rr28LFPA3au7Jtv1FaYf\n2FeFSQukaL4IdEIo3VE9PC0O+eAsOztCcqYaGwXRGJRBLc06vIk8dpnoqw5N\ndYrR\r\n=q3EN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"981a151f08358733ff9098f2b0902b9dd3b36051","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.67","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.47_1618420095016_0.06914321636783338","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.48-renovate-major-socket-io-packages-6c7b997b381dd07377b7e0a7e807e2e0374ca790":{"name":"@balena/jellyfish-client-sdk","version":"3.2.48-renovate-major-socket-io-packages-6c7b997b381dd07377b7e0a7e807e2e0374ca790","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.48-renovate-major-socket-io-packages-6c7b997b381dd07377b7e0a7e807e2e0374ca790","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"194b179ee0ef03d2ebba4e0e6e961f79763e19af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.48-renovate-major-socket-io-packages-6c7b997b381dd07377b7e0a7e807e2e0374ca790.tgz","fileCount":39,"integrity":"sha512-T/MOqZgPCRJrmD+XNi1TS5Rcg9aNQyzAzdvZqatjHUd9gGKZfvM2UFtcbZ9fFIAPdbjH08NilAw1q66yntBTBg==","signatures":[{"sig":"MEYCIQDLj97z6tJk6uijlv45ywAEZwrSv1PaPt6bEbHrw5tqRAIhAOrlPVWY87JOjD23ewIxF/BAFyhsnqTzNCFsct00t8Dn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdyL2CRA9TVsSAnZWagAAluEP/j3MwwRIgxJv4nkutzHy\n3ShXr+J0cP0hYqn6xwBzty9DE6Fur+kIngAR5QPBT/Y1MVVhOJ2SBzlXiQoz\n9XSA4ek3sViQrchdMQYF4u4hBzXhmPVvIK73cwe1KHZe8IOc/1Ahf6OvaLS6\nUoeMkEtuZiGiiSWQuIl4CUOt68KyEV8jxo+SrN7PhUEnCpBHG+i0sZ+zBmrG\nQ4rXf3VFD/T42gYJcJNSba66qsUH6hgsYRpAxwn5V1+4iLSmuRsyr+iHH0+W\n23al5R+liMCbHt2WXCHtO3ur5w+82evS+AAChULTeavbUfO9TkAHnQbHKm7b\nWdI5LKsd1u2M2J3JS+9Uu8dfI1lhi+lHP54Ko/3FY+WJLqy9xedXsTtytKsD\nm7NI+p3ds4yJy5uG5A3jNM31ppwg3To/tonRPg1aTJs2FUtTCZA42L1rH9Ds\nqfpcT3EidF7POjzvdrUqP15GTPbmJZy1YNp7BvSglqRHNfENlVksgHNmLG1z\nW/cMNZyBqHXMGaLkdnKkLdc/K1EVPGm7vhIsLa5cxvSxwCBpagDN797Fc5hZ\nnSQwkmxxDFqsVve3UW2YCT7jqGO8Qs7oAchYJAlAztBc/ZeS+9TBBVf1Xkve\nQ6AkJLQpLAbwUiN9+UytSTByq3exR1mH8N1nu8c1e9+7De6w+TDfKZL1MdV0\nd5bM\r\n=fhF3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6c7b997b381dd07377b7e0a7e807e2e0374ca790","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.67","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.48-renovate-major-socket-io-packages-6c7b997b381dd07377b7e0a7e807e2e0374ca790_1618420470031_0.6818124931838283","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.48-renovate-sinon-10-x-f51d4e777c5c63fd4bcf9d366ae9e75eb013180c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.48-renovate-sinon-10-x-f51d4e777c5c63fd4bcf9d366ae9e75eb013180c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.48-renovate-sinon-10-x-f51d4e777c5c63fd4bcf9d366ae9e75eb013180c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3cb77731f9f6b4c65acc5d68afbde5ec9b4bae39","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.48-renovate-sinon-10-x-f51d4e777c5c63fd4bcf9d366ae9e75eb013180c.tgz","fileCount":39,"integrity":"sha512-xToamH9NaG+XmbRTwItsCRHCUFCjSfTp0jzhLv4WqNwiDdpCIboWbPVwgRprCl/OAQlAkrkrm+Rs/4cfmHSPDg==","signatures":[{"sig":"MEUCICv3m6uS4H//hcOmYm+3o7ZQTAAuMGojpT5JpG6Hh6X+AiEAsTthf0Td6aeQxldDChm1AqRyaQfVKvZxoPgNxrDHrP4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdyMRCRA9TVsSAnZWagAADPwQAIQBMldmShGm6qv1eMvw\nBquvLtaH3lrCg3oPSrv7O0kHwIpIMC86pKTc5BmNCWEwIJXvpx82/lY3JjTN\nKHsXzUPCaOzXG7cda20fbopXcZXWY/s4KVHqKawjXSqZeNffFK6egtJfxw8d\nF58trgD9GFDznsHPUm7wDj+yWuH6KsnoPqI15lLtwijIX5A/O2Ouej14InnQ\nTveiJ6ZRnALTlJnAKJ3axJSQ9PAwNsor9u8rrPrb6XLJa5K4xK7LnQem9i3V\nSy+haf7Y/Dyz/mMHSLNDq8RT4JU+o8OnabhVjY5JDs/TNdh/fmYke7OmSSpA\nlAtmnYakNYVZ48CQZV1gQRdMcfIG5yXEJ6zPH9q3dKsp4YFbCYfA0KQUyWi6\n2T+fkEIwwqJ4qnxqF/likJcljyevfJE+fLio8WO8+cCFsR6g4a0zFEdZ4S0O\nVfAPTi84uo8YZt5JI9ex1RZfdPb+U4fU1gXXlb+66SkupepWlFAfcVUDSlHz\nmPu8iu4QPn27F5lOpapJxPZE2E4RJZcJAsI65XZwd+knJ8X+Eo1oCsyVAdTA\n+7CL1M6ZRmt669HH2tFF3/wSS/hhfQimfhKpxDL/DspPOLho+wvPZ3Nz23WY\nNSkquO95WPNylkq9CPzxMKbRPuDa8ubHoqyAnNmmmQO+pVn1uIn7T4xmlGbm\n3cmV\r\n=Ixu0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f51d4e777c5c63fd4bcf9d366ae9e75eb013180c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.67","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.48-renovate-sinon-10-x-f51d4e777c5c63fd4bcf9d366ae9e75eb013180c_1618420496590_0.7500261092134641","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.48-renovate-non-major-59870acf69acebb21d805c398090569c44d2dca1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.48-renovate-non-major-59870acf69acebb21d805c398090569c44d2dca1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.48-renovate-non-major-59870acf69acebb21d805c398090569c44d2dca1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4b73be1e5ba6496c272bb752b33aad1911e53c3b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.48-renovate-non-major-59870acf69acebb21d805c398090569c44d2dca1.tgz","fileCount":39,"integrity":"sha512-fOFeOwpNySw3vgEHVFr1vTJivCsKJbJmQxzdDoaErJbRdy7JKa9gD6Le3jnzfRD8ko+q+gMBaKPt6dhTyiUP8g==","signatures":[{"sig":"MEQCIEQnw2COHT3obtAWTxIdgjRO8/7wiqGdvEZALm1D0YSPAiAvAG2zyC2kcX70llJILVsrR2sETqzOOBp8QdhqM4zzQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdzpoCRA9TVsSAnZWagAAhBAP/3i5LJ7qMTJtM4UO0o52\nYFEJgE+oSRoK5Uwt6bQ9gk0sviLtshSkKZsaFDz2PsO7JSMzWZoYGEjRFkNO\nFUE/oT9o/VSm5ZAeA82QldrZblbolzFtvNhq6k9SAIQjDlgGZ9/RfOOJjVRG\n4YYoi15x/50t9+VFIMIDXQxBUdryYhtyPNkDp0civ3gDR9thRUeKVaxtNKAg\nsGBnQKiZMudLsyy+ZzntW229O/WPBbmIMSZky9LHTJhmdltVO8KL2CbgUp0u\n+cBQg7P++p862PT4yrLE0xOYxC+WmOXYhK0tUB8OxMsv6xdYaGPeKbRd4L2u\nQEsr8lxjA9H2Xm73U5RmAow7+OrBB6aUvbptulFeJlUhFfigzssWgjjy/sfp\n5xqeDdudsdsGXyeKbiaDmrdUYb4dEkFA7nNg9TsrNrM69bWsaFXhqfklfnm+\npPMSoVkGQTqFfWrsbQCTTlr8gHtU+OFzNWFwwK9PpM0XrLzR7vOgZkMj58nG\n0gXNEb9rFFPhOipGFN/X8Y7u5BjhWph80a2opQh76f0EMlY9dzlsLHmXsVN0\nT/IukRoVlwNhBiEck8sph9c1ABxuelYHVeHzB9BB+IYHc9sswaSsZW86U1hl\nGLBSp2n40xX+XI/fpQL+6AwrnGbhlvbVuCvoBJB3Q6HYD5T7XVVZ+JVza6Lo\nax3k\r\n=V4uv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"59870acf69acebb21d805c398090569c44d2dca1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.68","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.48-renovate-non-major-59870acf69acebb21d805c398090569c44d2dca1_1618426472525_0.36980437059201976","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.48":{"name":"@balena/jellyfish-client-sdk","version":"3.2.48","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.48","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"de9753d37adac5b6b12828d01f9aeea453958638","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.48.tgz","fileCount":39,"integrity":"sha512-YN5E3Xvdn3JMdy0J3BF6p4U0fE5LFXd/0rDbTw5sC97I5MyOcSdyoLjRBqzsdQKZUweJs7KLcwti4TS52QevpQ==","signatures":[{"sig":"MEQCIECkA5HufiLB99UDg97WYGLjRkCdDZhRNrq+HrcrvfYLAiBe1FxkGe84ZU0ieDEKzQ+7B+1FSRe7isX4jV0xn9EekQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdzuJCRA9TVsSAnZWagAARMIQAIMCpl7zhtVh8yekL11Z\noAcfd/5RxkXU0cpVKBzWjk2g5JpJfFx6GHxgITpmH7CDRfkxzZV+nG61qhq3\npudz26yG9LPyxSqlPSrDyyeBauyE5GwE9zmh7JPqX0UHIMrISOJIN5/4BtEz\n73CientmO/+4ZQdUWRYKbSGWVXOKEsHe1wNoynfBRakzNro8P+7uVV3UZ0eH\nRSuXeEQj9POhD0TpudXV2kgfGYem31eMzSFX0/apu0Ijc+/y3fECR5FgxGru\nZEVZpww4VVwlecR5/GZnfkrOmXot8FRRBNBIYicCvKnTvy0W/onaEOIAZvgZ\nYg/J8b834w61T70ACc1N7axvF3cXrQ0sMaoBXK5KavgmRsJWfs8OTf85xPDi\nu7olBPIKMj7DVtjMNkQRkOZ4LdyfRpEEgBH+lACx+Z5iOyjxYNNEHnQrGvfe\ncLAfY3IhXeY3SnYTF9mtSWfPhuM/kAvvN72RGwNoR896kAp4vbukqg1Oiw2T\n8gbYERqVpcBo+7PbI6EEzi+Htfozu94FFvdrlkCkJ+n2jCatzf/TmlQomFEV\niJBMGKf66Cyyq/IDuQ4XumWfWslggan1eviW1CUGfzvBcaE+ppQBpOV+pcef\nNKxlHUk9GLvVhEEALTn2jwgPjDKOEvhllt5o3TVoo2VQQvK7B7SjKtGmDL+Y\nFDJU\r\n=NtAK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"611bb9616b17123828f5cb7834f0a8a7a56044b2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.68","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.48_1618426761007_0.026231865420982325","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.48-renovate-sinon-10-x-32ba458d35354cf179e7db715afd4feebeb092d0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.48-renovate-sinon-10-x-32ba458d35354cf179e7db715afd4feebeb092d0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.48-renovate-sinon-10-x-32ba458d35354cf179e7db715afd4feebeb092d0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"23d731eab9b8f1a74ecdb9f9a1a884bbc2f46079","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.48-renovate-sinon-10-x-32ba458d35354cf179e7db715afd4feebeb092d0.tgz","fileCount":39,"integrity":"sha512-b//m7C/QB9VR5S2MfJu9IfXNU7lgVYThKjr9AgsE0RdhGlw4SGZUGcJF6q5jEPIlByJ5G7I8FaCO7/MMIDD+cQ==","signatures":[{"sig":"MEUCIHyb7Kp1dAXQtBEsdG+Akp5dccSeqhJMpurfwgh9UmR5AiEA758kZkUu9cFVY1ECfXdALjbdqdFJb8EMY8S1z23/p3w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdzwtCRA9TVsSAnZWagAAi2oP+gOve0TkB79HQ4kQPvxd\n5hr73Qep90SNeDdO85misbHn0UjzFk0NIq79/lBfaAEYcM5O+/Jco4Vrtwef\n23h5hCknXFi8m/TN19nk4wJ5pkWDsfsKeZo9xxr9YMKWS7kOAUemicCYxZA2\n7HcKEs8q2WCHns4otbxmx/s3vXIj3iogDEEJpzItzog+SzAP4g5JZv/e2ir/\n7ruZ+MzoQEgHsXPIzPQ2+uDkNZaGMylzqRU3n6LMs3YDuayzQze/YZ2kL+S4\nZQtP9L9FlU9DZ9uilKpfnAJbK8rWAVoG2LaXHHzUfSx5USnUIpy26pO0PILb\nZhnJuvgsBAIqDHmryC8u0GBshrMhawMMvQfdNanutrwbCIoa6OnvtQfaNtVa\n/SQ3jz8XmKuYqBJzAHDQi9rgUW9YdXTvJEf7IQwv8/8crT91B/OYs9WbWNQQ\n9RGrz5X11lXoyoZZ71W2W7gaA/KLpryTGO3ugilukdzzjjYrGXF9VOOC9QML\nEyvBpVeqh/dv6Fe0unuTnDK4XN/tkbBgDcUzn8kUCi4gRBvYJZZnJQ5YpEnp\n3ryY5bctYAEejTD1rhqN1oWfR7FwTHdmDnNzgbc+weOJ7vCC6bWS7I6YoksE\n6n5aq7TGf5Vxg2jH/7nCOuXB/qDyoNkdFNS4v7e3HjoZhOHW5AQ79bToZcOr\nQMrS\r\n=ONoj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"32ba458d35354cf179e7db715afd4feebeb092d0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.68","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.48-renovate-sinon-10-x-32ba458d35354cf179e7db715afd4feebeb092d0_1618426924655_0.2968427222781045","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.49-renovate-major-socket-io-packages-c10e84551eeab844ef2e46e9e2111ab778c564c3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.49-renovate-major-socket-io-packages-c10e84551eeab844ef2e46e9e2111ab778c564c3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.49-renovate-major-socket-io-packages-c10e84551eeab844ef2e46e9e2111ab778c564c3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fca4f711dcfa7dda9ee3129e1d7333c820bc4bed","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.49-renovate-major-socket-io-packages-c10e84551eeab844ef2e46e9e2111ab778c564c3.tgz","fileCount":39,"integrity":"sha512-OD3ULgGqdplcl0up08Px5A5O9ijah7HTgdbFqvzTJNOOZFYLiRaSM+chJMSkNP2a4KHObi3llr2ph7NQTajBmg==","signatures":[{"sig":"MEUCIH1bgjxqi4Vd0reFTiYWfRKhRZYGoQF294w8Gf+C7BJWAiEAqrCAOfR2i/Ng5D8aJZ3Njl8ZtWQMPF5Hln/92C7eJjU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdz0gCRA9TVsSAnZWagAAdv0P/RsxguwSrmDP+4cW0Fpp\nVFQKwIvQ6+j288Uf/ZZQSoGrQ0iEulLt85znpZ/sZQvo78DRGLe/p4hYcJyD\nY8fBEK2NhYiQGs5IU+80gUrjtl2JT4DlLG1sKT1qpvm7bl/6tuAiR5qR1GrO\nlyqD8Mz1lZ85sVt6VCK/iOY8S9PAD0ZgQ3bSTZFHdh3sCPWFy1DfVDDumtFH\nXubwmQdVTe4zffudv/td0MmNIOTR8AHLAoIO38L7Zvo+mM8KJCSykNn/O/1J\n+/JSmgYCqFVw/JstELj0H4k9Ws/rgiUCydsgx5y3zqaaLFQWStw/bUT2kUtj\nx02hUX/C6wcRjuYquoR1/cDi1UFvF2xc1g5HaabOxAkaD6pRrbPsZ0cW2e93\nv97mXPGDA0xREbGDBezG6JgudKM11WJXb3O88Phq8pWkIFqkDZ7k5KIW1gqV\nEI6EFvTvVmZ3Q4QtGD3HyudaVPrpd2NYdfEp5LbsJaOJxA9DUFdLRhiVA/vq\ntYIwQoTM0pUcmoLAxxTFTa/C3itl32D6M1Y1hIqEHVpTQBasrdI/EKZ7knY8\nRNigWpF0Vcj1hokRsCAdJxJeadi5I77q0dQTu+BLC1S7ejBq7eRAaTDk/mlT\n79MG6SN6T+5wscNftt3FLP/vvFgNHh+bQv4dHpWN9LNZWwYB+18lhM2rh0tI\n8tWG\r\n=KpX/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c10e84551eeab844ef2e46e9e2111ab778c564c3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.68","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.49-renovate-major-socket-io-packages-c10e84551eeab844ef2e46e9e2111ab778c564c3_1618427168300_0.16301670853593997","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.49-renovate-non-major-f37008496503ce8a0a9d9081360f9a65a5c0f036":{"name":"@balena/jellyfish-client-sdk","version":"3.2.49-renovate-non-major-f37008496503ce8a0a9d9081360f9a65a5c0f036","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.49-renovate-non-major-f37008496503ce8a0a9d9081360f9a65a5c0f036","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d2cb98a52768927336d09c5b2c880720aed8c99b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.49-renovate-non-major-f37008496503ce8a0a9d9081360f9a65a5c0f036.tgz","fileCount":39,"integrity":"sha512-bzVhkTtxffpn+0qv8MFQpZDyV+H/083iQ8FgNaObkbucBmSKFk2Pjeum3fu8PdHUKkh+Qzmv9Jbehs/1k5mdRQ==","signatures":[{"sig":"MEUCIQCT3aPx9iRNxtxf4X5fVr4v2rmcUI2WFnwFfWeAo9YTHwIgJ8KzFl7lwloErU4lGXDoE+Ept4P2l3nu103iKF5Xm6w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234097,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd1YDCRA9TVsSAnZWagAAhvQP/ieSf/tGIOyt6u8H01v8\nkAGuop1qMY2RimKB6WlWGWmOv/PzAOKW9DBV5+1/GbIzr54pORwGTCblE+Ye\nHTwv4yUeKVUr2XlzteerQCWUVbR9HSgSu9dbsFtFVU15mAm6YbR1hVhvBtSc\nVJfv3EqvEmxxB0V5b4V39QJQNb8xwkPMHRXAwJnqGQqGKDlyv3/PNdY/qCUz\niGi/D3FsiODkDkC0tbCkapB6C1DZLHRun4EIbeqCEpMduE/iE5Q08DNFRNWY\nbS5B3D3bwVz0M21FyFG5qy/rad1Za/kO8KVv+z4WKIjiduJ3ga5ZkL1iQllD\n7LKImQ8w90Co8bJxGw5x+aooCxdz38ldYsTbluR949RTBjjsgbn9ySnRI0OL\nRZuqVcDn9KDsRqi3T9q5/uzCXYBQp80OJZAGfwDPxLq1ahNkmRumbvKXOrXZ\nCm0j7SY7kZXVEPd3BDHnF3xkZpkXJl4ji2NeD6v6TALqR6nUAZpglgdU+aSj\nwDywYWCtIEzoJUIUeyNVXhCqBrRg/VQJOy2zGtcZjmdCSjxb8Gbz6g+P2GLe\nlWi7Z/0HUvXItcS/iYv0DNo6uye9Xonsk0lDnsTL5Azx+b7XLPPgKZnox+4q\nbiVx9Hd1uLcXUMeIkcg4svDaNe6I36vYNmitTFkkpJ8b5HsYh3pParsmZ5b1\njeiv\r\n=JtIF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f37008496503ce8a0a9d9081360f9a65a5c0f036","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.69","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.49-renovate-non-major-f37008496503ce8a0a9d9081360f9a65a5c0f036_1618433538661_0.646805363212938","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.49":{"name":"@balena/jellyfish-client-sdk","version":"3.2.49","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.49","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9b9e5f263409812ca8a75593696a50c18c5f38cd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.49.tgz","fileCount":39,"integrity":"sha512-9LrJqJt+FuDx16fbWpwL9nawgIreli8tqjZ3rh7UTm0IvQIvndQT4PtcqWr1I0092bwDvJpN7oWLzOg4wgaJ/g==","signatures":[{"sig":"MEYCIQDxwtoR2tPzv/E6reXtqti22aFsQBl0vQ9z8jq0wll2hQIhAPCEjBMOFnSb46VQbLqia9wZNGGhqfVLLQEKeyy2VRcY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd1c8CRA9TVsSAnZWagAAb2kP/imeAD3P5AXKAW0SoQSd\nf3tQcrfCo7GPBQEPYr3a5legTJ5s9VsO2/59H2Gny8NssgyDAfctz/YSVGXO\nUhEUZ/fK9/oNFmwSZrHnjpBUV8sp+RISxmU7lFreQaKIohTRM4nkQ4nsu+sz\nFmDlRmD45AcelYpag4y9HTYfJ063AFn62N4aGECohyeiMfG8jMmwzYAYQSAb\nbyjmytYanhHzCo2HuJb19mFurWuNmImYBJ0ZYkUasPT8iaLdeQ9oQQqsYW2A\niTyZuMwG1gQ+waBocIkZsqu3CjWCBelSVi+iUTJWELAnLrfC5JJKeypop/PV\nmrxiKY0NNOHBYL9f/DrDxTOHSbPoYrEx7b5LjwZOcUSEl56PuRIVXUFlLb3f\nwHVkyKEB6Fh0ZAjcjRoEHZTfIMkpEM2WtjBpCAgwU5/tWIWx+lJkW/AZiYrB\n1XObMW9pn6vG8OUKrMK3AAk/NckkuXuAtM0UePKJX6CQJzjS4yd6u+t3oSAm\ndA9f0+AqyTE6DkyPGIgbLcpx+DPK24MW57YlGvKUCImk953Y0J3qfAtrbkxZ\nswbPqTZfEe3jJ1fTlOJuLn6O/pLcVltf+tG8G5JlQ2e24ljhudiGtWkREFCP\nd8zDnCAlK5DtwfNdkP/9OXrKOLTYvkjBVgxQYhcieSKT8KBHs+NYZmYEIGil\nUJuO\r\n=fHJZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c74b597361c60aeaa97c33b1e5797eef4f8215e2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.69","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.49_1618433852117_0.44619354222637253","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.50-renovate-sinon-10-x-d248dd13eccc63da2664cd463df9caef97a3aafa":{"name":"@balena/jellyfish-client-sdk","version":"3.2.50-renovate-sinon-10-x-d248dd13eccc63da2664cd463df9caef97a3aafa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.50-renovate-sinon-10-x-d248dd13eccc63da2664cd463df9caef97a3aafa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a04d9b177ce90d97764bf9a99694ee1646e4d702","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.50-renovate-sinon-10-x-d248dd13eccc63da2664cd463df9caef97a3aafa.tgz","fileCount":39,"integrity":"sha512-MsIpg06bIgihM26b4/7M8zUGJR0OUbUe9o10ESKBDYfr8i35aQjvJGExODl+nC14traArCI5zPG0qKnJi26+CQ==","signatures":[{"sig":"MEQCIDf9B6QZACtXxA3JFXwxfZWTKlNyjOcOYQoJlzk5thv8AiAv40cCUtGcx6plUjpyhFu66Sx7FpR99dQKF+yJskeoLQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd1gHCRA9TVsSAnZWagAADBcP/2qYLtrSA+3nOEcsCIXi\nwFF44Xhp5L3/W0hQDFew6IJ/y13iAafpJ7B27nRSc3Xvsjn5CLguR1U+jpZx\nZ2kzFg9q6OrhhmPdRYMIFmNX4t90SFLfJDeJtvfMU98SAzqLd2DJD+eGKNXI\nq2egC/paxy56a/fPN4+lRPbSUfF3+pEc0tsHROtNu0Q32RsU/BeDaBe8ehsQ\n/CLFrLNVgM0GGrY/IgKtz0uKgVWZmP7ACIFsqkGSHWcDpLW6V6iuMPs9AKWO\neorbS9M05+WzP3RBPhcErg7TVdiBOcs3aPmfRxufe/Rx87TxbybVGtX5mgEj\ncIzXel4uvZ+CFmxTf5JFpfRZ/qS7vW4rmDxeYkxmbhwA6pJPjpfVwhV80ChN\nP+fzOlPv10yH5eaIVjBURkvY6DX/EZgDeJ5rRFph+4jIb/xL73KswTmlZCZS\nddE0eMX99qq2Ek2j3h0nhlEU1r3wg+SrTSAQqunwJqEiF5OtOowPIgIc41oM\nOIc47MyzXzaIS/itubrOnK+ylZfONMlv+jqNwwtHkaGg/RyfcLLFN3+eVNML\nb/K8hCrULBp562v2SWffO84BRoscaVgJki6Dzev55q7bDHTwVad9bhNen/XB\nnKtxf7GzK2H0GBAyhyZ07s32YkcE+F+HFchy0r38Y72Rvhu5RjWO0OcdL7QR\n5a/A\r\n=GhTZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d248dd13eccc63da2664cd463df9caef97a3aafa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.69","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.50-renovate-sinon-10-x-d248dd13eccc63da2664cd463df9caef97a3aafa_1618434055264_0.8471288101776209","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.50-renovate-major-socket-io-packages-0bbd723472abbde8b753254d7ac4b3d630db2b86":{"name":"@balena/jellyfish-client-sdk","version":"3.2.50-renovate-major-socket-io-packages-0bbd723472abbde8b753254d7ac4b3d630db2b86","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.50-renovate-major-socket-io-packages-0bbd723472abbde8b753254d7ac4b3d630db2b86","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"69f859134a5995db1c3d11dce0883e7b8eac8e3f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.50-renovate-major-socket-io-packages-0bbd723472abbde8b753254d7ac4b3d630db2b86.tgz","fileCount":39,"integrity":"sha512-qrRG6LeDmuGrjUsPBlDj4XVcPxXmm1RntjHV7YClaO4UWPDA+4pE7rP+XIsYeIn6mBGIxX+RQyoDwcrY6r8zog==","signatures":[{"sig":"MEUCIQDi5iZONiKk+EyKbQFYxMhABsZ5rkpd3jY089QNA4VOhgIgcfV9pM+/a6XM9pcoTSan209f7ZlkAUg2OrA1mWOVNl0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd1hoCRA9TVsSAnZWagAAS50P/j00PvnaTiFeUil2YeB4\npaTnTxSHoTbOarIr8jMPOHHDt4BJkng0QljK7wDaTvgi31o/o/JDauGF5iO1\nnn/ZzPA9A7z2yEu7PDRrzAcTu8Ljg1CduQBkU//ZGbvbAa1IE9AI5Sik0IRd\njjI+BkYODlJWpLVbRcaSL+c/S9LiLXE7h2/dYXwoJ+dMfijzTsy2/GtNiW11\nvoODpcN3ahuLiqhBeqmnkav+KTfpIzSzqDOjK5XmzE2jJLNWDK4qbrAkXNm1\ny1AwgzKFpHu9If8zC/V/pWvhxbtEMp5/fXEkCjq1Y5LFmeV/hEr7wjaNTHYa\nAgDBjvJyhFJOQQfG2Bxmp9BFOo3RGpJ/f9ppJ/ViKTNH8hfXrJ0vpY7PMgjM\nTdFRcUOXYVVJtUsjThV8pH3v4y6RnDbTrjxKlssU6k6z0DF4X9h2IEr1WMDu\nVjAzYbGIyN5w+S6oNLEq1z6cnwV2v3Rng6GLEy9c5KX5tBe9tmzUHrdJK1B/\nynFnCVrEL/WC0p8YP67bd0fpMNIJvZfycWYtYhn61dl7OVbTl520raH/AKRy\nr+UbASxSMdRRqLbv56OsiN0TVhOcQgrscMxzUJXakSX/7ZfqQ3QF4pwwJeHu\n+RKZ8+7pll1rO0BCzmHIQriXKEUBe88Fw1CcS3gvZT+J61naFBc7Seth6Iew\nONQx\r\n=QHw5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0bbd723472abbde8b753254d7ac4b3d630db2b86","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^9.0.11","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.69","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.50-renovate-major-socket-io-packages-0bbd723472abbde8b753254d7ac4b3d630db2b86_1618434152470_0.5526125865987839","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.50":{"name":"@balena/jellyfish-client-sdk","version":"3.2.50","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.50","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b40f67055c9507d4013b00da8646ab210d6c75ec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.50.tgz","fileCount":39,"integrity":"sha512-T/Fp396lRaxY0X9DGd55Ytqtqor+WqXjS4N7me1XVNBM2AMRcZ/j7PpBGJSY08c6PqYx2EyQZ7PXIq1tRbFqcw==","signatures":[{"sig":"MEYCIQC5liwX/tsUogoQnQmJlh9lQR9zA9z5MLXsoL2tI2xVKwIhAKQXxFW/PAKc+SyFRju9W2+kf//4dmo7cC2XiNHACxQe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd4TNCRA9TVsSAnZWagAA6EoQAJ7KjTfgfy+Na1usCz6+\nRLE85DuQsK/lLIord8FN5q2qsH94e4D2dsuTdXcYdDJ59AAHa/0i8m+Ft56l\n78UR1EuHpy9dXIBQqGvjVJTaz3CmbaBtmHH8QS0XJktpcsJnFtHMSDy8LfFm\ne5BNiHeIWkR2+3q1PNYGxqtXOBBuu5guFThYeXZ4F6ljAytKoC/EbgtVqC2a\njmrxdATxu967M2b8hTm/nVW0hVP3m/xuAJ82H6hSEzVda+KQj33lrdN4dG/w\n8f4hxAEzOyhSJ8En2JIUb+qXgR1FCg/cfznnJ1HS8eeR4ktyuwnEY9Fentdh\nYnOyFDm5ug7pplQT6JLWKKFgzWp+kdtyQQ7bVhJSfOwNP6cHd0Fp+knwNVyy\nG0JEz3k13cD6u0tGXG1F9W6CkAaFydiwU7jYg7LfGgWL/4fjj2azHTaSbjZs\neHBP0wBF76Ih4rgC02jYKp3qKRuJQhJdBvQMXhxNtdOAsJMd/KOdyQFBmNoY\njfrhklzsFc4RsW0b/Fv5VYeZEqURkX6opD1kZ+ZJFH8+khMRgn3xq8Mp/eqp\n5rxOR3IlJ+fCugVeqmo2rTNgtbeuPOvr4894e58ft0YOKOiPBqJMEfyS1Thg\n76kiI9Vg/Bn/4ua2rzZ6swE5pnqEcVLxICfcgmuHC8VIsfjHbqvc0eyNIVQk\nB8Al\r\n=HasB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5f73b85374de56247b932a7d28002b09286e346e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.69","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.50_1618445516642_0.5969792144456993","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.50-renovate-non-major-89ac2f3e3e106d3f908c5055f1b5c48b6f7fa45c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.50-renovate-non-major-89ac2f3e3e106d3f908c5055f1b5c48b6f7fa45c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.50-renovate-non-major-89ac2f3e3e106d3f908c5055f1b5c48b6f7fa45c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea953d2280f93799af22f89cdad6f45abf789833","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.50-renovate-non-major-89ac2f3e3e106d3f908c5055f1b5c48b6f7fa45c.tgz","fileCount":39,"integrity":"sha512-dT0LChchLRG6C5GDwenyx96ekoobNvNn+e53C34Dmsjd8een/A68a16ZQsDip/kW+8PzA85gemt4f+DRoOwyVA==","signatures":[{"sig":"MEYCIQD8UF682wRNwrYGS29EW+qrF83j1AAGcEinKPtpUCCiaAIhAL2bMzUoXmcaAIDnhqrwaamJhOZb/EOTcEdLlW1w90QO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd4WOCRA9TVsSAnZWagAAeP4P/258isC5qHLnOneHyA/j\nEXVOP+2r8o/53/hsf9BP/U0OIWx5mG2C8ECkaWvpRVILQPuakO9KNr+1rDzZ\no4On8YlT9BPTG/Oz2nbMZocgkOngy68iBNU+e1pyNiq1gRUY8jHGHOHpS9ZE\ns5o6Cq/6Q1HXRjleCH7Iqf2iK/xi4UL/2V/xOpeFIaysdt2QdYUyL18x3av+\neEUDq5s80tFVXy2ChIptMZoUozG4At9HVU7fhSyRJ2t53ywQ3KjgeCp0lFv9\nbBPCTp5+pw9XmCK9ZO5Ql41Vad2TVUBI55DJ17gXYR31RzOKDKVQsxIFFYz3\ndOt01jQt/rsq9FpO8Fsik+viOKCDT2zNKoxrxxKIaK+WKjb6n17erxcqn5Sl\nT6DhibVGmme76IRbCOZqwVjc355DUtr41oHxMNqWsHpdPIeNLnVE3K3rdoi8\nhPj2p1n5nbIY3sSQbn91juJL3JL7zXo/bnopLAPXtLsRr0YFZTKqr/mBQqaS\nLQR0cjodaF1GJG3y7bICkHETIhy1zautf/k6t1N61w92qiU5Sk+aG2aLifzx\nXFIugH7TkigsiCssox5FNg7gyJqclOsBgpoj5XhLfPMBnBA8pm4VCcmZBgTL\n9aZ4EpGKBpoYEN5bNGlFTcX+FY8h2ZXkxc4bKhUawC4NotHr8bRYwrtjPSAC\nNCNS\r\n=gARO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"89ac2f3e3e106d3f908c5055f1b5c48b6f7fa45c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.70","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.50-renovate-non-major-89ac2f3e3e106d3f908c5055f1b5c48b6f7fa45c_1618445710312_0.9215737301506741","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.51-renovate-non-major-75e9133ec9ffce02a58c9ecf35f196875f1214b9":{"name":"@balena/jellyfish-client-sdk","version":"3.2.51-renovate-non-major-75e9133ec9ffce02a58c9ecf35f196875f1214b9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.51-renovate-non-major-75e9133ec9ffce02a58c9ecf35f196875f1214b9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7354d05d9ba939e1e56688c4e497febdaf8dd4d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.51-renovate-non-major-75e9133ec9ffce02a58c9ecf35f196875f1214b9.tgz","fileCount":39,"integrity":"sha512-DHc5GxqxqLu2Q4NCV/MC6L9fwiq6bb6jltA/g4xy48+Zrn4Tt8l2GcAa/aFkrvYWoYpHSDmLomPOdFn12vPKvQ==","signatures":[{"sig":"MEUCIFh9C1QgBi8NLYTmoKGgZWmCcQ8m5BNHOKsIH04KAda/AiEA88OexGxMrEjSsnF109M1OUocYXwI3PNSnPyZEibL/k0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd4Z3CRA9TVsSAnZWagAA6wsP/0a98QUptwu6YeKc+4gR\nSC4mE8UcbU+kKpG70nWIinOkaWDDKY0doVx+j6V3Lr9D3PH80vEFgGTiHIKa\nzORSfLmPiXmra7rP6Fr+brPizYRwU5aFPlLJqaSojFeqBwsPLsb/xLN68dZD\nHz+xDfA0emnfLZU43BEKFMeftbmp4gCo59dQF+5M5vtmKdJ99+5vmQq5t1vx\noX+HUxYbAY38pokH2Pv7n2FODEydI8UWv1JbsV72rusSuR/xHDcyUjnpeTAz\nVKFwyEtKA2Vx2DTG+s1DkvKIeaSe2SuUEs3SU37qoNut9v2kAxrm3o9DLJ73\n3MEdOPfcDwK1r6NW7ZsDLv6GbHvaYRw8zlSuATGHoaYDkYjN0n26RdgFKtX9\n7SeVOlk9nNPFK9aEGJUB7wZ/TuuKLeXLBYhoCOKJ2ZVYU+A4IXgvhaXjEE8g\nGVlQIht/3RrKb5yfX1Qd8E5IoIVPcrud2mnLrA0QK0dVkTj1KGPAIpAqMHtb\n3sKDdl03Ys57gL2c5DXGY+QuGI+RXpQQvYOeOdr5Uj2LJxcv5oHb4E7sB032\n0f3YI6S8WslgFn/9nWWmQQwrtvUptNXhBOC/w3ct/8ZnKQULVd/24g5YX9tb\nTj4krCGta+KQOQa+3szCI67QrnSDTNjuFnF75nstQQ/HD3o7MVDf93tPXCMh\nwGd+\r\n=5Ito\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"75e9133ec9ffce02a58c9ecf35f196875f1214b9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.70","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.51-renovate-non-major-75e9133ec9ffce02a58c9ecf35f196875f1214b9_1618445943105_0.4499388845947512","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.51":{"name":"@balena/jellyfish-client-sdk","version":"3.2.51","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.51","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e2d2b3426cf10a872166881804c4062e1346db5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.51.tgz","fileCount":39,"integrity":"sha512-9+BcZIEP1bvFY9lQBCCTTnpMLcq1SYCwKTCCeV3no+Ju2v9BgMvmcYjtLU0et1SwUnpJ3AK75adFMTsJsDZNbw==","signatures":[{"sig":"MEUCIG+Sxn7KKGCACij6sR++SsHtgL8z1DsOScjk0yQk8zkjAiEAxv3sz9HarqdQ/iWb1riXim9btkX+kHvqMRNsuvsh1N4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd4diCRA9TVsSAnZWagAAFWsP/3ABIQPRTJtbd2w88PZK\nixntSk1Zt7OUeFSdtMJ6iSp9wXFh0oCHSUXxTI/418tM6T6+oj97YY1w56eh\nKEuqVgHeihWxuvSK82+XZGcEVF7aXvZNkD3iXfIT0eoFdmVxAolHFoIDHAHZ\n5StlBfqbXXMBUGR1A1QNSVqUQ1JtEH5HSRIQ7ds3IlaaPQsPuVUzZGpLCeTE\nmuxK57a0bpnT0t/f75mZVXBMh2XMzV8ysn0fkmqsqFXRahJ7q9h+lEP1OSeT\n8UZN6akFGIXlQtj7J4D2OOGy+P28dRqaSM4Sfk737A1463Qge58sDH27CYyV\nlIUwNGl17q09+qHMYXLh3AKw8C2WK0sAFhIC4u7UNgykvWnH19p8Pbo57wVz\ndi3rhLz7MSy7/yUMZHpNBIg03J+D3wVz6HLag+wFB9BY8jVRIqJqKlSlzOtq\nIz3O23CeoTVXWywONWgdMUCRmewdjTBmRU1VUm+z2mR5OsVPCDpmygaNYqeR\nrwU/rYlle0BgMp2vCRI9QjkWbTRfcwEx/05tcN5mpIe/cmairXHDjCFJ5pTD\nTRdk/Omxz77rjuvv0r21J0IuH8arudg1zUHgYwUy2nV4zM3uETVa67X8Awot\nJDP5696q5uNViSVh1okWMQgsrJnLn55R+QYd40kA+WcEwG0VUJeq81BiE2Gj\nwYbL\r\n=nBYV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"32f6558271131061b92f45416af4bb17d87405b4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.70","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.51_1618446178079_0.4489169481404405","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.51-renovate-major-socket-io-packages-9455aeb81b2b3e923ad1d0f90565b6089268fd09":{"name":"@balena/jellyfish-client-sdk","version":"3.2.51-renovate-major-socket-io-packages-9455aeb81b2b3e923ad1d0f90565b6089268fd09","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.51-renovate-major-socket-io-packages-9455aeb81b2b3e923ad1d0f90565b6089268fd09","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"47dbb4b278c213a5d5bb041e5cb9ddc7b466932b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.51-renovate-major-socket-io-packages-9455aeb81b2b3e923ad1d0f90565b6089268fd09.tgz","fileCount":39,"integrity":"sha512-f3zJVMKgkZoBBOZl1Vd4Q/o4CjNGfvA+RfsEPlDQUfiXe/K8d5O03eeVZrF1onuEs8lqxDbEbRbwc5x/o91M9A==","signatures":[{"sig":"MEUCIQDZqOdc8t8Cejv0stmjQTvGFIbwDBR7vqZcOeBjjEQOggIgX/Y010sW6a3aLujILyE6+6X//5Nk01wwB7z3zd7VR7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd4hJCRA9TVsSAnZWagAAcgUP/izxvRHVxHNGtryEX7Uh\n/SmUxQEemtNS0LZVXrZfl5+ExLG/7vcecN65QxqdJITdKurNLiOqqT6zbyjl\nFaTw9IzYCO6+zwDm2O1Ucw3fFbPdrC7j2d9uDFr4CBpBZtUUGKLQPlPYuNo9\ntGW3XgsRXyXJz7+hMk8RV9sxRWVpm53tMgTRBCWfYXnKyn4Y2Gogs/vOrM8q\nhxNhbkMBhloYiXC26znfK1cr2c1se1qqsfWKkG+yH4GETSabNFoeXBFqS/1k\n4jAZtRUkHTWaR7bOGcycVo/qq0gF0iL+n7gfQ0QxyaIKRwBxp4V76Bh1/ROb\nrz+WiT3BYwL2UyGLOM797h5C2oi3s2OIB9W1ryc6LXwWy8Q2RlAXN3bOAP2X\nftk3Bt7/ulmO/kaWAh902jTCfO9o8Tche9izXfxGWrk3yyfUJhx7TbmglgNn\n4mU2qNela8DBPrwUl8fItr4UgcFwNnuTgDOxwC+MGE6nqqvq3qI7ytT30Iw8\nGsSbqOFbVLb/IlrXXSVwYEVNpOnZE5Lem58zCgET7SctQXF/TmIn1lbE+Qm7\nC6AKMyBExM3BLRuvictIqZXElal/CFZemunnF64WT/W4Ye0QMQg0/xLfn5Fe\nfFdOq7j6wn8vNOc0bNbGAuNWuupM8/NMyOK1F1LEbtTHAMx2tZwjJTF+qOAW\na7Oz\r\n=DUAL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9455aeb81b2b3e923ad1d0f90565b6089268fd09","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.70","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.51-renovate-major-socket-io-packages-9455aeb81b2b3e923ad1d0f90565b6089268fd09_1618446409269_0.18862370615141044","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.52-renovate-major-socket-io-packages-64902342c44cbea0a0e9b436ab20f3d47686e0c4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.52-renovate-major-socket-io-packages-64902342c44cbea0a0e9b436ab20f3d47686e0c4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.52-renovate-major-socket-io-packages-64902342c44cbea0a0e9b436ab20f3d47686e0c4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75bc28d02173c1a7d4d5358996fb2cc77e87d9fd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.52-renovate-major-socket-io-packages-64902342c44cbea0a0e9b436ab20f3d47686e0c4.tgz","fileCount":39,"integrity":"sha512-th9scZ1ZRPDXh71idVpiqv9ZKpWkr8x3bCfIZLtDr8NxvwScRMvZTDHsbdFy4sy4sCms78L82g57XRlFPImw4Q==","signatures":[{"sig":"MEYCIQC77jp2cAbc58zJ51o5xVRhw+/uhLs5PngAuTsK1LmeWgIhAMGRpMwWny/pKo6OENy+kBkuO47jC9Etz5dTIYRa3iA9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd4kpCRA9TVsSAnZWagAAzIMP/0zGLNFteerar7z+EZg9\ng/wW6Etg2jDC1HzzELLb5j4uDeyE0IgyLU6Xmp+yq/wLXDHu2eJZUTiPSJ2X\n6At9318ciHHwjo4yeyxxzkk5h9lkNps3W2OTUxi/bcg47I8VFCqeY5En1esg\nVcIbkl5C3WRYIESoSKIhZO9uYILAZXKUMvsBLvzuG6rz8Qnegs9/rti9cYvQ\naSGADIhuZxwbsnmnn8q5ejIx5zEwVLeVjldatiee+G9/X9wSZahvGl1vl2N5\n3P23KKgHiaOxdIyQ5cAmd8BnmWp2E6Sr3kqkgsJ1euWlTSA3iXAkEeO7A6Vb\nIVvd885nF6nidAqGHOGo8K+HbRPq7S7BDtxteuawGejn5M1uJAb6ho1ofDxM\n370jAm6MBP1k2zyFBhrd2ARWIkDCoW3Xp+XBTmVScLZ9/M9mkySFl8MHn1ZH\nQ2rvgGXTUinfNltVaf+Z+i5bZlnmg5ChNhbpv4iDyvqb9FyatvjeTFpuCRMQ\n2LmHG+Q9ogB9/dzhmA3SvC6h3JvIvGO/AiJ/lfby5MB5MOm9uA9bdwgMHYMh\n2iwhZa+JgsaGnP/O0Qj/s3F1sOGJYC+Ag+DexeDGThLsM0zLGRWvIFiQtmUq\nYtSAWQ4q40JrTaZ/1Z0dW5oduqrFraAVcxwuxZIj6snp7GeHz7gZG81pHC/d\nRGLb\r\n=hclu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"64902342c44cbea0a0e9b436ab20f3d47686e0c4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.70","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.52-renovate-major-socket-io-packages-64902342c44cbea0a0e9b436ab20f3d47686e0c4_1618446633356_0.8595307968290384","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.52-renovate-non-major-0784e12dd1af01040d44589f0aaae3ff95ae0df5":{"name":"@balena/jellyfish-client-sdk","version":"3.2.52-renovate-non-major-0784e12dd1af01040d44589f0aaae3ff95ae0df5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.52-renovate-non-major-0784e12dd1af01040d44589f0aaae3ff95ae0df5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cf121455c353aabaaecf1ed244741edb0a3c5b8c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.52-renovate-non-major-0784e12dd1af01040d44589f0aaae3ff95ae0df5.tgz","fileCount":39,"integrity":"sha512-UK3ST+zIa43pSb7DKr4/HjPONYLOeihsveQwShzzH12HvXuro+MyfOSV1QiMR3DZu5LfokhxJ5Jg+5WU0yqOog==","signatures":[{"sig":"MEUCIG5Za7/z2kixJoZ3YbfM9BhdncDmAKyu+xJfPH0wlNjeAiEAyI5qK5YxF4KJu+lEIX4/IauNp+2Q3MlzF7/pFlm1k2o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd4qiCRA9TVsSAnZWagAAY28P/125oIgQR7J9zJ0wAwag\nfsBIfIY2GSaq03yD8ML4xwzyur5VSHM4211qrbUXDNdMxwdH/QnOpF3mMWoS\nqJpbjth8h0g0wCYlPchuEybH0o+JDG5mY/2/PklbE0bW4UX5+5NkjRVXd3dZ\nHCEULEZy9Q6IUTQJW82Oy7mkkrBhtdqoHDBrirQizuVLccYPBGhz2Llzux/v\nzBUwZjH7djv39mQYwFewMER4tseg36kfEI1EAa5TcbYHv/eGbDk8qQw/LsU8\n0qp1IXAH8gixYRuCZ+ldf/CSc7uEtR/IopNBPs72J9RZ4INlXo9nGUU4fsno\ntUKFF51Wo3R5pOU43qO8Ui6Pueqs/s+/kWTj9H4YbFDq9TvPtMmprPo/v8FB\nQvUT2k2ov0xCmDOlI0/UpFa3td9Ire80z4GR3fhm02yZIy0PIX6/daINbL5H\nFaipBTXOu6fmpRWSpwcOnV/V5xj4fuvkXbdysyxiDCKUPrMicCz3hlEeaj1s\nm6cne6FOnC3ebFFt2wVPVg3+PxfrFWOJpfifiw0VCjcZnOcR9I7b5v+xr8zX\nQCybu0FF+a05SJbB3Dzq6rY743TtjslDyS9SLlwiIo110/ckKMa/dKVLEbb7\nJKtJpuZFWEpbrGoZOGFUA4BlzEgnqzPSyHUc1QC6CSknJN6LGicxSEsS5dZ1\nYJrX\r\n=Aywh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0784e12dd1af01040d44589f0aaae3ff95ae0df5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.71","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.52-renovate-non-major-0784e12dd1af01040d44589f0aaae3ff95ae0df5_1618447009612_0.9229322463714338","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.52":{"name":"@balena/jellyfish-client-sdk","version":"3.2.52","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.52","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2c987662308f460ba740c0c18b8b9fe208391ffd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.52.tgz","fileCount":39,"integrity":"sha512-FSLPNX3AYidK8k6coJWD9Eu6fWkLBFGuzgl1Ae01I0rmDcOwVIzvugn9WK8LtK/233mMovg7bAWQI4rs3gF2uQ==","signatures":[{"sig":"MEQCIFtv0R0qkNYFTG+iLbpbjXq8HrEeq99/2B94GTuNLv3MAiBf6i6inqBRD0qYFv4PKyDp6Qm2KBbtkigkgjMN/PyWSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234328,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd4wrCRA9TVsSAnZWagAAD4UP+wTh9P+RgAofWBJwu5sV\nsvyNhgd12lfjsjKiUQlid12tW9Evykdk8YZp7LWm2WKggtckqNrOoMmtJYAu\n3wGQz2boUiyCNB7vOsUSifuNavwqTEE30dMZWJgOjI7dNea8niX7/1PsR334\nfi+YZxcChSfXrIAf3y9TYzOWnM8p6ffzXRs3O4wO3UQWOHaESB3yhHhpvw08\n4SfiBHPEN/rl2eC5aEKvkfOkIwLwzlUpEw0kPyaYvQKR0u3BJ6WqVT2qwwTS\njI4Nnfr46UrCSyHwK8Z8lfw9sqz/7QMs3qICZjuF46HJWIdR1hKXvhozZbjs\n+AK0um/q5V/84Z332Hppv+2m2vGs4O2Glx8w/UhXlxyWHOxJvcPXTZs0IcJO\nxRoWRcVApzulm7+QBvfvun8S4x2yEoDm7BiiMAPXaATOykJTOgBtLq/XdNWe\nWmu4JfBaPl/HRscqYg56vMgFu78hw0Rvrg7z802Qpca2qtLHD8Eyqvr0Df1O\neCJ9GNXffQeLOZ4CMJ0Xd5n7fGAzLAph3dvQnyGDk22Cc7JUsAlVW2qk78+E\ncyBQzktOCkh6pXC9q3k+yeSeUNywER36CBoSdZqfZyVbc1KhvvJv65yF/EUl\nzXUOtHxqpCBcI6r8W94K2+ZmjX/IFGi6cfmKUoFLJECfPkgbv+VMgRXqm9AX\nza7E\r\n=Lpcu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c79b5a95c9d9c68f8c1508483eb543b77279c1ae","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.71","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.52_1618447402887_0.10626375090669882","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.53-renovate-major-socket-io-packages-a3bc74f2da26b9da12a5573a67be2398b9533f35":{"name":"@balena/jellyfish-client-sdk","version":"3.2.53-renovate-major-socket-io-packages-a3bc74f2da26b9da12a5573a67be2398b9533f35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.53-renovate-major-socket-io-packages-a3bc74f2da26b9da12a5573a67be2398b9533f35","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"150384336e7e0a08cfe7c103bda096171495c0ba","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.53-renovate-major-socket-io-packages-a3bc74f2da26b9da12a5573a67be2398b9533f35.tgz","fileCount":39,"integrity":"sha512-DW2M66FJ+RU+uDxxFe9NIt4ywUI2CtLPk7VOFL84IGZHXh4DgeIWP9sdXtRKxVEv/FfuXOgussEYEZKaca6L6Q==","signatures":[{"sig":"MEYCIQCKEXfywomzkxeRICf2EiYCxdsFuIA5LpyPe8RpR0ginwIhAK72+2gc3GalWVpgSadwnckWN0cbOcwOF65H7K7kICTm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd40RCRA9TVsSAnZWagAAmCgP/i2hnkXymxfhqFgaq0u9\nfDMnQFelSzuKLCJeib2v1bt1qqeLrW5iCvg4KUWFfb7NWo0C4c3D6y262Ou2\n+waGIh3qxfeHj3C/0yzNLREfrroteBTk+ayHFq8Bv4VYzavMyX5XLlEH7ziE\nXhpbCfLRUXEeqMm/xEx4xty3MZ6X1mbjvdmxz/daA7KVRzYrUT2L/sxVjy+1\nzWuAANCH/XW78e1DEUYRvhhSklOL/v7WpmtgTDoGBoV8SEbXdorgz4e1E22O\nC0NE6AZHQWHrMp4CJB/shwlVq7EIyuExbo1Sh+lPVx56AhO5gZ58X9wh3pQa\nhebMkUzQGp4UIxSl/D4Q21tGTW93u6XrznLaI8Z4Ca1ImHuJBhYS5br9zi7v\nVDBZzSorY4DTvIpn04MuCQPDFH8v7USBQGt7KflI5Lon8tBwYLLwIXtpYlDS\nqLtDSAdwbMBARHSlcbo7xUtl4nkzwMakMzwg4Sq0P9+iMZRdxbr6l3XKOAhz\n1RdZs8mVQ/opY1mX3mdCElbdCEhWUfUvdpdxfjFKeXCC5K55B2q8qhWNOD2l\nLsG4GlWeqO9dpVUhr7rS7aviXuZLtlNrx2YHrcAehCUMvJLdyi8pT6xsXKKu\nVBL8av/MHHw4XaEcs6QpVUZ3JLC88WwUuhA/pJok2gwq1CIoBLZ3Bzf0R9WM\n7JOJ\r\n=HJmL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a3bc74f2da26b9da12a5573a67be2398b9533f35","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.71","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.53-renovate-major-socket-io-packages-a3bc74f2da26b9da12a5573a67be2398b9533f35_1618447632261_0.6111607218842561","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.53-renovate-non-major-6f1eca1cce2129d0696f893bf822affd6c5aa09b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.53-renovate-non-major-6f1eca1cce2129d0696f893bf822affd6c5aa09b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.53-renovate-non-major-6f1eca1cce2129d0696f893bf822affd6c5aa09b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"875c8b2ef315ac933960aad31b9cc607a39dd9ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.53-renovate-non-major-6f1eca1cce2129d0696f893bf822affd6c5aa09b.tgz","fileCount":39,"integrity":"sha512-Q45xEkz85O+Io0LpNDPjoFB5U0UbSYlcTnQRwNtbZUOMvUs/IRWDzMujD6G7vtWxdgZ8wn81320UMj3v1hEcnA==","signatures":[{"sig":"MEQCIDqu1AYwBxM/kTIGQGtWEY3KQPsZ8VzmzF35kJeWNJyeAiAq1n4ZJAU1tQcZKMW6t8Wva7a/e4TGtLaEY15U720rKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd8FDCRA9TVsSAnZWagAAQJ8P+gOoze+znd5/1OiByftJ\n3qCDFDJ1gtbNzMbdNOEGoTtdNgKMfqV0EVDwVSw8XyGMb8ONENlY4/WgobZG\nXqPQbrry/lKZFLMrBNLYWsW7GD1GBZ+tzYb630HI1L6a+raNJKSi7jo3SwQS\nonvdh+LptcHDtvOyo9mBR/L69ncUuv0Uko0DPjrze+3F/V74FlmLT/L4U7eV\nepif/8XAvu0aJN6mhObAEsWcSaLbsXi72yvJT646QCk5DGe+vK+SdiPfFkJe\nCD2Ml7kondfzJ/K+u/dNfnxbg5jbtG+h/ZzPfMbmq4PLE3u88LTYNtAZeFJe\niJKXbU7TCbvlYNz1UTN45aDza/vsvj9y0/uIv//BWYCdOkULtroM/IFClawd\ntdw9d3SaKGOBlZbOv7f5I82tlq3BqGi8l7qqSIbz8GOebcPfPJmV5V6LUips\nPkGxMQSM+oawHSUhRwk9eJkbQl2kiNYTO6uKpwnJ/gT3VYk5/cybYuG5TP4i\nYNjV9a+ae8sDgAEp4rnCONEz/0Obox+GlPe2ZTTyJFZ1+LwslPPf9OYe1reE\nsb3qQ19nQ4UrY8PrC+PCjXCnPPn2xlJeay+EdLipGl5hBoD4d+tcic/Z9aAv\niV7NvOc1DgP6d/jXDcab11ngrfTlpMJkIEjEGc0P7nutoasT0Bc0A+p/vuq8\ny949\r\n=Boqq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6f1eca1cce2129d0696f893bf822affd6c5aa09b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.73","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.53-renovate-non-major-6f1eca1cce2129d0696f893bf822affd6c5aa09b_1618460994817_0.9154404850172588","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.53":{"name":"@balena/jellyfish-client-sdk","version":"3.2.53","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.53","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5113def63100fb0e3c69a1cfadbe26f14f944ea2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.53.tgz","fileCount":39,"integrity":"sha512-RWX7D4qT8+cp7FBvlEieGNv7M4hl4XHOAH/+X2t2dfL4U6IwJKj8sQhyUnyTqaZrwK5Vzo8rZba6uCsFClc68Q==","signatures":[{"sig":"MEUCIQDF1fPnB5LDgpmGwBbXF26AhwfKe31UQKzdFtkb29k1IgIgLqkE3DMk3YnJi9+3JaIz9LBPztooHYJrpzR2frShsVA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd8IbCRA9TVsSAnZWagAAXL0P/0i246hsa8W+3ws2SwI6\ntzcrk9DpxLaIw39LEDh9JAf7lysRKUywYrClJxuvrtoHC7wANUzSOWLsmiQB\neJ673ngJNgwIcvmSqZk+YaNuady0qtQBr6AdBMaHLEbLpz0d1LTYrJREFZf1\nXvrOrg1UG25wUbbeh+QFQJ21SDLBk+M467i3erCwBhfyHYPmYvzUfwmDW1RE\nZaLUrQvU0n5AgNPKdq+UMka95uz/wxosftTv0JQ2o2775cG8EpVEHJlCqUp7\nV2QUkIiY/LRTPEPJxSMfrOBfVoiCzn0HXX/orcl71vNz10nWLyLWYW4+f5+i\ncqOy8EPbGhJIXtlmIEAo85AaBe4j7XcXDEuNVCQkZR0MUh214NPLY3obZ0Ku\nOpLTHPO5s79BXVb9SoEuj0Lq6W84Tdwe2psTVHu/QyVGmJYMrtvupITrQJYS\nPoNHZGs4Ja+X0rYLdIVBOsDC8mCPiOklVKK0NX1tzM8L29nEDONzzakEspXn\n4SYZMBc0CaItC8zUmED9pn6ll1fboesk9z9evWjs4KNGWY6DgN+FBQ+yBE0j\nRpiUxVmicJu/VSS/speQl2UiN03aXGrAhZSg0jECG4bzs/mFF30Pr5F1OW22\n8rlL8c8YYWY9iiJqSYhTWTNtCjJNLLLniMxFOimE8FVNvROlToeeGekNlu9d\nS5QU\r\n=21DE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c9c157a76fdd15675580050497303767253170cb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.73","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.53_1618461210938_0.552960912831497","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.54-renovate-major-socket-io-packages-d96fa4456cc2bd77f9cacc4668f264abefc93f60":{"name":"@balena/jellyfish-client-sdk","version":"3.2.54-renovate-major-socket-io-packages-d96fa4456cc2bd77f9cacc4668f264abefc93f60","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.54-renovate-major-socket-io-packages-d96fa4456cc2bd77f9cacc4668f264abefc93f60","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d7b27034d3ab08b4887d7d5a9d1655c55c6c7839","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.54-renovate-major-socket-io-packages-d96fa4456cc2bd77f9cacc4668f264abefc93f60.tgz","fileCount":39,"integrity":"sha512-mJFlQ27FKeuJPFrDIxoJSpJ+nzdTvZdqQrspaSeivStfBEIvFvIU3dNHVbQ4VXfxqZsASI6/riluaUj3I8C0dg==","signatures":[{"sig":"MEUCIASldrfUS4D9Zx8SyH5TeiA1+XFaZeWirPW1LdjJeXcmAiEAz8O60DuEv+HSgFb8/SdtbUMpyyQYUSlI1CPPA5QxME4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgd8MqCRA9TVsSAnZWagAAIA4P/jHHqUikaKTF8pFw7ugO\n2Qw+VUssjV3CP3jyBziDSpEHC/VOFsS6GIbDVJzBmLstbn5sjadpSKgsjRap\nhvxBGvebSc3gA77SO8zUdkO1QAAUFxff7AwZB2QEGuc39RdQT5HsH37lq/ak\n5joC+36fGIU7mVY0H2GbsM1jZdJbk47tkOW4Dzcyqhj8u2FQ9MNR0oxRbxU0\nMMP9N7nI6MpN2JUmY03DL0RR8p6onGuywgbEBQZFBkXlMyjFUeY6lQZx1Jo8\nbzWjpCAeTMqYk7tVql7fniLvpxwtOuDy+pZeWwanb+Dbi68NuiDUnoeo45vM\n11GWZiVFRetIRlF8JLy2bk7PwhRF/3Hv3MHRvzsraIgwEieAvoxMQbf5/zpW\nSeuX3+/AvsHCjrMxgjeKzuo5SbEhxfqEmiwZvVoQgLKKxgsOBzjX1HYMSN4z\ns7JNSktBfBq8u2gOKJU0y5TG2tB1YaptkCVp3RS291VDnaY1GIwK7bZ+N4xH\nO5a/r1zVFT6IKkY0E1sTbLCaDpOAScujDTvYDFXbmJxn1mLEzQkwO7tkZeL6\nlwI4N8uXXkLN50R9g/7roVdgItPbloTL5/mLJkGSIUjrYjpomIPzXZg2tCHY\n7YWTifiOtdu8U5zgy5GJBB60cHSm05FQ5/5Goyo1BnPBE6lkdXdlCis83vD5\n17t0\r\n=8E3r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d96fa4456cc2bd77f9cacc4668f264abefc93f60","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.73","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.54-renovate-major-socket-io-packages-d96fa4456cc2bd77f9cacc4668f264abefc93f60_1618461482070_0.641403206973777","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.54-renovate-non-major-428458eaf5948bdd48c385ba6b33e9172978660b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.54-renovate-non-major-428458eaf5948bdd48c385ba6b33e9172978660b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.54-renovate-non-major-428458eaf5948bdd48c385ba6b33e9172978660b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ced01c18b0daa139407c0a25406591a6a6a734d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.54-renovate-non-major-428458eaf5948bdd48c385ba6b33e9172978660b.tgz","fileCount":39,"integrity":"sha512-yn1HEYL/tOXO8WtHfgrr4g5Ive5+arHjelUzxhnkK6giHTwl8hgShSTcrFq9wt/+7AzQ6ivUQRqMQplTHg1ZSA==","signatures":[{"sig":"MEQCID5dJXtvHNw08faoDHCqjppjZO/2J82MjCXYD6A52laPAiAVzRNSlCwi6MPugL7qKAVo3hTQca1RBdF1rnT23s51cg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeAC9CRA9TVsSAnZWagAANhcP/2mdVaTPswel2A1wJa6Y\nzHZ6DyGrPBTZ24KYGWW++WRLw8quDuRgB5fNmXagwM2mthj9+hW5501Fye2K\nXAt2+4FengnDY0c9X01GjH2SPG2Py5Gg7GCHJqyShuc0yz5a5w6Nyh+1rjEm\nJ/tS05yiALksxMP9YrwInRfojQg/9PNKmRLvTvEOkzYyMWVZscuQdnUTpinL\nWyTHnS2ln8NBx4A/cUz367QrvOgjuBFMm+7chTqev1+opDM6GH3CCjmbUOxr\nQFRqtLTzj6XGSV6NkJLqlCTRZ/QVojMYIB99gOsj0DvHq8nkbwckIPviud1F\nCLQbvwBsHAgQ9qaoVpg1vPsvOGRWZluPeWYiYfRBtBa95Uy+VA5abfRBy1hW\n9LUa9206RiXZJyZUq4RAXOOAh5GpFQlAZ95i5DwSc3sKg6BOOmu5+vdRr6G9\n6qu3LS9AsOR6lxdXJ/+Aqg4QXjCKcFYvM7KuFEXOKTfxyQXZNX/CCs1u74C8\nKyHRq2IkUlKJnjy1HmYbQua4Ahia5g3S0gxH5tXS4hLbbIgwX+tMYKUnwxQD\nPrVvmfL50eId58rZGu5l1+BBgokYYIHMOK4Of02qUSMMvrTwjdZlnnCVQKEV\nF8wrBbph36l8SweE151zzu+MVGBvpqCy2eZ4sPYBmb+tLGozWVvxWBNCMimD\nMHGI\r\n=GPNX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"428458eaf5948bdd48c385ba6b33e9172978660b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.74","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.54-renovate-non-major-428458eaf5948bdd48c385ba6b33e9172978660b_1618477244986_0.17523695584468202","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.54":{"name":"@balena/jellyfish-client-sdk","version":"3.2.54","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.54","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"11437489215a7f361453ce49a8f161b98526d200","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.54.tgz","fileCount":39,"integrity":"sha512-vPiCzclQUdnFRzUt9EeDd0I/c8ohyjpczR9PHFpNkVQTRPqTZA0P6tkPct93RP7Fap3Ohr2Z6KPrgswMe9+bZw==","signatures":[{"sig":"MEUCIQDmk8abA0YLxvtdW7SnsQEIyDG/C6L3VXe2pEsxEe8AVwIgR7aQxCzG/2YTuaMjvxxoEe7cQu0q59jmNsYWvs3JT8E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeAF4CRA9TVsSAnZWagAAjm0P/jQztIHgROf5Tgv2B4W1\nmFi6GqBfAlsarEZluVg3D5U8JqnLh+0H+rXwlMZgJWbT+YahO5XrCM0EOpuN\nqw+EPDjZLuknVA+WP0yTAzHgV8hlpEl3XmcEtn5799idsl5LaQ97X3V8PE7G\n051YhSk/TiyKO+bqTSo18xlAIgpDfr7d5ErCH2sxk03hODaGFGU2UAmuwGsk\nyFCNlvsZ3uaYH0Xl3S957dnvJR+N0Shx59oCzhkXUwBiPa1TBWTi4563j2gL\nh5hFh1ApFQaBjM+PJ2eV4nYI9Rur+qi6lbq8i6jFnzxv2ek+Ccf1YFAmaQdg\n2soRMHqiPTxP6C6LU2mjCCUZJTS2XHj6T8prUBKS5PJ5qQsUQWdLwx+FBGVZ\nneU0GJCrmEJXNnOVNCAq8U6dAR59hg1BYnQl0e1gWx7KIHh8mAqHWyzBcgBl\nlZO2pB2fCoXmMBQHIn0dyrsaDDMzicjYkdphtBbbBJ2V362do2L7djl8KtOa\nwFBjT8sfl8JgP+HTjdNVcqjcIuKBd1zPMa9BWm/qiMFjEb3pDQu3gtZ1hCnC\n8Une8MeAbO5GqYOppdgDMqBhgClBM55ChJe4TBClLyFSaQwjo6zTJvizZnv4\nvIhFlclc/qL6sY7vaBgFJxLvuDaYlrqjedvdL+FDkddU3u7MHKr269w/a/7M\nPAMD\r\n=D7Jq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"21d9eff75954837a9e3f47359af3ce155857be52","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.74","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.54_1618477431832_0.9753625086553754","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.55-renovate-major-socket-io-packages-5a1c16860d53df469a7f678cd3d83bd22a7689bf":{"name":"@balena/jellyfish-client-sdk","version":"3.2.55-renovate-major-socket-io-packages-5a1c16860d53df469a7f678cd3d83bd22a7689bf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.55-renovate-major-socket-io-packages-5a1c16860d53df469a7f678cd3d83bd22a7689bf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"269e4cbabf8d20031507ea42f2ec992afdf032b1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.55-renovate-major-socket-io-packages-5a1c16860d53df469a7f678cd3d83bd22a7689bf.tgz","fileCount":39,"integrity":"sha512-XfN6XKSS5hi/xw7cGbVbUnAwWEIRrLCaIUCgAtN2VfSTDVXqPu5hSuYpg6OZagHfQlZQoWPZ6T0bAcx8X0kfsg==","signatures":[{"sig":"MEYCIQDqHYFbHLg4Zzt6TcOnQGF3SEpwKaJlo3bliUXzBRbvZgIhAJWP3DkgyejWC/9VxRiWvYo8HEw50gXfvhpauad/76HB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234697,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeAJmCRA9TVsSAnZWagAAILgP/i+EyajDVUyolK5ogcj3\n1jaLAHJlwG+ATCax76ltQ0TnyxkmGX3Y2o/odBv25g3sJy+DyJWSJYCtPE1d\nxwmkukaTlXUl0eQFMpZw5eeNnuIFoYEqxsVsPB7qvi3XXjPYcdoHHpUubrEn\n6lVUgEa9pg0xaVbllzT/w/OMhNsyaKNFWlsT2LDO9CVJmnPtSErHRgFp0y1J\njgmQibQ4a5cAbCxEY8ycDsyWfHokqhT6BBTLoQB1b5KHlC6fIIrJAc4Z9K7/\nTT/ziXbeZbFKDqbWdJyWhu7DqsMYM9TqoLm4vx4f8RRx+P72i7qY5oP48Gsp\n3wqxWXe8vokUfj1yO+4E5wgo334qVEbfQQeP3IfjWrd5DlcFsmJTuZMNikU+\nx7zrjworZVuyqb70gLmkYjNz7STwo12boGVWcotPY76IG3t2YsoBcXhvoiu6\n2haypBpoRCvVf2w1ykQOC6DTIW3Rvwq2BqevATY4xcwoeZLD0EdllguuE5Pc\nUUpYk6NO+i3YA2ziZO90YdORHWhg9eq3ogybNi71eqYBofbDk3Vus7YZizrg\nCb8qmPvqdpmXNpEEAAl4Rhso9sZtIXk8Azn/r7Em1FJZu/9N4LCjh33vzimx\nL3boL+H2yKJlqzXWT+zwBwWfh0M5oP3yZMPP7K9I/+dHDOgxXOBV7Zw7pucA\njMja\r\n=DShV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5a1c16860d53df469a7f678cd3d83bd22a7689bf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.4.74","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.55-renovate-major-socket-io-packages-5a1c16860d53df469a7f678cd3d83bd22a7689bf_1618477670313_0.2951775933522063","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.55-renovate-non-major-f24adbbbced65cf49121f8cd63094767a30c367c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.55-renovate-non-major-f24adbbbced65cf49121f8cd63094767a30c367c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.55-renovate-non-major-f24adbbbced65cf49121f8cd63094767a30c367c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c7545445d2328b0ba1d70f094faf55b25f8e0079","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.55-renovate-non-major-f24adbbbced65cf49121f8cd63094767a30c367c.tgz","fileCount":39,"integrity":"sha512-rvRTXCq+FwEj0oKJlm5DIAtex15XT97yICQJ/JzAFKYbPJWc0EleZtnBysMklBzii4/m8M2HY9sDr0xREENtag==","signatures":[{"sig":"MEYCIQCX7DknqDZ5+m/LseznoVI8KiNvWavcsIV+Zb4WM0aWwwIhAMzoRBQ5dhr9Tl/rHoeEe6+rHvrtbWq4TZtQOG5FPev8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeBRzCRA9TVsSAnZWagAADCgP/RTdDq9GLBQOrgFXzBg6\nljjhw2RRA34rMyf+3oQ5wxDh+TUwGNlIa1jitq6tsC3HRsKLee16/bg6wqmH\nzQzspGkQgz2Q2Gtyrdz1SSohiwLI9t4sEtBqz4Ha+/Ph5PlaqFP/bvkNAqrU\nJLNOzAa+pe0kdmOqmozdIa8O2actWnTbrqZkmaZUJ8vJLvCQ41982hcAoUIS\nYloQPsZYKiodcI6FY2NZIbNyHWsZOjV15zwmeUx2R+PfzOYX+9kb+uQitGX9\nGku6hJg8UsBOlniaCTY4PG/Y9dGiSodQbiQf3NsZi2QNHKdcuRP1NYOmq4u/\nAddyA0eZzbez62uMInO2+y4nXDtw4WcRp7gIK+ZmxJ3hmyySB3ls5nOm9OnI\nz+bzo+2txVx3/139yOHEbg/UGDI1iNFQ1zV3xM2zPZOm8Ar7WpKQo+ungIrS\nw1oS6Km+Pu3kEZES68j4pjEUHdKUru0ABv7fUi/LFLvGOrIIqeMTh3GCvDVA\nQWqT95ftQytYVh+NMRco6kzthIlymyz/fr6x7b+Q3d3bB/WxoN9Zaq3+rKgG\nx1LWHR3stihNdbM3PUYhEuq+fPevzRDCAsrCUVyz4NgZbdxaJpsqk0q0PY67\ncKAvqrsB+6DPgFC5+Ghpt4lNbXrZlyNz7HNOXHZFmWwKs0mGrzC06G8NIoDY\nNw5z\r\n=SqIs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f24adbbbced65cf49121f8cd63094767a30c367c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.55-renovate-non-major-f24adbbbced65cf49121f8cd63094767a30c367c_1618482291395_0.4657849440414561","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.55":{"name":"@balena/jellyfish-client-sdk","version":"3.2.55","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.55","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9a6178f5efefaaaa933f150b00b02e77158687a9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.55.tgz","fileCount":39,"integrity":"sha512-nk1hZyvgEpZQABU7GVw+KJPKMsM4u6iE+T8UJdj8X7di6DiKWhY0oR5gLOWAcdju8rARl/dM+LpM018bxaZR0Q==","signatures":[{"sig":"MEQCICSOrq4PkybvJYiGoXt2dH8Jof3HUl7yeVn4BF1tKUfhAiAzr7cJkQpLaDXC8KZEvdMjbl1SXCavgHM6GvUQH/i5/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeBhpCRA9TVsSAnZWagAAqXgP/RB4DAANuNqrHayMTKz7\nnBagkAE8L3ydmTec31P21xVs9I1d9veSX2PuusYf1/AmYTk9i5H6E9sDiI7T\nEFGrurGWuzF3wyGAm4I51YYmq2Dh+uFYWYnPWEEDtykDjiEfN+Z/J4MI/nQL\nI/GtabHP0mDn7AiAoDE6JGTZ494Aq28eONfxzmbQCM+gDyexFOzaGim714XA\nHf4xeXfpYIe/rauafZKoEV6hiBndfWzmOhZ8Nbbupg7smAGnajr5NkG37qzj\nj7KYt4h+nasx55l4cE94/YOVoCdMWmgfBLuRM8P4+brpWMWfDf82ea5vmbrO\no/U3MykcZPoyxweKsbQfzKPe6FwlYFGD89ngtIia72HRzaQBUfnLUqusMNa9\n0t4SBzb0QxOiOxM2c/OCkCP8V3JKsqn8USEZHWb94sRj+hg4zceoCssMMAz7\nerrK2z77SEfCt8bZnJDm1rPt1L6BGhghpSgNTsAu3GZ5Oqw2SuXILvfH/t7H\nMyt9o1+VX9RP605/oxfn2GgyKQ6uBLhMY/uO5RzLdsRh0MDua5DkxzPJ2dxn\nZb6LhHyOBC5/XViRTWNGcUnWxMu1siHVg8nH8crR/yR1nWxjPr7dLP2BXR/n\nMxB0mhZV52zyuqCJBSGDdYELkR6H+vdHQF3k0SI5qcu47g9JovwJtH5OCpWa\nmW4d\r\n=/L4t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"43e15d0f7b565349710bab7ccff63366e70e3f4f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.55_1618483305404_0.41674242922343185","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.55-renovate-major-socket-io-packages-58962317d73a5e7d99b04e134c98e164ebe85a56":{"name":"@balena/jellyfish-client-sdk","version":"3.2.55-renovate-major-socket-io-packages-58962317d73a5e7d99b04e134c98e164ebe85a56","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.55-renovate-major-socket-io-packages-58962317d73a5e7d99b04e134c98e164ebe85a56","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b8fdba9dfeeba36b4df8b76782341325dc0a17f6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.55-renovate-major-socket-io-packages-58962317d73a5e7d99b04e134c98e164ebe85a56.tgz","fileCount":39,"integrity":"sha512-XE3LUE/MckJ5vBYK7szDptRCquctH0S9KYOb0SZ9rOSkLp7J8eZJFoWSN5zk9pwhEgigcM1KfxlD/lRrBG9o2A==","signatures":[{"sig":"MEYCIQDaz1NSQt4XNP0gh9v5dOz5OMWvGnvCxVlYGYSTaMLC5AIhAKEaGEunXxpNeQO1pPFq1E0ypxE/rFpA/POszPt7i8ax","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeBh+CRA9TVsSAnZWagAAJ/oP/0W3QT2qal3CePcOGMsc\nkgmuxPCy26qjQq0Eo81VSFATIqKO5H6spoKc9GDwt0kAdRcxn/GVdjxyGSOS\nXZwG/5VEAzrNBSnxdqm+nKOxet1OBMl3kYyJZNCCyOzXK6WNTS//hI39v4dU\nwUCaM40lWgy+64hOIcgzpDfHTGIcBBrIlZH4hEBn/te1lLWxCBqMCuUIMwka\nP9ZtxPkk130RPiFfnaW4TRHdcmR5pclqJg0FAntgZ2s1mVnfjWpZMv9ZMGHz\nGk0MqZ4J16KsZCxJ7FWZyhFcvJp3mi6c2AnGAI6ow2s0m+gJ+48nV3vuDr1f\nySuie4EuVG5lFCSLE1OSdzA2IgMwYFFQPCp5z1D7Riu5O2HO9R9FQHh7BOYD\ncjl/ZU+i8PED5pJjpZRx9CXxRhl8mPCQFzGYyC5emv1nUVZxKGAO7yophb1f\nmAj3oFiz/AdunjMpUSNQXidgTI4Vh2IhPuj/zLga46CyDMwNVotzI4nF0/Nl\nhXaF17YhYYKH6939kZna/BqJ+3chFJOpWaMO/WkiOq5Uw6bxhaEj9F/HymA7\nBRNyWtCIs/tfNjNT84ri3vxhHBwaRk+9ZfJbx0xcfR6HyyJn9kZ6uVmIFKGS\n/Zeu0iOYUB/pki7l0ghiof71EZN65zbo1KM2utMOGQn7TXh15I+Dk8VnzLvW\n6iMb\r\n=+WUA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"58962317d73a5e7d99b04e134c98e164ebe85a56","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.55-renovate-major-socket-io-packages-58962317d73a5e7d99b04e134c98e164ebe85a56_1618483325678_0.4443441083735393","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.56-renovate-non-major-b42733d3897dbf2f6004d4c33bd73ca61ee4fdf4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.56-renovate-non-major-b42733d3897dbf2f6004d4c33bd73ca61ee4fdf4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.56-renovate-non-major-b42733d3897dbf2f6004d4c33bd73ca61ee4fdf4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2018a21598a09baef1a462350caae8643b9117ac","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.56-renovate-non-major-b42733d3897dbf2f6004d4c33bd73ca61ee4fdf4.tgz","fileCount":39,"integrity":"sha512-e8wDDfAHBogEVuSzfHRreQSSM6fJsVmaYBPCyARZJmphOVTWXdgfHDuZNx1R9PPlnDACfFF79KD5UrgNTeM6kg==","signatures":[{"sig":"MEYCIQCBs0BbTGDO/Zm+MOU10Zppp35L6z0ou6qCCS2jnBtJBgIhAPbi6f0yV6+w+T9cJJNcGFz7LIPG1L7zAl33aFG/xhYe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeBmPCRA9TVsSAnZWagAABAMP/3WsrqX3PRFzPz5JoRId\nuf5Qmz7aWPDiWzjPXAD1G2IgBH5nDcxQMB/r9vuFNMDpKEuNL7qzVbQky/aP\nfjhGxqBQSN+ayUqH6cO0eFEqpIKIdmf8cZqXobpdmABgs34e3IJUrnhkUfak\nI0uE6dr/gABTbQSWJELNlfmosYPxHzNgqGoDfn1fbsfwqvvCRoCKTzPT+S0t\nq733Jcs1MHeumD+J/4nN0czfijvsoWBNf7mhf2gJnpUzozGnxBNUc6c3gWUy\ngQQ9/d057u6YHO+sFEsJFK4VLNMpllbraWh8L2Gy55JWEP2c/VMNQqubrXtw\nhgKCPY4TtMPzqygsGCEuWtLmNDzONYzSvq68sTF4bf4KzUZjoG17jWGSox+n\nI/rMlbmqRu7hruiEa2EABWGsibGMne1KVUXCaLWa4QQvhony+GY8hAOleug4\n69Nz3hDtkItjV479i6m4GTzhNShE41xgtRmnenV+dkjyrmVQ6EQpXy6DYnpX\nLIxNzzaTapmAK2Py70y74cg1jazg2+UFOxi4SR4zfcEh6aoOTrHB3sWB4SVG\nFwVOZqSt1IMBbLHJYR5rY9pEbf76xfy9UCT8In1+HqN+Ggj3FH0kRsG+N0A6\naIrRF6AZ2tMKiW0ULr2uytd+Tj8R9alZHUQRKGquRaMfS2tBevEK7pW3L2/I\n9H4B\r\n=SHyQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b42733d3897dbf2f6004d4c33bd73ca61ee4fdf4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.1","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.56-renovate-non-major-b42733d3897dbf2f6004d4c33bd73ca61ee4fdf4_1618483598732_0.13562412302544447","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.56":{"name":"@balena/jellyfish-client-sdk","version":"3.2.56","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.56","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cf4cebafba1cc954e6b89b7eb3cf959782cf5f90","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.56.tgz","fileCount":39,"integrity":"sha512-do5tKY79gtSaaf3wWGMDFtEaiUr72tSX3JYqjvQurYLpip3+RoQVV5yZavN+uAqIwDjvBAee2fkS8Lpp2W/S0w==","signatures":[{"sig":"MEUCIGKMPVktztxTTz/lbLgBO5EDmxjG54Vsm47pwNP1v6jPAiEA1aRfacDCp1dj5Q7rGBhYeQM9AjnTJiKjDt41Nq/t0jI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeBqACRA9TVsSAnZWagAAl1oP/jN+wbnffHCteaiIKkkb\nL/P0WSiq7lZVamPfr0L/B6Y6+aTUYfKKJyEyirD6uSvUIYnCgW6YM/YsSpaC\n/3H5++5NQmbpIwM9RmRSAu2lkoTyJVP5ZBVw2oJ9qqtuws976rPdYOMYuoR8\nWHPMSXfTPQ9Z2TT2IcKcplyc4mbmKJZCNjfBKD0SXawoRL4yTp2GEdb8WHup\nMlyEsRWIr6kGXeLualwvxP5wk2oIoRBOmlBV2QYlBVH3YCMLIu4b9fFSmctC\nu56pzUiLUbXUhsGtf77qWrHT7BNlpovk6V1uFbpF2OIACQEAwQA/ve72NuAR\nu2ADbnA/ZU21EbU79RTI+zn9VxXivpJBIGEr6JUKMT1vygU7FNcU1BORJK2d\nBV5ImE8ClAhMh4EYIzK5iVdaIAbD2QyQjvVoVrVHnSPSM9/FLnV5AXDegnSN\nRZ2aEtKg3NAe0YaQsNHPEGCbhxfwEfP72IN1vVbthhVj0TTH645fL4coQps4\nAT7sEg/J+9GDWboXl4pMB6YW7llmYLHQzMDFTcJVI5j4lMPQu5PiJVuEMBz1\n40yp9ESVghw/CowEUaEFyl1XhcL2r9ZkkllFVs6dHZZ0SWyo8ngImfZEqGcL\nFhHBfkKSKKnUBWf2O6mhg/QDQGOMRkJvs6zIpOxWnF3x+MqpypcwW9azgvZP\nu5al\r\n=tgoW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6af630f345924745641b38e9e1bc508bef44ef3c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.1","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.56_1618483840182_0.590225092070914","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.57-renovate-major-socket-io-packages-3563d08c02b448f4c453f7d786cedd9805fb01a8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.57-renovate-major-socket-io-packages-3563d08c02b448f4c453f7d786cedd9805fb01a8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.57-renovate-major-socket-io-packages-3563d08c02b448f4c453f7d786cedd9805fb01a8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bce08ce8d9a0428ea1f70e2d93bcdbe8089ac167","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.57-renovate-major-socket-io-packages-3563d08c02b448f4c453f7d786cedd9805fb01a8.tgz","fileCount":39,"integrity":"sha512-Sogbg6qM3w9LWPx49i403xeClxuY6Gg+KyBUMasxYHWsThIKgVhQGE0GCgrFyxl/i2bHJ5cPG7up+lpoq9f/Mg==","signatures":[{"sig":"MEQCIFudbcSfODxfW7qKZq5ybrbOF6XvUUxyo2mC4dpASjS6AiBcl8F6oGPMrmbNfDYuQ/QTvPUm5V+LMF3fS04/HjFMoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeBvfCRA9TVsSAnZWagAA0T4P/1RMcl4s9ZYpJEgODCvL\nHzBBsk3DfWP3B9OOGiIFo2Eu8dwxYu2zese9bMxFX+SH2t7MaAus93AkaaQl\n7QCBpdPhsdhbms/tsOe2PYXdNMQ632KspVhN6yJUubKP0vch3xffU0oqVbAJ\neuqgaCUQDOIFHkq9tt0t/z3vEfE9NXZwxlN/xbbeg0I8Lxm5ZkNIwlB4+X1V\nZp3dq1TvIDtuCOkOCFSY85OnV9N7Ov3jdrPK2lUYdIiyrcRyc1Mi/erQEofq\nfSvV/+adPO2QvIUmgaM5V9Bo78cfvunp/uQAYO0BrsYiKSuugHyNuIdjvH16\nlEHQwB9J9Mgn8ugeFqLCnWSvbewzWk2Cy4ynpzU3/Y4lzvpgK26s2PnGjyuo\n7bjMqXRf/Nxj17US5pLhkn63uMW8AL3cad1AmnsOu5+660JBpEz19SZPVVDD\ndup6ZZSMtkerrLBbHgQWVVvrDZSRoS/envbLTIHAJBuJs1CbZzzeQbdRzNWh\nT0tdGKohh7DCEtqB43gUtgPc12zduxhdf4GwNuOKQtUH/hEpKw99Cy/gnd+2\nF+HDb7wkIPXFVzvVYr2f7XWIiRy9W5oV5azdR37r7Pjs+B8OL36+G+uDVf59\nrjC8bT4B6eImyMi0hwtUUSTkyncdj4S9WrmcEbfrDglGNBlrOj3UdojV72Ir\ni9xO\r\n=5EkZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3563d08c02b448f4c453f7d786cedd9805fb01a8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.1","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.57-renovate-major-socket-io-packages-3563d08c02b448f4c453f7d786cedd9805fb01a8_1618484191331_0.591911307300532","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.57-renovate-non-major-daf5dc0293edfb538a6ccb89b9d21d05b55f98e6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.57-renovate-non-major-daf5dc0293edfb538a6ccb89b9d21d05b55f98e6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.57-renovate-non-major-daf5dc0293edfb538a6ccb89b9d21d05b55f98e6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"23814218e31dffb287f12e85995133d8527eb01e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.57-renovate-non-major-daf5dc0293edfb538a6ccb89b9d21d05b55f98e6.tgz","fileCount":39,"integrity":"sha512-DX8FJTGcFwWSv0xw1VR7INA0Fg2K2S0l5Z2lvJw/faGJfAALfzqAVjV3OJRWG/xDsTR9ltRVOcf0jAsOpa1lyQ==","signatures":[{"sig":"MEQCIG8mpgxd5hJQ6eMl9iRnBRJvkP580fGe/0TuY1AWwijJAiA8YUjjAXXQ0BhG/Z+IEnxx0s7lXx9H1y7Kece88LrM7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeEuhCRA9TVsSAnZWagAASVkQAJbsgScxxukr4TULQrj3\nQOjw2ffEWlrNtJK7JuOVPvTBVvdmHw884B1MjRhbq0z2KJnUk/i6o50EjYNk\nW9e1X0cBy7peqPcXa6A6uLmHUr+5RuiQprZ7Qp2t/wMWCWUIW0VNGdPzhhIw\nqu3CEtVJwDYOgZ2Efv5aXtUtaoEmdrPr6ahBO54iOaWepaiYsl3FrGL1Ey9+\nGQwdLXioRHAgEYKem4w0KOQ8HGvBvmPxOjiXQ+jUybPttVGCYc5eigLFE4B6\nRmdyl1xCjgZSrjBWixDFcHta6X0eVbg/5AZsC8CdD781atHp3EK5AO01wDe4\ncI5WG4hltIEDbrpYcfAwVAVszoIC9SuKg8pkmCmwouHpR7SyP9Lus6qG34M3\ntEftUC45GYlIOOiJiQswjjnKfQvuKsFxlJYjbwDKO5FmpwbXN+iIt+cLdlq2\nA8lyRF8qxjBLfpmI/4LUrIJ6qFZc3utRH+jkXS6kh9ABc1pyRxmZNfmCzR6Y\n6uAcaunv6e6zJuUr/+xpAG6vV8Z/PI6cjDlu2VrmnqUVVI3f11YZeQPXDyoa\nk3WsK+QHVgIm7Xt2VPihnl105/cfSK5854SN3nMWBf27nRL4QeoTW6g7hgVz\nOqnvro867tKiVvwmohMbkc6JFCLsZ4I2zqC6cYwqW9FyRCl8bz9bg7LT4ke+\nIsCb\r\n=Gf1X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"daf5dc0293edfb538a6ccb89b9d21d05b55f98e6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.57-renovate-non-major-daf5dc0293edfb538a6ccb89b9d21d05b55f98e6_1618496417138_0.5660963788921349","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.57":{"name":"@balena/jellyfish-client-sdk","version":"3.2.57","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.57","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"589a0c0c3a4dc97ba83e162176ce1f2363612f18","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.57.tgz","fileCount":39,"integrity":"sha512-cziR3BPikwfwQOzEdte2ZI7+C2SNA/WCVRljvsmjm9k6dX5O6dGvwB+wkpZW+f6MSD1vmxixuIacRx7+YhONfQ==","signatures":[{"sig":"MEUCIGLVxXHyIo36XyrISj1CuN6+92FAw3hkz5HB5Yk6+lUNAiEAoTEpsKMXkx4vjD6xVMI2V22zirZR72EMVymfDA1ZjqM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeEyGCRA9TVsSAnZWagAAat8P/0RI+tj0pc1uFyggyCdq\nVs0iK90E4/EqInNfaUDb7pxvuuq1qWLXg2c9m6mSQC0/Rig9MG40uXAFAVTG\n/74W6+gMKdNN2qTdaBhW0TNpmWAyBcPyUANj5aujhCAPQT50jS+EdF7ojLx+\n/6SVyho7NnHy6ZMnTVJPh6K7oPhfJzmRu1NiVVvh24hdnEVxHNWxn93xeo+A\nh6mKoQgwoZ/xSR+LTpI/EhRpjYYNIpWj0MXzj64RqxKuAFBf20IlmWlKzFNz\nntarByEJ+LiXgkjORf+gMq/R8d4SfuNwfTshNJ0isGxdVyRxigv+64BLo/OT\na9DNaNiTF0Xx2aspMT4bd6X1Km98lC8mUYDTbB/YBo57CCxyV+POCqD/1TtM\nv6DwBR4nwK7rKAWgY+nCsu7yT4OfCl/NOELFimdBJ6Lwj7YAb5wbajQHyoUm\nuoTzv2Vp6hjzda+k+k+qO+fp4Mh54pMm/TuGBYSgmF36L2IcYzX0s2Ozh6iA\ns2UsaU/eYadrkJkk2dx7JhQsHVn4CUa49T6ortE9vljyS6vZqgXCIl59l3GC\ndVWXJLidy8c7rN6+o93VCNwlcWMNzu6F1pdHwbRjxNBDtBFtx0efZS6NGY9I\n92Hmul+NDUgvAmNPYRYFjWVbeoTh/kIP6hdliS2xyzB1S7pUqa/SApU5Qmzr\nXQ7v\r\n=uS6D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"772549fdeabb8ca82d828aab34eea0615a82b8b6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.57_1618496645533_0.0677417766366828","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.58-renovate-major-socket-io-packages-f6a1690622b62e7578cc3e9d08132524f5ac8c6e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.58-renovate-major-socket-io-packages-f6a1690622b62e7578cc3e9d08132524f5ac8c6e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.58-renovate-major-socket-io-packages-f6a1690622b62e7578cc3e9d08132524f5ac8c6e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"392aa65dead317613d54877cf8e7bb392f4012d7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.58-renovate-major-socket-io-packages-f6a1690622b62e7578cc3e9d08132524f5ac8c6e.tgz","fileCount":39,"integrity":"sha512-0rLNoVjnK4rWU8ejcZpitfpn7NOBImsmjtJxsG/M/Chu+8lKBR/HC+vU6AAMQCjAjmI6/paKWjnFcCgKSQZKkw==","signatures":[{"sig":"MEUCIQCWbXF3RXxwS9SZqqTCO6lTu6PER+wn/KebZBo3l+tkeAIgRKsZ4SdDT2YDTx80Vos0yN2jEdpWde2SbyiQHuYKVJg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeE1UCRA9TVsSAnZWagAA/iEP/0lETAeA6uv8RAh/+fAT\nWS1zl6pEPpi+pcxQYCoZElPg5Ww9UWntvP/Nn6PhanDCITZEMk4krFwD5YAe\ng0PiuicKOOuYENPl6mOz0yv5fPXjj/KbHVoIfuHhw72TO+27vTFVpbSGECZe\nie6XM6Bp9BybfZmDzh3/eE47Kxj7UIlF0rFFD9HZZGSZcJ+iDkNwrY1uwB8/\nShWCse5p4SGp7IpRbjWG4jlzyxFNdEqDCtvsY8gytdiYVX3XEAWby8sReoxe\nmRTz2ziTp+AXwN4kyI+4lestZoO+qBXHYitR4Yc3HSP5JJO25diaQqboeezk\ns+ALvW36XUBprTPsBIKsRUuQ/4iw+9t2KDtQ9HRVDC8eorU3c9drjCXs6tAQ\n83HiSNpREnUTOMn1FK59quidazDvSX37vv7TEE4JmNHFo/RpUgH+ezEb1OzF\nU/o3EkrErW8SWDmPK/JldP5K9qD0BuFJPh/i80h7BDunYxKAobedEmViHkig\nBIMBsn9EBhjfqHOh0qpcPvgEr35DUYSeANV2R3N1CQlzc0de10ii3fGHxLka\nhWuo6PjvOGCU7P9HiW3oA0bXA49tq5I6QE2/zgEF3LxbgF0T3jJmFPUPPvOj\nO6+TEjXuaHDfsCRvs1csw5HmowCLuZ1Hu3WPI+UQDYTfsXE3xc8Y5iUCbxcl\nLWXv\r\n=ULWr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f6a1690622b62e7578cc3e9d08132524f5ac8c6e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.4","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.58-renovate-major-socket-io-packages-f6a1690622b62e7578cc3e9d08132524f5ac8c6e_1618496852339_0.906330191263305","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.58-renovate-non-major-bd7d22ce60f1c508cf801616f1bcbecfd28811c4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.58-renovate-non-major-bd7d22ce60f1c508cf801616f1bcbecfd28811c4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.58-renovate-non-major-bd7d22ce60f1c508cf801616f1bcbecfd28811c4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8c963fa6e8eaf552fcde1d40b454f67c8a6de217","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.58-renovate-non-major-bd7d22ce60f1c508cf801616f1bcbecfd28811c4.tgz","fileCount":39,"integrity":"sha512-JL0xUcD/wHNY7wnpRVYpOqxQPis+TAdaU096jDdDkkaFOdgoW2C3++MpdbbfQwbIoYKCufmAS/fNgRdziW/9+g==","signatures":[{"sig":"MEQCIC4viYoURt8jOAjGTzOgPWWptJZTZr1LjbvJj8+cHRgWAiB6Cj4Ifiw2qJp82N8MvM1LDT8lor8xMZzFuEXB7di5ZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeHlxCRA9TVsSAnZWagAAD74QAIDnHKD2xjloDVBKRkzq\nIXRr2GjN7AsuI6qXGeLK75y8VF+9GMspeA/XQwyYplTSEfyj3/GkmK8GAR3+\naYPXlSdBVuZBTasstay6A+tTTarxXRuYzLF1L1vgx3MIe7Zh3wS/iYFoQa1x\nL8B8+7ZpiQtTjsX/ZamNJAVnByLSx+mOnfwUhwKcOWu0B846t301HMEp0R9y\njlk/NAh3qg6x5eMiEJN98sG65FeSWFJlI8YgZ/WP4qEnkfe9FDVD3xR9qdC8\npwma8uA+gL690f793t19ykOABlql1dB8pAe5kfRupOe3BK24Lz35UTUy1YKj\nNNpjDALt7uD6+mSiEENT44If7BOewqJF0F6MlR/p7yOL5nAdK4CgrbZbhRU8\nO7m9ItPJR41Vup8D0mtSFw4xu3rldiKPPvBFT7K0pWPmEj/30RuqPXNaRqVG\nNSbl1CqEQPHQTQhUUUtJdVJPKDT5mAVV7UKtZAIXpdr0eNHX3fjWMiFi/hsD\ng8aHxVXJZlfhLZpcxTbS/DVA5YyUfScfVKTQInEJhyq8FROqzxhqJhDwpyRA\njcLw9/diC9a64IjEAT5NweTGnn9pVyr9LWj9nvczg/1e3/OF9UzyFXt7bsxZ\nC/FBBGUQ5EfcnclUUQJZP/0yd9P9F8lAOTB4FcbDllBVh87fgM1M5d9BzQ61\n8zfJ\r\n=cZsJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bd7d22ce60f1c508cf801616f1bcbecfd28811c4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.58-renovate-non-major-bd7d22ce60f1c508cf801616f1bcbecfd28811c4_1618508145137_0.9215085044281772","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.58":{"name":"@balena/jellyfish-client-sdk","version":"3.2.58","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.58","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0f1173a0ec50084161610038f5bad742280f4ff5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.58.tgz","fileCount":39,"integrity":"sha512-Ikc2ba+A0WiaHWoe6secrMrYO7HwyuntxrdrisuBLFEqnbDNGiUKi5qA5OqAe6zVA0TpwSmipRPFVYBDy9RXjA==","signatures":[{"sig":"MEUCIContFvHf/ugWL9hwRtM/Yr2gEZ9X69JMldPhDPQWKrsAiEAkk3Xu0Q8qtBRsYETc0HqNmzGs6heDabM8fEXhGcuNkc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":234900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeHpRCRA9TVsSAnZWagAAYHoP/A4vhiKMI75VPLiAkF6W\nhH8+B6pVdKy+l7RwySaG5zRe6nKlV45onGI/0wUud2EW1g0Sm1qhUwsaaC5C\n6Ly7jyugY2STlj76GU1AlpQzNIsqeTgq0sSBXZkjNOqFiml63dGhRMqcRDtG\n55hsX4hyuOGpONdNsoMnYuW0REOQ1R9hHp4TNmQ/UZsjn2kXwa1R8P2XVenw\nL9e8wcyI2fe+Dfuor6sQAsww4j3CnvcEru6HO5HXA08s+/7P/iTYuwXltk4z\nBeVfsmE+xKytYnfrD5yuaXPn3zgxgoH/L5SRfbm2KQ8bl+cbtyhh5Xpi+PzK\n67AEBRkHKFdY0ka9NpJKUzHgXpvj3o0vymUDvxXLiCw0tyr9ExU8aPz0LMYp\nFA8w1YMQgESuHKhsSWhNEojGXFl0qSjZL6gyJTK6zNGyFPqiJ+7QDHuaJwBx\nJomLVWzfBfIi1PPXHNVWI858YllenpiFcPjhB235UusQnw8dpjq8bKNqEsHU\n2nBiARmH38mlDM2L3d2Ecz5ICiBqdMT+C14SoWg1bPa9oG9TX1AUAN8wbqHH\nwtuTQ9zJYQmjzWjTM/q5fP/CZNOpuNQWJtnXUzMRbP1iwUdqgdxXg11nbilb\n2LNYMs/8hf4Ciy140t1DRg4wwqwDm2xA2KOj21ktfTermZjUGGGeLPEiTQT7\nIJJW\r\n=A08H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ecec929523295ecfe6d399550acfc8ae342beb05","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.58_1618508369044_0.09838652064577524","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.59-renovate-major-socket-io-packages-cf5b5558690633f7e5fc00bb0fa259ef1c692694":{"name":"@balena/jellyfish-client-sdk","version":"3.2.59-renovate-major-socket-io-packages-cf5b5558690633f7e5fc00bb0fa259ef1c692694","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.59-renovate-major-socket-io-packages-cf5b5558690633f7e5fc00bb0fa259ef1c692694","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7368310cbe81091a96a8cf6ed2761fe951925175","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.59-renovate-major-socket-io-packages-cf5b5558690633f7e5fc00bb0fa259ef1c692694.tgz","fileCount":39,"integrity":"sha512-Sx6h3J2kAem+eXztXlGvRFcBzFeSbWjrlJnY76DivNJHchYZcQ3jTzlOGmOmzWIMprFsmfXOV/GISfxZZKWQjg==","signatures":[{"sig":"MEQCIQDTvq3K6X39zYE7yWinPI+ZJCUgThIp0p9OTB6fawpk1wIfP5r/1pOQ1DuJVMQhd2ACmTTqN/DM02kCHls+FsQDYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeHs0CRA9TVsSAnZWagAAJwAP/2WJmnKkVFIm5WtWVbWn\nDPN+CBpKu47TNlbpodWvfXqJrqJ3Odcq9ROOIK5q/uwcHTk0pG8VZf9sVpGN\nIyIlQAXzSpD+SJY/VeeIoxRrhfcBe1MfADxSbLT/9ztgKqdIBVvDWfee0opz\nsYVEujBux3bYwySqAEXpEX4uBZ8oDyHwNcfcxaW8TQ9fuWeIHwTqgXsCpO2c\nzgrcMjHS7JklyOxhiDfwKOhhh8mO8QDIBu9rSZLpWHUZmrs1czBjxEjEe4/g\nHJGlfpbwObgvBjeAt1iu7b7KXIi/POadm6JuiQa31g+FJJSTIc9rwHHohjok\nfpf64QXtUbHES7C9RS5ecMqeDCa1TpcYzAhaTo/opKmX75woqql2zafyCHmX\nbNxRUm4hgnQYodNzrZaoO61AkKVs/HI8OJY7ttBykn+6RzixWUVfRtpwlpOq\nu279M3LUd6eMNOAQpAKZgMlwocKJF+bWsKmWxSQabtoLmr7JslVKgdQOYBKT\no8EBLoNV0V5UtaEo8LON5hxntRxVFNlBtftdLYCOhLCgidHLZ6N8B02XcbSb\nksqh3EbmUumjz5Zzhhy4SqiPkeL6yRHVDcZ56m3saPCbJCLSZ62CNR2r4eTc\n8dF3QE4VwjIWCaLdW0+jghNH53GAGlcVf5g/s4+MYm+1RoOjpElDF1BKvDSF\nlLoO\r\n=kQex\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cf5b5558690633f7e5fc00bb0fa259ef1c692694","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.59-renovate-major-socket-io-packages-cf5b5558690633f7e5fc00bb0fa259ef1c692694_1618508596151_0.08902867011687254","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.59-renovate-non-major-c36825430182e01f274ae033e519a54bd5fa1a4b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.59-renovate-non-major-c36825430182e01f274ae033e519a54bd5fa1a4b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.59-renovate-non-major-c36825430182e01f274ae033e519a54bd5fa1a4b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e1ad3e938c9ce1ea64476b799a391da1c7ab8f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.59-renovate-non-major-c36825430182e01f274ae033e519a54bd5fa1a4b.tgz","fileCount":39,"integrity":"sha512-0pfMyPW6v1lYzSO/nTpmgzI3IpbFvHPxjpRScRP2mTNq/U2WakhmlCst04Vxbvfds4tIMO2KTaY2Lf81WcTXuA==","signatures":[{"sig":"MEYCIQCeRx0qBxQuFvyjTOSum3HxLK5JiprhrZhWMwQ9nQJhmAIhAK8d5hd2/6sqMeqCnXDNT/9d0G23qMCgtu/YKO9RomZx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235061,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeJRDCRA9TVsSAnZWagAAQU8P/00w6HAIP4yAnn3Vgh62\nComuQMtTzYxyd/i+ru9WXZRwPtEbvDJii5C7SWu16klEZIMsAu2H2g6005XX\nKaBNjAddoLriKYdUWgCrAGd0GSKVWE0gQI5L4pdhTIh7GxR1gNcHNbxHxJ5v\nuyTI1GhC03pbx4Y1fJ83nbmjm/jF2sNILdJYJ7+/lazQxxMBoCmI+nN9tc6m\nJ6ZLdSc191CVEYah9RpU2MBewMzOf4BOc4fZHDiQgtoxqsfS+X0Yb4t812wH\nqZVruCiKHkn5C0wUl3wC2jtmUUwhUfJppjdXi/oGNBSvreQDdwORMCUAW1/u\npafNuumVhZcKHUenfhW66SBvDC1/P11bx9v4o53JcNu68DFW1LCMp4F+89Hj\nbag5QfuyKFVjN9Sl4sdFtIOjMyDLCPIvMACDJxwv4KIp67o/WuEO2y6vMy5R\nahICyAS9S6Gw6dhmmGDn3Q47g0k8S660drmqV6L0+MSJ8BbBjUw04QnejKea\nRqZLdT7He3pTiyTGPwVxiSuOEsuqAX3ymTIoPzC8JHqrskuiALIxX4epspRL\nuxKaOw5ftmQ6hnD/1UH2aLwmJNQFBMmBHGLMS5wRR8E+AyCPgbU3EJAv0EPs\nl5VneKJa413NlZ2/+E04+rpntS3u0kDuzs485wxhLrZPA/f7ufYx5PLpiUWw\nqAX8\r\n=lmkA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c36825430182e01f274ae033e519a54bd5fa1a4b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.59-renovate-non-major-c36825430182e01f274ae033e519a54bd5fa1a4b_1618515011378_0.34444854784339496","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.59":{"name":"@balena/jellyfish-client-sdk","version":"3.2.59","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.59","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6d688893f7de64c18ef8fb5ebf838c68b3ebfa33","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.59.tgz","fileCount":39,"integrity":"sha512-rcHUAqQLAVOnYtpuGCd2ajNXazPQzhlp47/Bzl+bPgLdeqbyrZT+I/32LecyYhQ2M9CBakqxTRVHMde8I+XDUg==","signatures":[{"sig":"MEQCIHfvxPJUwrS0pUw7FXam83jtg3EoRwZd6jRSwqTGsq9jAiAKOsKwcH0+vgiPKQNnsanpTEZULJidTWAd4XTjbkS+ug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeJUGCRA9TVsSAnZWagAAz30QAJBefgkD5cWh8fgHv4m1\ny4GzNhe1x2J1em+DQuEM1QIIRUQtxsBIkI3LLopIrPsTNQFJFm0N/ayFE0sG\nbbuWSDa0m/+YDKpCpIgi+GIG8FMXtP05KEyisxd+mY8IXlRDw47120HQ/QbF\nd+BKXMIYj2jyRBPldJumJjzjRKMJpDfbPqIPchFweowPEzw8+9E0nwsiORI2\nQZcaOtPkY18rc4dck/jLSgMTudtmXWb/XcddNmNygPVq3aJr2IenfT/Txpix\n9zFoDd1fmtLLLlhbCnKcxwjY2I2MPubU0Qz8r3ZTRLfieKfkLgb5awSB644X\nhhR7IZRpMfgjqE1wNq9S1GB0M2JrvXmaoUg9yCRWTM0CnCMkXToIldnuFkCn\nPcS1/8oArpCoJhoboA7kO+jN92+VfAVoxfPOD0+9ty4SgECtd6XauKe4gqBP\nLAJCZ9+q5IsQ33FHTpRQibwTf01gR1+G/imhcDaoSfy5qXPTxksw63sSQajU\n3j/GQv0PWAWXqcKGWd2e/pE+F+4AZRGSyCnwAl0jbCI6h8gNuaHMAN4okhhI\nlbyAwZFzvgc+67U1zzyXrPPRd7D+o3jvIatoxV1iYIm5GAYgV/DRKNX9S41y\nqwRGXdYjX/XP7yXoSVQ4Jsqb/xfy9vOZoAEpdYDxIms2Gpnrii7d+J5jdebe\n7wWU\r\n=b+4z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"002fdfa369738da4031f3457863f5c7fb2908c0e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.59_1618515205745_0.9913746444157023","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.60-renovate-major-socket-io-packages-21e03c608316001acbc69c615539cd34772e01e0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.60-renovate-major-socket-io-packages-21e03c608316001acbc69c615539cd34772e01e0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.60-renovate-major-socket-io-packages-21e03c608316001acbc69c615539cd34772e01e0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"213c494e38e0da700ce9debcc98745d01603ae75","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.60-renovate-major-socket-io-packages-21e03c608316001acbc69c615539cd34772e01e0.tgz","fileCount":39,"integrity":"sha512-KLzznJt14nn2TRu0SwDL+nYZz8hgqbyHtfon5iSCP57G6qc0GNJGC6T/8uyyMRzPlcSOdu38LhVRk8ThTo1V8g==","signatures":[{"sig":"MEYCIQDUP4V0/MySntuynjNezrXhV8ZBoNxFJSON0j0bbjJVdwIhAMUqcf/aqe1lMtxJg7wBMrrd0O441ZFWl+HGFff3MRKY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeJYXCRA9TVsSAnZWagAAB/sP/3oub2uVlbGOrYNtpWMR\nK4YgILg/yGMM5wk5uMJKU7HgKPTwKSRjkxI66XF1lyTgc6F0ovMdM8XfJ100\nQ4yC7cuHmhH+1E3bvQE3WpQCnfffxB4bX5X10Nz2D/88/QvLf2HwU4CqLIlo\nKGOz7j3HuaiVv/Y41/jXcuEydAocVCM5PaZ09Oj10bEPlatI8mx2tW1aFAmg\nGtqTS8b/N7yRThBmL4GZEQ1TsPIFqBy31wM97LhQUli4QYRYHL3vuI5e2s+x\nvkWfnt3ZcCoOc+uyz7RBfK4iPsdHKKUBo6DRMs8nk6BVD+Ndcle0wIjtetWl\n7kFvvdr2FoyA4yPzFyQ83FnKe5uJJKhAEKhVKWhxF/YqnU0kHyGx6jLDgvBi\nEfJuTbkPN+2GJ1erO0N9FvvOyGYnYVtneQF/1PCPd065YXueKLakuksmdcTD\nZBe1nWZQR2DaoRGdI9chghBplKD2A39dckIfG1fsbQNv4Myv4B3uTELug661\nkxsTdx8UFJ5SZgSdSwOkEEhmxED6vGRTItR5kEw01FI24GHFUedDImy63RL5\nQ2x6qR0vX+1Lx0MBb18mru51GkWd8sE5i/IJXW/GTZ0jylYDiPKPF3tEuTCQ\np0AzKiNjjUwMYLNmVR7Fbb3qd2fosii1ZVW6sO0PifjDAOzZsu0zIT2DmNN1\n8RLK\r\n=oL2/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"21e03c608316001acbc69c615539cd34772e01e0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.60-renovate-major-socket-io-packages-21e03c608316001acbc69c615539cd34772e01e0_1618515479036_0.17345344569475496","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.60-renovate-non-major-97238814bf25e01f5941b874fbd5f33d7a3176d0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.60-renovate-non-major-97238814bf25e01f5941b874fbd5f33d7a3176d0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.60-renovate-non-major-97238814bf25e01f5941b874fbd5f33d7a3176d0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d232bfdd8ab3a1de3fdd26ca1ced9f5332429681","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.60-renovate-non-major-97238814bf25e01f5941b874fbd5f33d7a3176d0.tgz","fileCount":39,"integrity":"sha512-zC0ENk3iZPD4j0v0Qjb8CEY0nANOCcsLIRTtf9MR6qmjEgdxzwwwb9LDJXTETNZs1yoDfjzxCzpC3vVXaEyCGQ==","signatures":[{"sig":"MEUCIQCCG60eS409Lr7w3BxPIlGk5F/RjkQ9nrNen1ShFMofPgIgC9eyCM4xXKlICmfE1dahkL3cLKMq5tRUBfrruU6zBuI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeMW6CRA9TVsSAnZWagAAds8P/3cg+mmWa8Biz1ue4vSS\nRqHacc/uwGV1e66IyxC9/iBn0dIzBywWiXNqqsHYCX2YpoJ78YHNVHDgCyra\n5XCmrzR8nuejzlkObgnyr+0FNLOaN1Gm8pJEsGImGCY00+HWsQv3VJL554eT\nkGK05szoh2PdvZWmGWoz0nln9Th3xZRSi3+Gq1p4n5WXBBuDaSkB/lWTlajV\nr7sI5e/cJ3fbV5uE+102mifs7HgMTqIPF6kHoFW6Na9WC01IF75D3EN7KqGE\n+bgJoSX4pstzqYJfcE4apsGVDkmN6hgj6t0GePcwP0IFdFldBsXUX/Zb6bgv\nDRqMXCof7nJmJYoeiLYEUU8KHXvTrHGp7k1jXqVuGo+o6JOEk3xDOSIl4RE8\nWwlv12gKytsI4tx/s55zeWvBYNr/GJtMf+IVeWYqPsecRHYKgOnq6S4Z9Hj5\ndpTpaS5MqANCNXTaLqXOTVoMivT8ceo3Fr4tOdIGoMHPWD4iQcyXziCBUzte\nJiu4tQgRUkc5m28OXFChRq7sj727PbdSLIYfmSpULvwiUJcd0Dy1Y0I0uLsd\n3FTNT5E9ssY64lUAe7suiVQqi+DWWTTJtNoG1PmLraWrb0HwzGrx+11xBcFW\njdM71ZiTjegpxK6FlSGWVtHXFYr3pggz6pL0Az3RXm6wCDncSSlgZlVk7lr5\nTseZ\r\n=0Ey7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"97238814bf25e01f5941b874fbd5f33d7a3176d0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.60-renovate-non-major-97238814bf25e01f5941b874fbd5f33d7a3176d0_1618527673644_0.5060339926134412","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.60":{"name":"@balena/jellyfish-client-sdk","version":"3.2.60","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.60","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3593c5ae388bd111bfb1e19b5d90a1ebc9fc2669","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.60.tgz","fileCount":39,"integrity":"sha512-Fm+BdP8OLrXnik9YmBNANJ18T9IeJU1uncjjDvyaR3FLXqUCPzCbdMT2x0LiNIJP+pB6McFyPCbiu558rAO5CQ==","signatures":[{"sig":"MEYCIQDRmGONdeQNFVxRxM2zaVj3j+OgbnvsNkM+Kkfuiro8DwIhAPOz1nCEH02gRtjvZEhnGHHFvjm5UhtnlgLRwqeNSZG4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeMasCRA9TVsSAnZWagAAEhEP/iH8JYV2iyrOv81X2En1\nVK+H0QMwNGqMpBAOgaiTADuXL0c6IRF77mWFeR1b2bCuYb4G3HQiYcKKJvdB\nu9FAexIJ6P9qC4yEggFYs/MECJQwQIISYmpYw9RJXUGPxZb67rHoB8Wkw0bQ\np/ib6qPluvAaW1LQG7jYhaOvRUq5T48s0tud+4K/4YVWzFgQUdUzzvktsP1i\nJ/1DzPjeLMygfWgcrDDmqIjWcsMIzIcTdl3LLOPiFZUxgPtv0qE977EFNbll\n751Gzfe+57n1YFS9EQv9nHBsb9ag8/eLstDuBKbpvF6QR2zCBZfiAIdAav1W\n0le9/4nDz7UFDx0XTTH7IwmBBJPumE63fNUb+Wp/NduhVG2GDBriWzSlRpdU\n3ac2SVAWlflKZuj7ZU9Lr3UgAI40m6GXJ/OG4adzwE8Ky2TZdsBCbY1+VfPh\n/2ewrsMrhGieq1vdwGYVOJ7ciQThh+ywzv4C4TsH4CeBAX2xg5FIPghMkX+e\n587+iSzui48hlAEuCpWFJhNtKNlzCEj0Sjg8pLDYBct5bv65JKAoGET68cQB\nZ9VnsZFTrE34l6fQ8o5XEBOy9/LNB/xw+gOB467nHfPRbi/u1A8+Rvp4hSQd\ntGl4V3oWjm+pZcTQ5K98GlO33jNi5hyd+ctTaX+DjVM0gSShjItfi5/Ruc/D\nzrCp\r\n=vRzp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"75f4ed2d9cc1fe2df5f7e7ac8cf800cd1b1d680a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.60_1618527916353_0.5810435724559573","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.61-renovate-major-socket-io-packages-9eddb30e3fb6941b16e6db94e6b24a2d0cd9f534":{"name":"@balena/jellyfish-client-sdk","version":"3.2.61-renovate-major-socket-io-packages-9eddb30e3fb6941b16e6db94e6b24a2d0cd9f534","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.61-renovate-major-socket-io-packages-9eddb30e3fb6941b16e6db94e6b24a2d0cd9f534","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cd3beb11192e871c1c27841da77eec6ecacb3b24","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.61-renovate-major-socket-io-packages-9eddb30e3fb6941b16e6db94e6b24a2d0cd9f534.tgz","fileCount":39,"integrity":"sha512-xAR9KeGk+QtG7yuq1mLHk9CuVw4zJD4sMjGB6Mi+7mWgLJ39k6qr0wK1BS/y9OiY2qo2eyqB/1a65ekWMUX1EA==","signatures":[{"sig":"MEQCIG0kaUhGtZwxW0lDX0a/1KLlVg6hQ4iFksAOO0PvSXaNAiBUypwF/ijLsovQE+8sKGKJpej9BWsXM4Jzdj9Ou33ADw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeMg3CRA9TVsSAnZWagAADKoQAJ3BeyV4VsThZFkkrcym\nzpg8N5WQh1eloMnwee4rXnbZxUxz7ubVwKT8YBIIkS67lK20ntnqLuy1okmq\nxIedn80tqofhFaIa6ltLMF5hrDGmfEjQAnCOvaST0PlAywzZDiizVJEZFnJq\nQw7VNpkd/+y4y4scZxuDaa1MiWetjyt+ebWyQZwDETichxzfwe/UjF/bvtkb\np+eyPJWFjHL8n60H33Iv3UTmnurZj4V0HEYeKoC6DS/fg2DxRHti/s7/2cPr\n5ZgjAj9RIb++f9T3s2ZyM5KfMarbzl36Oh4i/kBkxVpJ2g9QYJtyw2dHlt0y\nP6uxEUbOplGs+ehlmtBX67WGA/t4F6h5i14N0dLNrZFtD/E1BTMZ82zTpJPY\n0UIruvuOaD8mmSc9QRKZFfJ7+uvrrFDyHs1cG9nJ8iNcDnJTLJPOksgBmh1f\ntxoHl+a3cJ9eAnNgfehMt7lYU4sGZEseFZOprXJ/lzCnx2HO2FScLnwDTdBj\nQl33B2puXZdM7vYy1PTX+DZLNfnVm+0W+fdhu/UkmhHn7c89O7pejGBBAufZ\nRs0KHDPVIPZg6OYyKyvxXcV/HA5s7Vkths8X5tKm+AHCx6CnU1X2+tZFt8jv\n2iurfYq7KcUV/nZ3z0sQ8k7Xtk5vlb7foK4TomdYP1C/2Z0C27cVtyZY8z45\neuuv\r\n=GX8B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9eddb30e3fb6941b16e6db94e6b24a2d0cd9f534","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.61-renovate-major-socket-io-packages-9eddb30e3fb6941b16e6db94e6b24a2d0cd9f534_1618528310643_0.7256720069072473","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.61-renovate-non-major-a23fb148d3e5efc9c15cd740fa16057817a812ee":{"name":"@balena/jellyfish-client-sdk","version":"3.2.61-renovate-non-major-a23fb148d3e5efc9c15cd740fa16057817a812ee","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.61-renovate-non-major-a23fb148d3e5efc9c15cd740fa16057817a812ee","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"367052422df79277f4ee924e07a0905037d94b15","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.61-renovate-non-major-a23fb148d3e5efc9c15cd740fa16057817a812ee.tgz","fileCount":39,"integrity":"sha512-4nNhJ3Kb5R8lj+KpozMbUbugRTIBNFz4edDC3kqI9lI4fb84I8Bny1SmPslkIl/IqGX41YcjESigBICz4FLTOA==","signatures":[{"sig":"MEUCIB06xZ2Lf6xhaqx/rRd8vG5f3VS+/Tj3bIuAKZIyVQf6AiEA9XpWCy72WPzY0Od881V6N/qwl/0A8GyyHT2/6w8DawY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeOLmCRA9TVsSAnZWagAA8LYP/1ci28DC21RNW6E2yEW8\nXDqPmhuXWJ08GQca8WpyERxNL5VeWdeD8CMOePIYOjXDpHlIM3/UTeakdKXZ\nWQYvBVNbqJ24OG5Or0fOplgJWebtDncj1zr1cCfIPSaQAyIHu6MACfp/vofg\n38oKnUuQ7DkbfPSAPDfOu5aNj85ciM3iXgyrTBBFxfk4GsHm5PBnOxUVh7Fv\nhR6P5NsQoJ63LoUctGnmK/yKVafWBjTqWkgMIHN7Yt9BPE5IOMr7v9uVXBzM\n+l+FJnITZKacq+4eUPhc5bV7+ue6Rjso6SPoceUbTQDMnJchNUL2HR89tBnp\nt0Ss6ZnZPWT0rlmqYy9g/6uuPip1lwVVbN4AgqphBF1qDvwz0Ca83N1jr1D7\nph3lr6bKzD/+RmL4O5jrWjsGcG5ophCwoxzYDjlvUs9pdArBWLDwmt/1o0AE\n92jouw8i5qgUH4lP1CX8UjBQqZzylIP13YAAFhd+O7GNItvEW71r3AhvIsEd\n6TrXSU4fdCjlpR3iPHdUvVhyKD75TlACSV5E38RPj9QcEO6b2u6LpU+BbTvB\nQp1Ad69jok+gACCIR/emwLK3CRQdlsM4qkvWDJFYnYylE8WhCfDvVNe6dfIX\npMz3SE5WSWgVLef/VSBwcTugwrmZEErCGSekhloBJ/CHV681Zb2QcyWhC7xJ\n+12M\r\n=IRYa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a23fb148d3e5efc9c15cd740fa16057817a812ee","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.61-renovate-non-major-a23fb148d3e5efc9c15cd740fa16057817a812ee_1618535139930_0.8540625654666123","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.61":{"name":"@balena/jellyfish-client-sdk","version":"3.2.61","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.61","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4af652ce226f9541f1e03eea8d4d0d7432c9987d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.61.tgz","fileCount":39,"integrity":"sha512-Hd89PCu+LvVBhHbhss9U+vpIIxB5CnmGJPgVJQS6QBSrh6YLDM1Ke3d9Oo3TKIIRatt7TJ8ltKNHLEcxgS1vuA==","signatures":[{"sig":"MEUCIQDLnQ+BrWe8+MQekArCWt/2qe/te2hxmE9/qqVNfu46KAIgaVPOecxMg0q31L0F5CXhXlb6vBOmsdqhbg2BMbLAdLg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeOQGCRA9TVsSAnZWagAAwaUQAJt+d/5L59Rh13DsimMA\nPdXFA1kEpg0ZMMx5SHtWRyMcTC4dhWJ6edYaWza2H2/dlSZbhQ54WMScF82n\nwcUaxgxtnbsqsf9cfTuXWgtOo3fIYEsKiRQDSMmW7A1SVbpHz1T7ZmOHscsY\n3aHJF//C6l3Znltr+pPfgg9C5/CHSsrw3b4Kq6Hd82vqYshUTKC1edUuzcUc\nz+AYHYDY63H+u/8wdFTPYO7WFtRULMMlYbUMOZvR/8cZavlcBR3TFAwER1Yv\nE5UelNrB+aSmeyV3xLjalnard9Jj5QaAjHuqKkZlJB8Q81uEPqPPAaxxiKWs\nqD2Tki94ZSuKcZqlsUVkNqZ7cbCU+YZ/xOn3E2tyMpUqYI36hmwcHSC6tV5L\nhjYHeolMBswUAPi+LS7UCQIedMaZjN/LMFBpQ1uhD9otuUE5F3GpTQ561PZ9\n4g1aYOoQDYuc3moRgSYs/FfsnzMYl7KtHfgqJ2AGw6hVl1OV/oCApUlN0Csi\n8pUIb0To8RMrKPbC6juLtGIRO1z7RuKQZhs/GX8aDctFREFZ8glbAzMT2RDH\nHtPdPMf/Mtr8wz6reDZi6weDXt3p8oimrYn8U0i9xh3sg22VQuL+qAz16JfP\n5kre6ngUWG031uv0OyGAp8LSpmmHamxltYwaCV58K3JAZyshp0mzOjsq3/e2\nfZj/\r\n=XU9d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3d154bd9d02ce9fe24d114fe07405adec1a5dd4a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.61_1618535429842_0.28408415903455997","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.62-renovate-major-socket-io-packages-bcb655defbfaf0205cb724b1a0c4a5ea14b9444d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.62-renovate-major-socket-io-packages-bcb655defbfaf0205cb724b1a0c4a5ea14b9444d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.62-renovate-major-socket-io-packages-bcb655defbfaf0205cb724b1a0c4a5ea14b9444d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"623104ea3cf21e12d441889d127fcf761c084733","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.62-renovate-major-socket-io-packages-bcb655defbfaf0205cb724b1a0c4a5ea14b9444d.tgz","fileCount":39,"integrity":"sha512-n/9czN0YapDYHxKCO3Wxvf4pywej03ildbpvqDOH3oKSBPZPfBnWEGPFfyetVI49lI3vJAHwq6xypfhAWHgsaQ==","signatures":[{"sig":"MEQCIH3PfPLoALI1J5OHhpHetIh7LYgXQiDAkoXvdkRhbBHlAiBDzBkcpVeqOHYYeIBOrzet2tLxpIxAG4s/ql2SSyAotg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeOVjCRA9TVsSAnZWagAAumIP/R7NDzKccpXOMoPZPZJR\nk4OEgjXofo6tKPUOO0pCmHBRiNBF1Kdwu+X2ZTccjjA6eRJxAEz0EWhDzre0\nafH5ijBqPk2XpBp12RHparcoBeDHpgeHj2Cup/QZ2BD2dzV+8oGymtHp4ysM\ndpCCAPgfwgbrLEcW6TdA3NeCUD4ccTfJNMAGAPvyKVFOuYNewWN9GllBHRUX\nMREMWJt+VoLe3dNRWcfsnsBGLpoccu8o2FQH9pDplHmlXMRaCgKaqjt5p3rR\n3PjhbdbCw2Kih4/GYqRGIrpMZhHRo7OsRIn0vTPi9z+9WeKZ5uac/Yu0piFq\nAD0y5pV9HCxX4cCRsstwJZ4hGb9nbxuC/AfcGFusgsNHPNEryHAOlJBl8M2r\ndLUQrR33rrPCXrVNEbyo7xokzWAKYERqD/gg/Y7OiQdMbapoPtAcCKJgERI2\ncTqexwk+PGWCr+l/yYzsW7kW3H74ArlhVAGT+r8ZvSSXKX9pJuVIApgMfuTn\nDAqcXNVOpSONlCzc41cQrSVWMfIY/cOn4iMpn/GtGTVKfxU16qR22FX90vvj\nCj6uHbxLA+mPTy+NUm3dv7bqLIwUpDtHGPw8+45T+zUf2vNArvLPXLEgiNfL\n5D3t3Sb23BFAYh2/DWxyiUtSgYcd1kukI6JHE1yiU8U7GrxspetE6XNq/0jJ\npHw0\r\n=n4iP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bcb655defbfaf0205cb724b1a0c4a5ea14b9444d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.62-renovate-major-socket-io-packages-bcb655defbfaf0205cb724b1a0c4a5ea14b9444d_1618535779151_0.43156854786811283","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.62-renovate-non-major-29785595fda9997a25d226bbccfe766123801abf":{"name":"@balena/jellyfish-client-sdk","version":"3.2.62-renovate-non-major-29785595fda9997a25d226bbccfe766123801abf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.62-renovate-non-major-29785595fda9997a25d226bbccfe766123801abf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5417612778a110336738a1ccc04df9154353c201","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.62-renovate-non-major-29785595fda9997a25d226bbccfe766123801abf.tgz","fileCount":39,"integrity":"sha512-PM7NTx9Xama2QYYdub//m5Qzr3rHXORLcl0uLwWjDqBhwlWX09skl+GD5L3dwNiQy2zoFy5J/gZgmBscyOj+yA==","signatures":[{"sig":"MEUCIFy+/epASEMIn6rlHUc5Hy0wMQQV/D0qyIoqNNryuufVAiEA0S7uZCxYFN29Tx/OS6BeTFnkZ7/4sedOjSCByTPXj2I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeQnUCRA9TVsSAnZWagAAvT0P/34Q1W/KoyI8YFuvoLLJ\noFvux6Ch8joAzv+B9FlFzHOrNxcYqVVPSqE73AgUCDnLI9qmoWwupmrYlmhs\nkVStz4ywzgpFJXfPn+b37QNP3lREPUuCbm3bXnXL0F7AzOJBMf6Gvn5Hs0ZT\naYxnLAupR95ky1W5BmDK474geZXZsCavszG2912buTZCM7pUIsdATfI4C5id\naxzbZs1S2bZ2UMi1ZSEtUpGL4YOPWL6BJy2/VwJJCDVWAEJMSCdEZwfkb2A+\ntEar4oG85qaNuzuJJfY8xcBnin/C9025rq5tHlzdQLkkNL+ytdAmQX4e3iqM\nL6Z53vPbcklEmFzLOBe60OyanceiO9vmjxk+RQlNaxaa5xYrTVFmSL8thu7R\nt6jkVIR3niXtgIFChd53L53u3EcPUGj4yv9MN3cTx7JGWo4cvT3TS8QViipr\nqOiv8r7JrTKwg7lJcEKW8ycx/VLnT3mMld2DD+Ais+MAPfxjR+/2w9Q4xdX8\nzgAB+sOX2SUxuuaPp0ZdswUtO+oCiEvpBa8nAW5d8hZMa3Ad/wW7aW5eQbIg\nNI1caImMmBIAlWtysiEiBvi745OOk4Z72yw9LW5Ahvo8yq5XFj23FeaC+X/+\nH+H5HZ3Yam2aCOVt9YD1jAOCvwjrB+2tHZ+Qs135ittPl7Vn9c9Ye798IZka\nk+Wu\r\n=/kMA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"29785595fda9997a25d226bbccfe766123801abf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.62-renovate-non-major-29785595fda9997a25d226bbccfe766123801abf_1618545107920_0.47750931560288645","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.62":{"name":"@balena/jellyfish-client-sdk","version":"3.2.62","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.62","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4bb69cca7c438049e042839d67ff5c5b900a6a55","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.62.tgz","fileCount":39,"integrity":"sha512-NdOKla6pjyokdSl7G3SJFolNw85fh2TIlzmFyFIXiS/K8rWw2YEzuC5SMFhfmaqedAnJqmMVKeJpEw9etmJZyQ==","signatures":[{"sig":"MEQCIHhDVDmTQyi86RGRj8O9y6NeDkzX1WOVCEir19SHOb4EAiBZca3ymkXP202DxTYGvT7vO38kfE06+8CT05OKqEybzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeQqgCRA9TVsSAnZWagAAkLIP/i1e3qWvVvfGhvDpd/eZ\n2x5ix0gS5eBPsptO8qlYyCVJTORhpM/DLQ5lPmqHS31vI1LX5wI97xE3fBju\n3bhf1d4Za03jCat62Me59WYgp4oBth0xOZng+VxRg2xP9qlDNZxvX8DtMqy1\nIgdD1zJpBH0rhvE+zR7+cTrXOjLr0HxluyS+lZGrFgRMqQRT5w9YxD62j4QG\ny8fmKnoJO6sz0sA/9Q2ZkluuJfl/ZUx8Ogh1x+jZQWpJ3Niww+be/0UIFsj5\nXSTZca09zve+ntC/P4IJKowJelCnTOr2NFsacr+lEqM9cCGjNvcfT1WTl0V1\nSB9kxvcsL9Um1JMcDZtv0ahdjEoxHCB1xl7jEMCQTrHrFFmiWF+YyTVJBV0q\ngFWZeBG4oQ7xavtYz0BTDqQIxKMaW2ZmZLXFQ8x0ekrMElqNgX5jPNMhkz94\n6t94n4pcSsLzU8twpdXMu3ujhteP8Stwkjvy7VutiXJfHyr0csDntBtweb3v\nuCG/gAkBuxPMGXJFmHHLpxOZwaTTbm+z+JkaThi9XoSLD5CNAx3ORHxMC8YX\nnizujh5GRF3kUf/4Q/mFjJFtDFCmltIa1fd4lR45p+2h6+ZDSqlJN2ry8WGN\nWzdq45l1cwD0P/42fFpHwWBcIvcdre1dO8vJ7cJz0Y4qn97smTp+FDBNcau3\nINVV\r\n=dvp2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7896726ed0538f2366234f41e3301c4ece006ff7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.62_1618545312464_0.028542456712524533","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.63-renovate-major-socket-io-packages-1134fda06ca22e5ac78bb8b176aa7cdedc7adb76":{"name":"@balena/jellyfish-client-sdk","version":"3.2.63-renovate-major-socket-io-packages-1134fda06ca22e5ac78bb8b176aa7cdedc7adb76","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.63-renovate-major-socket-io-packages-1134fda06ca22e5ac78bb8b176aa7cdedc7adb76","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bd1be9d336649d1c71b86f9de210e230a57dc946","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.63-renovate-major-socket-io-packages-1134fda06ca22e5ac78bb8b176aa7cdedc7adb76.tgz","fileCount":39,"integrity":"sha512-c1ygm3vS7uPbtsI4dc3SedVqzF+JgEAUH2k3kxOqqqCKBxW/P9B5Wqx00K/9JyaA/4PayEN9He45XXV2QoHl1A==","signatures":[{"sig":"MEUCIQClcm8fnBnZ3Jp4xvwMsJGkBEVcvOzRWVDXdErRDhKGxAIgDdB8nD31VwQboC9opQ8o7EZGQJx59SuwF6YXhlOJo0A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeQw+CRA9TVsSAnZWagAAeJQQAJTWBYIJxWBimeLJqzPZ\nFLARBh+w1G9vGsrv2RLqVnw+FQNsY0CxTjDivWVMnCY7pnWUpa9+dr85vXy6\nnuccxRmaYsFh6JvdpO29BMwg6IAtdCJ+KkzorIhL8vHQ/XhAeR+vSpSCQw8T\ntBJCeLvyZ1l6dH32xYjqS7fjlzVGqA9rOZ1JYueA3YXgfY9iDIKPwuOF1uNv\nqsLW48vk9x0w/XKNB/xcy7MtEm8Ub5Rbk3TAQnJ3hDL0qUYt0wlkq2HDjP5B\nCv2VR20VeV6hawx0YivL8byI1/W5LtftTOjlHDq/Pk6T5fI1Wg9E6HXSjdDu\n8QSWrp3inNsUqCkOh8EVPGJmwha4kzHXfC1rL3Ta7zuO8ppBdSVN4UtP6b6x\nwiQlYMYihTNPH8Rwf7R4sjIi+/9UVHfKviLXOmAS0uy1ByaB1F93rTbWy2+s\nzlrvZVlFRQdLPM3QbqxxPqIa5E2yXlDAvNL4gV7NKhOmDRVmZ3W/DjH/iOBs\noTm4n2bF/zsNjZCQ39h9rlGqF5BDy381kxlT4b+Awy9pLS+S7wRyG8pfqUNG\n2YKGbuoL5GM33Y27mUqDuUJs7KCTAaH5t43O9Nc3O1KwRYTkhvRraijEi2nC\n3N3OfIwA+EbWZieJ6Rc+OVrrGAhTNX0QfqyA+sI3l/lxFngCIF/UVTi/opRk\nK36R\r\n=Q7UC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1134fda06ca22e5ac78bb8b176aa7cdedc7adb76","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.63-renovate-major-socket-io-packages-1134fda06ca22e5ac78bb8b176aa7cdedc7adb76_1618545725740_0.8462207716414909","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.63-renovate-non-major-aa69a6d8013d7cbb4ab982ba56c046f51d68b686":{"name":"@balena/jellyfish-client-sdk","version":"3.2.63-renovate-non-major-aa69a6d8013d7cbb4ab982ba56c046f51d68b686","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.63-renovate-non-major-aa69a6d8013d7cbb4ab982ba56c046f51d68b686","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6307639fea37b414d3342b0bfeea2f16dbda1cc9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.63-renovate-non-major-aa69a6d8013d7cbb4ab982ba56c046f51d68b686.tgz","fileCount":39,"integrity":"sha512-+yajugeBIf5je8DgoYbjwCy3JFmxsZUZx2In9bbhzhILs/DwU6q3ckjxkdmGNKZFml+6AY56U86uopyj32XdAw==","signatures":[{"sig":"MEYCIQDabhkkCBgHkyeAPHtQNYR63QfX05SKGT1O3GT3jPW5OwIhAOfwlv6AG+EJADMioRwstIxcXv55DsMgsnIQbEIJRpOT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeSPDCRA9TVsSAnZWagAAJu0QAIBGdskd5/CE+qFkkY/H\nBewiIR836LIR2X4wBszhweWcmgwNtix9M3q2j4FsqnLNl9RXp7DTzI5Je16M\nxWkH649xgVwg5hyi/zlXTSbEuJRLEGR7Okg9CV+lORh6tJeKh2GD7A7VQtKj\nWsOkKudV8EHT3w9VQiqBuBwbn6d4FQxfLr7WPlC1cSxL1Vp6EIT7CZU1SQM+\nnSYGSGqmT0NmEscc+z9g3Uc0RvcbDXEJHypZUJ6cF+ELI1pboqNlyIoVdDFD\nSH2p0rR4lwOZUZlOFGI/2W26m9D+U9BoKFLSc0Bjuk25OjiMPBlfOjZeDNFc\nDGDUETeiI3FVhoqaP8nL+pjgF8p+KmidQmRPamKfVId7gvsQWRWytDc+e1du\nEFymlq37lJWsG3fRhLKcOyRaxvP38Kw3vj23/xI2fucGncHiu6BUwoa8d4o6\nhNcON7gyDh/6MEmG1t+TyIJqLowKny1fEV4dzaj6myH62QG5KZPG01fijO7g\nTlmClzhNnD8239FwmvZB0zUOkg/VORpVgIGkeoOEORMpRTBmKhY4IvOgdB5G\n6aDWhhk0G0+UMvUCPp9iGLfyiGc2By0QE9qcbGW/mqf8+SwPAfLkhizkJdeS\nxdPM9hSBzQECwNoYofx1UNgZhtNAXxZois816JJSVgmrlZQuquiQNaPuQEIp\nirvL\r\n=6wS8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aa69a6d8013d7cbb4ab982ba56c046f51d68b686","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.8","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.63-renovate-non-major-aa69a6d8013d7cbb4ab982ba56c046f51d68b686_1618551746563_0.32200921846906017","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.63":{"name":"@balena/jellyfish-client-sdk","version":"3.2.63","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.63","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"25c8b3343c33cde0bb2d6049e1d7230ba089d5d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.63.tgz","fileCount":39,"integrity":"sha512-bj+qCLv+IN26jbHWcbsHApCphs24i6Fnj0X6T7Tu+izqOFu4UXfWN9YYAsSxd/fdhroJLbZao06jEu8pb8pyCQ==","signatures":[{"sig":"MEUCIEWQnwZ+OGcJ9jk+7/2iZNwG/4c/712kHgFBsYP1XxKmAiEAgDgDSrTz/Ubo3a6b/Qx//7/kSouilCFjpIB5+e0aeaU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeSS3CRA9TVsSAnZWagAAzLIQAIGC/svRW0zcYFLqZgKO\n81m2ESOL5E4LtU6maXnA9BD/tuio2NwISRXwNj6uEFI4cXXid+xSz3HO6wsj\nqtyBj8Rmerk90u0cAIhR8A9qqmEi5kK6nkf9R7DfC/owsvH1O/6YLZFRAjfi\ngea1hmv9hCfzMmGrNV7xhsLU1ekgoj39N46BfjEfVa2D+Uz7s0ZsYGJS8HjZ\nuOeC4Yks6s8m8w7Rdvx/jI/SGjb1Ao6UNT+C2B14Z14lfTrHWnTzvxJZP189\nnfLrxHu5dqAAcpKR2BSPcS3dlDpDYkkzODyzcD7EQUTPF8Fd6mHSiSL2Z87v\ntBnVebUbwpJXlmhEeya8qKFUGGlvC+1vZREl91GuVPtZzkKkWAfPDgqJNpyG\nFcaAbiUoTFsiszAA8mAxbx9YPRycaUFgRxbZx8lPOmgo+5qHojFtb/o9M1qd\nIIijKV0ofj7eWldmRhBRcV1kokArGyyC7lvZ26/dRaImS8mvxHubCxtkJZNj\n3KLD6/4GZJ+cvUO0UvmCdqNJAlrDJ6Rpxe/qgUZdieE1BB8O+KneywF1LIfk\nBh7y7eZqpdBdnZ8lS0PKKtHx2yZimplOBbbKlrUGJvOBUUQ9OK3Yua/2ms5P\nXC/c3QcvxFaklpF+dXY3KLxthSTco080n9AWfPccaSuwCFZ4kaSPPzptzVAy\nzidN\r\n=mKwC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"16282f8924a28194e43e67c68bca29a72d160495","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.8","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.63_1618551991276_0.17022131173518296","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.64-renovate-major-socket-io-packages-e560ebb1c9a478cc2a54eaf1980a00ce1756ab1e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.64-renovate-major-socket-io-packages-e560ebb1c9a478cc2a54eaf1980a00ce1756ab1e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.64-renovate-major-socket-io-packages-e560ebb1c9a478cc2a54eaf1980a00ce1756ab1e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e96668bd2588ddbbdd73e9dbd831d5a16ea6a382","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.64-renovate-major-socket-io-packages-e560ebb1c9a478cc2a54eaf1980a00ce1756ab1e.tgz","fileCount":39,"integrity":"sha512-CZTnfdTTI7pCLCriYyWa6LLS8RsbKWK1Elu2pwJOz7BfkRkbC1qoAkD9KUPfQr6Rw47yZt6s1qYIeRsGY1xwJg==","signatures":[{"sig":"MEUCIFBmq8JEef6q4i22l2q2u5mQag3GuHeYHdYnY+aOMG8AAiEAjczwxIXzqZ5I1Vat7XvHjBRnGmVbdEDE17rGilXU9b0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeSXuCRA9TVsSAnZWagAArLcQAJ3hHeKKeqyOim18XrlZ\np6Kin3nUPCBiZ63F8UDkbWwMcP7NpbzMPbnCUW3RMKUnEU6PDRrj0FxeKDBy\nnKubI7XQFxxzTFiLH4a/GoGlp9cG1B10FhtweUpKlFv/W9VALVDP/SR2/SF5\nI6f9A2Lnohv1YdDQZrMHt3j2wBlsvMIzmtWnWe4rUv288b1bUsb9foc8cDcx\n5hbFEMLbIgLRbVBlql1277/zlrdmCIeOHqHKq/UIDg+d+At6dS69GMloutNs\nwBu/bS9kinQvenSPrS+De/I9HxowPDysMPI0MDLdTiSlX452Euk3HHvCRfnQ\nimdXB1r9yXLXtBbMJFhTmey+dpZX3wmNw2VquFOv8cnVaPNBfnZympwXsyLM\ns6X6POBS1G7kuf7KZNwLaYmGUv8EEWJ/XczC1R13KGAOw1gdIo4JTAxegHz3\ncT0ZpQH7Yt90ElQ/wSTCmcYXutb7XHPCfJcKIdhH/z6+SCP/N7k+NNTG1GLe\nBhVwWyTLT5aD+MO0OhMw86Cau21Z94wdL2bIeVUQRwi98h4Y9qThButG2Fe2\nr9qQBrs440H7vkCF2tNQ4eTS7mQBIZcac4f7DHoMGARa5D1wEFDXWcVXlW40\nTlTHIv73Oqqk4LCCDJa1vdgDnSF8kKTZF0AU+g359qZfqwqYSQzAQMOq5S8+\ngZ1l\r\n=wjgb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e560ebb1c9a478cc2a54eaf1980a00ce1756ab1e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.8","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.64-renovate-major-socket-io-packages-e560ebb1c9a478cc2a54eaf1980a00ce1756ab1e_1618552301987_0.4757122630371948","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.64-renovate-non-major-706a4c5ab29e16e467e7a4c5a66b80a74878ade3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.64-renovate-non-major-706a4c5ab29e16e467e7a4c5a66b80a74878ade3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.64-renovate-non-major-706a4c5ab29e16e467e7a4c5a66b80a74878ade3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"51193ae95d421a5f6ce0158066d8a41122ee4cd4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.64-renovate-non-major-706a4c5ab29e16e467e7a4c5a66b80a74878ade3.tgz","fileCount":39,"integrity":"sha512-uRwFSV60Czhd7O3gVEb9GyqY6tNf4GM24w95p6gmV5lQqttdcyEzb1+T3xWK3NTQLk7zDH0eqcua907KINfaWA==","signatures":[{"sig":"MEYCIQDtE/uwwz2W6tMrcc6zMpfworVNnyoO3wXoCpVmIcLi5AIhAK7fxFE2cDwmhV0FSzPp3sCQPv3MFI9B9XSuqf/6G/XH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeV2nCRA9TVsSAnZWagAAyf8QAJwQMNJtUCApTqyxdH/6\naRs2WDM8LcSNAeMfNUK90VUUtLSzIu7lM3C6PaGy7uKTlRQjCjacI0G1ss/x\nWOJwpV+oXcf4mL6skhmXkXx+HD1hqPDvL//t5KUJTiOCIBNpumFFgEKmouKu\n3fQfnqm6XprwDxTzKXUNFirhhTReP+BbzMfXMYMAQD7RV1OAEGjwcgdhXPf0\nvPQ5oqWXLX3Ar9VIIuGkesmD+c1Q70Efdvbe1dOSU+vAbFz8TnC2FXWfma/L\n807EuwJ98kpeG0u4Yvj5dCCInn65ON2K32sVCd7RABBkyGNKpMjnJRmRU2Yg\nWpdpUKTTSgE4Jv+q4Uvmp14urAP5hyMYiryxBmWrvqgnWA5iup8uderntQ7w\nxkIarJZAEu8Saz18YCPmrJjJuaRdLPKNEDwjVMf0N6D4nciv0v9Y4PloAnQT\nhbZ2FaKdjT5P4H29ui2Q69vdJEOxotAzoHtMR3nqUcKebvYU4oANmmydtUKv\ndObd5Sr+GxVQpTdXFhFJYRvK6mT1cH0fhC16oV+7yRWGcaMeESuXPAmzis4+\n1/jLlYzhU7L6uNfgozoJCX4yOhrRkBK5JnrY9yT49NV4fn44Fn9nYgzT9OrB\nergflO4UNv4mql8vAFFTs8s59jdH1hltMtTzFCvwhFGKoPTsUMypnetM2rSJ\nqD/O\r\n=q+Zo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"706a4c5ab29e16e467e7a4c5a66b80a74878ade3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.64-renovate-non-major-706a4c5ab29e16e467e7a4c5a66b80a74878ade3_1618566566462_0.39011760981726806","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.64":{"name":"@balena/jellyfish-client-sdk","version":"3.2.64","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.64","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9d3dbad6711a70189e36a23a24c3928b50a995f5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.64.tgz","fileCount":39,"integrity":"sha512-0yQ1ap3taIZ/FvXTlatWjVwTPICghWh4hj8H0LUjwVzCfnA+rL4Wu1I4csy28Us2sgm3LJsn65V3f3Da4rE38w==","signatures":[{"sig":"MEUCIHc+LZMWy0hNqmXKcZ1TCc5HQfjkHtfeghtA6gERC44sAiEAlFI/0JirV8zGXJccumTA6eCZwuCFclBkaiGyiSB7x+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeV6JCRA9TVsSAnZWagAAvggP/3n0KmyQ1sGs8qLnZHjK\nRvTuSeiWjAINNqQ117y7q34W9AV9UoWjOgjHbVnSozWPG2zpX+4oDE5p/pNI\n83h9jZKWRriX8aPNHUBWE9qLq1eO3vdgUNHHDIsveXTNuhxjR0GMAfoT4Htl\n440m+en78XJL2BNCfxcL/zalojy6mjE5US0ewNYTMZPI17NdLxszJpy0puv5\nWhkTaq5VjUj99UFkr1FTqZ5l99iYKu2XOC4mLyiaX45ktYTb7DsJ/HThxrYi\nhSjaTvESRMyZsYJYchyCFdcdanhR+krj4tZ8OuwrfZ46SjqDv8opBxivPeOK\nLFQ6NKEcbLZXlEkjlVdkCA4A5DIn/DyN9jfaoTyH0dnzAT4Ibjdw7ySWupfn\nDVBqkpsy76Nnldp5q9j+GWJX9+NK5wuHjXM2Jk3yt01z+t7OOc66imrtFS5j\nHYgusCDsM1jpiDxaO+/Su7f/gw2kcYsm6G0NjDTRTOn8jrwXwnvo2g7Eab17\n1qLwRy7PR4rjTn4rh8qbIv9CKlEtjctoAbhYafieF+mSjvErDmhRpfTBAeK8\nS7VRgOPDPzL3fwNg+JmXkR/NuURm+RuuARZpbpBfwrM7ePnI3MLoZOFsdTGi\n9Qk6Bkk3AS2ZYc20dzcAL0aeMAwG7VfI0Vj7udPaHp27Cyl6wY14Sb+T1oym\nolEW\r\n=jqRO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ce29f3392d78e4cda20f0f882fd68dd5266deeba","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.64_1618566792908_0.31811337098937154","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.65-renovate-major-socket-io-packages-aa4bc9d37f347078fb00bf5e6a1110efa7fb9aef":{"name":"@balena/jellyfish-client-sdk","version":"3.2.65-renovate-major-socket-io-packages-aa4bc9d37f347078fb00bf5e6a1110efa7fb9aef","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.65-renovate-major-socket-io-packages-aa4bc9d37f347078fb00bf5e6a1110efa7fb9aef","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"136514c63c63dd5f8ca1d7de43d95ae90a51bff2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.65-renovate-major-socket-io-packages-aa4bc9d37f347078fb00bf5e6a1110efa7fb9aef.tgz","fileCount":39,"integrity":"sha512-6vktxMRzV/VD3p7GoXaR0A9beXVdwUjrP1KJrQu5/cdVsQomeRWIPWZXXbiwm51RsAhyz7n8gt8jzGFPOAeNlw==","signatures":[{"sig":"MEYCIQDeugUUW677ES/LUW/8dWubAasr1ouX16Lv0XvEADXQ1gIhAIUBvBezP6HjgkgLTPOdY9tXbavzgWyLilGg2K7NA/Xv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeV+FCRA9TVsSAnZWagAA3sUQAJiFD8n7o2ya1EVoF5zF\nCItKWGi+OmAnhFQjfF20+j70eaV67rFGOiPkbbpZ4PbtGpPOf2yPqi5RuY6r\n8U1iDrk+9fJC3PtO2IR8fPERSzik9s4AW8XS5FE+sxI/RYPYHkg0Uz6ca+to\n5Z3sMPIsa4JLMsxpmnu7bBzQ6f8lvtmo56/b37UQrL+GUoYC5+CiSUp9H2q5\nBLTGSgi+8KbVN1Ci3CbH96yrFtP8mp8A0NQJVDSXJ7eR7cUnDG1iMPj2Ea9S\n8dszr35HFs7FRsGhgNdXuwJHVpQaxMA3AcGTV6w8MBzhS/imJQYhW5AMGybF\nus6CGZJyKn5fHuAfv8aaDuivtPo8UfC0lKp1CNbdG7C7oVZEBQJaNORlsrry\nFtHCN1M+C7+0uX3Um9ivYnOSfD14Wz8MuCDf7cGM2KIQ7W8ZMfDGqB5sy7xw\niIkwkozvagKziISeHNbdAuMA6yVclwVLrPVevrgusP+iCnEuHVpv5VumM0bI\nZUccBfmmUg2pentFQuzXnFQqrpdk/YaBAwJDeaGh80AocaMKcdIMkNT3crUa\nhKNv0QOUFQvsA5XaajGkTxCXhYoPiNE5MywAVoeCOQPOaUwl6xug7H9WNEHK\n/KK3rcQ1e+JKPtPUV0L4StpAJiwvgEKyjZzyOnLGhc2FPTf+PMre65H5g+ye\nPFA2\r\n=BV/b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aa4bc9d37f347078fb00bf5e6a1110efa7fb9aef","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.65-renovate-major-socket-io-packages-aa4bc9d37f347078fb00bf5e6a1110efa7fb9aef_1618567045118_0.5161078641822012","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.65-renovate-non-major-5a6ed3d1c2920ba7ce237f7ea314a111c50a1da4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.65-renovate-non-major-5a6ed3d1c2920ba7ce237f7ea314a111c50a1da4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.65-renovate-non-major-5a6ed3d1c2920ba7ce237f7ea314a111c50a1da4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7f7fd9d606e10a50f2c69ee073dbd415ef696a2b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.65-renovate-non-major-5a6ed3d1c2920ba7ce237f7ea314a111c50a1da4.tgz","fileCount":39,"integrity":"sha512-CXKNp7fENeXTpgH5UtbMItyLQ0SPgnaBXUTkfLEgsq0Pm8u3l8P7cFGBojMOYBH+ZcWweZUt4dAI1c2rC8wA1g==","signatures":[{"sig":"MEQCIBtPHrF8EpfDIz3YWv8moU/WDEyTyn3w7k992rrd4AIGAiB6c66RUmAho1CLZ2ZuZLvvSFxnzryVU/Ec+iSSF1U8Hg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeZLkCRA9TVsSAnZWagAAgHsP/2TSXY1jxBhxJKu0ZQUX\ntd2ncNLqBoxQDZre7bDItFGcx/gbe8xwjl0NpQw9KVd9Lc99XvLmKfpFKPPt\nK8eJUc5HLP7a02K0RPJoJRAo7BT1KU2FOPOZRmb6UJVnfMJEjW8R1OZGPcjB\nIVKIxRRUTq9BpN06FO2WK63BWgtiYTlVBbl0aaCqWsXDVjTjz3MO5Lh0QKGl\nun3xFV7GvgUFOIQeGmk0R5Qw3xU+HhJ8uHRZwopxfInKWZceT0e5ZoGG3Rya\n+pWx+4bI728ijwRFQZSUGUs4uuVqs9tAw/4CpS116gJigCEOKH6yE0YPXk0L\nqNAlg4+7OFXcmiEl+/KEIYgHZ6hLoT50UptQ8Et45sNgXT1E4N6ku6Vw2j5o\nOdQ9LxNvJDpR62VdDX7w8E6azuVYXD67+qcD5HL8jIR/S1QpKa36aXfDZhv7\nidMnRO5fsXqthGF90lWheB5jpNTN5210rtHU9OMEPdO89CeOzxUExeHPnvZd\nL6kUYK81rVCrBxfCMTX1nQjcFjgDV/6XbiP/qAM+yV9l3u89pJOIxXAztYyf\nyucQvlgpaJcIZC7dwMANy/fZZzRXwl0hM+oM5C1RBJbU9QwtZAdTMsDWOLR8\nQ1eFBX4mA9ehpAZ5FyNpGY4w1lDC2Hgte8OLmQR9XIQnMwQMmkPRDhqICxv5\n+FNH\r\n=Jztg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5a6ed3d1c2920ba7ce237f7ea314a111c50a1da4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.65-renovate-non-major-5a6ed3d1c2920ba7ce237f7ea314a111c50a1da4_1618580196494_0.5592365344227008","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.65":{"name":"@balena/jellyfish-client-sdk","version":"3.2.65","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.65","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b207ff84b16ec8f45943ed3e7e2160a07acdba9c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.65.tgz","fileCount":39,"integrity":"sha512-Ga6xDm2rrFE8c+aVzrinTcXFmIaNAsF8Z3lze/kimP23/PfgCIR02u3GTv/UH7EYJool7iZNkx/089FjDS99Bg==","signatures":[{"sig":"MEUCIByy7WWzYhGvkSyIHF5vT6L4g+7KMd/4vLq0ccZ04/DhAiEAjIGnkcO/2Tj2AotLw5gm6BjO9Ur90U5Oe6QxtqvjOJc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeZPLCRA9TVsSAnZWagAAyrkP/35y/1M/OL+QOqM0M0T0\ntKRbCH0alEf1lTWLoVxRISGrL6bZ1CxF/whaGHYzdO/t1VR8zT57uzKs5Dc3\nZ3cItakBraE5hQt3UHYZQWOiZMJAn0Rl/X/7mYFVw1ENWIYtyCD6/oXaBX22\nyNSYPxd7cYCeh7auhq+DFJo+690HbXOkz6N2rCQ77+v4NeEqDv1Iz1RTP4rJ\nyax2mzsq1ZcfzjeYk+m9v6xSkTMNMUzgJym0IemIqHyIr8JfIQfXfucRsppf\n5Q6qrwtkHmWVZYANvuRZ5dYa0DiEZuhSufRJV3AtqaII+W7LWbPvAFPRnvFn\nvE94RAiIu1NWLWWkQ5vRKYCsB7/OOfUaB9PKC7nJ/aIheUpBs22pHR5VhDsd\nSvrS1mXbdIm1oo5iCXfA6rPAx3O3dI+NgCWW4qPa2s1FXimBFw04SjsM8ifA\nrH8C1PzVK9zoLsWz5OVKvfLRGU6SZjGtsXr6k98HBSvxICw6GjLl2WXpCgDZ\nGg1Xuc1rGmr+pF02QwoktbT78KnLGObGZw/y+5SNFDr0gdSkJBKi7+vUj8xy\nPFmq83/hIQ6OMPn9zzqeLa2hWNKFuTUz6+vL6zUhcwAA6GT4A+cEnKBomwLW\nA/52+/orm8M4T2cje4hz5yDOlH/uCIhNgbQ88d54qoiY+i/pqge8Df7CaIXq\nPPbY\r\n=9cza\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"142336d67e26beedec36f871bda15f8c429a8d9b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.65_1618580427152_0.5102458333374194","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.66-renovate-major-socket-io-packages-1fcb4ed9108a10781e4c2b89c9f6ccd19ecc7d69":{"name":"@balena/jellyfish-client-sdk","version":"3.2.66-renovate-major-socket-io-packages-1fcb4ed9108a10781e4c2b89c9f6ccd19ecc7d69","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.66-renovate-major-socket-io-packages-1fcb4ed9108a10781e4c2b89c9f6ccd19ecc7d69","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dcf89fd5ead76882308c9fe3cddccb2cf9da889b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.66-renovate-major-socket-io-packages-1fcb4ed9108a10781e4c2b89c9f6ccd19ecc7d69.tgz","fileCount":39,"integrity":"sha512-iOH5gCFQQmZSn+DtMGdFhNPliRo6OHh3K8heFuwvDYOpXv92Hv53eQl5YFzyffTir/dE3s3+WQ9zLCt9XaBwJw==","signatures":[{"sig":"MEUCIHzVuaH+EvxFBUl2pcJ+aqG4882oAhC9m1/yi61K0SVzAiEA599WEMHu5DikcD4d5DV2wTpJ8gLKmfQS3saucCjo9PI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeZTGCRA9TVsSAnZWagAArWoP/36rYblqU2iI7R8ATUyu\nB1GDo9PsyizdXqmNqAOl15ZTOefjlSQhGdF5HKTKhUFxCTzRUnu9QtENtSt6\nYWouEPKIuBWYbXCI7f5JYLJ6fn0Vrlxq75qhaE/aoysy86sapKPy1XstB312\nQr9zsqy8YetVF+x7KBazYlrMO/VqNX+8etllivRw6EzMV18YgwiiXtMlbkK8\nNqn0gEdZblHn3WAvPs2e+cXos5I0wcoJcBB6Nq4G4O/NZbw7DGXA00XW0mD5\nCODyN482P4wiZAeQ9tlBhRjILF6N6aTpK9x58Yn8VLKGkm7M2NbglWLsBqWk\n0s1NZkMr05BONk816KJ8+eGdXABAZmBa7Jyqjvn/Adj4eA50SS6S1SQwyRUa\nVHmZzAlOTET/n9k3TxpOv2yfTfD7Mg6Fn16J/XQ8ruDb4VAf0Ff1/DjdaRxU\nroaqhW1sVEvu4UHhSoJFKui4O5I5fSwjJ08TtiKD6bSE4e0U3c4qD45PJ7WF\nY1qC+y0R1H3DZ1AwQROLVaF3WsP+ygFvh2TkCEC/J0J2wTQY4bkMIQAmS+Eg\nhqHXda88Cc8a1xfZ2NuNB7zpYR7+ZoeYojW+uQbFWYF7Wn33z2y4jiWk/ZUT\nxZCRPI0zlY4IWC4vGXxDeYi9fYbeckMhmCz1Eclqs3mPaN0PGZIESb1u8966\nEU8g\r\n=ih9d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1fcb4ed9108a10781e4c2b89c9f6ccd19ecc7d69","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.66-renovate-major-socket-io-packages-1fcb4ed9108a10781e4c2b89c9f6ccd19ecc7d69_1618580678247_0.3016391277570456","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.3.0-rmorillo24-minor-relatedpatterns-74c3722d9074b72a44619981a02c936f8b9e2570":{"name":"@balena/jellyfish-client-sdk","version":"3.3.0-rmorillo24-minor-relatedpatterns-74c3722d9074b72a44619981a02c936f8b9e2570","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.3.0-rmorillo24-minor-relatedpatterns-74c3722d9074b72a44619981a02c936f8b9e2570","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"afb7c88a77804299a2d2026a79a6de5d5f0d8cdc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.3.0-rmorillo24-minor-relatedpatterns-74c3722d9074b72a44619981a02c936f8b9e2570.tgz","fileCount":39,"integrity":"sha512-j120VqnJGkekOtSniN7J37oxt7d63DexRJ8315Zi3EPE4Lym1D6w1TYWfaO7/ESBqbUS3lzfujNYsXz7cpnC/g==","signatures":[{"sig":"MEUCIBcDUXJnvWBAergXKAuhdJHkglbjxt8PriIFa6PIsrmAAiEAjQQkkT9nFXgSzXLakLMuVw40VROCMf5C8ZkqIICe3q8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeZZhCRA9TVsSAnZWagAA0U8QAIPhHbQKiBz29Z4UaitC\nvwjOufTCGVhOlmqxn18xW3szUPX9s7JQS876lPW+AlPEQCd5gUPvyUbOLz0s\n6ubalOKVkbB67v1D/J/xZJ0BSefiZH+xXk6a2bckDj4giDxeScTTfPw6KoRw\nvQLwQAt33GA/CFDm+EOtixZAZiX1bzdtLMfm8/70Lrc5yjFLmqKCeXaPyv9g\n6Z6z/aoCetyJyXSqaXyrV86wD5OTFm9uwMssFFi4EW5sbqH3F8hjU4KMm3ji\nGWTSk2DewqjNlnmC3cN3FDnKxTFHIoXZzTJ2rcuqVTzjc8NH1/9gtEC9wFNn\ns4ypXi1E71nZ27zisZn4Y9nDVzDXNtf942HIJm5e6VrFcAWqzGBPnAyPcE7h\nhdv6l/FqlB1h6PUevmcTXW+iYrYhWBYjyN2JhNV50t9CaPgneUTdUaPmifN/\nwwvTQHWhWlqMLdcpHlIHvtFN4VRshoNEkTSrQs0pYAOwKDLBrlyLvCzIYWtB\ngUxTt1sQygOUBe/3tx5Z/vKvTn9znSBdTBou+P4Ml3EXHES2DYuk/eU2eoAx\n+0WwlofL6ZQqkkEYha5uYJ7IN+kP63l4Hw/P6eXR39+ngWpuuQld0+JvoNkL\n1OyNgEnibtIm0fppsOftHvdvCuK9JZdj41VpCweADaQD545VY0VRgPljrtUF\nwoHu\r\n=laRE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"74c3722d9074b72a44619981a02c936f8b9e2570","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.3.0-rmorillo24-minor-relatedpatterns-74c3722d9074b72a44619981a02c936f8b9e2570_1618581089186_0.20985813841558798","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.66-renovate-non-major-83bf5b9a3f695cc54541520aed35bb0e7f40cbed":{"name":"@balena/jellyfish-client-sdk","version":"3.2.66-renovate-non-major-83bf5b9a3f695cc54541520aed35bb0e7f40cbed","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.66-renovate-non-major-83bf5b9a3f695cc54541520aed35bb0e7f40cbed","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"eba7fcbb74b3353b509fa7119a6c766a5afbaa91","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.66-renovate-non-major-83bf5b9a3f695cc54541520aed35bb0e7f40cbed.tgz","fileCount":39,"integrity":"sha512-pVUj8+jckEnaG0PDhKFihVUaWfgDan9wtJ6aYq5JheXEC3OVgiCQ6RS3qV0gieWWdQI3fiNFM0P0JL4RGZeomw==","signatures":[{"sig":"MEUCIQCsXdF9QnZgxQFLVyn0nl8gMGPVn1LirSuJikM8l8M+qQIgVOyAtCY5mENeE5haCKqAHG+zpgiGkdPPSEAba3i/50I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgebPlCRA9TVsSAnZWagAAnjAP/15ASdZvw3LLTPgjI85p\nVcDk1nJQ+/3klS4tgkkLRsL/hBwuYUok1wJWn0XOZm56OHLO6vuRHdnliGQh\nz6PgnYhu3nmrpBFXUHU8AvV+mMc94ANZjv6rJamFWET10f2zgRWDsgM5vOBo\ntQ4b2sh+zG2F/QSr5W6Euk1ZkBa84L1GyIyzQGAyMPcIF0VRa+KwVAGKrDdS\nYqHeSV9CG9BXWPQo81Ins3rHjq8AmWXioSUQmZvkvmZgH35L9O60NQrol5c4\n97ihD56KsKG00Yt6bBL6O/cdY37JL69dQVMcx677OSZmhZ+k0Him+DiTDRu1\nVl9VZFo6cOtOvB4zDe/BxwDvTrgwlTRmTwMQoZBiIygqQIlfWFf29USIGsWe\nSVBk9ASRxK0vZ23wLzP+ArR8EqJtABEJlB508hmVnLqkDYJc8eccwY9DF3hg\nVsAluOozSvwGo57dCUEDNkxwCOclO2vtc7SiI/3uqeTW7hT5gDqFmnIKjWgb\nY9rh2sY9+pc1VcwU977Q8MYmEWD4irrzMrUvRvcgl+J23bcJcpoJ2Adk4GQE\n7WW5S9e7cGiMTtvRS7a3GgaJvmv5JSxcqLjCujx0mqOjCc43bC3pu5lJUqNY\n2z2TPINurC0IHGGv6YHFjyyDWXFY8lXWq9DlaBmoL8t7jy1Z+p2knEemk6bR\nlhS8\r\n=3qYL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"83bf5b9a3f695cc54541520aed35bb0e7f40cbed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.66-renovate-non-major-83bf5b9a3f695cc54541520aed35bb0e7f40cbed_1618588645121_0.19317659908937856","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.66":{"name":"@balena/jellyfish-client-sdk","version":"3.2.66","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.66","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a76341ebfb313c714b90daa2650ee8058067936","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.66.tgz","fileCount":39,"integrity":"sha512-I6WtvZFUUKDE4YVH9tP9GZsFtSItSbJnA2I0dN4V9lit/L2Lf3mbt5hhifFaggZFCjnYGnEx5VFl1sh3znBYkQ==","signatures":[{"sig":"MEUCIQCcA5JOEafFvSuG1KbfVadglXEfRUh+LPSLWZTirPHi+AIgXiXd4fCV+Zv8Z+SRt1qt4hspUPJVI35mtq0ejjC79nk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgebSYCRA9TVsSAnZWagAAuiAQAKM+ozojw95IHMI8uGIr\nEMlXDMtbNJmBIVh1rY4fkIHQ28hi6SzCg2rzqu9WGgRhRgdqG/Bew1X7sZGS\niy/z3g2tjFZm48O64DwyDtEP1dgzPXBPzZr6N9KN6VjK1DJZxaerCjPT73oZ\n9b/mfZZw7mp7YZBXpFU5cpKbUa6d+ewUDBJUxgKCQMp2chLjjCK0fFg40s+h\nmJoJcO8e1Fwl2ROO8EUgbRcbDkre8YHOEcNdQZQqXtIjirc663CaqeyKP2rF\ntAm6PVkIlOsliUM8p0CNeRx8I+L4gHdNab7TW3uHEjNYf58IorVuPuY68Tgv\nsREqeSkaULNPhRx9/e0ppPnweXuPG8HDyc4M6Ro1eim0MLby+IKrLFLhRi3m\nT3YQ9XY+Mv8EgxObiPzOaZpU4psAidR+DG8fQ31PiJ3giCRUgFXqMQ/hjSvB\neQV3cAAvFanCp056rIlYjXLcIfwJVTE/oOTvfGuxtQXcTpdSLhg5VCFteNNN\neaOczguI9icKy6/0Ngl3KWb99i5zj3TrlQ9s9Jozf4v9OmIoaSTd+9qzSpOs\np2LBOxKEX4EV025TX9/RwNIyW8oFfHI/oxBvrFdbZ/LEkMSxx9Mldb7+vZDq\n7WUBGYeDb51pfTAX2iDTuSE7VTR+s/C+vyUQ670ashG+H0rAHltlcbVWoRJf\nq258\r\n=OEyi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6ce114158ea775efdc11d2679c85e50756c2d951","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.66_1618588823866_0.6352953058305071","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.67-renovate-major-socket-io-packages-aab30aeb656b9d604d103227363a0a359555eefa":{"name":"@balena/jellyfish-client-sdk","version":"3.2.67-renovate-major-socket-io-packages-aab30aeb656b9d604d103227363a0a359555eefa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.67-renovate-major-socket-io-packages-aab30aeb656b9d604d103227363a0a359555eefa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b342c97f27f9a337fd0ba5e66191c75e503087e9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.67-renovate-major-socket-io-packages-aab30aeb656b9d604d103227363a0a359555eefa.tgz","fileCount":39,"integrity":"sha512-K8oQicgLGxmVkqxHY5/15YvljaELliljTkNIGUIQzH0fSQTO+cqd8AQo9t/tM9tB/zJxsoSWt4xXxyg/qwHWxA==","signatures":[{"sig":"MEYCIQDPZ5whsvpsC5/A9PwDkN2Y1jYo/OAJQSPHd0wlT2huaAIhAOSft/NIyPyilNw63EKB07aPRuD3Q9CaavU7h9Fjhjb3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgebWRCRA9TVsSAnZWagAA/GQP/0P00bZevXKT9GGSE2ci\nZzp7Zqh9bquVd64I2nrEUA4WYZy1JUciCel+u/QI22+affe2nz9Qr3cLeny3\nnV73rLNyNnTC6lXKZijzUaGbvCNwP1zqFdtVN+ScoJhVix/rxxG3vRqSZFPJ\nQFJYZqqxr/IyWlrIIyg1atxNNHkr6+SHZQxjxSiUtLjq3mNb4EclYTuQdXce\n2WHckJ0BY0orpV8jVMXPzuajA9CPM5BYIAKQJXTGFLCKz0+sae7fjsRNMGlL\nrqjsSVbQYfdqAHxJ7qu6g/BfMweRLDIyFNO5yfF4n66Ms//71JuWh0A5fuVW\nXu1RLnOMlWR/dbScCuK60kTmAtBgenN/J+PIm8SlDVwXxQ30vZILpW2oNEKu\nnFna0XNNs6a41YZNln2NmmpsUrKceeDeLy+2u9BYVG6cHnBs0rW2H1hRaFG1\ncZQvOS4XisBE5zo+qfSZRYd1VfjyBsZG9tBI1TcwXtmIfMnyHjnK8ZcTP0iT\nv7WlWcY7q5mkL5E2qKKRA65dUQGXlScRAMI6lEZZQETVF/8e9JUTuBwV+IM/\nm5j3+kMZmEBd+EAJxtwpTDHW7dNUJ9GtFC19BeptR3Yft7J0aV26YtcATOVG\nD6Bmkf5vgXL/dmlpdENttGlD/jkoChf4eZybroPjx620HFNRFqWNwQyCCh7j\nTAPV\r\n=lqp4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aab30aeb656b9d604d103227363a0a359555eefa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.67-renovate-major-socket-io-packages-aab30aeb656b9d604d103227363a0a359555eefa_1618589072694_0.9539837898997876","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.67-renovate-non-major-97713b40592047a58e7e274e2a7a2016382b8df4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.67-renovate-non-major-97713b40592047a58e7e274e2a7a2016382b8df4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.67-renovate-non-major-97713b40592047a58e7e274e2a7a2016382b8df4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9678aace44496a72dfc8751acba5463b56a5a388","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.67-renovate-non-major-97713b40592047a58e7e274e2a7a2016382b8df4.tgz","fileCount":39,"integrity":"sha512-dzv4qw6J5AatY5GqDnATqQtkgt0hiICoFPTJ1AP/dYZLbZV5XXBPR8qKriMZB1FfoIb6tXO1qtCqKVLhtqaTEg==","signatures":[{"sig":"MEYCIQDrKqtKB8BMTD10I0brs/LvzaagMdtA4LjP1IYPsQVbIQIhAMceAtPohv7FOovPH6s7DrYEAX3shahKq4Om2ly324O1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgedrdCRA9TVsSAnZWagAAmSsQAJX76YV65r88ZdKLoNWz\n5ILne6Ma3XEMDwyF9w/zDRDd1QQ982kXk0jIl6Q9b1fHcLsdLpEHJcL9c0be\nMZnNXEm6Taauezn1HlcNjLq18qBlIoSN2VqDlUGHZ8+A4G/Vjf7F6kRZAgwQ\nQhGmhvqzY02WhmMkDX/BzdChDvxdsGbpWT/ymKswMYfGyq4EQyB5pRF5aCpf\ngh+ELbvLvFKVLbS9rZDuxlFVGSV8JSLTLEmmDmwyqXNsC3sv8fwYiuhhgqVC\nCwT9TCrUkZ2tImsE5wArUlusF6V/53acbcobNUqtxEnv3eVVpmYYNz/nT8wB\nFAnENu5pG5tLhelwMHcGPZUvbZEYZgY3FJAy0Zu+wFqa8NSFGdhYAunqpIsy\nLJ3HFCrAbwQg7KIlDZzeHDWaZqKo8Fs0WfM+k2F1bZDQXZXdteNKJvM8RQvL\nwYWc8spbDdlupslac1duhpzT9tvkGA3HujDSoeTO8qsm7WOj9H5hrYsF2Dmn\nZz3UF/yxfcxySTREbwR5XYL7k3P+WbA+cJczTs2HHGp40ELbHtyFWhBZMUd2\nc64FHO2eIlY7iCQp20Snx3iiTE0YOOmNC0FwXwPsSo2g+pzlV+95Yvq0Y5QW\ngnNYeqiBNBfgH/rpp+yq1tBV9Lyyn3ixy6tdm+QzeNxrYhuwQWBewgi5z5+S\nEcsp\r\n=eUAB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"97713b40592047a58e7e274e2a7a2016382b8df4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.12","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.67-renovate-non-major-97713b40592047a58e7e274e2a7a2016382b8df4_1618598621230_0.21567182557692632","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.67":{"name":"@balena/jellyfish-client-sdk","version":"3.2.67","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.67","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ee28a585bb28c0c44659d54cb696facb558ea106","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.67.tgz","fileCount":39,"integrity":"sha512-jl10I1GBlZnAMx4J/wicKbqjMOZ9CrqWOpGcw0whFQhGWAy4maQPPJOp++yRX72YNX39NbSaOlIGu7hW8OgMdQ==","signatures":[{"sig":"MEUCIQD5UGOJJpMFMh/KWMpCQHqGl9vguhMLITFLuazONsO/ewIgGSj2zPSp11w9cQRMeWkc8jpDrkfLYAg//Imf93ZMw+0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgedueCRA9TVsSAnZWagAADsAQAKHAEVIxHR1hmidaTJq2\nxJGfAwSIc04cURTw1AmS0uDbsPKkpWlMGWHwcPD8Ow3INjkQydIbGicXjorW\nd1z/XnFtRH4UWUXeKxP0SaC7VUFOxxzKcu7hKkp0IoryUc6Xj2gDw9G5Ir4z\nW5/YAIFhdZM/kCFug/GDEaxp4IiGYZYN8u4a4sJKTYJhsKcMfacBK7I3C8h3\ngeMaqMvr2TqgzsS8za6pYiMH/E6GcYqVK35m3t68ANXLkkAVBIhkrujaIEpP\n2RttInvcHngzX0cz+9su2N1QIM5GfkofEvd63El3GqwQs4nvxy1rbr8O/Uim\nS5pMYl8qo2Lm8sIPrTtUKsgzrN4JF6QTGT8HK2JT0Id5XfwTLEEaUKEzDOVF\nMtI23OcQXUY9cWtAKZ+5rLwiBmkXUTgufa+/Aq7desC2pJqb5HuNKNtbRyA9\nFZbx/SXcVH9flAr5Ic3EcTt21tc8ZMChDoWXjCccnMGCdqhZ+/vLZm7Bq/CD\nefqlzbGFe0JtTlMVKbnIe0qGDXhfb+Va7hlR6LORy9b7KyUp/asfkXVjEJVk\nFRgWamQm89Z89LH+XMp+wh9SDKvV0ZBCOSQOKe0JnS5cMiAPFGVvWVTnjcQT\nv0rRph6xqzi3qhj548gBUfYjCBjx4W74VOKe0pqBGizISc1Mjl6K3vtrzbm3\nhpi+\r\n=aG3L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5781cff9c9a51e6c1dc82252370529e5e58368d7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.12","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.67_1618598813904_0.6277370310932047","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.68-renovate-major-socket-io-packages-00be5f94bf8d902ac292da4dd7a13a944921eac4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.68-renovate-major-socket-io-packages-00be5f94bf8d902ac292da4dd7a13a944921eac4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.68-renovate-major-socket-io-packages-00be5f94bf8d902ac292da4dd7a13a944921eac4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cfc6b6274ab89b8e94d41fd28684399b74c588c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.68-renovate-major-socket-io-packages-00be5f94bf8d902ac292da4dd7a13a944921eac4.tgz","fileCount":39,"integrity":"sha512-sYw9IO2zq7qmyIy4hqUdFINquBNaaVn7NND2EeRAAZDNnD032mY5LulXR73wyAUjdZmRhG2fTWcdguyKSAKTfA==","signatures":[{"sig":"MEUCIQCJ5ikhdTO90MQHz1ULugdQWGFlvKY+1GHbEhaoG80mzgIgHLVXZFzTesjFwUJ5okC0Hi9pUtrzpF+maUfYIKPBQ6Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgedx6CRA9TVsSAnZWagAAMNQP/AjhjsAQsll9x7MUXkIT\nGSSOnI3/viQZgDCIYrfx+s99PqnL3dUoWfOkrb7Kvf86+/Gtt9CdmtRNPJKr\n3slYlCxmgPBHqagu6GmhOFFVGq811sKHz3tWDYcfvt7rHFEraf0e6AzPmM2W\nC5r+jg8FDcbhSTOG83en+6rEbjwF8fqT6+Ph5zynr1aOplmbZ4w5Mhc72jx0\nAnyALutbBiprJOhBjDFWFFObMs7EDK7mutGNB0MWbJZOt7ruKetuXBc6JT3I\nwjcC8o7O/78iDd0SfAE6C1rZYTwv/pMp+aMyP5vWhJ+mScNiCYik9I/cdCVv\ntLLo/YOoBCQ6KhshaHywLSpQ4KNlo0QAzs2RbCw11bOTqztORqQsUQg0VE1r\nu4dMsq+ZXbSvFmzg9abTSk7FPnHn4LPH+7Couieh3/q9ZZds+lioL5/qdX7P\nYQtEswD3dlkDQuX9d/E6mvL+dH8lfWLvuUykjxZmnoDhlXGJBXJmIxgbXnkP\nqhOT3Ovx80BzXbr5vZAdA8y3es+h4CYGkysxHH79BCFVHgx0QAwui5CGmRVD\ncp9pYVowmncehoB+I1jJHar9EMVnv2x4fBUI+pstDbgayyZqWlzbMbn3pkim\n6vHIf2nBTDJ4eq2QfSnNmLF6M18JWvmimQGxTKjsF/5p9CCL3g+5dCOY3f+A\nNodb\r\n=t9eB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"00be5f94bf8d902ac292da4dd7a13a944921eac4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.12","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.68-renovate-major-socket-io-packages-00be5f94bf8d902ac292da4dd7a13a944921eac4_1618599033887_0.7406209749824142","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.68-renovate-non-major-10fdf9a145e5a949bda7f203c82a9c4b58e83ce6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.68-renovate-non-major-10fdf9a145e5a949bda7f203c82a9c4b58e83ce6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.68-renovate-non-major-10fdf9a145e5a949bda7f203c82a9c4b58e83ce6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7302c0f731d2fa5b2e96af011f9097dd65074ab7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.68-renovate-non-major-10fdf9a145e5a949bda7f203c82a9c4b58e83ce6.tgz","fileCount":39,"integrity":"sha512-rxhkpCAf5HIWNSmBLJYvUq+sRJRV35kK5z/W8+A+3sVu1+vei/8lPI65dR/qIF7b9Hmr+no/jOTN9C7CyTfQZg==","signatures":[{"sig":"MEQCICWKqDR7a3LPykaF2NDrwBVMD+eqspX2uTpwCa+xsdfOAiBMERpxWQiHLCZwM/gIQbh1m80BsRvP9AY9VvHzSTLWZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgehg7CRA9TVsSAnZWagAAr9MP/RbUJK3jtpFnF4b+YeMJ\nI4rhlqH2L6bgjUZNfuMPetxJKNKPn3R1oAcOJzXj+mX/5u9oNFa8UfIWk+Sb\nYDbzgR+jozTPX4yRaWsmDsWwMQ+4YAW4yqFTQQDMDaCjyCl3CGIXq0T6Qe4O\nVbKPyykIbo4NpsdKZV9rulHkSNfCD4QVt3ijh4E7PzHpC/J3A9tNI6B+sDVr\nAgwo7hlLgHmUuq6LLSrmj4q07VYungD0pZbEE5J8nKdptKo35NcB92gvo6IV\nN6HFIxrf1V00f7HQY+lVYRhC/OMlJviHBvsfnu5yoEaYq880iJ5BJSqK0N1l\ngyIBA7i1JGKEHQ5/oZ0gz0PpjksCSRg3IXrHFp+1t09fM7zjcjai0YCUUCZi\nrMtiEkjPhIyTH36RtdccdZ1hmkKkR85AL/yEZdXfxQ6d2yt2VtNzvEv+7W+S\nOE6tgBVyihQq1b8AwNDSWa5P4eT4b1Q9SpQO3nSjN5dGrThKgTrzzz3ygViK\nIkdtZrYYRZIzIWL8FOhCmplD3NZ+RudRpZSnek8yLCfUAx35joZ23+ktcDYi\nT5ixPEhL8um2ahXFDjRFkILR9nrpkTGavo0ruLHO4XqBXWLl3wYe2wy1bQRE\nJEMcgKuxByfzpDP0/SO+8Wog9FGim2a+SqtzAI3HAPKeKh3NlRX3vlE+QZG3\nXj+t\r\n=gTwz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"10fdf9a145e5a949bda7f203c82a9c4b58e83ce6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.13","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.68-renovate-non-major-10fdf9a145e5a949bda7f203c82a9c4b58e83ce6_1618614331328_0.11514429093356915","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.68":{"name":"@balena/jellyfish-client-sdk","version":"3.2.68","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.68","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e770108c7de8d4fa1ff2a15f10396b7be969c003","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.68.tgz","fileCount":39,"integrity":"sha512-Y5nUrnsM/iocQgJrbEH+vEtCBksYCtJNPY98aGK0EzSnU2lS8T9AAaaEqcQkfXuCFrUu71Yb0kj8XDAH4k6eJw==","signatures":[{"sig":"MEUCIQDEXtshxGWvztRaOnM/ZNFlIe3JpRG1bY6TLyusZDfKRQIgCKNjqeoMjzyHQ/bJekPffk0NO1TpzSJ6c3I6Kj3a9qs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":235915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgehkUCRA9TVsSAnZWagAAIc4QAIX37l6iSZnkPRZbPonx\nvh7gWUDaFOC8gd5+iDtt73lGg+cPWdWIAAEoHByLxZmWKwm+NGEfTTdvBhIw\ni8NsfHJf8ifxOm6cI7iboEWm0Cofl7saRsAddcK3VcwYrh//5kCbL00RYx7Q\nfsoCLeEzM8H6/6WOVxBMjaoM77xXhTbD/0KiOij0WByH2Tk9pivJlIxxqkms\n9U84H/WU3ILSaw2axn2zO9dcEIO23RlrrlkxlpUA/GoIx3Ezot6s12DNqeEg\nHhuQGjvqKCkeCB0izEY3c9EDtm9GAC0E4yB0smOZiH0h/akQZLCa8TM0LrjU\niydHq3JQ1HWwBhOQHEJ/mtumkPBPJMENMfIj7n/VHpL+qnkGneFUrEDTdLF1\nQrh0BsSTFllpHhuKRCVi4XyRKNMEatNnATsMGDF5jfI9MxlbU/IRaLwXXXo9\nXZv0NY/o0By/SH8oIzoCkLM3qzXOIte4He/w/zZJ3PUM83HzY2rpKXoAiAKW\nMSoDMn6Tfy3wNL68zoyGNS+SZ1GqvxtdiV0/jQqKBCAX+s6y66QI5C5+xG9N\n8soD4QJMDp1sdiNaiBHg32NwaZOiIzvKVlCd1cnOokd7xj3tWCAJQJYTo6jX\nmTNBRfSO/vAMMJwriZ4+IH/nATEpPKPKWB4nZaxXnLWALjSmYf+a4GNNCT/k\nIFJx\r\n=k9+/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ea11530a8d816b02c52247a4f9e405a08ae6e989","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.13","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.68_1618614548413_0.7271288733336225","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.69-renovate-major-socket-io-packages-f23c443e24014cb70eaee5934bce2432ad4ccea7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.69-renovate-major-socket-io-packages-f23c443e24014cb70eaee5934bce2432ad4ccea7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.69-renovate-major-socket-io-packages-f23c443e24014cb70eaee5934bce2432ad4ccea7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8f372be53c226adf55d663e329f0ba48611423d5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.69-renovate-major-socket-io-packages-f23c443e24014cb70eaee5934bce2432ad4ccea7.tgz","fileCount":39,"integrity":"sha512-F1L0hPUlxzn8/CbhOXOrnFFQnDCbuGNd8TFCoQgCOnBRAZ4exA1eDQVjJCv2GOYg9knuJtkFlZIoDOscjYqrKA==","signatures":[{"sig":"MEUCIQC9i+1lXVdI0vuY5Aburf/aId91iblOgd0DIFufmjqdGAIgFOJ/fJG6poogGFlPIHhT7k+JcigjQQ6wCNNVcO/ZA8k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgehmsCRA9TVsSAnZWagAAm1EQAJhhIOl57Ke8DpLxE/Mi\nHYPjoG1VtKqNrc2m+F1MrZqityeESMg6sT68O2O9DeA6YbBSF4117zbovOce\nLE4Iei3EP0EO8hFB7Dlp/wkmhFD7OLapgFQa8TxEhvgTuRc0rfu8e0Cy0rVN\n3w4isTAfsphxEu69rFJSeY3x6BSN6eJ9itZ+VmmmZbnq95jCpgEuGwSpSxNu\nn1rsXT+VaxNZzwr+Dmwl7H0g13ShKRKYb34ycMRe+Yq6OabjoTrU/9AZmajd\n40muB5TIGySXg8Kyz5CyOOTOCHB/lQqFYLzJGrl3er9PK6BYw1MRmpDKaOGP\npE+8RHGefL1L/8JhyxK5SIGDpWtCNsKVuUkelwGfmZ09NtncuHcfwODa2UM2\nmMvkwhelu7biXOElgWwSLHa46rtVaJ7lF0gsIx2AXgEAdN/v/tOixZUH6KA9\njmlcp20HfNkszEQRLg60SZJXAmLl+tqW3Iul86wS2cZn/FyrawMVLPs86Nyh\nTQCK7/0AvAqsI6blvrvvlFDLbBfkQpl4RFw7GDruPfMz5yZKP+dTIm14tlKm\nhXw0k7Uci/4bZ01k+RS1hXVrSyuzWLSTiVizMg3pGIGLdPCLKnFRTljmKM6b\ndIhuc68L0HeT1h4prki5m4FZap+488SdRKsb5j7xW0gPkX3utL3e3bdGvcU+\nbsxI\r\n=BGox\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f23c443e24014cb70eaee5934bce2432ad4ccea7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.13","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.69-renovate-major-socket-io-packages-f23c443e24014cb70eaee5934bce2432ad4ccea7_1618614699936_0.6025185138976412","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.69-renovate-non-major-0cb5240885a1e0f7f6988ef2cf8a9830c69e5390":{"name":"@balena/jellyfish-client-sdk","version":"3.2.69-renovate-non-major-0cb5240885a1e0f7f6988ef2cf8a9830c69e5390","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.69-renovate-non-major-0cb5240885a1e0f7f6988ef2cf8a9830c69e5390","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"465541537cbcad1e719b5efc294a74b1bae0faec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.69-renovate-non-major-0cb5240885a1e0f7f6988ef2cf8a9830c69e5390.tgz","fileCount":39,"integrity":"sha512-UQIb66UqgovDMl/c3UVUscwPNr2UO+IfgZ39+Nkgm2Sus+46mgISFBqSf6yOF7HyYw73qmHYiwsvBmKZ5V8nZw==","signatures":[{"sig":"MEYCIQDdU35UiF6QpwHt1e4EXSbv1Kbwn+EFy81NVmbs+AKomgIhAJlyEd9iN8fFJ/RPBOStlNHWEeaDAZO5D3o6z3hTAmwa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgekSxCRA9TVsSAnZWagAAB5AQAKF/b3jQR4DRs0w2QvHF\noaYTPXBcAm/G5SKo+p8DozqjehKcLS6cMScAIcW4ADy+kM50w9w/Dc58ya81\nNpqgumKtWu8+bMJMcd9AVcDP+Is8n3NMLyks0C+VOqyyvj+JUqtKK3KvFFxj\ndCrfKxxMohioXRUHnvLqxn61LSKUTFpQTvwfMQYZWuRxAugA5RcMW1DlnqIa\nSFM4jk/kXJYyX/g+4u3AEOlkIcfCU2A56Szu41nnA/2ww5tE9mZKd6YWpihr\nGNZ9yvwCwPuYlGT0D4XLeDRe9IQ7mbHt2hHpjj8xWJ3IMYUMELzGqALptRec\nW1X0CkKyZGtEeAJCWsPehACYtLHo85Dh4aPg3FRQwCOoSTrg+asmBeSGiOUR\ntlqRZwWxV6Kjd04jWPd3OTc9nFO9isKY8c8VdpF4qVRtwGXMOmhOCweupBys\nNZw4i6GhjdOFc8+XQoWGKwTj6dskHWUiSfmn/qLgghWj7rlerugiC3FD4sD3\n/a3QDDJD/ij6jHNvszP3Jz/BdqglZwjkFZh22JOVk7uM980/+YZGZSgb9Lim\n5ao0VBQbZyo8y/np8jgGgc0nlbbhGN1WQpPwt2YpZIbCCdaTrnjRZnd+4Lhn\nElnfbL66+5DQUS1nam2YeruM9jngv+v9xbfsKv0mD4SSIVm2H9XUWXQqzUmR\ngmO5\r\n=KzIu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0cb5240885a1e0f7f6988ef2cf8a9830c69e5390","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.14","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.69-renovate-non-major-0cb5240885a1e0f7f6988ef2cf8a9830c69e5390_1618625712675_0.26616177011498565","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.69":{"name":"@balena/jellyfish-client-sdk","version":"3.2.69","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.69","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f4ea1697eb51db658741121d7595e2811ca8a00c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.69.tgz","fileCount":39,"integrity":"sha512-dD98eJu3Lfsg2kHc3xA/jt2IWd7w2ECpPYSDnHiWPP9u09WBS2lb0xOrkxiJXupeDJBwpedpQjcKs4sI1bseFQ==","signatures":[{"sig":"MEQCICuoFJB2T6N43X78AsAetGFD+qw/Vgsr6FM95UKAO4aBAiBMrAy7iv7NFuKB3bJk9zhvQKPDOsAlRuz7J25BK/qPeA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgekWJCRA9TVsSAnZWagAA/x4QAJH4zQA9zPcmWn+rFEw8\nB8Mx5ZzfrUVEtzgK5R8Dn+d09P2xC8RZsZefsdy3fmwlWTKciuUqwdnXrk91\n9n5JOtyumJ8fkiG50DbWccwfoujDqR4PO2iImjQW0O6emw5m7r9GvElTQPCI\n6v25yK/azrI20dNr4Wo/FSmeE81oeN8qf5bTjnyg+6MFNR3V63CpW2WUmS0t\nBgnVud/WM02rBDV+RKPeO3kL1oMDwXEtgkIzrJtanmenKbuKnNZxQjIfGWjN\nwp1W6nX0wsSj9n7I9oQz3d5ZMDm/vojtRUX02SPxUsKDtyCK4N7GafXdNx42\nCQavam62ydSQpNWSr/eBvVXRFw1wSqxD3v1gLVRMuqc4VHd+xUQO77bHXeaP\nROF9fZO0Fmq/6GV3xY7zOdW9wyr5x9HckVKujaOI8b6srYicNukTEtw53xuW\nDBsGbf4Z60h+ZkV1lfuO9Cht/+KfNpUe3a72TrplS4nIOIwufXuOU16VDLr8\nZhEr3M1jvgF29r8+pq/wvvsoPl7+fh/d0la6XucYLrBxCSa+B7Nn8h4EXD9k\nMGf6bsyY4tRGMu4eD3zyZX6/OXScQu0lQmqN0ANF/HUmsiiIU96iXbhzCdv1\nlmskvVgT08/rVZj3zSznP0IxDwEfowK0mLY+x88EKjBsNJGFC24zX+Cs1Jy0\nL2YC\r\n=Bd9s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d4653490b65b13121104adf2100e0ab3bfa6f32e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.14","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.69_1618625929318_0.7133994297018658","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.70-renovate-major-socket-io-packages-45b19dbf020e29e8e3cfa3182dad5ad6cfbb6cb7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.70-renovate-major-socket-io-packages-45b19dbf020e29e8e3cfa3182dad5ad6cfbb6cb7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.70-renovate-major-socket-io-packages-45b19dbf020e29e8e3cfa3182dad5ad6cfbb6cb7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2bd5e37a3a77069b5a60233e64af3aee4043bdee","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.70-renovate-major-socket-io-packages-45b19dbf020e29e8e3cfa3182dad5ad6cfbb6cb7.tgz","fileCount":39,"integrity":"sha512-7dZMGH04Wr6kB0URKejeHBSTWPu2knuLyzaUXsjLixJmMF3p4nAxPwfo8jFepft26OFIUfo+n8kvk6EXAlrDtw==","signatures":[{"sig":"MEYCIQCdtI0BPAUxl8YDGAw4QR14daI3t4U4L08hwa8zTvdsIAIhAPwzew39cO3JM0zS22CA5wCLqkszid8Hphn4ef41sMlf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgekZaCRA9TVsSAnZWagAAnWoP/0TCt2cn+XfI8+EVJiV2\ne1Ad4oKRjt/Of9XHbjCKf2OVOe8sNr21re7t39KIFU0EhtPLSYJN/Vk2vfPk\no9FOIw4jnytItYLSVXFfA1tWOBgD6eCb2Yb87fNnda7bTsWmOo8vjP1agzxa\nnRCzJkI/17cDpVz7Yo2SkgmAvtfd8C6H4O1G3FYJhG+wC6x3TEEW/VAe/XZ1\npvxXbCv3gks8MJv011etFUXkJWzlkICFq9M+vPEM0VspsiHuun7igG3Ulm6P\nTnT3S18/t40Ri1Je7idjjuIV29I5ilUWzR/FH3E6RaI72BFJcWGiNTo2psSU\nNaKaoWmNjRy13RXUEK1JNwRXPp3GIkfhaHEMeD2fBZe1eHgiBEDfOlMZqkMD\nX0YTsgklrOOKW0hW99y7DqOS1hNisrZ5cvCCxmWQduqPLhUddIX0N1iXQmZv\nPfYL4cZPZ7Z1bzjn1+d+AHltZQsPRxfLzudL/tNfaK83EuzFPkahYlQMG5py\nCncyz+cExC3uTr/m+ONWh1Az1EhfHgFa/vIMK+e6uzIjaTR2LS1NmEO16gUq\n7uoLOWizAsSCf3lHciNbQzZA8WIpm2jIgXjdyqNteFvCi0yRDVDZmeDRh2XZ\ndqBPTFmfYLLplbE+frCojxeYS/nVlAdK9SIGwAbJeDj9rtxShUm+4oAgbG65\n1lhm\r\n=s/0Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"45b19dbf020e29e8e3cfa3182dad5ad6cfbb6cb7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.14","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.70-renovate-major-socket-io-packages-45b19dbf020e29e8e3cfa3182dad5ad6cfbb6cb7_1618626138486_0.4210240011399551","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.70-renovate-non-major-36ed4265adddc2ba159144c7050114c90350f8e4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.70-renovate-non-major-36ed4265adddc2ba159144c7050114c90350f8e4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.70-renovate-non-major-36ed4265adddc2ba159144c7050114c90350f8e4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c7fc3b9878e2e3d76b97014cfe350f0125b2f5f2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.70-renovate-non-major-36ed4265adddc2ba159144c7050114c90350f8e4.tgz","fileCount":39,"integrity":"sha512-T+vBeFXtMUutgDQ5jpfQbm/TiAg+bdsyvzMQG/AHKC/W3fNLRzouIpCtKw/uyMAibHaoJkdDyLpD9JBw29XG7g==","signatures":[{"sig":"MEYCIQD6TiGzS2gfLsaxLwCnw1a6QzzAiaUpZx9Gm5C2u/CTwwIhALK8pW3Q/PQQSpI1zT60FXF8rWD3/nNJvTmEG9wR5YYy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgemvYCRA9TVsSAnZWagAAUt8P/3lRVKuNLsF7mWicvBFg\nQVKFyLEFIhee1gpskVRu/wxHvsdV1MHmnSCHWG4Fmt/dlAheOCy2/Zjszhli\njH5A8v/dIKtroO0zGBKx/8JfwZTwRWyg0EqdU8k8PBAwt+KOXsYroS+umcJG\nYvaQbaVRfz97upr1bCx0sNQaOSduxnU9/wb7Nd7wmVGZoIz29bm40jle6IYa\nqVc+X1PsgC3DRtWGELZ0DnTjStAZx17jSDErKbRLXs7KdJ8bChuv0uWHh7PB\nLXA2Yia76s1orVcH1LAVFXAjM8qgxb+UKfOr7nNnELmuQKMIr/LdXyrkF1PR\nINqlkiVtjN02AWt6lR2w0l8UixBpSoty+iFp6fteaFfScRHiQKlVsU5KH9FA\nqtZQFtuaygleH8T2mZzx8rrHuy2xd1GT6jKmHVggpa2JMqhq1ng0njCGGMWp\npMlxedsA1R22PWMPHWloigQUN6umJgsmf6m9Ek/F6tJvZOG3l9BT0NUiOP0/\nd5gYuwBn0aImS5G33ZmzEgis5ISo+flfeBDtLWrHo6ssiTb12lF0yJW4OhKa\nKNn65jA7ExwXwwSz6h9W5y7Me1wBjU+nR22V8EeANbEJgdslLMCm4l4R1/fJ\nr+HsfsfyHo8glCvNoVqLP131sAIbWkyT+2cR3CltuZVtANu/lYN9g4wiuQxI\nmbK+\r\n=kQWQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"36ed4265adddc2ba159144c7050114c90350f8e4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.15","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.70-renovate-non-major-36ed4265adddc2ba159144c7050114c90350f8e4_1618635736331_0.392748403737897","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.70":{"name":"@balena/jellyfish-client-sdk","version":"3.2.70","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.70","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d357247a6ffefb4c46ce5d0a0984c8cc75e20b89","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.70.tgz","fileCount":39,"integrity":"sha512-YbBt4Y8BpVm0dnNpA6m7CtHmFiU/ceZ2Shu8WGIYCRDCjkHfOq39lPpGbYiKXHL5m8yGj9o9RTQQbYQK2hnyqA==","signatures":[{"sig":"MEUCID9wZcxPYT7htJ2nDn+eLwwJf/ffux6O6AxgzyAl61k7AiEAg/O9h1oJTzTfCHHg7gGc4sLgnfYK0nf0/yTjeBn1phQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgemzgCRA9TVsSAnZWagAA1L8P/jZF3XGErGDp7W5+/PW/\nxbLAeG7Tplmogg7/XNSUEmtDq4mm6bLus3ETKRRVj09/Sxt3G8kbfAW9yk8w\nt365JLuZFlt7WRpEDQbNYvwBrar6+YE3PYh0NrPXD2dcM0/qYRgcJc+V9Sp8\nJgpSofb2cIzTKKqHyHKDzmlYALTBNSR+mtpOsaEorbdL/PlLcC40DgeKaSTt\ncXUfKUTCDBnv0nfXBhqcWIxnDtZKovudQ3vVgXdy1cwVNmkYeU0Bl2H6DMUj\n5mRBi4ilhbvmLaJERkMbaJ7X1FAdwYKyy2O0Ma25sonrLVdVDs2dg5NE/T8S\nTlT97kkik68F3wDsXe8Jtmia+hkKS0XhQzxInwA1fkX4kgSeytAcGMqu89fw\nveScy8PN/jtd4i/OY68RmdBSXlJGnl515SQZwNCTDGh1eZi9U6f5ExVBxn8Y\naDFVgT4D3PR//IUm7S+ZAVcguJOMem+/H3VJxmiRH9krRvMwUOj+nCZNcV6w\n7wADLUNygpEyyal+IgIit/SYewjuCRu2ADIoOV8yidkoenAWgDaSs4Lh1S/K\nARJjZjOznOPo90YxsR+YFHrucNwajZQpHk48W+Z+hgsK5a64IcmwmJ/1mFGW\nqeBII3O0/+m+s5/XtqFoPy9gYd1pMiCqekbAsQ6CW8dHTb+5ivYgXDFhRsWs\nMdmU\r\n=pfJq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1576f757f297f6658fd870c57d09da56dff08fe8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.15","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.70_1618636000047_0.4178410108859638","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.71-renovate-major-socket-io-packages-847491160fd88584e78152af856e55417d30ed4d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.71-renovate-major-socket-io-packages-847491160fd88584e78152af856e55417d30ed4d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.71-renovate-major-socket-io-packages-847491160fd88584e78152af856e55417d30ed4d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"448df09dd8b7eb62b19f4359e7afca1f0a1964fa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.71-renovate-major-socket-io-packages-847491160fd88584e78152af856e55417d30ed4d.tgz","fileCount":39,"integrity":"sha512-2h5cxt+gyiPCwwFjYQbmUYY3mq5mHla8DA+5BWUi6l1sGNZtBO+qHZfUYMGyufBJKQk9UXt5HBD1WXL5Shx8bA==","signatures":[{"sig":"MEUCIEOtt8YqYH7Q0LF4K1x7AwGrpZs0+pz0XEja0BPX1OLPAiEAxcYGMn3+y5m06sEfO2J8PBEGITW5eMAcABsB87mUIBU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgem6OCRA9TVsSAnZWagAA+v8P/0Yp/tMY7gI0i4tzFGwa\n9QbwTlOHY+rKk4z6f2suHqrKpDTo3BoAvh+nWWOxc+eUJL8DUWAcpR8+DeDx\nAP3R5F0khtWEk77SuT6co9nboIEDB/gSFYThtgdBZCa+pwOt6FGJOt1zsno+\n9FkSLh1HOOvHl916BUArFriCB31TDZUHSz3qy4BowThgyrrrFKZrgG0bQYax\nlfxvgBU357Ji1tfsVlIJxPBLvdjiKNpdC1ymlTZzNlj71YPUKQhzExnnyxQO\n5KQsscqB5/j6W6V2XLKviSo69+ndtpfBy6vnytx+kjAaKCSLxmCjfAGv2oNL\niz4RjmaHre020vsTScCxpe7tDocjkDFjArxMGqBvmU+7viofSGaaKPd4KCKj\nBecODB9jF8ZH2en9GMZ9p9zHoeyovcpp376XTUAjzWQWTq5B8XON67n0sb2I\nLSI/LeKHODBfpl435u71dt7ku6NzEoqGV7W2vYgH/elckZVMaYccQd7KZjfq\n9DN+NhF8UNHd36qKjG5os5Jnnf2HqAvHiMVi/LOj1WRmiY3bs4kzJyJtj9MC\nHCrceuaa2P5lFOePe+TzJ/kRUYt9Lbqavw5ROI3xdaAkeiiXG26CEr5PB9LT\nOUIT0PfmzBcbCxDU0TrOo1JbsAapevtwat+Pqg9sudpJaQCsxmTULho9Ap9J\nxAl1\r\n=QmIZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"847491160fd88584e78152af856e55417d30ed4d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.15","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.71-renovate-major-socket-io-packages-847491160fd88584e78152af856e55417d30ed4d_1618636429455_0.5499878105443305","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.71-renovate-non-major-e82d28e696ad21e44bf0e80481c68d0be8661da7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.71-renovate-non-major-e82d28e696ad21e44bf0e80481c68d0be8661da7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.71-renovate-non-major-e82d28e696ad21e44bf0e80481c68d0be8661da7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f0f67d8fe99087f22dcdabaa71f5b4753acfbfad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.71-renovate-non-major-e82d28e696ad21e44bf0e80481c68d0be8661da7.tgz","fileCount":39,"integrity":"sha512-cCdlRo+yGIB+zUrxl+3w5Ppw274cjv7shXpRGEShwTYzsaR9X7BSkySAjVVJ8zvZDkyf4EpatSMUN797g6ORDA==","signatures":[{"sig":"MEUCIQDYcDzRzj+KzUg5TsNWwg8ZAER1ihVwYJ5GkvMUo4JAlQIgXSTS032IEOrGVR7fcTnydSh/bQJVSofp9zZssj5awrA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeqgmCRA9TVsSAnZWagAADZMQAJkF3/C2J1DI1k0i5q7k\nahNyNtQHDKnxPb6P8aaljDkhrn9eX0LVa56qwHBnd2bdJRZXuagtEtg2chhj\n+mVCW3Dyfi6gvDqu00utkF90XlAt9MrUh+yw6TGGWvnxb+kFMyfhVANmQY4r\n26u31ykiBeE807TpU6av94L+ET1lg0q4jGyhmWn0Gmxh08t5uH+0iv1QvDbh\nJluhAs80G6dOFUjzeg7MywZVLCYv5MMU7tkBJya6ZVjgjaYJgWTeSbs5C230\nNX6RRD1TpWl74GGCulfIGHy3SBx3Sxjuyn+8XEbX+noHkKcdw6vGo4cFc96H\niHeM3mezXVwafQ2CxSL1954FwAgm+CaXJhLUd/SDUXbYbx/QhLX+PAz4RA6Q\nfhE14zGooWdmQg9E+0v8nawY/3lkHIKJNyTYgrg0Me5VlwADpMnOSxwOz01j\nFJ3kMTt7ZUMmnMAfn1D5Vu9sj3cy6UknsTvoOIlDaOkkMrZKYBSTonTuzVX7\n5Jie+ZpFjD/uhJvVO39gB09Vh/57WeXFejGXHAzr9JDanGRPGBXHUNC6q4jN\nxLkbYXbHiIrFXucB5sL6p2MAmci/cVosEGZcGFcz4Rw2rp/Icn1yHD+15oEv\nz8QqXFaVgJe6z7ZR7ElDFbzlBp/hnTiPMD7g1MnjuneUYUwA69QBGRJiVBTm\nA7s3\r\n=72OZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e82d28e696ad21e44bf0e80481c68d0be8661da7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.16","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.71-renovate-non-major-e82d28e696ad21e44bf0e80481c68d0be8661da7_1618651174205_0.3378923857335008","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.71":{"name":"@balena/jellyfish-client-sdk","version":"3.2.71","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.71","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d4cb119ecb95a2ce43a034ddcfd204809df1a511","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.71.tgz","fileCount":39,"integrity":"sha512-DDu9+pYsPg+1l6D0W2CKf5iN6t/IiaLK8d8RdX5+QvQ1GVlB20qNs65qs4QyVC9Fc4u3gr9Mq0LG4Q5L98qMIA==","signatures":[{"sig":"MEUCIQCiG89oX4r8zhxrkh/kMr1sUpFQDQV9UAS4HzJRlU5tTAIgY6yVNdWXWeHkdx6m3zzJmckUMobETAYoLosKoD5N3r8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeqjwCRA9TVsSAnZWagAARNcP/j4KNKWOp/dXSWy7Fb8q\nTQ9U4E19SzwpunDJuQ9V2jONJ7F2C2xkBEQRmytKZQKP/fHJ8mRLo2ThXRL6\nfTC9Bc34X/f4cf1aiHLr5yjkjFdaNXkRjmA40NNu5dy6pFue/oxL5nPaBXgM\nWRj2t/+000L6h52S48DOiMhqZAUBpq9VMxrklzk3obJweLS4Wk1rgV5kxjVE\ni9Nwcge+MhtDDEv9vxKA22TFscdqbAPbLysXLeucnuBkZndb72vo2pPhxWL5\nPnpWbE+/5mRMC84xnHaa+hIwfzagLA1GJLqHReVM4IQ67f1AHWh1QeTA8Psn\nLuS07x8MkFelMzMxo894jR8dEcBRGYMu53/1ATXnNXkZsQ9tBOS6FX6G3+2d\ndNF/LdLTtvdhEjq8joxkiIC1gd5pGvpcV6kmgpGWLj56ZRxqr8uUNAHa4Yxj\nwbcal8W6+nSg8b6NRfYHoL1mGSJnkwTKTig+U0MdJ5ut3hKdDu0T7k6+a6OK\ncHHTHaFmLCQTL/AaYym8d6GGNWibkOBWsz6V21Yrxd7eF4lVcU/hHC4e5NC0\nycuOvTLENtcST5dD/ALojVNfvru7gBbz7mBbbzL4Vv9rf0arquZOXTKOHbYh\nGiPZ/d3Y7lMMylZqpFNMoZHMhik35Mvtl8+igfpa+j6st7XwrOwB9K030WBz\nfc0D\r\n=2EEc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b3689c0f0ebf41921fc5a9c435be005ee3a636b4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.16","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.71_1618651376218_0.062319474555276866","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.72-renovate-major-socket-io-packages-09532aaf555be894c0fc8ab176865a1f5f2b03ae":{"name":"@balena/jellyfish-client-sdk","version":"3.2.72-renovate-major-socket-io-packages-09532aaf555be894c0fc8ab176865a1f5f2b03ae","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.72-renovate-major-socket-io-packages-09532aaf555be894c0fc8ab176865a1f5f2b03ae","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e346fb25e8dd5a96a4adebece57cc3074e694963","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.72-renovate-major-socket-io-packages-09532aaf555be894c0fc8ab176865a1f5f2b03ae.tgz","fileCount":39,"integrity":"sha512-6MBynHuXRJ3pW2dLnc062DlI13ESZjyANdbuUJEGBK3BVGmg4ZQeu2slC3YdpAvVvCI24NECNZFZtrl6g8bjSQ==","signatures":[{"sig":"MEYCIQDdRzrBs9KiX1tGY5V+0dpxkXpuBAQC+qP4Bl1G9bdOtwIhALS8AoIdkngU7SUUY+iOF55wjVyUU37hq0qipSq5dVVn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeqnYCRA9TVsSAnZWagAAuNwP/2abaRjI2vYnpm5mRA7w\nHnPwwOTBo89a8fw9TV4a4Ls4Ds3G2JUUaSku1ZY5E4tB610/gRomgUxl6Mv8\nt41rvIQ9C/tDDN5JsWLD1TDYD4fazAs9Rd7bYaSHGGd3MlGDdS5hd+rmHNBv\nEBOmxHU0VYt7OGuCkK9d1n5UOPloa9XGD4DXohKt7rY8dURWPVgFZWTF25sm\n8QRdxp+EhS30Yo7LALk8YRKVtFUcM9M91+kVxiVai8wuRuktibnbp1lRn6eW\nJQahx1V7J0bdkSZUgt4uzBybGcOhU+QFUUUeFYWwMOvTNwmZ2lDwIdEOfcEj\nBRHz8SPwqAvn0YJ/kpCxafLWdOP26h/a4VZKmOfuGkSLMU6ulEjkZ9pelgbG\nlJ+cuDgtNeU1nNwHdy4KJOXpaIuzj8yErB5HV3VuNyKfwFz3ASQCnqVbabQ9\n34jPxycf3+ZLCzvAwL9xR7e9O9msPSxZV4ignvCut7LN2GAEqC5+pQ5ySWUq\n18t4x1ve48MtSlTGFzQNkgW7TkX+mrl0+TarfBi7vHpRojmYJZ5iWSrvqOFH\nMt46VkQn/w0hGMIQ2oxKJyOhVQtEM3oo0YUiWX21zyJFvoGHy3z7YIFl/AxZ\ncoE4Xjat7ZCHqUzARzND5ptC/SUTdkffpPMfNjYi3tLgT5tWhB6lWmfavYUu\nrpvX\r\n=h+nM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"09532aaf555be894c0fc8ab176865a1f5f2b03ae","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.16","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.72-renovate-major-socket-io-packages-09532aaf555be894c0fc8ab176865a1f5f2b03ae_1618651607515_0.8675614360767554","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.72-renovate-non-major-1717ceaf4907d81bdeb01ec3556ca8768977d408":{"name":"@balena/jellyfish-client-sdk","version":"3.2.72-renovate-non-major-1717ceaf4907d81bdeb01ec3556ca8768977d408","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.72-renovate-non-major-1717ceaf4907d81bdeb01ec3556ca8768977d408","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"893137ad459e129522925b912b5c60a1602d02c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.72-renovate-non-major-1717ceaf4907d81bdeb01ec3556ca8768977d408.tgz","fileCount":39,"integrity":"sha512-jL8DsETBgzvqYE1G0ovPdOOBFGGESHbqta7XB2tYuJb+Ndk28w535ZkKlrqWA8rikfyKkh4kNORaSfxKoziTrA==","signatures":[{"sig":"MEUCIQCRjbwGwrvzv36vwYWB1Gt8ZgILvFJeyAuzh4DlbTuSZwIgf89sCi4fcvmkOKzqITNfIGHprgdfGa8YXC13I3B2/TM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJger9jCRA9TVsSAnZWagAATucQAI2bDPyFXoY80WCPd7Ca\nKiOLQbzQoLgFQomUpnJVmqu1sbwnGVWXXBRIrEn4D0/0XaPDyZ+0d2OiLzNS\n8CfvELiMooIt+A9wpzke8FZ71UW+ZJSascs350GgYyHT+K9/yezrP9IVGKCw\nvFbRNCflCjlv4ZGrbuSr0C2XNx49mGaCVrgpL3xv2etETRvjTpfGyQX3KvdI\nG9GM4xPhQ+cO4p2LO5jqKdV8xr3ql6iBQ4F8b+VIXpdG+tWDfxx23eFDGiy1\np4yTSSiJyd2/Vq21bWj+iUoYlHr3QZAYfm0s5CQL9kl70PGtg3tqkNnY93dC\nX/EIHo+Qj48ugnwk0NfDbjwofF+JLuYY+devJAVyUJtEq7surjwk+vH+OVVF\n5X+/btjcBw2pwQACQB0bPQ0FYRRmXmE9nrCM8KmIvDjDqvbJUe4FspO3ftm7\n1XWx5zte5pmFcZw6CVQBnDRU+d3cr76jde1XAPZGQDaLHewszcwP1k9j1dw1\neaLrBiB1CoADmkj4J8me1q0nD1zSjVYuaNXmnGxNSOal7MLV32nKaDwKNqqM\n3bSJa7t6dc+oRXOS/5LDpGRLgMCCELHo/Km8xBpI5wAD3FkRmtAooPf0Sgbc\nYLgsTFO+97tSBUdyibhEl4FmIpSky/BaaOu8dTBdeEy1ivShNcCkA79LzpWR\noaMg\r\n=nek3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1717ceaf4907d81bdeb01ec3556ca8768977d408","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.17","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.72-renovate-non-major-1717ceaf4907d81bdeb01ec3556ca8768977d408_1618657123216_0.7688881765777442","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.72":{"name":"@balena/jellyfish-client-sdk","version":"3.2.72","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.72","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"913eeec4bda6cd7a736bacf4a399703e9d688a7b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.72.tgz","fileCount":39,"integrity":"sha512-vz1s/ako8a1jRdB74nlYr92jXLkcC1gRA/vdLPhcCJ1jRuF4c8ixA5lC4faE4EkPrvVvcqSXJQcC4rdz6bVXLw==","signatures":[{"sig":"MEYCIQCDORMLrDWrPcy97w71yR3T/HCYL37ViuwcbW7ZUGmUdQIhANFyyn5vZSkadqtlf+4QOvi/xe4PuEKO4G1el7Zc130P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgesAmCRA9TVsSAnZWagAAiqQP/1Louny+5I6h2eS5EJks\nM7kexCsz68XUXJW2ID+6brf2XODZRNW95HfUIAxbfz9muC1NS6VPfIzdX05Z\nh/YQPxx8ZXhGVY9k9u0/kCEBLEpzlAgviFqj5I8s5uwS+tH88/lzBmEimgCZ\n7Pc11GxD/OBxKGpjIDyAyQNO47YP2r4WxVm+N4ORocGOK03fCL54uzy5H53u\nQOzMQ7GLVlUthGCLBIjK+SMECA+l9rCa3Krdc4RkFsr6++aWKqxov1A4BzvI\nqPSoZJfEcOwP7lIE+Rx8ypwKQIG9CSR1K0vc2L74obwxboEavXrf0hAVGgri\nRQRBM1SszDRKucYAERUkWP27t/RLFDjiimLDeNL6nq7ZYHJZZkbgtPkIYISM\ntc2TUzhHPzjiSv97DCFDEKLgs3ubwLrlyjkFGrtOOI5MkC4PiZBW5sru1i2V\n8i4O9yqKtL3qYWFI3+0hac8oz7uq/FKxSX9gixPLwph7dnn5sk3MotWmobIF\ntC+TWvnkb1PwKLd8BgKpBwcTzG2JPdQX8ktR07AjE93BX42qyW/57Y94lzF2\nfi2XaLmqW6OevJo/KBEC1AdnJHisOxHZjfQW8+d6AKSzA8mZ0FqTEIbwvXYI\nFagddsYD1OmOtqDMPE3Vnc1S4YPQFvpLAjeTUhawyzH4dy8MhcZn7pKr5R9U\nR/xK\r\n=Psm2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c6688e7a5ad5765c5525dee9c916cb8982adcb50","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.17","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.72_1618657317574_0.7701001201821402","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.73-renovate-major-socket-io-packages-67b61ddee4e6dfd4ebdad407b6a02d8bbce5cd0d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.73-renovate-major-socket-io-packages-67b61ddee4e6dfd4ebdad407b6a02d8bbce5cd0d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.73-renovate-major-socket-io-packages-67b61ddee4e6dfd4ebdad407b6a02d8bbce5cd0d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3ed2a4df6cd95c51dbf3a4c9c70fdef46e0f2d22","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.73-renovate-major-socket-io-packages-67b61ddee4e6dfd4ebdad407b6a02d8bbce5cd0d.tgz","fileCount":39,"integrity":"sha512-E+QdKWUdtThkJq0BSFztzdlGnzaQbE9WOBPod7fZvO8c6D4CfxwjddIKq4JnuxghEj0VSIbZN71Cn/2X0IT7Gg==","signatures":[{"sig":"MEUCIQCB7M5NW9WzSeAirOsJlGgI9PHkDyX/pM4fU/Wpen9Y5gIgWuV2MWGfcujbHXKo6WjTvJFIN01F0i2qgRGiM3WAxKI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgesDaCRA9TVsSAnZWagAAqfsP/0OqLNeNwNDKEXX5CIpm\nyBWPesfCKHb0D4sYIlm/wYQ7FU9AGSjM39X7Ik2to6p9SH2gF4HZm9P8iCDY\nH7jdkmOS5hRGYjG4XQAToN1nvXUj3sAB+e5dfV24WkUdESvmlkJ+ioXz5h5Y\nJDGQTJTIg/SVERiEAgRivp8kzVl1QGcncAaTxKZEc5T2kOtGUguEYLlVbTDi\nW1YPB2U67wCIYZXuPUoV/00l1ZjXHb5XikJrL+0EBsk+GqSEAmjk+nGiXi7V\n1gk5S8PnXEdQ6R0VZOgJvTJ9yOTQ1p/6ETweDMD+7slvPwosWx/kMMr41e/N\nROzYIeUudB7wsE8ew62cHYXCYSuq21qyGcBS9jHEbWEEdMQ9rE4jaFdu1W4V\n4saOqC9YFJM8h/EfMXMh7eqIjsbafhZEHcn6E8oTANc+E/zZVdtdv72y8YQQ\nxuVAf/phlZN3MG9p2cDC6sPWbom9a7ryQuT+vGpwh+GD04pQluIA7WO/v2Tf\nNz03Fh7HTcPnS7w4ZWogmKQgNrWX6enbZUoMmwCBBxMXoPqp4sZ3/0vGgAgz\n3l64Rj7tJ9TsO0OzntXuY9Wk/iogSozwPzRrFkmfQN+xhQ+4Xg5xG8WopAIY\nvE7JSvwkhQLz8MroT37rsJwWKviamwe5D0NbqAyAitRWJm8iefbGeg3sK940\n0FJE\r\n=zDNe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"67b61ddee4e6dfd4ebdad407b6a02d8bbce5cd0d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.17","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.73-renovate-major-socket-io-packages-67b61ddee4e6dfd4ebdad407b6a02d8bbce5cd0d_1618657497944_0.7395027769963942","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.73-renovate-non-major-7bb4217561353d01b9d7f4dc363d22804008b4f7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.73-renovate-non-major-7bb4217561353d01b9d7f4dc363d22804008b4f7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.73-renovate-non-major-7bb4217561353d01b9d7f4dc363d22804008b4f7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a936e52e46418a6abdb994e1d60b9d3fade8b965","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.73-renovate-non-major-7bb4217561353d01b9d7f4dc363d22804008b4f7.tgz","fileCount":39,"integrity":"sha512-j7LIl7uO/LiNVlbmcZAyWhaHmxt7p5uoU3JiiGmFXXvatksFtO6M96nFCdBWYtJTbRhUrTdht8qGjqwQ19D0sA==","signatures":[{"sig":"MEUCIQClTPQqBWjGraT8Pl39tpcftslkyNDpvxPUt42hxvfvVQIgYN9G//T65/efLzHpW3FXBQ4y4fF0VIJSgAGB40M2t3I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJget0rCRA9TVsSAnZWagAAjSIQAJLM4XKoxDOmqKpsVVLi\nxUF3SEhZw/U7k8ZuThWckAqlg7eMgkapskqCWAGRq9OqXtbJxXIp761vfYVW\nmJcjKDIbfK0FIur9fJFbbSRiHu2av15bR0Hbu2T7KpxQTbhlX9zTzLf4e0SB\nbz8gg1zvydXLNM5dV/ODccLF/OoIrsbV6q6bDqUf8RGvLhwhwxz06yculEMq\n5Ug1KywoixmsU1Nxp+n5al/OnuxSn/ttN6+xiyzLDaxnB38SVGn7sGNbRwSR\nc78lpNmFgXnlbRALaMJ9yvR6Ru6iVRX+/ycNFZY0nWwqcifHY3uHZwRN7yZG\nuLUWYzIeqtqjj0aMlbUM3D3sWFAlqFOyO40auTMLy3YHqYfLdr/7z/WpDJtr\nqEakNhcoht1xxdOtBvlcK+kvoiZoGRqeob74xgjvzATNfZ/JbzZ196gWmvwp\ntqZ8DvU3FeXA8d6QF+EpSUlzmQ7NWayVzIkbe8wZr2vfplwl4HFHIyY5SSGm\nZZlcXau/NYyJoWrL/AhQ2UqRc/MkHa4oaHVNbrEXpErSdO/vny3H6UDdpeEr\nz+u5w6vK7RQebo/IXEjkGFllSdAkMyd2sbPKxg9NB9EiMlPhVNQh4lVoLIUE\n/MlDaONU3jxYl2D/AJdOF7GEMtuOoeWwcvI+MupYMhMJyK3xCvLF8V6APpVR\n4rLx\r\n=Mllz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7bb4217561353d01b9d7f4dc363d22804008b4f7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.18","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.73-renovate-non-major-7bb4217561353d01b9d7f4dc363d22804008b4f7_1618664747023_0.4942447360689646","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.73":{"name":"@balena/jellyfish-client-sdk","version":"3.2.73","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.73","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e5ac356f288a4aa5018665880b4094535655c55","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.73.tgz","fileCount":39,"integrity":"sha512-fUhTDR9rVgkktQgNw3Y/8bP0b6KWmVOrPQcl7lV7DrKx8Vz/aT6E3I/HNvk9Ur7+8q5ht0brLxWqk9wZkVyFeg==","signatures":[{"sig":"MEUCICgnp+Wi18I0B/WsqIJOMp5JvIt4Fav95PdakKKeM27ZAiEA0jKsox6YSPTUFdpGJ8q8hlUaSFI2+13B4I/5Ar3RwCc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJget4YCRA9TVsSAnZWagAAdAgP/2IacZwG9A7Q8aR8kt1t\ns0oX1DIwzUS+qBm2rWoiPXa+CkHH4upACk6LMnJ0Pn6STPO5Aq6ZOd0seO7+\nzG327VeVbT6IlTQDbhP35fUOKt32aFlpC4LeCCSWm05iVaRpjB0kjBQ7zaqR\nZsESlJakDNPihKwfoLvKi2ejRXCNZLkgY2hldaWCdlEh4LBNz9jn53uQKyq9\nvqKe9HUofe+UQMlUmhjGAJxKdTc7poyX0UCHn+url7u0fp/lK6mxZ52u5aSP\nQoBrwbX6bYAScNuGmINKTIOp0latK24ukfhNwkiX0uX4xing0TEDFccGOYYx\nqrUQ1Y7n//VRXqvlUxMHfMkYu6SQ9ZUbqWxPcZcjKtzENEwOxlmxPWwWjXAX\nh3ohm89PHJd9DnV0jd9ZwQOxbyZlOsNg+IaIFYSA9+cmvDbb5pK8o1qDDEa6\nJNntNLQQXKikmAmuJGHrSJAhixMARM7d4YRSqQXvtQ+lN/1dssYpmmkBggO9\nb2L0NOKzYsWGgMpORE5EmlO0r6xfL+XgXiqlD/f5UebCH4Chu24i1ocvx3c0\n4D/00WVetu2Dg95srrgRXf/CgwHonU3npnwgN8WPGKY6nimESki9puUZlU47\n1ScT6f5jxzG0mHYXM574awF9mAPWW+IT0KAUt0GRHn+tbsxVhc96JVgQ09C9\nzKdL\r\n=n7fS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aaf8e00c0a33491c1fd489c3b2655e660e5b4f5d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.18","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.73_1618664984153_0.34212481223010616","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.74-renovate-major-socket-io-packages-03957877784ce5913e188bac027250b6dc746f59":{"name":"@balena/jellyfish-client-sdk","version":"3.2.74-renovate-major-socket-io-packages-03957877784ce5913e188bac027250b6dc746f59","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.74-renovate-major-socket-io-packages-03957877784ce5913e188bac027250b6dc746f59","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1147ce455b1b25e44d6ef7839730827e2091cfd2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.74-renovate-major-socket-io-packages-03957877784ce5913e188bac027250b6dc746f59.tgz","fileCount":39,"integrity":"sha512-WlheTLDGfY10ykLBvvLeHP/tX1cj1prilxref967t69JFCMv/eZhyavZDdmZORojFv8zfcS5sb6jE9zssJZ6Rg==","signatures":[{"sig":"MEUCIDkeNEaMyvau0H7v4Dw61e7HaQ9QhcLhzG+tiraVC0u4AiEAnYCEHs2lV96137RocMRn+xXu92WzGO6mUzVVvzQxXVE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJget7NCRA9TVsSAnZWagAA83MP/ilVwTnVRVBfyJu3CDtt\nFXDmIL59eggu9Kbsunn6KgxLSugDGJUKs46FC0FZl5+pRUR0WozMQJHanAGA\nEcjYuOAi/GC9e6t7fAGUCq4Y7UZu3Dctvirx51KQSutn76khpjOHxkslRH2j\nBmus3lblAXBEXGHKQ095hEy0dPlaBUcIXuZwXuXZ0SHYF+4lQFn5LnxndidA\nGRXYX58Tl+e9ifR2fBHK1BoOiNtiGPEegHJZ8mygwc6egxTTpYD/8x6bsb6X\nBVrizq+MT4GPDhGBumaAWDzV9IqtX7L8FT4wIgUuNMwX75Bzk6je6wu+nS+L\nGT7yWBkLlpTSBXm9j1t6zRF1stzmLN7fKjUIPlKEb3Dx1h1hCO1RcIQHejv2\nhPHhGqXkRCj2mMPw1DY8IUS0L4Ani4FuVGrmz06hW7Boqiva9Kou1wT5vdZ8\n2q95CmocKNAM1IzGSXMNrVmZ0R5hyuqu4VfAQCiSfw1LAsj5zHYMmV4DjWLh\nmR52BgbHCeu54qMTFq/BDkgo4TP6hCO2/AHNZyqWnYuYwWP+enSuodvQiMiy\nUYrMgC/7V5wNLN9DoROhE06LmD9Qi2V+XqPQw1D8GYatCEUZq/xlJ8gLF3uw\n7VRL9HSdPV1GV9Xii1UlT2h8A6g8JoTVWc3fXaOqAcGRWqxkMsJQHeXYqVaU\nJ4wu\r\n=Wcs+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"03957877784ce5913e188bac027250b6dc746f59","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.18","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.74-renovate-major-socket-io-packages-03957877784ce5913e188bac027250b6dc746f59_1618665164941_0.02335593492474386","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.74-renovate-non-major-fc5fb30c0db9f162f02e5e2003785e23004250ac":{"name":"@balena/jellyfish-client-sdk","version":"3.2.74-renovate-non-major-fc5fb30c0db9f162f02e5e2003785e23004250ac","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.74-renovate-non-major-fc5fb30c0db9f162f02e5e2003785e23004250ac","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b6e907e98753e9f9ad8296d2e42864c937862973","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.74-renovate-non-major-fc5fb30c0db9f162f02e5e2003785e23004250ac.tgz","fileCount":39,"integrity":"sha512-ktdOm5nMTycT9SxDwXxdIry1/Hlv3S5Xm05unSj7wj9W+GjSc+gFDg9aTid7LmEOYUS1ZSHKtkd0nM4jOQlT2g==","signatures":[{"sig":"MEQCIBoSxjzsDDg9zngf2eI8mjP5fJIcqUp4WUrpLdYUIloVAiBUHLAeMSokCrUN3AlMB2W2e2q71PtimkysGLBxAQ/uFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgevzUCRA9TVsSAnZWagAAEOoP/1/eX/+30MYpe8IfsWeh\nBdaiH1w1qm6ef7zbwAVDLHF0bQv31ExC5zjy7G3bilO8O+sl24IlXujgtwFS\nZYLRJ0+x4XLWT5Xz0FbGouvk9PUCPcOG8iYENOuk7LVUPtm3HBDwTcQp9lmr\nXTh+IjwGus+tAxH78xTH/xWwEyTaklVX/27b5h+33SaoR/2VaSjSvos9kIqG\n9R5TRUUDU2SJNJu2RA1EUfP7EMudOyWtztz3IRXranXy6C2i97w8lE9hL1Gr\n75Hn0VViNft35r9OW2T7N6cuMpiJl4B+LxPP0gPUxBEcD4sdusBFltlkjk5L\nxINdMFF9BLKnoaYYntqSHGFqhbGr4VPHXhyTjoGf9DNLzvEGEVWNB+ysnLQV\n7PZdGSaEEHdwvJ2u29VizcYa2WNa20M2S8Za6UFv7t/l1scjoqXX7cupBIye\nWJ6APUjjfwKGLLe9VRILFXfIDRfu+/88o/YSWSPZ7sUvHt2FHqXcW2HpQ8Yl\nN8JwJyr3GwZC5x/fBpSoNSeA72iJvv7h2KeKO+CoszE+7SDBx22tPks1gtbA\nd5nn3nLMxJD0gw9yHVPpAGqRHmt/ya77JNbN888AuUpIpI6IeJSIibzRRSKp\nRW534FPe4OE/+oH9YLb7ofMJFu3jRoxwGFDf/OuPR7hdAvFCJ47wDwkxM6im\nyzIj\r\n=IgkH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fc5fb30c0db9f162f02e5e2003785e23004250ac","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.19","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.74-renovate-non-major-fc5fb30c0db9f162f02e5e2003785e23004250ac_1618672852379_0.5852374542027283","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.74":{"name":"@balena/jellyfish-client-sdk","version":"3.2.74","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.74","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"403855788b0c3ea86c264cd003757164456a269b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.74.tgz","fileCount":39,"integrity":"sha512-OIuY1WiKJ2GvaiddZkyD5sYsaRWOPbommHW/2hSEvrtS/MPl1cSl0WcHNuoAgu2xVfj1WVXBvpDPj/5n1x/RNA==","signatures":[{"sig":"MEQCIAUxK+gMAB3YA7cB0AlmVn4JfZE7geBTAKaW8P/axk6aAiAAs6GcPXKxSatchNq6OTX++AU/CBjqoSoAToDLTyDXpA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgev2lCRA9TVsSAnZWagAAuhsP/RKliRKCfYyf4S2gCe6e\nj/ve8RQLIKhDuOTMQAsIEYUOuPJEa4Oz42Tuf2Gid69wkGKPHg1yq7V9uuj6\nzb/PIAQFTm39c8x5/JmTP2oy9QQxlZ0oJKl0G6nZDSo2ph+cNvQG08yT3aQI\n7SMBIQnRrQNx+qsI38HB93cf61RLcLpq/tON2676y9A7kpua6EPAt+PDLbKb\nbfS+H7U/J7s7TZImnOcTgbnYYXpToBTqK3G00PR1b/JJNpC8qh+MVz/sxb5a\n8v/e6VdsH8tckrEdpVD9lFN7w8UEa7rgiAMOTogjX5+CUzkKZ8jANNemSyti\n5cEGQ8g/vPccTHC18lfCfmEoZ47y6L1uI5Tyo0jSCuJAf/K7YkuMXbfwIB+V\nz/w42vYcMnEm4/3kDocAwaxEcIDm6EuHsZ7F1PsbB2ibZCbIW/XRNNy0aJpn\nFKh4cZhxL/qRje84LTcQL9832sNklxPN5vgzizwlYkrgfDXx5Et4rciHv2Jl\nB3ErOx/MYIEabJPopD4qXe/8YLS8IQF/Ty2SIjUxMIcWEi/L/1/ki9cRliu+\nwwX4ujxOjZ4iudi/qEqXThIXqR8aEyprnJHRUH3fULNh488gonHCwuOFjTku\nFR4CJgVh9Ett8hPsWua+qieO1UGiCD1GXJzfQJAgJTYPnSaOmbWKlxlDvFXA\ncd+L\r\n=OO7R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"db499dd0ff3745fabcdcfb1d1e93bef07da4560c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.19","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.74_1618673060984_0.27618471603271955","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.75-renovate-major-socket-io-packages-a41a4d5e4cbef67c1521af1be1c8a92913eb09b1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.75-renovate-major-socket-io-packages-a41a4d5e4cbef67c1521af1be1c8a92913eb09b1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.75-renovate-major-socket-io-packages-a41a4d5e4cbef67c1521af1be1c8a92913eb09b1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8d81f877ca399c28fc68dd0780b3ae8d4873be9a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.75-renovate-major-socket-io-packages-a41a4d5e4cbef67c1521af1be1c8a92913eb09b1.tgz","fileCount":39,"integrity":"sha512-wINM7hzcFqeTCxD4Y0yrR9yPCwAFI4ptZRHRrX8Yqcw6khokRKFzobx0j4MHFRp1dQfawW9MiQtkzHPGVJGYOQ==","signatures":[{"sig":"MEUCIQDlRLfZQQ5jgnJ8bsgSJBPTvPnZasfALDMTvZdqdfeVkAIgB1TJRBf03TIs68Nw3VrN3Ie4LZi2kwfaIlGHcGcdQsM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236692,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgev5fCRA9TVsSAnZWagAAPOEP/2qGx7L7dBL5jCDiawLr\nzsl9asW4/rC9vxVfIxT4+jLt8Bdn9ee5lSNXEXiwztUEbMk4Svg4apUt3AT3\nd0pFv9MB3FhVOp6Im4oJqu+NLiKhm9ELJXmqDZeB8jRiW/1GDNGnfTD7CtT1\nNS9ZrZk0SYN+5KizuLxVMNF+R2VvDIS85qeBl9UkCBwdn6o/6CggLjZQn5Mc\neq9O+vM2ghWqEIH2+bw8jEnM+rFduvQJJ3zBEfDQDwX4ZmixwWUF+jlYz1eA\ntSsORUj8w4NJSh4surD0l0UclaQBAEx/awGK5e4Lvhr4eNFZapbHglkjpoOm\nbT+kFdGEss6nGaEAZvWpBHt4d+iWt8jN4M1HmFA5dry10IIE+QyO3uc0KLBi\nXTdydjjVd9yQnrhBKvZ0DqmnoSQMQ5NWa1lu2dJK7883nttsfse/Uq9Lz4gD\nMZbWGSvwvaDpVGL5xagxcA/1kPlFVxp0iQP33QKUHZvO1BvPgAnRI+Z0VorA\n8rIfbFSJz4gp3Yv5o4PmR7dRrYqh/ESbEqktdcRZAxu6LOSyIy0Mc6j7g6Xz\n52a1h8pOeABihwCuNQlhh5p9/EzG5qiTCU3Zdy0SQubQXtty01ukE/qD67eh\n1SeBzNdX5aWprmjbVRQL8UDsTePDd6Ur8UcpJOZsikDEbO1OihIBsmHJvrxX\nClCL\r\n=WRoY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a41a4d5e4cbef67c1521af1be1c8a92913eb09b1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.19","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.75-renovate-major-socket-io-packages-a41a4d5e4cbef67c1521af1be1c8a92913eb09b1_1618673247352_0.3883982245913331","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.75-renovate-non-major-587e43b1f16b8b9e5bcceda8304673a6427b7f55":{"name":"@balena/jellyfish-client-sdk","version":"3.2.75-renovate-non-major-587e43b1f16b8b9e5bcceda8304673a6427b7f55","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.75-renovate-non-major-587e43b1f16b8b9e5bcceda8304673a6427b7f55","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e28a7a4f61571535031e38cb40f3a815ae971b17","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.75-renovate-non-major-587e43b1f16b8b9e5bcceda8304673a6427b7f55.tgz","fileCount":39,"integrity":"sha512-zXJ1QuThdf9So5RViIscH2I8AZcTjJ1NEqJfg4DkQwWDGmytAdGvvxzKcpOnNL6nC8f6i9NCN1DO3GAG3B4VvQ==","signatures":[{"sig":"MEQCIDwMVBtySrJbuxZEyYNEPDbakp+aQoGhRNbYs0zDxzP8AiBprUH63cnoPz4ZaCyg+tR4KcDNeRDLKJBtdx5reIGb6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgexZmCRA9TVsSAnZWagAAFhkP/jH7DJCTGirH0z6n0Ox/\nHUvTX2gbF5ffpz209Eb1IJCHVyzyyMLGFAhGUmweASDmCxCfOqxu8DFJIFeZ\nR+vYeSD3P4+yRERHlnjebLWQWzTFaGhGBceOMin9rSQUa7mFs711pF4nKC8Y\ns2+RcnuwktdeS6a1ofxyrf1Dted4uQy+dhuH1/vyqYryV/399+0Qt4u4hCya\nedQ6lIpRPWVtVmXz7OxuheZLKKZLANx2xOFQPnErZFWFK/I/wznWNSTn/10E\n6M3BJg1guj3ddhza1AWOOOQ5U9KwZi0/mSCWCTY4am5Fi2zeD+W306KZk5Ox\neGk/Nr5pjYFIP2CP3f3UfrqIlrG18LeMNKbKtfzn3nlbmaoxqkwz1JZjPxe6\nQbRCnh8hlPk8xQwVaJEI/3iCueoIU9Wc9dN41Y4Yn9TtycZ3I2mtTsHR5eBL\nygIj2uioLYhLXJoNBQc4IOGldAXnTNlTLR40Vrwk+KjriXPYy+4DvmNeX0n0\n7a+2tnrheMWjmNycRhTgLLAPvDHbfOmzYXHwXGTpU7EIj02O70Dy8DpoVuOW\nOqNqJBYVJRF87zrc6nmm4LvD6Lipl7eyZhIUMf8EiD9DmG/lhV0pkf6rgHcN\nGCLmz37oFUhgrs2IjMmhmT04Gv3mus0wFfxZbQJtJWzrkkNtbS0rH6C329wF\ndK+J\r\n=bT1H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"587e43b1f16b8b9e5bcceda8304673a6427b7f55","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.75-renovate-non-major-587e43b1f16b8b9e5bcceda8304673a6427b7f55_1618679398324_0.1897641822754399","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.75":{"name":"@balena/jellyfish-client-sdk","version":"3.2.75","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.75","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"238f68200f33072897bce611079e18ab1c502c56","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.75.tgz","fileCount":39,"integrity":"sha512-bIKJ8jfYbZ3mOSC1owqa/ALrqI6pGrSiUKS8kM9MR0R6wu5m42KhH2LqJTHeZtZ/NS9cUJb6zSUz1MQCn4X6CA==","signatures":[{"sig":"MEUCIGl/i1nSIEVAaYNEFgOHknZQegjUPlb4d64u8jEJ4SzgAiEA/l5NHQeLDsyUnVjtwrgYfaZ5eX2tOuBRP539A35o3J0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgexdECRA9TVsSAnZWagAAAVUP/1GWfDltfylPh575SqeG\n6sGEHqBPPD/qYxjtJ6au0kc61fDHbwpdY5AinARXzfWUGB3noJ8BvYGwOTdE\nNMSNTg0sbxf32oiaiRSmtNuPYWL9q2fV+MneVIsg0IO4N3nDvH0Oxup2qW6V\nUiFkftDDXB6g0RRVfesC1IKZk3tm2hYt2FrusTvjv1vroJFt7MTHMbObVUZC\nVI8uxDf1x+z/opbIGguHLL9yzb09EmRzbcKPY7N8JisBbqQWhrxc5nmFNeYT\nPUlbZdZX6ObrC6h31UY5qoWhfge2XrsCfEo/W6PvLH2npNJsGKGpEgPn45EG\nbgxfXqwVBIa0biEYNtNncGRhjPbFs+o77MkITiXJgnB/iQKddx+jnYl4TuRk\nY/aUjTTYHRbJTU7GNkarytll5DkvBzPyucn03QuttHeg5wBPZZLBW5W+py/b\n+7Dlm8K2lxJEgnRWonj9C1UYWKK1FnQmQBe4xZqINhwRo5WbouZdNc+FWkcv\ncvW5ICp0ZG8BRq4dnTg8LtRmXfiR7aJr/jQviTrKOsltgq6kablmsig+gtNf\nPnXE9CoYc5ClFkuYjcML90iTCJdP1ttqNkcfyNkXNEKBV5YABxutou3TNtWJ\n2Vp8Cqn0YzeQ73EP2v2DFu/F5RVmE+BCrZ/2D/fTwCDSulIj5K5A/vnxHGDv\nsaeM\r\n=Mmqo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d6dc71d72000f60c7a91f5ebe80d4e766f35f2c0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.75_1618679619657_0.7190918476489472","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.76-renovate-major-socket-io-packages-58886eb47661f39d36cd257d7daa55b47788cd53":{"name":"@balena/jellyfish-client-sdk","version":"3.2.76-renovate-major-socket-io-packages-58886eb47661f39d36cd257d7daa55b47788cd53","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.76-renovate-major-socket-io-packages-58886eb47661f39d36cd257d7daa55b47788cd53","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"335d70fe036a2ba503bd8645c36287c17356ebbd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.76-renovate-major-socket-io-packages-58886eb47661f39d36cd257d7daa55b47788cd53.tgz","fileCount":39,"integrity":"sha512-9dUTb+wCvCO0W4H6kWYV8MvsQ1mGJKK1mz6sgnSEu92XcjZDELAA4YZfnwsqkHKBqI4DUnQSW3+1Z2+7YutSvg==","signatures":[{"sig":"MEUCIQDL6j/f7OFvvSLSmxqAFYrW89TPy2y/1F0x92nw5KE7jAIgZRKZdvIY0IbmHm5LMfEhdq8ri+DkJlRcZz3lpumyPH0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgexguCRA9TVsSAnZWagAADSUP/0RkeSxTnmYGkS3UCtEX\nz4BfIHtikovTx2Ho2Qk68oMnmvceTX500Q2FXgcZOHYFhddt6b1jex2Hw7+I\nm3EYvRl8/df+0tTGmSW1qJPP/bjFevFgZFT5kAltN9lshQqg0xFyH5G725sJ\nmqnMpo8XF7e0SSycAKDlh4O86cDXSKwCWhTADnlbu6ACIxGFy/1VN1rChR8k\nhp4HKmI4BMOxwL6fingSzTTbKbNETro7pM7F6ckav4mCtfS99Ps6bLgFYv+m\nlw8dcHV0xCtjyynrHDDxmbpAY94D+L81bLeDMyDttT1XSr1Y3NoCVcZO3QWG\nII7jIfDfLmO1EY07D8c48FUk/deRrpsca9akNoxL7UhsvLJAtC0kS3ePzovL\nWHHd1VJZy8uYEItnooJU7Ca3d/lMSaw1JG/N07tf4KZjnSc5vg5FTY1HjAWf\nccwkvm0dmi5nBnGid4G1yxZwHHO1Dy07eFNxlFLlAbydIztX90MuX42nofls\n1RmsFO+JEtzrmMsHCnaptYd+CdQiVYwpIYDmQy764Apoz6tpWhK9W3CyfMSe\nSNwbz7aMF4j2TiMCQCcoNsu+HJcLyB//jh+vnx35SUgQ4CE+bHcqIXhaYa/W\nanMNb1JLH8utXHAXBBdHi1VG3+7v4FwEuQSOVvicMfdO+L1IN1ExYTBLjMBj\nDw6V\r\n=gyrW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"58886eb47661f39d36cd257d7daa55b47788cd53","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.20","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.76-renovate-major-socket-io-packages-58886eb47661f39d36cd257d7daa55b47788cd53_1618679854187_0.3458919217706027","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.76-renovate-non-major-b477a89c88c08d9d23b342624d4644dcc3c8f972":{"name":"@balena/jellyfish-client-sdk","version":"3.2.76-renovate-non-major-b477a89c88c08d9d23b342624d4644dcc3c8f972","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.76-renovate-non-major-b477a89c88c08d9d23b342624d4644dcc3c8f972","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d8ba4f3309c4a58e47a978b3723f33d8c337c604","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.76-renovate-non-major-b477a89c88c08d9d23b342624d4644dcc3c8f972.tgz","fileCount":39,"integrity":"sha512-HI8qiG7JiZ/vgmPGY9LArcI1/m3hSwyyd2yDUFcDGBEm13XCkmLLaAaza1aqh2gbeWi805xv9AXPXKp1VTzZpg==","signatures":[{"sig":"MEQCIG2DTDLRCs/lYBn3b6PvhVpnp/ZhBAkHAAlFA6X9NASIAiBI5Bkg124u+GlqzURCQtdQinm0ik0irb70zHRe6/6Aug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgezy0CRA9TVsSAnZWagAA9gMP/1fCyEAn+OMmck4+JsU9\nYLI4BDAvXSR1ze6t/Sa6xac1AuXgAgLfotXhHw2V5Ze838EdEzzOBCPzs5ZI\nHuJKHhbSod384UZK65apK7ujv+FoAotTeGaD9LZfyuvjij3Ejqjnf64S/e1M\n6oi8DVD6HPsODZWl2uqQLi+XOyHJCnGZrBVCst0gDfTQLUdMHMzcH4EHXKqn\n56le9TqjYdLyCqJiijawI3OfBlKpd2/52Jz6+BhoymZpBt6PS3/2vSHj+dey\nVu0PTt2zJ0CZmEV6dzerDjbN7DkuW3aEgQj8tJZaA3S4kpJAdLpBFlrfiWmV\nmnu3bhomip8ML9bb6bVWrmO2TyjwckPpYkCww+E8DN+NtC1WXKSsUWJSNQgt\ne6b0BwiIHHN5kqQfWi/G0WdQ09cMgQ3noIGZY9qEue+Ie3ol+5rsa2DP3VhC\ntk84uNzki0fggZV9tw5UQ6QqgDzkefUeWs4qKJo4I9bX94a7wGjxbXVQ6Yzf\nSEIsDwc6cQLHK/QzYoIU4Wb9rzWv+dHaLyx0UIa1T1unTZX7V6ponY7A8gSm\ndUnTVYolS1PeurgxuanBSDPNJDwRSzis9mwgXbqDbUAO8qLyxm/i4KVhKpty\nwVmLJrRv9SW5deg5gVTVCMbKyuBTUtSPtRemFcfRAuWDSHRLDy81vGzhuuvZ\n8KGq\r\n=S7wE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b477a89c88c08d9d23b342624d4644dcc3c8f972","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.21","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.76-renovate-non-major-b477a89c88c08d9d23b342624d4644dcc3c8f972_1618689203399_0.7597323697540552","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.76":{"name":"@balena/jellyfish-client-sdk","version":"3.2.76","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.76","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4b3bb859395449f1bf2eecb17d13ccc31838e477","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.76.tgz","fileCount":39,"integrity":"sha512-Md1uxAG+1vIHT9Q26aflYZWir5TxhsU+MEeNmc66sDJ5n4eH64SKbPvYW2qJIw33ReRIFUwzSK8F+/+0e2sHgA==","signatures":[{"sig":"MEUCIGIlieaws7qpjN1a3qp4CyosXdBEVyWuqxs3tVHrEQ34AiEA6M3tkWY1OBL6qyFzb0QQpGwdSJ7mJRg+cofNpfKo818=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgez2QCRA9TVsSAnZWagAAZHQP/RvUUDMmvWhmq4/o+aox\nJwm9MbHpnJnZzt9HzvXalQcOjd3POEOqewW8IHIs9fKaeXlcZ6acHm7eb705\ncNihcYgXTNPrMbRRT9lVSzTsa7N6ztMuamxC082gijDPGXPb1BjAhSl82UfZ\na6/F6kJvP7HTb81Tegj2D+L20gA4g+Y10ce08ev0L2yk6rENOV0Eww9J9RLb\nucBPOEIjEYEAbq0qY3SPpxm0cyqOOiZ/u5++U7bR9IS5gTuTmtZZpsFqNk8T\nabd2nbARzsmu6rK5+pA/HLoFFDcgVwmtkDXtpDAhGgYAh8+76EAGift4lJgF\nldtZ+mz17MFG3vAQfY7wxnF5+FulPTlomF4Wcn27gkdv0MSt5vFGIS0sDeXT\nrspEiyxOwnlzhFEZmEs20yRz8mrbr8v+lDdcRSBz4IxPxtDkbzJTZ1kBhv0+\num7psfcMo1Ils4tDojkgZrKj8Rd0C78/QaEj/QYabcCPIk97Z1SL2R5YmYqU\nOrlqjcXb36e05SYd2+q8lY7+PyHLWk39tsQFcLYqzCZt/3eIW0KC2z5I6xRW\nslq6dH9Da6F/inoe3e12dAZpCxPQR9LeGKRq+lpD678p5jvqEky0pRVzcHI6\nVi1ao4I1m4QThTRSYr41i72MrPzMqyt0vayJBQpZwhAbNyHzIlfPKHjkLdBX\nZCIe\r\n=EsHf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aa13a642e32e425b6933e35fd502523708ca4831","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.21","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.76_1618689424166_0.6743521945513784","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.76-renovate-major-socket-io-packages-a8a535c2e30a27ff9480db9f23578a854df48758":{"name":"@balena/jellyfish-client-sdk","version":"3.2.76-renovate-major-socket-io-packages-a8a535c2e30a27ff9480db9f23578a854df48758","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.76-renovate-major-socket-io-packages-a8a535c2e30a27ff9480db9f23578a854df48758","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"18e9eecf9bbbc078eefa8e0a3cc3aefee87721ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.76-renovate-major-socket-io-packages-a8a535c2e30a27ff9480db9f23578a854df48758.tgz","fileCount":39,"integrity":"sha512-uPCdVy2pc7UzlIhX4cjE/8A90BULk58HBWGcOz6HB28bOIGjG/YFLeHhHiI1r+FISxBGyQelYrLmpIfgG8+Puw==","signatures":[{"sig":"MEUCIQCjUxkYVORLlaeu5c+55Wc6s4vwkDxujG5I2DDp1PgyrgIgeq59dSmdy4o2FCamGhJX3RsrAmphkmeCxNQ1Q6FoUdk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgez49CRA9TVsSAnZWagAAgjYQAIEc+DLG8Qe3eMD8+0Nf\ntIe/vGQoeBljfWleLOsRvSgijYqyXS0ZUV34tsAq01sRaNiN8t4rwUCa17LM\nQ4Vx4IH/8Tu8DtlDPED5mf6Dbsk+ampJvSWNgrTnMO+RE/mWw+fyquxFawMo\nE9ZC/NC+PRhW2zbz+XEBLbaZHSISPc1mwXY0eN4oCkdgOCVXWBHGjRYFetup\nx5ykKKb7kN9y+fmsdq5MnzO/mRIUNZUqSAgwRp1HPFA7YtvLU4dmrCH6MWjp\nW63QFa4a3AHdk8iHr+aOpfYsfjDU61//nKU2Ubh5MVyxskJTTdGFHNJPJ5ph\ng2fRrnRSMWCK56w3/AxgWwXkPlxCmnEmja3uf72g8csYNVIUFCgaDOFytt7I\n9as+bK8oh2d/9JeXZKHoizbpCzWD8YBHEi9Atu2zl8mtw+U8a3fxClg40v3n\ndYDYw3kU+JtnrDqSUIo3SfNl6ePHZp1VoLh/23zB2+ieVZ6mqShtGnt7/cuT\nNYQdRm7LnnpwhFGpKhaJIghfIR3060ecyj83j9VBD4Z6NR409LgtxrSW4W7E\nWd+CAsPYBdMK/km+C8SQtKwujSlvsGHwZMIsZ4AOxhSFeqrzSNBSVnRLSiGm\n7vZ5bd5iJVXqF/LjaxVGOGay9agEYflKY2rbXPwSop9xiiT1jvQqC5/Srm6L\nvsuX\r\n=lriT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a8a535c2e30a27ff9480db9f23578a854df48758","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.21","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.76-renovate-major-socket-io-packages-a8a535c2e30a27ff9480db9f23578a854df48758_1618689596724_0.5301296531395276","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.77-renovate-major-socket-io-packages-48cd8e24b5755e4d5d63088938aa820586d91a39":{"name":"@balena/jellyfish-client-sdk","version":"3.2.77-renovate-major-socket-io-packages-48cd8e24b5755e4d5d63088938aa820586d91a39","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.77-renovate-major-socket-io-packages-48cd8e24b5755e4d5d63088938aa820586d91a39","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"279ef1070c97a70cfda374dc6c9e2532fd89e27c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.77-renovate-major-socket-io-packages-48cd8e24b5755e4d5d63088938aa820586d91a39.tgz","fileCount":39,"integrity":"sha512-Lzi203/CO9ZG1J1dL4jz7h/YKdbAGOYdrThXxqYSFVD9G5VVDUnKqZEyQn59vREhF2TjP0OJH0xy6za0SNHMlg==","signatures":[{"sig":"MEUCIQCsyDxcbxFiTCXPSrd1YaexuPQDrCWbKciQQC1MwBYhnwIgZXMTzV/buWDAxZGB4O5aYIYmuT+4jhnjsodwg7Bvo7s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgez7/CRA9TVsSAnZWagAAf4EP/ipdBzld070OuQrlaIO/\ngTo8u2T5YvpYSK+AU6v8GkNIBi5MO7Dkgop++LBuB/hNSpG0CJilGbYYGJWB\nGy/CpX+fS7NC7fDjeEm5i6FXBKSvyVQqMtz4gBs8vZCgPc160BELsmBBXQAk\nu4l8henO/jR9E7ErR9+4iIZEINAMXashBekyaNCvFnZQH3BpQhGp9oqSKaDY\nYMvzPB4j67U6F4YRHPi6JOH+WFG6V0tm5C/7eL/h63vNcU9zd09ISVqdQD+l\nb1r0uAdccitNj3ATqEyScwwFhYQo/KbBjS4TgqlVU11DVA5gbBYI9W1W469F\nwsT9Zz5tTyG580viKOnaMUMENabvTY+JbLi3kJiX+nVK8qlNKMkTVPDFCVtZ\nX44krgV6uCMlMxHoScJ/2DsOww3t4o7jsav94NRQ8r06CTFw1IfLV+GkjCTM\nPlb9UE+8BQS+DQeXqI+lpvLYso4uLARrPO4i2EqOUtz63YrnWqBvY8BRPc80\nDFF8QUhPs3vH5N6JwzKago6TTi1s/yA3/33O+AmzvDFcii5Q7vpmrEiFMzUr\npGLK10txSTSVrqvnyMWv2akNvS2P5O7+j2BLh1q/H+EkmVnQnFzWsZDcqX2j\nk06pspWMFxr0Fb0p5uJ5lrqpw+S4rkZAMTV7u0WqPZOKAZtKQ9UN588piXGR\nT0qf\r\n=rX1p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"48cd8e24b5755e4d5d63088938aa820586d91a39","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.21","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.77-renovate-major-socket-io-packages-48cd8e24b5755e4d5d63088938aa820586d91a39_1618689790800_0.014760027457539238","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.77-renovate-non-major-57948913626416b49af5b72fa69452f8cc2bee72":{"name":"@balena/jellyfish-client-sdk","version":"3.2.77-renovate-non-major-57948913626416b49af5b72fa69452f8cc2bee72","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.77-renovate-non-major-57948913626416b49af5b72fa69452f8cc2bee72","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fbdb96e0e22069f03db6596af04579a99db40535","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.77-renovate-non-major-57948913626416b49af5b72fa69452f8cc2bee72.tgz","fileCount":39,"integrity":"sha512-qOkbNIsPortqMzcNvkYS9vIWUEJMXfAEniHeNNu/nQdV3vS6uE1olw0+bMxEdsUHh2aewLNh+Z0ODIBPWMgPPQ==","signatures":[{"sig":"MEYCIQCeoZY0ZPsOhq6Gb6x4Rm7B75xiVCIUYzZDMS3jU7eoLQIhAPl7as/rdTYIL9vlwLF1mzBO5i1XEJU3nt4Fyiow9yOp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJge1HPCRA9TVsSAnZWagAADa8P/37uP+Y9qmqlUaxa12av\nCQzSwWErseKkWJ2IBW5F4f3QE+ygIxLKrbmvsQp5ARslKu1TlpJKmg+E5jjg\n7YsODYB8D5gdX7ToNpcDtlBNIi1Ei/OBZ3XUIvdJW7qKuErAFWAhC+q4TQP2\nf91Z5wEuqmvk0cLw+g/5sixlJeqh9VBcwKDujVH7iSxWLFMq6i4r4zbwOqRS\n/+QfsKQZ5gfje+3Xp+eBvZ66nwkz32apkV+GJAbierxSv0WbWCvIbNF6A46w\nh6CKg/8/3bMhJsYGKSylYwHtoQo23TOZntrhFwZXImtC0EGLtgA1WDRHU7D5\nfU45w/OzqrrsesoXuDbNMnXoKVlqSIFm1HU0Xwbym+6bSAz9DyoY8AIpYuUl\nAoDYO+oMkJIBj6mISI6K9CIuXfoOJIyv0NTeVyhxvrJbufGuJHqzEzxSCkMp\nAyuxF/xEK/SSjNcOECnvtY5GEtWxXTZusdVRBrxs3aFYyrf7WaOqgsYf71wC\niT4M+c9KvbEEfS92WQ2tSzE0TSYltJQ2rJJL2/RgoR/QTpRd2dz0wcEOY458\nv1XJ8sXaqteSLmUenwzVL2B8JuZDJIEcUaAUZeyzIVq6FK9bB8ss5V+LnBqT\nMiQh5u/pCNK3ArylnGV0pQC34rpGR3K7AEml3Mzj/YytEHu+IXYldwwwjY0i\nwBdh\r\n=gfJa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"57948913626416b49af5b72fa69452f8cc2bee72","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.22","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.77-renovate-non-major-57948913626416b49af5b72fa69452f8cc2bee72_1618694606521_0.5652689721922315","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.77":{"name":"@balena/jellyfish-client-sdk","version":"3.2.77","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.77","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"65c68b15f10a03f84589e4c37259a1596e785954","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.77.tgz","fileCount":39,"integrity":"sha512-VsubZqFASqGNISjPMSZ0aoQwPc4rrVMSbQyENsxsqYVUfb2HHUy24WwevevikYCAOJFgeh6j2B/vIJHApAlV1A==","signatures":[{"sig":"MEQCIBfMNeByCrwC688klGzftL5KXY/glc4g51jU0SwKu8/sAiAwtyPmVY+hb2TPdxPHwLwT5CkqKz7Oep0gqIRkNygSCg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJge1KPCRA9TVsSAnZWagAAhdYQAJFcnFqJpuNi5aLkgbSD\nJj86+Jh8QZYhLbG24sJJ9rtks+2y7rU/xS2/yJLPMaCgnHEqqeUzKPkOVRIj\niAK3VK8qTx/e53Y9c72rVltXyX1JD//x2iL1qfVseTJLSZ776p2A3bqnt3Gt\ng7V+IW88MVbm6VgMppx00N3gxnKphUa5ZXZ8MdEKeofpNuwsJ+KMof4Tgrzq\nEHISTq557eQNhVeMWnF+NLTmZLS8ZSdrtWHNNG4N2M35pxwqpNb4cuRAnX7T\nkm0JTCMdU7kzNqmvmBdDA4y4N7SuY1xyyMdw28GHQ6RIrJHb5RTKeqRzWxNM\n6dm51i8fs0tB9L+JfRcjoGFKZ256WB0NWpnrdNGl4EEJGJ7ZHyx0ZDnrU6DZ\nJgH9kW8DMTVXdemtSz0Mkj+kjbL8aXaDNgB1c5GN4vqmkW6OdO9lxdRJYU1z\n7VNvgHnH/vYIsxXsZTO6sk6isUXr9leGBd4DdQBig5xzhTP3ezqpbchX7D0L\nRWMljwho/3DS9n/AYEF7MlukUTTm/fzGevfmugWiN7Cd5H9jTLjUVPywZcBa\neFlzbqhteyJUDdgYdyUwTy/r1dMQdwrEaGnYcDaWI6xkr3dUw2P4hGYLTGRg\ntn+THuGB7BFKBlCffgHMyh8b/WVbb3PMiARS82qsudZTNsez49OP8cwbA7tX\nllgL\r\n=snym\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3499bd6511b06340c441ec33d7480fa3d86bdbaf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.22","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.77_1618694798975_0.9253014983111574","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.78-renovate-major-socket-io-packages-165d78b3bd6564c0508bc3649d4f28aba6e87947":{"name":"@balena/jellyfish-client-sdk","version":"3.2.78-renovate-major-socket-io-packages-165d78b3bd6564c0508bc3649d4f28aba6e87947","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.78-renovate-major-socket-io-packages-165d78b3bd6564c0508bc3649d4f28aba6e87947","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d32ad248b9cccbb0dad34253c56fa8ba3fbd8093","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.78-renovate-major-socket-io-packages-165d78b3bd6564c0508bc3649d4f28aba6e87947.tgz","fileCount":39,"integrity":"sha512-cLMkl0D0uWkBZlrBYW1Fl1pApN3kt6jW2tkrU7bYqaM0cyEJnXA7v15H3MqzJftEbPEdlXd2fprLHl5mMIu9mg==","signatures":[{"sig":"MEQCIFpOm14LwWIdvdCbZl5QlAvWQC3wjkimgSvjG2vXxzUWAiBhGLpdox5MzGDHKaqG0MhrXalbsMxBjwAi+NpDhloU8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJge1N+CRA9TVsSAnZWagAAB9QQAIddEiKXk5/kTTlSpQyO\nAqbmEdHaZJhhNHHPzjUB3fUyeSY4bg9FT9h59x8YSmo3wdhLAVizGqlF3WhX\nmYD4ZaaCdB3jK0hJ6DZE1WRvb4C0IrZs6F+YI2Wnyzobvc0xx9YwTxBeyw4U\nfE/fGm3aBWwmyFh1xE6lOBxhBSt/m2n8BbSDqniuJH2O7kG4stUkjip/7MWZ\nQJXj2gR5HBWCtncY4o4QDDo1MlfYEqwG1nDVqrgwZr6b4WmxnwnawTLonkU7\nkUlWZFWkLemy8xURARWX24rIW1hiNZ9br3RMNnjDWwgiKum2Kq4hbrfNaYM5\nNEQleU4DXFbPPU6FjamTIsAdoLmWekcKtqbKDZsJzFM/Ulime/bvW5HKoszM\nImFT1Beq2OtMfh/d1iBVWgKI0JCnHEZclgENVi6ekOc+Yj0RLjL9XVWVvguC\nFuznw77FOtI3DXay1nfNXUWpKkj2SHBEhg3DzU/WzsJezFwEaOV0qmPCsvQt\nppIYjGNlbe8Ru529T4FG4ooTyRqA0/7ECWTz0iyl635v1IaALcu9Jwc1t8oP\nYO+2rS5xFabuP0vaEmkHBNdo1rgMKyZaP0Vat5lZETyHCxlZV/Uu3P690TDp\nyUbLfkIo4W42WJBdFGong6IJlmFlu1CN/9GEqWMkxjt56l6WmjDv5WV30bsz\nE89m\r\n=HGuz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"165d78b3bd6564c0508bc3649d4f28aba6e87947","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.22","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.78-renovate-major-socket-io-packages-165d78b3bd6564c0508bc3649d4f28aba6e87947_1618695037891_0.2904337647280639","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.78-renovate-non-major-657ad0ee9ae47a1c36c801126b2fbcfa065eb3cb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.78-renovate-non-major-657ad0ee9ae47a1c36c801126b2fbcfa065eb3cb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.78-renovate-non-major-657ad0ee9ae47a1c36c801126b2fbcfa065eb3cb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"092adfe2c57b696fff7e2361996630abd1ac9f9c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.78-renovate-non-major-657ad0ee9ae47a1c36c801126b2fbcfa065eb3cb.tgz","fileCount":39,"integrity":"sha512-1XUR0gfYW2tCyenW9IhoVOKFjxYrDhXfBd2tKhZixHZDy3LL1lRDlLTyqpGgiYBeemYurjel/OEcs31y2ZWzsA==","signatures":[{"sig":"MEUCIA4XnnKMPltuFWWtSBlhlLkBp5aN6slKrBsA3FX1THViAiEAisKXjQZnCqWSrhbAF6MCsaKp28fO1xXwN5SDuGiY68U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJge3hjCRA9TVsSAnZWagAARxgP/0H4RNoccrY3mhTSAwgI\nBBHmLZ2ryKHN9RuYRZ9SlKiv4bUyb6OAkjym0K6qHXT0zNVxeccI+IplQjnp\ni6LWa3xF+UOv5KVPl+ReGrJvajvdDp7f1ASJFwdQzu+DdnW8l13BEJry50DJ\nj+bMKVn4i+lS73hNOgeyh9k+CrsSNdB6LVpx5/eX5uOlQb5o6c/DxaNfeFeJ\n2ABYE3hyJdhcyIJa6bb4SsEv+lR51MY1gu6E0nt11z6EsPTyZBYtfAmEVN8i\nE3G+9pdXF3pzP9rGgW0AMCscJvxbXfy6we/NjNsYj9xO8wLG4fOr6nkpdGOH\n0fCrDzH0Ilwjl/ckPqMma3dx/k2OU3L/ie/FfWATWhOPGwwHuv7C5SQv2GoC\nHREVBYbl1ZLGoDCgMvsBpDA51ixRlh5gSAdjH+vzNiJ3gjdnSEBnJY1ANXyB\nT7gJAVDrO1V5mR8WzMB4W0HKArg+vqfueLAQ4n6WM3TnvNYjcdJFipP3lTAB\nVVShOxsDpfi9KGVRaliYW5VsbBYp02L5SM9H+Ftox8uOOIdkniVCbxjgkCHi\nN92ZmL3awaCIiPtTq+9KfWUnWKgAJoqsu4wtROL97in+YRzsdJvkKmHU6FqX\nf5NDt/r4ytug3t2wuSZxbcAP61xkBcCVnjDdsg/Gw9iCjGeYbQ+shTu6yHGU\nKFGi\r\n=WZIR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"657ad0ee9ae47a1c36c801126b2fbcfa065eb3cb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.23","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.78-renovate-non-major-657ad0ee9ae47a1c36c801126b2fbcfa065eb3cb_1618704483187_0.30237543047997106","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.78":{"name":"@balena/jellyfish-client-sdk","version":"3.2.78","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.78","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e6562221b47f1b802c5d2072700c8aaf27e9a58","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.78.tgz","fileCount":39,"integrity":"sha512-w0PkdSOu7UfowXxEp6xgJMkI9PhPxYajjh6uRhley4mDMShd+sOXByuBszkM7nMS8wRZERqnO5jlnBILPmlo2A==","signatures":[{"sig":"MEUCIQDxA4qN7mJlK1Wt+eOKPLviDhaKc345REf/epAR8z3MOwIgNwAhoXqKTdQUS2C+OdhlwAELRO8MH07aL82L6F9uihs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":236935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJge3keCRA9TVsSAnZWagAAQk8P/1utRcu8aSpiY7JmMhBv\njw5OB2szS6aajNFP1O9pV+l1kUZA6HmCqrFQ8PeKq3ASGpQ3uzGsngkfVESN\nAl3XWVqQipFOa9YpCn22ToQgR98udaGAOJvrNeVlgup8L3JaO3cte7uYJQZH\nRVcB3etRMWKd6hxgERUwGIbGZLKYglKnju3g6TBvw+B+6BhnwSO8woC4Q6zD\n8+K/1psnl2QMBOK5MpV9wRK7oN576A5hamU+IdMDLWbLq1jutiEOKElXKvTt\n0p9FHE9OCwzP9TTPFreTomva9vmJDZv3vOturLBqc/lQ+ptNhP9jwBZ/0a0C\n4xgCBXAZMKhti/WoqF93xfUg8vorkfJTNLBozX4r/HVzFVMcuw3/pnL5Q32C\nyU90MrklarqKpurTdphwzgqKHyBgIKFczBQuC+ZD+NE8nuLxNLS34r5Mb6vU\nNz4lRUCuOuk9tyH8GRusLzCtt9aVGA1+fY4+0z/W1NBHUwnk/PelNHjpVmAu\nDcmx7oBWfEVIknyOcwUNRLDJVjLRz1H2ZlFjRpqTQ85RiFqB9jLsj+ORtFWD\nDyy+HeWtjZ30sZY+RLw2EWSreJu7+Qy9aN/ZsWYpjH+UkuFvMZ78Ftemz/0V\nX1rDEakc8C7N6kQ/IA66WypqbqeBXcYtoqUGVNoezWMzLFqiQJQinZP4dR0t\n74iS\r\n=c1r8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b69f1535050581e842395a40703ee4117a560885","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.23","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.78_1618704669949_0.8291769020597557","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.79-renovate-major-socket-io-packages-beecf7344498c0b1129aebf26357afa7d2c41063":{"name":"@balena/jellyfish-client-sdk","version":"3.2.79-renovate-major-socket-io-packages-beecf7344498c0b1129aebf26357afa7d2c41063","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.79-renovate-major-socket-io-packages-beecf7344498c0b1129aebf26357afa7d2c41063","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e9b8d0818531c854b60d3fe537cc796937075135","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.79-renovate-major-socket-io-packages-beecf7344498c0b1129aebf26357afa7d2c41063.tgz","fileCount":39,"integrity":"sha512-Z4xdgaLGl3EPHJymxxM5V8sG3edWvZkaRg7hqF1lk/izkBOrQYthR3gbEzeNfgf3j4S24kruyMccMKH//qrIwg==","signatures":[{"sig":"MEUCIQCFwYk34PPtWC6dcCZlNXL3exAGTompCI3OOKc+XA4VcAIgVuuZiqvdWaSZ4Z4EA3E4bqgK4JSI9BjBZIaK84aZFHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJge3pxCRA9TVsSAnZWagAAa0UP/0vFE+s8mi4GOQ3aDWwB\nklEww8WiM2V5rMFJk/Mncr9XAn/MPFgiAoaFfxNs1rDTSunXOK9zehphjEFb\nA64h1NZiFqNhm3H8QrL+vyzj3IUy07iFnW86vpwQ1FtX98AxPfoTAVchRARk\nEiOPHajOL6/0QS2aQ8R/4SF4QhACWHVS5Qtx75DMnUqbK0rm7deG1d46Zwal\nztHB4EzmkKT+mV0Qe6dliWuziem9p2DzZSbjsdVMuxWuwDZO9P6grD+ZHjB6\nP1pZmHGIpxnoXhocMzbz3L1arbdGcIcfS1BfvSQZfIzI9cyT8eZqKfR+NeSq\nwoCTQ87fADNjT5f8sBSW0HC4eOikaW+QuT3zp87gCuVIfYDpy9OvU338ncfr\ndDEVOeZrC1sDwr28HsNsqgQahQ8QrNWdTeXoO+oNgAtaDcj/BBe6CGyBxj5X\nEG91KPNlh8ZvnidtU+KaTJq/ezsWnmFDryfJL1FIvCxL8JPnhIDR0siGXkE7\nQK8Y0XSJJP7O1Dj9LkMLWZkmgGK04hQSdvpRCDoJLi1Fi607uDapnonwTqF4\nmXE+WN/NH965tNloAiz9LB7lWVRS1auIJWdoY//D14pQM9vceBBBBdLqj52N\n5w/EvnF5+JfNxRrXk+FU02ngA0ZoR7nquEsVi38wOJFNkEkiYXF7+ooQjVu5\n52ZH\r\n=vlwe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"beecf7344498c0b1129aebf26357afa7d2c41063","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.23","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.79-renovate-major-socket-io-packages-beecf7344498c0b1129aebf26357afa7d2c41063_1618705009368_0.4701190706846794","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.79-renovate-non-major-4a444af4cd70013a0fb03b0f9782603bd758b1d8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.79-renovate-non-major-4a444af4cd70013a0fb03b0f9782603bd758b1d8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.79-renovate-non-major-4a444af4cd70013a0fb03b0f9782603bd758b1d8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"acaa1ab2a8bafbb36a575727e621d6e8845453e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.79-renovate-non-major-4a444af4cd70013a0fb03b0f9782603bd758b1d8.tgz","fileCount":39,"integrity":"sha512-+d+oNSjdnQqsf/JSGKd39x6iDLOP5Y+izPfzfEIaLST+8QcRv2LnK721Rtpu6T5eb2X/kTyMxCVLrG5X4K69KA==","signatures":[{"sig":"MEQCIF8OG1QX9FzJzZ8DBlJ+8b91BPByXHXtrAhPol9KdPpoAiBSGQJdiieGHIyEUtK4AI1+2RHFz6A3J4hh+5KmUsKFYQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237097,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfBBhCRA9TVsSAnZWagAAR/4P/3REmbPcoR1unL5519by\nATPPGg38ROpjD3o8Az8Auc852zhvJeJ46hA6rDfblYzEvblhFMscaGMFe/aU\n03g2EiomE89SVuTFt8HSKEFIKQ6xgrN7pPjBcAh9pMC8o8NVJ/XzIpvBOtlk\n/wUSLEoC4LJyzijzegKtfBnWA7qALPWuX5RKuWfJMre1OHqW6QqxrJOof2p9\nEE9EO1eE6HxStVQrE2R9pK7P2BwtStNNy78hLy97NODJJMiMF3NghpUphxIS\nyNnK5kwJKUduBmCexNxJY8k4wJ80xOa9FrX7p8KY0b3rCJUxjn5FXEZS1DPi\naKKs0Ztroz4g/0MLifg/4qBJCj0jb9pp/MYLpYWGUgXhYUP6fwXeRnaYOYXf\nYnh3hzZQzYLyLcfiSKQhE1r/iShYfKfAbZ9+azclEYMm+cMLKBnhMmAOHYq3\nazRAWV+iPWL2pBXVaGsClFzXLvctUwsQtdJIh4Zdt77zqodaJAodlbaagqt2\nXIYuSHaC8Nl03qmD79oywFoZcAiGdGQJQ8fPJyc+xgSjFBygcqtj2LQoPtPG\neVhDlTEXn1EHAvD1XomGd3oZ5ZZuKxIKpugKo0nLNuAVwg86vv8qfwjXRPdV\nOBbzxQMBTO+MdiBwpWPxFQNe8d5SpN42KB4NXRnLfG1qlGcWReaBGu/ckoVq\ni5TV\r\n=g7Xg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4a444af4cd70013a0fb03b0f9782603bd758b1d8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.24","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.79-renovate-non-major-4a444af4cd70013a0fb03b0f9782603bd758b1d8_1618743391379_0.24842049512490316","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.79":{"name":"@balena/jellyfish-client-sdk","version":"3.2.79","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.79","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0aae6a38ce83b01bf013c921d80ce8941c053f38","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.79.tgz","fileCount":39,"integrity":"sha512-V9FoKZSAMt06lDOauJwssh0AlQBfR8DuFj8Fk4ZwsXNvUMsMzFD+sjQaSxz0Ik32f4Vi3yzLzG1iQd9jOY2DXw==","signatures":[{"sig":"MEQCICM4KmaS33Ecza2RfWmfiJjGZW6+s7zXmFqI8Jm4GzkOAiBCN8BIljZssEtX9KBml5xv7y8srvRQKKuzJ4cTeL1vrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfBE7CRA9TVsSAnZWagAAwl8P/0EFLN9OVASJ8rJ0AzU7\nuCUJw3Y7to6rxXvo4Q9Ao5XgJTmP6GWPFvPRrd/IGmGmiyAoiDQB0yaPsCmy\nzWLZTZ1hqtsIb5RAj5/wcWO26LdkSY9I9OSnNgOK+2y95joumGrq0oiUxDR6\nkSrZMZnCl5MSJSTsqePky8xOt6a5ZOcB70OdXNbSv1m72XatOPoozbBAJE9e\n/N+33+33fTxhaS63pVOmdsunMmFcGRAI/eHqIVuw6qSYPyI5M/RPE0Slx4m6\nkQESzxiDnwBzNoyDxEqIGX0c++kYYNXNy+engxNK//58ZBZQ09FOsOLiPiZG\nD0lbnvSUKDcFkH5Q7xX9QPaj3SMV8poV5ogCyF9qGtb7Ks7i/3AzFO3f49AB\nB9YqujLH8Do5KaC73SRL9UkRtJD+vgP2Nl2qZuU00dsTtV/o0wLHyY0gb2hE\npT/2vJa2sTI5VDPKI3uhVAAO20r1XmZPWMoAeuMlF5Pn1ZhfCCLjx7HqYtts\nnSf8CD0nY8I1W0c+TbiFMveVteOhXjX4+x/o7bcKnPkA6GxMeAoEHJjMuzE3\na3U2xGXjuexd6URhvGsyJ6gaS76mduEW3LtlMkqohEk4cs2uAcT60t9tbAFt\nMFvk8Qn0MTr3hLU0sBPqIyyXOrQcrTXPqHCcUIrShnZyPqztHbgLzOLYKuJF\nFC9K\r\n=g2EZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"086f992ea804586bfb1f11620fa2af2488aeb1b0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.24","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.79_1618743610456_0.4402083480724044","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.80-renovate-major-socket-io-packages-6c7e6c8f44f5d4a4508fdcbdfff47d8c95e6c36a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.80-renovate-major-socket-io-packages-6c7e6c8f44f5d4a4508fdcbdfff47d8c95e6c36a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.80-renovate-major-socket-io-packages-6c7e6c8f44f5d4a4508fdcbdfff47d8c95e6c36a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aed4e427e47a00ba84f69620462ea2f18a3cde31","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.80-renovate-major-socket-io-packages-6c7e6c8f44f5d4a4508fdcbdfff47d8c95e6c36a.tgz","fileCount":39,"integrity":"sha512-/20cjDt/gLFBriMVWCEAy7Di8uNXMXVDNmnH/IUEpHw/YiogzY29O/D5+bXlF8S+QkT/Sm4876VAYcfnJuEv3g==","signatures":[{"sig":"MEYCIQCJF5yx4hcVNxZxdgPGRhPT6Plx+yo3vZ7FP5h8trSu9QIhAKQ6FCUXPoxHYy5qtmqC2W2L6SN9JnscxDFaVnYIc1UK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfBIACRA9TVsSAnZWagAAKVMP/064gui5zT51EvcfjJNI\nBxBuVOg6R49YDcJwKRhSKVCTP6HnYCfjlk639EP9CDZRTOThkrn6Q94RXWnC\nAjVVdEvWYqbTSDNISS7Ro1R5o0AvR/SfzdHUmnnc7IDmJOc6MiyeHHgbtW1p\ngp4Z4dekxWIxKL8Jmffv5CnRP9lWq3ffL1/zUYvIB724JnI6Npbhxpr/w2NC\nAaumLqAyzbuzJkeHnIuIT6PkfxbHTZ8Rr2V4lsJnw7u1OALAqv5KewxGhBEW\nzbq286liZx3NByVkV0CueJ8r2Sh+7/sLb5Mjm71hI+DGWbdr6YzpcOxgCZPF\nf2m4XvVMtH5WuSuaYMtZ5Fe0/WeQw/D2yOVWAzH6FlST/0ervsIyQyQpqq0p\nKxxAapxDtoldPJfbx3LQ7w+qJKPXsiunPSLTm7pBsBi4xhPH9JC21zzkCBYy\nO5yZfb4icWyqJtNOwUUne4HEvThZ++YZbvOeA+UCjiyCy+IKgDx21QptPTw5\niOCyBa6JN9qK1f0Kyh33tLNfe1zXkSDK9IgBo3XR3FAyDWzmmU+DatcOsY87\nABETmmt8lIbQr2stVcwgsaP8CeTKicAnx8bFBkzQq1hVczCOg8zfcx2EOXsK\nqhAH7KczjgbTrG4LxQpeFgZ2g5d9yW8IN4IO/e01HuRcpuBE0VoIk5DPKFPu\nJfJl\r\n=U9sh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6c7e6c8f44f5d4a4508fdcbdfff47d8c95e6c36a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.24","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.80-renovate-major-socket-io-packages-6c7e6c8f44f5d4a4508fdcbdfff47d8c95e6c36a_1618743808083_0.24950317807588585","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.80-renovate-non-major-54800d0d3b0ea656b3bedc553391fcd1777d94fe":{"name":"@balena/jellyfish-client-sdk","version":"3.2.80-renovate-non-major-54800d0d3b0ea656b3bedc553391fcd1777d94fe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.80-renovate-non-major-54800d0d3b0ea656b3bedc553391fcd1777d94fe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3c989176a010986be0b9f641a40d7d17f7f65dfb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.80-renovate-non-major-54800d0d3b0ea656b3bedc553391fcd1777d94fe.tgz","fileCount":39,"integrity":"sha512-vv1b/zxY3GIOdEL8dcH0mzb5uLso/eSe4YFMSmWeNV5EGrL/lM23gq0VcI/b+mA3aK4Jnrr+dotdUGsKayDBKQ==","signatures":[{"sig":"MEQCIErINrF4b1KXTaUf5SyeDSF+qspCsGOG9WcVtlQda3HZAiBUAqD1g9eTGJZj4WqWIbJake1pyJDQCCWNM/kTLLKVDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfCwZCRA9TVsSAnZWagAAEvoQAJdtnY5EdNvfg+dlY5V6\nTCG3hEPkH2PCX5pWek8cxnR+D/wD3jPwtHKBUYG3hPX+vlNKw9M68AFl76VR\noEaXqZLXyk51VhZHhZ0C3Aof9bHh5XI1TbAfxUZBQmQM8V9Z2WLb0Dr2qoYs\n59lYJSvFamKTRFCXJcB6hCd86U5HBzzGd1ZxEhEx2/pz2MQMn4/6OXVDSWy5\nwDsGi+F0D08LtWpO5WZPINP5pucD4BvqgSni/cExIZlxKUSTgrPcG56qPmQZ\np4UJJu8Jz2Yt8yLJehaq0/d9S0Nzhjq/PXSOtrBVsRbWsUiD4/UNbF8trNQ5\nd2F19IpCLVImxb/PODC29ZMS0dxV5tGBQFnRB4Dp+0wI+Mj67eO1DoLPNGWf\nLk4fAFmZDCUefznnEgOWCR6uutTO7jCk4zICKEi6niZuW3yWst5ezztw58+a\nRKgvRs6izw/eAHtPe/czzzlgg1LCsk2KUjJ+3ri7/MnHEdPR9prING7rOa04\npZkoMUYnf/J+X/IuCs7fyHaNGeVXJ21ncI++YadaFCW3pOeGoBBNEvmcHJMu\nmmnufxWGlVhE3Gb47CCzvQYYbajG1tk2ddP6fXf1ITIFLxSJndHxnPN84S0E\nsIIeYDKPFckFpRVYssHBDmEgMTuAUNqy/MnXeOlCo6evYGBq5UUGWCHVwhVV\n5ynY\r\n=3bDX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"54800d0d3b0ea656b3bedc553391fcd1777d94fe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.25","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.80-renovate-non-major-54800d0d3b0ea656b3bedc553391fcd1777d94fe_1618750488826_0.00013553496372531448","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.80":{"name":"@balena/jellyfish-client-sdk","version":"3.2.80","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.80","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"374d3ec8299a5473974b3d18baa41ca37132132d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.80.tgz","fileCount":39,"integrity":"sha512-H8s6L5ZzM6VAHElC4uhdjeWEKuFtkN1OMaguxgvbvb5ZCjy6oKVObtw8ZAlbpKBeiDmkn/3Hkmt7c5JsR1wpOA==","signatures":[{"sig":"MEYCIQCFOcVBiJ/iL3mrmrnlxWR11p0Wz3XDhSjXT9q5EwZuQwIhAMDp6BKGupVTsYDXB+ChHCX9Hvr1exE487D8w6YdpaDj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfC0ACRA9TVsSAnZWagAA22oP+wUxGnqpZb7rwW/RoprW\nyVKwxOkQUPlGJBs5lOWCVWfESTCY9P5hBNIjvq7ZWGUiMSf3hbcEm9pIGLKL\nnl060AY9JeESxgtXUCtMAnwfP1MkHsuh+BhM9R5Y9XVQxZshTHWvDmE0gEbA\naq80yyh59mYrJfip+XCNk54T7nuwGL3SU1OOBQfXdRhdyH3KOPgAVA1nnRKH\nfDyd+bDdkAoBqPEt0TVJ7EQcJtZXoKIA85Yx0fgg+sL+vYw1MvyOv8RAl5YK\nRR5Gvi4EiRdLg9eWI0DUyhEPTzdoFt0KzX5+zHbqhoCGj8Gdf9lV8wui4GNJ\nfr+JDO+W1wIpScX9jBctoI7t9iblO9wB7yrCGIl0/bmEkytXnUQiTMLzKIpz\nDbZsqivIEhDdOgmxvFF9npx1infdltqmHtRDEnIlyd4sAUf7ict97Byks1nC\nnsc3jFXYZIHgsjTcD/vx9Waxe18J7tisfcaNRayNM6sfgC7ZVJoFHHFrsiVD\ne8DJPYAegKg0fNdGJPfS4pe4ucU2Q4sg2/rDmSwasa5ZSahGcaDdXBp5LIgZ\nf5yFNiAatsNNDsDqV2R7lSaVryvt4W3u713zSilrpUlJ/7y1ubsNv064ibmq\n8lGFz8giBu60J/pQUOb6UzhgyDp1YKG3W/kg28wsFfyjaCtqQLXetMmzQPFN\nVCjY\r\n=+uj0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"175d4b5f0f9572fea258717192fe8f3975ba0bef","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.25","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.80_1618750719998_0.8904748877737918","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.81-renovate-major-socket-io-packages-9e9e8554330aca25f74ec3e5c6d7f836c1b11687":{"name":"@balena/jellyfish-client-sdk","version":"3.2.81-renovate-major-socket-io-packages-9e9e8554330aca25f74ec3e5c6d7f836c1b11687","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.81-renovate-major-socket-io-packages-9e9e8554330aca25f74ec3e5c6d7f836c1b11687","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"765e52261fe49ff02b6a0c61f91dcde7c794deb7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.81-renovate-major-socket-io-packages-9e9e8554330aca25f74ec3e5c6d7f836c1b11687.tgz","fileCount":39,"integrity":"sha512-Hb5WYNhzfl/ydR83wS6vT8uoKHTxfZsfbuXhISpXvUk7u7wmP6pT0/9A+js0O1ejy673FOuA5QBlYSC7hLXytA==","signatures":[{"sig":"MEUCIEEagfjHbrGKVjYv7h+WiIUpxO06VfC+ra5zTJjOWDdJAiEAj0Y1rSKXQX6ZA3/rcmTxnkGrQspl/FuG4kzWhqBxJNI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfC6ECRA9TVsSAnZWagAAlh8P/jYvk/dU9LrnnitWV906\nPewsw8AV4Y7j02zDFFUdIvd2vQaHNLLN6N2L0XUUE1eOxr+UL7bQeE251Mf9\nXcKSqlZmqLTOkj3GfZ1YVNDusu1xeDZDVfocKDFZ29KDrEpzsy91n1FoJ5zH\nbJqN0yY2TjrUUprjMo3TwT5ERSmOcLxkYdghPCiHcHHIPKbxr2z+LN5B8gQq\nwc7Y8FJhKkjpdyC8rD2rs9iIX91sYhg6wZNu0+NT5gixX9bTFCZkpR1t3kcG\n6xI47PiNhCkIX4LfjfELTWDtENa7iDpDUzUphDARHZoQwTipwLoHMVZNYQJ+\nzsZVOEBfgKTJN9AkGUUQPdSWxpGdZdTxnbCylUy3TLudy/hrLGe7ngoCdgDo\nNKYAGuPiofARTIPQN3YqkjThbZ5pd8nxjuhD+dk0jXdWArS90s4tT2HVCfmh\nY+6X/UyIQE10zVXneoSjGMYd+tyEN//ZdJfnhsKCsdHFPTRPR0+7MBFL0b62\nUE7iasCRqlT4YMkTHn825jXcyrxyEf4JSBH1WbJbXSzSHUy4ZvAWINsflVMz\nu25LDW0oX0dm0v3h+IMqWr5UkofQndls0qfwtFYLyQcRcv2TLQmbTsgAargi\nrcMQ5KDmfv7z5f1p/dMyWgy5RlhDD4GkkR1Wl1GEvmzb8gMUKMsWZylOS8cm\nIEaQ\r\n=p5uV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9e9e8554330aca25f74ec3e5c6d7f836c1b11687","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.25","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.81-renovate-major-socket-io-packages-9e9e8554330aca25f74ec3e5c6d7f836c1b11687_1618751107858_0.3689844475276749","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.81-renovate-non-major-c9a89bac581da14eed6a461a7d427671dd04444b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.81-renovate-non-major-c9a89bac581da14eed6a461a7d427671dd04444b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.81-renovate-non-major-c9a89bac581da14eed6a461a7d427671dd04444b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"26413b002488dc77d54015c2f974017acbfd2237","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.81-renovate-non-major-c9a89bac581da14eed6a461a7d427671dd04444b.tgz","fileCount":39,"integrity":"sha512-FOa4bbw6+slic2QHJ9+GmAubmbkoxR8EQDkAsOzpnnffy9muqM8d1EMc5nx2/wa+J7X9FbSlxgXyowBlU281cA==","signatures":[{"sig":"MEQCIAiquJTbpjBlqLAhM12KRypkxwmIlSzXitWWIL5Y5RYKAiBwTtuU9i4ddULRVgR93xbJ/Hr3AhZ9GW+kDVmOwWKhTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfG0mCRA9TVsSAnZWagAAY/4QAJa1o7hzdMPgwmz+/TPI\n7hRfA/rpSHxNByaKMFnHo7SbvVYS+Zl0nAZHVPldksGHySiaTUcvQ1uX9FTX\nXkdpgnecTGbrxewRSbHYqzGJGyIrteidffZ1MUj4XTI99jNr002uqGpTb7Hj\n4DXXgYVBCRBgC/TUjxceWPyjzHewb5Lx+ISqTW0sszXJWlWySkNi7WcEBv88\n8EQ6ov3cdm1vNlDuAZfXzjHIfd0Yid7+68fSKLpDiDHwiFjRBxXDNuq76/eM\n52h6/syki+Xpi3Da9RC8QuCYURNvgWZlkInsaL9hmkqu342m5zi4re8iPdxY\nCCD/z8slIaHSEBrwzpLMErOkTj6vk6KkO0lMF8x2BwoK9SKi0ISnvtNZhodI\nfE/atqmRD1kmkdszt3MGE8t0nZj6nrioD9fwI5ungc4gvV8CYbkPH4fZwtei\nvcLkmA3UqMCAtMyU9Qeswf8aUild6mG8d70xa+5HUNJdEQd4qH+XXZEL6doG\njoiplk2K/zRf/uOL/R6M/9pCKMpkwyKheFHb24SvRc15/JUShIyM/hSFKz68\nf4i7s0VkocmwVvKTq76bUBDeojiwvAVs+WcZQX3U49lNHX2ZmiWHdx3Mntwf\nWF2TOKszwLWJobINsidzzlGE/fbr7DQ1dy4w2Sw4B7RSIjG9X9QYr6cIjrbi\nkSqw\r\n=d4f9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c9a89bac581da14eed6a461a7d427671dd04444b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.26","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.81-renovate-non-major-c9a89bac581da14eed6a461a7d427671dd04444b_1618767142094_0.28016021009205416","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.81":{"name":"@balena/jellyfish-client-sdk","version":"3.2.81","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.81","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"26442c7c6c1facdb486d4672313950af698128ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.81.tgz","fileCount":39,"integrity":"sha512-2zpeNi5Sg5HwP6kS+NSQYD9eCDHshB6NqglRfRdpZjGHn5pHWZAtWXkpUFext51IUQsjUG3fikQ2Z1h6kl69VQ==","signatures":[{"sig":"MEQCIBYDmMK4wRIgpNpuu0BZpXC7ZXbZYGtZudXfC7ND+0HqAiBMtKBZ3TjxcSaqxtZpAcjtkiWJjJy384wjvIbtC/MPBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfG4BCRA9TVsSAnZWagAAHxIP/3yEqvKAlR9bnG0rVcna\nCJ57GJyIqWE8DZfpQFBsz9unJFiMvNXyqEx/hlMajVu6qKxEdRKhFlNy0Yn2\n66+9aKbQy94vTmlsXU/zWYCZPC+1yymQvGdOPEiRawYdKiW8hOGafW6op4E8\nn8YeSDzPcE+vKTiRE3VP+Y1EEl3f3e2KMeQvasaLds7ySEGa0V3uaotkTAd3\nQtYU9c0uQIHaPbiwxkTXokTXylWfPjDJPVL1NY3PEvKBo9+/dRgoelX2gzwS\nw8prZcuqymb4JCwMhC1NFAym2sHTbytIYb7hLmirbIufx+9LoO3CzNo+u1/4\n7P/MNzfZsKb57rCUy9FgPS9wA61HXevhZvPshQbG3H13iY0oD4Ocl+46siM5\n5+qtFuyEUtUSSgRKxCY13/qUTGKY3q+pRc42MAw0Z5IdYHp2imX7Kv+/zFx3\nd4CWSreBu6SIH0bX+1e8FkQR6xa8l1QoIwlC64HgtILdkJ78qnG2Z765g4q1\nyREaM2VeZKAOCtoglgLA0wS9LuaWNU7MpzJFughwFCS4ZLcWnCFESHgRKHZG\nCpM0oEwLJee1Vu9ZYmhwLQFMeO8woWUc38DgrFtJm0+JJEkt+k4jl74+YlwL\nudyCsB+mAxckEbFxKUn9v170eMZirw6CqG/c1jXz3LemZenDSSl2jRJ2qeuI\nxkuW\r\n=hKN5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8a65711bfb8bcd2467b5374428ddd5bc65498dfe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.26","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.81_1618767360904_0.9127842044238588","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.82-renovate-major-socket-io-packages-0dd1f7a307974e0e71693ce794b4e9cc9cdd5726":{"name":"@balena/jellyfish-client-sdk","version":"3.2.82-renovate-major-socket-io-packages-0dd1f7a307974e0e71693ce794b4e9cc9cdd5726","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.82-renovate-major-socket-io-packages-0dd1f7a307974e0e71693ce794b4e9cc9cdd5726","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a4a698ff61d052c5007252a009c9f3ed9689ff26","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.82-renovate-major-socket-io-packages-0dd1f7a307974e0e71693ce794b4e9cc9cdd5726.tgz","fileCount":39,"integrity":"sha512-HbR+j/2vCD6FYhudlAJwRTCpsFTeUMIOmYGvOaEYyj+1t59HUbtFgHd2YYpJ2xGRB+gcs0PHahAyoicWf531Og==","signatures":[{"sig":"MEQCIEN4BpJN7x4cfual47tPEpFyDhTgLqrAWQnVRDjdbSaQAiBooZy4eEFqwGmfn2st4Bq++BBuZjxEBQOol4W6TXe1KA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfG7LCRA9TVsSAnZWagAA9i8P/iyCgaUw/6Rr8Dxnm5+B\nDIKE8vJxYcxzTOijvqX9jz7tnfh6+JQVsB/O/O+UkUucphkQlMBT7+sJF4g5\nJ2VxYwdV1IMjEyYiH626J8ndJrSLs44dqK3Yw+VhFH0xFoU7sV9AakS3B/Iu\nROQYBG5KV31j10AXnUnTWXOjzH5p7wLnIk7IjMXFQEtC3UuNCgJ9AObenH4u\n+lAeTULGxMfpiQrrPGnueNNiPV1nVujLNlphAwrLSq4YMExSz/256cFh/2sR\nm29R37rCY/T1mgJ4IGlyXTrXernaCsTaFHAbJjPIHvdaQLdbVRlP6WKeh/jD\nWPq0hUBKRV4J0b7x4S40WXdULrESIBA078w5+r59oixqE5yVQtARoEFjJak9\nmsNTzNzTAhsE65zXv33LtNx4T6a0eNguFbRNwUM+eromijYFRhfqRd/jhrUT\ngTXOZIpOBI9L8ZtT4BwnDUSWEFAu46Dfa9IyodiOPW3U1Ff5jwt6u8+Wjl0E\nWubfjobP2/J2T8m0Tt3LpWx/6hv2rDVw/hzCh3/MFNjQsEF8GbjKCpzAmSZe\n5Mg5a4YJLObLNeYyVku/hPS5ChDqk2Ir2G4WhzJd54yWb/Mojk8qMxx/wTVF\nIW4HpH36qboFF3Q6QCC+LWn3g38WHWCpy4HIkE2VyJffDbyLpDkQ/mv/ZmtZ\nzzUx\r\n=TJiP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0dd1f7a307974e0e71693ce794b4e9cc9cdd5726","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.26","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.82-renovate-major-socket-io-packages-0dd1f7a307974e0e71693ce794b4e9cc9cdd5726_1618767561941_0.16243125868958286","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.82-renovate-non-major-96d48f20e44bc4e325154f1947b016a5cac25ac0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.82-renovate-non-major-96d48f20e44bc4e325154f1947b016a5cac25ac0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.82-renovate-non-major-96d48f20e44bc4e325154f1947b016a5cac25ac0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3bce9b91cb9258932bd204e4f528363b64f3fa8e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.82-renovate-non-major-96d48f20e44bc4e325154f1947b016a5cac25ac0.tgz","fileCount":39,"integrity":"sha512-XmbyMODLbVlbynCGScl885SiJjy6YcpsARPiKldUtWhbVKXBLxNKIfj8amQKZhK284gkl+P4A00i/anfe3ee2g==","signatures":[{"sig":"MEQCID3eJcNAdkGXnsFwKoQJdkkcZO7hMtwy4NBnDwwbdKx3AiBk9qrp4gjtXuDZGNUUaF0IGB0pxZ/9TSqosMxCoG4y0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfJZPCRA9TVsSAnZWagAAp0YP/1c0i14nArNvb42LIvMl\nMzDGgfIPhDzy4wzgC528jaaV2pGAVZzs6IsEpnOmH7GvG5pATrMOXDsM87WP\nZNjH2rxnP09Z+KmUtAg1ThXVLj60LlyWcbg5Yw42rM55gbkdbL59gyk0h9jh\nJEBy0IeYKJmfEiBDXGarAhcDPEIwvUmpNRjShS5wemT0dnsfHNCWgJ4dLQhB\nkFd6wS06jboLt9eG7T/FzzHMOvDU7YP00LBl8EPM7rUXiIDXUvZf/M5dUpcj\nAeBGdlBTxZwfy3n/rfYaN444aZz54y2Rvx5vLe066bCxqE30d1dN1QAXT+T4\n2BHTiqi+cB11eIuxLY2hrR9ThsLbE8HY+Xd6/54jr1QSF5Y0e0/dBMwhx/im\nttGREZ2lRjeV+/oK/Lo5V6mDy5SVgrZLqT9NubLIXWCcXI+OKUf8LQjTdFmt\nvml/CLGLyTHUtaqTzHKV9i5EnT2HYgPJ94Sf9G7Y/SWBoBorb4yD0/HqJwAw\nOOgrk+iwwPXMFsaUzKmGJwbUGZgnYx6AWq3NxXJq5Tq8Fa0xbP9uDXSkO2hu\n4EMl+H6QEMPoZhkQCj9kC3r0EV7yBghPAEG1m3wncKcoSALzYWv5CJ4V+e6c\nQcdxRVGleMymeCtuwasMdCLqjoZj4R7E8qElKdifzfP0z8t7NSC9H34wrgO+\nuc3x\r\n=iww8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"96d48f20e44bc4e325154f1947b016a5cac25ac0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.27","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.82-renovate-non-major-96d48f20e44bc4e325154f1947b016a5cac25ac0_1618777678508_0.9183490946736352","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.82":{"name":"@balena/jellyfish-client-sdk","version":"3.2.82","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.82","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"29cb693db9f8477c001e9a5771eb58029e3e8a24","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.82.tgz","fileCount":39,"integrity":"sha512-8ZvsnFmR1sXrZIE85rTsTEya+Bmxcu0zfKC0H0YzwO2JnD0n8QH0LOuTwi2E4PnAunZnx5YKefIRjWyBDsh47w==","signatures":[{"sig":"MEUCIQD1/c6xgXmZ6mi8/c0s/+4TkuLst3l6PH1seTuWdYI77gIgAiGnVFE+uVz/S1DqWGhJO8/X1w9XE+lsG2nM7KHNFZI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfJcQCRA9TVsSAnZWagAAQd8P/2R7KGs1E0CzZ22hFxPm\nLdky/OWo/lyvqywaSjZRurzxf0QkofycR3FnAggxVVLNmQZ157rdmo9DC3sy\nq/Xsdb5HOfe2feBleTUeq9ELrL9oRDbnFW1Y3DkHWLBnvUbl0daxBHRHnGSf\nI6YI7glTyIkXpzEac81LMNeIpiYHmPIWszQ1W5mpT0GHhj7f8edHLqIt79Lw\nKWxNasZONcjS8B17y0PaqoSPaqYWo47z4vu3ueERYosfM1Z4qUsFNLKZ/Qn1\nsrgDq6CjPOA3xlsZs7y4KaxeoTakbj1RrMBpVtC7FnbaTgIBUByCB79xNuO5\nxihLh1QaE9tppsPOSnn/Lt5BilBOe0ihSnV5X98uDYdzYNilcdfdmzp7eRpk\nmlEyAsS48gFOhk9BJSjtih5ZIzL3Ff9XK+T29eX1vqTDYqRx+8+dffwdThJZ\neGskK0w/oscqLHG6EOZf3Q5pSLZEVW8WPgUiOQatEIq3KRXwLE59saNUSamW\n187syDP7biKOz9sXs7c/Eyi3AJ4PgqBzCk6+8g3zKr0rNziNjJmJSnpFPgOS\nXYxD6FN6XX2tw+5KCdcWNSZtBDk5h0v8InGdVobr/QqxMXJzOHCLG466KidK\ncR0Cm/ULDtiPeGGGGYZG3vwizOZQxZAwxM+3x3calu1zI2i+wBC84pawlLQh\n7dKL\r\n=WXt6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"56dc440483013b41f9cd3144f37f924aeb0505d9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.27","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.82_1618777872313_0.16177256469076529","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.83-renovate-major-socket-io-packages-2603569c9ccacfb8ee75c581e68287213724689e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.83-renovate-major-socket-io-packages-2603569c9ccacfb8ee75c581e68287213724689e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.83-renovate-major-socket-io-packages-2603569c9ccacfb8ee75c581e68287213724689e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"83615fdd29ce2680c067388f1f3f601e800a2951","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.83-renovate-major-socket-io-packages-2603569c9ccacfb8ee75c581e68287213724689e.tgz","fileCount":39,"integrity":"sha512-Ok/PaK910ur12k3B4CiCYH8d92plz3SB3ZkvHyLjyJ70TrescYkqyu9kEnyN82S8egfff5kQPs3mWahz8g9s+A==","signatures":[{"sig":"MEQCIFDoQ+dkbTwzxKeMf05bxDOXC4q7TZW++ZxuzgElUnGzAiA/1MCq8QQM6+CQNniNcM0k4/uo0tTB3PEnd6Ao3X8S/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfJgBCRA9TVsSAnZWagAADJYP/ierbH5PiUsDdoSDeQe2\nnNBBxV9KsYgAMT4pZvXBOklvpWROFtNghYXhTcGpgC5ll1AuHQTOZ1zL9G7v\n3ty0wTVXBHCn+PVptsZ1aYoPmOyrtuAzNV/nqKddDNq5Y7FkusB/cXo02+QY\no3mmHGmB8ezgkblVHwd2SFTLoeNALMyzKTjezRqlayxqsSxNbCP+3F53QFSv\nmpAo7i6pfel3suMfTHSarGAFRvr75hkbX+xSooY+0DRyPcEcMfyQvnw7Wzkw\np45dnq0pfG5yCUlwcv21k5dhAuBGeiAg8A9o4mfeq9bAzgA+noT8ms1urYAT\nDJ9MpctyfQq1Eoh7t5HjmQHL4dXughjW3RlqCnhJ487R/yvv9GMeegECbodh\n1CrNuSsIAG2KpV7unt9wBVjW0r6yojFr5tfkA/K1OdQdF3tIE4uJ92tD1zi5\nfE/3PWESbYWMhKjZIKixqvKUKvVZI9US0QD1tOYk5R6LHSNgfr8Bp0DwyXcv\nKTd2tO+8zujRTIvxghUJhjC/0eYG4CW9d5yqajfrXRaXA6u/nIbYwtxkcSir\n9YESFGmLUnhwJRK6QIpTfRw4d77EFjSKVgP8rseFuf2DqTTGJOVRN49H6d+x\nsZDzyddWtaLOdZb9dcPxbnUKCu+2Wsgg3zNJNf0fEaH2mq18ia2dM5jmeF5k\nA2yD\r\n=qC1p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2603569c9ccacfb8ee75c581e68287213724689e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.27","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.83-renovate-major-socket-io-packages-2603569c9ccacfb8ee75c581e68287213724689e_1618778113005_0.7763721425286754","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.83-renovate-non-major-cd4ef0e26386fb4fc98036e16f0e5c0cd446c768":{"name":"@balena/jellyfish-client-sdk","version":"3.2.83-renovate-non-major-cd4ef0e26386fb4fc98036e16f0e5c0cd446c768","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.83-renovate-non-major-cd4ef0e26386fb4fc98036e16f0e5c0cd446c768","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"496a616c454bc7c4b377d47bc7783d07d292eddd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.83-renovate-non-major-cd4ef0e26386fb4fc98036e16f0e5c0cd446c768.tgz","fileCount":39,"integrity":"sha512-usZYHPNCHTLZrN4//3cspmlNp9crF3WS/pwLcPoOF3rNEBuKjDiBzZQpDvhR3e793T0KUmUbsCB1ACSbm/y3Mg==","signatures":[{"sig":"MEUCICLUMFRA7nwfT/nOtoow4rFI0O7ZQNspijAMerPWsdDPAiEA0NlaI4InV7/jyCqSDpjg+4Y2/iY9K9kaHvnTWMEsBDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfMJoCRA9TVsSAnZWagAAPiAP/A+gV7nkuP91b5hOe/Kn\naTpdPh/wosZiFQmD/p6gnH72k9PADwYE7FoSU5V0JcEdSD4OsPm44U5Ms7G8\nTsoZpzhOFyOWNETAQbJKrKyqX6XZ1QnhweuG/SlueG+MZGsM2BT23d2Arntn\nKozfm2lbo/qubyv4xy9Z42Hgn/PPLdOjVCpamUHKzYUdy22ai+vl180t+sQ/\niiThGfLKM8ILa8ut2DUd3DUQzyFNu3oK0udQfHaJ5oJD8efFRyMA2avtkh96\nSdZhSxrDB1QB9NssWeKeL1WrRzBGSJZlbAQQk89G1odaCZXttQ0ERGAhbz7P\n5ufW248lPEEsRTYANvu4yR+tXxmTYK4aJDn0eW4N7n6tV/E0WlWgFvSeI5V2\nqnFxZRTHA/JX8H41I/vxYxeQUKLfXBBWc0dwXJC7L0OAUEy95CS7HNjs3r6j\n4XkuAxmPmK5NoJTizYDGQJ5ZLpVc3MwcFBt3F8kPD0lFOL/64OVVbZ57vSjf\nBTGyBsZNKy+o45zzglYf77UPEPnO/pQ1+DD68UWdGIhqHc4HD1R+5lIgeNF5\nn17u5Rosd0/WC7wzkahZhiiGFWN6mCJ6LTHM6NtHQyxgUTyhpcPVxb27mxl4\nunL5+Cc8yT8VTFPTHC8TZqquBRgIZGv8Dl+6kUEtbVbbcvxmfIOXxKFNS+N1\ncwqP\r\n=gGQ9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cd4ef0e26386fb4fc98036e16f0e5c0cd446c768","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.28","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.83-renovate-non-major-cd4ef0e26386fb4fc98036e16f0e5c0cd446c768_1618788968089_0.013678860347712929","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.83":{"name":"@balena/jellyfish-client-sdk","version":"3.2.83","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.83","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"47218c625ae6e2e5dc72dce6ec29c775d0c4296e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.83.tgz","fileCount":39,"integrity":"sha512-KEGVeyRhzx1pDw3Lo0uNO7ne8t2HFUOuH5YQ4DQn1TUaYIP+F9IsN6uu15+2Z4kFANRpTGe35YaDQFEPWMlshQ==","signatures":[{"sig":"MEUCIQDl0kXszWdlzpRx3b7ObcviErCFVDPPQX3gKaUSpB2WbwIgUvX50PrRJ6OwF1CZbr1p7QjVhtky0Fhjd9A6tvytWVQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfMM2CRA9TVsSAnZWagAAqe4P/R+I1w0+ESCW7nEFmtOZ\nwtolZugwdvQKkS5vzTnC3fx8uZj4NwuYRGbRHvy7LHu93Ex5JizvGG6/WrS8\nF6GomJADwBskcZj3mZ8c/UyNr6iR75/AkG3AAn+UCnbDUfoTDlwps4vkYujl\nNBxehsvHhwY4YdinDcY617CWAx6zOUA1V56RY6JnMqsjIjGnoXuyfp8cU3WY\nAG9RYWJO7fF4PoULgDFgj3czrUmpaeu6F1jVfYw46XoBVH2w24iFxVcjay+P\nm4u6Xo4dJcCsbK/VbppcvYetGteIWmx9SGn1ByOR9RLEbvI2sGcjcJNLSvHt\nickvH7kqgqJVHUJsfQj6cXQzubUz6Ew+3diLSMO8TOshMiUUqOXnNARdvtPt\nJteyYK7Kx6eOhJf7ZcUOjgLbVOrY7shHl3hmiEXHgHwrYwzZ8wokdgQ8wXdI\n86Azx+YsByldpYHNqA7YXfbpd2prfmCZw2WTUwp6Ees+obvBxAM54ag8FXeR\nHB5RTbyZxD4Z7gBVU8Tw/m90N5B0iB7RWs6HvZ2I/r0aBOngAnqslc0cEdh+\naUit6EtiKDU+x5bTEs3HLBkgHEH+GkkZHZ6+7h3qhwEZL2QhS08MqY4CScCp\nToK7XBA1v4rWG9TP8LS+mRHXRWikXmXIZ2DNts3xNuxewlnRA61AgMKtjG0x\nsJpU\r\n=dVk6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"639cde7d0fe48639965318363719b60501fa15a8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.28","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.83_1618789173788_0.6027706857549653","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.84-renovate-major-socket-io-packages-cd7e229a0212a18299cbf8cab28067545ee13a57":{"name":"@balena/jellyfish-client-sdk","version":"3.2.84-renovate-major-socket-io-packages-cd7e229a0212a18299cbf8cab28067545ee13a57","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.84-renovate-major-socket-io-packages-cd7e229a0212a18299cbf8cab28067545ee13a57","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"62ceb6453833e04c8fc005a62353615e98de48dc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.84-renovate-major-socket-io-packages-cd7e229a0212a18299cbf8cab28067545ee13a57.tgz","fileCount":39,"integrity":"sha512-2tvagbxAqwy9hU0sqNF+HQnnm1MX7uXk8n9GCqtc2kHHWu/+Kye8+H/J2dA9yr7uJxWor0CS7BH62E+l0ZJEjw==","signatures":[{"sig":"MEUCIEV0o3g9EO7PPdDIWFSOkiVAqbJ7MEeBSUIZVkbotq5EAiEAp6KUoGndj57md+x+QsVsX/W1EDk2z/HDR48CJy4LSFA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfMQTCRA9TVsSAnZWagAAbTYP/j/PIheuXq7OpRBdb5i3\ndtqmAOzJjcxDZCv/s7OOgpUX23hcG6IC0hiYPRKga20yXgFrqzeTQXdl7kce\n8rsAFT5naDKOyhPhZWwTCDomcdczkj/Xiae1k6wTysbush/NfYzUJ2wIndDR\niV3aIQHSq1YX14StVcfEFNJcXuY/srKb6p8DYl4zhgkWKb2Ed7sOCw7ws7rn\n6PlNzerZ5/RsrR7/Mk22QcwYsH4zF/dj4T+ti2yNl3wqgGuMj216M38GPQBG\njUte3PItek3yuhfkPsDPW307Xh9TlrounWj6tuHJHGhFC+onOsbYf7oWz8/z\nnNOpscLtLyWKrrn6L3dzCBEd6V9wdVUn2MSf9CJCBaplkGt9hnH1diq7xiCJ\nUl49qCS8mC2tGe1AWPHffnIGQ/+reio0BuE1JrKx5s0PbTQhtU2m5E7TVvT1\n/bO5A3TegKRDqiZCuvYdVdObwNKqYYTkx/EoRO2+gR7cETrEUzY0tSv0rAhy\n8UW0+10OECnHh4rHMrtD+mQfJo7D8fwj2trAc077fCR6ooJN5fObQ68ZXdHH\n1wgiXeIwf30ikdCei2RhV1h6wKhuo2qEkwdnOk3fojB4HX1WhQU+KNtPl4jW\neMrkmAh5ISOhWCDjorZPVMqyO9k3id8jUQRzDyQDJy8ryi1Emk/CRddlzbtu\nRtII\r\n=uPXK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cd7e229a0212a18299cbf8cab28067545ee13a57","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.28","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.84-renovate-major-socket-io-packages-cd7e229a0212a18299cbf8cab28067545ee13a57_1618789394708_0.2652749406017354","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.84-renovate-non-major-ebb6bb714167f27bcd59af69fecf417161953046":{"name":"@balena/jellyfish-client-sdk","version":"3.2.84-renovate-non-major-ebb6bb714167f27bcd59af69fecf417161953046","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.84-renovate-non-major-ebb6bb714167f27bcd59af69fecf417161953046","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aebd2643bf57f685b9c5023d93316c88c8547047","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.84-renovate-non-major-ebb6bb714167f27bcd59af69fecf417161953046.tgz","fileCount":39,"integrity":"sha512-pgn/TEOmHvoScOAqlGe+cRK0YbrjmwKZIDee1DCPdUy/RXs9HhdHa+Qr4OkIsXtIOmFr2N/LQjfY9LKOefwXHg==","signatures":[{"sig":"MEUCIQDpafZGJpuMbRzn0Pbx9NMxLiGALYhHRIB1khbqGXb+owIgRGe83NsmQGPaEVsxCBJGZVZLyw/8KDgvb1+kZ+5tekU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfPpcCRA9TVsSAnZWagAAyp0P/iJwPTeXK2QL1oheW9Nw\nfSVAjrmQNeLYmv2vPoN4f5Kq/rIuQ4hGPivmyRb+p/JaVzka8k+NXwG9JAyP\nwnL6/TLwHXbO45qk8S5f0qUBmn6qmLusoye6oMtZ0Ior+4hDWImcVgzMOf+4\n2tHlWGCwlOVxijwj1r67ZhL12U4y0GGJBCgvEIcoMNbRZgVrr0YhQfsKdp79\n4E8YOXQISPbqTdIieKwQd951W9m5vp/zTwIOSJRFx61ySRgkITJMWAOTu2YA\nlRud9yINaDVb8E9RabMui17kfhyRYKwCjBbg0BSWfwNzIsxioO95ROOCQEvg\n6U/S9Vju90MG4DyQIl+AWn018qirdEDHxljcHmkmWZrfZEWGWBK4k02O3tKE\nz6MlFxkvmfELRu4GJu2Di0a6wTq9+rlqotOd2Y/u5Rj8dkUrAj0JvamjbPC9\nzE3sRwEC/76KZ6iAmeBzOMlibg6UM8arXy6RCtAmgci8ZxqXBM3QhBHjhrlo\nuzp3CKTslBeJBEt/zUIO5fZXmLuThyYImRrywCmq0s8G4x4dpaFSGV0Lz4j1\n/q9fMYxup+oInT3uFGnux5oUXLhWr2WKRzzNeVheEcH95Z0QIjm2B8RxSXmp\n7SzBW8eboZharTcwvKkEP12CSMjBQrIz7UAVR3H2crBAjWshoIeavgXjr8pU\nXvjH\r\n=G41C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ebb6bb714167f27bcd59af69fecf417161953046","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.29","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.84-renovate-non-major-ebb6bb714167f27bcd59af69fecf417161953046_1618803292124_0.5734005316177262","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.84":{"name":"@balena/jellyfish-client-sdk","version":"3.2.84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0a0ca627d972e45f23c82783a006a580596a20fc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.84.tgz","fileCount":39,"integrity":"sha512-yGTF7+6mG0/n85PGXjhKR1RkzI6UD1X5uq4y/80ypE0H0LPiFWtD1VNiZtkw63O81w7grxwB4GYKfAgO4wipEw==","signatures":[{"sig":"MEQCIH5clJjD04YC9CTcPs6UObm3wjGvx/KqZ7g4XWJlOQxuAiBVINq3Oys/H6LdIAlzM2KVn9vi4pk8G1Ub/a5B42ZIAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfPsjCRA9TVsSAnZWagAAyYoP/irYulLSdSZqERN1TKxf\njFsIsQBNzghSMub9aSqMl9M1uILs2Dt4Erx+Yf/WEwcs6Owpl3E6XLOK9euF\nDgNFQQqlLXNT4Y3ZQMpV370WIQkWnyDMFIdmBWi3Bw7q0hM8G70l1Mm12DDs\no8b6KF7Xbx3K9qlaSuRMz7gC2Z/zhwWjRsaXHCG6JYJUDp51Qx7pxxoCeKdL\nS9BeBLI5JGEak6uTeJKt+0YKT9WfxEHrTjF/NQd5wFEE6oKIfRUEJChslwiD\nr8xB9JlFP5MN5sRO4zoahxGFQPbpiAh4lk4QzP8V/Qxa7z58GghYy1XfhA1/\nDICh6zSb8mx+B9aiQFG9/BBvmnsLIRym0Ht5mhQgxYAhPZWzKq/VUGLGhDK6\n+ANDbMMFKsdg/hOPSICd8DiMZsB6J+PfbH6+6KYNEdpURPGf/nhlznwKI/kT\nuD/jiLQyeOLliZ0k7xF/y0PiUGHeb1+s/06wdl3fDSnz9e+aGAf6LySIBNez\n2hwoWXbKk/GrJIX3YkvvBGRiWo3rjEY2Cauavf63cRAdKHULBsqdEZT9HdR4\nA41nkZL2I95Nu7Yhd911n1LVOW/Y2SbdK1/BF4RuxbX0LzGkOXDE4ckOM/Yr\nzyiyqvv4oG5skVO5CBrgg0MmDTHa0SxgeJrsd7DTrimLiPLn19VVlBA7nMuy\nYbrA\r\n=7xwI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c015829dd4154d2b9746aa3e74e94b259e2c72e9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.29","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.84_1618803491266_0.0166732677247039","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.85-renovate-major-socket-io-packages-225f0c17bb7c26babcab274c14f9dc0d91fd1959":{"name":"@balena/jellyfish-client-sdk","version":"3.2.85-renovate-major-socket-io-packages-225f0c17bb7c26babcab274c14f9dc0d91fd1959","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.85-renovate-major-socket-io-packages-225f0c17bb7c26babcab274c14f9dc0d91fd1959","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a6eb466ad6d46d303b38c01f92f0b199cfbf6488","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.85-renovate-major-socket-io-packages-225f0c17bb7c26babcab274c14f9dc0d91fd1959.tgz","fileCount":39,"integrity":"sha512-Azoz4R4KzKrb3oYxJ3gmIcXixgwN5FMRfbAn+FuU9c/9HqUWfQRqvAAEiXOA2ewttiqGE9Q12kqxE5ltEOhTVA==","signatures":[{"sig":"MEQCIFrCip+w2+62IXwzzyPmPz/GmIw/V/8on2FyyPyMneQ/AiArgX8WZZlX2CTNGP+ejgwMlRxwmYuHZ/IetrxtjBlj+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237712,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfPwXCRA9TVsSAnZWagAA6YcP/0ZHA+Egp0ns/ttHIKwU\nIRZCp9AUJN0BB8wNie7p5XhCEjnroP7+BTtrkzEjmxQzPnlHpygvwGJFsx/+\nc0426e6oI6t8waM7jYshaMXr2HFiOf4B4PmjERIPsL7HbhDa9cAXx00Zdhvz\n9oEIBKYbnvSgsQ1vHxkoZURvZBpH6L4CHIDC0lIen8ik9xsyYdcMyeGVke8+\nVZ4hiVOEa6Pm0ljEMznRw5xZDGXnnvKN5p+lJs+t58L+D4l27ZNAFWIBuUvL\nzrK95NPAXdwcBMMVFpOi5z8DNhDZp6XY2ZiloJJbF2kWv8s/bapgBq7jzDon\nsQ3HbJLceC4eH+aC+CwQ/QWmVdG1JV7TPyZI11vV+VMNHRPZD3XmbQuGPyii\n3Str+nCM4+O5ii0/BZqWIC1/o4XKmo+h7wM0rU1hO8axE9g7MBuyH4SzsLyM\n0q7LYWBHIfepUIuKWVcekN062D2cnXwtxABSfPD0yYiLNg9sZ0XjMpGxE2xX\npwPAlGgs/EZ+9tFJrmaTUKwzdl+Ko8dsGWp/meZCVbdCe3hNX7xM8ReZmqxH\n99ZWEhVNGTboVBvSh5IYI6hSP+8g5JLrIyWfSwTdsdWF73ohY+UUo/T5zQ6V\nTaREGdvDEW1ueqErZmayzb8enfKmVBK64U5mOuMttGN1dfLyIi3Qx1o6j6dc\nj7AK\r\n=AJxh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"225f0c17bb7c26babcab274c14f9dc0d91fd1959","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.29","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.85-renovate-major-socket-io-packages-225f0c17bb7c26babcab274c14f9dc0d91fd1959_1618803735309_0.026463673102842922","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.85-renovate-non-major-389fcaa3c3cb77c2bb2916113efe113c7adebd49":{"name":"@balena/jellyfish-client-sdk","version":"3.2.85-renovate-non-major-389fcaa3c3cb77c2bb2916113efe113c7adebd49","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.85-renovate-non-major-389fcaa3c3cb77c2bb2916113efe113c7adebd49","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a678402ecdb05410013f6523d4ac172b22fc9a06","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.85-renovate-non-major-389fcaa3c3cb77c2bb2916113efe113c7adebd49.tgz","fileCount":39,"integrity":"sha512-rmrcmwhpI5TLchx46aIksfPlg1EdvRcPgVPi1bZFkmlZc3zkWuCrnVEbcyHF7DhsJ0Tr61W+c5JT55Rym+axhA==","signatures":[{"sig":"MEQCIEvxFA1dvJEFkcSojlAiY8AjVF2fcfpykOZIyM37gjhIAiBWegzgg45Do5jAmWTNkIrd0O9yGHgIW4rV7SditOk8FA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237709,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfYnsCRA9TVsSAnZWagAA6oAP/3nRy4RwKQ+J/3hjLh7E\n2Hs+6JgUT1ljidND3sCr424hvv2rlcZfr4Nds3HL69o9Vx/nOWQ65cWR6Dcv\nZx6K6hRgRwClPAQmXOSV/IyUBWOR/7wBEIakl7JERTk6L/RtFyjbCNxZQQaZ\nzVKlhcsbM2mnMe8HyFgcGpobKJwpT02VCv3VIBQuUC38CaMxEtaHouZDNj+u\nlrUDa4fv4DSCB6x9k/ON0qAgcnNebZMS++ahi6MPLTFT59YTwAVnQu1MFrMi\ny8d1cgTX+p7BLXzGRJLUKzCoZi/hzQ2B2kqm452XfzkxctOT2Yf/4HP9Hs+l\n+h0lLVtUtuaKQlZQTzc9hadQxrBohcT7TJWAb3SmXBtvSf8h7pBWywSIziDv\n9fvIYoGZqAR4i6wBZdcc7ojQYGuJTtmcsY+K6zv0m13topp3Y9F/jbLdQE0E\npuH09aLyED1Jc9zoDWdkljj3WU5YF/x+7hhnuMEjekqVz2UfzrUX+U6GB+av\nhhOqdB05C0qgiaeT+qrnP2UDbA+EZ8pwUPFyzaWCxc6WKxVjE5/rPXOqkkc+\nLZzt58iAEP1aUdeLQk0AeEwEH2+MHgRlTGg6WIBKKjHxgiXSz8QDeV/mJvX4\nNXXy4Cs4D34BvUEah/VVqDk1nw2HN9xIfjt+h/Q64NI9f7ugwDvK2DrYR7bj\nzYW6\r\n=Lglc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"389fcaa3c3cb77c2bb2916113efe113c7adebd49","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.30","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.85-renovate-non-major-389fcaa3c3cb77c2bb2916113efe113c7adebd49_1618840043707_0.9454963615876519","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.85":{"name":"@balena/jellyfish-client-sdk","version":"3.2.85","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.85","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"20a31ae72fb2708ac3f2fe532560ce9b7fe355d9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.85.tgz","fileCount":39,"integrity":"sha512-lcNUsSpzi/BXEwj3A88Hypw4HXaD2+IVWxo6EIfgMsnAxu80YA2iD94xZjimWGqrKi5d1AtlMEbvT9kXsOAxmA==","signatures":[{"sig":"MEQCIDSHDP8UsNJZmAzyvPSRbf8t6Za077pQDysGZo2HGZnHAiAbXTVY1h00QVOsmYigSbB5uXeVKH44URW9cCmYBS8OOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfg4LCRA9TVsSAnZWagAANP0P/jV29vPOx4GXqjww73bR\n+vUS/zR8oCE9cgoE7Vr+dsg7a7c6mIWRgfsyGHAR/DRtrQTWsNDQ/JsaVIiA\neGrvFcwso/jMPGD768c9RHhpTorO4OEeQ4qugIAFthFFOsNJOwL2CofjPCE/\nJTkib+u7OByup4CN10F2hpTZLUErZV0EPGbPAa17254tCja5MGH1MjMTZmNV\n+qHrMPD7nXkgexjfyxDmqgrGN8bCGzr4OUJoE7W5gRtIfdk8W48IfmO6Mrp4\nufhvtBrC8xe8sohv/Buiokq04geO0MJE60nxTQ1sNR3SO9mek4y5cps/XlSa\nat+/oVqkzvifE6Y1x1iGkC/HZMvB3zz+G+xgYEmBZlfQ2hsUlThejQe4LEfj\nYjoigihO4SmpAYV2dmgxGpDVo79rJJMjSTPTNggDBnEgKYq24IZN0HaPjsue\n81evObAwQzHHLUrrWtXW6m03TnoMKa2txY3Vwzh66FUGtqd34pOYKV2Jl2TY\nW+BKVlJJTZ1PuGKeIQqzCjgx5NnyGE32oQHEws4Mko+efAUJLzL15m6rYaqm\nui4GiPUt0U/JlxxxO0DlV5QkDccKRT0PAHNxquIgG3Mwby/pjampxNZspblB\n5fQIuLHmOFmHj1dUFlYlmQHP4UZDGhAHikcA5w8a99LwcK99hJLS+QIGKCRU\nTCQk\r\n=iHb9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3cece04b4112d0317b3d691dc61685b436b7b513","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.30","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.85_1618873867474_0.8336851151503375","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.86-renovate-major-socket-io-packages-f8632b9b092a5fca5213acdd6b2fa1ff1af6c914":{"name":"@balena/jellyfish-client-sdk","version":"3.2.86-renovate-major-socket-io-packages-f8632b9b092a5fca5213acdd6b2fa1ff1af6c914","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.86-renovate-major-socket-io-packages-f8632b9b092a5fca5213acdd6b2fa1ff1af6c914","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5bb080536f7d4ffa39bcff9bac317352c68e1742","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.86-renovate-major-socket-io-packages-f8632b9b092a5fca5213acdd6b2fa1ff1af6c914.tgz","fileCount":39,"integrity":"sha512-Q9yoTwPxu2ba2cVyjWSHoPPDkjLNEyr4bcUYHuJ06/+SIgKHNW+TPmltPKhd61yrz46dzTpDBnw9lVMxCoiLlg==","signatures":[{"sig":"MEQCICUuKjk3CmCHrXwi1MLGEoSPZX2L1DGZgOPAbp7a+jp5AiAwLlnNf9Y3F6Q8HggrjSy0sAmSufh72mGoHlxBdm8gDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfg8qCRA9TVsSAnZWagAAQvgP/iV4xKzpt2RKLd++csVg\nDO0glWa0R1wyXTKqLwKa5DuRBWrxPWrOr8isNkxDIKLtvve/Hqq6vmEaTgTn\nCVsixUTIv36XxH3qs1hHqp1FeIRF4iRcKL/T6SCsoIVqg/vV6HdRHcgi2cQl\nAYAxGapEY6wOEdxltrVenew0CvBE4XKQYPgk9TO8WwwSYHbJxTDaJa0WEMPf\nC67Nk2BvAkO+1ihC3WKxWrsobNMy4z0jcW6VHpWM8v5kmzG4uC4v3TsFIJGy\ngtZHRisc7+p2SqteUOTm7caBXO5h2M1dfUhrsKvoVt86uW8JnPYmg/4cAJB2\nltw7rAZRL+wsJqf2aknYQ4soWz89dM1tvlm20I+q1G441DwGG92/fbhbFx1Z\nMCjJZyYSb/AMM91CCWXZv3GbI9oAeh+PTsBonRsJgI2lrmlQrS06nYUwEB3s\ne/HbyOcAkickQt5604QZ/W222b7a9n/TYv/Nt9veNqT7fKSFTRRwpTkczQ0p\nvZbZLX1xUHhVYQBw85xmyNQo7sCwOcsOsRx7Yexckk6xoeQVtToWi9fNK5FP\nxA2km5cc5ZQaijg+8mlwRxZq0X422u00i4eoMuBZrbVYiCgd+t+K/wPr5FBI\nAMPA2o3lSzcV3kuMvh0VRxVtQrdKlqKNq3kQOVkAlHas0Px2W4YVbfI26Uxk\nASWC\r\n=OZ+S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f8632b9b092a5fca5213acdd6b2fa1ff1af6c914","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.30","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.86-renovate-major-socket-io-packages-f8632b9b092a5fca5213acdd6b2fa1ff1af6c914_1618874154421_0.18258193302028136","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.86-renovate-non-major-ea7f62d822ba821e52c5f10a2473edd736b46d8f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.86-renovate-non-major-ea7f62d822ba821e52c5f10a2473edd736b46d8f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.86-renovate-non-major-ea7f62d822ba821e52c5f10a2473edd736b46d8f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"501977397e462ef6581954427e3a23a40433df9d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.86-renovate-non-major-ea7f62d822ba821e52c5f10a2473edd736b46d8f.tgz","fileCount":39,"integrity":"sha512-I3gUBhFZTqhJSB9SfiUcZ9Q3704gso+WEmh84tDL6SR3lgOo30xLfuqE4XRbs+Z286PI/UAo8ntxIZ7jLK/e+g==","signatures":[{"sig":"MEUCIQCRRnEqdImSGNF3zzuWrzOlKA2iIUVxH/nV6LAiMisNaQIgbPEfoZRfqQat7AVYo5Oeaa3xYCn8LyE4C8HrXgyTLk0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfjbQCRA9TVsSAnZWagAANRYP/ixF5buA2oAOWYmv04DN\nUPREiPUBIQHMw/rMZF8aLAdC2h2vzOLwlpuAZpRvhO06UAKeEa2vcEizT+YL\n+blNbSkrLotReQO2IVFdUuoGA4kXrJF9jwNvqUdncSgNfhrNGzezk98dcPSg\nzF3I8LlwUM4+enDlLbTI33gI5JibV0UU79oxaOLEs1CuQJ60OOlh3KbuUz5V\nbfVWYdwIe0u4b7ky1f5dVDzDYcSJArUzqI9DomSJFoEyqx5+k7gTwCMI+rq9\nD+kbJds28EqMoV6zJqSccHH0ytXfb42qIgz2DYJv6wGmLzOGkV6atHKLEmvR\nkv4wOxtrEXMzo9pw5WwfnSKHLdd7Gixzc7PN+nnkrJA30coaOtZUCK83hmx8\nT62JDbeqYMCybRXv6afCdbg/fEVjh4woKfcpicm1lreY24lwxfV9Nsty0vvC\nc26LfeIvBO1i3DPLM0KQkMoyJveFfHe2tnAi6RstGUwmInd62AmMt2DF1PJ5\ncygRLrkaOSFBaraSQpBTJ1XKb/Je0OJp9+UxeqFrCGaKSMatO7Dbs/3khO4W\n8t8/v/x6WiiCATJLNsXqOqnd/TZ+CsysxwYS/CyYSBES9Y4pWSNN6wI3UANI\n0GSirfX9TjIn2SJ53Jg+SG07P5O0Ewe83acxkLnFMHfimEL9ewauh2KWoeH4\nIQKC\r\n=c8r+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ea7f62d822ba821e52c5f10a2473edd736b46d8f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.31","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.86-renovate-non-major-ea7f62d822ba821e52c5f10a2473edd736b46d8f_1618884303466_0.753424185832599","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.86":{"name":"@balena/jellyfish-client-sdk","version":"3.2.86","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.86","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"584c475c18330e4c4db2c7e3d3541ca42f322ab7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.86.tgz","fileCount":39,"integrity":"sha512-Q/clMYctFmpmKCvIgnCHNriLtG8uUDfGXoNu+tUY8mZAfhpLx4zSpFO50I15b0l5ZjfxTVG7K+bBXmzRgO6oDA==","signatures":[{"sig":"MEYCIQCmeDy9XYgMg9n3Xm6yAoFXUnQGMSEEGOiuaU0Ei4WxsAIhAJSjSRME//s5nRSYXu/zaB5JwsLAxX5fOmOyWj+ySa0e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfjflCRA9TVsSAnZWagAA1sQP/jdhwXnTOko+/IWFjSU5\njstZtbQRhuXNTxPr8giy5R7GbTMsWOhsehA5hOlZmW8XPOxpM/iaTh/b37Bj\nT9Na6Hxlq31YsoaErWtiBiqBvDouOdQL/JjkD2EAuMkjXoJI++GU6NAt4sL0\n/E/RvFQ5LEmVFqO5+e8dhpOa7yFfs1eQaCyV2/P34SN4gdulwyggDwxN3QKS\nakpZfc9EuaIG9orYLx0u+uZxFCOTwIG92tduqzQfuJgFttkixP1Q9hBPDYZ5\nbQQhlSamBBFt3ZLsv+xAZakRra8bLcUrmkAufDQlduu86269rlNNocKOwqMg\nbkum9cokWoV3I+A/uuigPktOKurG4NpTqVnJiCFiGl91ctBFVzaaonyFCBx2\nYny598eVPQROtnRNLf9amT1AiltSocBWgpwqeXmnEKml8gWXA19GB2nd9z+U\nb/H8wU0Q4xFE8eRszJO7iRWDTO/3Z9yb4uxfndRJDfn1gSScDyXT13xuE7K6\nc4PpEjF3CZfDXuFP4xEPoQznt+PZBemTmMLc8WUtck+PrltIsfCyWxV25ncr\nmmbpHFH1suyf2Nea4+SFoFWYBkx4ONgtJels4MXWejxvF9gbjakGB2X8LIk4\nMgSPjYymv+YtMewqIQ2wGftIBbN4hTWoXCE/sIfhkPP/3jWrVfgmRdxVV/Oo\nyl8x\r\n=pKt3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"11abcb265a4445bd69eb924ee8a23ed873b67c0e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.31","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.86_1618884580963_0.8183334784527323","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.87-renovate-major-socket-io-packages-90a2dd9f46501c2eaf706ffcc14f88b3af4a6dfa":{"name":"@balena/jellyfish-client-sdk","version":"3.2.87-renovate-major-socket-io-packages-90a2dd9f46501c2eaf706ffcc14f88b3af4a6dfa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.87-renovate-major-socket-io-packages-90a2dd9f46501c2eaf706ffcc14f88b3af4a6dfa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b628a2cf27c6e39f419253b97f1ccbc5dc67b8cf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.87-renovate-major-socket-io-packages-90a2dd9f46501c2eaf706ffcc14f88b3af4a6dfa.tgz","fileCount":39,"integrity":"sha512-UOAsa5i+u/zNBgDlExvIct20qtOKb4S3XGaNu7bgbYNQOXRYpbApza3iXGsxgQ6lMC76UE5YHUMJQ9kmXfQJKQ==","signatures":[{"sig":"MEUCIQCVmEBe+2uLSUVZdPwF+2QPlRI5yBDtiIL3gPPrKKeqVQIgDnu7XUZMpHP2TDtcG1XZX2mtFdVxJke0AW+ZoBNCOzM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfjkuCRA9TVsSAnZWagAAhfwP/3cm0iEj0DpWBRvzQEiU\nZ/c3Xt65FkF3v/sXARDAc2Pm+oib9DGPNb7VgcXeHzg43+MS6ljYyqHf9pwI\nYbcvn9mYIAfBD2rwOl5uOuF3WKYHrmSopy//3IoxDEWNvpODSwUbcF315ikb\nd9mecct2/5MuiVx573xl3ZbMYkWYVTYyux5aeQLbnzI0SfIPvQhEilcJrbzH\nk7nrqMjmCZUjpIcDHCuKXCVymhl77PkdlUPRw6UuYSSG0/RrwVD12A7eEc90\nCC869xmw3+PFo8BidXgCumSwv9RBRkqCeKOPsPGpvjzGysKu14Y5AxpYY+4/\nkUqtXoammlz/OlLYD2ho0u9hjzcjZB632H95aDaXlWpFkxrMzE3kaHIK+bga\n9XRud1a3QHVrQBZrYD7sBpVRSXPCu3R/jrG4WHoQloaru/vxOfj0I5APMnaY\n5zcIjfO+zGS1QdLwxEZL9ll5L5n4FMG+OMl3u+oVnfN47zEiHD6dThw3Nj5i\nuMzyIMuQk30ALxdwmqPNwUiiy11AcFGSskqfClPyn5X4nwG3fK8vbW2ldeFK\nvyIu6q5rVFS6zL/Rjjh+1yIx+ZcvdfE6BCpn583OKwY83PKq7eVB5Juz7nG9\n4LBRSlo+IqU/VRLzKw2PrJLqkcCScl8tYl97rD6I6VYHeY5F5gcBGTxK6T9l\nd6qT\r\n=dJnq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"90a2dd9f46501c2eaf706ffcc14f88b3af4a6dfa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.31","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.87-renovate-major-socket-io-packages-90a2dd9f46501c2eaf706ffcc14f88b3af4a6dfa_1618884909933_0.6932266974410879","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.87-renovate-non-major-84cb1db02c0874b95d78d908d86f60990b8205e5":{"name":"@balena/jellyfish-client-sdk","version":"3.2.87-renovate-non-major-84cb1db02c0874b95d78d908d86f60990b8205e5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.87-renovate-non-major-84cb1db02c0874b95d78d908d86f60990b8205e5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"46387b6596cebff0f8f860614dc0b60519ea3df9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.87-renovate-non-major-84cb1db02c0874b95d78d908d86f60990b8205e5.tgz","fileCount":39,"integrity":"sha512-/dL/mCEGGz1qhfy7vSdUREkj4DCYwSBUeDlvTqdzSa7u1pJNRg5meFEEHeayT44tTU7jh3GLkB55oPx1XQGddw==","signatures":[{"sig":"MEYCIQDWE8Uf9u9ATded8d3wwot6oy3FueBpjxRdHCw6du6PyAIhAPXYcefyGLyXMFWF5A54wH715hySboIzS5ydRFweMpdb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgflXoCRA9TVsSAnZWagAAlZkP/iuKl8WIdj03T9tUFHKD\n/t2YBvhnmLvtoFaFdcBnBfDlb81xHozEWO682v3KUfDEEAJwU57D09e4hdoT\nTPme+HAszpN4HA4IdILA5sj7MMXMsfG4OSrdhcVXuFWAm4Jbxdkwq7bAcJDD\nU0wh/a5Y0ZeSG6wTrc97gwFIoRjjyVpY35x921rmOspaCVccBsOFYiVFWzB6\njFkLjYdUdBWTgx0RlqUKX3CAO+32Xq5S8TUGQLdbcaOiezhYzMg49F90AESS\nbeyUb6G587SHoi76HHJ6QIp+wU0SKtJ6F1ALzBHchibHWKfEhHRgte9Sye+M\nVPI/Fcvmcmb0eh/ai772tN3uz4pRHpKY6SGzzycVd/KLLkjHeB7n2QxH/2EK\n7HMkbB7762AkrmvLVHbxVVu5MSsdOAL4FRnKzFOj3ZIvtZe0Fx6asToJyQ8q\nX+0XJnNskVUc1QOh48JK8Y/RRPcKCHk78VCtGqp4rcMnZs7pcMDGNU7WczUl\n5PfKa43Q11k1I9lOuYuN/jn34BjLBCOvyi4ht3QrxL2hd2kL/CJ0i+fBNyyA\n5EpsiGWUenY7CsgGHeJxg2RtHJ+pyU5fgyhae7J5ynAwtla8xufL8R1DK6nl\n0pLexBMOqrEmIo3157X74VNsnzt5c5OfnsHJyrQjehU076FSsnhCpit9jiny\nhiwM\r\n=rcH+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"84cb1db02c0874b95d78d908d86f60990b8205e5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.32","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.87-renovate-non-major-84cb1db02c0874b95d78d908d86f60990b8205e5_1618892263933_0.43196885480869485","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.87":{"name":"@balena/jellyfish-client-sdk","version":"3.2.87","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.87","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"71a80c9f0f8b9e8ee1b91f72d56181c033d1680c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.87.tgz","fileCount":39,"integrity":"sha512-/gFgWS/VmLjXswjaAfGNDHUU0PF1Bh8jLyJuT0U04EQzU+x3EnUmGWLu4ohkRagDvHEsu7jKRXZRKPogf4jX0g==","signatures":[{"sig":"MEQCICJ11aZ9xsb5Gl2+ujJx3sG0oweykEDLmfNcqFHw9ayZAiAKN+NmLYCtAT4rbSTMRYDVQgLfzbj8YqIYkFtLaj/y/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgflbmCRA9TVsSAnZWagAAw6sP/0MS5AB7Vm4jMvzCjO+x\n7I64S7iN40MD6HEswmVa/EU795S5JyaHxFJ1RObR54QbJ27bo323M7loZnhI\nSEYN07lctkOVMpC+Hs9p8kxgHgzGCnfQuf2cH7eN9qBUvEJZl0R5FhPGllyj\n2fA3ED/Aces3JFchcA0CCgGg3eyCEXa9AAJha++lEEf7kq/jNsqTcYuOaOjV\nbwTaiATP/D1x8Pr1kQFM1lnUp2Rdl99wm0gmsGE+1/yQkcKYONgqxr47CSH/\n6/c3dmMGhTJIc4iiHKA9usbUtdarP1elRKrk6scYLtroPcyWJ/tEybvmHnDy\n319lAvyG5LZ/OL2g0gLBpy9lFm58eo5DjsIOsky5GV8PA5dZnoIfk7iT+dfY\nSpJsr77O9Axe8O0zzIsYrGmGdDpEYrNuWOI23mJ+NGXWX1aQUDMqMBh1hJ72\n7KxwTGOil+4opTM63VicE6FJBAkOqWBjAgMUN7YYm0JK9sQsc5IgYwRcHgTz\nPIdo+HfCqYbdwuchNMs+dCg5AY137cP0P5i5cUYHRyLYzupzgr7l/JoRtCTj\nkm+CWi9dr3lyZ98zy9RaaKUHqUS6BMNqGKC4JPsNMnvmUVd4Mv/+Yhnj4nYF\nt469Vv6DIpAvQu5FWvDP6/WbtsAI72spM5WBifH80NW0PekhdnxfaBtjj+zu\nZyc+\r\n=DLJy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9923d9976a7e311d412e84f9929f03e7186bc022","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.32","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.87_1618892517647_0.4138250392518097","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.88-renovate-major-socket-io-packages-2a1b4a73568f74893cf64b72b772595dd95b6761":{"name":"@balena/jellyfish-client-sdk","version":"3.2.88-renovate-major-socket-io-packages-2a1b4a73568f74893cf64b72b772595dd95b6761","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.88-renovate-major-socket-io-packages-2a1b4a73568f74893cf64b72b772595dd95b6761","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"119a27e4d328ee5bf364063a32354a6b90a4fe1b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.88-renovate-major-socket-io-packages-2a1b4a73568f74893cf64b72b772595dd95b6761.tgz","fileCount":39,"integrity":"sha512-0H6uf/4w5xmc5pwrB8yeuzwsJs0e0UJVOJ1Lyt+Mp9Xhfb2rmMDfkXFPv/ahT/QGlxs7fIO8vXy96bF8/C1drQ==","signatures":[{"sig":"MEQCIC0hBzEkhEvdnykEAN+mEE+QcmrcdE0Cygt51b2iObayAiBOT7Bf2MyDp/nhObhSmK6yQL0jgPDPWJlor5H9BLWg+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgflfrCRA9TVsSAnZWagAA720QAKINH59tMlEgKjgUhl5k\nl7x7UU21AJqo6i5eyxDmFenOIFHJDdR/xXUa8H4OsTgVWD14Eg/Zodlk1am5\n8tqra5am7GIMEpnzyVlP0yPwifayDMG843N1aCDcoTXV9Lvskzxze8J7zSrj\nsGxJwMtnNgEO4lJi4nMAe5efjM/zdGp6tlqiuJsQ31TyWXJK8Se4+Wkqf6/d\nKGdvmNlItxKFNsUjJwRjNYbpYIAP0nVNY/uuAofyNikFxtG1hfArubM/7lGP\nnDrzIUueGEHQ1n0u28jlZ3dqpPIdMAniwBpLf8C4lMeVKqiSvtXCgVESFMUL\nNJc29jevwCLVYt7JzviuPho0jTBSEzbdm6yMHRhkun5crgOMvKbsZbzLLdH8\nBEMn4dcgmeoAxWyQNvPnIEEg5Vg4YDEFsNtL8j4D0CDxan7XDsVCr3Hzzl8p\ndFlLmGzlx52YM1iPScM3REEVsPO86eKK/kn3+WUX53h5jaSpFMjk6JISmpdn\ng2s5/MrjuFhIgpwxWAt+PBTPLPeJfpw0JglQlljVBTG+3tpAqP4hSFjBESKm\nB93sgk2LT8E/0KEj50HYD0hD7saKoxD/cHg6cgQgAzj+SZG64v7JW+2voIfR\nap4kRF/TvO7M2t/oG6KsnBHDA+Df70twhA4pBZg7zBdv5jWSac+xIQ3mrLrF\nyuMG\r\n=2kfK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2a1b4a73568f74893cf64b72b772595dd95b6761","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.32","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.88-renovate-major-socket-io-packages-2a1b4a73568f74893cf64b72b772595dd95b6761_1618892778750_0.7298259519444539","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.88-renovate-non-major-bae3f3644f4bb99aafa38ca6ef914351ec811369":{"name":"@balena/jellyfish-client-sdk","version":"3.2.88-renovate-non-major-bae3f3644f4bb99aafa38ca6ef914351ec811369","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.88-renovate-non-major-bae3f3644f4bb99aafa38ca6ef914351ec811369","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"85ff6a882492a85aa4f7f2491556ed1ba83424f4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.88-renovate-non-major-bae3f3644f4bb99aafa38ca6ef914351ec811369.tgz","fileCount":39,"integrity":"sha512-RFNRzNvBAohp0S9wLhuyWPzoMz9N4MDOgMqAQkkXhJsSIAbQTot1D9R1A0fWVTB+56PzSrErrzYtzcHpDgXF0A==","signatures":[{"sig":"MEQCIAbfWPcDC20esklORNwcp2706FH0PMZyZzfq8LNomP2sAiBQKfP2y6cUAUbmNjfBj+z4FAqOFh2PE4xh5iobpyzKag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238015,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfq4OCRA9TVsSAnZWagAAanAP/22iSls2u6Z0o21B1LQA\nPsB5K+RhWWaiZw3wdXF67n3jx11Y3Zv9D1u70Nxc7UQJpETPRqTnO07f62MC\nDyX0+CSeMGqpqMvCMEuIyt26ZBXtUNdOvK5oiuAoIak5GY/t6qHn5aJh4OqC\naZzuHf2IsROx/+aMDGPBzi8aWaR66R2SkGShiKKV8JP9+PMslIv4m+Yu3Sw0\nDuzuv/zkLCI8KuLhQSuIbywi6jWNglA2kih3X3y+/mqPYfqZdfQ6HT8eOb2q\ni5JOh9lwpg2Gy8F1CO+zuc5otaZQJ/1s0k/muU6RscPwhzL4GQFqJGwBp1JZ\nZcB12pldVrRta2EZ0d3zY2Oh4rQUW6UjY9plyny3gbTBsXvvJhyFQdoT6NxK\nMwL+NXzy2M/9Edlcr4hK1+ACOR6ASeUKCgctIMGsqRDYkhvhk/RYn+BZHAaY\nmHkkA6K+xVXSzJATk5DqxTqxmTUM+d1rx2fySKvNqPwb8clSEDLtkn8O3vtl\nRMIXDIrX+HL4KE2NeAiW2+Yh+oFDolRwG1rIIERZpzCbVCQn9CpRnTviaSCo\nsANicV6UuqXu5AxHHMbmj0S1Yis1u6yD2Z6WJOp2z9uJOnXzlK44xKwQjGuG\nUKbkbTWmtpv7jzbmjXua3M9Dni24QrSsaEpKlHuxEcCdNGi1cvDqMpXbZ+Xe\nQyHh\r\n=hsDM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bae3f3644f4bb99aafa38ca6ef914351ec811369","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.33","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.88-renovate-non-major-bae3f3644f4bb99aafa38ca6ef914351ec811369_1618914829828_0.8687124015770606","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.88":{"name":"@balena/jellyfish-client-sdk","version":"3.2.88","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.88","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"56662d4a41b4d75b19646c69b642431095f4368a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.88.tgz","fileCount":39,"integrity":"sha512-kv62OUjCECF21bEvwshmgvzXhdo4ojgkeu6yEex5Lq7bGtCA1/sK2MgkSnyHXmzngFHiIjlPgGP9FmuFSz+SyA==","signatures":[{"sig":"MEYCIQCBqT7AgpNjd3TuBiXJOl3zJPDiCNJYKjWIYPVjtX6c1QIhAIgBu+M4iK8Zac7SZFzX2WoMCCvEzKiJIQbmtJfta+nv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":237955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfrCjCRA9TVsSAnZWagAAJoEP/iOjWOgt/g4SbAByOznr\nSRjGKmoiNZjvE4KiEtfAa2xPY0tWe7AtkECkzGpHPm/+IJa2R5vPVE96IAaw\n4LoEit9uUR/Om5VOYQPlQOi7Q60uIX7AgiijcXxP8+r7UIFHNTHM9E+PI5Xv\nwLiFr4RZW6mvS7wRbtEWfc38br3KGJf/qld4yHSH8lAuuWP9lqWDkngI2YW/\nAhLg+OyBzJ1EPl9o4wq0QWC5/LSjJ+ER7XYTnAVem0fNow2Y3Gw8kd5r5zBa\nbI4sRBjZc8+Ffpvgp/bVICCLJadXpYPUXEbcpamXy2BzpUvly61D9leH8Hv1\nX5AlIuUtL7HQe05bAKR6T3O19+dRSTb1sGHYb4tFVG6Ejep5wcqHxTcAGPgI\nKAYKaPoaOIHRlev/OY8Ujk+6To+QlCr2akZS2y/DjyiXpNGZsbCYAsSIlbEw\nLt+G01F319HWauiriQYAhpR9LiG3HPNNjdluHxAFdzSTnJwT9qrv3pZFGztA\nMVPdDvssGTDszUuJESFmgIpLoFa365I7K/GYoG//F2egNTw0RpYaQ9DILAxR\nOyyynEx3105Jpt+JVnrM/uLUh6Br41/Ajjati23vLlLhHZit9jbmGaee9U9+\nH6cpQ3LWBrk8P01Vs+GrpxApoMae0ZNl1wuA1z+lZigYRoBUkdPp/6H71oZS\nfzgn\r\n=jBNw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8a5a99eb02e94e6bf4ae74adb2aeecb27bcfe0dd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.33","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.88_1618915490937_0.196075515743255","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.89-renovate-major-socket-io-packages-85aa0dd56b0c9e8c6775b263939308650c39e498":{"name":"@balena/jellyfish-client-sdk","version":"3.2.89-renovate-major-socket-io-packages-85aa0dd56b0c9e8c6775b263939308650c39e498","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.89-renovate-major-socket-io-packages-85aa0dd56b0c9e8c6775b263939308650c39e498","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"050bbaf07786e930a0e00a42b7b68602eb0a0dfc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.89-renovate-major-socket-io-packages-85aa0dd56b0c9e8c6775b263939308650c39e498.tgz","fileCount":39,"integrity":"sha512-hqcXMrnc+pji6sGnl/H2qT90vlYHUqojMc0qhKWxhPC4zPvZzvv889akOgs0QMT4ZoPVKdiaY5QVYBp+OBcbCg==","signatures":[{"sig":"MEUCIQC+yu/cCBgpY08tGOiEm+fmZ/EKRORwqX5K50vqzSnPaAIgBHUwlNIuPFI4eNI6H4h17V85Ns7vIqhAslkqcW+3DWA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfrYkCRA9TVsSAnZWagAAkFwP/j/SPtu/H1thWHu+jqT/\nkX7LkDAN5agGx/rrKQaRQ5Qgq7pikmfBJgQNIMZkec36jBZCRYd0cWs9oFtw\ndoGNX4T5qCqXsv3sxjPaIeTLjmszgx4zmsfcn3W7nJC3sYAMn5SJSWWE81ue\nztFQpsN658NpWhFFtWOC+Eu5biSCjmWzQEc9MR4Q4ZiZ3IjX2jVfCcuazumw\nEDUK9HxjCES/r2yCjI2cMXbDuc0BCNUovUnVR06cRsmi+YG3VdOUlA4hxxEV\nnhBRzshdbIfZpgqS8bboKvflV10jSiep50KGzTYmS0WY09Eo3ZaKrT2uohYc\nppsgnlDQf8u+extz0HFw3nZ78VIhZsEqL1tSEySyponglia6U0HEDlGi0VW1\n3yRhNdCIv4zoxAC6SZNuVBcJ+MkPM+MGPY/ULNKuiLMnL75a8INzBCzonA14\nnf/kI6COkuk03PuxJtGYR6+E3SSdHyd+z2Nilueuvog3BKiiL2gFpQmqQlzn\nPX2hFFz9myRbiS9iZhe/k4S8oNYRfzjco5rBvDC2Ft0KeZAEdWDDr76Po3bu\ntDr+fs2jvEYsYUVFZer3c2vi2YY6ctk2tEEuDcVRtitGm6rn/QbfO9ru0krF\ntPml5ncmSexoGUuluqZSKmA3+UG0q9hdPb29GrSBEO879H1KaDSlASYwk/DD\n1KJg\r\n=254e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"85aa0dd56b0c9e8c6775b263939308650c39e498","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.33","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.89-renovate-major-socket-io-packages-85aa0dd56b0c9e8c6775b263939308650c39e498_1618916899832_0.4259300120627798","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.89-renovate-non-major-d675ffed8474acad976331ed97882bb7b9f81813":{"name":"@balena/jellyfish-client-sdk","version":"3.2.89-renovate-non-major-d675ffed8474acad976331ed97882bb7b9f81813","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.89-renovate-non-major-d675ffed8474acad976331ed97882bb7b9f81813","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bedb9f955874d108803dbc3947ee956e414acaf2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.89-renovate-non-major-d675ffed8474acad976331ed97882bb7b9f81813.tgz","fileCount":39,"integrity":"sha512-PEykDD8hCYECE00FrQkOCpyKqMVrR2GtSj0kgyyBZBcJSj3I4HfnuCrmY+8EWttPO2LOgZTECKcSfu/o42MLcA==","signatures":[{"sig":"MEYCIQDcL+Eo6DahLIgtzcVAG+pJYRad/zfoJN/sFe9ywbCrEwIhAL7XBPxi1V6CLddL+kU62KnoVs2SOd0NfSpMPrl22d3K","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgf/MqCRA9TVsSAnZWagAAr2YP/1AitOLIC47mNrNaxIZJ\nGmHsuPJnmuU1Akp88EcOhTxxuEiYbtAsTMWO/BiLeNt/awBGnLj3B/sfCDex\nVTrkNiecy3SrqbIJ08dM0WQt5/OIgk7RoNZDGe64mUcgtuxCXpE3VkuDVIA8\nCvBUChNkHxx6YacAZSJpXhSmedwbFQpA0yCMbV827AHgZB5zUUtua9d+aZDK\n1OlxSt8O7UQH92XElJsmum9IF6o14Cwmmoi/D8t4HSJ8vUFeDX0u7oqrnelC\nedZ/UotL1dL1bvAgthbF+C6CrgFT5dfltMCfkG/R01bt69GFFBltpY/sdWCM\nKuqdnVU64s0SsBYBvxoumDzRdOFaLIwzz3CyZYuifzO7QhbhYlEmGK9ibO58\nht5RcUBzJGayPJOquL3qDYvdNW3jPTCiFf/B07OmT4jApCSZMTR+ChLR6J7o\nP0awLlS3ta09CzqkBa5iidBbentjOPxcCiS8vpO0pxE3BMkcaYj9IKxiT2pD\nZ+OW5JTCi7ndOApvUqAKql04NrjxK61waj1Wi2aOwA8BZawT74gh3ZRLKVBF\nIpuBUv3n0LLAKPFAGJ0vrUEE0cIblOr0/ubB7P6lJC6cOGvlm4xuLEG6A8kP\nOGX7u/Oj6ChQAXHEeobSd2jyXDqIL05QOPoG4KC9JSrZYQHswWeMsmNa2Of0\nvuzL\r\n=fh05\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d675ffed8474acad976331ed97882bb7b9f81813","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.34","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.89-renovate-non-major-d675ffed8474acad976331ed97882bb7b9f81813_1618998057599_0.9709440742516033","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.89":{"name":"@balena/jellyfish-client-sdk","version":"3.2.89","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.89","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"40378d59f680f09131ffcbad59c1930871f05ada","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.89.tgz","fileCount":39,"integrity":"sha512-vutlUdYdDFJ9eJxXgUkUAqQhXM1uhii3BDPwqyQmO4Fe249c66LH60iiJniVRvmJx3v7Sg1iRrQ6ei+jGzdtEg==","signatures":[{"sig":"MEQCIDllyWp8AfvpgqQpctCne/YvYHRXO2aF4qK7OvBrcrgWAiBSX+HkMVI8gKMR9iZx1rWEkfq3i9XBQJuIHsBuL8WkNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgf/SJCRA9TVsSAnZWagAAUPUP/A+XnkBVTTm5o5M1Y/zx\nyk0H15Ocl09Qcpx7ariIzE0RgbJ3jltHgPHidWrOg3V3qlB9aIv7J1nSXzrw\nYN0t9viRo3zriSJZeYUjPw6Y4g82mOB1R94FHx19DKclWZoXahyVuDS4tXvh\nK23vjzPdAFswoLoUTqENwqy/iFem/g7VfRg3cNqpZLFUaMtOUWn+Mq5sZhtI\nzutJdgfOeZ+lbHXoc7y1AND86Y8GN5Txa/+GifMtf7tKGC4ulWF9orixVDAR\nsu+D+NKGSmFqVVdUBy0tkzZPZ+XtuOTaV3SSzb6KH2Mb8bZQBo1d6Xq9K6Kr\nCsO6+EnOoBYnc2TgVT9AIX/3aEXiPSLeLrw986R09kMCvz1FaZstJ9JLfdz6\nKA7yN9FnkVM3tvS+njCJ3gy32xxHVUwzKOJLT61GIvzNNWJAtlDQVK8MCMo6\nF8f90kN1p69qY7NN7FhAPFWeru8PaGf7dBcYHilNHd7ubTC1+0UfsYilMcJe\nucsFIrkmG/zroS3BEb2AGfsSBGoNeI9+C+4YPEovu18NGlhZHdpJwZkeT4ni\n5SbqqbNx1HW/4/Zn//fXpzfJJic98eV/6HjBHZfU0vggsAxjkawmdjz9F5gG\nFrvqB/6NLKMq4CeVtpADyxXfjrogZh7ntYU59XX3EshiKc/paE5fv7V+6HZT\nTLUU\r\n=k23q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"527b44d2132d17c7b7f60933105189bea3c54606","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.34","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.89_1618998409430_0.9658963148569366","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.90-renovate-major-socket-io-packages-89d306ad3bd126025fee7be2945a4689f28511d1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.90-renovate-major-socket-io-packages-89d306ad3bd126025fee7be2945a4689f28511d1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.90-renovate-major-socket-io-packages-89d306ad3bd126025fee7be2945a4689f28511d1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f4b7ced2446a083e70d3226d3b93ae69d9cdaf2d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.90-renovate-major-socket-io-packages-89d306ad3bd126025fee7be2945a4689f28511d1.tgz","fileCount":39,"integrity":"sha512-XvYBN/Id+g7zZ4R/RZZKQJYKOn/Xm4Hpyqmpu19w4rc5hR7AwkjCQDeGS3Boi0kNXjx/+Fndfxk585q6aXbIGQ==","signatures":[{"sig":"MEQCIHemo1VjQtv2EvZ9seu8sbPIun+NGR29X01vn+pPw7Y+AiAgignw01RRrRycnojHyx/LnwbSEUvaIcAxR6yVH5RJog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgf/YkCRA9TVsSAnZWagAAulUQAKH6RY5b6/2Z9mDikX6b\nzL5vHjxBDwe/upD5TfRv5TlCO0cv3aqY5oM6Lvv9HHvmtvq6S5fpw5CMEpO4\nXbpQ1/dGmTm6gYfrwxEXq3Zx5se8l9Qlc4dVsHws7Q81wgJ8+vgffJuTObIa\nr9WMEwSp2t9MvTh7YBqsmzJSdhkEj5NZNcaqz8b9Xw7a8qx/Ra4G3KGQgab6\ntY9bsynu+p5ljQ7+8KWWgRDZj+njYqzokjLu9CDipqSw5Ru6RmAIXxT/WoG7\nxu2zkqsCZ2WYI0WN2zUJjqSQGzYKACKdhSH4mGjqV1WxRtNTHWIfDPPahpoV\nXnhhfIzsia2MDxyfn/NjH2Kcn1ogffilO1/z7KrbfFVwM2UgY5b/Z3YfxEtv\nYaiyicpGHjkMq8DdgKNQwhvXkTjlfesMIjkLSdtE6eGIVUNGKI5cuMqkO5Ip\n687f4jkNXWjRugsMH1cp8rLSN4ExdFkSOT+8Q02pvmy8GuHczUHjQ3SzJytq\n6HXD49B12LNiVhhx+E4OZY2RrDoCU2ZHQ66pKMOB60Y3QRfZtm2ZcInVt4Vx\nAthzbeffZL7aQa2YmtlmiQ5bbkJcq6rFAWPia8sHalYDjIhJoPXgMLJj5V4h\nQQqyLypvFe4ujLZ4Z3G+q9IEh9iq7v3l3Y4Rf8TWtEQuKfsdP1rYLB0aqbjk\nByEI\r\n=Audg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"89d306ad3bd126025fee7be2945a4689f28511d1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.34","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.90-renovate-major-socket-io-packages-89d306ad3bd126025fee7be2945a4689f28511d1_1618998819973_0.2852270920506945","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.90-renovate-non-major-80834472b5928980e7c1c986365ac28cc78d2b64":{"name":"@balena/jellyfish-client-sdk","version":"3.2.90-renovate-non-major-80834472b5928980e7c1c986365ac28cc78d2b64","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.90-renovate-non-major-80834472b5928980e7c1c986365ac28cc78d2b64","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5bb4faff40178dfb0cfcc73fc4f99dacd1495af4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.90-renovate-non-major-80834472b5928980e7c1c986365ac28cc78d2b64.tgz","fileCount":39,"integrity":"sha512-fz9tUpaFR5ldxixTushcRmTUMDy5eKRga5gMSNOh+bdAzz3Yqt/OJ2QIz7BdjIX3beLls5fFs7bLRHz67sFRvw==","signatures":[{"sig":"MEUCIQDZ/iFu90ppsbYmpwYGi9Y5pDsXoPRDfb/4ZiT5FryLDwIgEvmybMxCav1E7KtqkwhFyzZiFNkhUBBiqJh6aGJahq4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggAh3CRA9TVsSAnZWagAAdyoQAJ02LOYpPmuUxm+14MbP\n+sSK2s9fFOAsZuo1tsmqJsvFU/6xmqle+6I1KlKOmO4IxnBQ45f0bVCEduea\nY+G0iH2HNHEl9IdQ/4/MEzfOIv86tiT6yXuRAru4drfhspPTTSsROaKux8ui\nKSAXUvwHS6CqlTSV+zt/RSv+zFan2/YySgWCEyBf5fWZFFjI08chR2OebZsj\nOegEkS9MaFQFc52eSQAQ9k0VoDgWQrs1w3ej0gMC5lDEFPX1SCM9lVDvkwcn\nah82Iei+GCcnQTndk9Gn5w/kWxXtieqC0Oamwke4dPrIpzeWX2JXWpfbX1sT\nhZxSfddoKlnoYlFvekhTeUipWcqgKcKdGiF3haPgBy3StBFi7BKI6CT0pZAv\n9rM2t5jZhg4E2qQVa983tUpR1kdciY9hqCPTFlDDjXBDq/utcNZHAQb3z1fK\nPZlT7R7eo1Q/NQdxzoRR0JzcfoVOVqXhOstkobGSGIX/4Qor3XIVBAp194xw\nQBdBYn1FVr30lwjAGjnBWO0WhjLiWEbrBxN9+VJFj6I4lYNlZoUrDukFRRdc\nqyLQ7RE6KCKTIt0Z1F1YM+C1yBVZ3lvcTnz/clDp8lOt/Nk3FHSPcYwd6R/Q\ns4Hbaqtc9oWH4VBAqqmoiTRXMQF9qdmGFvLX4xofmYC+wiHNmGKhITm8kF8D\nhLHO\r\n=qNpl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"80834472b5928980e7c1c986365ac28cc78d2b64","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.36","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.90-renovate-non-major-80834472b5928980e7c1c986365ac28cc78d2b64_1619003510941_0.5434554211504945","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.90":{"name":"@balena/jellyfish-client-sdk","version":"3.2.90","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.90","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"93fe61bff5e747d6287f4842f67514495045966b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.90.tgz","fileCount":39,"integrity":"sha512-oik7dXrgZ2cNxKQXxDrLUxRQPoaQaWF3STMHerT7/8RvAd/JbclriKqChZRqRsJ99Vc4Yrf8oKto4DOFsF4Sxw==","signatures":[{"sig":"MEUCIDyEr+zymDcGERiG0doF+gX/waEbbfc3hrtBWN3UyDwuAiEAnNSS1E6FtmL58Tzgt4zFQKHHukR7shdEtXo2UGvzTfE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggAk/CRA9TVsSAnZWagAA86kP/16D4wDqZ4J/Cb3VrurL\nOPHX+j9ub5ZMjxQwu5BCUNmxVwBqX/k/Kj4w0rTfJht8xb1OeXr95/cYa6HF\nwxtsciMloI6AUFYu8H3g1qUxzo+1Ho9bBCWwHxizPVRBZMovUQtznw9jSB+X\nxz/6rZT2E2vysTNdsT2G8A2Dv7ZLKRjnawiBrE7QWfnCICyktkTFAc4wA69h\nBo16eXJ6yd/Dmy8X80bTcc6XCQwpFqcYupHfF3N1dV0ysMPlN5gsVmQxqYgu\nz7RAhtzQWcox1UBcd38arevordBhjG54UpWoklTVL2lP3IqPlO5hoJmzu1VY\nwBYozg6ivkfc1f5bYJiVttKyn5Hr49h9K38lkqafiGbO19PBl/EMd8dg25or\nueK0/CQJDWmlUsk5DMrXfltSNa49iYCYeQkQlE20Mv1S6od+DHWQqiF+hw1h\ni0l3O20QuUCe40DDyPTUEoESDU3oWf/mCl3hCcx+W3JPjmLcGG9mAk8925jo\nJ+LMqwGHl65BoSKPgeC6EcGT8tpxE1v/v2g+JaboWpiUgDQAX9DvzMxuq5RU\nlBsmLbOX91fNZUL90jnSu0aHRWAX2azKMVB7A1EY9HOTwu8LVJZOJwuk3nH5\nCGd/cU0W1rrasRh+pSpPit37LdcPf9x5htUVCfZjqT/8e1JBc3DdvtxaZk5y\nkvq0\r\n=1S+H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f9f6324071431790c9accefb2cb81411698aa829","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.36","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.90_1619003710610_0.8565647288144493","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.91-renovate-major-socket-io-packages-1ef15e62c0ee5c9bbb365c8bea8297909a52445f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.91-renovate-major-socket-io-packages-1ef15e62c0ee5c9bbb365c8bea8297909a52445f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.91-renovate-major-socket-io-packages-1ef15e62c0ee5c9bbb365c8bea8297909a52445f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b1083b62a7e5311e0aec3d560221dbec07519084","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.91-renovate-major-socket-io-packages-1ef15e62c0ee5c9bbb365c8bea8297909a52445f.tgz","fileCount":39,"integrity":"sha512-QvbMFjaemhzC01VZCttV5VZW9ygSfb+G72RBqt+A/bUsPFfqwgeMymwqiBR0BdSX7OxfQyxkifQCdc6SsAuodA==","signatures":[{"sig":"MEUCIQDN/y3brBso/pLxkXWzV5o6gjVwNj/vTFrQ3TKGmFldmQIgPjIlPat+FgxZOnQMZx60Dv8l/QavLyZt1SRSdYA2wVc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggAoxCRA9TVsSAnZWagAAjRQQAIq9K3TYUyQWlwJqee2i\ntHMkybycSofqxeXvNpaUF+PGK8i6LMFarb+W4YOcd9i00FfHwSd1SbW7MHH6\nrhsHhiPEwR6YtKDcP8wry9Htd1lYCx4FiqLO+emmCh6Qw4EAT/5En/tGRRm0\nd/YISVQUWs7IIHI0Q0dDeIZJUkYxUv/gL5v6PtHmX1RWQuOJVVCE8NV4tAZu\nOJdT1ZK17Opi8qnHABQpCuTbkuAoxeOjPKk0paGvK5gPVnHfB5KwFY7KOtdr\nRDuB5ZAQrogRe/7bVszZs4CHaPGSraZXR5iTxeuAk5XRhUBX4A2yMhmhehDN\nXxFfZmhe6XwMWiJq91obuGQ2/58MnbH1vicDwHuRtDeQF6kCWLipps5wzFrt\ngekIZ/CUHDYWWVFkWH4H2YDdb+bNG/1PrsuZQvOKtWZKgtr8+epxMqEYJlf7\nx3FWdXsIOlxkLytS68Hz5S42c3ZRCc36I7jrVeOMXRXg8zXmTprr15o1S1OS\n1ASjGUuX1pIzKcys8OUI8uGhmFVV7ZBrY+Kc10eHG31iyGZFC2oxhRMktEbC\naoXO+L2YPqJxFMZTEjJvcS809xMlSVELPtWQyAbw26GBtNr8w6tAOpP4yoTE\nbAFFuihSqgg2VoRRXcRunZqh5SJGMkPwaOq92RO8tgq952VLihJXUz/T1fHQ\nwJ4+\r\n=AQtg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1ef15e62c0ee5c9bbb365c8bea8297909a52445f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.36","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.91-renovate-major-socket-io-packages-1ef15e62c0ee5c9bbb365c8bea8297909a52445f_1619003952976_0.8322854299516622","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.91-renovate-non-major-b3c0739ab36106aa2aafe178e0f336cd888eb260":{"name":"@balena/jellyfish-client-sdk","version":"3.2.91-renovate-non-major-b3c0739ab36106aa2aafe178e0f336cd888eb260","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.91-renovate-non-major-b3c0739ab36106aa2aafe178e0f336cd888eb260","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"27f4ae3b88def2546f1e4627685734c7395218be","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.91-renovate-non-major-b3c0739ab36106aa2aafe178e0f336cd888eb260.tgz","fileCount":39,"integrity":"sha512-sRXskFa+YiIvhqFb6FZZXdPEdWrjYj0DEsqlwXsbr0p4M0e8wIgdpS3pfkT94pVdw+XpMsAYE3wKazAPPo7OZw==","signatures":[{"sig":"MEYCIQD9DFTWqagqG9BnoEdD+3deILN0BfhoogeCvprkwwR2MQIhAIOOL7rimNtRf5OZCqO2pSMo1MwsexVoBwS3yhR0BLzZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggCiWCRA9TVsSAnZWagAAZx0P/33kvOqQcc5d7qQP7Phz\nZQWReCrRSJic5rWZ07r0cOP+wVQSxDLEtmVRyE1A+IktTlZVqrDx70msD092\nE5Sy42ducpGqldbQ7w/1t3gN8WUC1qPZcCHH6ro27ybX9Sh/IWFZb3pCMAxk\nlQORhVHpeOAzYh1jI9HHkIEOWWvRnCHBfp2IRO1TnXluWpg+rhAaH0oev4vZ\nGLZa+FqpPCOmKyyUGZ/QRZaRAhYAU4yFyKXWOcDfDO4VbQqNM5EeEVsZkWyS\nxTVwgKqlwnv2NR0AhZgxqi2ugwUNI4yznyS/++lJSVBkkJDb/hub5z9m94zZ\nVS+lca6twq6m822eAKwfr0VK5ZB+wVIZZGnx0MoTMXt0fNvwdWWJSfFg947l\nz9aJUyfcMqKNhsIiIlBCQntayIwE4a4GGayavvWkfcwKPKhu5nW30tazMBck\nd4gGbCrqpxrwO9REdPESTv0btpnltBJYz8hV4wvJAc3swwBcD0K6elA7dZH2\n3ReOqQHNl0ANNrBtjQwy3dRwu8AJYrpViASAG5+PvqH+OaeyrRc63gz2Q532\n4WYE0ZJ9bFbT5hxG/Gvx0A4Wun+sxLsyeMl8UabzCT+bAyColi4AIJY56zZ2\nMH0/SbcFwQl7FhGnRaNUIYt2czW+Lt2MFSIP32G1eXS7jQZDPk2lFZE/3ux5\nJjfS\r\n=uyEQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b3c0739ab36106aa2aafe178e0f336cd888eb260","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.37","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.91-renovate-non-major-b3c0739ab36106aa2aafe178e0f336cd888eb260_1619011734238_0.07145088415799883","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.91":{"name":"@balena/jellyfish-client-sdk","version":"3.2.91","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.91","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7bc5aa2701d72bfa229743593f4b217671f72b92","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.91.tgz","fileCount":39,"integrity":"sha512-wmxU79T122yI6yQSFMZrQqS8FZGAfXNUvlzxpqMxLj8b15l6PC4IJQQlZgI9VZ3qdnJaOE3Nqn8i3fm2GdWnfw==","signatures":[{"sig":"MEUCIQD2ADnBxq3uEA+7OKgfpD8Qg+K/J73K9g9mghw5w9aA6wIgNixcdwGvrnPnEhR/EMlCkXI9yXBrKsoAGYWLbFo1vyg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggCmVCRA9TVsSAnZWagAAdz0P/A4g4njP5IIraEYOVcPT\npORKtQ7O1OhN0qkdl/RrufDO0mc9Td3VNIFyaJXhASzoRPGJ/a1MgQ8lN+M3\neJJZk0sGSbrfKxLQZbxVo28WrFxzJ/kB1hqCb8ifSXu5kI8U5UPpe4O5BOIm\niHYb6Z+jfjIAZlx1/8gaJqAxM9qmYl/cti2NypoxQs1sb+QHqY7dw75UdlrB\nZ9vDQ+dKcJE0pC+zwKuL5ndaepyICF1GeDnk2DlXCBGysy4piktPj/aOYc6E\nTunweiEkVq4f/ILIUBAhNDEY6mSGwrIDgUFlCBjScSTg33oS372XNmIrgf2M\n0UakV3RiOrv4rwef4SsltSuMnUvIOvvk7g/nXCZJx0wI+RmTwuXjG/FCMH55\nv8uyzk269/ajLCQSo0nG9+fciidWfsj/9OdziW6roBR5gT1RnGgnfLxFVPN4\nzxPdhF6lMQzvldzOwmtqhyR4OFARj1TtnXCZuXTgmjNN1mf9C8blQjIaWhNo\n1hiGjYQgFWebnOM0rZicJHVfTSqQRCJooBfTun3QUUT5jrRo8GjuLB6BfAy/\nQf0gCcBdtsXnTgdbQDV5oQqhj3o/94zH+skVgD6ncyHmnpCmcHqCrRpTCaZL\nuWpGHt/Oed9+zK+27ANM+uxKMKNvyvOPQlD6h7wr6ZRM8PRL9LE9/3+aEwwB\nJKBj\r\n=Kaiy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6696aee25c0ea2fa32c5c5e0e3d7dd47ac181a48","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.37","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.91_1619011988542_0.23513007563832544","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.92-renovate-major-socket-io-packages-f7984e10a8c96672ab0fff4fefc39a7e1c34caa8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.92-renovate-major-socket-io-packages-f7984e10a8c96672ab0fff4fefc39a7e1c34caa8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.92-renovate-major-socket-io-packages-f7984e10a8c96672ab0fff4fefc39a7e1c34caa8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0bebc8848f983fe59eb8adc4139e2d62182a731e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.92-renovate-major-socket-io-packages-f7984e10a8c96672ab0fff4fefc39a7e1c34caa8.tgz","fileCount":39,"integrity":"sha512-bW12JOk5vQyuYNMOJFQpp3kc2wgMc9/loJUdK+I2/hnDaxJw+rdvw17w+W4PLmdDhPgFu8XAhIXKGINOlSQOCg==","signatures":[{"sig":"MEYCIQC0Di9DeJh8IBQayEfBBl12ynKJxnYoNIgZYeOR0fiBRAIhALfJhiRBM8RXdXegzWQFyJV+5L2ZuGmWJzosXb5jMQJO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggCr9CRA9TVsSAnZWagAAGX4P/RA366mYDCaGEqhsN2zM\n0vygLAG2FGBjAyGv6rZpeuxmCKZhtzIL+4qOLG0LENckBZj5l5tizZUGSNpT\nVBgIicaSJztm76Ymbnkps57h4o0PwJg25B73Wu6u2jYzeVwek6POodX0VGxi\nXD1QXgcz71k/MO21Kq8c3i4ByNTEJTQvh95S5v+WWKZuVUnlB4xjsJttJTyQ\nic0KeR4RZrke3PpxgoX+fd7tb1oTzJAh+TzD8G0JZFnazLKEGjDM9sLw/IfA\nW6b7iMVAGdYgrnfMj/u5c8iDe1RqgcIM8F+tYFdcEJTsBF/VBYzh9q1X5GKC\nZ5093Kz0wnAKqwFrfDMavfvS0cOPpQc9Xn4C2h4Vi8esG1aMI8Zsd7JGafwJ\nlnXPsqEJk7j0veCwEDsO6OK0Tw5X9M72zljG8JbSXhDgi4ppN4sFwmY1T1TF\n3O+QlgJWn1LvrXakq8Zuh2HD1rNeYokAJGKz4EfMtcTg6bI2dRj2vr43Wqw3\nUPjmaRCtfSiAUSJrFD8p1rEH/freZtlGlPuLBm69j2uwqPVGk0jLUiqWkzZ0\n8k+x+V7DQlx2etPG4/3KrbHnlPMSb7SnfYYOoNxfUPkd5J+3Wt6V8/B5vXqm\nrUKSPmXK85EoEvbRjAinYF01CjAK0qh4KtAB8t4kSMrDNnYHvgV23NI289nO\nRcid\r\n=iG6R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f7984e10a8c96672ab0fff4fefc39a7e1c34caa8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.37","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.92-renovate-major-socket-io-packages-f7984e10a8c96672ab0fff4fefc39a7e1c34caa8_1619012349247_0.5530618849703197","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.92-renovate-non-major-c2cc39dc548fa22e9f5e46400bac288ee6edf9f3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.92-renovate-non-major-c2cc39dc548fa22e9f5e46400bac288ee6edf9f3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.92-renovate-non-major-c2cc39dc548fa22e9f5e46400bac288ee6edf9f3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"267a1b670bb87dd1222ac9738619cc19302ab73a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.92-renovate-non-major-c2cc39dc548fa22e9f5e46400bac288ee6edf9f3.tgz","fileCount":39,"integrity":"sha512-kOq5d4Bs09bscnTjZx4DK+FCtz4vbJXLLe8WRaHN2OOejVOoFbh0SUlHLCeXpv6TSR/DuITk4gYSBMujcDPOow==","signatures":[{"sig":"MEYCIQDMkXdX7VctykYaS+mSgUaidKAfQy3+Em8XP9HTyQEoXwIhAPPfJj2Zkj7/xGWn9vxRu6FK86uMF4q2Ih2AIFoA4c+6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggEvpCRA9TVsSAnZWagAAAtoQAKQTgahBncIGPmJGCiKg\ni5knQNdjAepD5lDBX/DosAOjPWE9vkgONVhGRtusGpPHfL4cpIAOCDCGEF3s\nz82WyN46nsV8PaN8r4XoY1vZdQcLPlZoKEK15OdHhd1Jm67xGGXlXCXa+UXa\nl7W4VQBfeicmylVht4fiRE/7lUJiaYC/H6X6gw9AViT9mi22rzIu7ur4WKNI\nzKTdEpTs2HAoWz5cqgc84jWDSD6la9al0GcurHuachcX28FsXDH7GsMA8LpT\nbZdhpKPgNMxPHKXdj9x84PDY7+Hj/Wc7g9jQQo1HQcVWJ+yL3p0VFiiufhFr\nxAFqMPJLoRvT4QFIRHElbkRvEGZjv1XiMp17uuqGVH8X54+8ylbmclgYGgdV\nwUSw3bfu6tzihrHIOfa6gds+Mu1KM2pMZck6K2XKsPjytdY1RdPv6/HSCE7y\nYYhn8oQ90ypm7QvbIFfs9vEM7UtNpxZjJkrKB9iJhSdR03ZKLjYIIdxxEuRB\ndo89dB7P9QMu6uQIqerWXJXMSMqRjkxvIEacArSo3bYT+JIqbh+yYnLwpAwV\nJH3ZMWgyRr7gQbXj6hcWkbNJjWl1rEB7/bjiJAlYj6ob9huGu/Ms4L42bdET\noj58l+8qe0ygjinHIp+nKIrV+27JTPxBjxVALaAwSumVLZG+kLE/BSInXLYr\nE9CS\r\n=cj1O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c2cc39dc548fa22e9f5e46400bac288ee6edf9f3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.38","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.92-renovate-non-major-c2cc39dc548fa22e9f5e46400bac288ee6edf9f3_1619020777269_0.11777226645907901","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.92":{"name":"@balena/jellyfish-client-sdk","version":"3.2.92","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.92","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fa973ec439ed206388a27f9cf45d2a06c48305ae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.92.tgz","fileCount":39,"integrity":"sha512-jblN0nMG8Ac5H00VvknARUsRrRRsNCtzW3Hev3aa3x2ho8qUB+94IoMlMqXg9W5PSpDMTwln4lMFxfgrJxEvxw==","signatures":[{"sig":"MEQCIGZMTRQVoV213MRfcnReYbsJh6NMSeEFvprMQw2cO58gAiA2kKeQI1LM9DC/SLTu2QH8WhQN6ohv1kLpw29CGNu4Hg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggEzUCRA9TVsSAnZWagAAIyUP/R6WRxjyG/qPD+cXNV8d\ngjdGtiTkeCg1eHi3N7gB5Htfokf0GdiEzzJY7X0mK0epDgcVF7gLbWy348Jx\nysYReXBHMYk7LaUDqs8arjSaO+ORSLMRQ8sAfReD7azbq9lx+YVYMioHfBKb\nbH8YPGGxoX1dGfWuHCygnTuFByeSgIIW7Cu5HT+zJDMJJygbRp90gxbb6kUj\nAyvrXAH35nrhD2GhB8eGa4nbr9uHFiM0yIsse2SmvQV20BqONZHDlNWsGarE\n0NCSv0rtDU5S30RaJBRXmk5r3AT3TivmJWaFiYAav+Myfx7AkT4H7DSluoOf\nvU8FUf1XASp4n4gxAg4JToFdcKEI3PD+8nCRzDhsVSoK39BWKgeNI3YVCVvu\nPrQF+k2QzmMy5x0IBWticR0WG75+a/94EeX3Y6QJ1Hdimza21eg/hFtAE9Hy\nvfLrIJAMGF05f/fiD8A+sQGo36TAc4YnNzY+lr7ZYVjgmLLV+cicsEVkFRMx\nb3Xvv48lpB6vyUijA/7bTmS2+Cqvg0f7PQSb+OGH6i79lnLTDNKFoupf//EL\nqWpCLYIIB2fnpA3W9M1YX+2UTLEcZ96MuqYqbNzFXv2JS6BKVc2LyrtaXbnT\ndQQkskUSTaKOkQOmepNGiKkuljyBeKUIqQGww8QvK/FQNpigHa47qn+KBvJz\nBOnv\r\n=FVfG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3eaa51ba535942e2fb6cd79975c85fe1b832d841","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.38","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.92_1619021012386_0.04922018187603294","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.93-renovate-major-socket-io-packages-5e7e7720f2580529276a058ea0634bf9a02621df":{"name":"@balena/jellyfish-client-sdk","version":"3.2.93-renovate-major-socket-io-packages-5e7e7720f2580529276a058ea0634bf9a02621df","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.93-renovate-major-socket-io-packages-5e7e7720f2580529276a058ea0634bf9a02621df","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d4551fb8942b80d0d5a8a3273881d1fda12bff14","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.93-renovate-major-socket-io-packages-5e7e7720f2580529276a058ea0634bf9a02621df.tgz","fileCount":39,"integrity":"sha512-bBhpkpY6UjzoPiha85XMQU9LjbY0n7TnvjRRuPJHbYvTF8ecc7bzBsr8XlqwOSDRRbk0P7EmMzJCMJ2APqj79Q==","signatures":[{"sig":"MEYCIQDLPA8Go8/g3uPL3OHZNRpLjbYUdhmWhmKWN0K4raEf4QIhAPB0PU2X1gxt+9aaQUBYCzRyJD00JdIfPp4Z5tg5fWI0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggE4WCRA9TVsSAnZWagAAVlMQAI6ebImc3sSUTJZ05qX+\nUadUsujXUPUtexOkTRGChXPAU0dNhgg8KdD0csdXDPGkl8WKhWrK/fvcBuAo\nR4XZRjkFUIOnzCTnTTpKs/R1fs62vPt1+tXx57LRg5y3zEOEVOJmmxY5QVaS\nK3M0YBxj0tb0SaUOe1wtiSb3riCqqG92KzNybP9VoMF7Rsd0WVeWLw6tBTuH\nsBSxulLIN/+rG4tB9L4FZ//V+8Xwa+Ieuyf4FpEwPseMjsVMst48lQv6/iOm\nTuf4omm0JZB2o+NjbR4E+LhVBwCvFLVhEwHZtXtx3pX3V+GMp/j6wK0FeL1H\n9Z6Q6cap+YxtszNaqfhoA4C2jODHVLOJGteZs4uwV94JODSsJhClUx7uoeTz\nZI8TOZ1s3zhQqVEoOONanx80vSS2FixvqivZLF6vUsJXcPyefrK7o1IOmHbz\nCQasJH9cmi1Xb7qugLW9FaR3U0kKwwx1KpOX2WYNOXkbFXWzzW5sCzvF8eWG\nOJ8IEW036Akk8NVklAjdjm/qQMGypzHQT+FtDrx7powIM4E9BMj84GGhAehU\nENb2i8g6oWmdQt6mNvUoXPoCJC2+buH5yQbbzwV+ERg7rfWDuH5F7VMxxYMM\nIp66qaI5Qfg8Vlx5piI3l6yX9z885wdwhRvnvHjf4N9ND9Yr6vEJI1WAY+FN\np4EO\r\n=pqqn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5e7e7720f2580529276a058ea0634bf9a02621df","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.38","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.93-renovate-major-socket-io-packages-5e7e7720f2580529276a058ea0634bf9a02621df_1619021333921_0.3350547502135308","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.93-renovate-non-major-5f6f6bb1c2a089fdf4c88fcf830c7833f98cd821":{"name":"@balena/jellyfish-client-sdk","version":"3.2.93-renovate-non-major-5f6f6bb1c2a089fdf4c88fcf830c7833f98cd821","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.93-renovate-non-major-5f6f6bb1c2a089fdf4c88fcf830c7833f98cd821","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6112a7c8702366bf152beb46276729a9306f2c13","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.93-renovate-non-major-5f6f6bb1c2a089fdf4c88fcf830c7833f98cd821.tgz","fileCount":39,"integrity":"sha512-7f8YOxo0YukJSrLyKFuemzHwC0AmEUmYBkp3oRQfImA+W1BH6IQPFebFHAHDTtUK5tb5MA7emq1XSsN5gj1cGA==","signatures":[{"sig":"MEQCIGH5hunTOlnMlrznl/ZteoUmc5bSe7bYZzbmIQ6wb5TdAiBcXAK8hdrAYrhHZMiqFKzc5fGlJhIaWGRNxOnmIzTGxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggF7mCRA9TVsSAnZWagAALHMQAIQaY3iSQUGTVhGUknFk\n5zILxS/3cA43N5iZMOKuS9/v0djnZ5jxmmOybtDlBNvKXqfp+BLbTI8iD8qg\n+JT2L7RfC2scLbpQ2JQY0LahNk7+ROyckLXJ8N/0VzuRPLJCYNIPgZJx3R7Q\n0JvqOKZpwRsMKPN0TaVCkxaPwjd7ivCDiZ/aY9m/GzqHLnqMLP/O61s9y9KF\nXYB3LaAe794SQ3FF8rHosK/MA5VaeeYmvKlDykifx6OHFWGy7jso/k0K4cdP\nVyg4RGaB25LVc+/qr2dOgXozAFI+grXIB3fxiRZxQELHisnXwcne2Ak16RUU\nmZNaO/FcCuEfVYiByAnmWflebj0eSn7n4f7WL4qlDXmZFxzXLZve4P2y+NI5\n1NMWrp9nHSmKlGSurB38B9b//FBSQCNX1EDJA3c2M8wv9y7qWYRNJtErXNoY\nf2JOtexgZWsdS6Y/LSWHzVfPGt5HrI+3/avSiwKS2Lhpa4cGvyremsPmGK23\nqbDizTjuM/SCK8lFNtVWt/+rXLbXi4faBIY2V7BIIhzNAwaFwy4Ns7ESmTrl\nve0bBN3I/vl8n09kSWAjBKkou4lwbhg3l2Fp3/UBGPwNUoVMyhPOf141FpQq\nfJ9psgLcKXbgfH3sabyMEHL/KGgGN3VBVy/udLQG7MjPan6ACwTgN/7hEjuD\nig6c\r\n=aAFg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5f6f6bb1c2a089fdf4c88fcf830c7833f98cd821","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.39","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.93-renovate-non-major-5f6f6bb1c2a089fdf4c88fcf830c7833f98cd821_1619025638319_0.9315808389810967","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.93":{"name":"@balena/jellyfish-client-sdk","version":"3.2.93","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.93","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5ad451e7ef6583157de3b447de112689965edd73","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.93.tgz","fileCount":39,"integrity":"sha512-jTLb8NUb9p0WWDe80aeDQgxF18omIc3Y8Hyl5LcdvRRdbZpYWaSmm1rvcSHjiJG84oT7JWWHKbxiSbLTRQ+RUQ==","signatures":[{"sig":"MEQCIAx3dNavKl/Xaf0LUa1WDyaXfG1JTQQZz+Zxi/pSytnHAiBCl1y6+Gcz07KUlkStzjLGYM5xpvKvoRY2lkoUE+HuGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggGAnCRA9TVsSAnZWagAANBwP+wVc0M1/7SAq1wnlgHYm\ntEeGVhvJWu3t/KIIpb9B1+B3oBXC2QO9jKpeA4R9GbFWYxJvue9LEPK766Ys\neNIoVTmHz9GvMOgGQCe6qFULzWYBLiqDibzxUVuQZsxyZTEkGeyC4Khm3Z0W\nAEWQpYv1XfrB6wOUN0D3/ccZs/UxNk7jkJm9svMwN9QfB2+pUmWdM39lSgZe\nDX0u+h/x9OvrU0U9nCzgqbQYCswfUvxYSNGpYVIvi0b5duC9C3xQMrPRZUKv\nG0ZyOrE2dQVVHOiTOqMW5DgPamh+ZjSch9woJgg3l7tW0UzBdO5NHBLRLVdE\nZFGyQSPqaSpnd4PUY0oF56W8ip1K45TaeJSX/U1UbYxAI2tC3yHVV0x60qBv\nYXgRCN32tF83sOFDhIVp+vIfd7FROtq/2cm/Oz9QqPRTDMFG9HdiaT7Zij2K\nxZfdG4ZeB7Hd4iu6fukt3OtPZ83E02LWyXrtEVRPeJyl4Js9pAYXSHIIRDrV\nmG27L8zzGZRiugVK3y0+tcei3jJoUsHXs/QkAA2+3zqF90ybJFUB2IKbBC4Z\ndDizsBxfJnYBREKp0f14/Pn4JhlWJWk61STmXGvkdah+ae7M7yYPZXF4wYXE\n7t6w+A4H1dlSppQUyp5aFH81sdFuWMDzCRsQ8dFa/iALu9iZHAbYPNmYCYzQ\n4ySD\r\n=GVjG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4f320a92285f8941c3a444dc7b51e2d85280e9cf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.39","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.93_1619025959000_0.562538594777003","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.94-renovate-major-socket-io-packages-3a5e7f0575361b41b6c56649073de2fde1174ffd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.94-renovate-major-socket-io-packages-3a5e7f0575361b41b6c56649073de2fde1174ffd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.94-renovate-major-socket-io-packages-3a5e7f0575361b41b6c56649073de2fde1174ffd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"889390d93977fa1d5e53d9e742ba19a59b533605","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.94-renovate-major-socket-io-packages-3a5e7f0575361b41b6c56649073de2fde1174ffd.tgz","fileCount":39,"integrity":"sha512-RaBEORceSwrLhBWYOg64bs4ZJ6iwz6GK2Rxw6zQungna4nEQLiB6FeTA4HM/DbFoDMwQTTrdWQfaU6S8isA4Hg==","signatures":[{"sig":"MEYCIQCyImMimRwwZWHPkTpvKV9R8laETwlbqwOXA1IsKwFCDQIhANhav3C8Do01gF/qsmRG4vd+U5kwDJyXqpwfKgKzs70u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggGDsCRA9TVsSAnZWagAAq20P/i8IckieIGlKaqU1vN3S\n4hPApObz8F/7v+whvhIx8UvOFYxsfjj/kiGxHmCMhCU1IC2BTbuMipNMn+P6\nOeVrYEeIH9DfHfqQU+EjEmJyxPICFEqBBkKKoP0bep7Kjq9YkAHDOKNj3/YA\naMacfiZSQY4C0L5fa+wl3V96W99C31wbxoapNrdO5/NqheVfWzhPCfT9UrE9\nKEda924Pt7/y+7Lfx24qKIARDtcQgHCQFcBQbKdWCrON8DwZly280agSCDdT\nTojolCTWBVTNDR6NYj7Yn7IjvJGoDwudZxUPU+73OdU3QZBhn5QT4v1SZsE1\n6g66ozoBw7xj3pVI1gwFQQI4obc8lnKLODkfsmVmUeWlSuCqbLd7lTlpM2Ov\nDFB9ciDE1AIMANzxIvcCbrVqolQQ2P7GOUytrnPpnKaxC4/FAU2qI8MDVPcr\ndNtlwLPeMUPBSqQ9dsZplLQIwYkXRJT7CsbxfmVBUXuFk30zIUImaJlGAJF+\njiVY0iqObVejmvROIXXBThEJ6yjScJYngskr7QAsGgx2F5MCbukh/Ie18Gjj\n1EyIHOCRMfPpjjIcL68f3HM9HMHzzdHwHRglLp3qXFhMM9kvGaCt3vHPnvNN\nznDNF6LriefHkXqzsgl5JwDyTUpi2iuBKWKR0ha2bOL1bxfg2HouqgZ8uMB4\nmhss\r\n=UvG7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3a5e7f0575361b41b6c56649073de2fde1174ffd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.39","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.94-renovate-major-socket-io-packages-3a5e7f0575361b41b6c56649073de2fde1174ffd_1619026156488_0.12561988095432164","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.94-renovate-non-major-9db1bc64b660203fad97be422bd4c28fff4351de":{"name":"@balena/jellyfish-client-sdk","version":"3.2.94-renovate-non-major-9db1bc64b660203fad97be422bd4c28fff4351de","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.94-renovate-non-major-9db1bc64b660203fad97be422bd4c28fff4351de","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"849ef1278265f1e025d4e60175619ff45c1c4f8a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.94-renovate-non-major-9db1bc64b660203fad97be422bd4c28fff4351de.tgz","fileCount":39,"integrity":"sha512-LJGLsPt0fPcQA44NulsUioZghIg6JIIupLoab56sYWSSguByL35cCi6G7owpNU8/DEQySKO/MU63YjWk45f0oQ==","signatures":[{"sig":"MEUCIQD1RrCEtFLiMlTZxbIoxIu2Qmh1SGN4T/1sbj1utlceygIgCYa+ejx7n6sBnXLuTJ1P2KeKljsh3rXW1CceWHbG8/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggH+ACRA9TVsSAnZWagAAKlMP/03RZb0KZou1Ikb3hy7x\nFU+khwgktCQgaMavf0OMGzvthr63VzA61rSXxezhSTGp0cdda3bxyvXXBfaX\nAMWwdvvInEvqOIIDwSmapykXjsG6nK/WpkDLdIdhBwsEVPSPAGfDnTRtpj+5\n99JR+zXOXgl2OW0UXWmNVDHRGR6m0J1I19vTWex4AD96g2YKr8bwD4zRWyAx\nWgl4PVlhwffAkoiIUeaPHECtlrY2axRE0+riNAVzZVV9mDZX5lmyhsap1GnE\nreaL3UWRqa9GVu8+BTg1kRRd7/E0ll9O9oxkYEtShgBfwaw4ayX3wZul0zZW\nvXRktNkQfCTrUzFSWTSi6su58E/5AUoaD4y9n5U9BDy8bylQjR/CH9gTxxf+\nd0mIfp+0mQqkLhpz6uqIL8xChvI/I6iEn0PNQvnIx0BhKYx0nNgFu72EODfC\n6Jjuq5B4A9Loxud0OgdHjpBzeZ0IwOIibNDlu3zqNPW9Sj8+7puo+VM01N9y\njuL/yQ0OgPTbBURIWdFZi+j8V/R08SbjUgTdhI/22N3cyiGXSQRC3Yv3MHlW\nL/kRkARSZ3F2kbl32Nj27Sug9i4As7jrGqGd0YRPQWTUzEHLwOZlbvYtMarw\n0QMffNh1WPV7BWJvhD2Uj3ttDony3VMjzKLyGyUxJoUNjNrh2XRAjAOgr195\nAPJa\r\n=Ymxa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9db1bc64b660203fad97be422bd4c28fff4351de","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.40","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.94-renovate-non-major-9db1bc64b660203fad97be422bd4c28fff4351de_1619033983883_0.03662706657643633","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.94":{"name":"@balena/jellyfish-client-sdk","version":"3.2.94","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.94","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"613f2acfc21d9f59a340a32f4c3f6c2fe8b064ff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.94.tgz","fileCount":39,"integrity":"sha512-JCbkRlN25+ZAwOjv6EyVHYyCdBz0lJmuCzadnJsfGxtSeni7NzGQo7N0i3DBu0yhneJFBxIJkELWF9PONl450Q==","signatures":[{"sig":"MEUCIA7U5FPRrvzRoNKaGfDfWmNSByyPXGE7b7Ox8YyqP1MFAiEA8NxR/DQNJc8WWPT8xbWKn82Sd/U4wC7ErRWXZ2eriVQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggIEECRA9TVsSAnZWagAAUP8QAKAZIzuDwGPp1e8QW6Vt\nvduG1ZUu0ZOpE77T+UGFdHJhcxHO8ikkJ+8STpF7BsDl1sNs1PfVTN0p135q\nEtFO6FuDaXirMsVg/udOLvUeGVoN8asKpiuHi8edJn4JEJOG3RqkaeP23aeI\nH0hIbc1CGN7MeUT+rvqyWoyI5T4GsYdxpfqRs5VDotYqedrn0mdKbuwHovtR\n7CAAsPibxrZfFLjfYOgp+GFpeyyk1gNgz9H+r/3qpVDhXMDbtV4QYLKIj9DL\nIU+chHL5ovqM8rot6lMLKyOGwO0aX7d9Sx2nQaAYO6R6hULru94zfWZBD3TB\n57eNRFEppt9CnNioRO6Be0kJClapWSFIrxFXy8OUk+zY5S5AHR6y02/NbXUC\nV1GMfIfCd7ThDP6384wBD+kBLVviOLme5O3uUgYIq7GIT2pupSzTJLWsn28S\nzseUpMVAe9lj5T0TkIVLUw6AFQXZStIgqq8Fh9zRSXKrIIeW8TTEavr+nWuc\nmQwJ6KTU0txjAe577/Uwa8KacxN/eMTc7sLCoIWbb95SKfSKY14SUynvydyF\ngZjIAc/Qowk50DQqCwlMeHMk6qt/h7RxF5t2vadFwa6tAcYpcmeVC3jcrEKJ\ni5U0GDFnJnZKLHn0uNecUEZJS8vi/Fbc5gRnyxJ7WM/RCXzJhCTPebPDy44w\nHhFA\r\n=W+5r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1197a26f87331a4069b121363a41998841ff9748","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.40","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.94_1619034371565_0.7097335075200013","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.95-renovate-major-socket-io-packages-3587bbe8ecafacb90d6f3b9d40f0b389aa8768cc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.95-renovate-major-socket-io-packages-3587bbe8ecafacb90d6f3b9d40f0b389aa8768cc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.95-renovate-major-socket-io-packages-3587bbe8ecafacb90d6f3b9d40f0b389aa8768cc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"014f7367633bb836f1317c1c472d1e881b4f21f5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.95-renovate-major-socket-io-packages-3587bbe8ecafacb90d6f3b9d40f0b389aa8768cc.tgz","fileCount":39,"integrity":"sha512-zicXTxtPgIPMJsSPQMfQI56RKYGZpzPptyd2NBraqehaXHey5GHNwUHHigd/F/lrsx9BOHdpxl1/jpSHQlWoFg==","signatures":[{"sig":"MEQCIExcukZ6R+jPgp5OJMwCOSr8OwTSuIlRLJbuvQ0C0EIMAiAiz01IMPQUeiIL3Zf/tea/O8gwpXFOAT7eCq7r25/fJw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggIK4CRA9TVsSAnZWagAA+zcQAINdl7sc3cuhRR/2TFnV\njpCkJn2M8NBSd3OCpW614bgy/sD5thaCO+VGvVjxyVCO1II06//9bARJ1rwf\nizvEyFTQAOGzSIDUmi381ug1yX9Fee3vGh4sjS4YLHYHBgasfRAVmzvTzxnX\n+t/nXkbcPcWtfp8V60tMhf4P/A8YwTFu5N5s/zEUg1KMWClJaLPErHi1P43w\n2j+nvWbFlq0oRkOwRC5zga6aMdMthP3GumztEWFkEPLVYR0FUVetkJPDnLFX\nBLMh35o67Evjg5MRtjsff/hy8Bj2v9Lh26d7zeEUbjifieKKU99rm0jswymf\neSwTCAVVhyy/z6qOY4wJjlkn1fgyvjsbWaFSB1J6nQ6XBduct/MR5cgIAdLq\nrlU+NgDJzuAp4Ky/dNDkR/154T2aik1v8fj36bl0+jxnXdHj1SSD8SEgqYWo\n4KdADiQXq27zR/BhJn3mMazdZkF2lo6XyC95lWOgKKD4S1jn6ClAO6vYTIIH\nKpMzbi+/Gym125huCuoD1j6aSwlzd78MumQQKSwiWuzlL3ncj0vrVkWacdNl\n+0TefNdqS5nJ4UZs8VWtJ1MsQQxJ3ShfHSDEwKRMEbDMJVHaDAxRDysuGAH4\ncv8fIU7MbHeuZbJPIEMJJqTnA5U1c1IqlOEV18uC+wZjVZuPUWzOiaproJdV\n4xzw\r\n=A4pI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3587bbe8ecafacb90d6f3b9d40f0b389aa8768cc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.40","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.95-renovate-major-socket-io-packages-3587bbe8ecafacb90d6f3b9d40f0b389aa8768cc_1619034807964_0.5218711591211675","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.95-renovate-non-major-49d9178f7d8c22bf6b8cf2a9c8991b3efb4e477d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.95-renovate-non-major-49d9178f7d8c22bf6b8cf2a9c8991b3efb4e477d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.95-renovate-non-major-49d9178f7d8c22bf6b8cf2a9c8991b3efb4e477d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3c550200fe1d0bd4ede40b37f748a68fa105b201","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.95-renovate-non-major-49d9178f7d8c22bf6b8cf2a9c8991b3efb4e477d.tgz","fileCount":39,"integrity":"sha512-SVX/edo30tq/Q6c6w/KMwkWHVLGnHPNPJw/edoifsmccCRJ6tlBXR9VNP6OC5aSZdkXR2iPVQiVSj4oXp6QnMQ==","signatures":[{"sig":"MEQCIBSJgkmpbH47Agb6K0e7bO3WWAf0tGQjOAJSzj6CNhL4AiBHzp5A2a5TMAXwo1S4GycenatOjN+lpg376D/8N8ypzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238729,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggJgxCRA9TVsSAnZWagAAgrwP/1bI+dbdh18btZfgdGPv\n4H4TWXdJT2+JxgKWDZHTowm4D+/oiIJAi5N6uPKyMSvGH8vmtrcqdC+Q2Ad/\nfpHXEFaTvVoAr7xAgpj8xYQpEvaoBI4TbNOU0fhVxEG/8VtU7F7R2ysCVIyF\navi/rKLBe8p1OSz4AlAlPZ4ODK/7tCLz0ET2c0QWncXBo1V3d9hB9EP9n87G\nncTFG/+qzQz9K4ryZBZG/qpTgCdT5UVdfWM/igTsdY/e/CDc2HCaPB9PGYe7\nC6rniKC15M4vTkvJA/73VFX4B+2r6cB6iR628LZ+LVtudadLtmytrn8TsbEc\nG3LdTNqE9+U7EnRZ9K15J1ieOofCc/7smANL3BuJgz9ID/kXJADGJLrvvbxa\nYhohE39VYbWrDnm1FV5QtoYYTaF1QBBqyxamhZbmNhSVsh35/HUZCh0a6KHz\nZYgUx6fTQhtMkSMMGUhaigAnJq8yd1cKgBf55vcMjvAlm1ed/Fiyc3rtPGwh\nJOMLtjd+gM9owiW9OD631d5ksq8LThxURSYlR5Xs/QluGU/odc6wBTckpWj+\n89WIckxCTxAwBnq0Rqrj7/DPKUplpMCOekZHXRKuEmx/HWZmRv4f1Kubg2PY\ng5W4tgCpXpb9mKqEfeegBlNTjYb0cL+1suTJKOcOqDVYM3oEmFZCAVtLsPGS\nJ4na\r\n=tdga\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"49d9178f7d8c22bf6b8cf2a9c8991b3efb4e477d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.41","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.95-renovate-non-major-49d9178f7d8c22bf6b8cf2a9c8991b3efb4e477d_1619040304563_0.38447730886339615","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.95":{"name":"@balena/jellyfish-client-sdk","version":"3.2.95","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.95","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"db1d2898216d8308e75e11eff7fe23b5ecdec8cc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.95.tgz","fileCount":39,"integrity":"sha512-Oqem/ff7zvAoyO5rizeonU6buENARUB4gyRL2k9LEOqydaVaPg97c5ZBG6gs+9H2TFUhTMEjr65dlgqeqVhWjA==","signatures":[{"sig":"MEUCIQC/eEt6Yn2sDmozSQ/GseMFR3znd8OU21Q0YF+yMpt0BAIgJu94FrFagZyWKe2tV1jRYxZAJH519sTIjQQA0hCtnng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggJk6CRA9TVsSAnZWagAALJIP/AgqGDGBzpmwDIWHOIIQ\nxuNIghqFs3AZt3V42xmtsBAd8lSjVy2borfmyD9ffsAJgDbjNEfrSEJMuQW7\nrIMZgaalZFDaHI6QF0oKg7g/BfRFAnchWO2hDxi+Xea3t0WJkxM0iJ+R6e8/\nezhlJtuJP1CMvUKCqNdaasOxXb07sQYYaDf7egqsNDBQWNJORM4hW9X3lYSZ\npmEFBqmTgx/KX+YWrGDy70/Fgf9U0C9Um8GyQLqw+9apE637He6aO8QA0Ki+\nHXg6/BubUFdbUZ5YFLCI7rqnh52XurMK36s0Whz61dk8Es0M0Z1Cfi/psWsw\n+yY2zWggQroszjuIGKwqvFcuaxTcaIhTXRPvZ1vNUOBNFNdqtnBOj7jqeDw2\n2BF+cRmO+fwaObEFBqmbFyUkKB/4eYCGV4vwoIB+Yhlz/MWuZTG0uT/gW7X/\nT56BQhQHkB7YGmEFP6PP1OpP+JpPU3bJNzYi28llHws4D1wrVcnm6rx4uVOz\nEYAxwUy/5SXLkr1WpTwc8rlPPcJDsHkHDCGTI5C8tbH9qTZSegULLOuH+6bs\nw7JZGnE6GtCiqJaxMiTo23GEo0ieapDFeXOPQwj0N889Fgc55O9Gd2ZQo4Vm\nfZi9jXvRFsARWQXJS/3jGnnjM2pSkBahXUCvm1TnEAIRtCcyIAmAYE+Kxrmx\n7Iel\r\n=MlJQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"477d371eeea3be0fb8d815cbf8a759ada8d631a7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.41","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.95_1619040570218_0.391159380396664","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.96-renovate-major-socket-io-packages-4ad6528ec38411abc6cc0398e0535219a44e0444":{"name":"@balena/jellyfish-client-sdk","version":"3.2.96-renovate-major-socket-io-packages-4ad6528ec38411abc6cc0398e0535219a44e0444","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.96-renovate-major-socket-io-packages-4ad6528ec38411abc6cc0398e0535219a44e0444","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7cdee656d1390941fd55a1c7454c31b454aa9d43","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.96-renovate-major-socket-io-packages-4ad6528ec38411abc6cc0398e0535219a44e0444.tgz","fileCount":39,"integrity":"sha512-xtxjyQMIvosJbHevekKtP1s5dhRH6WNEq1XQ/+1KAI50WOX+fah/u0pM684N5ct6dEPzZ2rHZDcSFQ/IrETDNA==","signatures":[{"sig":"MEYCIQC2LRSOVKdhsnvgO1JOL6d1FHr7p47Gq0NCfMFo7adcCAIhAKxu+LT53eJc9Es+gLnHo3m81Y74UxvqqZEAxZ829xyy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggJqNCRA9TVsSAnZWagAAXm0P/jgtX1YVL7dFitFweL/L\nA+Y/fkqclT89qTe/yUZSDIyPAn6kt4dy3FzBqGBvgDjH5bPvY8o/WIxB27F/\nRArBjvrvPwzDRAjdgTPmEnPIbdKmrdzXSdejhP/wnzrSLwcgrrwl870A/4y6\naV3Q3UYEF412dxx4ruvn7lMqNiOPNW9gbPY44X5ln+fzc1BLxNoZGWV/2Pcr\nwsFs5Mike+aTExAAvFVHLGkVK2tkWYoAzlmG2zVrYhHMbtUaXtiFLL2oATm2\nfLkheDOCXl8b8A+Wtsa+JnbQ5zReLAbOm3MRWH7uF674hcHuPHbA3pvLADjG\no4MrfmxoWRlpnzwTvd9U3oyPGM+19AHymfg8Rlr1ZQQWyfcxE4fj8aBzxBHI\nZeu9Rb/eceSYRh9KfV/i0yXS8IKwf0sDoPxZBBRv/UHUQVhRTQf5guw5j+d5\nFr5ZhBehy41Qz67A7MTD0VBVxAXd5cIhioTrnZKovSDoEv/NxcV44/tH/+T6\nGYXkCxfe+eT64xKIM53zgQeeqQFV+wAsceWw3mOJcuuFy94TC8frZGf3UfsW\n4QOB3HlBCbeQ0ynKhvovmF3MxWnbXnJKR/A8ZfWbc+9r1E9xPNX0AQh8M9PB\nfVqCd9tEs9ONs3BzFyZRZ1e0oOKcaJuGxc2ZAf50B4KqWZa7ooHMc6y8DXTc\nYCwp\r\n=7u3G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4ad6528ec38411abc6cc0398e0535219a44e0444","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.35","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.41","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.96-renovate-major-socket-io-packages-4ad6528ec38411abc6cc0398e0535219a44e0444_1619040909483_0.23374002441634834","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.96-renovate-non-major-71d6e6bba3aea8f8b2598745108c6c3f74c0f85f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.96-renovate-non-major-71d6e6bba3aea8f8b2598745108c6c3f74c0f85f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.96-renovate-non-major-71d6e6bba3aea8f8b2598745108c6c3f74c0f85f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"143a9fec57286c2c15fbecb6feaa6c4e86a9c9e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.96-renovate-non-major-71d6e6bba3aea8f8b2598745108c6c3f74c0f85f.tgz","fileCount":39,"integrity":"sha512-MMFz0Al0Fn1d0n8EMWUrjp7kN+nRqnITz6UWDN+NQMWKI5FA6S/zUrdevyvkJUr7Xq+DVqmO1IK7BhkuFFA1rA==","signatures":[{"sig":"MEUCIGeDq5LlbAGtGO4fcyZuY5B2qOF7Fc6lxQojqjXq6KAYAiEAmJn/xCix6HRe5OXpCA702uB5Hh9cdivF2w2wd3q4A5o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggkQDCRA9TVsSAnZWagAALEUP/2ROiUoo8htMVFOHXuHc\nsZiohRn95x50evQ3T8YN/aE3jQ1RlBEHfSqAn6yW7dEMLZD1kyEOh6HSPpmX\nPzZ5HW9q6KI8u27k9RRV7KzRQa2WkGj/YJW5pREadiB7JpP2uHM2OlfDFo9I\ntIIFhBw+N8gmPrSgOJ6qifiQmXvQWA77UX+Fl6NZGjvVD+MEeB95Je9Ap8z/\nEvFVTVv478rbXqaaMEnc4IVXWK8dtEA/EBgAcjm21Y90uSyw5X3d/zWnlOrV\nQIBDOzAqrzX8gDKe522K15RZNpMsjluciUkec6VkR6f5tnAX85ZPfu+5YYvU\ncJ+fTD4bNIiitT90nQQQgheZMKhmdD+0fWUsQFWdq4lbrDT/8x6WQkZwBprd\no4GBu4GnjUc8xeJzDMztwgIQpCO9tRgIU0zj+AYAnNo5tSHpCTrZFcxx86TQ\nJBORuOoMYsaphtgKOF31dtg/D5gaJAHHpB8iFvhxgg4JMkmQN0bnoaOPeB1w\nxKVmD/vkg4z6gpxN8Ue28SFlL8KJTRyDl+dOVqYA0Taf1/KMry7GMO1oODYM\nh8b6DUiCv5l2C1CEB+dSzf+P3G1q3GOAtJolCkOrwFGy24umGLTIZji0HVTk\njx/WtkX36xQzkt4Ylo5Ua9RnjBi4xRPEMYPqh2H/bXRqU5MqybsdZKIXFzoC\nSf/F\r\n=SwDx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"71d6e6bba3aea8f8b2598745108c6c3f74c0f85f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.42","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.96-renovate-non-major-71d6e6bba3aea8f8b2598745108c6c3f74c0f85f_1619149827335_0.44635747591955477","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.96":{"name":"@balena/jellyfish-client-sdk","version":"3.2.96","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.96","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0e46f86cbbd0054a297598a2ffc663e424e9088c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.96.tgz","fileCount":39,"integrity":"sha512-tQvxpS8n2BrxF8xbHCSjjpT0GrI5rM8FzywC3P8ru+Yf1HRBx5m5rtwZ8r7GYeZDL8K0DtE3tjllvoVOVwDABQ==","signatures":[{"sig":"MEUCIFWCzeKJvXa1AnSx0aQSMYOvY1+Ln4SyLWa1/FIr1un8AiEAyv+gkZ21eyDsVT3kM8jtl3Pqsb57z2tGb7tNAEUayv0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238735,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggkXsCRA9TVsSAnZWagAA/eUQAJ8zdhHQKJSduZh26zQ3\nRUbrN3G1RtWzPZZICMcDUygpWGmaRq1VtosJ0SZtNFq156lQk6vcxAnb4P/L\ncI4f3nmEP7ldB5YWfuutdpOmdtE7TDi7pmX5cYLq85YpS+HXtGINPaZ9sJzu\nHsop7+ldXH+w7JZiMvD0LMDc0wzvW/SGkQR+Dxxr3nPhcw1VV4QXYP1Tu6ng\nFqY2l8I1PK9iX2WXLg660pdSbubeyN2swgrapZOAAQbecAyOLgGQSOXYP1XV\n4+AV+UNoQ0sXPZmnFJ5JwixUTp9Pm5RdrngJdZYMkooUmhSg037AKERWwp7K\nqTSqo3iYjJY7lCV84Vy/BzrbtMh40wUMnboelp+E86UCrZIXzDF/SWCMQOCU\njrlzvfEDJiFsz+xguL2AWyEAZCG/fPv72q/6SLr+ftSyXM72OA6JPvK+FCAX\nGgDwd7xlRLltExLSWOFVXcmpVZtwFnZvLQ517y9dONi8EiLSCkMxF83D7EsW\nwN45GPReVLcR6SCBT10CnJ3ZSv8ziOvWJ2ePauaXu7GdTSLS25mhoiM7Lt5H\nyyJbANHXpVNZV3fVTyCMMm0DhlNS4zI5FB9LkMBeUdOgx8JbRXB7S2Nrtv+2\nJFG4Os3lR/wrThvjFmYHx1ZHZ5yEHgaZSZFzzUAWH0bpCxkIEF/pkCHlfA9q\nngAt\r\n=qewV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f41b2593c127b248b7df64fdda0630d76b1b9f23","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.42","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.96_1619150316414_0.7775393880145907","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.97-renovate-major-socket-io-packages-eb0e304086af2fde3843d2a9fb2ec0f55ab5705c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.97-renovate-major-socket-io-packages-eb0e304086af2fde3843d2a9fb2ec0f55ab5705c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.97-renovate-major-socket-io-packages-eb0e304086af2fde3843d2a9fb2ec0f55ab5705c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b1313f6c677032da56492b9ccb0da8e4424904a0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.97-renovate-major-socket-io-packages-eb0e304086af2fde3843d2a9fb2ec0f55ab5705c.tgz","fileCount":39,"integrity":"sha512-hOg1Pf9FS68E9toDGPJIuj0XO/quuLfk2Eq3PhfWE1FxEG7nQOaS1vq0LoeeTIFd46e+IsMyVOYC/fe24vaT/Q==","signatures":[{"sig":"MEQCIE45yUIhTJg0BOjoigSpTkyVjFyzYiRktUGgg5RWdIEBAiBXWmT0yb8h4mnsUoTBFpN1VPFh2xVt0tORpwKDHSFHpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggkiqCRA9TVsSAnZWagAAmy0P/3D80HgDvye3dnYL9dDi\nGe1uq6YLwAqCYQ8UDPJx5bcORnQdGz8ZOLFZCuvGriQWpdXDPnXKDuEaRCU7\n0NS+A0amEUYTUxOWj+LDzauZL+lkGRyXYO6TR0Vx8a3L4kFyMXz01FlgqaXl\nB9f0m5wz+gP41TDAzhfAKsVtXkXtVQDUHV/GQOz2x/nxq8Luj1PlxbV/MpQT\nbmoxjq0CImO6hHp2i+xC29iKGSDPlOR02k8QAzeVOa9miYMVWJ9DIqKEzywO\nvM33m6iMmzvSl3MQ7k+Wd+LQ3sT8ThyOlTvCcE/wGBGjpUj+xLcKAMea3xuG\nQ0NEpruYq1nzxq99675whhR5vAIlAYbH2SK4IGz5yWC2fIk6Xibo7O+Fr8VM\nCHH2Q4VRPQvuGfGfjAK6MbCmQeJhbkHGiae3UUgwuHAs5qv8LB2MkrCLWaAS\n17jzPo5DKchjsTyfMu7QEVJzPE4f7mYAZfrNT0Tf38pAYILD2H+u1uJuWlxn\nX8JvMxTrPcI95s7uPXQnQDdIwcEHidHulRyK71cpErgpVbskzkNFaUx08Ece\nHvnabclNOoCZvoM8v7NukcxBvoRvCw1fJXosi5F/SCS5wimvAQgCC/XL75iM\nl5H/E2Q19eaxKCBluFm34GjNUeN+cZfcd6d+9wenKcG7qTT93XSPQLVrFqsp\nmbPG\r\n=WFn8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"eb0e304086af2fde3843d2a9fb2ec0f55ab5705c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.42","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.97-renovate-major-socket-io-packages-eb0e304086af2fde3843d2a9fb2ec0f55ab5705c_1619151018195_0.7127240632073109","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.97-renovate-non-major-7cb6a3577ebabfa7e6f10fa78936f5dc343c2c0c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.97-renovate-non-major-7cb6a3577ebabfa7e6f10fa78936f5dc343c2c0c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.97-renovate-non-major-7cb6a3577ebabfa7e6f10fa78936f5dc343c2c0c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"843b753678ab167c163af6c308b8bb1b1f3db62b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.97-renovate-non-major-7cb6a3577ebabfa7e6f10fa78936f5dc343c2c0c.tgz","fileCount":39,"integrity":"sha512-VE9DO13U3U09YBfn6yWJfXO+DAn/U2KGaSTpEGA2qEh4Chc8Lkpvjo4PRqSJDRFq58n3vtl3mfO+PyvVO4Lc5Q==","signatures":[{"sig":"MEUCIQCTh1PY4pMa2lHrZzUmQ9YzK68QYZKbceWF5vhr2IALYwIgUYd0eso7O9T+z8T/RSdmcRPySIvGQ5nBzMlh3yK4kBo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggmiPCRA9TVsSAnZWagAA/sYQAIbiDEzcK3YiUbTLd1kM\nJP7QAnBOEX81yJSFpqQTpLSrdrLl8R3NNCNbpb2yzBQiOaoT9Zquccd0IApu\nJhuRUiKNDzA8u3pI1/fBvkRWb7v9L8mxC+m6Exd3MluQnThsG2qzhMObyC9n\nydFfI9hxPmCG1zfaArhocmYdWAsms3gG71HlTyig5sMHW6W/ldBGiBjifCXh\ndBHZvOCcGiXYVrPlqTG4ePMDICyAqLURpCmVfbT7HDtrCdGrZYJwAyD+KNwO\n11kYzqpJfBzijRBG4y6rqtjNdus5stFXtbExh9B0MJuAJVN7WHuJM6NfYlXC\nwh0yC/jYHMSsuCtrXyb2vQvYhuE24QCDJFhkrWlJjStPzokxQqgkoATW2gcy\ng1Y2NGcWyMd9khTRDM+1v3L6fZPWot+/0cL+Yw0DhyZl1MYsSkkStfVlYJmi\nzNjklLFlR5FV9xBgPY6qABQSNAsirur3rkbIG7OnMIz3dYhzB/roCVqXL4pq\nIY8UcN7jlGu/ZSZbzBk8Je6QcGmZTsGjbXDRPzVB3ZZ/xeEHphG7cdYzUW19\nbDV0IxJTcmkj9dvZbl/STAAuWc/bO2XGRYGCWdEC98jf7V/UnaC/Vm30DjqH\nHGF+l5V+6pkaixpmYJy+xW89YJJidtNTrR8XyqYopIDsjaWH5AMLGihvL4wI\n3j2x\r\n=9mxl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7cb6a3577ebabfa7e6f10fa78936f5dc343c2c0c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.43","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.97-renovate-non-major-7cb6a3577ebabfa7e6f10fa78936f5dc343c2c0c_1619159183040_0.07056211564101322","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.97":{"name":"@balena/jellyfish-client-sdk","version":"3.2.97","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.97","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"15af8720f13d6250adf23ba28d88f77afd5ec58c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.97.tgz","fileCount":39,"integrity":"sha512-IEVOHcgRrqT9rXDz9GnRACgi+PR/tzBO1WPupzuak1Pgl8ba+xtZqiN9nX/gBhKe+KQYmD2hdHSaBlUCrCq+Pw==","signatures":[{"sig":"MEUCIQDVHUl9hUqnLIc4J8AlbI1049j+wpckCQrTA2dK+lbyqQIgZQiXzlYXGffMsZ3n18TCGkpm2KScHpTB6Nl7Xvo5FbY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggmnKCRA9TVsSAnZWagAA2AkP/i3mAhQk8/HRIU8HcCdk\ncTlEJMYY3J1nsNDeqzNUUnoOygvUVX3EHVdyX6wxQgOm5O+Y3bXixSA4SH/z\ntT6yO7jchWNKZKmPHdR4LPHZWDHyN1D6ZXS+0ppzUNFFDUk6PXHE19aQf/Xe\npkeVWhoE8P8V/XCfY88CCx+eHjrkCFJs0hGUlUimSwIClRqgRfR8/EWoMYmz\no3IYalAAGLfBsZvibZLZJG7+WAUEKsc3do40led4qwYB+7ZkM5Tg2CPOTw0z\nrvImFboerYbLtZWdcpPGf8Q329XFHyWUz2a0A9v7DV9DK5s63U3CnSbbcEMY\nDkrjk5/km9/xieUHX44YWFLsIByowF47tdXnzPeRpeQoOvV9mcX0TmxJIS8y\nL5T79wy9dYj86aoIjLwCtJKq47GfENgEMbyc30i5ahg2YOF45DgiT/44YWlB\nsgvf8voGaZS7xY1A18KCkbnG5qCvNB4yrbgf2ZkObXDwMsCa60KO2sGw4CZv\nfSs89u7hGCucgX+E5Hsc0zL2V/kL1IJA3gqXlBx9Lb4rE3qaOQyW+FWNM2jx\nsu/PlRqLEFtI5c2ykJHdFBUpXXjZk5iecE02R5is/0OTBT6OF5l32G1Xk/7e\n6aacLvOx+hzJCDLx4TeV33G3IRIWl1SScvB0LgATd70b5yOXzFY0noRtOEgd\nPKQZ\r\n=Q9kz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5532f72ccaef9368a203d6e84978fd3158b7379e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.43","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.97_1619159497556_0.6933196320081756","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.98-renovate-major-socket-io-packages-b028080ba86d3980d82fc62e5b212904efd6bdde":{"name":"@balena/jellyfish-client-sdk","version":"3.2.98-renovate-major-socket-io-packages-b028080ba86d3980d82fc62e5b212904efd6bdde","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.98-renovate-major-socket-io-packages-b028080ba86d3980d82fc62e5b212904efd6bdde","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"296ae6bebf5a264e04289e19c01eb01b8a2a77ea","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.98-renovate-major-socket-io-packages-b028080ba86d3980d82fc62e5b212904efd6bdde.tgz","fileCount":39,"integrity":"sha512-+OYhoY7WJIHp7r85c/mIRd+zWTctxd1uNwX21AkchKQz787ErxXbiVxt5tz7Oowsj2+8/ylCUNHR0x6U2e7+Xg==","signatures":[{"sig":"MEUCIQDFa36QRMWBBPWYof8TqH27+r5wKqPYk+LLHDl+zXmtMAIgHUn5kk7DqkFGfc/u+QtnOTqI6FhR5LAALb6liqHYd18=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggmteCRA9TVsSAnZWagAANeYP/0wscX7iGwPt4+636eiF\nkk0JCd7WxbmRlrEOOGtoKgsWVtGKqz6RMojiJPwn6EC5Bj/Ks19MMpVTxhdQ\njCiTaLQz0Q/mk88QuPIO5au74uacHxFSoiWPcoSEggEB1RHKnxyzCMnT5Aj0\nMVfz7Iug89DsHrCI/1YwPXWmp0irgJEeiPmld8UxtnEvuQpAv45n0XFddOFg\n0ckNqJz3Wp+dzfhBvsTmPiQnrvxKqQO2FnrsMHGAzZeO74E0s3fu1aZFie60\nYn+ZegNTeSdo66OXi+9nkmlz+OJzsC9c+G7p77cF5DnKv9XzOVvYJWMuZVmZ\ng+dtuT6gbNN4+oD2Dw3558aoFMevsULu/UDu3igDn1lXsl0Hw5fp4wlYGPQM\ngBumZlyun3ZIOJ4vsy0E4yA2+TzpcMEWDCI1Olr7xcrxNYWmPWyU1fgk2ZG5\nn5lFjEA3F6BrwtgFrjrRT83CvGIPegF0Y2tuhoEmfHkzXPs07g1S0nqO6VhJ\nk1kWL3ul+5Ur/bHpI1VH9fYk37kosMdtMpD/uUfOlIs5UI5YnO4WGp8N2pwX\niLSRZdlia4IpW0vIYF2S3yLqNeIad+4FS8ETdAiQjr9Dvgdxl4KS8Z34J9/u\nDuT5kPbcbZaCMdp7xkK9nXK61D/vAJUUzYPSrwzQ6KwgP05IURLQzoDYH54l\nQtJj\r\n=4s+K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b028080ba86d3980d82fc62e5b212904efd6bdde","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.43","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.98-renovate-major-socket-io-packages-b028080ba86d3980d82fc62e5b212904efd6bdde_1619159902405_0.8880924877848437","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.98-renovate-non-major-fd0644d7c497076ab2055e736baf48c7c2621756":{"name":"@balena/jellyfish-client-sdk","version":"3.2.98-renovate-non-major-fd0644d7c497076ab2055e736baf48c7c2621756","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.98-renovate-non-major-fd0644d7c497076ab2055e736baf48c7c2621756","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"03c33d3d939b01d204d314e33f1393efbae71c20","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.98-renovate-non-major-fd0644d7c497076ab2055e736baf48c7c2621756.tgz","fileCount":39,"integrity":"sha512-jCwOUZEUDffbAsYbZEGUM4yPgAs0WR1vAI1KKJuLUn52M76KNTmidQ88s48bVYta5NzeidKXSSqKtHoWqljo7g==","signatures":[{"sig":"MEUCIEFKna2nhK/kCGz6uakSyxhjgpyi+b4qzVzPtA4yaPdoAiEAxR4mRSMCDT82350MkC+7AobY2868yzrVRAJNwWiVkyg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggq/wCRA9TVsSAnZWagAANVMP/j6Rvqx9KIdWazdhuXZ9\nOi6A14N8AgMOyVQphRDuYnCLdsQU8Gp5g9uTs3rp/vLXXcXMB2v47Ips2hp6\npR+0p2A2+pB6/oeU5RvaB2A0D44jeEcPb0JzwWhdkH3hk+dwEADZgBI4yIoX\nHQ+4Cr2iPm/UxPjBsbC4ffo6pJc83Chky+kNXCPi1CyoCb8/n1HPa2kRVBud\nwaq6CUODwZmGptzZhO03kP0IzOGYkIch8+X1ey/Hi0U89L+kn3BRq/Cw13FR\n7irxTAkdBFi+QbkI9LU+C/fk0bUO+IV5Ai4EAUeG6u8BHCeBQbGn2JrtVr1c\nJSNi8Z0W19/kHNYQLUBWtlQOma81d+MqRJdwd/+KBqjqfzhxjbmYURxr+PkK\nmQTxqw1lNJC89UE5daaKKC/2xXjRjZrnzMqSKRT3CsGzK5diGpdSGPPlQNLe\n2LrJJKLhOAX3gXZCPBj0uB1xUv/gkCSpQ7suNt9ResTxJxFhxWlghQy0miTA\nm0giRBSCh/EkuQgK5LJiko1TiqPAXyDXc63+NER8mus4bivbLqDFeoMuQe+t\nQzNZOPNbwRTUa54AzabEGqQkhGVHJ50kQLTWoHp2mzMcuJLW627vC4KT51z/\nBHVUUB0lAPyxJyXexCv9nmawlUxwfzx7esAsT5IE+cHmWV9ic6GKndiCwv13\nOSrV\r\n=9jiW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fd0644d7c497076ab2055e736baf48c7c2621756","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.44","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.98-renovate-non-major-fd0644d7c497076ab2055e736baf48c7c2621756_1619177456450_0.70200709074951","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.98":{"name":"@balena/jellyfish-client-sdk","version":"3.2.98","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.98","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"823d558cd588a0ad3af12d56e4fb3fa887591154","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.98.tgz","fileCount":39,"integrity":"sha512-h9VL8f0gugCxC31El3AwUH/4et0X9dlKrrvIluk3qKCIQLG6VH9ODKdzcJKEwsK8sm7i1Dvxoz1N1HXcy6yPOA==","signatures":[{"sig":"MEQCIGXmaSZPmF+yw4YY/OsWoK6oFBGRmoyi33BbZXKchHJsAiAMWcr6ibbotJ8d3mL66ndZXX32+5icIt4Jp5nbq3M27g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":238939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggrC/CRA9TVsSAnZWagAAZCwP/AzeYzs897Iwn/Ta6T2z\nNZ9SPMHcNirKiYD/oSdHIecQxihxKa4vJDbZ4cI4Sl657EifMJeCMgxInc9l\norJ3I4LbrvEO/IluuKG1HJG3kWBj9QwgAn2/UiWKghtUCqzEA8GRhPs9Eszh\ntFAn+eZrCigBu03VLq/Mkpgvrzc73fwNCJ70ReWyRBk+DeJP42l9iKZixRzA\npTgfXFN47x4G4iKOVadWQ9PfB+y/ays/HC6LihbrRrR4U9lzD+6L/KK9D2tG\njaw86fTr+8taTp1AnD8nKXIx84YC7Miy3Z5wsoDf5H3WumnYCIQJ5ijGFRRF\nNfSSQ+Xvsm188kCdDJJr2e1+iqzrNVdZWwsWbbycmlB4x405bb/N/3vL/0WU\n8haaR0FbF51pSG3erWxHre9UTldD5aTEZ8Xme2PHMmgXs61IVcSPflIznfyX\nZk3X3s6GgmL8FfmN62gGOny7pfqfULUiJzf65yySrIaqJPi71c2ykUU1temY\n3sKe1Kecef8nRXScJKKvB3IhAGD4GoVfp5joOZriUpH/dnA1Zqarx5NS49J3\n9NL7VG7VixXUP7icUr2N5X7jnPI8/6PKC/Dwfx3VZaqCwiPcWYt7+k/iET5J\ny1aHuur034a+WbiV5VABp50iCKHV0lm8SLPC7agkeHM90yL+FUwpMsMDFt0x\nJOQY\r\n=ag0o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"93e2a6d911ad75f7e370d32ab70ec1aac2bb0f9e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.44","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.98_1619177663091_0.18653365657603538","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.99-renovate-major-socket-io-packages-cc1b5e4c7bdce5dcd2456186c82a38395dc12903":{"name":"@balena/jellyfish-client-sdk","version":"3.2.99-renovate-major-socket-io-packages-cc1b5e4c7bdce5dcd2456186c82a38395dc12903","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.99-renovate-major-socket-io-packages-cc1b5e4c7bdce5dcd2456186c82a38395dc12903","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cdf7129d67ff0bd5f185dae9dfe7fd825f8d5b0d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.99-renovate-major-socket-io-packages-cc1b5e4c7bdce5dcd2456186c82a38395dc12903.tgz","fileCount":39,"integrity":"sha512-m2X8glMHInxvOeIHGvGHeU5vq2+fswBNyb12cmm74AkCnycrCvlmDTyZvEcan9YccI2OGa0NzJccVDd1DWG5zw==","signatures":[{"sig":"MEUCIGjTM2GFzCEI0AbRWG2/qHN98mUA+M7L6Hy8OIsKF/e2AiEAoEYhdgYoVpqQfAu+2ZNxbnTjI5FnQ8iWsOf8g29FiCY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggrGtCRA9TVsSAnZWagAAznsP/RUvxD0f2rmbpn7eZPaO\n0nfE6hqV/RXSYjz+2g8FwHFmBN4c63JkRgtrojXSQF4sZZKgW7SyL73A7G3B\niYiO4I8y+ZZBJbvPUnZ098H01mNPfZfMu/Ik2f/gD6n6s+okWg5746wDIX3Z\nExV1aJ0TELHGr89JskUpPX4XSV5LiK9bWUhQYANhcNuWA+d16lgJSru4+/y6\nyqm4jPKgGQdK//v6rh40kKtZx8iqbRd5fUaMfW12CYzoaUFIGTywqx31A8j7\nLzNbq8isoYqVkKqtCP2ouH5YQuchhfHi1JPSmMvFV17+hvGj6VQCV4AQ2p/d\nd+xmwMI4cVa4WXp/V55Bno7InkxgZ3WoV0oGDYFE5BvByKQJjw6s47R80xDV\nGufDRiCduEORMGljCDbcKJWkbG7vMWvZ7eMqbjVQ4Q1a04xVuMBtlKxrmhaf\ntUY/nF5BBrXJ+2qqC6bgRS4TveLxLN7LTzxha1UyiN6if2tLE8li4nqCUGzz\n9zCUcpHG+hlHaJ2HNTFunZ8jsbOSdlwOI0UCePGoVK6ZavjdDT04zjNUJ5vA\nZN7MN4nzWMR3zcek1zbrCyTBsnoT0tZyx6DPpVacpKrFVCFISjB7HKXFo9zD\nm/Bb09r9ujrFgBwajG8GHP0eHIAdKK2IKm2yfywqtK2/cobl3XwSUhku8k0q\nH8X/\r\n=Lf8z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cc1b5e4c7bdce5dcd2456186c82a38395dc12903","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.44","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.99-renovate-major-socket-io-packages-cc1b5e4c7bdce5dcd2456186c82a38395dc12903_1619177901250_0.5031023379821034","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.99-renovate-non-major-9585ec65cd71ef68b17da3562c48d969abf20eb3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.99-renovate-non-major-9585ec65cd71ef68b17da3562c48d969abf20eb3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.99-renovate-non-major-9585ec65cd71ef68b17da3562c48d969abf20eb3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4452f80e5444f0e871e7ec385bf43e2bc52aadc5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.99-renovate-non-major-9585ec65cd71ef68b17da3562c48d969abf20eb3.tgz","fileCount":39,"integrity":"sha512-ErFRrrhP08C2Se3z3S4WiG8/IN37QBqpsabeYCqRYcHcL63VtKhDdd9Uqrq17KKIlm4KubM0Wv17EySZhJgdxg==","signatures":[{"sig":"MEQCIFLEILG2tRvqzUUSmqLTq2yb40CTes31WWHU0xcOyiFfAiBUY6rRhfUm4Az2cvwmiugQ+GFDzmXOSHDeluKCk3aOxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggtoWCRA9TVsSAnZWagAA/m8QAKAN8L0zELXpQKjy+An7\nA0pW4adIiN2OtC9I8253vWrc7SdkYzIwgIbsbSwepDwsm6jXY/pI1inS+823\nTephIx61ZXITJXuUwpba594f4zZ01Xo3C+sXc6qDWcAx39SJb4HVsoLwOjBK\n3equrOBSLE3KmE7DCJs3/F1uJbx6BpXmOKjLj0wPUsywqgtmN2KNo0soxf3W\noJDGnCWLVkEIYJENgT0kg2PW/ap8+RAAbknBWsD1dp10giX5eZK8y1TRZdPx\nHNiyFVI2VLjOpLY5h1gn4y21EB/w9vcppt1MOGc3lY2uCngsMSLi9KhmOR+j\nT5UazErF7LTgeuv7fx9V6RCl3RxiMzPGge5R3nIneGVP8V6WPoZQMmFibML6\naUS6YKaJD7tIFD/phJpnZaYfklcx2At3G9irGdEZzl5Tj9badEp/WDeQvw9C\n2dWr/mG/uFxx+AZuAQ4XdVhOZZ8Z0vhDfmxMrT5CdvwQvyS0OljTe/WJNe1P\ng9/6fpYd+8W/ycK5UzS9EyQsa2EMU0SxaHVMqCHY8ORTOZeg6LRlhPN4auA/\nCqVv7y7zHPbalJZsh+tfqg15A9M/odVF+kmND5GYHFoCgylKRg61+tiYP2ez\n6MoKvTOJRUYC/gF3v3KKtSFrw5gvmrGYnVbWtOWXaBP+LUBbLqsgJtRWpfK3\n9+k/\r\n=+DMJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9585ec65cd71ef68b17da3562c48d969abf20eb3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.45","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.99-renovate-non-major-9585ec65cd71ef68b17da3562c48d969abf20eb3_1619188246069_0.7251487714270541","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.99":{"name":"@balena/jellyfish-client-sdk","version":"3.2.99","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.99","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"183eb9e97835fd4f75c4a995eaf7056268408923","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.99.tgz","fileCount":39,"integrity":"sha512-M0GNwO6I7JH3AYmH2lPOJEcmOLKUgsa2Gk6N+lrtZybO/mllxlN+CVH/sZyzGAwJEElpoeMGUESENAfYtxZCcA==","signatures":[{"sig":"MEYCIQDOPOV3ZWpnHYRVYUB25ERh+aAYdmFT/s2hEqItdqEARwIhAIDvZIgPFq3RRoBvYIMpaaUGPxo/sMUucMvEcNpxZH3h","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggtsHCRA9TVsSAnZWagAAtNYP/A9O62IqbX1oeXpZpDk/\njK0MILsBYde43gCtikFBLOci2woEfIVQdqdYqVv7StY4QZQ1lWL8FOJtf6aQ\nMTXPu6eZ8wx7gmRXH12FDSK10uEBO4CXEAHK5JNHy0gwytu1roKo6B0Jbfbl\ne69CNpm9LvMF9/1Zr+fg6YCDfXmpvx/aXaTKQfBjj1286gf6Sdm2eMRQmQNW\nmA5mk2qeYSmRwuTiHlyjds/zrhAfzFZwSzDtlRJCeZPc51KITffHIHaFM+qF\nowDaprc+TBOJ3a77+LeZeDQ0r3ruPc0Hgu8wvGVIJEZB3qaGVZqR5GApw+4Z\nrDc6GTz95mNmlC7sqhtB8SqNhW1OqwazZ0nHDfYuMPfKEmrP/q1iDuPIVzkm\nGIXR6Mq1vm5Wo0rFDe4smxkSxBfhjU9JjgzHT1p4V3eRnSBIyrLU0y0C7xAd\nLW/cpkWG8uKy5IvM4yZy1OgRGBYgmNSlK5rDt/ciJiJLi8v349S64qwgHUiQ\nFZtfH88WMnSuUtX/9H5it1w3t71jlGnjRztVekkoz7afO/+6pclo0B/3xlf2\nMVtVioNTjHJSxOvM23+f9f0BmFRRV+uyI/FXv/p9fwKJLOnospN068sqxEZL\nWdApS988VuGwcnCgniIotbQHdRnhguTMtJD+cKH3i1hAsoHUyP2vYdI/nsUE\n8YwU\r\n=iiVZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"12a3d331789b6489ed64629ba81a7a38f4fe0747","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.45","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.99_1619188487041_0.44406161635612706","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.100-renovate-major-socket-io-packages-1d8ff9466f068fc928412234f98dba8d81c67a05":{"name":"@balena/jellyfish-client-sdk","version":"3.2.100-renovate-major-socket-io-packages-1d8ff9466f068fc928412234f98dba8d81c67a05","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.100-renovate-major-socket-io-packages-1d8ff9466f068fc928412234f98dba8d81c67a05","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a2ae6b3a276b174fead4bddddeede396081bcb2c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.100-renovate-major-socket-io-packages-1d8ff9466f068fc928412234f98dba8d81c67a05.tgz","fileCount":39,"integrity":"sha512-UG7u3xGTO+vagk9gSE82yKFviOYd5HziOyiZsrdBUG+SXZR6CZrN04I8oGDioqT7M09uMWbzDw1VFBmuFGOfBQ==","signatures":[{"sig":"MEUCIBdlTit2gOhFCEmDF6NpBxnBvhjfg7Yzp76UaL6qEENZAiEAxqB1+LurWFsnn6rpWQOaejwAJBbTfyEhnK2bgrjpiaM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggtwHCRA9TVsSAnZWagAARa8P/RJqSm2PL1cznmvw5/Jn\nz0IBuy2v8iM/Cu6zBg5JhQaOuDtZKLKZDEUhM7MsqYRAP4Yo0ni+Ta53gk12\n2Pl9kAZweRHJvdiGvpWmH3BLwBgDKoKrFPaebPGMDDE3yxATDMrip0nbNW3p\nGrFkqYdnYioZeI3EY4eQat867gHx8YSy0G64z4yr7tQ0IPhMd1bzjOFPc7nu\nw+xzaTEh7oxQmg7GztBBkf7pBLkOiUpulWkRYeI8zRHM3RneGjY2mcC7KSa7\n0C+bE7LjDmRwmMTqXo3XjcR47LZocESCxCuKx4EEMrzOf4oDqFSkmidgXnMB\nlIPM88NKcdUlx87E3LtpOuRBd0QPO8Q5x4ENQrh1OSVRwwTls8qE4KZorTmu\nudEiyD4sRrtgrvfur5MH7p58LU2dVMBf5HBUNSm8XIPz210uN7nRAJp1xtYm\nLOmR1DiS9DLUtUMhi1kSukPMBOsbwo0/pmhYATyBPUuAS5ivtitBUElddde0\nJOIqfXVaMZF4+sE+OSPvSolaIhuc0AjD1wUW5A4Wh4l04Zj97jdV/s/3TOp6\np0l8M9P675SfOvRjfKzky2W86hj2A1AQs3Tmq6Ly2k81cm55HLyyJ5Y+xwbC\nK9y1Ay13j62IAMHLYRvk3OrfvfqWjomughAu5nVUceyuH21r5hkWA6eoCihZ\nJo14\r\n=WUNy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1d8ff9466f068fc928412234f98dba8d81c67a05","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.45","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.100-renovate-major-socket-io-packages-1d8ff9466f068fc928412234f98dba8d81c67a05_1619188743425_0.3557139434048151","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.100-renovate-non-major-849145e695a6ea6b1e8703952fe4660ef832b7ce":{"name":"@balena/jellyfish-client-sdk","version":"3.2.100-renovate-non-major-849145e695a6ea6b1e8703952fe4660ef832b7ce","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.100-renovate-non-major-849145e695a6ea6b1e8703952fe4660ef832b7ce","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca2fe4cbc6931fca18d4c5479329c5b1e330136f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.100-renovate-non-major-849145e695a6ea6b1e8703952fe4660ef832b7ce.tgz","fileCount":39,"integrity":"sha512-rfL9AzbmBMuAto1BKe9faJseFwnyF7RS2Oe+hCcPePYDGrPUns0BANctSjWkRtffRfGYrtRgLZU3EYZhWA75tg==","signatures":[{"sig":"MEQCIHrzd1gNJRJJ2mGiAEU8yb18VRlvFDKFboiCWRxgZBQPAiBnUNrAkqpS0Kbd/1e95r3NgyhPFMZrUNm7nUQdJFR0UA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239205,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggy3ICRA9TVsSAnZWagAAmd4P/RQwUQPnHicaEyUxrXaY\nnYlzeWBHiJYKtemhb1E8UdtF2DrOoOY31PS+6rRj0QRaMZCIZL96cibVGIvF\n2BzUOq7XT6Wcm3spNgWR5cVVSkLcEy/oBwh/5jFqzmrvff0HssfHFYKwE7Fs\noklLCPNNcUnp88XkF/iFc9/gPQiddjgtNjTWxQwGrfPMhtjpMvkYEWknD/ud\nP0zRHA6nCDLAIV4Z36wd08tQdbpZZ1COm8+OkULPUA0XcIHU0fOJqWYfGpWl\njdLqYU23rv+1DzXrBUX8guSiAOroZLuiIoQrhn7PF9WrezxAVpExWbCKhaSa\n1Hq+Z3Ts393m1fGS8qs8lvkCZxKHvEYMicz5yJQ8LNBJRyCBmmhMjUHUrlH2\ntfDS/GwcCACF19gZ+MQ2USV4r9TktwBBm+cp0dmglaRPht2o0YTl3KKBI3ji\nXzOoHZt9UwxyH5R0iOvViwdqsj5WbxkO4uRtTJBXVzb1Q/mQRMLq0p6ix9Gc\nHUwwpJRzTWRo3Dc2sF+L4ub6wzLUf7ZwusKIukoxoRCcVH0kPzEynWEFnGrj\nH7yCLxF/D03GmjTlPHHaEw5d1/0zoStRwu40ykkUT0XzJxfqRBxHT93QfxmM\njoq5tpBXcdnm0FCHmnjDUwEnQtwFFJqOkT/bRItoQ21nL3rc1IQtNbl3UPHK\nKNDY\r\n=/lV8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"849145e695a6ea6b1e8703952fe4660ef832b7ce","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.46","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.100-renovate-non-major-849145e695a6ea6b1e8703952fe4660ef832b7ce_1619209672320_0.04838136467602894","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.100":{"name":"@balena/jellyfish-client-sdk","version":"3.2.100","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.100","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9a54ad3764c683c17bf8949289767d2119729922","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.100.tgz","fileCount":39,"integrity":"sha512-DMQtqh6aeg8W+gsPEgP/gkQo2l5okWbhsqOXr4SL8SmVKziQDw1qEfGbYfMfMZW+zUpp3ImrT6UEDrcboiAh0A==","signatures":[{"sig":"MEUCIF64S6ClaksnWFqD1mrRVEQk5aiyw7PUGEi8OX1kI/sCAiEAvbQt79fnoO1etq75H8czf5hCSQ37SzN0NqjZl00wksY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239145,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggy6sCRA9TVsSAnZWagAAqa8P/j4z1E34A61pCX4ZfWpV\na0lbNKWbKX0qcfPakmABej9CC45ZLAS40Gy8V7weWgRfAVnsFIcegt7nd/eS\nU0WnPLdjlKHlMxH76M+l64xGccdX4L9KtVMRKiNzpGzxblgVZniUmPBkzMZ7\niE5EO3vuQ8FtYgSX6zpNX3Az8vRezXpX97wMR+o5MUzYapRjMeNkfzi2qTuP\ndaaFA08TqgJvV0fcNBleB100fzWhPiFFgty8He8ecvgKkK4EUvx8YTPh29rK\nOZNT9aY+yDkGpxAcGkA30LY9aNo8OFbliHhhD2iQQ+DyrY7YpTG5F3+Jj5WT\nKod2xkGHqEwbhbJjkM9aDrj3B67exjw19ZLQckGgPtFXY9Ery6TDV8T4O3DU\nYRvJD+Nur38Hpd8R4m0qRJvG4THsdiaVkM6xeblgEo25r4esdohXGughprC5\nvD7TLPqbBw/nunTody7izV/9TtXc39bVDWTSqDd5iVgcldI5+ahAmxrEJCRA\nFuX9zjIAHxVpWCwyYNuZNsfC/x8S/zIET0iwToo0fOXUIKOodOKX+LaFeosg\nuri6evkYov2o40GoMIjqGMwOemn2riKO8JQIunUIrBMyEE6ZdQ+EPp1LNgrz\n9EV8VxE0yRgX2GpHjggObeSWpOoQXOFk2eYnGCkhXN0zpxyiTNgETE/8Q2xy\nAOSE\r\n=0+mP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"854b255d06edb47cc82ae617ff87ed0678dc332e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.46","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.100_1619209899812_0.020035042029386885","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.101-renovate-major-socket-io-packages-6a7890e82a7abb1a74448f5e287227d30506af13":{"name":"@balena/jellyfish-client-sdk","version":"3.2.101-renovate-major-socket-io-packages-6a7890e82a7abb1a74448f5e287227d30506af13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.101-renovate-major-socket-io-packages-6a7890e82a7abb1a74448f5e287227d30506af13","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1b31b81efe854b4211c63bf6723f655940f23aa2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.101-renovate-major-socket-io-packages-6a7890e82a7abb1a74448f5e287227d30506af13.tgz","fileCount":39,"integrity":"sha512-grM9Qgu7cvzi2DoWiKByM+gsVUto8eWtMImlDVT6Bx9vYelYbeflCxYRo3/AnQ5As8cot+Rl0yRZrNpm11LhzQ==","signatures":[{"sig":"MEQCIHiKJI94vfH6NOL7YP4ZuZ2FeJpfqFe3xYDcL+b+Vvu+AiBN+z5ooiTtC/+jk3blY1csycWMSml9ff8+eP9IZ2LEZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggy+XCRA9TVsSAnZWagAAXWsP/j2LBNMY098/Zdkpf3AW\nCdYMxHemLud79t7DoYKW8nTjJrrHPbo3t/u8vxAgUfrx5FGRiWieDUc3DwRG\nIsh4njgNdVxU6IckxIoEuKTtcrilCuhMByLxFXbyIw8jHdsA6OoeXL8S+HAW\n0gIWN3gwBabV4MV615Elf37YWbUvaHRwpD5SW7YKuFTjBTVEhp6TRd+u81GG\nY3+xduz4Iw3cEfPNiI74K06q2cB7UCKFzCCYFENSR8kcBZBqo7dSFHsjz8/S\nKdDcWLXStUrcArDNGTi2PcWzbRO7n4fCy45aVsppTsqb/ucUUMw4f5iVdsml\nTg7rli2XLyKWeps5noivHEQJaNkeXmkZw2FEHtHbkHkeb+VGO/BZ1Jk9PgG9\nkqbv+56IXn+GP3z9a97gasBDx6NncgyhgOXXHLEObDfUA7ipJCFsQjuDIfI3\nwofUNYERbk2ys7MxOL2xjrwQ5Zm4Q5tiswM34+lPWDGg+hOztF+K7et3Q0RF\njbbG9Nh/1WeOdaNYABMB9veLk02lapWBBgll+Amseimst67o6Qm++UHDO59/\nj7s4DjRpI140G8hq47j3ENnOcq+o6yWglmwEGGhZ2IhxtOrXSD96H0tyb6Qs\nosqi8zTwXYwygqQlZf0bNHA7R9T+79OJMP/yzja686q8w5sgofh6ZnGhg7TF\n694q\r\n=7bvr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6a7890e82a7abb1a74448f5e287227d30506af13","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.46","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.101-renovate-major-socket-io-packages-6a7890e82a7abb1a74448f5e287227d30506af13_1619210135486_0.4387019410933133","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.101-renovate-non-major-70b3ecb02130e3a4061a4a51e455c84702597c71":{"name":"@balena/jellyfish-client-sdk","version":"3.2.101-renovate-non-major-70b3ecb02130e3a4061a4a51e455c84702597c71","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.101-renovate-non-major-70b3ecb02130e3a4061a4a51e455c84702597c71","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c0e2fc8df6851ffef09ab5ed4d1056fd90f306d9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.101-renovate-non-major-70b3ecb02130e3a4061a4a51e455c84702597c71.tgz","fileCount":39,"integrity":"sha512-h+OmF2/ftk9dPEROYgY7YDcS7UsO15NEVuolT/tm1C1iwYIt9IBoV6TEER+dQ4Q6q8ETU9KhWTb3kKfz7qCbZg==","signatures":[{"sig":"MEQCIBW5M4ziEVgw7DOU/d2w+AP/ol47eE9YoBSQ7VV6QBuFAiAGuIrL8Ut+achxlDO3CJs1PzeDploWV8EcBxXs8pRb6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg2FACRA9TVsSAnZWagAAmU8P/i8pGW4wMmULjfQt2AeO\nZl9J0v0owzJJns+7cSc5W8g+VkZOmSzqYCeczAQxEHrWd3B6QnW16QuvmIw+\nfS4sD8Yk6EjYLFG3fvQbZ+wpNU7ePzvsJggRIXJtgOFsBvKXGWy4iHJMbQa2\nuQBYDoF9ctcRg/kW/zONT6217AbsDMB9Av+uCb+Jln2KNRThLB0ZxsEqcYLr\n74VZhfkVN0/ULSk44ZSpWeu5wFpSiEsjpyoXPbe/1Fnu66ypMqGlSDQIeJ7a\npEVzvTJMPnVqVVVhfK6iVBr7vEs9bNkFPGjHnWKwWe5f49/NRAMdFZDR854r\nJgliFTIvnL0wQsNH8AlFW69VdZwiVgF+UqhuMgdooowu7eCKp6/xu0q3NYWs\n23y07jvdSEO/QURiGZaOzlUfze7tzjOXwbWULmXOxR5j44VSdchRSwb7tozp\nWvh4JerI8XCvHECOV2/HBmt9WK4ygdkoDvsQVv5RCXXocWWTPZ/BuWU2MXiF\n2sqR+PX1LayILzwRWvnmPZ7RwIH3phYac9HtXV4zIjJYmMGbHjmQMmh6VEWV\nCI4UptC+b4jB1ogepuM377agRGmKd14g6IpmlUllIS2cVe9SDHlHfAC63WEf\ngv1YtKVxLM8DB/ZkBxvExUkcJPubEZzYW7DFe5mt5pxL+Ri5EY8hNaglfb42\nHlLb\r\n=l12Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"70b3ecb02130e3a4061a4a51e455c84702597c71","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.47","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.101-renovate-non-major-70b3ecb02130e3a4061a4a51e455c84702597c71_1619222847740_0.803950504153023","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.101":{"name":"@balena/jellyfish-client-sdk","version":"3.2.101","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.101","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4ec8ff8c2854315d032265fc1b1bcf04a3fb7bd9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.101.tgz","fileCount":39,"integrity":"sha512-qTxm+tj6IS0PC1qY8NdjJ0H7mbPzStIJJvVEyUlOK2e3Q8DBNXhXLubwFrcn4ChX5zVDGVsF3EcxOaLVv4dLLw==","signatures":[{"sig":"MEYCIQDFPkPNuUuIjEiznPk3vWjSTSZWD0RB0fGNcmcVuW4K8gIhALX5ViT0LuDDrIwp65iGqKEJ39NQsS7s/y1TWrzoKl2d","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg2I2CRA9TVsSAnZWagAA9NQP+QFAb0Egum6iQjOS1Cua\n4HFKwp1pb6hDM1Tzo9lparF5ev6Y+UEJEgoOrl6IgLwKDu4fXpm9DgqdEWjy\nx4khxpWpDm+k8IgLz7LM566TnpiW/eZAA2OW5t9nDH+Hf80qHiHsGYEcZFKO\neb6JalVi13piRRqlUCsfCkmaiEeq48AZlH4MGbaMaT97FNRShx1T/gHSKk/1\njdt3NdkXuvsJl4UFO559O1LWw5pasOBjcZHlbAQ6JZETk3+ClLhWhydab8R5\n5E/sKGY/w/IEa4YqayWM8uxWDQKUjgQQNaNIEMuNPx3UlltuwV6rdL08ehZP\nC9oQwvrX89jLnqtiuhtspaN5l0M+A3dLXHRqBT196uoYceqotaxJYI7VFL5I\ncTG7PuMGelcjFZ0ln7A6sbDJBQa5IQISz8XPxVX98/9qwde13Gm1wTQCAO/N\nlPx8Yu1o4k9wusrdlkccU4wd31974FkKY9S6164laElyg2mCv9w1KKOj254W\nHJ+qu+tzKFVfSD/jSKowsRB09LWJmKJn9RTGMp2su5m84+zA3OKq4VNPB/G1\nrqFcjcICM7JfK06djaTIjTNVByGGFNSXK9nW24VWPVN+7W3RtPnrZdbA2CzN\noNih+yHDOnPNlbAUyrgBpkiTV4qs78ZUwhYr0rCtyWyo9Nb+btKsrRPaO5eA\n+vtY\r\n=UCP1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8d3f9c4c17aa0c27110f68acd9ce896bdddd5cd3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.47","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.101_1619223094308_0.09458625405809484","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.102-renovate-non-major-e675aff0b4d9f6ff3a2fe470316655cd97ce5c19":{"name":"@balena/jellyfish-client-sdk","version":"3.2.102-renovate-non-major-e675aff0b4d9f6ff3a2fe470316655cd97ce5c19","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.102-renovate-non-major-e675aff0b4d9f6ff3a2fe470316655cd97ce5c19","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e0da999e253a4cb0d9ba430acb7c3094e5a6cb6e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.102-renovate-non-major-e675aff0b4d9f6ff3a2fe470316655cd97ce5c19.tgz","fileCount":39,"integrity":"sha512-0JPMQiqdmB2zlzKQUl3npP/H6ShXe0dePrep8pze1DQgELXTaLiCIq6CvSJWP9/Ji8TejiEycH+XYZXSA0uPeQ==","signatures":[{"sig":"MEUCIQC5K2sh82IkR/AZwZtMXl8Hn6VQvgTbWUKzBaJcWq2XNQIgQ57kX7uulS+GJUKqxPNJXR9kSfGO63FKfdt1SRKW+gQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg5w5CRA9TVsSAnZWagAA7GgQAKEM1QZZYTPVsLypRWvB\nQpDLtQNIuLmtQCC+tVggQd9pkJezsr2ANiHE6BvQKU/bAXJb1tRXeRpunmMD\nJgB7s2sGL6fopxmdsccicA/l01Z6W6ph8jgLYFTCbitywvi/m6/ogbwqTCJH\nf41xMh3ss72ucRft2sdmppm6iO8deAM6x2T2rxMCWFAIc24J6TveBbIZKNr2\ngaR/Y9IBQt6sCN+bdy1JnULMHvQDGpeWTO5uT7UxVubADfb5s/MLW8sAxH1w\nt5tDJrpKXXDHKLH1btaLQWdTui4CtAcW5EFPAiU3ojrcXPdigxXHnEnIe1Wi\nEN6qJI2nFCDIvBHUyLo5xpRBuYxoxVlk3Y8cqA5C4UDeaEDlLjpdoAVI5iYu\nCC3XT/gU4bhe6uY9ooymupzYf/notOzsxjwGSR4P5Om6mCgTCoe3gR+ND/b9\nRAt1bA/f+BPSVsngpA+nbsw0dPoCfV75MWyj4+97fRJdxqH9wdq6AEz3gs02\nAK/LvQSJi+19vciqGJQRurHX4vBz0+3J1fT8nQZxd4FkRyv70wfxstW/MoJ9\nSdZF1IEMnUto9yQZZr8MT1OHYwyuJrcBPNLHMgODV4eB3rxSPQY+t8vyOltM\n1pFlLCKXqklzeOl2pXLL09+On9sNk4k0FcIATZJ9/rdC133QvOKf2yoNTaUw\n9Ogx\r\n=hiM+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e675aff0b4d9f6ff3a2fe470316655cd97ce5c19","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.48","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.102-renovate-non-major-e675aff0b4d9f6ff3a2fe470316655cd97ce5c19_1619237945338_0.2207265822154323","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.102":{"name":"@balena/jellyfish-client-sdk","version":"3.2.102","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.102","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8e00f0539cb549ed13abd93e879e9e74a52a7474","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.102.tgz","fileCount":39,"integrity":"sha512-n8wK7w2nXkp7A4zYQXM1NOF11fkZzhD7olkErlcJOcyQMBPBe9qPUT3xB58kO/HzWn3G3ahP6NAQCN2lMy+HTw==","signatures":[{"sig":"MEYCIQDLpS+gSYcVlOMefXXCCJ+987BSdD3qkJag3s/75gEjsgIhAJg7gWuHzEo8W9YToelH17+yr/l6oKtshjYhUnN4m9TT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg517CRA9TVsSAnZWagAAzeQP/2YRjF3LtTGg9QScFszT\nBA9I3l6YR7J0+CeYuJFEDUWvibvgGtH/PTHT4eGODZH8m87Q8br85Q/pxEKP\nsjlLQRMsLp2UyD6VXySrN9dc2aA4ZHpJQFpbJMYIflukYyy3aYH9rAptBYTM\nvA0hcW+O88eqKWYAsZRpUcFNys0qF10WXkntYhprdemmqCKlb7aJO6+cM9Kr\nWSeiY/TERHAlg0AyhUAmwduA5idVPQQ8dhu8bv6g2JpBt4XtnOAYgOEdqVk4\nC2vvmpPsbnAezTvMujx4YehX8ITTOvedVWH7ebqC6S/Mq9RNUG3wpAoI/KWu\nhL0okB+catx4pH3dSSPl3HeXyTwfxQFwHcGXRbnPhR0XO7wfTuIV/Si+jwH5\n6cPFLzTpoVb9I1Dfzfh4nA7zl6fM0pdiiD1hUxRGhFcmm1rhBfM5z4mFxVs9\nptswmqckNNGxbAx1a2FNYnnrqqE8aCMc9t6ohqX+3fwDP0IMhk1w4sg2EuPZ\nuvSUVtNfR2YUBx+x0/TxWO9yYagM4vbgm+OLbmHYFHzt4prvMQiIMHQ3wlc/\n5LqOjw7sFUvhTwkdbSVMNpQM1ar5CeUnoartlTmvJh8kiB+x3TQvYOka3k8z\n25h9NgemasUTilnQBqHrEJddEAqFLUFga7aUu4TCSO1Wqhvpro3J5xf7hN7H\nrhLv\r\n=kMTq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c0f928f8e241c9da4adfed85a734ec8ad8b066b1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.48","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.102_1619238267164_0.8856934231073212","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.103-renovate-major-socket-io-packages-fdf1bc864777769df1fad8a601422620f0a5c9f8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.103-renovate-major-socket-io-packages-fdf1bc864777769df1fad8a601422620f0a5c9f8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.103-renovate-major-socket-io-packages-fdf1bc864777769df1fad8a601422620f0a5c9f8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"23ca02999f27b3dafd2d942d8d5cd9f547b321e8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.103-renovate-major-socket-io-packages-fdf1bc864777769df1fad8a601422620f0a5c9f8.tgz","fileCount":39,"integrity":"sha512-pScLKIuCRjVo6hisfpir+y5jCf0ecnJTEpBoMz2qlqosH2S4EA0I9l5DmzwQ/HNuYno51mtAGu9vYw6T8x3Hyg==","signatures":[{"sig":"MEQCIFJX7MzlI5Fy6PhU8SyGDkEkZl2Fy3b82ZtJM62WDO61AiB9jXY5SAXCucOM3/05qUXFD/BRu6WneDMm8duePslubA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg55ACRA9TVsSAnZWagAApUYP/A5Suf88MKmTO63+sApj\nPnzQEcMGfG4D2lERYjSrh+3EULIDplr/XH7NdA1T986K2s5cNM0bJLOXhp/V\n72vFU1jNP8T6bGvpuWkjS0Ou9jWXIuHrg/AM3MGAGfHpTfz/97KqN8XfPRuF\nS5bo+meeNDIkuySaXKdBEGuo6FVJDn9e/75RfIzr91u7s5YY3+XXUxWy+vsx\nM+/tEO/kd8w0WAgZk4YMUtTrF0ox1xRsnm5b21ugFzLsnyGnjHjwYZxrQxXU\nSdU/RL8mFSLqvMz+C/9Yoiqb/vN1bCCAb9euXucbQHkfWzoqPkftTaKQNj9k\nBB7OmcLqmsF44lyn2X8/9R2pzZCy7cftwAykEjVX1KTq4cjgad0e4Tqcpp09\nO4YNC15DrWTglhD8LspUzsFLTH8/hEhNT1FUBcku+Lh+5tYGP4IjlLCfNYKE\nj5k559MvCv+RGTW4+3f6Qhq/CiO89wDyIJrLFPHYSOgPyxcV4iEGmoncl3vA\nDGTS/HSvcOiVUd1HaEsHsXXjXmz9yZ3bzSBbELeIjsq+54ZSn8u6m2aj6Xk+\nftjHXFsZQiHol826+n9hkI/u5qTbFGsw980piqp/WR/6pBDp/MXwqO0PzkFp\n14njkYG2xLqF9GSjg5LMo3WRKDovGGLVFtUOI2DtouCWafCS3JVq8Pv8W8Ob\nyNdN\r\n=JQu0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fdf1bc864777769df1fad8a601422620f0a5c9f8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.3.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.48","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.103-renovate-major-socket-io-packages-fdf1bc864777769df1fad8a601422620f0a5c9f8_1619238463667_0.23147619166224742","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.103-renovate-non-major-52478dee3d8d46ba53d60b561b319a4e7ff209c5":{"name":"@balena/jellyfish-client-sdk","version":"3.2.103-renovate-non-major-52478dee3d8d46ba53d60b561b319a4e7ff209c5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.103-renovate-non-major-52478dee3d8d46ba53d60b561b319a4e7ff209c5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"83f2bf01907b14d00d748521c8a84bab77a05a91","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.103-renovate-non-major-52478dee3d8d46ba53d60b561b319a4e7ff209c5.tgz","fileCount":39,"integrity":"sha512-UMHdmZ6XLdC8iR6/MWfc/D4fJ7g8EJSR5b6IynUBiylBFMJvTsxq3LWkhLge0hxfD738I8kST0gSWnfWOv4iNg==","signatures":[{"sig":"MEUCIF1IKrmtPYVxEw4FWEfGDTCBfA/N2h1/PXMZSTKQOKrKAiEA2qu1LyPiBWwBB05MU1D0v0/v/KFH7QT50qkrSGMlGE8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghARpCRA9TVsSAnZWagAAoI0P/2uEZ+vhdisoeuMBL+Tp\nRkErytMWbq/v254D5pQcko5JHRWpscfffyZXZNfFnltLsJliLMlRx5ifDPRE\nbAP496z3Q0COQ9Wy8TYEGhyGoUWOPjw4QBeZLGOOdBOoF/4XN2fPEBa7L7ce\ndnlIahR22f4tMZdSSnPO++io3jchRzsRr9zEEYQvedN7lomiHhDmqImh43b5\nKA9oKVnS8maZL3SPmQ2JMmITKrkoBCSGjcWPAcfj4fsA8jFdELxnpU3x9t8S\n7StwQrI01AKVe2uwEjl/gmFuI6mACV43/a+bgasqlJMXEO+JRwT8c5uaIMNa\nKvcURrXpuhyzU3B2Kr2XDY3UuBtBgKbbCIC/TApdIcRNiyqaoqd4jQVCFT4n\nsTqcikGto4KGohEY+e+9lt3U5sGcbFzhrmRMA8l3SuJLIkmVcUang2L7BXif\nYCbRlIrcZNhEUDRfeb4jNgeW5FDrQDPy35Dh+q6t1K/aYQT+xS/Xpw3Drnlq\nGdkzqNvc7gknNJRRgoFfiKIiOFlM8CuPuwxDmwIdN4z1Ks9D2L79qb71Negw\ni22PGO1utwMcq/6YLIpa7l3EoqBSqSqH+Cq+j7E+DBAydf7mXoUQF/T8SPX4\nJ0cypEyvfh15BiIfp6Sn3BJPTQi7MdpACD2iqryFmcf3QN0M5HgMoDV2g6Up\nN2qB\r\n=eB1D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"52478dee3d8d46ba53d60b561b319a4e7ff209c5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.49","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.103-renovate-non-major-52478dee3d8d46ba53d60b561b319a4e7ff209c5_1619264617084_0.153491590285874","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.103":{"name":"@balena/jellyfish-client-sdk","version":"3.2.103","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.103","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6ee91e54e27ea6997cdb9dbd20987eadd6c0dc5b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.103.tgz","fileCount":39,"integrity":"sha512-AXS5Jj4JJJF+wbk1NgYINwCxB9lz/7vyJu6mIN2yzKuxwDLmkdgnaXX/6x1qSJoj2m38n3D3j9KWI9XBffQR3Q==","signatures":[{"sig":"MEUCIQDBcmjPgGIUR9OjHoDMH6zlXqo+J5iN8k+/YizpfX8I9QIgTOzjjI8+fUDDbhQdgm5izszqmtnJcvhKPa8L3VyWRjA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghAVTCRA9TVsSAnZWagAANogP/iT/p3Jy+XxEK0gm9s+v\nsFImtJs48PVtrVleNG4jedhHKem1eS//Qd0dHfv572Tlo5xm8OmNQ4zs44jC\nvQI39IrRYIiQvD1TM6bWl6mzDZ8BqIlzERssWXg1qIyXNgcU3/c4FewmbHrV\nULFHV0csbBsDTcWjxoqYG5apvC/mdZVmU100awowrcSacLgsXEJto/g7HPuk\nw6cpnXfk7zFonXlvzySTNK/BmPy7Rqv0V2vFSPIeSvu86f+tnXPFPsmeSY6P\n3w3Ir7i0AgpwofPCnv0LwjMW7zU0f0SCzSDLZ5lUFZN0vvWdl+VFhA9AikW8\nHi/cOmlxld+zzMFv/rRsrH0WlNUTTC4cHFpUKq9YQHKaM7+w6cKkAdIlnk5z\nhRqNR0DgsKoevvM7oVekk2kXJjwLR2LC1hSnCI2q1yxls9FaGDKE/0JtlbwU\n43ZPSSbxGLKFNCre/FAz9BWTP/lPDkVRDpGPJkbuQFpOhUHH5oYcgwwCSaBC\nUzFoIQJg4RKyAFEo2/iZ8O2NSYjMleQ4hGjdU98wDVUEFFTQal5q2aDYuqr2\nk7B83OkoeH/z+kVieuSdkK4w4t2nioFjwCxWvb//fttHDq34dM6inpfIhgN4\nmFWrHabuZtJP8iDaDezKrw54QIxFbmDPsBDWJixkM3EjlVkzByWanPSzmuAH\nKbkP\r\n=+Vid\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"71113ed32bfb0f6ae0548c0b0ecee17565f1cff9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.49","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.103_1619264850778_0.315983443336882","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.104-renovate-major-socket-io-packages-e816fbf3a4c86116ac58d03b91a0a8ff98450886":{"name":"@balena/jellyfish-client-sdk","version":"3.2.104-renovate-major-socket-io-packages-e816fbf3a4c86116ac58d03b91a0a8ff98450886","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.104-renovate-major-socket-io-packages-e816fbf3a4c86116ac58d03b91a0a8ff98450886","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24304057788f96d38c50615191d2daf262ac2dd0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.104-renovate-major-socket-io-packages-e816fbf3a4c86116ac58d03b91a0a8ff98450886.tgz","fileCount":39,"integrity":"sha512-ok3Rf5bPwh/yYD/UPB2EQw1TwjpWHntuS19zroiToRyUhl0KL9tNAMCIBkOnIYnMnhT2xhsKijloO5Aja4Nilg==","signatures":[{"sig":"MEUCIQCoi0lu1U+YXlVzusBD1AJ2zHDthVq5tJonqADRkP5CqwIgE7MfZ5bLbYT5mGv110LiWfZukw1MPdoxmScKA6lGQ8U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghAZiCRA9TVsSAnZWagAAZG4P/iEZCiawpq+1EcyaSXbL\n9WvslsPETDvT3dGrlBfH9lr+kmVYZcjdRQapXwsMfA0fsZ1a4iIKfEYsiIQk\n/YA48TYu3kYf8fr8oy4nt+Yd9x3TJbdib4ZCSuaQrI9HLW0sIfTPwrRHWd2K\nwh+EFf3Wih++cS1P/zvRFSiew2rSCI/Tb5vnh5tHA2Wa6bZI8t/xDvx2ioDA\nzD6diJWXayMntGIbrO0j/cLLYryue9Njl/W8zAnk2/XQ84pB6dRJrJy6mfxL\nkxIHg/4/76Gz6PGZZfLe/GgPvNrD2/zOhpi7kDO6ZW8wIakUZOhY9zI+Y0q+\nbcQwlIu/LAd9boYI3D0daD6L8aFN4SBERIcKPliVST87lC+bU+Qnu2ToPHxJ\ncIbEiaN0ktJoQ5LnyqPA2+dl7Qyv8ij4FdxtBS06dfrNxO7/aRjA2KzohAE0\nxMunAl3sewJLSy0ngVXmChQSvDYjx6amKzmU72aQB+Mrj8hlxsn6TNp6VQ4V\n+EZVl8EGth7SBgNdc3AhQs8+PQ++sW5frdJZ5mZgMok1ZJsXCfaaiwwkocku\nM93DsdH9O6oghNZpkzubvxZOi10pROsEoHHDDbnL5JcNLl/uzoy0pzTj3M+K\nltWZm+1d/FSw5SjCjAzLAmiAnliBN04HUDTkW3GV1XujKfRvkm2doOIpkXw1\nHfdR\r\n=96Rs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e816fbf3a4c86116ac58d03b91a0a8ff98450886","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.49","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.104-renovate-major-socket-io-packages-e816fbf3a4c86116ac58d03b91a0a8ff98450886_1619265121392_0.3798260641204001","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.104-renovate-non-major-dff94a4d909c66b28af27071d5e073546c702d8f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.104-renovate-non-major-dff94a4d909c66b28af27071d5e073546c702d8f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.104-renovate-non-major-dff94a4d909c66b28af27071d5e073546c702d8f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b9aec8090397c04b47b8d75bb7c88c2fbcd22739","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.104-renovate-non-major-dff94a4d909c66b28af27071d5e073546c702d8f.tgz","fileCount":39,"integrity":"sha512-NgttqWfHtWYt06pUm0g32259O8gI5JcKpiwT26OY+6RY/Y6VtC2sA5W3E1QQdKUaOgxsdJuF2PEGySenpEG1IA==","signatures":[{"sig":"MEYCIQCcS3f9BlxZL9MVg6g06RrGbElSOfrgi6TYKSS2izsp2QIhALOvve6hggLgg2AZ0SOtu8zXcg0CKp76lGsCph/Q7Q93","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghDQtCRA9TVsSAnZWagAAPHIP/iu3akrg79y+gRBKEtB9\nqWqVwppbAh0LEu/MNhTYH54YMj96oB8aWc2IuXFLsycQj1vGw6Lc6r82I57D\nkAtsSPDzvHBHZMjog+p0ojWuK0m6SS9PyLuhYyMnKdoDuJzQohR7WhRdaMel\n2rJwHIB07rl4laEuqFTqzo2T1rLfkJq8ou97aUxlH9TLhys9oYOZ/dNR1hF2\niMVjWX6U/EdRQyVW9QzqQ2WUvlf7qkwSImYcZZQ/sG77WUTLFs7ueLgLoHwZ\nrIswDI19KI9mkU4sGrW1/74QUaH6YtpzdcVJ0XBD0wA5e5CUq5PnsL/6Mk2Z\nfN/9nGge5cWdGZEPZ/Jk0vvJqDuWs5kZBBFojVFiL4O8MTPxkSSUt4CYvz/y\nVL6gMOuQ46wPRPO/tTq1/wQftVHG+gtFA3RIGwxRjCfIYcImPkQiNa3k5QmY\ng46Mj/IHs/HaOXIraFxxTo85WLugL1YABltWWeHL/2sIB67LzTFE9K7FTENC\n4jxPKeqczWEkx1E5Vy4hsZu6Waknpx9HJenPWWODnoAZ+upIIRc6UEN2uDwp\nUssLUA8mCC6KBcBvV3+1W171BCHIwzQ103j9BzDTVp3Jd8+p8wohLCsH3i+M\nXpkRkx3g22F0i4h5jLnxyG3OXIYlZhBhDZm4Y5pTkuMY2yxLRr7y/QclMVKq\nr+ms\r\n=/vHJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dff94a4d909c66b28af27071d5e073546c702d8f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.50","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.104-renovate-non-major-dff94a4d909c66b28af27071d5e073546c702d8f_1619276845300_0.19791595389889172","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.104":{"name":"@balena/jellyfish-client-sdk","version":"3.2.104","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.104","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea0cbd349b62169387144f52ddc0a92113287d06","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.104.tgz","fileCount":39,"integrity":"sha512-mh92o/kEoo2gqwgXjpNfBT/o+mVfEXA+YsM4ekaAV2zp3++ysT48ScUcpwdAbMs6EEdGtxptavCIZrcqvB9k9w==","signatures":[{"sig":"MEYCIQDzhpKS9merFhK2OjrBQ03T8URkWBXs7X24A0JcSMuITwIhAJFwmfgv7eZjefnmPntMrFvWqLoReyWWK5S0iCeCcIdp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghDUVCRA9TVsSAnZWagAADoYP/iRJLbRAXsP8RggVDY3A\noqrdY3R9Pdx+fexHJggaLXWDt9WfNlSpfF5xkqQkF6zWtSd2eey+FpD7h8kx\nWIGxi3sANVhi88C6y0Gdumr/5KqwCKA+iVTfw4/6zs9GqaNpJHp82bZxKU9X\narysH2bXt+5oqHXhioxJipdxCAiZ5efSlJT4Dy0ngW6sMDLXddN4H9WXlpsS\nyqIOXPCw+dTTdZviuucyObnn//fyzcmg6g+bV/+g93BsYiy5wO3snBh7AoQF\n4vNkx2hW/hg3BpadAV6XXeuhQPF5n6fGW5EmVwx2xkuSnOjwZJ0YqB4X/CVj\nBhF4/QlOQZ+FZC+KI9OvfZ9OFOfEXNz6D5jiYRw51aAKGpY+BZfd3fapQbZf\ntk5dv6EwnV8yydtOZDv0oxEXMiXtz3B0t1BAI9h+EDVOrdGoL7GOs9aBipF+\nBgTV9C4cY7Ebag7OMM4i9efJZ9BXI0UbdVvbpCOJ7qjE4M0eYxwoyGu3kvzJ\n7MrMYmWWd4CQMaZh+S2D6uHfzqpPBuOlOeiwdRf0+Uxf29+YpDaW36R+jq+7\nSIzPj93MUbckqU/EwIzmFC8c6yzhH2KBHI8x43/5+kl0H8XHD1WgfZJZpfKi\not2T4e7KgnjV1GSKjjFiGdCk5QrWlkxrBvTHMHFqKobYTJo+vdCkcsklCia9\nUo6r\r\n=VLYE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5b71209fe7307a71c182bedce9895b3b0a7ef569","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.50","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.104_1619277076961_0.7448553741229051","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.105-renovate-major-socket-io-packages-91ca4c968ea13798104b84fe87368d4436b48f79":{"name":"@balena/jellyfish-client-sdk","version":"3.2.105-renovate-major-socket-io-packages-91ca4c968ea13798104b84fe87368d4436b48f79","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.105-renovate-major-socket-io-packages-91ca4c968ea13798104b84fe87368d4436b48f79","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3a709c281c6c21062dddddb25dd68598928841c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.105-renovate-major-socket-io-packages-91ca4c968ea13798104b84fe87368d4436b48f79.tgz","fileCount":39,"integrity":"sha512-wM0R3GZZGToR/Rg21t56ssNxWWTdR/2lm5aE7owbt4BIeESsQokVAbtkGv3fxiXYSIJGw0K+GP5qNFRT7NRigQ==","signatures":[{"sig":"MEQCIB1o3JRqGZGsbxZgGNr5g9+b2SVnzHHN7vcGU6c290wvAiBtMM/d/mPr0YNboE2FbbopnhuO0W1bmqPWh9MtQANtZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghDYvCRA9TVsSAnZWagAAO6kP/1FGdhidNnkQ/vZ9by1w\nxd+lvE4HCubNDe+LUKrCo0YzojxuMVl5DDwH7D9GqtnUdfzX7JSXtdr0qTiV\nkgIcK4FHaNBxCaEmysJ21AOOROxQLRRSfFn1HHLj6jHlLeNEqCNFQoZJCsVB\n4alE9k82U+EX7QPI+OMbB4MrxjDyVj14vuVRb/qzUGjooZmeERnraeVIW+r7\n9Vep76wIARQERwCnAJxMqvUXKGjO2ou/EmfN2/L/rE+4GmoFUlYXnLzm30bL\nvq/iFAWA9/pIBOZ2DiAfX2MLNaImRHezF8XVFrioSMcD1QJLPdsN9rm9Q7Hn\nXtFXMZmuYW2o1PQrh/mZGASne30erHWkIUITi8hhSA2xNZRMrMHs1/FfnyrV\nxt5z6n1WleAx1pkl6VosRi4GsZEEpD+OpG+2dzdpJrvRhdIknyklbHkmXLQv\ndkBxfROfYcVUJfddgFC82lQti7OHh4xPlcil3aME8H1qe/QmEReGRazQuDRY\nszJLsVblDfn6NjPmgmZ3GbbHtwoSJEYLWO5GcrmrjUqst3qVoWwMkruJP8SX\nsaT9N0jfHmU8wepttabtPnFlsPy4rWyXlJWbyIZy15nNe3dR41bREIagyGYs\n5+4LELpkMDTNEaR/z5jfuppgs+iAW7h39F2clmiuTFm6eidRXwmIfIqX18qv\n5dzJ\r\n=0FvU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"91ca4c968ea13798104b84fe87368d4436b48f79","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.50","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.105-renovate-major-socket-io-packages-91ca4c968ea13798104b84fe87368d4436b48f79_1619277358913_0.10930810331567686","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.105-renovate-non-major-7497ecba4d300253f7935a00082b4b9470c813bb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.105-renovate-non-major-7497ecba4d300253f7935a00082b4b9470c813bb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.105-renovate-non-major-7497ecba4d300253f7935a00082b4b9470c813bb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aea9525879d232adda4b36fa1c7ec11f4cd8e1bf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.105-renovate-non-major-7497ecba4d300253f7935a00082b4b9470c813bb.tgz","fileCount":39,"integrity":"sha512-H7NmyX0yvQ0K6riwVoJvIpmi2X4eaB7G5Dr9uA4JU1DnUKRzkjAIiMt3YikXAvtu92sVBAGqpQDiBIhpW10y5g==","signatures":[{"sig":"MEYCIQCkWQXrkXE3fgHEOFlmmXZv2tjWOT0hHG5AvOX+GUb9QgIhAON7DLJztdCxEJ6tvJs45CxnnWIqVDGWc0S/kZeU8Hqg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghHf6CRA9TVsSAnZWagAAmIgP/jIe4Wj5ZhfG2Ec2QRq3\n71R/IVR5aXwhXur/QvaBss0fhVS39xkZxeZoOuBt7zw+mGIAyy+WvFqC0Jf0\n7kMXdlPUfjn6S+MDMdlycVGjotYKY1rfjHq6mXo7fcrnfiILup4dekfE7DoX\nObJ9k4sfEjjRY7eeJrSMxNZbekps3G91mz6m6Qk9ThtxrMvDyia1r91K8IB9\nBmmhrF1EPUG8CmelG8FDfefxhipajpYuzyI8iUzIca9gT3UHNIVhesomvhQL\nTMB6oDvHGGFwsaD61TZurYdZYVupmiRmA+iwXFxUdPRmDCFFb/e6DWl9GAJz\nxmc4K8BpkAdVgKlXjajuilxRKtoBEfO1ZDEq+MKOUFT45H9hVMuWNkoZfWIn\nlOMcxknNS24RAMOj7WV6OpDuTy4w7PO4bluNSE91lFlSNAA5cgZvGlp/RBPN\nv3MtnMMHkwcRuvm1y/yss5pwEmVqTEyWFiGwIgEXejn7hHYqRNbeCaSuA23+\njXDm6C6kQw1lJJ4cGPNPb10ouJUAD0Xa/fK/GuTX8cST8W6kSoB9UfQWmSdB\n8AdXP/WFooV2bwjRBx58xphlpSzf5SDxvYMr5wVJztDL+18u+Pmh6q8Wx0M1\nDvRro491+JUujZbX97o6cV+UVQu+OpPy5eyE2LASLpUfc550oAw1a3Pf6SS0\n8xf2\r\n=NDaP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7497ecba4d300253f7935a00082b4b9470c813bb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.51","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.105-renovate-non-major-7497ecba4d300253f7935a00082b4b9470c813bb_1619294202322_0.649096142525186","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.105":{"name":"@balena/jellyfish-client-sdk","version":"3.2.105","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.105","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ddbdd1bde4cdcc82759755af9e71f69324daca92","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.105.tgz","fileCount":39,"integrity":"sha512-pQtTKYiZWtvh8xkjeN6wZNrvVamTyMEbHRBRrFESe60CeLzwKZSnaJup15p88YVnlv8tlyH/loVTGpfAIoLjzw==","signatures":[{"sig":"MEUCICgoJ01iX1JJWwCSAHU7A+TpL0wSi/yaO8/4+gY0vbJ3AiEA4MzZ9QL7jtkMd2rkeVbsLOGQKQEriQVIM5IUyfE8vMg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghHjHCRA9TVsSAnZWagAAtGYQAItAq2zMS9A6p7Kjss+X\nuWY7XctwgoWdTCWkIdiwfwuTNrsTSfrZjg6D+aAzYOPcvzjn6YZJB1UQaXA5\nDiWp5D1xsAV1R9Mx1MgxRBLX9DwfWKNPIlHBDdeppiqLZtHQfOvqhKvmbaie\nrrjE3Gm5DFoF4xDc7Gl2L/VRCtiNc/H1wuZMlj7y+KphFsk74u8Z88GOzoYo\nnPD0FlCr1t76jKSF/CSp1aDUl6TKC8uObD3YCboPzB4upQfH2WaViPX82MAZ\n6UT4Y5tRPuAYgGmzHuipXxpuQuMT/PQ6J0Lrbew4uZyh4rOtW/PD3wb54+BH\ncm0aitWWVxPFMUV0ohHKOUj3UsqVzRMWwq45ObumDeLmoiuU6NSRp4X3KowX\nXcoOof1U1D4Nzzy28dGUuEgTIaKPM3K4ykYSSRxSAjgtKaAOaCu1RaK38tZw\nLU+x8EuTkjTiM/P9CPQ3WxOYHKZqinPEl/fwdksLspHKX935llP8EUvP5ib7\ntDxJk+KcGbhFW3TIs2/95BIpYsd/6TV/5zlgyOCdGy+qDCmj+STebcqC6mQ1\nysfLAvpAhSgDarZofPDJEy7TSa7PJ17IUTahE6cLzrI7DPuUTSJiS80Bj307\nBtzIjll1URud/Q3CYR5FzBbIazJB5ilM/OjFQArzaY8mhAqVexURiQTces4r\n4OkI\r\n=oII1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"26e30394efe39c4079e6c4031a986f24b4ab079b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.51","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.105_1619294407471_0.09970529296387265","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.106-renovate-major-socket-io-packages-85d821b77403adc9dfd2f8e5d3661580ce49d0df":{"name":"@balena/jellyfish-client-sdk","version":"3.2.106-renovate-major-socket-io-packages-85d821b77403adc9dfd2f8e5d3661580ce49d0df","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.106-renovate-major-socket-io-packages-85d821b77403adc9dfd2f8e5d3661580ce49d0df","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca66666496c915da3a5b7cc57f98f165ebb68691","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.106-renovate-major-socket-io-packages-85d821b77403adc9dfd2f8e5d3661580ce49d0df.tgz","fileCount":39,"integrity":"sha512-zTn1mzYKu/KKnDmd4BXDx8UWAbLrsp5bjltrlLJH3gYeo0XZBPjA3kY1w7Zdm92Pvj9und10ddT3C27lUtt8qA==","signatures":[{"sig":"MEUCIA4Px6KkChV1eIlxLFojNCrywkGYywmsw9yL3gTrDUqqAiEAl5VbTr9GMC8ZSjdEV3Je0DS8RifFf9dKhrLBNKzUTII=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghHptCRA9TVsSAnZWagAAKvkP/0Lfdfvu4wobQOJCMM1O\nb/AWie+pQ+e+URk0zlNM8G4gP6EtVxsIgz2AW/TLNXwukqffnx0i3JaeQtu0\niBQfDUY1K7cTCes6uCM9YHAXvp3oLS097tVo02KgkrglGCe0GBhZaO3+0Ux5\nYrsmEBs9VpxScjooyo3cMZ6I7MoW1V/RDZ7y7IccEAZtrgdyF8hwi7xvfoSZ\ndajRNbgHfkpUCSRWlDviWand/OLnwLDKdTAMYlwAiNjsjk4HOLYF2IQCzl4m\nlu09Pi/dE8frapSyLFQvseDwS+OVa5ijXUfOVoqorsUrhyr2aakgAW8pLe00\nc04+shHMlkdxwTxHdBdpuGpnCRxrcmYEe/E7o4Swqvy5fJHwrbYMEEo2p5Jx\nZ5ow4XtGhRPko+x3bPYNJl7pUSHc8X54GNOqmz3ZvN7HWKFv3DcgEBXeuWPB\nai3ugMdmiEe4OeNWnbajp73QqWj+19ylORF9WQ1yeNqXePGYc0gQdvgPOgN7\nXWT2dIZVPdQFiQKsvTfnZZ7BO2/wUHAl5niMuRQF97czIR8pbegKLRyDNP0M\ndWbJFLKeqU1PVI6/5YwDmIAXkR/hEX1lH2xKeICu5Hkejvee6eKQryVHx7la\nMxl9KMOBeFwiAp2aO1n9s1+pRmS0C3aUoNLJv+07YG+uWsN5PybykN1+HNAi\nrtpK\r\n=DQNf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"85d821b77403adc9dfd2f8e5d3661580ce49d0df","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.51","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.106-renovate-major-socket-io-packages-85d821b77403adc9dfd2f8e5d3661580ce49d0df_1619294828494_0.369579298864926","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.106-renovate-non-major-0498a0b89a6891e96923ba479a7a3cf1631330fc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.106-renovate-non-major-0498a0b89a6891e96923ba479a7a3cf1631330fc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.106-renovate-non-major-0498a0b89a6891e96923ba479a7a3cf1631330fc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"18dc639b0a48f39da05b69d4180dedd31903d868","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.106-renovate-non-major-0498a0b89a6891e96923ba479a7a3cf1631330fc.tgz","fileCount":39,"integrity":"sha512-hTbah1NGQY68bAtWuSjRyJeqVrEavZMRYCsuJ14zil5cN2Emg6CE6Fvxy3MSVQRfm8tZ91fVXhzTUsVhn2UT3A==","signatures":[{"sig":"MEUCICJMaPjDntTld0YLaEdmtGeT0PAIT1JonlgjLrZpMoWZAiEAyaZf9Z07bm/htdZ7C4UPrEX0YUabItG/U+Gykw/X83s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghLbMCRA9TVsSAnZWagAAEyEP/jZiziGffMz8JIMsIKvd\nWsjPALDxxpYhfrMVYVqWHQyHyZSP3wux7q6ufFUkyp5ar1maw73X2B4QTjIU\ngKpzqsJrCiZjU37CyG6CTqRJ6w2sbXPTWYhi2sN2XWVfaz9+9AKvhK1bZUgN\npZLfriBT7RFEKbpItoGwKnUHJvqzO/HnjSTMGT02XogvrwubevebabLm/QAF\nSLZYx3DtBXxiix40ZadFhnNcFn3qL6/6fBZHvXNmcYMdKIwsNgP1oc5uwRg3\nETUZ9uwrVyvrY/kae5EbfR9ZwDxK5WLqcieMuyDZKFMKYsJlmItF14OIXYu5\nQMVxt2YB+XqQ0hBpfHhHsytCmlfl8jRVzQ6DxZV37a7q2FjFpauUNYk1Rfl7\nnHi4XVSQde0GGxExmMscFI8gfKksqdobnhRi9aEINKozZAaNohzCHltl9n+I\nnYRVqUjRukqTWon6RVo5ksqwIgmqK/vPI3xUNVOq9oNWAGPSqVxwf5cngJYW\nOijZtAsrrILHj1rmzcHLyuQMx1U/iWkxSouqsg4ip4Ljxbx9Hb8DwN6aB8QB\nrgTDXhS5Nyg0z/AgznGHXdy/F6/hduUlw4KSonow9urXaXds+0F1rvV9F9X2\n5al4iSdFLNTCjKY05xg4CJz71lhNWQLgDcEQtc+n4TE3SBHX1/V5L5BMaRHG\nYHaW\r\n=WYjs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0498a0b89a6891e96923ba479a7a3cf1631330fc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.52","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.106-renovate-non-major-0498a0b89a6891e96923ba479a7a3cf1631330fc_1619310284425_0.08242559249522063","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.106":{"name":"@balena/jellyfish-client-sdk","version":"3.2.106","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.106","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e0b3856ce0db5a86a867189667bf3c45d98c2f60","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.106.tgz","fileCount":39,"integrity":"sha512-lp2eYKQII6cg7rrPCFkJG2FpcjMQVW+lRP7P4+CZIX2l1xw5pOCH8HSXbfkqf9tAgQBkgVVNMgHsEQ1lud96rQ==","signatures":[{"sig":"MEUCIQCOO9/aDyhG1xEGlmAGE/dsU1YhY+++O8jMDC6vut3XAwIgbuCMDMCEBJkn7NhZgxKpt6MpjhhexanMdPbZ7ldIC3Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghLevCRA9TVsSAnZWagAA7gcP/3xdBgbSo9lqbkxYdpzA\nXqUoBFDwsiZNfjN27OlluyMhof0hWEFx0r9QLJNsaRebC/cOTzJsB36CI8me\n89DbMAmiAo/jgEj0HzynlbDBGLi3ddp/Kua6UV5WUTHOSmslkh6wfhQeSiI5\nBKSfJjNaBJqwNNayt5msEKOvQWtUvjEp5w6+ATTRUfyA8Cr2R6/i1u01zerx\nsRLkb8b38HDnWNK0blAhquSbry0lnoW8zDfAuh9i0IXgVd/VpuZSXJCB0VZ/\ngFtmXzgKFzUtwa4AolUn5t1GFEZlpnP9OA81cu9Ffx6XFUXmDY8VNETTZv4w\nT1p93eIxk9XhUwmxZZypRz2MBor2ZsaDS6HfT0BO6eBm3L4YHfHL2+E0Fgum\nmAnobH6ckgz9xPRZhONa9aE/w6lBf3gC++RpxZgWazgC4qZkflIlBmrxyvE2\nYK2CWThZIaQ21wO3xyf1UEdc98vM9Lj6YmRWXMhWZt3qVeZ/kXETZ+hw5CJY\nFYfxZvwJ6ZJcj4TrwHvmj1l4q0sHlDsgZz4k2Lhee46dZM1BfSOPXNHNqNzC\nGZQmNRrOOhXdm97cdUmwwraXjOlhQl8CQNKLDeoIq3kUjjAOqy7vhpF3PsJi\n+5Bj6kFPHAEQVBlpQHtgw72tas47nKSW9xgxm7NQUK4+395CqIYRt7wm9S5j\naA2H\r\n=fKJG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5b38e85d9e34037b25a7a3e00ed970c22cf20ca6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.52","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.106_1619310511362_0.020699148507609122","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.107-renovate-major-socket-io-packages-efd9ccdadc4fa954ec6c0e1c1a45ae62e020ced2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.107-renovate-major-socket-io-packages-efd9ccdadc4fa954ec6c0e1c1a45ae62e020ced2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.107-renovate-major-socket-io-packages-efd9ccdadc4fa954ec6c0e1c1a45ae62e020ced2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1c94df72cabc7faa728236938534a5ebf8c1150","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.107-renovate-major-socket-io-packages-efd9ccdadc4fa954ec6c0e1c1a45ae62e020ced2.tgz","fileCount":39,"integrity":"sha512-IzsifMoWT4yMyBc3fwifPDb3G21eo/JDWEmPNaNF85sodwtmBX1t6K6mEaHZfIeVvjY30Oiv/hxwilW+gYP2nw==","signatures":[{"sig":"MEQCIHifJ3gFZUf+JvlRt6kOyiGMFXxFnrg4NHn8YKgrDOUtAiBkY2VS5IsRv85tPBKfnX8drvTnB5+ijI6pkRA8k6UM1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghLiDCRA9TVsSAnZWagAArIQP/RBCtgfxAH+yTZ+juVtF\nfcwNMvoe9jZUu/6bdzDYmxj+xAt0//aus/OLYdZoqJZkJl5RmJv+Na87Sf3q\ne5x+okOutKelFf4s/T+Is2dTsG9yPWSfpz9JENTom9hLOxW7T/vI9CYjjvlC\nmrlYoAEkP4Yom6QlvnbftJ9Y9Ffi8JpCWUY2fZmUJYVStrDc/7rR6l2AiiCm\nXoDii/h8w41kXjybyXGervHMu+UM2lmfkyJpig0gAn0xuo/L0DoX7DEP16dk\nT6neHJMg9oHRuJbvW9uT23XoywJ+J/rWXVE4Ja6DE4PqLCSjqdRedPexvAyz\ndmfuzAle9YnB/CHRm3A4545Y0HmeAw7I6IjDiOx2emeK2B1DMIOeSftRaQRQ\ntppBXWSMQz7qgVlp0Uyu/JpQfVUv5KPXGKwN+fqvCt/g0+iO0hA2dNxbu23t\ntGWRBvedum/e9qxGNPq9uqmeIFpTcNLnF5F+Plc7ywn188EpPJBaWgQKgC/W\nKFmxBd2jeS7s/c7EeWw9DH/YKK6X4gNR12nDY3VbneALsbMEKY7PZlyuk4Mk\n+YwB9MrmfeOIlTaI14rbBZ1ZDysWYUIkwacgZgPd+e7O4fuSRDjmKSuOR8sS\nP4N2ieWsWYkUpAeIyQ5p/21vvM/PllnTenFz63JRCNsre2HL6XqzwtDG+9YV\nw3Ob\r\n=NiNG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"efd9ccdadc4fa954ec6c0e1c1a45ae62e020ced2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.52","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.107-renovate-major-socket-io-packages-efd9ccdadc4fa954ec6c0e1c1a45ae62e020ced2_1619310723231_0.6068933108768824","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.107-renovate-non-major-549c5665e51be5c348ddb8f1c500c069de09cdcb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.107-renovate-non-major-549c5665e51be5c348ddb8f1c500c069de09cdcb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.107-renovate-non-major-549c5665e51be5c348ddb8f1c500c069de09cdcb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e403c89e59820e433dbdf986a5514d66f85e0352","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.107-renovate-non-major-549c5665e51be5c348ddb8f1c500c069de09cdcb.tgz","fileCount":39,"integrity":"sha512-y7Te7BrSmIw4v5dxdGcb9Sn86cbKAxKlL5IWnUsiFq1ntiYmjjrTSpa+ZSKx20x/YpAagh1fVb47S/kvFinvAA==","signatures":[{"sig":"MEYCIQD7uRlaVxVz8pJngnh8ZPh4RS+GfMhZxO/eANJHq71leAIhAPu47OgKWFXK1I6N9mZ8Fs/b7yqRMUdfr7cdcwFLw1fE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghfWWCRA9TVsSAnZWagAAOBoP/3aUBsxt3ycw0A+rZpwx\nhWcwBBz2kOtl27dDARbcaC3DLdnRCnAAwnie+azLHi3aFwWGLsKtrjWkj7xD\neuJZD3lTnueg27VuQvpHyEqoOKg9zZ4ilAIzJ0CQH99O/3fwhK4g3KGMc/VA\nlHLEb4jHzZzfz47jOotZwIyJvF24bSdqkAMdfrIEyOAAgKF8Gj2EO1hzVDNx\nMILSsEb1imDAGns6IXlM+/A1XqvSqv9od7xbY6mlYObCh81dmGUX4omIWr7Z\nhOWcSAeJm+oE/l4UNj5ZqhqzkY3dk+JMrSPt7BKeSBqo1DmkropTEt+5sPG9\nyeqOe7BHzxRIdevzGRG2NbLXNTf30UDYvCMb6VKnQyP6UydHUpXnvZhi5nIh\nx/g7hHhWyNyrEK3CFN8DgB+2SF+vPrdIJqJDqOVlo+PIhrS+g+ACZ/57kOSI\n51OBQQhE8NU9TywIlrPantZ9qW1eXuG1Zn00NXQWCjY49ZhaJCdnz+QIKnaa\nXzPZL6wSDOdmtitqZCnm0StZamQyKIO3kNNErMpr+Lcfgdwt8IADIYqKeAmC\n6Cni1f49JgudHgEoOEXnBL7rwwrTiiUXRnqVBR6B8lZer8faX+VdNgnH74tC\nQLW4f+PJ7IFiNrmAzNYTV//T+t9fLHEX5iOJiMTGAsVpALF7r2X+M00Y+lPY\nyZJw\r\n=xXba\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"549c5665e51be5c348ddb8f1c500c069de09cdcb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.53","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.107-renovate-non-major-549c5665e51be5c348ddb8f1c500c069de09cdcb_1619391893172_0.8586047818663236","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.107":{"name":"@balena/jellyfish-client-sdk","version":"3.2.107","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.107","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8e4269e295b3595d00c5a595a96e9998e2592991","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.107.tgz","fileCount":39,"integrity":"sha512-mzu+/6SCcRSbuh64NJYZqdM8joPvXXYiPsOWdU+G6B1UQs6vNGpikfi8F03sKiHX+ryTP0Z1CH+tRdsKWdqJGw==","signatures":[{"sig":"MEYCIQDBJRNDdX94o+0ht/llvhCLKSxOsqAPf41OwaWfdOtDxAIhALnbNzYvQ2NKvXobiMUmJfn3J4MQNnXjKuzRyqFbMYap","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghfZtCRA9TVsSAnZWagAA2HEP/i7Zp3W/LC2VvMKRi4Hu\nFTN+5H2EQb0DGPMkYPbmfwWt7JZVSlrGEKNuAGSLhATlff+Sco9k7ZwjslLj\n2xu6tRE+RhIJfInG7JG9qQuZ4QsBalVWGhWiu5i0JqTL57aZNNSyvglOWGOZ\n1h7vSspfbrJEnpy8sdUTcqCWz27/t1jAHUYles1V0ACtSrEn4EwyTwH2iyFo\nLsHFtSzA6L5tD/w4NkYnNCFQ0IkLjwmdg8CLIOPUnatNK11K5HhfM+HeX77b\n3e8i9VtHyPr/SprP4GDHe/O6btJtMbKU3E88jDdrAi1z5X4MBBXdkzuOaKGl\ngcNy8V4ScOeIiR5NYEG5d1elKEpddKlMJs8tI7Ml/LF2FU9IPI5ZVOJTBxnm\n93+X3FdB/y5E3OKz/4T664pE3uV8BWa0bG8K/AQLXBHcKHVAuvBjob0Sk5v0\nriiBytxXcgFWOoWjnMKHZxMmlPmKt6Dp/5dHpHiVuUFqE+HmNdWNwHp7kSYH\nRbU8moVIBnl0KwszU7UZ82LQQQXZlodQ9/1kYPzGUL7TworNZ3n/oOQvkDda\nrCZPCpq7+Ivzz1P3nKrenfz/MaQeww5mNgPBbsHo9/wO4TopVYv7B3Nu3bLW\nPEiNBB9mHxpaC5Y9KmDsSq2zspUYrFw8iZCIoahCvdTkyfaTtoKBpJ/FfnbL\nRKtJ\r\n=GY5I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6389cf579aba8a9f3f28c8d11421274c6146013c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.53","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.107_1619392108677_0.9013348487071382","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.108-renovate-major-socket-io-packages-4bc41c40df75904179f1a787e34267e8e4c4e3e4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.108-renovate-major-socket-io-packages-4bc41c40df75904179f1a787e34267e8e4c4e3e4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.108-renovate-major-socket-io-packages-4bc41c40df75904179f1a787e34267e8e4c4e3e4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2468381ae6b9f67ab440a9ced0ec1638a50f1e22","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.108-renovate-major-socket-io-packages-4bc41c40df75904179f1a787e34267e8e4c4e3e4.tgz","fileCount":39,"integrity":"sha512-I1MzS6maphn1lvWaGcnkcY1AUDuwLZZYPDgZBtaJ5c+UP19nqg47BJp+rdYj7+fJIAUOKzK2hvGJ1kcX0GabXg==","signatures":[{"sig":"MEUCIFPM7E8KAgYEuBw5+NcdafIKCB+ck5oF2U8A6BTq/4ItAiEA0hzI1gRFQ6VOCSuVAVUr34oCghs4nQC5jz2yw2nlAp0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghfczCRA9TVsSAnZWagAAOCIP/ifcYd765sEKkZbgAT/0\nd1YxHuFUNxMitt5rxvSvrkfDDPi6px9L4D29vq85ONqyGdA77s19yAmYESzK\ncA4cHakrI2NPoP9Hy/9zYLaPIlmvFlYS9TP4CbLY15YNHPvY4abGLKmau/zX\nHarREg4KjXm2hWelEVnYDihDXn+J+Xa2HyBjB3yg7ZzdauV1L47mktBcMVlA\neKIJq+sVd4RsiCATQBA8lVzJi1ia19Ahu/2jTS/RyafWQifCgLarbo4ox1cb\nqKp5fPz3YTl+5X84Baa3LMgJq81hFylCoFZGCGZZaPTIMpmRb7eDpK9bLAwx\nsYsFq3xIYzqIFXAVQm8WMzXd8a94f4e97MQfp8kE+kbDNy/VoDKDCIUw8sWG\nz8BOdJX58m6leKGA9mlYgiWipysfdKw3XFHlkBvTSC5mdulMwoe2qLFYuV8n\nEZZ4vsv8wqOkycpwSAGLtk72wga1M5mmodO8FlcavuI4l/1lLP7jj970OLcy\nFdpgJA6wKoJoGypB3jxzb1zNhyx3Sx/maw/Ldp9P18sJIRTtX15Dk+s63msj\nFcWS/jV+Wv8uatRzyYte6yTjVtod30FNXgKodHMGA97qURlEvRWW2B6m+tlX\nUS5uZmMNmu0NbYOG3WJZRH+VE7deOEeSb/Dklf7PWDrzu+K1ULLAr79NZpmw\nrkgh\r\n=oKTb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4bc41c40df75904179f1a787e34267e8e4c4e3e4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.53","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.108-renovate-major-socket-io-packages-4bc41c40df75904179f1a787e34267e8e4c4e3e4_1619392307003_0.6527382754327575","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.108-renovate-non-major-d839b83b36558d22adb475b3225659ec03e9e4a6":{"name":"@balena/jellyfish-client-sdk","version":"3.2.108-renovate-non-major-d839b83b36558d22adb475b3225659ec03e9e4a6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.108-renovate-non-major-d839b83b36558d22adb475b3225659ec03e9e4a6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c143095b08fb5564923dce15761959e1bbfb384d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.108-renovate-non-major-d839b83b36558d22adb475b3225659ec03e9e4a6.tgz","fileCount":39,"integrity":"sha512-AbixiAIpWb3gf0KdTOs0493QVMat3lX76HLcjzQfj4eBznvXfVy1h+7GxSwC6kbKQI+yGCOTfDCfaY7cxX/s9A==","signatures":[{"sig":"MEYCIQDfwYlkhMHWS7ZdXhRGxBLi1TDmjnxmZ7FeU3q1Ym7ybgIhAMg4W683EATwxIVdN15ICPCR+NWCLRxCZD8cIVu2UpXV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghhSoCRA9TVsSAnZWagAAmbYP/0xHSDtitB51NUTVDThF\nZ/rK4Ch6jHRyoLckXyREcm8F/MUtXrJAwaRhud8JsS8ukKE+6RzK6Gan0WXK\nnWIidXuC8nvZ52Vd9o2F79sXMo9O5xi3TGQqpdbLlka5gszD8JIZzvlgcTEK\n4IKD0dpaUNx7xr+Katk1yY3v3A5Kb0QALKlB5M6aoeFPh0eJlYsfL5O4hX4r\nuPGh4+sMcAtQpIIK81vD+XiV+sCiN2iYH5XOi9WCqWv7R4lAEziz0qcsnPiL\nI4IHaJJ3AcGSDKznOq9c14B4BHL5msdWQhuAaqeEbRtRhWRcTLL2T0ENqqVK\nXfSFbCWJwEhyJfjGoCfFVlGj0000+k3iKBz1t/Htay1n94HoVvX0fXL7v03g\nPEIN/UQcLwoT+xYn5yHKef9pO1fqqR8YTe8+1ICSdQIqP1o+n585EC7XYYl7\nygcKvmfRVVBW/5BBGVInOMai93XvKsO1uedKMguZl8BbpcHK6dAQzjZhupia\ns6MIu7Ns5u6KjXI7gMsiALKV7x+iSAm4shY7gta0+wCLUkx5wthgeHfGdnjY\nAdpbtaCm0O5ro4fwUlTiSDiotU4Kl9jdIEl9W3wR0lAm71+6ZA+YZCARW1Vk\nkZgQEjzXbYxOk3i9JdY5AgVuSv9CjijUVAGnJUpUZ0ceOxkuPfZ6lff+en17\noNON\r\n=z2JJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d839b83b36558d22adb475b3225659ec03e9e4a6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.54","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.108-renovate-non-major-d839b83b36558d22adb475b3225659ec03e9e4a6_1619399847421_0.611582976999101","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.108":{"name":"@balena/jellyfish-client-sdk","version":"3.2.108","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.108","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f2c4e1581a6e6531c93b046ece846057a7ee5719","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.108.tgz","fileCount":39,"integrity":"sha512-UFxFCjSF2w3gcR8xgrdK6fhlcyzttdaznKDJeehQHCXXBWUT1gubbdxzQuVqlkOBUTHP7WQXfBsSnVILLxFaVw==","signatures":[{"sig":"MEQCIBCk9FedyIUEeSCb9FfM+EbSe3KhaeUnrFoKSYMPUjbBAiAcKWnSb5uH2LbP6wyM3tAxLH7LNN9hjhxPlF5RpvhxXw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":239933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghhWGCRA9TVsSAnZWagAA0cgP+gOJf+b5OkY6lCVRhRgO\n/74sHvbxRgDh7I83WugSbHUSUxGXJuMKWlJj9nE4u9Cd5KhQH241aUBSBR6y\nFYZy4uGN53KxkRWOPl/iDbY6j2IzNTG+cSs9Qtd0SUZ1fOgG+T2QEBPQ7za1\nv6cy6Q8p1gy1HqXccXkcmOtKI0VX4EBmb2I9gF+pnh3ZtHMDBiKAf/uCp33/\nIPt1o+d4eQshvt3YWi/EsiQvCbg09VDCwiHi+Yvqo2QvQzmrOgmABRbUEsOM\nFa+Q/rl36wZESwCBVdENSMvCqlJhMTxl0rlkD16Bw+yJtzq7kyyZMvb7x1kn\nbr+38K+cEBZZUMnH6Dr/yZ41jsq3a2oSlXqxkH1zBlchllnrI+x/wQVUEczO\niyKaaT8Qmsq6ArxxFwqeBc9kuRNtlsSWfIt0J+KseCUMVIZb68e2h2UfRjEf\nmlXg2tkSVEjns18GbR22CtWhTki0czR3Ex+J4yYOdZusIVOG30Mnlb9pWvP9\nfKXya8I1MgN3Zt+dr70UG/1w4wCpHQ/8mhFtmEDH6FqU9Y+BHs1bo5Fu+0xP\neDGWr+Y90BAgsLbHd0OWcV6aAZDi8Cx57H0bqL3JW8qGqgJW0DUeDQdxrHWh\nJfWUU03HWraLMTBym0MRFfn2yR5XF/x3NyKkIr7FEvS0lKEiyoadIoM6HDMQ\np5To\r\n=mA4v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aa3aabfc634fc0d066fc16800b8c3e3985318fe1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.54","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.108_1619400069609_0.09212678145954545","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.109-renovate-major-socket-io-packages-e2bda115e4876e3ccdafa922162956cd2e7d75c0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.109-renovate-major-socket-io-packages-e2bda115e4876e3ccdafa922162956cd2e7d75c0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.109-renovate-major-socket-io-packages-e2bda115e4876e3ccdafa922162956cd2e7d75c0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d21c060dc7033af94af4c07c50be381283adb81f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.109-renovate-major-socket-io-packages-e2bda115e4876e3ccdafa922162956cd2e7d75c0.tgz","fileCount":39,"integrity":"sha512-m7XRyssMiMzPdLmvWAQkaxrBZojlwIVsx98YfbBlF6jpD6pQQ3Lxr57kybjWj0IZjz8v3QuM0ssO2H9XHkLYPA==","signatures":[{"sig":"MEYCIQCUbHocprnSUDqICGWfD7X9St9g4Idc/KGDpMNU1BLbkAIhAJRkWOOWWbcl0jBrAZVr9h4Hvq0NHyGyZYYQcp6AL4ys","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghhZSCRA9TVsSAnZWagAAKEIP/Ao4TKeID2dAZSCt6rD6\nYSLO7kOlobw49HHsEFb6kLnSsLCsemtGihgjAcmSQeWKZKW8dPXxwDoOFFjg\nkhzx4rp5l5Z8vTLcSX0hrOOVI/rkLYcIHEuJ3qqyA98XpB8RYhNS5FV6VC1k\nt/hKqGWM1YjYbYKePzLukEnvXs9aVttSRPEPDb8lLU4rtfW7+36y034R7snj\n6VqZ7AqLl3dH76RHDhT4ysc7mPJ6sUqtwN/k+DvkZBTLI/XjFbYSm/9lwnr7\nasq62uwHNTtU5bfYcogRESEx82kw9GyxhTOIhGG8K5lbI9NvhNEM3VzEDo/v\ng7y26Hj9Zrz5kxFgrghEC73acZOmchJgW9EVNB2Os8eOLvnfSGbEyPTBGahc\nzpiyk2dPLW7KrSGxhEy7Lqpsk7uBQO+aF+iamnvCvHXHKVocvJ4dfNT0Fk/+\n/+cKlDjWTJb3487CcmBYSKawBiTZgHJH3MYNLuUVi6vH17OGmZjU8x3nDSTG\ncMZbRXahr0tvbv889L8hzDn2ItXFWy7EJeMKGi/xMfwow5pB5WPj0Ufc41bn\nxcXmT1HhxiwCj8UTRiJBLya64ptKh9AXZet1GHElWi9PqmfJhdXdIpyeUv/9\n/q8LCQZol4N+eA04CugDtzh/hrFw4WmmQbrdN3hwf1Nyyc/oIjG8FCQm6BBl\nxgUd\r\n=24Pz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e2bda115e4876e3ccdafa922162956cd2e7d75c0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.54","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.109-renovate-major-socket-io-packages-e2bda115e4876e3ccdafa922162956cd2e7d75c0_1619400274229_0.6463018693410301","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.109-renovate-non-major-5e3c8be9bfc1ce8035ee26275f74be605968fbb4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.109-renovate-non-major-5e3c8be9bfc1ce8035ee26275f74be605968fbb4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.109-renovate-non-major-5e3c8be9bfc1ce8035ee26275f74be605968fbb4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a8870cfca0f25094d5b6008823aee990b0734b65","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.109-renovate-non-major-5e3c8be9bfc1ce8035ee26275f74be605968fbb4.tgz","fileCount":39,"integrity":"sha512-pgkA0ZilO1iwbsAuPAeIf/QqmO42nyNe1xan5O6DGlILO4yffQvASBDg9gZFYUH33JmsI1QcUrLt9o+Qd2EjuQ==","signatures":[{"sig":"MEQCIDMR/2GMjlSWuzNDXAnQkuQc56nN1FzRbm4Ol/yHxrSCAiAG01rtDmV5Az9Ijsd330odZLqSLRvjY0EpUdW6KDvNdQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghi8pCRA9TVsSAnZWagAANs4P/RWCzJ/yvo3AMABBEVcv\nL84QQgq3gfpulW5BnCpIobp6quzQ0zyCGsddwuKAHqY3DeNZ/kLgTzTYRGUf\n+QaFuwJMxMtbN7f5ZWvoXuxmQMzB7R8xilFwKRkoFV6edH2sTh21IoLwg7/Z\nFtKoIrJ6xPS079bBOqjuuSbiDli/eVJHudndQ0uGTEHLu+xETXnq9wfiWCla\n6X2wq0HBVWF2b2HSzzKqhqpff5I4+IZwdUI713Qg1W5mEGwmjeOSBoJ7PFLS\nhAmp1VNEEmpfjg9C75a8IVHjxFGmkhxGy/r+TP474u/3KkkWiJ0Fpl0sIgrs\nwOfNlP2sLm4Prevpl5jDIs59SF/BraLAgE5qBlJFsIVWKdYrNC3SROn8JYVX\n1itjlE3ypl4BaRmvraeCTxbHSz1mIexWCkEpMOsNiVm5CLnEYRfckn+6UGAn\n3dK4KpP3nkX1gLQBsE/lNl3vgKoJpATXA0VOOcgnjqGpUhuIYXy1MIedXSqO\ntXGIuTT+J1pg+Wwf6wtNVPbJYUcfOLIRkPgynxkngkxrFgtIrVYAPPdnJ78v\nBn0GTtK2LcNBw/j30jxchYKGFTyX9mvlk60CyydYy+AQ7i1Omm3H9H0XwEgb\nJ3uLYLwrGJINzprMYlgZ2qxGNFAXtQwCFUniFYK6CzhCJT1KRgyg04kYl8Th\ndXv7\r\n=wzDE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5e3c8be9bfc1ce8035ee26275f74be605968fbb4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.55","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.109-renovate-non-major-5e3c8be9bfc1ce8035ee26275f74be605968fbb4_1619406632443_0.7399003697122271","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.109":{"name":"@balena/jellyfish-client-sdk","version":"3.2.109","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.109","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b52cfb1154a11d2a43d84de243e695411580f0fe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.109.tgz","fileCount":39,"integrity":"sha512-ubGnjoSG51mURSpkVaiexAVb9cQm3JbqcNQpcB7T9hdxQTNKcp4454f5OS+I+KWCCrNQWHCFIOzPmbxJb93lxg==","signatures":[{"sig":"MEQCIEEls9mYAw3rjpZzIYq+wcd15JMJascKMr+LveGti6uUAiBgSu3+TgjJQzMeOg7ZU0bx/LFMRpuMaFe+aZjTNtYrVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghi/1CRA9TVsSAnZWagAADsIP/RQT/Ln+pAuX+4C/FOlO\nVpGCKm0rvzChE6+cf+5x40g37Mq9bNrHu4QC0zeh51Xn7CsSeQXAyuRmWOHR\nIHPwAxjcGWgH6xkx8F19IGCVIshO6di94gimRooP/xEGGWnZqG7Eky6q9brr\nrmRYFthnwY134ahZWi7Igwjm0K7ADpL5lIfRtx7xKV3aiGPExp3sQE7jMUvE\ngZTDPS62tpEXJjBxJhdmunnjm9OF+gcINqBGXMWltzzQSt7uzQnhef3/R1Bc\nTLCkUwj66m4/c5JzXj7woUPNCNOfWzkaI5fLGffB7rjiJKWx6DXU6hl0OIFQ\nknWHkhX3duhTBNcxBpIztaYxfiemJv3SbZwOlIeKtYxXvJU/0aw2NPXQetUa\nyCny97FqsBu5Q5xhx+9qJ2wL0td9wnXpIAm5Mu17THp0JCvBCocupmpjc2vl\nhMcxmyZevdqGyLb8UnWVV5nTrZ07cdntyTlllAeL7pRnaXfsitNW7m8JLdzj\nWEbdifFiLHgmLpHvETMSpoKDy/54V8Ge3w6jPo6iFXsS6eE+97LnRp87zg1H\nNIaoIWr4YD8kOP/cRW+PS/3MdRlG9RigJX3/vh0LxUCdIZHP33oYdSdQ51iX\n41xXY1WISP06GaBoi2x/2nT/oJ8n3yBYIItRHuLs7bzqadHyxRJQvHirkkd+\nzsXE\r\n=Cu/H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6a7e9fd80f3e846a70cc86c99cd201d313264531","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.55","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.109_1619406837038_0.6087939705520282","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.110-renovate-major-socket-io-packages-4d24a13fbbbbcf4ae17c8c9ecf7c65c2ad178abe":{"name":"@balena/jellyfish-client-sdk","version":"3.2.110-renovate-major-socket-io-packages-4d24a13fbbbbcf4ae17c8c9ecf7c65c2ad178abe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.110-renovate-major-socket-io-packages-4d24a13fbbbbcf4ae17c8c9ecf7c65c2ad178abe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9671fabf2b413a8ec084d76ee771d2788e25b61a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.110-renovate-major-socket-io-packages-4d24a13fbbbbcf4ae17c8c9ecf7c65c2ad178abe.tgz","fileCount":39,"integrity":"sha512-LirEAnhL1vdU6+yXJ5lui9pN5Njquvsr72tQOF/bdFu1aSow5Q2G6VxTlsTuDPH5RHm7PX1Fb9Li3f4dZUWm6Q==","signatures":[{"sig":"MEUCIQDJ+Ameil4OrKOkqBQ2AVLIcGBB+mdEa0U5aKY7BfwmvwIgSpxglOoaLpBJgLIxk3vkCP/uyyVtGZa5Ge2PLOJ3wP4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghjDcCRA9TVsSAnZWagAAvCgP/2VCY20rYK/kpdbPppHB\ngj4p6n8TzQ5VEsqvQ60D9Evh6gv4nIMI5uCylb2bvJO3HnJGHzQ6+3fz5jTz\nbniQvCpWeHEidwUvUezKl1uMU0WBDAHqlrseyfXw/hx76gQ2la2GFTbDxvAu\nzh2xBUsNyPw6nYH6/VFTGCnQAOQ+nGhL0nHeT14s4F5n2Q5KOsh+HfOwJr7J\n67bRG/6BpH7vjlL7evAfv0Ab3Irle9tw6ttmFZu0e0CpDvXHbyGhDME4eTcS\nJ2UKs6kKFpWbP10QNB7Inq9yBd2v1S0g0tidPj5A9nz3SX5YH3KZjli974D7\n8JEytJMxSohBHgwhjVJ17ddsXKZdJgGOMUnWny6ZqDXIQ9/EOAW10pNQKFkb\n+xjbfMawsysvVMJuPb6aQt8uTEOIvWo96leHAVXMT4TGsa08728Xga3PFz2I\nuuDo+qCrgQ8bWwDILfChn6Io1ZHrV6XmxKfKbhtj9ncD19cufNoofp2uvv6S\n5DStu6O2W3UvoLFIFarqPhWSk7O9GNOjOtAsDFRnXwO9Q36hlSi/k6BnoxuA\nhJRxM09PNSuoNiYMzzLW3fev+iJs6EvowqYY5N2/tgudDpyfqB+pTBL5Hhm1\noCHLMrp3vbSuxNLdxBKxY8b0IKVBfSRzgL953pxWF6vyMRMXhezOIt+cP9P3\nws/Z\r\n=WgnV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4d24a13fbbbbcf4ae17c8c9ecf7c65c2ad178abe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.22","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.55","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.110-renovate-major-socket-io-packages-4d24a13fbbbbcf4ae17c8c9ecf7c65c2ad178abe_1619407068459_0.27087549316469683","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.110-renovate-non-major-b8a7c7cc3df10dc20f817ba90b61db30688f017d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.110-renovate-non-major-b8a7c7cc3df10dc20f817ba90b61db30688f017d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.110-renovate-non-major-b8a7c7cc3df10dc20f817ba90b61db30688f017d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c25777b9a61797fbd3aa1f3046a69265d2495c8e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.110-renovate-non-major-b8a7c7cc3df10dc20f817ba90b61db30688f017d.tgz","fileCount":39,"integrity":"sha512-JFD2LyS1eDbMgt67LoSD6CPbaMBPsLakWSGMBoxe8/GqKjPIVu55rQw/65bAg2Asga7Dacvh+Ll/+pg9fVdV0A==","signatures":[{"sig":"MEUCIAVnMvb3br6xIvJ0jeHU/+svKtmgZj4qToJAobssFRzIAiEA4xuYY7/lxGthwTEr5Itb9TOH3HdWLphoGhYmpTMlRmM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghqthCRA9TVsSAnZWagAAkhYP/3dCq2/tUHOg8j9Uev55\nKvRdZ3f5qBiOPcZ6vXvdR3q6MkaIxNf2hiuc7PTTg2fV3wxNAkzta7V4eILZ\nkweXX4ER/SEJ0X/WjcbeAIC7ZKauQI9YEiVjzKWKWduT9Rrtf5I1zn+iCM27\n/aXpgphUqGJta8uQKlOkxsiW7mMnjEP+wt2vsj1+I4Nx+9aZRTccecbOEobE\nYtphx4zeMXVgcNEt4mKlPdY/eKgcg/TsE2HZ4xRGjT0SAbuT5xf0To/xzbnB\niUjwWExMk6zJ3X9B6P0daIqV+4A9pnznP2uUJOpTqjHRQAfr/fhnkhq4EmbB\nd+IRsuc4kirMocOwHtJnAJQl5wbNiUIxXXaRa3JPMznaS7hR+221h57CwLsV\n5CXjfqWnLpVomfyKXfkYNIMg9wiIl1DEEZW0RunIhRh/aFWCwTs453/0OGyi\nbVRY3syHO8yBaFsi4D3w2lHzwAncdWReahIHSzvIr+/VvgXT2HozNmx+x2Y/\njr+ASwfSW6C/MAoZFQhj9/W9167HafJdFSgm3oB20eTr0UpLycDh+Pf41Mkd\n1CjWaa1AdaOqzA/1TrBwykXEgfbmrHeS8b8Q2Ly5omNI8TK4TnlLn+VR5AX1\nmtH2KVWLTtnqwEBdRoi+j8oGy1Fe9EzUOYKidgd7PqNN7ZzE6HOnq6ZlSxI3\n0AMn\r\n=5IB/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b8a7c7cc3df10dc20f817ba90b61db30688f017d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.56","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.110-renovate-non-major-b8a7c7cc3df10dc20f817ba90b61db30688f017d_1619438433270_0.21626030693462073","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.110":{"name":"@balena/jellyfish-client-sdk","version":"3.2.110","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.110","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"317ed13aa41d9a53c58a7c70172708536d5478f8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.110.tgz","fileCount":39,"integrity":"sha512-inRnClT9bHs8LA8grpcH7+xH1RidVys8W2iJSeeSJWJS95Ux+IQERxOtkm1Kb2XeO8+CkZt+MI3Lpnl/8I+vQQ==","signatures":[{"sig":"MEUCIQDHJMEuuoM7zcy/WIKf8BqXSvC12Wa20ac7VYACkPDnLQIgNjeO9CzoymwsC+KX93uCY3gPKBhr0HalP2b9Yf9oyfg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghqyFCRA9TVsSAnZWagAAA1UP+wbM0aXJKs59DXx10qrl\nSvm81+W8wfSes8BmCsYNvj0gLGK4rlFgWTKCx5f7Uo5/SvdIEWcbxjZzxwga\n65Ih9HkHxUbhbIjkbcsfrQxpnNzgo1zB8SvszNyvAuEjIftMiSEwueov+DvJ\nu0xqHTlkBBLKsLWnVkBmS/I5bSjPByT5uV1lS0tm70eNyvWDbcWfup3rVJs6\nCc9qYZzy8ly+BxjT56fKwrhjNNXR90KA24AXur0VqprMxF7Er5ijeB4xqsuO\n2eDztFCY4Jqm6vpgGO4rQDvl40zZ5AAdd6MwaZhsXMQm+4SDgKcYfLlvdfki\nO5fNacc/bDtXgp6N6NIWk3fDaZAQeQ37Oic71550U+09Z6M4r8duasYYY6aG\npMTCS3Hz5x7fU4/Zz8UMhjdjrR0TT4fxehn8PKJYsMt8Mxy4EGeH2M42fVc4\nu4VLIadFSNybrS4abHACPVObvf0kilcyzk47+A0A4jBnqaXdKap4xhn0u86i\nQPDxctN0z4H5ucnbKeqkVQ1hNeVzRa5utXph4Mh/A3IZ4cvzWztvPZyzd5FZ\nzQVqTYY5CFV507G26TFlySVuMZjsWOLeAupJliCVlOIMQCV+mfhWBTDldtO5\nE2ifskYceE6QUVuNZNX0qFS0OPuT4Gp1hkW21Hl4SWoqf3ScEEucs3hTJJmz\nvJwu\r\n=PZaX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a9704d733aa5508ec8b5a46979da7c8f35a910ca","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.56","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.110_1619438724485_0.4696090337857126","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.111-renovate-major-socket-io-packages-a8ada14a9ac4b3c2acfbe10306a5e0f762344278":{"name":"@balena/jellyfish-client-sdk","version":"3.2.111-renovate-major-socket-io-packages-a8ada14a9ac4b3c2acfbe10306a5e0f762344278","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.111-renovate-major-socket-io-packages-a8ada14a9ac4b3c2acfbe10306a5e0f762344278","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fced8dc3ec98517df6ae77f9f2fb47315e77b082","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.111-renovate-major-socket-io-packages-a8ada14a9ac4b3c2acfbe10306a5e0f762344278.tgz","fileCount":39,"integrity":"sha512-pVfO3XKKe7sNW146BijmlLASzgsYND7RS46K7PRrg/vBkeFZsQvrsuXYrv3AA9yLGUqVK5gCfAqfDfDlcTEEMA==","signatures":[{"sig":"MEUCIQDWLdn7T08/OWgqKONMXzyizYaDpIWEyAHcn/P0ne1QrQIgSJatIA40opMQquISVr/RRV/C5MgiYcbA66r/31pkJ+o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghq3XCRA9TVsSAnZWagAAhsMQAILX2V+S0T2sZK5Z88Mx\nDXw1Jvcot+elg0zEGBL+vCQCt3nrbL3Qp5xiHWlVdLf3iNTg2wrL5EUha35D\n4Cm0JyWm/DvRakIcFNCOSUH4rjVHVA1AxGPIlVCr9zmVBUOPuzBTi7yxlYwO\nNtau1FwL9J5Y54MsBkfitVZT7sVwCwPjfM2TtA01wqXYjjCV2NbqDenFobxj\nONTn58rk3ATBK33IcJtV+ExJIHlHL4I2oYTXBuUYAIkgIReSS7+sxBvISkTP\nVSC3gdCRxgizz60lQ+g59DIuyp2vDGtbAoATbMo9gGDwGCsZt5OVjRAgTJtq\n7g7AnWL33yQg8CI254ps97vTkRJRDeKuNcGQzs+uF/VwPAg3/soM/02HogBK\nvP39HUDWvJl/ji49qTqomaLKP/mUFu7JnYi7vAuvNan4A4VRQNY60liPAXUO\nclNelTDJriB/vjzOdCclOLB1pXFzrYnIWWJ3QlG2fG+Uxj8ISG973cz7DwNV\nWRZm3g60EbiMZX3v38wuGZkCrvj9IpetHFnyq9wr6woJKkHWSFIkvXpBgMNN\nQU3Kgl0oUJslbmYzCW4OfkFwDxF2Q208ov8rDd/J3OvF7+NmZknXRPEiGOgF\nHEbb9bESQSNCiWlpuI6/n2/+1UVaCruLp383uHWWIG9Gga3SeRSkXHiLcDid\nhYQs\r\n=BHwq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a8ada14a9ac4b3c2acfbe10306a5e0f762344278","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.56","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.111-renovate-major-socket-io-packages-a8ada14a9ac4b3c2acfbe10306a5e0f762344278_1619439063405_0.3817083981996443","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.111-renovate-non-major-98f214fb00d01d371fe99cd961e172ecc0ee97dd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.111-renovate-non-major-98f214fb00d01d371fe99cd961e172ecc0ee97dd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.111-renovate-non-major-98f214fb00d01d371fe99cd961e172ecc0ee97dd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"283ea4e24166b56cea615dfea3e85897afdca3a6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.111-renovate-non-major-98f214fb00d01d371fe99cd961e172ecc0ee97dd.tgz","fileCount":39,"integrity":"sha512-3l4tmO+XTPWE2MFXxYu/mLO7U5bmAquoRR9I3cZUkNe4McVstyt2BfrbDAI/7qcjNzK3hEWuk00aNAeYtQf75Q==","signatures":[{"sig":"MEYCIQDHZiVlBlMp43/F6iF/z9sh7kuSRWfH6OE63GqtPf5OQAIhANkRp195tUkbWZsdKGJRxhScA41p4hAqTm+BM9QH9rom","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghxDMCRA9TVsSAnZWagAARfwP/1rPW7sT0rFjlxtrnvMm\n9DhfTiAN/zoDg0OPRAY+NkxrvKxvGWaFQ2BAa+nHMupDFP9ctm0gtfJ3IyZj\nHfu2diX0jWZyb/YUiRngsq+xEbUtbq01zO0Me4YmTKAF+0r/EA8m7tYYJokR\n05GxbZjb5h4Bob6v4MKouCI8D1ECNMzPsX3iUEMsbP2QYDALMGtWv8gGohcu\nm2m3eScxPZ+0QAfGU5mLdJMmEdju2GGwNFbUmILDy7vj8fZsgU/cVq4gjvjv\nHJkeNEWdyhTDYc49EAZHtnBIF63d/V1z7Ek8nDGKG+77Ko1L7/EOjqNwcDxe\nnXgukElGiN/oAfBvEBSrXNQr42eqzxjNTXHB3SvmPe4EXI/Cdwzoat9Dw31Z\n3kM70Llrglh9pOyX5yIYoQ1SRcztzcCsDno6Qg6o15ayOIR6RmqnrLFjDJvy\nUToIbfhETZ43Nhtd3HiJQRIfpMCmZFQ/8zO5w5WcDwHCQul06Qure8hNEMTz\nTy7zjjg+2PFYa52Ez7HUzIyMl8CZoXabOZMCpK6NzkYAHSf8WqCP52WWKaSj\nBW/ddpRZmZ20HLJvzhN73BJaOcK2mSPW/ghJMMdkRDd2s41Dm8DlpR9TYw0q\n6c6VBuqwx2CS1QfU0v5VULXVHQc10FP+oJKg15gzyklrbJY95QfHqvDqhCza\nY8Fk\r\n=vui2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"98f214fb00d01d371fe99cd961e172ecc0ee97dd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.57","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.111-renovate-non-major-98f214fb00d01d371fe99cd961e172ecc0ee97dd_1619464395489_0.098885230458716","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.111":{"name":"@balena/jellyfish-client-sdk","version":"3.2.111","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.111","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9be84f1c5407a8bb729ee8ebc2f5560aedfa9dd3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.111.tgz","fileCount":39,"integrity":"sha512-taH//OVUZw+mQbvq4dZ/yqSESxLSqTneTd7gtGkikmrZOakG9Oi6zV4XdVpeIMsgScYexgrsIzF6oMGiDXKUfQ==","signatures":[{"sig":"MEUCIQD/lbQQxmixtnUQx9fAWaauwdVAXn2JydC9FB7WBFankQIgfYbR0UcxTsyxN9reqoRZxsyo04e3D6DkFnBLRIOBDcU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghxGzCRA9TVsSAnZWagAApuUP/2781YmQn7grt7f1o/B4\nndgcY6IMSDPNBzC1h8fCDUMHlQXCjSn3toBpeUmVYCRKDa43miQ4ZIyGg60C\nQpmrwk52xbq/7Fd/Mt6bBF8YVd+DHiqJ7NSWwU7RbQxEFA9ppcNCXdhT5nKO\nGT7i4tTRAuUU2UaKtgl7VlnNa75Z6DGcxf4GqI+9Hs4fq1IRS108O6QwUMYL\nDSOSIq9EfoVfzZh0tOcNc5D2HTlf7tw7dRnCDXokgo4jvCmvMj1zec5Q/6S5\nL95NCsg6vsN6YSvHCiLjZcaI84rly0IvtKd9+NoMpm47FuKx/Ud7P8XLg+Ws\nZw2HMHCAxXhUJeIq++q0545WJzC0wdQOimBBIeUch0ZNqYSStRvHhzW1xHdJ\nfAra0353qHfuC00T98lylVbLBZOJJXiThcgjvfT9jyLbMreyfRc8rXG2UTtS\nn+i/c9j+o3Yx7OnIK2n1LoNMsxEso9S5AQK08/SUQKoSHIyMaTRaRtv+iROs\nxoXBNu0xalcu+UGN+kWuQGKMwxv2mkW4wt3z9+EjxU1aCnPOaAe+7wbPp7Nz\nXmtVRNal1ec2Q8Mj4pHZHc6gMZfj9o2SdrocenxNGzFvxjgDm0Bu4UGN0DkP\nHeVb6sS0OVMVMnx/yhKix5IUHoShYjXJtdtoo7jV06OS6FMdbty2blkBmasa\n8c3f\r\n=BqM2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"403fe72884240853914a7471fb1368396393a268","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.57","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.111_1619464627133_0.9010781454008694","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.112-renovate-major-socket-io-packages-73c003c834402ad506ea0f78c11b5466db646dcd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.112-renovate-major-socket-io-packages-73c003c834402ad506ea0f78c11b5466db646dcd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.112-renovate-major-socket-io-packages-73c003c834402ad506ea0f78c11b5466db646dcd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e748b34845bd2a952ff5b14605f7a5dff0be866f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.112-renovate-major-socket-io-packages-73c003c834402ad506ea0f78c11b5466db646dcd.tgz","fileCount":39,"integrity":"sha512-OrqparXEkV4ks2fjWWFQxJ/E2draHOTD5Wz+qMxKYVaAMfqMXPTSWNyE9z/Tz6ou9umXloGy3yBY0ppGscw+0g==","signatures":[{"sig":"MEQCIGSToMPfEA5RuWBhyE0oDDHU6wbyhaV0rKBrGgId6gupAiBOIzfdKqA2yItPDUeRuPBAfVOrEoEWowBL49r+ls71Jw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghxKxCRA9TVsSAnZWagAArLIP/3wxhiD3dw1gZX1fhLMv\nzkAalsAtRmD1tlOBKwh9wMxz28ikLAFao9c7I6pNbA39MU1qMidNd7QM8dO6\nXe8+d7z/7aAsJDdOTVZP8Nwr+USDmIi83SjdtmNSEWrGptPTSRObxWZmXry/\nJfvfn43IqwjYlHNQvTgMZVmn7QIJIMvR8qjJQjnCKyu3op8xh2SACxoYXLnM\nc36gZ/1+zYccBVZQ+NFEuhbRQaSJv8mUKT7/qZYh/SiTthXWLhM0REuhehJg\ndio0zQfC5Dxv16TiqFodg+4d7MciMgKsIdMV4Hqc3ZwpgaEcDptdZImoFeWG\n88KoHnkp4l3furzZc/uuziHfXxCV0MTQ3FvL0eG6tnP2gLRi8WvRsDaYj2nC\n9c9s5ejusVjz7mKQmow1usHQ20B0dLFjellbfMYn/B8ih+B6350OtH6YB9mg\n6aSVehl8ZIIdm8KfpbUSosX1NWrrk2ee0UuBCdXoZ9C2we11pb6wEd19fQYW\nrj8gqeARqV0RiwQHAEBgHE+XzQ0mpvPFIVDueSlYzGDoy4F+F5GxyXKziFfA\nr3JjiEAEyTlG9xDqR11MuJXBWrg04KhezxddcmS+bn19FamEhXw4gf9/+bVX\nNTkC6pEjYe8vul9Wi9/mZ3pR+P3Xvo7vdlOfRiwXZtB6PL096CEKxDlGx0hs\nIVPK\r\n=S02x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"73c003c834402ad506ea0f78c11b5466db646dcd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.57","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.112-renovate-major-socket-io-packages-73c003c834402ad506ea0f78c11b5466db646dcd_1619464881246_0.2161675627369437","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.112-renovate-non-major-bcbf0aac0ff75c36043299cd2800d0a0801b7448":{"name":"@balena/jellyfish-client-sdk","version":"3.2.112-renovate-non-major-bcbf0aac0ff75c36043299cd2800d0a0801b7448","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.112-renovate-non-major-bcbf0aac0ff75c36043299cd2800d0a0801b7448","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f6b877bd8f771a99c118c3b87a395771ea2e3f7f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.112-renovate-non-major-bcbf0aac0ff75c36043299cd2800d0a0801b7448.tgz","fileCount":39,"integrity":"sha512-5B1JfXF7gAnNBvrv6B/4loLY2fWSvQHvBW5QgLZ51EVwb7bXUXQBHGfo1rjNFcxIgfelRWSxqrjEqiTzimSLIQ==","signatures":[{"sig":"MEUCIFXIq+s9eX6C7iOfoGG4wiUBvFaY7BrNjomkMVVdPQjuAiEAys/sX/uXPpXDajjeckK+XR3d6Dnlcs5xSmbEL/iPyGQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgh1blCRA9TVsSAnZWagAA3XYP/1Iduqg/YFIZt5qHgr8Z\nGuI4PkBzvefs6Ci3+4HgSrtgWWCQ4O4abRXBb2kq+1Yxkuq8FHEe3/SwmELW\nywHxUQTj2V055HscbQPoGVoYBBnAaShtDGXVDWBDw9wVYpconD2dy9V4NZLN\n747TiKxrTu6+VYIheCcvNtAco/FpAwhycXfXh5sxOc5zrIR73gfIFWcLUWle\nxzwHJiuRVd+ymbeIqtDzSJvZrWbxrB8mdnlrSZoVo0RcY3cH9qPEanO14awQ\nAvMdjV2LxT0qIeaQyPQMRq46eDKa8VtOAcz+hJCgo2zUmLuL04zKioOp3F4N\n/sUjIbM/+ypqGIOWevAbkMbwLozQkdSI1PpuBnsGXfqVKnGFIjbzy/nfeXdP\n9peRMjasULHSUUg9NToyRZs8LiTgO1R+bnAYIm1pc4fkoLa/z9MtugBTSCdc\n9k9wFklpMbNNroQP8nvwuoQAlbAP4tiQUl0vMNMcQWYONDXGs+h6MzSDmJtW\n/I//HOPo+JKtU1rRy4KNJqg+FdVL9jvTGMS64nbm/Hglq5LmFgrHeWZ97ELe\nVMrBc84DPxHr0ieNFMWcmGh/6txQRfio5qdX6rlhmcpeeg2uPHhlAdrSEOxQ\nx1muFfJt5rLbc/uh/TAOdXfv8iWPtCfz1Lqkuw46HXPL4xEY71Ke4JScGLEI\n8Wgg\r\n=opk7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bcbf0aac0ff75c36043299cd2800d0a0801b7448","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.58","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.112-renovate-non-major-bcbf0aac0ff75c36043299cd2800d0a0801b7448_1619482341308_0.3212970401995292","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.112":{"name":"@balena/jellyfish-client-sdk","version":"3.2.112","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.112","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"82af86067a6f835d2c304d0809e30e6e375448a2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.112.tgz","fileCount":39,"integrity":"sha512-HNfLNb27wSwdcSdX4wWMGW7qQSpKgv9v6HTb64w8bQ9a0HpGZhuLM6OdyHuGuCX5gjQeY5nt8ta6Nw8rmwdBvw==","signatures":[{"sig":"MEUCIQD8wj7HH6Y94WeX3qWOa5kmnABklK8VEgBnQJM/VkbL/AIgZ/u+sNEYutwyoCpLnR5+eNG0hhN1SsH00lOIu6MCkkI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgh1e2CRA9TVsSAnZWagAAobAQAI95ufoecS/nEy+t+Qqh\nos5Wig3Q3JQ8MDOVbJe82Dac1gUrPUee0v5Ln6kcKVO1G7jTExcuG+LtBOqy\ngycakC8TM2pGVyxFuPX/mHsXrIO4A18DwAP51r7kFv4QVr+4DHRm8Qy13UG2\nSt5OQgrdy3hubOmfrqvrXpD3TVqn1vUWY7JKGhHwlXZU8Qdj6ArJVVgLKHJn\n8oWDARx/PFfXkjmdDUoJJtvit/HzfgZwXgbkcXqHMc93qjVn3LJCKxIOm5bT\n/tVS67dN6xJeNLLRmHZhT09tBadJcJ0M2NQBtLiEPRYeXCwx+p7QFyzaASqX\nGLQj3E5gqvD3vf41VwSLrd5qQ7pWpA+e+leFHdoVC6gKOlDJmHoJ7JCm1SM2\nqVyRKlGR9lhVeB8U48088sJHA5tnecyfkOMNWDcLjzkACY8XUb83SN+29QJ9\n9iJICekkelRsj0lFvocW94UxzJ9Zwzzk7U/wLCCLEgmv+MWju56Rr8NlJGiG\npCe5RCT0KqnwkgFD8qW0N+RD0xy2I2GceQjeiBdfIlaFYxlGTT4x2407IRxt\nuG1KonZqs3fhBLEYSDPs+q0W+y57LOXicxWE7ioRI4Z8tJYsdlQjn9D4d1P3\n9hXdPmsUGRxl+aaHmw9CPxxELJyQMJp3T0EYigtyQgFR54/Rel6pMh8Ocm5M\nTySA\r\n=y/pR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"82bcc542faf2453520f33ca2a8e8ddd822f7db52","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.58","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.112_1619482550247_0.5292519929849713","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.113-renovate-major-socket-io-packages-d6d38112ddaf0128c149c9d26c632fb29849bb9e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.113-renovate-major-socket-io-packages-d6d38112ddaf0128c149c9d26c632fb29849bb9e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.113-renovate-major-socket-io-packages-d6d38112ddaf0128c149c9d26c632fb29849bb9e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9ad6703b31137bffed3f7a02a73d1e6a732b87c6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.113-renovate-major-socket-io-packages-d6d38112ddaf0128c149c9d26c632fb29849bb9e.tgz","fileCount":39,"integrity":"sha512-e7yFN+AcZ/NbCf/QBL/FDRzBqmbGs17kkfs34Fcwl58hsVUH9scdDrlqihMG0JxItjvAT7uvLfa1Hd+bMTt2XA==","signatures":[{"sig":"MEUCIC42Qdf8v/KMsEyj77JNQSbeHdbsd1bAmqAlpHVqj+YxAiEAw8kX44HdR/K2/wxjbHn6KA0GPDU3XBYPwGljiNQE3Vs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgh1jqCRA9TVsSAnZWagAAN5QQAIkASvdDGgYpzcVZA3TQ\n6keEMyNxTlGVoPzHk1Ed6r+svKXrt6GKxwKcNA4C8kIwWRrIcKm5TlSb8KoX\n5JSXqViTiPw9TLKTVoDV6qjGImTij8Tago80cP2qYmnxw/wo7ZngcALJ+ox6\n0PJ6HRM5ij+2uabrhSLpvHEWokiY+A8tOpblCqON1lJMYYlRMX1v5HUdtSiG\nGXuOxKIpnB78MdEZV8q//3h3d0+dHlT+JJzrTPdwd+cmrgewdgfa/5QUWvnM\nklsfJr5GNrHs0pqeg2Rpw8c0yl7+zzwF6Qith2BGjamxLzFLvD878EbEqGa9\naeCj3QEA36+tziyTv2qGbXltqPe6K8Q8VSRwFKRQ7+AN0C+TPF5tUupcZK25\n8UtB+Sl+C8V9boNpM7JV4RY5YbCCBP2rpTrEIsCnIYzPB9/+bqGhDm2RrI5y\nNcrdhM0hR9V9fwfy5Gj1+lywzzHumfBHfgRB35Q02uGGhqKIg1rckap48RGv\n/NVHD7O3XkNWB5noQyUKfv39TJN0nrVEVbSv/QA38gH+lYr4hxXoZZPXkSWc\nz/SXHZx6kM296TVlYGDlSZKI2thbW8jbfkFnMkMnH3Cq8eyjrNcUTFIMwj59\ny+xn1PPbmW6M3E2bS+BRWukd+NMwTb6ZY2/5l77rPDbBn1QMs630ifAX58Ph\nZXvv\r\n=k8cK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d6d38112ddaf0128c149c9d26c632fb29849bb9e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.58","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.113-renovate-major-socket-io-packages-d6d38112ddaf0128c149c9d26c632fb29849bb9e_1619482857486_0.6998759933914904","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.113-renovate-non-major-939e1faa196fdea00287a1252ce717e6d391b276":{"name":"@balena/jellyfish-client-sdk","version":"3.2.113-renovate-non-major-939e1faa196fdea00287a1252ce717e6d391b276","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.113-renovate-non-major-939e1faa196fdea00287a1252ce717e6d391b276","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bccc037d0209110c35bd70fbffceea3d72a88dc3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.113-renovate-non-major-939e1faa196fdea00287a1252ce717e6d391b276.tgz","fileCount":39,"integrity":"sha512-MM31EgsRqma6RAOFihrUJwqijo+HBL8quThTNcH+N/DgbccWXK+kictTBYeoLpJrxWy55VZiGHaZkLwcbTDH1w==","signatures":[{"sig":"MEQCIHtSZLnMb/oAnRfXoPWtkww9dlBxtbHYfMr/b2o0Lw93AiA7Tjum5HHDoCbEpM/7aZM+rqJUonB7B9pT8XIwdGUelw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgifBOCRA9TVsSAnZWagAAnL0P+gOrwKC816WsYJztCXWh\n791MAFBMCNX2kWySpl5KrOpYEhfKzsTKYTTfi7iK0jgkds9UtktiHrWDI0yL\nzUKeE8oKlzrfDjGCdnoIxIXlJVGEgAmkXT84k5mHeOQsT3HBufQZIzMALbKc\nDoj9eOlhL4kkFVIaI3PjIkmtKKR/WtXBE0YsdaM8/DmsxWPmkXa7r+ElvVmo\nKKBiHsrf4TVa2AF3L21jgQT95fCBb51QX+ea1OQNjzYzxZOJ1uj87cDXac/B\not9h/ZAzNiHtEiKdCHEknXDpWqPq6+2WZ5KqMG7Nwbd2Kn/ZWyVJclmTXZdl\nc4Z2vBpCOLPeCA02sEnNcI7Rtb77zgMLz4q/Iozh3Q27PLZ3TgBZh0oUxnvp\nwSIoRZQls4qoHg9SzGDxC/ZL7qfKSqC4tc3o420MA6PR3aNyckTthwRH01zR\nfxjTfZ7JS5zJ26dqeeJISvGGsvNGXS7OMBzonsMO5FSPsv/DQeKIve/6fRlT\npU8VNFTEEc0kJE4n7zukAtNWkuWBCo9I89hrJZm2ENbwka01XYPNbJhkdFL3\ncHUc5S2+C6YjkFVgQjRBeI3vNi+qAAnwJ0ZcGcP4ZJ/VMsIzedb7jYZHoOJp\nxzROA9wGamAAtSAkReuTjp5Ujwme7Ks+VWWIth4Ho2ST2Nxpy8YljudF0bZ9\nGi1L\r\n=JlCN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"939e1faa196fdea00287a1252ce717e6d391b276","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.59","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.113-renovate-non-major-939e1faa196fdea00287a1252ce717e6d391b276_1619652686243_0.9593969127684185","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.113":{"name":"@balena/jellyfish-client-sdk","version":"3.2.113","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.113","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aa981764baf4e5288aafcc75b45e0105ed43c8b4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.113.tgz","fileCount":39,"integrity":"sha512-veoA+v6ZvPc1Q2y9ksRb1DYSQ2KWnW8bnShXtLoOOyr27futNqmQhxmPokt45aIPpMyjd+6NZNAf6869jkoytQ==","signatures":[{"sig":"MEYCIQCEepZgRniHet97FRiHQNDWYoSzEd9Nuxxvqe5k0w/lswIhAIrvzAyHhgszJmCa4Us76JAAQWvXfham+AxSvStjrOSH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgifEdCRA9TVsSAnZWagAALhAP/3VHITysOaBgCTtyB+g/\nQTHv14T5ycPNntrGkbLDtrxpaZOxAcQ5m+FgvWpxM6F6K0HuIBb4az0chvuo\n6XRzKdyYWxuv1lckCxQFFYs3YEBLsKtn3frXvKlJNEoDAvkPEhkkEpLY/dZu\nI3EvYgGLDHoJpeylwJv7zaVnkjtmaVNWa7rEFgVpdnRU6Kqa/VZcNNMIlwvA\njOmHvTNzi0Ot72hu7Tx9l7LvqigHpVfG2Ri0kptSguXUFYCM4S8QmOQuOK9i\nqtaT3jfFnf401aNp65WYDHs8KHvj4wmb79lG/JgGPLtVSKokVwXGp9xBEEPL\nspoSTbKeTjYVFryaH5SF/8Md8QG4hq3QTyoYSRVP86McuF1MKGsuiH3twpuM\n1jnTbe2YbZxRRNeUbEXPJVkKY6C63tHyeGntOgYYf7Ab4qcJbJGsUu5nFpWp\nBJhiJsAI72KcpVikO+Qxp31tPCuJ+hJtaVOcVmRfO5R1RVwqONA2xwUy7riy\nJCPQ18a6pa2Z+pNQzn3NS+BOteWhMXA60nTXZq4ygo28GriSf+yGRQFdxneK\nbQAaMY/ABDBXKPFycIi51tHgcqtKxWFE7uTk3BxKKpAyyf943CvjYHTaHyu/\nVSDxgD5X40m+33ltt5/Nizok+KqxsgVQMnEB1ryGbJji7zYb5dhU8BHtqUb7\nAhxK\r\n=4FOz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dba728388af906b07a5de7d170ec08409c77eb8a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.59","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.113_1619652893544_0.6281914742930925","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.114-renovate-major-socket-io-packages-5b72ead215e5c4cc818f0a1d8367b510f782aaca":{"name":"@balena/jellyfish-client-sdk","version":"3.2.114-renovate-major-socket-io-packages-5b72ead215e5c4cc818f0a1d8367b510f782aaca","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.114-renovate-major-socket-io-packages-5b72ead215e5c4cc818f0a1d8367b510f782aaca","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7f660c351130009f47eb3ae9e36a5599c38d3959","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.114-renovate-major-socket-io-packages-5b72ead215e5c4cc818f0a1d8367b510f782aaca.tgz","fileCount":39,"integrity":"sha512-PSdrIm8I0Jfqps2yRfevk13bLxbLt/4Bq3MjR+ZOR1ZSk8ri519mYHmrsHaP/nNbNHg0YoxXIOKpeVs9jRElwQ==","signatures":[{"sig":"MEYCIQCKlj5Zk2KGpFjQYOoAElM9YHm9s8aK2yiv+N1bZpYMZgIhAPLlZbtyajemlPf8XBht29iugoVgxSnEj0D1+bZY5hhD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgifIMCRA9TVsSAnZWagAATCcQAJ5ouHBL3kMyYZlAfdKF\ntSuEBdEdb1HMrxdl45WI13AJOFbqJSQs63LgGIKmJv5U1FrkhH06o6+1mVv4\niWLxS7tmtWfeVLsZ/LCkQz21wAzG3tydvsXB2GYhxXvNK9S6m4yD0xxnugsq\ncoA089z8vwI58thJBaP3xjZUrf9e+hyTGlt829hneXavCJZgDwYz09K2J6nb\nYBnimIX49s/j1Oh531Px9W3jhlrM0FZHOcjpdEojAFWXGl6KtI6ANP97kDwL\n0COEZHEPJl3xsIcu1qoMgkgIo/MU4krV4m21YDmFpdjdPfVFuJ5QzL5UCPBt\nQw3OLmSs+JTvkgQK73MWAjoZEoI66DWIdTHYZvbn2be9KUZU8LL0OMeh7c08\n5uJDWMgv93MsmPaliVCy3ixqdXhyZpZXN1zorbGI+Jm0RTMQW1zS45ZDw0nt\n5qTRpEs6ZQJZnJJDdtc33lex5HNlt4DPAQSNeqYDtwHEHxM7pZ/+H68pfmSR\nwHK+L/ns+dfCAdxv7HX5VZbpjRLRa/wDqv6P3aYy+wmJPGHE0PC15ycoH3cJ\nCZX6V8IoOPESRTsku8G3HaB/0Zqsi3D65rN5VWAkAuaLuMc7OOr/nkkbpkg/\n2H93eLzRaOxphziqK5NeDDDGAFhVBwu8dlHFNu/HElFqyxd4SWQelkL6TZ6I\n46Ob\r\n=PNW0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5b72ead215e5c4cc818f0a1d8367b510f782aaca","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.59","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.114-renovate-major-socket-io-packages-5b72ead215e5c4cc818f0a1d8367b510f782aaca_1619653132319_0.7634279285561854","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.114-renovate-non-major-2299c5ec9a493bdbae62b39569b4e7f5878b285b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.114-renovate-non-major-2299c5ec9a493bdbae62b39569b4e7f5878b285b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.114-renovate-non-major-2299c5ec9a493bdbae62b39569b4e7f5878b285b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f274a3d6bacd9135074e8556c31ecfc308ca65af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.114-renovate-non-major-2299c5ec9a493bdbae62b39569b4e7f5878b285b.tgz","fileCount":39,"integrity":"sha512-LvwILdcJ4zU0nLU/QkNvJCsZv+H+wM+jgEQ+V/jUEUa8b7qx0lcJ4cedaHf6FtDoIsvffI0Q626fWjCLlvP4Vw==","signatures":[{"sig":"MEQCIEWpuMJliABpIi2yXQEWrAXwqTotImWsRnSPVaMvTFIWAiACv+Sj3MRaWLyHBze+Hd6cLUvODi3aaEUW+hFIMNqsDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgigu9CRA9TVsSAnZWagAAFJkP/1t+CGRfJOAxiTM4oOLb\nPEj5mRYXij+w/JWYyXQ1ZSaw+KzIlxyxmZFePRdvtvpLwN2uELu851hT4aSg\nwdKOcuwE71NqHfiSUxBd85ZtY8C1ttbL0O7mjy8kv3aG77li4Wgf/e+ieOD6\nWggoom1iqXOplpEGSjDzqaXFwPA54+ZgpzNLJg2txQaC5OpbDdX07dRpV5KN\nldUNEnneKOLVSnKQgcEObGKL3s1rB74bSwHg9btU9UBQEL4pxCSTV2hjrKEE\n11BFgd6jUZJziDi54ZE0dsYIHklRRVgz9VuUJDFWMZ3mFudxQ/hYdJB+O3gr\nUWAF6VM0kGsxOX+iVddAMMU2oxobIGscQV923Ev8jE9X/2NcayPV9bRrzqoQ\n7HjCOHdr0H+O7o/LH/5LpX4oWFAQ/7pCRLVHm3AoMt1+Zj1TTw95FRwTUxU5\nD2K2VQqelI7tBMpPUJxKWDhpAX80Oh8ePWB4DYdFUvTeIqdCs/YymFDzhwfp\n92kuOfMte1jFHBWrFHnf2PYs+77t2mBIUuquAMaH1GZ6rYyiyO+yLgoZ0boO\nU158brtgG+HyJ0TWYZTOLW/O5Qk6IN5Uatg6v4j9LI7MlOvPMugQ/lnzO/Z/\nGGJI7vUkvDMADnolFa162GT9Pr0gEXo+IrMqfR7+r3toHlHAIRouLIl08/IR\nNT9D\r\n=lsfn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2299c5ec9a493bdbae62b39569b4e7f5878b285b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.60","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.114-renovate-non-major-2299c5ec9a493bdbae62b39569b4e7f5878b285b_1619659709387_0.02948660232577649","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.114":{"name":"@balena/jellyfish-client-sdk","version":"3.2.114","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.114","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bd29563e77a47b3c31ebcf402fde04de4b461e26","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.114.tgz","fileCount":39,"integrity":"sha512-yuqWgOLyXJ6RPg5Clka/GpyV6yOdxgDXo9Byp6R8vFlbR2rVk9aVt9HC7hzt4ykKizW0mEmyZNshijF5AYYteg==","signatures":[{"sig":"MEYCIQC1V7jfg8VxvmIOoqxymF4OedczW54xRa3DWbsOGF1fEAIhAKrne87MAvTZVM6sl8nkL0qUxaum0c2P6yqvNmWVUU+V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgigx6CRA9TVsSAnZWagAAEJ8P/28pOHuiYHQEO8kcz5ft\nZ6a5xLW9FxNOeSgoMKNs8eByRRZYHyZeQ1TwcbhCGZWxvVdZei9/nuCvxd6E\n8DZneTp4jxwc27/jHazOl152c/dsv9pldNJdAvVIUi/iG6rBiK32sQMOzEEo\n8rnx8krRIIT85/0ilF3qdkINN6BGfaGE/93cyWqvCMs64b7xpNWuy7/ItT7y\n6Q8IoAAKDWHz7otqDWHMs1wViAzAQdYZxbQPrKFHacIXm5kLHIdnaGiK8BfQ\nlUDq8UwXcdGqePwEko23Dp1SK6CzKgwEuopyGD+JHeziLF552hZq4BcYfhh7\nfJ2yegsMS2VVAMH4qxVHLCh7Qha35t6qoaRIk2ix9kwkQWXB+fDYU2d5t+56\nDH1CAkbjRselN8rVF0GupbDf19nfQaGM3pHGOj9fGwFZWzmXk89jjAENGUUd\ni7eg96nCK9RVaHrZhQqScOLLHe5SxMvXKSZyXhwjxNCoP2YQg8f87IdNZHYp\nN9ikhx/Vov33yv9axWSppOSpaHoWsYkesRJ8NN0OUJ0ViFysNDHNllrgF9T9\nuuzv3gqjSyeU2rQfo800hDY/X9BKdsJ2y8nbD3WxwYitYE9E+HoL6I9G4gml\nG8c+0tQ31whY3guduf6RIo2EHtkwVgRjqbATijZZFJP3AZhK4DlSxwtVe6Io\nEm8G\r\n=otK3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8471509202feeb821d0e1b49ba405cc772740e3e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.60","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.114_1619659898469_0.39787029104701865","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.115-renovate-major-socket-io-packages-d4f4b26e7857b5fb04bf32fac36ff45893faf616":{"name":"@balena/jellyfish-client-sdk","version":"3.2.115-renovate-major-socket-io-packages-d4f4b26e7857b5fb04bf32fac36ff45893faf616","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.115-renovate-major-socket-io-packages-d4f4b26e7857b5fb04bf32fac36ff45893faf616","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3c0cf9edb8e1e768b11653c48f745bb11077d28c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.115-renovate-major-socket-io-packages-d4f4b26e7857b5fb04bf32fac36ff45893faf616.tgz","fileCount":39,"integrity":"sha512-8RU+cpPHz6p+y2weX3UR2lSJvPo2vG6Yn1P/FQMl693kOpMZh5BQXjzj7k2usy5vgOltVwcQbuTTbHKoGrcjgQ==","signatures":[{"sig":"MEYCIQD5mV/QMv9WirkZ7KMCMttKpoCQWP+yv20JsaiNW2YU+gIhAIr1muSwkyeZwtf18oMpqlBqtSuNmL60ZfQlQrkcu8ZQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgig1zCRA9TVsSAnZWagAAOqoP/iWqyac5dABmtRkRwTOz\nrTrm9EKsl01T+YO3fV87ApR/oYIIrcMvVnq+IP+NVdPNP7Wme19BSjCbPyXq\nr4LMH8muWXbMCM8xgNduPzVc+ReAz9wPkEopIJf124/ZFK10BtHYbpxUzTLe\ny/hBlJeraQvZK9MfA9ZjYqpl+pjpIFmEN0uatQ88v/bwyAm1HP5ZsvxAnbls\n6+dhN5AdrRYqJ6ELqPKdxumuVhCgrzfzCKA6d3QchTnpoZnKQN53Raa3sHqg\nC+00kJSY9caMUSXSVIXZzu1teEY0CIrfrxKmu0pYaUSil4C1+GhMt+vNPyIh\nVhaIyCpGtun3b5jA0VcEGT0VWad65g2/625QKbWytYYSsCgcbzit/EQq98Ir\nEP8U32vBKbDYjyahjlNWXxbGWCqiVE3eKb4DAZ77T4aW/8I/hY6jDc8qyfHw\nRONWopZ1n23hp8mRODMYYE4PqzofsswG/ce4gHiE8Frk4U1Nypuaq9ASyVFm\nzl4nyQg6Yy/Lx9oxWEzIJQ1GEukbms00+s7YxrVPQ1hbUTuZqbQOAH1VSHfJ\np4HLjHX3ZECKVQI6gXR/u8AUJaE4DDLh28XjOkKQRTvgsOvsQ2Iy6t/RMVtv\nQOPycMs4t5YlS61M+b/Di8Ee6vx+Ss4QbgJHiR7NWhCKOrIkjLtBCBa5udtm\nyG3Q\r\n=2H4D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d4f4b26e7857b5fb04bf32fac36ff45893faf616","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.60","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.115-renovate-major-socket-io-packages-d4f4b26e7857b5fb04bf32fac36ff45893faf616_1619660147159_0.19501664856586776","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.115-renovate-non-major-e22cfbb9570723ac74881180ef9971a8549fc9c2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.115-renovate-non-major-e22cfbb9570723ac74881180ef9971a8549fc9c2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.115-renovate-non-major-e22cfbb9570723ac74881180ef9971a8549fc9c2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ad01bf001904a0d661cd7c6ddc87170d228c73ea","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.115-renovate-non-major-e22cfbb9570723ac74881180ef9971a8549fc9c2.tgz","fileCount":39,"integrity":"sha512-5Wr8/gkZs29Y68KErUf+lkCsqCkLCNB4LBMZHVp1iSrQUpZuGATagMwXuDhlpGFV2xYHrhUa8ale3USHM0zpYw==","signatures":[{"sig":"MEUCIQD6nTC+BckqDG5VDD6/NV9n2KwQqTID5+sqpWEDb46TJgIgBMBtZ+oxRK/cRyAjSQoAcmq1CRYkLBm2kerxkjjtkWQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiiBSCRA9TVsSAnZWagAA2zQP/R1AU6BrjFQgkxwtNlcC\nZocVWK/7hGTogTUvc8xcXiz6qGIbUq2BNfuFwnV1AlYMRtGsRVPiaI95+DGh\nLijXbaZUzxml6yuZd4wLzWERjVBB5Lblk3Qe86OQoCDc+OgwgWONReRFCK0N\nAHxIz4MuGLJo/Rpy9iM5Oo3xW/E6EktU1FiQ51GfUHU4Rm1M9EN06oFQWoad\n3kP03GlyPUxGgFzi0iJQlJkFRL+5JuwikSazJOPFINJ9Ey1HJ0hxVLZ0Qfhq\nN7+9SOQbHZFhXLO4wTtI+W0O2tkpie4qiajWy6SwxfSd9CY1FH92PfpHgRZZ\n7WkEnTk1nSbqYlBgDU2q8QZYu3MNSyos27/4mpOfC2JaEFsSxxDli0e0dPe9\nn+WHnrMTECA1x5DD8QpY9DBCX7unZrvvSCc2rfykYELUd3lwOViCyL2Itkk9\nzWC4pBqI0NJAL/z4RrTf0/fdP4a7CpcPypgtNGEzn7WLguuZL2W/fvc4VH/L\nm6AMxbjW27YO0d1Pht2FbiW0GLkYm47vv4UeaJpmwTQPz5uFkxS2RYCgnZNc\nU/o5Sot3BnUNaAUBH4POhUF5GSubNXMRVR5sjNwYKdINJitgzSGJcvmoyAY2\nn8la23NXlRHSvepkkDHBJqdfdQIMzCt9j99bgI+i6uyA+Qi/LmcxAq3IGcYp\niTqR\r\n=9INr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e22cfbb9570723ac74881180ef9971a8549fc9c2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.61","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.115-renovate-non-major-e22cfbb9570723ac74881180ef9971a8549fc9c2_1619664978204_0.8758593941598252","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.115":{"name":"@balena/jellyfish-client-sdk","version":"3.2.115","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.115","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dfe3b323bacd0a33eb6314e84b8e671850038d42","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.115.tgz","fileCount":39,"integrity":"sha512-oqL0GpdAy1Patvpk+Yb6PgP4IhNBEH8HBqNWsfLhB5BP1hmSR90suWCZDeB5IQf7KgFIr+buAgXMN62uDridjQ==","signatures":[{"sig":"MEUCICgthasaAVtBXoXwZdXv904eEfHGxS6pqD69O8hPZXJQAiEA55DowIfhDvwIIIXckLCioyWzYxna7Yb0kNU0PKehQfE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiiFuCRA9TVsSAnZWagAAiiAP/2lGbu8NBaPmvik3mdYY\njI6WXQwmlX1ly7jSXBhW1C71DX62F9TvV7HHK+kpf7kfvgtaxD0nzqa+b66R\nhPgONwBe8mXVnuN8kMeWd/uea/fdrPvLJCclxuKal0DfawU61yAonixx2cEK\nI1xVndD75ErwXPn6/JcC1mBvwhEfZ4D9xLkLx1Sh1NDGRoH4P4QqCGYI0hHt\nTlHUhokqQ37o+k6H0GEy/wF7vk3fZ85wRC7n1Cuu+NNuMwsZc2AmFKneqfIV\np82rP9UZIJCL7jaf4gmfLzhE/4bZEj8u/svHNn8r1NZw0fBYYfLy9+ThZl2o\nRKNNfU1Yj+9bSXhef52FbwS5t/OHOwVXoEXe9NWbwaWCLc+q8Oba/kwGdw4O\ndyOOmdbpIU9cn4r0ozrD3SwBxipnzjtAeVNyrtNTBxak4nTa2Bi/5UOdOPDj\nPDHXMOXi7A53ENVNCNInGNrtQByeEQh6X7iP6+86T/erA7HzcvMjlxKZy0dv\nDb+tf93c/ke3int4iS3SV7KDZNHs9oAsNqIHSKIWIg20rroknajEUNh3NLds\nQ52+4LW197N71fLH8fYWipDCw5Efmxha5WPdSoAOVVieV7UxqGHbcCmTG/kl\nX6A/zXIJZrrrnVzRriwvhS/x6gFayEFSBkEiNqe3T6FJWodcehXtn3v6nhQn\nIAOP\r\n=FPSv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"103566aafab9ec377d4cc33ce579d8106ae20c0c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.61","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.115_1619665262309_0.8540296746428573","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.116-renovate-major-socket-io-packages-1cb83b20b96be6d7f19691058bdfaa4ef79a41cc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.116-renovate-major-socket-io-packages-1cb83b20b96be6d7f19691058bdfaa4ef79a41cc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.116-renovate-major-socket-io-packages-1cb83b20b96be6d7f19691058bdfaa4ef79a41cc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cf313c7aadb1b684a21d416c142fb650d15907ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.116-renovate-major-socket-io-packages-1cb83b20b96be6d7f19691058bdfaa4ef79a41cc.tgz","fileCount":39,"integrity":"sha512-rdIwL+LzK8KLyWIagUxMAWRcGGKQ3wOrVF4ErjUNDSH40FhKChEOUNUO6ao1VPmgCCjNOWqZLlC/nmiAgXn2CA==","signatures":[{"sig":"MEQCIEBbC5vIMgSu54d/D0WVWN9gRPLielXydUPo71iXV8bjAiBiJo9mPA6Pdb6l/di+9EntCYtUXA7v+0j2CLLGDG4S9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiiJoCRA9TVsSAnZWagAAkXcP/jA+M1HW1stSPzzX+OFl\nTF9Fr9KxUY2YP5+rIzKXXmHGxwn4p52QXXIrLwOrksM7i3dLGw/WpbljBuM6\nznkZykl7YbbxIZ52OpyioiPClkrwWcEkMrRdtzjJzFcGNuZ1VcuIKpx35rvv\nZqsu6xSqFhRudm8Y+fuzocwsGMX+ZBn3mCkJ2wADsW6IQN3d7yUaDmmeO+dy\nAuBtK7/zE+tuaRUu4uId7+PvDPNkGXStFjxHBfPTAhUTelN1XceoXeCYoa4k\nhU65rWy06GEIKaX+SIaUYaD3VMIiVTcWuf8L+sGfzFZigTEe4lMuwsDHY2uu\nxfonhojo+HvG4jmovFJNH/UOaPZv8morUdgOZJqEKoLZGz+sNs73+koN0nb4\nhK2Lt8f08dD88pePQwmqg2+kRG6ewUfFQ83ZGtdiaxe8t8iP4Xsyh2dlYvZX\nCWQG7+Y8NRnfr3gmx821Cy+XybSVEy9IcomSvE0PGyuCD6g2jtnKgifQuDsD\nNxCkPSL1Zmi8anMsbLRyQ6cIHKhHDtusAJuVRCXDiYqw7vwcMZskX3C/lYgD\nV6Rk9fgXlOonbQkitoXC+X/7rD4HWsW23mpu/gJ6v/utLcx+U0xEvj0zS7eH\nI+S5KZ+LTyjsJPxfc0yhQxO4uf+LeeNhkNAFqDU31OtHCsqfgTJ1ADbPUqiT\nEH/j\r\n=OlYv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1cb83b20b96be6d7f19691058bdfaa4ef79a41cc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.61","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.116-renovate-major-socket-io-packages-1cb83b20b96be6d7f19691058bdfaa4ef79a41cc_1619665511754_0.07982059235809635","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.116-renovate-non-major-12505d13e7b76ab201fa3a1dc28a37ea8d276b4e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.116-renovate-non-major-12505d13e7b76ab201fa3a1dc28a37ea8d276b4e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.116-renovate-non-major-12505d13e7b76ab201fa3a1dc28a37ea8d276b4e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dacfaf51f93543abe78fc2876aeff11a2c8cff4f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.116-renovate-non-major-12505d13e7b76ab201fa3a1dc28a37ea8d276b4e.tgz","fileCount":39,"integrity":"sha512-MIjTbWRBSBWFyHPQDaGCSMBljNw7kftaI9ReBTJE9m/t/cmgdRlXHah/5PCTR8cqA85r1Lfwe17e+qiAwdzOPw==","signatures":[{"sig":"MEYCIQDqcdeIcQ3QPPuegYtp/MJ7aTZOUicPHYgnXS/8lu0jxAIhAPZs76CSDQeHy0N8EmvxRBjDf0EyT9A4gtuUhE8Gn8TN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240781,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgikBTCRA9TVsSAnZWagAA2aAP/j/txWxjfA4zahow6kTp\nd2dP6un8eCoAbmU7UCe1U1C+zQaHYzeM46YQ1w68D3rR+TJzpVHbAmZGQzs/\nyteL1OHKCcA6MozjAtOkGnzFckvbpb6/oKPChTq4D2mRCQpuFX+JWKrBL4kS\ngZw8iaHXyCBJpN2h3uCFRZZszQMhxH1rLLnrL3kUAo2gURr5CMwIS09NxYvq\npJ1xxTXIuk4J7EQwOMP+OygWr2fTO8AwilnEi/TV3SW+nJ3yXySSXNwMLXKR\nqTvVS8GlWG6a7zrZhgjoh/XlAt0YXAWcCXViqk8ClWQ0XN0jqVkElk4o+mOn\nPCWiblEmSyTRjNchH5cSlrlxFyxuRayByid0qFapJ9PF7w0GStzYlOCN05KQ\ne8/uNkQ1EjEgVlwkQDonYGCV+3bJdU84TLT3XYU9g74D1n6vkZh5HqJOAuoS\ndcYVqt3H7SJ7O3zDOeSmMH3s0niKqtKgSXqpnuZBFyTCWIsKxfKpULQdD5a0\neSBXv1ceETok9LOZ10dMMQ5s0ZINBkBGXvthD2mMqWyC9/Ae4izb5uetCXxg\nCwkVsmkKyMzl3HM1BCFm/uC2bxXf8rMo6gJbyK03SCoNmvbmGzvJXdGqTcxv\nJazEHCMv6fg2viSwOAnclQ65qzah/fH77DVJPsxzJKb+TxFTSoTWh+Tfpi78\nxcAX\r\n=2rlC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"12505d13e7b76ab201fa3a1dc28a37ea8d276b4e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.62","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.116-renovate-non-major-12505d13e7b76ab201fa3a1dc28a37ea8d276b4e_1619673170717_0.13763387893046852","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.116":{"name":"@balena/jellyfish-client-sdk","version":"3.2.116","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.116","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8110fd2bfb0dffc8f3e4d6471332782c55083d7e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.116.tgz","fileCount":39,"integrity":"sha512-3lxwiOMfittEh1bb05x6WoiAd9tOkKBVxlDKXSnSdp9m8a7JKIZWUoWFAeUDDmaQ4Yh1OhGFNGrGcYagl/F6AA==","signatures":[{"sig":"MEQCIGIFn+DcyjhpmxXX4qrE0QbtTaaYPV+ZaIOalqSRT/uUAiBMz0KyJY8p/Hul9FCQYXG8rMxX0H/NKNm8W7cLQ+OheQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgikE4CRA9TVsSAnZWagAAXU4P/i30kpU7tBjRKXE2S3AP\nQDeOHjzehDPAgKSGCMEii6X9Vy9eAkpvKiLmYngKpj/w9zLP+qC10VPsSWNL\n3FmLCbfeFtQL+VUa3mbVHT7FJhD2RiOktT3JZGN+ZC4RBQTxh2sb/gNrVKCy\nnG+jFr0M1cSeSxqJadwnG2jKQGJTSY/7+JrqBOnq23qeNd9SjStYgk3qlHoV\nS+iLzepjRQsIRWHfG8TsBEGEgr2VMiSs8lcsOHmIkUwvXwv8v6SaYvLAOGyq\nmnTcpf4BJ7M7cLUKl7G5wHgIlXBQQoL2am4+yEis4EgsMxBe7DondjGAYK69\n6M0PnpwGtGHjsBG45UoDIGqIH8tXUU0dw7f2zr8Ru3LVSn3elk8xgnVMt7gC\n5F3FgVJaFWL2NIcPHFdH+0YwU+malMRFZCAlH8f0bgqi+d5tlJ4ld/o9DcM+\nU2FSoOhdMonZui5q+wvJEvQdCWmiQz2yk2Ceu8A04vD2q5SfVk9EmIg+oayY\nWI4RxAWQvxuRDADpvUnLTvVwqWEaRTiUxUlCpIaPYCJ362Xxr26vRhqqtlF7\nz5ap2NF3z618O9wSUvkjCyYUr8MCyTxbZ1IM7jlPglhY6j8nZg9iWhA0ZmZk\nvccxYXGg1q4sPg6th22WjJpqs8jwinkm68YUWqc91W43fngTfX0t6t54pNyU\n8uIp\r\n=NmFX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"014c5116fafc97ced94d1d790a41fa96f7156452","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.62","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.116_1619673400004_0.6444662313426939","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.117-renovate-major-socket-io-packages-a9698f72abce3fee1a389c12e6cf49c27c051618":{"name":"@balena/jellyfish-client-sdk","version":"3.2.117-renovate-major-socket-io-packages-a9698f72abce3fee1a389c12e6cf49c27c051618","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.117-renovate-major-socket-io-packages-a9698f72abce3fee1a389c12e6cf49c27c051618","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6995e0aa4115116c9fe7b1f7443bcdc60c8d55e1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.117-renovate-major-socket-io-packages-a9698f72abce3fee1a389c12e6cf49c27c051618.tgz","fileCount":39,"integrity":"sha512-QYOACPpm/vV6e9Vjs2ConxRmLk1gqH8PtyZGliDJzB++PfzS6PDb/qawqxl+i3l7Cxf2+kpKUlfuJyLNClDSJg==","signatures":[{"sig":"MEYCIQCigdfvJEu9mi0EWPfQ5+D0wWOs0g1UFVWCsfVTJPV5ZgIhAOLOpmb4F0qN4jh0d2xDPdeIYQbeWNske7EY/vJED67v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgikIxCRA9TVsSAnZWagAAFA4P/1vToFr7BLLTH9NNKqRu\nfW3PXTCblfqwDp9sOu30Ig2TCO+tqeC4MxKCSs+WClqM90gPEao9KtxiKzB/\n4tUrykQTOIGo0X7T1Cz04YB08mqLiw6+aTkNVv7BNLo60KrKxWJqjmiTny1p\nnwmPWxxe9oaGvyg6HOkYFR9Yhs7taKEVID3sgDFAb3Anr4P9Sjw7YyDd8k+t\nvI4nsJTTbFgYKnpM3lXcWouTlrXsC0Ptt5pwxpgKM3H8U+7KfkQi5d0Wq7aC\na5QEBRdFQPAoJNbuz6NWhwe2CLp9+Lo1W1Zw6cx31jJiHt6tsVv0rfLW2CmJ\naA6u6fWKwjrkaRzWIpnkvBJ+4YrxFGs+wVrKMbZsAv42zgFDQqBcwEKDci34\n5BiXwLlxdg3V6vpxHtkbydeKMl3wy0NeRXgWIsCJ++DY0mS5n1Zd9jOBCSGx\nedBnNFeMDbkKyifsCXgmAl7ZEAkwKeTAmButlZFNfx4ROnUVYsiU4Wiug1E3\n8SawuowHZTnltaW2zzZPj5ryE4rirxTNIj3O3EN3v1okEHbA0hfQ+1JiRhlp\nmJy8jhMZA0ELeTjLIFdWFEdA3/UGkqgnVJiufKYfOQeKbSVaMqxR9nqFpzbd\ntIYhM2WyUSggzHWxuUNkEOJ8VQTrvssG6S5V7HUZ19CRtdzd7ahtgqdPudOb\n6NeB\r\n=w9Ls\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a9698f72abce3fee1a389c12e6cf49c27c051618","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.62","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.117-renovate-major-socket-io-packages-a9698f72abce3fee1a389c12e6cf49c27c051618_1619673649013_0.978036659256984","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.117-renovate-non-major-994390b76af0346abd93b992712c464c8bcbf0da":{"name":"@balena/jellyfish-client-sdk","version":"3.2.117-renovate-non-major-994390b76af0346abd93b992712c464c8bcbf0da","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.117-renovate-non-major-994390b76af0346abd93b992712c464c8bcbf0da","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"328a5f14d08d7569589d2c8b625e1329d56fcc9d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.117-renovate-non-major-994390b76af0346abd93b992712c464c8bcbf0da.tgz","fileCount":39,"integrity":"sha512-3Co4WRNI71FkXeVjaoWleXym8UaRjjr1+m6ud3CtTzO9r20qWqw7CGngzwnzMOAyqoi8asXxLm/HmR8v5DYBBg==","signatures":[{"sig":"MEQCICDMF+U17AUT9JG+4bW/YAu2Pylg186TaTdyFooimS9DAiBhWH/XepSXkCkCrKvHvzfJuZTW+ux5MgabozFHx4NwxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiml6CRA9TVsSAnZWagAASMoP/0FsdpJ/b9+idupKEO4D\nm383rSUoGZm4FqvkDRwFAfaVr6P/biYqaK0r6SarsNLA04FCg+IpPB7FOzuT\n/KJhV1+pkMd0wWDG47YHDcwXV99CCAHcYVWIpKyhF2Xz4oLIivBeAR/MDhWp\nFO59sl9nYYgYWSCLffp7T9W0Hd5YQXstJBCvnNHx8z/VqLfC6BPlqKN67QOf\nW/JPxzCqIGBa3ERlSjgVvsuMLzDmXbuMsWZOUlNFU+JCqDQANNfu7yXdt/E7\nQS3dTL2svFB3Od/0S2hHfUcU4ir3L642bfHG2LZm1RlSnH5imDg0lKMgLKns\nk6jygDUpVLWd4+WL/DvM55ID2ZGtiY0VzF3QP++jMdJlTjoB2Vd91qukFRnT\n6FNS+YdoU6gt5ooj3BmYq7lgsUmx0jiYRWEys7a5V8qPMQ3zjah8aCscZpqZ\nD/V+Xue4qyfqNMKJj3k08KgApOQTZdRisHS+SleBNxhVIHWbpcPsYc7H1nNe\nB5LM7hSMInMwEm+ZfkGJ3eiQlhU0jyQY5obzwXj/3W1sWdLFGX9CAx0Lwhoq\nxJKvhCet1QoopIBzWhzECaGju5V0n7xL5492+wpnZT5MOQoWo/Z32tqvv++o\nzG3h7p95w+/orRiu+ujbHzN7ZNZ5avl3ZcHimaLn1aPDs8Pxc7OmUY6YN0CB\n6c/6\r\n=+Dz5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"994390b76af0346abd93b992712c464c8bcbf0da","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.63","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.117-renovate-non-major-994390b76af0346abd93b992712c464c8bcbf0da_1619683705629_0.16590894131110412","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.117":{"name":"@balena/jellyfish-client-sdk","version":"3.2.117","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.117","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8feda38cec70993f11834246a4e715cbc282bb32","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.117.tgz","fileCount":39,"integrity":"sha512-m4G6eyQRdCx90LPpKtI1/4NEjTo1pxeMTbDTQvkfZsRiuxSUBetV44eih/6ioMOstk43VtCP8dPKoIHfjJ0WMQ==","signatures":[{"sig":"MEUCIQDqetHbK3FCgFKdfM4RUG9KnPZn20maApaJ79gqdj42ngIgD/luIjIqvvcUZ7C5xz07vABnmzuG2Xf0UN7Rr//lL6Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgimqSCRA9TVsSAnZWagAAbWQP/0pXa8Z3PVACpLHZuXpc\nYa4nByp73lmBXy2Ocme2vmP99w1ZoUvtfc3ecJMJLoPcDirDTaa4xqnJkRTl\nagQPWIcGzCSL33DDyWrbBGivtkbZuzEXd0qcGFTAtYjBmYtNdFDtejPum9Tu\n19ypt/oExdrtlU1ZSxnYPyHd/ap6zgw6GgxMWQanudttqu1h595QkO50c/xV\nOJJRpPnyNcs42iXWCkrY4ohdMEhddsXqSHKxKGZmHwt+O5dYDiJmDYUnjDM0\nqnbbkY8KYsfxQJIEPKDavI8G232cE3lkeLLb+yZmgwEuen1MySxvzuCqNf3O\nVG2ZKJ3ilZiHl5Br4a3QLvrTjGNq7TkVZ6KNWUUGXsb1QEz0iMIc4cteLuq3\nM2oVJgnu+iU2AjO1HGBwTkdJcZXG800h5Wvz0WfdEy0hz2UmuYikvpku45HQ\n31s6HpzhdvC57eMeZP3IFaYrTWb0wSKyP3WpH/siS5X2X37dFn8yT+eCQuNZ\nZVpR/fMFR8IBJaXw5eFWOClRymeG4LlUmhfKZMnvoF6revnneKcX1DpVWXqp\nb2ddxXKM0nqDkhYvloqzkGjCmN6uomYGTYqjUziP0knotmq8lFF3DSp7jfb3\nVUTcs92NIkSa31XIhu3ir/18SUqSRmJDz20JjEbdw7LqlaB4FKsVyqMPdn7g\nKzcR\r\n=dioh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f01b1aa83ba1fc848284e807fcb5a1030012348b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.63","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.117_1619683985565_0.3702871207699123","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.117-renovate-major-socket-io-packages-c9b6867eff5317a55dece2da69731f2d7678a10b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.117-renovate-major-socket-io-packages-c9b6867eff5317a55dece2da69731f2d7678a10b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.117-renovate-major-socket-io-packages-c9b6867eff5317a55dece2da69731f2d7678a10b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"647e2b43babe50f9707b9c5663dcf090689b9743","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.117-renovate-major-socket-io-packages-c9b6867eff5317a55dece2da69731f2d7678a10b.tgz","fileCount":39,"integrity":"sha512-TZ/I4z1+P8ko5zQSuKZLQ80dyKCXljgU6aXRley+2lxeFXdz/dG9SDOgSDBLXCLxu6kC4iGxUqUAm1MyfmLUzw==","signatures":[{"sig":"MEQCIBVR8ilugCwF8E4fSp0f+rNQEBybQSYaz9BRDSHtXh4UAiBRb1ujk5kYctuIZVr96kvMOHO9T8KPYUkLBI7UaLQUWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgimscCRA9TVsSAnZWagAAl7gQAIcKJL+m3LWg/1iF8J8G\nxXUPQ1AMJ3aBQogaVRLDdtwqUUAy5i3VUH0q/tj8cNx9ARyXNXl0VEH+cFYg\ntAl7XXFaINYArcrMcRvTCAYP72MPZpNxCvJTbaVu2HZQ04ZZdJwt2VXQHBmy\n5F316za46EFZZfUXIphZHus36Hg2+2UmthJOev8tx24+XP7Two3uRuPDBhrV\neIeXoDRPAQ/WVFFv5v5urWnL6ZyU5iq5vdsAL/2+yRGNpry3InctgDMzAuRw\nBXPZ7jglr3kbWaebEG77OnfiqqBrSgf/4pkUw09ONaBHt4/b8mp6AaWyF43r\n6KI2AsISbJx1kUL51voTnq5kzmn5h+ieA/0/L8b92oB78eFr9aJK3YTia2VQ\nCNJmN7WcO5ULjx8T2fsbqzSrqki3MIWlIEMJcTKLr6pgkxpa1btYpMCBwaU9\nBywmetJ1qTYl6tdpqo6dOH53VcSKQolQmNwfkUseMw7kXutldN8Osf6m7hve\nczuwj2UqZfuojY5vF1YmlJZYt8wtKbh47rdJLrurTVwEn9TFegCKt+5BicYa\neLEJPpWlMhMmQUjmvlPBtWetDe0f3xDH9sFKIPLt6QVLE7HikoBoB4PtE+yF\n+2DYkZTHB943BIMXehadoN39uF+kCNtbmvlhOTVinnMXma/CJ/4hoB3nqGnT\nA0Yd\r\n=4Z9Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c9b6867eff5317a55dece2da69731f2d7678a10b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.63","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.117-renovate-major-socket-io-packages-c9b6867eff5317a55dece2da69731f2d7678a10b_1619684124382_0.7282241783478589","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.118-renovate-major-socket-io-packages-b91095e2236d7345eb91ef1f2717df1fa3266f07":{"name":"@balena/jellyfish-client-sdk","version":"3.2.118-renovate-major-socket-io-packages-b91095e2236d7345eb91ef1f2717df1fa3266f07","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.118-renovate-major-socket-io-packages-b91095e2236d7345eb91ef1f2717df1fa3266f07","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"602aa88627c3a58d2c5f79f419e0a5ee2f4d55b4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.118-renovate-major-socket-io-packages-b91095e2236d7345eb91ef1f2717df1fa3266f07.tgz","fileCount":39,"integrity":"sha512-ctTpOBegZYIGh8Pe0re1RWGozJSpXAV4kPZAS0owSTNINQW7Z9Oslwcj99Aaa4xkdsIoz5EV0nCP1fvUCc9eqA==","signatures":[{"sig":"MEUCIAtWNLVAMBFDudwBagytJ4s1M1CMY/rxFGOshYpLx1aHAiEApafyWvJFGc4OCq1KwjzFzEKkKBUvlJ2iWRbdW/HKgUY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgimyLCRA9TVsSAnZWagAAP98QAIU35hYPCmf/0RU2Xino\nTnKv1wLgrvLw5gXUpB4g1nIj1SxbwETyh1oMrmGI7WD04mqODl6gWriBe2fl\nfWCweWqP43+/8yPr3cLj+PeYwbmlUARavclndKfDIlJziMiSVd2vu8HYGoW6\nunUQOJ/KFOgtQ8RlfSWCR7alVsJz36t+cDCISL3DMBMK9tXwC3eAWJElLink\niLk/v1ZtMiPi+CGZuX2eQBHBpT7oKsYqnDg3R2U9MeRd5nV+sUn/xKd8sAwG\nbye3yWipnROak/CklB/SXHZxxEn08KpFD7ZfD35r1u2q1tkwaOyOcJnzYCDF\nFCRXoVg8wWcvtmaD1qBYA4c3WS7jITqb2cFJM2gNwEF5ltSAEhsmHDHNAuGi\nH0g7TGBHuQxb+OdWijZLESu8b3B0sgV1Bu6QHRJf4GrAMwaGOysqCDfqc9gS\nVnf6v9ZxJykq+EncvsFs6YhyyK01bMUS+DDGWqGlppf7ykpqUarNYgVW2tQk\nG9XwH39HL5UkEjiGJmD28kvU+tVXhQPCnNPm52SIZ2MADJvhYGPQ9389wSEH\nEfV/4/rx0DAifhIGdOMTOEBS6ox0g2PqyLXWmqwVKw6oYBdm10nw53MCHtqB\ndiyMRADIRmSOM438SxBeGL29bG9MqDYo/lPa7LcNLOtqRJVyQGDLaFw36Tnn\n+B+h\r\n=CxFX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b91095e2236d7345eb91ef1f2717df1fa3266f07","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.63","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.118-renovate-major-socket-io-packages-b91095e2236d7345eb91ef1f2717df1fa3266f07_1619684491473_0.003921333380138892","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.118-renovate-non-major-c129d0e780181d6d19d784cbd3f35fd34b1e9bcd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.118-renovate-non-major-c129d0e780181d6d19d784cbd3f35fd34b1e9bcd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.118-renovate-non-major-c129d0e780181d6d19d784cbd3f35fd34b1e9bcd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fd7c9b15a32138e1b448c359d3ecc2da623cf1ae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.118-renovate-non-major-c129d0e780181d6d19d784cbd3f35fd34b1e9bcd.tgz","fileCount":39,"integrity":"sha512-+bw4rWa04Id5B+GNl4eMzY4QUqTT2yCoCb1WlxC/nZ9IQc7JbmzltZjbPi3oe3hkPIj79zmpTl2Uytm5Hc0sXw==","signatures":[{"sig":"MEUCIQCUPgs+Rc0i+zDIg598pFG7izCLDKwarhCdREJNw5D6xQIgPtKWdZX2k4WzjHPyPXudFHcMQmT4+xzCUcePOA8v280=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240987,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiorCCRA9TVsSAnZWagAAE1gQAJu9O6Gwh9ea4XYNJrZ3\nF+49xGo+xgVZq6bazFUGVS6EOT+Ju6D+UKHKbwx8j0HhvF3bJLz76Cx+NJqQ\nsIL2fsN8tw+QmaWOQT1l79E9s7sJFWfDsImz0Y1fWS5eW/W8I+TH4wRjh0Ds\nGiDBDOESl6YKZrSplYUJnNfu8EgEj2E0J9nBpw1aejdTnLIQe8n0SarppI5f\nyCNjv34IuccQoXZ98SPSiz043zSit2T3jvzwIuf4xNdnHHbrwYCp5cEfgGrD\nj6GPDrTUX784DtVz93nEhEDRNc38z50eQsSXC6IdcFyUAfH7RoYCYqA2lSCd\nwNyMA/z4Hzuq1EjESrH5ZUuC7XhzV6LmTsgpVAxC77ERGXa+jBLSR+jymTPV\n25tHlK+u+t/7bLzkMvMsvduZF5s6cwuhv3x/TFuqL3taNxF5J4bGIJnb0e8H\nYqwFLOxxkq6Oo79iQM4kcjv0GcymyeLX4a18y+CNLbSURaPSaj669pCR3Tz3\ne+wW1pLJBe7CCTSjLwhbM5JEKglCpanZ636TbvTIeho6igDmn8xvA2PXWT7y\ngr4po1oDQx5K8dPe6mQzyNtBL5LymfQqkq0rDkoerIiCeaggJcNePlVBMUEk\nDXmzx8KMkcdbB3fJydaxoD1yHIaeQbo3BN5g6nsdyCkS++NzPYbjLALN9AsA\nKPtT\r\n=bNaK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c129d0e780181d6d19d784cbd3f35fd34b1e9bcd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.64","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.118-renovate-non-major-c129d0e780181d6d19d784cbd3f35fd34b1e9bcd_1619692225908_0.06743429319881855","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.118":{"name":"@balena/jellyfish-client-sdk","version":"3.2.118","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.118","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5b898285b768542f5e3084e9d6b700635066738c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.118.tgz","fileCount":39,"integrity":"sha512-5LXh9J0zLrmkLJ67ZZQvOuAinaqcOMKYGotzJ6LczNUMizmIk7CxA1MEpOo37uNpLvAIgWmmu7RPOuAe5O53jg==","signatures":[{"sig":"MEUCIDhSnxvyXvuTk7FhNCw/DzHyX/Fm5bmUR7k3Zm0Hv/6vAiEAviLy/3qYi9rjeIBDQiBz0x8cQdKYNd6JDF8q7hKrehs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":240927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiouHCRA9TVsSAnZWagAAPmoP/03hrID8fQeRza+dt39m\n327UCh+KJCGVO3HLQdOpbCycOxh9jTrBv6tM1lkBAl1lHmj8XKHACQstrvWi\nelkz057cfP3el5pX8rwDGTQa3a7iiQXoLilAv3aRESi4CboIvJbMBHJ9Sywu\nmUo0NU6G3+bDdDG1KV8CsupZtwI2ANhBJgiNqdJqTn+gFlqxMSx0DpzmJVpd\nfk/B9uQVUEzIirlmee/G5YLQBMdbvmckLNuPOCDNXE6pjCxhAf99Qr7Wp2Db\nCsHia7Sv3S/P1vCAeo1wVdlynF/YNY5E07bo8FHYQjlL7Z+l+NLww35VbCHK\ncmQuuoTitvIeOtYJ7FvFFMAql2Y/vYxj/8Myetnqun9eaKOM/xZ3OAyX7mJg\nG2oKvMsUDgY+dp1KYUUKfhtTqGXMguWgaOERQXpF5DZHovnH9hlKWQyeGWgl\nKGyU1SnjsFNl4UXOvpdpxNWKoSxjJ3X2F769zMPWwbLVYi+ILIJ+3p+RRtnC\nTITIf+3MCHB63fOnmRlrM+k7ESe9+6/QaHW1TqURZelG06f8kLgvFZ0fTrNl\nXAzHdkb+oCo4fUNoehnizUKBpQPCMWvAXyQN4YT8/ziWGc92lHqkFBtCU0XY\nM7z1IPUlksYzfJDlpbt5GQIYHBSGGYN4ZDt9Vj2xhX8hpixX/h+XckrqFJQI\nRjzl\r\n=liCt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d76adb3a43af64a5a8eb1a69d2310b22cde8fce0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.64","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.118_1619692422646_0.7729450655899293","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.119-renovate-major-socket-io-packages-0eb4043c0625cd1f7ff6176b88790941b5f9cc6d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.119-renovate-major-socket-io-packages-0eb4043c0625cd1f7ff6176b88790941b5f9cc6d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.119-renovate-major-socket-io-packages-0eb4043c0625cd1f7ff6176b88790941b5f9cc6d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e04d7198c2580844197db15daf1cdae524ed9522","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.119-renovate-major-socket-io-packages-0eb4043c0625cd1f7ff6176b88790941b5f9cc6d.tgz","fileCount":39,"integrity":"sha512-8oyrYuSDh9GsVFM61whJd7xDbYBmvOWM6Ab0HBvaWIwXoUCo0hBgS02IDDd+jBHKPOKhWLk+y9wbo7zedJgBaw==","signatures":[{"sig":"MEUCIG57HHYb3HUiqNCXRRSI6N+R0Y+BGsaJBFwnSMTKDPz3AiEA42QhWHVJpCRqN+YC18MZ6VokDfnGV/p73MLHOKl3g8s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgioy+CRA9TVsSAnZWagAAx1IQAIMsujDu+K/VFwH8vDo7\n7gDwea1Q6Bc5OilRDFMhmL29SPPE3B/hzAer4IrUS22r+2tpzTUTFAla3pbs\niAFAZexRIGYvi8l52McsHtcq24rLp5dP0mEZUIUsBNjJCXs/9kaehiLN0pLz\nfZnAMbJlbwk882TS2eVC7ALk+OYDrFLqf2rfXFcw11UQXWqdFF12O9APLLxt\n7I0Yx4hdC/s2MPaYFpT6NaLhHlR23pc9AAaKI6nKL/D3FATPX6i3AW/douUH\nsi+N8MG4ds8pwKCPLPtveXz3zCMPNeehZtEVM64Z/gMwx+UW/caxel4DmDq8\nWDgcz3lZRjmKeD+Rbl+i0VqVagT6+xL7gdvvW9BDqtpMjhdwR3nxvWY8F+Ob\nOyr6bu4Zr5aWz4VtsfXEoP+AkYU41QTkR9dkreQ1uV0VRfmvdMol0pqpcfRY\nNw+9GGZRMRi4LnSMMVwkgxDLA/Bfz58jnOwZBdlzAaR13fCsISmlvvDE6A5h\naKqovaJMRvnZuypVtB5g+U1N/mQLZSa3WYDuNF+kOU93G6i3LjCt1Zvha3xb\noFZYTOX1y0Je+7raYJ6UyjPOZ9Gb89UMVapCw8riv1qnj9m0CnGdhcOA0oQ1\nTKW3zKLWwmSfucRuADoGn8aT2HwY+PdCutPuWPpZszo1lLVj6rkmL/1AJovT\ntYPs\r\n=Qdr9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0eb4043c0625cd1f7ff6176b88790941b5f9cc6d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.64","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.119-renovate-major-socket-io-packages-0eb4043c0625cd1f7ff6176b88790941b5f9cc6d_1619692733810_0.25281523600856337","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.3.0-rmorillo24-minor-relatedpatterns-a3f3824d38d052d87501491d2c966d0a4309832d":{"name":"@balena/jellyfish-client-sdk","version":"3.3.0-rmorillo24-minor-relatedpatterns-a3f3824d38d052d87501491d2c966d0a4309832d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.3.0-rmorillo24-minor-relatedpatterns-a3f3824d38d052d87501491d2c966d0a4309832d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ab45a8db483ee56ae2be3fe587e33f822f510f08","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.3.0-rmorillo24-minor-relatedpatterns-a3f3824d38d052d87501491d2c966d0a4309832d.tgz","fileCount":39,"integrity":"sha512-U6h1GNR+tdkaP3q5PQvj8Lzz5VKJRUCFWsAvkPmkghMlvA0lHyo1UD3FeQWtyeZcMwghHUTzQgADDbOZrqgEMg==","signatures":[{"sig":"MEYCIQCvdn7LMuVsPM6LTnkILrtYbSWtGnlm7WCb2wBUJVKzPQIhAJhvnuzglmg/c/gGHeL3lIZ63JGT4at0uRn9qo08RmNC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgirm9CRA9TVsSAnZWagAAc6QP/3OyvVMFaeuMxP8Z1xy7\niCLGGszNWwlecxe8xeIlETbR/uCQB6e6sMg8XU6lt4NeXMc9mJParJfLXSuz\nkdFTuIA9itTk1lrKYP/81sYORwtGUIEx/Cf2DZHIQaxO2A4GO0hVgb2R7CnK\nFoIOx4/RWpo/Z3mzvN/NhZ8Xpi7ND8Pj672o3iK0eFfvlmT+3LNxoodEn494\nAt4UQUhFOK5DE9wDl96IqJY/5AwWJTBg9XQQx1JEGAsIwAnsFG33EmwlpVv2\nMaSmkjN5Fi7HldwyX3l4Fdgm7ILlF4CVdgenCW2pZXyteSc6uL3XMZuVNTHR\ni2GjyVAJZMdowTjf5tJAgcvQ+d1BETtRxiZ/QwRBgKUanHiPif5rr0yau9gz\nT+P/8u785HtDP0LSlCBqWdTQp8kdLOnhDeRqkTt8vWjmvDMxjRXGETV+QDXu\nOdrHEUY350BkLRBsZmz232WoVKNoSWwizsukHJ2hHUsVkP178z4Ac7bdOO3z\nk6LrsixWnCUwXRH7AapTphB7atl7KNzUNuur+HYJNo+yaiL2G9RbEP2Db4+S\nGo+wgl4aNC6VY0yAD4wAGoE+w3mc/2TF5OaLwRMJQ6hssGeGh55y9QCDlwey\nMOLpuhyjn6NoXSa+ll1HXJVjwbgXtsGWKdjH/S7lfSwQJJxCV3iFfHqIY557\n0HaX\r\n=sywU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a3f3824d38d052d87501491d2c966d0a4309832d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.64","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.3.0-rmorillo24-minor-relatedpatterns-a3f3824d38d052d87501491d2c966d0a4309832d_1619704253492_0.7162431450144418","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.119-renovate-non-major-a94f71d19238f4fa9ab537d88504120616e788b2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.119-renovate-non-major-a94f71d19238f4fa9ab537d88504120616e788b2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.119-renovate-non-major-a94f71d19238f4fa9ab537d88504120616e788b2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3e51e7d29c5ca693b3840e2aaffd16cc6c300f00","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.119-renovate-non-major-a94f71d19238f4fa9ab537d88504120616e788b2.tgz","fileCount":39,"integrity":"sha512-/UldnbROdUR0kRNWvl2CLWr0zXxkJFXiQAtzAw1iPKIh1nBmPdYWDygzz8yBHo8K3mwBY4dnUszu/B4FEidODg==","signatures":[{"sig":"MEUCIQCVpz4nZ+KHZSbX4L41apH82bXanSOIoMwtGQHreIUCjwIgJ+3PcLlqjNkOjjYrIXGOXRajUIYTuP74p2XKzACmehE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgissXCRA9TVsSAnZWagAAV7EQAItdf9fiQynhui7CJtUI\njBJvjDXQb1sqX+VezulI/EGhpoBX71hdf88HRCo6+9VRXD59Nw51tDsoWsEH\na+Dp6C3fvQ4zN42H0esYoraOQLE+BKdc2QDbE7fEjALbWsLZ8eZBe4MCSRDS\nvHrFQJV9KJJjmWvAVVC4ZayoigylPzVarXhyC5uTLG6t121BWSBmooq9+iN9\n1s6b/zpRwKjPLzCBYukwjKo2a0GK/VumD2QCb2o+qGcHtVxm8wiAFmZx+ORl\n6YkBH8a6f+lF+1fluBLnMmSwwoe+ZAystE4XWY0/wQnIWXgQb5nnSmJkzUrV\nRDnTyimnVb/7NyuKVI7Gis0tBm2hs1vblpNWFmS1zJNUGiDhdFfXk9eAEysh\n19d8xiZj1z26lLlOh1UGWgTd7ADvTeDTZSXI3VBcmKoU5Ona1S6t1ek8Ml8L\n278tc3kI/e97LXC3GFRDQm45Il9tg6vFWB6cAEsPQqsL4pfjyv92EKxw8JiT\nZeJuFajEE+lrhMPcdzyzDi5MeU3SJMQCjaSJAfvHSTJvESBHUgCNjk2kF1U3\nSzATKn50hHKFMFTsW9yfudM399WtKJOo//rCuS7hBgFUZjBjFjJ6aBrbPLWH\nQhJvMPvCHTbwyRkfmVt/EIEQQg1hHrDt5AjbQJEhGA+XueGgooymJ7R/JUFZ\nMEjj\r\n=x2EV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a94f71d19238f4fa9ab537d88504120616e788b2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.65","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.119-renovate-non-major-a94f71d19238f4fa9ab537d88504120616e788b2_1619708694617_0.352293039728242","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.119":{"name":"@balena/jellyfish-client-sdk","version":"3.2.119","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.119","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d7bd0eaaf16e4655409f0a463a9063490a65eeaf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.119.tgz","fileCount":39,"integrity":"sha512-XY0c2LTKHxQdZWrV4+f4dj4UpOZqE3gFaIBNYWby9l+Jyed6dh/dnvDB7edtHiBSxJWMFcNR7qTdAx/9e1n6eg==","signatures":[{"sig":"MEYCIQCq/UlUQzKcuNeKkPzmqx5msKrNso1sEGAdnCXiQZzhsgIhANA+K9DErBawGS4LmLmjunueLDAQ2S5LqixpnxOh9hcw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgisvtCRA9TVsSAnZWagAAuvkP/ij4TwVuRxmdRrYBZNEy\n2ib34l7M/AGs7wdiq1n7UJaDP6T6lPuSTIfvuepivxN1f2fj71MN5P8WIes5\nJUxlrsQ36cf0xZyBuoQxlL5gVolQ38aL4Kd6uLyr8I8BoshZSkppBu3qGWP5\nDB4775J1+evfFEIBT5zTCXBnPtTxU1U7w0h2dGuvB07+sbB05T+xfJ8ettac\nr6QQWBzMt3EbKhZCp5jAF4U7od9Um9r75nwqtF4hX3MABtt1r9G8eKnPC/3d\nAJLUs++JFe/bCygLGlNGGLNCs9+j2AB6+fE1jA5TPykeXcxAtU8yEMCx4MC7\nhzWDvcDZYo5LdxZQ1FxsCnP8sCjMlXXL6qDA+kjNOs15lDGTPuHJFpCaGI5u\nqg6vGc8YyMMvyqPIw8/RTHTeNDNGRoUuqUBDPwOu6N+jyGBROaZZNLkXKrzG\npHv10jN/JLKucD37DZckxXKpZcKcD/1muT951TLi6zMBPy5OB4+q7CFKHTLE\nFgn2CTyXrzBN5j8NAvrzfQWUMDOQIu9rZfkGEoScGMKEIvraNbTOqj/1aRlp\neqCC+tA9u7BHLajNZ4ah87v9VkffmAltZKc7a+NB0unugNsEslUhNP3jVg7T\ngfCqO+EZihPxCOcpKXVpJ302OtsVyW84/EN1W6dawp9bhUqUHI1ecTUNbpN2\nQNbE\r\n=uj9D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"151517a55fcd0ea4658026ce59180d7046f962e6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.65","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.119_1619708908885_0.8724258006582035","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.120-renovate-major-socket-io-packages-bb4268f49c9c5dbab1ae9fab982b403fb82e7065":{"name":"@balena/jellyfish-client-sdk","version":"3.2.120-renovate-major-socket-io-packages-bb4268f49c9c5dbab1ae9fab982b403fb82e7065","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.120-renovate-major-socket-io-packages-bb4268f49c9c5dbab1ae9fab982b403fb82e7065","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0aab56b7b020b2bfeb65812ea380e1cb55275575","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.120-renovate-major-socket-io-packages-bb4268f49c9c5dbab1ae9fab982b403fb82e7065.tgz","fileCount":39,"integrity":"sha512-Lt3PLTtFVOYa9mKUy792cHgKcG5+WvlT7ivFHGrly1rDCrMZEl9TPbfE0ON8G4ni8ix9fdzFhSLn2bhVMOdqQg==","signatures":[{"sig":"MEYCIQDqlXgkO/B9+dtsyE1P8Rczk/WFEbcI5McvdMbFXt7YRgIhAImPQ/pFs1gpjGO8RcJZ39k594DchBNPy+cwNB9H1nHw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiszRCRA9TVsSAnZWagAAXAEP/0z0cCdoo+z6G41cDVvS\nYhzg4xPNkvxjosHgsoCNx7/QxTRXkTm2sVbn+gmmY/6gUJCt49bY0jsMxeaM\nHBbpIwd8sqleC5AQ73JVIu1X4XlIsfoYuo+dyN4y9Hgd9SKPQ99Z3z4j1VDL\nruDLes5ijImwNdgV4W6VzzgYvvghvB1T689al6rraKh80JV9+P+zAAhCx0W+\n9epK/P+PNEVBWkxgyrkvxW4Y6K6fBsDXlDwUI8BYUM5d0ufjkDz85DEWlZe1\nhNW8Vak17BAu96mQR7G6D6QeQfjsN8qdAlkjDg2MVl1wyYFXN/DQ/Ym1mL+f\nr+UHnPrQUr7txCupj1KUuIo33+suoVbQvtjN6VaERPOEWhJlxa6qOLY4LraV\n+XsuFC/QcYU6YDI3PCPnZn4lZPmD4K+nn042E76ssDEO/kis4OLFspzvWWnp\npgXW4ZgsN91h+cS9pVVH4Qb046y6XkWn/QsVtMdwClgjPb6Bfhs82refSBWv\nT+dOFB0rfny0ixzLoNlSgercc9QBoZFun7pKVAp/HoPqsghW+IiclPcXVy9N\npF2PqzdAEVb83iN/tSuADaAxmxhj8gQz8tOPsnU2hbz+Uytoo9IaOra3wq8I\nDRCHfsm7u30x+gq3AmJUzT/Zb7zDQULBh5WC0MUByYkc7iABpXGN3SfQcgjH\nnVyo\r\n=VpEr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bb4268f49c9c5dbab1ae9fab982b403fb82e7065","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.65","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.120-renovate-major-socket-io-packages-bb4268f49c9c5dbab1ae9fab982b403fb82e7065_1619709137134_0.5351090007790023","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.120-renovate-non-major-05dffce485b3d6024f358f018ea611e76922f21d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.120-renovate-non-major-05dffce485b3d6024f358f018ea611e76922f21d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.120-renovate-non-major-05dffce485b3d6024f358f018ea611e76922f21d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"44f0830adc4c621170abe9345603a9d204ceafba","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.120-renovate-non-major-05dffce485b3d6024f358f018ea611e76922f21d.tgz","fileCount":39,"integrity":"sha512-WOHP7AA4pOZ/+b/cJI9OaCS4D0RMpX8kj1jM66PoYjLaIfqIRqXPLziJwA2bq2f+uarl7UTDZ3unBFhAQnrsfA==","signatures":[{"sig":"MEUCIQCk8J/RqADPQ4Z9tYQ09HSDZr1eu/NcD636yVXodG+rLgIgSWB16hjMguuC/2fzw/VFLYpfopPVY7MG1OrnIBgt1fk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiutdCRA9TVsSAnZWagAAiR0P/1smBXJpc2MDClxYZF+h\nr3SU/F3FTFAnGrLl2UuVin18zTMpSRncbTFZ8ih0Al3RmKjlnw0TtpiwO796\niG56JZeUh7yM9PD8e+dI2ik3oAx4xbXE9bC0dl5o3dgOQRcCpbUX0sXoc1B7\nVeLlfYed4wky5hqYDDPuI+m8+03Ul3wGia/EIGqlU7CtS8IoyE7YuhVp242y\nEY+/e0HBnrcf2TlTnifrSHnFv4gOpHmIau/0yU1GKVT4LCTm0g/XYxdhPDAI\njkbdS+h2ZTPgJC863pWCSb6qz6NUIDhv5jH+scU9F2R1k0hayXIHzLepists\nbYk5OibQX7jat4c4t9J3vu3coE2+nLa4PxKKcvSCAuZBjOmj1ASOqTCOIkFW\n7LlC4JC2BeaCfU85eV+IZ+kwMxo9PMSdKzkuo0NIApNQzT/8ZihbY74Uf24b\nxLhCKE7mIcIhzZa9E0x68ailikBlaLtQI5dzqMKhEB88Xpn6bjYbyrn8Kbsw\nL0WGW3wQT5ByvqmM8smx/tW5wF3/rU3Q+Q97votrO0DzFoOMYtTIbTIADBI2\noeNiNhyGJwYKj1cq8OzYAljbNqJdVsLC4KURAaaOn0Kxy4o/m2cFrwJ5IKlk\nwjdUvLg3ue8S2Oj6IkyXogmp5G4lYDYQdw4EH1GvbW4Cz3foWqO2GGtHcDvS\nAjoq\r\n=I3UE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"05dffce485b3d6024f358f018ea611e76922f21d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.66","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.120-renovate-non-major-05dffce485b3d6024f358f018ea611e76922f21d_1619716956844_0.42851133117473195","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.120":{"name":"@balena/jellyfish-client-sdk","version":"3.2.120","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.120","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7a7fa8279b65fa453a5aaf99173fcefc4d30cc21","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.120.tgz","fileCount":39,"integrity":"sha512-WYGEqlo+f8rb5LZAeDUOravBb8Z823QJ4TQ/xtX0EkRK2yZS4UL0iZmKsYYjXlpiAlN8sd5L8N11KUcLDe+vjg==","signatures":[{"sig":"MEQCIH1xBH2fH/sV69hmRhxqBDG5Rnpz4S4o5Zn2yHgoVi6gAiBbr3pN2Yvb3DV9z1JWmDqYAP0zKl7p9xLRM/J3m7/8ug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiuwpCRA9TVsSAnZWagAA4QwP/0oBeU8zIJwBs06aArxN\ngVeeb2E5QOYYfbTPLO9voQ80qDTpFB43ld3/EGyrySag3hnTsfcoPwXS78MX\nuUYqgMJCDZjupdHX+xywk+pSJ9iHVtO2mB46fcRWQy8O0AQQJGkl9yOWHBhy\n74KH55EmzaK/Nyw9l9jIqjYkK1+7WlY9ocXufuwwaWaWJE5nK/FeHsuIsuPB\nxJc3aIzDNFts1Wx4OKwFX/DG2fKhp9xDAMEbRz1wNdB4kAK4pAwBVXMtmL57\nyKQkpHCgXf7i1V/n4Q6rsZtuZ1kLVDWZSsHSAwOjP4gOZLWkV9l3g06P2Xy8\nDthMNeXtdNVZAdaJWJtk6jVdWg0ruT9waklQPB9e/412vgYllvMj8O3PyZZO\nS0wfaL687aqc1pahHoiJVnYVsD2fJTJeA5LaZNf2FzxZIpPbUlM76OjugCyr\nYFsAdNo2c63/w/wQIomV+DFpL7/3bjjm/ohICQPSepxiejdTzpWtLKRNlJ3R\n2muQ10FQ5Z4p0+zmIHjSeO0p7XYze/qKV9NPRbHW69+E0w8u7HKMemMT3xue\nLcDLnceZ1pSSohuj5w5UsKJ+KtawZxX7MeH37LFi1lCAKCRjDdQ3VYD2ENmQ\njVAkWsRyXCUjUtQNvo+dzN3jSKojVmYnNjNjoHIGzi9MGACQCKLKdQ0vF5Ms\nhB1H\r\n=QovL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"708587df7c4133bb2e63a90a95a66e99f59c3fbb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.66","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.120_1619717161392_0.05391827075068911","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.121-renovate-major-socket-io-packages-f13f20d8afcca244f4263e2729eb1868b278770d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.121-renovate-major-socket-io-packages-f13f20d8afcca244f4263e2729eb1868b278770d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.121-renovate-major-socket-io-packages-f13f20d8afcca244f4263e2729eb1868b278770d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"20115a2fd09c2a695e7db052fc614db61cc441aa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.121-renovate-major-socket-io-packages-f13f20d8afcca244f4263e2729eb1868b278770d.tgz","fileCount":39,"integrity":"sha512-1aFKSpJK39GcL/ZbDZsri4tf2gHfO3ergBRQj6CH2z7xTgbf03KvWcEhg5a37v4VdSUQ4byuVv7mjusxI/eLCA==","signatures":[{"sig":"MEUCIQDxLLZguHsraGhhAhhal5J+TebT+DtEu8/FkPTtgiej+wIgW3zgdOFmWvxUQOLXjkT9r/Uqd5c7PPkSs5rRRsFZwjQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiu1wCRA9TVsSAnZWagAAXYcP/2v7hpYPvVJPPh6fw2Qz\n0lCdbyhB5FyYeZ4ty4ECEBRN4ZI1PPDZ3ztpRSUKXcd4OW7lSD8XZg2dmbQv\ntW7M+/zgMZh7CNjG0XxqbqCK5H+7aaDg/3NGfgAMsyVIBZmTa7GBL9MRp1S5\nJy7zpSFXWnTqGVtJs2tOjejxG6I+9pp5EtPOYTL0+lzfp2y3bzX8PpxV+DdE\nvRuqxTqLWQSqSELmsJgadYyWyDt4WhXWUidSwZc0IuQWkstkFpKCMpK6U7P4\nG09r4EcfKH8a3I/UAQIkaYJA4J9sRRJqqdo5ncaWpLot3rweLubxsqpA2F0C\n/LhisWwr3sLI9kTlJm5m04Prg+slH/BpLl0EB9MqkkOM3JUvqBBkSTYOv/nX\nOcccAndthq8lOmOApI1EzFY1zjCuDqvhWUp3kpfH2iL3eqf8oElvck7dze62\nIn0ew3DXiBqTEjZOTxUfPcs/cTnnp7oSgVzaGxBrzhNO0wuTGuzv3plSJBwy\nIpPNcO4IPv+Q5G14l3+deUrJ7R9lM5Xk/JFkYbF0rTvOIt/+XuYTZgvNMlJb\n4Zo/zzlkeu+/x2yRJ1UAjqjUA9souJxJN5pRshWhMHAOmBokbd+0VoxBw2Vh\ncayBW2N3R2kUuX19icIJpvKtR1FdjptRu0Xdp98mV6FnPu1nkDK9us1sLQzc\neWz2\r\n=RgTQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f13f20d8afcca244f4263e2729eb1868b278770d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.66","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.121-renovate-major-socket-io-packages-f13f20d8afcca244f4263e2729eb1868b278770d_1619717487646_0.0339272681424152","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.121-renovate-non-major-2d40fcff86468dc92ba94b448e27b45379bb2ccd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.121-renovate-non-major-2d40fcff86468dc92ba94b448e27b45379bb2ccd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.121-renovate-non-major-2d40fcff86468dc92ba94b448e27b45379bb2ccd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4d1e8d4a224a907d03d5abcb7fe669ef312c3cfe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.121-renovate-non-major-2d40fcff86468dc92ba94b448e27b45379bb2ccd.tgz","fileCount":39,"integrity":"sha512-0tyfivGDR/nfy5MRbG23P250+tD4oYAbo8FSELW1XE3aYU/v4/1qR7xWKG63fTIoLSTK85RVYvsT33EcKuZovA==","signatures":[{"sig":"MEUCIQD9z7IDHNOZlQgTIH2uq5igMwNI0fsgKW3bDJuARI5xnwIgRckDyVJSHl7dBJvl6bw1rNkvx3Q5GZ88Dri3u1ri2oo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiwMLCRA9TVsSAnZWagAAl0YP/0N9VYj9Jy+u2lwjOdib\njHDK5+Z/VMolxs0+VSGauEFCe9Qviu86JmvEt1YoeqsNpft8hffNnilkHLLu\n5WKR2AQcDoDSIhOzM8RDYDppjTwxSkufkUs+F0T4b8ar+sXWLAQNZpeeG6vQ\nzzE0G611t0ttP96qwkb+C77qdtcjteoFmcte6+Hptk91ZuXCqBD0yKZVlc4T\nvhsdU+MF1Qyfscn0/JUssDpv1Jvf09fUwWrPGtOpO7tntTZMyYpgd4pPXaoM\nZsBPWeKQUf3IGzGP2R1AV6JNftUflQQryoeTzFf1+ESCuk5n25P67OeKOwys\nBSyZVAYKcbo/cAIpovTxAravi1I50Y2mk+ia0F3z6PY1zA5zI2CVE3ZITZA/\nBhRUaUhbaWQPBLtSfx3U51zOYCtk8lSh9noSkSR/ZFqeQWbmqVFCqPpKqAT3\nviTxwQtE8fe0MDfvLWW8MdIK8rlVh/O+7kWT+GRSIbLtHYffPYjO+yOqsm4p\nqIzOKS2T132msoeS42wrFP3j+oYIRkU/XIUQxJXMtYH3rQ1SHO94cAzn+1Lu\n1A0wSYiF+kDvKfVUBKFBDDUtrjBMNkQ7dxHIADvYFSWyCHooXw/+7FubYPTf\nfY/j5caBqQ3bSBBlrNUkZETiTUhQ4mpQaAvZLl2AH3Pm2yM/1rVuOGJ6ceVi\nW8At\r\n=9h2U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2d40fcff86468dc92ba94b448e27b45379bb2ccd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.67","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.121-renovate-non-major-2d40fcff86468dc92ba94b448e27b45379bb2ccd_1619723018651_0.3316878546273485","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.121":{"name":"@balena/jellyfish-client-sdk","version":"3.2.121","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.121","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a9bd58165e0fd265db66d3c2be2dcd6e3f126860","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.121.tgz","fileCount":39,"integrity":"sha512-loC0H2D+OmhTN6bNpqZdnJdmotU7z+sBl2phSYBCi7bXdnYNUmZGl8E+Hh1Bq79MFGUIDdCB/UIpJBcL2xlDUw==","signatures":[{"sig":"MEYCIQDK2hHg6RhW4krnDK/4iQQxlrTPPtzrwJACwNQBi67MTQIhAMEcfqmpx24Wg03NBHQAA3sTGRk/oTseY0tRA0aB4i/D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiwPICRA9TVsSAnZWagAADyAP/iyptBqYHS3+90fzgfij\nQ1nBTfXj55+/+aqRNO7ktzDDEVRtlh0W01535+RTZBsUVXFk4C+h3Tm+hXoH\nveOtzGKQQZicKWNu3O1mTkS3kXMw2neZLVwFGsmz75UfzkZJjAl3JRf/1PfS\nuNAAP4/Ba1KWs1HTeCSvF6oblKPUgkc7yoB0YRnOpYuUqeUMIGrBsmZbsLkn\n15TJ6EUPt+7MDvxQmQYw/Fmrfd5wvkfLYo6gfJHr9PZWFz4ZB09O4kTI+Tdo\nlFjmvLweZdAy2rd4wOM94WQvEmyx1qOOixOPH6OKKN+3aitoqN93JKszM+CI\niQdXUwe2YRvvXNzrCcWMgsujexW/bQWMizeeY80o9ZMnaiKurd2BdnLklWER\nk0mlJ75GgwQ/SudfUO8wdBFMUrjVK0m2bPadT796hgIl1VSz5M3UY9FNhkpG\nVCmBZngbJkLNsb86F6s3b6Ths/Wk+D1LgprCnZ3J627iq8L2PI3GGbdx9Bv0\nNqjbUnVdhyumwEt6gU4uRoy5WFtw5k246vHEZUoreMwHVFlGs18Jk8EaC2tD\nc5mUHLO7+1+G58zMFF+0jJsoZY7Vk0NVwVD9AzWj6Nx1MQWNvWjvJqtWOzjO\nfHQIpP0h0zg8w4KnPbFJyKbC48cS+Ymj3CeyTwHT+A2hFbB9yK1mx/bgS82x\nGOQk\r\n=bS0f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f83a9a04adcfb4475e9514053c1734583132e6d3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.67","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.121_1619723208438_0.5718351361216536","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.122-renovate-major-socket-io-packages-46fa1274b9bded17128b85c9257ac4c6185a2511":{"name":"@balena/jellyfish-client-sdk","version":"3.2.122-renovate-major-socket-io-packages-46fa1274b9bded17128b85c9257ac4c6185a2511","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.122-renovate-major-socket-io-packages-46fa1274b9bded17128b85c9257ac4c6185a2511","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"215d0b9c48fc187fdc79b99ac493d3631a4bfb2f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.122-renovate-major-socket-io-packages-46fa1274b9bded17128b85c9257ac4c6185a2511.tgz","fileCount":39,"integrity":"sha512-Y8bAjQCEPXP13tVLw4xI22YamRXgIba5GKsaiV9pV23HXHyofgxNNiCS4mrRvuDL9kG/B6JmgTBih7Mt8wVmGw==","signatures":[{"sig":"MEUCIQDBIpmbaNIkG4MW1g5ZBeIHuRHRYsk50mgMSCvoiuCkawIgD22Z+sS9Hx7O8JioQEFjSYG42D7qZZo/Vc++UPaoqrY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiwUiCRA9TVsSAnZWagAA/DUQAJ86UnQa+u1x+lX8+TzA\nea0RSQWXwzFdqT4PO3ziTANBNLBklURzkDhcdpMopHnuhpTDygh9PQhWgFjQ\nXcUOH/Fs0HZ8lzhO2Usbcu9BIGvmgtGIjEEO/86bR6GAvuC2bKkSc1Vbc8GE\nk62zuRv8XWWAosPAu3Zn/tJwhWDFVX3viGJAIKD8uIxSIWJyXn37LJ0QngPF\njps/dTLavXXxQekzmNE/AUMw+3rgcM189ejlwlsfFl7BpVBhgmMl/ZLmL62t\nQZt8GKvt8ODstZDl8hQGLmJKCRK+8Zxad/kol/ryYYpA8wZMiAjOxbh1VLjh\nCpTJ3W6CQcd2MYs+mN0jIdnzZmS0sv972XkJvvKbbmAzgfY8r+UeNNfabGFX\n1XE8SpOeYmSGA9As4Bs9d1DjDPXBgOjLDFsKsVjRqKssZZLor1jzlbF1pIuu\nWxZ/kekwuP/UapeGZ9Lp51eb18Iy9ZXAVDmUFAurCD/T79iZsaQ4Vg9Z4yEK\nSDXdh21Z7aLvwkixU7F8eDZVFjo4cZ4iqgL4n+h70QWx63O0ytP2XbpNLH26\n0QFPF9d0AzYxDoX7owzTlGMB9lkgC0smT76rwI5Kh6BL62QbXt8ttHtBBR14\nafy2ZWy1S2AUgTQPvSXRIhXzNH6TcWYRiMhQdjWEcElPwqmpCr3iNcfpq71G\nkNTY\r\n=K6vJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"46fa1274b9bded17128b85c9257ac4c6185a2511","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.67","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.122-renovate-major-socket-io-packages-46fa1274b9bded17128b85c9257ac4c6185a2511_1619723554483_0.40362056531594637","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.122-renovate-non-major-26baae25e64c2721a935d33479d655a1fd31ce2d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.122-renovate-non-major-26baae25e64c2721a935d33479d655a1fd31ce2d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.122-renovate-non-major-26baae25e64c2721a935d33479d655a1fd31ce2d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"eaea719fe5de38e532dd50cbe5d35c687e55a436","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.122-renovate-non-major-26baae25e64c2721a935d33479d655a1fd31ce2d.tgz","fileCount":39,"integrity":"sha512-F3EUf5GpVVWQr+hOKdpBFJL6fWLwMJ2BHfjTiBY4AG3drmkVSBRImqpXvBME64rHftDOXWWg7dR4JQvTTSUJ4g==","signatures":[{"sig":"MEYCIQDuO7ZVZ0LYv3XHJvNm4fY4ELyDd57pwD4AVL7P/Hc8RwIhAL5Ri4m0nlLexUEmvdGduCoss5gLu6WXBHxwZRFv3J/X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgizhJCRA9TVsSAnZWagAAmCMP/3Cr/E4ngFVL3SHGLukr\nO64KB1SIx6KHBjFsZx4GZP3JMHA5IrAnXDyvMgw8gqNZHROaQVRBcwEf0lfl\nlhWGYi3cn7+0VoBCgr0iju/lxyCMzZRyGW/MT3HVsHXOAuGpHPq8u9yblgA8\nVYPvkGchfo44NuWKd2nrq3dqXFitBBy5EBPtZ8g99teTHTK/NcXgfzY0e/K3\n2KdY1WC2OaJFgyDZoPBXBhoV3WBc7JPi9Hq62xA+mjK2TcMvbOpKixFczSM5\nSOJEDZLeX54t12ASvA6+NeGEhKEJ9lRqy0UpKMvXzTm9TJkgor1uNsK0JqHT\nEMpuy0nKP6StFz2IUVq4yJAe6sBVphruwtW1G3s0CE2cYpWNH5OXLWjEXpYb\nLLJLoSqO64mLWWBGnFvvMxOFe2AHTnzxtb3QIrUiNvqFSbnIQzQsX9gIDP9P\nqoPZmEgq6UeMLnU4r14IofFI0nsbjuZhM99W+s8UNq6VcqYfnGn7W4mU86/D\nT2sgOkFySt09YUtAFpGMvC0lxmyibdNWGlB9rin1Y17nEcXuAIXW0+DAdfaK\nJq+QQRYd9+9lrmwQnLgpLC6CLb8Izi7ZG50NKkzf8fz9xipKwnytVM4zVgCc\nX6VvUwfPCBro9puHWI8MUTUbYPIAF85wKdpQIEs6bDE9CqpcG9BTrJFJsOwQ\ntOFc\r\n=vXVS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"26baae25e64c2721a935d33479d655a1fd31ce2d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.68","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.122-renovate-non-major-26baae25e64c2721a935d33479d655a1fd31ce2d_1619736648215_0.4940229150251776","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.122":{"name":"@balena/jellyfish-client-sdk","version":"3.2.122","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.122","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2fd096e8f1a0970d9a68f8f45731a0173219216c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.122.tgz","fileCount":39,"integrity":"sha512-VU5XfskEfOR3SSBdNk25wAP7WkuRz6yv6IliyQitMn+f7O8kSl7apAiFEuoadgJaftSRLye1gXXqZhBBBk0z9Q==","signatures":[{"sig":"MEQCIBXWpb/H+7d0CcasvDRCgYDS9v3+5KxCNbujEYif4+omAiA7fDJjZCLTy5XWcu0jwoqVRGSzFUwI38yI9ro4jB4UCA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgizlbCRA9TVsSAnZWagAAWssQAItPWy5PSLrbmUoXPOGR\nkC8285KCdXg5nZAhr77eetQrVjYuKi/AhAIbO9+8LvWWSX0KzNL9gn81NgjL\nVrL1l7zNAhctscE3+y2TjgPHnGwN4xIpnXPCaEBnEHTxsPhrh0QrHVF7+gxH\nalGLSSaVknYhbvZlXEorsz5ZN294o0Z3sqg0B1nsHAQkJ2bbeHY9WdRxXJo8\ndcChWwreYQqYu0Tt1IW60rSP0f2Z1j/sNK9XiJHNu8tq9D5Sn1nI4KcXQ6Oh\nyOGNHO6bdv5h2E7yXxelpNwyw0u7tM5HN3JeKwBbw1sx3H4p1Tu7bY0KHL0u\n7eHy/JUOHFeX3UZnC4RuiAidnfb2HrhOgUUew00nJwIuivcEoAwK69r1CAFs\n64YdOGeakecGt5p9hQwaWo9V0AcS9B089uSnIlpbm6+iKdUeG46xYzBTHFHL\nuaOL1bz/HraAE75IjjFAHAoMm25w+smvwhUCRV0RppiEFaUqjl+85VzeNL7c\nnrSFGG/9/wDhjB670RJRhXkD3MHDmhY9g60pyNDofgZhoTNT/+CYAl0RHdjh\nAHem+8I5VYHXgBBRsjta3lWbdWsQxOa/zjlbgO5yMwVmTzSnZREcmyJSjMnw\nyDYS7DWex/CJeI31rjzFc+r4L+1PQ8TznPmedmsmTPrlvAShDl7ZMtrL2aVn\nwaUT\r\n=l7he\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6b711fc26591cefdde5e88e81fca75f4479b6511","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.68","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.122_1619736922481_0.7754205552556366","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.123-renovate-major-socket-io-packages-95b2ce95899c138276c1635338608fcdcb6aaa31":{"name":"@balena/jellyfish-client-sdk","version":"3.2.123-renovate-major-socket-io-packages-95b2ce95899c138276c1635338608fcdcb6aaa31","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.123-renovate-major-socket-io-packages-95b2ce95899c138276c1635338608fcdcb6aaa31","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"831ae3e5508f46e99ddaa150de1bb9c98f712692","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.123-renovate-major-socket-io-packages-95b2ce95899c138276c1635338608fcdcb6aaa31.tgz","fileCount":39,"integrity":"sha512-0mf6U9zi9bfM8X5+IIWtqvov7dljE5DWX5HN6NZKLOhXIDWn6/z+bqwQGCsJ61VMlm6pweYfZCRX2cVxKLd5Zg==","signatures":[{"sig":"MEUCIAvLZreddqNBRRcoj3GFR384QyCYL00tyA9qMifwcz/ZAiEA/PoW92BK1NqgqT9dsx9lRnlmvYOKJBwPqYmNu6G0RjI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241505,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgizoyCRA9TVsSAnZWagAAhZUP/10LYINjgS2NDwVyCj0f\noQ0j0z/7bYZkuduvFaarGcXV+netu84miqUF9YJso25wi/pLLG/L4l6VfLmN\n2DH7XmL3tY/9r53jk90H2UKZmhYzU8xiqxyGaXuz7liEmDTlEsrVJTp+yafo\ntm/PoTyo+U0lP+ZjrZG2hcEorqGJ6Ovd/KbVhhZC4EeQslIZjL+74kVpnsvE\nqpctjxrqnOcqvpxHx5p2wSlGbOkGmHnmqovU1cT15FYcYrVVsFBdfuP/qvnL\nKiXC6fXCRFcFR/rHJ2N63OCywLSRH+PDgSZ3IfGX72OXmvqCy5Kj+cAK/aQO\nnvW4xaTd1orX0FLM7ExRE6f7bm+3aJZ31anq5No4mLxQb123alidGLhV2eMO\nQTaC+WswntB4PYWgljFO3E+bHnKzgAmeGK/7vh+MTzPZlileWOl0twyNctZE\nFavE5xEiJAU/ukaB99kD/KS1PlWBaPhfGa+8MMwozMkYU97xSjdbryfn9Z6J\nq3RdW8Lyjaks5B9ZETYaA5mMyQwBp0rOrBipy7d4GoExQPkJPH5DcKH0LFIp\nbrF4jnwKWgckw+0QTNE2J4ZDo2nSMy19PeYez5lYz0fseHPizwv+/JaYZxX7\noGYhVAvQbXoKdwbK0ChrbI90fnRd//l4Bn5zAtZ+rqaEBseWMjUCabe0GdiA\ndLKM\r\n=Eg9e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"95b2ce95899c138276c1635338608fcdcb6aaa31","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.68","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.123-renovate-major-socket-io-packages-95b2ce95899c138276c1635338608fcdcb6aaa31_1619737138314_0.4804617821706789","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.123-renovate-non-major-2676ad3b6f3c98e33ff0f61c4ecd1ffaf7d734bb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.123-renovate-non-major-2676ad3b6f3c98e33ff0f61c4ecd1ffaf7d734bb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.123-renovate-non-major-2676ad3b6f3c98e33ff0f61c4ecd1ffaf7d734bb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d7dd6f5b56c9504bbfb98cf0290d064d732e616a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.123-renovate-non-major-2676ad3b6f3c98e33ff0f61c4ecd1ffaf7d734bb.tgz","fileCount":39,"integrity":"sha512-vu76PCBV3tzLM//RljaO8m1irYvK0V72R2VvPvhKCqY8gNNzD+k7Wr4Ak1Boh4HgRDOeuu3J4xSBdGZdKvlTaQ==","signatures":[{"sig":"MEQCIB5SRUln3BFkGosndpla5Y17wov8reEN94gUAxcLQznzAiB7L31fOouEJ48PtngdxJmU/GxVMF7TC1NEfejcSNlxIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi03MCRA9TVsSAnZWagAAmfIP/3SjouLu/JB5CQ1kRdyC\nt7jL7AYmgG5lVsuznO0rlTOpL98+zG/qj6XmQlNkTpuS0L8SZwFVbi3u6/uH\nIyRu1ZLfj40ARukRgqnNyxCTT7o45WQ+JaLXyFDv7hOpusNOebC6fS50uJh8\ncIuIt89B9rI3AEsZsTcx0YtTEEc8paZHzsLubk5vcethLCt5r5qaMq1ko//E\nP4scrKuVjPQGsN5ee9TkQcYD/FFXnLsQQ+BMNbYX9Ooz7YBRX+JYR0OIKdd9\nbCt29S1kP6bOfbzJxMhCGobHTGAR/IGaw3+xCqjCPSBhOeB7kxK/IXmCwa4u\n0/TTEca2ffH6HtZmdlEUVqfC8MXK0IYTaeM9BmQdKe45XXWiH5IG9as6BY/Q\n45z+8iWifeFSfzSRvnXuel3mvItDpddo7ir3esRMJrq+LKVSZ4qozXrOjlTX\nRiuwjnUMCEFaYpUF95nGICptIWkBOtsk7Gq1k03Oi5AidkhJbeEvy0FWADKl\ngLFBfZQTDe25cko5E2GG+ElGTXfxyqdrhOGPiVfBpclaYItkqUXo5ylwiK1a\nqIVNMX8Gn+u6berEEmPjtY+Agg21pbt68Pc9MigJOKSLNjZkaPEyI2qMcRlC\nCQAQRHxvMGcIDLf43W4E3KmMg0iyO3ZqQ+VyzIX7D1xiLE/qWVZHg1SLG464\nLjqV\r\n=0kjt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2676ad3b6f3c98e33ff0f61c4ecd1ffaf7d734bb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.69","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.123-renovate-non-major-2676ad3b6f3c98e33ff0f61c4ecd1ffaf7d734bb_1619742155506_0.28533884954390776","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.123":{"name":"@balena/jellyfish-client-sdk","version":"3.2.123","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.123","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9f7d62f3ba6e8e379ef128a530e98aaa0ae37d8a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.123.tgz","fileCount":39,"integrity":"sha512-1xzqCsRClPR+Y2xZK/tyjmB0phnlc26CkLS5rDoeez+FElYqDP9Gf490dOKGjs5TaZFzmYsSMCLUo3ATQ2K2+Q==","signatures":[{"sig":"MEUCIEvv7e+vo+zascRdxim/TyX3fjPwe20yoAztH9Duj+ojAiEAnyE9CGEgC6XgxIYzINWnvB+m5COhQIPZXbd4mcZ/utM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi07nCRA9TVsSAnZWagAAfdQP/RbgYzlKrI7PR/A5tfU7\ne0/iKGJP1/ttmJAdmBeX24RmJLwvZGvkaxzkWqcjri99rlY1N+u4JeKzi12l\nkPRsJhuNeK046fbVx+BIH3CVQ+JTI9TK49xKKIrobTwcfvqdtJxBZjZrIZEH\n1tqS3NjfHPnwKH0YbIddp7/dbAcifZFHHcLkyfoxELNUhUtCP/Hq40M6/Ku9\n3Lb9uo89figb5Yz9s8QOL3P2WY1ps5L2/DFnT+q6WVBWDNDxhrBbCyU04P0f\nhMJ63tyhw3p4EJcFIfoA4oBiDNXBh1IcEh4B9L67/NDLjyT53tCZcgaaDySV\n9AO3AwOLLRdsYit8gE9JA2ui5iXgIZttllhK9Vk0vSNY4w/BpWB2x9XRRMac\nTewXVUyO/VoVLYUYOQwQ4Y/dVil1+sbCmMWev5yK1kjk0FfxyKPF8s2kRbrh\nnrILp0NOL69qEQOzZKXc4cHfVHJslkwJ/kEar+L4KShkmB/3jW6a/fr9T+Y1\ntDhfBIRZ0WgNPvbiDcF8wM/yK9LI6GJjyRc8LK6oqnANbIzkP5NySX+aNlL+\nFSpTrR798nOIoj+/ZsJe9B8j5Rxul0mfzFTk0Frb5ANDlH94hWBx7ACe9roR\nylbDBgb3p43TTffn+B6b4DMD4KWd8+bB9mN9b5vp1NIEMgO9lHFdueSAXvr/\nTzi7\r\n=gmqt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"31a5ec2256b78d88c0c058ccbc278962de3b07a4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.69","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.123_1619742439019_0.30064625181928917","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.124-renovate-major-socket-io-packages-112f501b78422d0d011c69ee3066763e725cedc1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.124-renovate-major-socket-io-packages-112f501b78422d0d011c69ee3066763e725cedc1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.124-renovate-major-socket-io-packages-112f501b78422d0d011c69ee3066763e725cedc1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cec18894589635bfd1b4cefd5a3024442812a060","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.124-renovate-major-socket-io-packages-112f501b78422d0d011c69ee3066763e725cedc1.tgz","fileCount":39,"integrity":"sha512-5eprC9beb6e0qdIDHoauKxUcrTXD1McbdLRntgz+Hyp1lJF/y2ngXmmGA2rlKauvKux4BTQ+6Ba/brJt4vUETg==","signatures":[{"sig":"MEYCIQDV9m2Nx9qJBtZ90VsrWz1xThSCVPbQlzpHgMYkF7CvlwIhAIS1P41FpHmFE58AHtCD4kYZYsPluX8aJq2TDnG+Aucd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi1ASCRA9TVsSAnZWagAAi84P+wVfOzUbjgblIfw986mB\naymQmLHA54c+THlq4wgy0c4SPZSNCszUm/oHADD4xEsPwwgBsnUR8JPgDBW/\ngA88F49/k7HrowwbPFBXSTtxVX8WrHEQXP+WzwkBplavuU8ka9e2bBrgw17I\nUaZqMi7WldJVLTo1rFt1WsUHYS3RJ+SAYQeGb/7AdN57SOkScylMaFu0NiqA\n8ccPI2QcD6doBiZdkWkYmzxS9SI5iilTlMT42bug0t85w83S7mFlHiLjDipg\nE9qNH3uulJLW67X7X/8yjuv+udLqonBIYjxg6SPW3MjbEep8ujBUEhFhGYOA\nRdseEpN7uIUv+ARfZ9kqASacvqRZR7NRJb+KJrnXetEgGN1aLOVVL2bL2CYQ\n4AnLBPyjXC1J6KjK+8u//9c1jw5HUgR2gyQwwnxSRbeYynPmgPlEVG5+brt7\nBDiJ3ZTnr/lYvgUAbRCEvpzVUHn6nkFKqY98TqyFzXWdiQKnAuUmB4wda2wZ\nVkWOXnlRIGX8qtTb4lOwBGd0tsVd5eP48PTFe8D2+WdRfrvgTk+kA0Mxvvsc\nHSbm95Xs9xAwI37iAuQSbYAN5v5+rFuIs8+72QSSFlE4sOD2Pl6yjDoYxh8W\nVTXOjNoaEWbidyZEUP/WiPniTiK87Ovfw759ISGFwtXF5YSyy09N2vmCrgr6\n3I1r\r\n=Zewh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"112f501b78422d0d011c69ee3066763e725cedc1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.69","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.124-renovate-major-socket-io-packages-112f501b78422d0d011c69ee3066763e725cedc1_1619742737784_0.9942905112362002","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.124-renovate-non-major-c48873d54c8a83eb14735ac4dced7ed9d2cbdc9f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.124-renovate-non-major-c48873d54c8a83eb14735ac4dced7ed9d2cbdc9f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.124-renovate-non-major-c48873d54c8a83eb14735ac4dced7ed9d2cbdc9f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"869edeabb72c7994aa098f4068438ffe07a26466","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.124-renovate-non-major-c48873d54c8a83eb14735ac4dced7ed9d2cbdc9f.tgz","fileCount":39,"integrity":"sha512-pKsO7Jpj5TaVNh2wDJNnY6uP2pfHXFk8TPyLIYQGJuEaUMuDT6XOoYhda/zUVxymT9yjriVlVqe4F5nUD5GoxA==","signatures":[{"sig":"MEUCIQDSEechkBKZUyfQ1oGCFrDkSQIbEncviPgp9Y4LIoMr2wIgFiLUAxJuRUF/QhfMClrpbRny+juJADWOzUlUnzhhr1k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi2jdCRA9TVsSAnZWagAAfzUP/0hsFRrnheao3Eb6Gvgp\niCxrvorKolNI6zBegP+Ow8EorseOMKqnr81c0f59+g9mHzezyONMSOFC1I5r\nraNhAjm4GoyvGe/8SIa3q8sk+QlA5R4X1zPdDmnKoJNnDo0R8sqAtxPsCGHY\nvCmMq1BKIPbFAQkpRX7mFHPhLRHdCEm618OidaAEZbabfUInfnlX3/FvSjXo\nUAmXdjUF2K2XDHvI2kUBFqBnW5QDXWLo8oC7POpvIVW9o1JQIsA99uhlZxmS\nu4DiA89ad6znjqWDEPBDPsTBh3dFSNv6SbAJ6hQDJQfGWNfKjeaNth7K6Rk1\nKMJLdUj2POf3BoOw+TBxHTHLPkkkugf4FpHypptLAsqWkWQkqWadwpr1DWeN\nsz5kWJw8sZM9taoWizbMZzjIarE4ef3qKOA/GWTN5kPRnQB8yT5VvyrcePiL\n9hgdlmaxmr+7GdJCrUl9aXFFbp2mydl0qtG/XV60MOuGqCrwjKtQ+7ImVF5I\nUFtnolWxz5GaOrtNcXYSDxvMpze12l3TyN0VvXC5YFnf7KSKAR8xGXEND1Mi\n4ZszWgtI/4o38N+1vFRsNDtdFZo+Gd8j5oAoVF43CAjXMzcN+fxqkwW09Mtz\n9HW5MLroNPsGJngsSVwiYwgCAys1jM8R8gRl/Q4EOWiMBD1b+GEGT8/C+4+E\n5CzD\r\n=jIy9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c48873d54c8a83eb14735ac4dced7ed9d2cbdc9f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.70","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.124-renovate-non-major-c48873d54c8a83eb14735ac4dced7ed9d2cbdc9f_1619749085227_0.27616827059681515","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.124":{"name":"@balena/jellyfish-client-sdk","version":"3.2.124","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.124","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5b08ca46a2262c11d6284bd0cc8919e62fe11a41","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.124.tgz","fileCount":39,"integrity":"sha512-dO7mwAqzEbJkO2iVbJSSo77HthJ8U9PBS1GBEemKGR/i1n1WBUjVK23T2vMyW3Yp+OLq3pM7c63NnxySspyeFA==","signatures":[{"sig":"MEQCIES5p4BxyFDzKoFCkskU0QpmUHY129qhCGyK1rm48j2xAiAGhYa+vmUpeS79pZWjToxJ18z5zcw5Rud62IGcIZ0cxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi2nXCRA9TVsSAnZWagAAV9EQAIPW0sPsmWzigyxy0ALH\nFEQV4SKh0qyzW+rIZvpCYqEAG6FjoRHIzdgiUJ7hgg0az9YFZH/6qFPXZ81Y\n4gzRleBsqgIQpI9gmDqpkEpulXOZ8Z5mrLmG3TBLoJXNQITn83MFU2dgOqgy\nP9KFKUMklftyjH2+Pvg1DdzBoMDau3gd9ATlHFd6yGB5R93jvmm9do5QRYj5\nGq0Ttrs+KIda3DMTqU57pNZdqdXPBSnyOkPCdb0YDWiNnRTnQ4lN4J9vmaX7\nRZ20pt4XbnrxbehGQ/oR5P0p17IDkDh2yFi7Tc+A3SHyK7qa02a5viIQNFuJ\npqdZ2mwtF+cKg0UQF7YerhcIajZFSsGChgIGKJ33OwwdEPYLwSV2H7pX5q4M\n5qk235c3DrdUBgXem+4A/QceMnoR6s3/OYRbwicqeLxu51oyoQVn5uNlXK0d\n/mOu6uW6x2+0Vp/ZaS6M6ysb8nDklJ2zd9sVP0OyLBeZxNsaDWx+dsxSxYVj\nWupvXazQ7ake9+/xdxfIXeAmOUe8pRzuRMwNfLI6BUumseXVpy4MlnyhZNKW\niSphDYsvZpISfPKal94Gf5App6XrKOQvJeKDvPnMx94d7T6zi1sI9/iHHbD7\nOD57Pzv/+UneK1IPEzV1eza/jNSDxUOh3Vl7jJgbL18fyP9nSJ+23VKUU953\nFE+S\r\n=TioC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cc19241208492aa448e17d61ec48470b3ce8d8da","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.70","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.124_1619749334422_0.8002609895227395","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.125-renovate-major-socket-io-packages-f11d00a346c7f309e5a6719796a3d975800b27a3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.125-renovate-major-socket-io-packages-f11d00a346c7f309e5a6719796a3d975800b27a3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.125-renovate-major-socket-io-packages-f11d00a346c7f309e5a6719796a3d975800b27a3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4cd5f8f80726a1a309724539eccba7ba2eac1bd7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.125-renovate-major-socket-io-packages-f11d00a346c7f309e5a6719796a3d975800b27a3.tgz","fileCount":39,"integrity":"sha512-6e5cbPWhfVSYYURlo0dJx4pF8Y52Cy51BuomqMGU50qSRKgbNYS/Vo6EDR4GKp1iXAD5yQmuyZbADOWmKVM2hQ==","signatures":[{"sig":"MEQCIHnD6An8Djgbu1vQdU/i1NJjimdCs4pKh4kMThQltEQdAiA2k8OyKBzwtaAN9UgU0lVyqZ5UN71rorCqen2F86kOlQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi2tpCRA9TVsSAnZWagAA6fIP/iSGnMVNu8WFL5HRp/Zt\nhbTm8TFtTZp+Rq2xyIcNyihhm64HRfzVGS63ErzrZvTGcusrl1bl1kLYnGAX\nDRRS5JdUO4SUbcwgNWx/MIrWRlzrfShkkwUv8Txlh710m5loxXKZkGPLsRYC\nZgPco4Yn3Yjzq/SweumrLzX5NYvVEUfGC/CpR8hl80ABQajuIl6zg6zHNd1o\nqw+nvpGt1req27g3YcQiNJAxFOSoLZi6Y/w5gBY/lVI7VBo2lLu3rgN9w4Hc\n/51gDeoYIi+tqE1L8n/bMhcHGHqK4AoXHPYkpWKjwNytfw+IxlXcVDbOWflH\nz/RNXDqtuXjT8GcFUNYXxZ6ZboUCSSg7viFJS3Hgt3JWXhJO3Vx7EvsvyqXq\nH7DE9Lf/LL1rgpNIonWAMG9C/Hr9/ctCZkylP4CGCwsLlon6/BwiYnakn24/\nRFb7de00DcBq70aiCiN4z0ZuwRDnLUgVxBpkbgkdfSje4pRaJqZvJyNm2iYP\n0YobfdgHbVqMMeaSf27t/2SH+E1G3mY8kb2o0HV6bWdl+8hvCM1DfbK9zUXn\n/u2SD29OCZspcDeISGzoHW3YHtvyATnNCqbcldeDLY6/h4ZDyrCGvRmdM9mG\n9uVevf80f8Ozw9Tz5hKc+QPEZVUBA1mrVUlVC1omHtb+xyAvKX819n8pZJuX\nlsXh\r\n=zs6k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f11d00a346c7f309e5a6719796a3d975800b27a3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.70","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.125-renovate-major-socket-io-packages-f11d00a346c7f309e5a6719796a3d975800b27a3_1619749737037_0.7366264949747254","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.125-renovate-non-major-4c55657665252e24cab920e23356bfaa6be70379":{"name":"@balena/jellyfish-client-sdk","version":"3.2.125-renovate-non-major-4c55657665252e24cab920e23356bfaa6be70379","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.125-renovate-non-major-4c55657665252e24cab920e23356bfaa6be70379","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"91a0afa0ba1da90b1ecdb81009e29e1f16329407","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.125-renovate-non-major-4c55657665252e24cab920e23356bfaa6be70379.tgz","fileCount":39,"integrity":"sha512-Lim+ZdoHMAZzpsO70rQNhgHL4FEcUel6eHTyzID93LF84ZGaxNUqGrH2qO1muP+4+XcXirnp8pRUuDt2TYidUg==","signatures":[{"sig":"MEQCIGnzEXEaZ5XLW/3S65kNRgSgsjQYTyMrPM8rfCagGU6DAiA4EvTmnCiFG0v2d4duCzVkvWgW680tdfeqBnkZc9xtBg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi4deCRA9TVsSAnZWagAAcZwP+wfR76rJSfP//ze5MsVc\nyVGXmkQyRDaVfRTeRz+oULNXN6jm2KtK67nSvxv9rAUStcu4MsX4u98XV6Li\nH4QxqMS5ClN14YNrhIdvaoJ2jaAom/nlNoTpcYZaR5Nz38wqcllqR7XpAF+S\nKtGBu9VxMlH+9nO04eYJyyMmBxBW/rJbJVF3awUklN7IY9xkKnr+WmL0bYPP\nhOnSGHqUIONj6a5Q/U0OsyRP3o8WMFpBCwfjlh2h2Wf5sooJjKFi1KoTj1fk\nPERMuaW5zx9p7JUIbZlclRB8vIw7Eteih9UeBD39T7kikbdTrbabB0h9zWf1\no2JzG1NWjJob1Vzi7eEBeCpd6M39nD97QqtK+Xs8sry1zP2lG68VQAAjOsdV\nmVBl6o6210wyrs9EwfIxs7xNwaGUS8brKrpjP8koXFuQmNPoLUkDqzKk+vt8\nFkc2Q3noUHNLqQ2A3PT1YM76KR41tlXhetTU3tykSHnYPBo5pyu8zbufrJ44\nkmu3w/vLp4YhB5J/DQcMByNSyowNByilGMIm24X/qPxa5AcyGM6nV++LUupa\n3+ObIEZDRkGPfT2++Z0pWSUxWZgXRzojnWeHG2m+HzAzpwFZ5HwRQYFuJsxN\nVJaSNggMJIczy1AZD5cTfIYUnyjmDW9JicSScGQtAFLcyRuui5gDCpa9PqMu\nvvek\r\n=pKpr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4c55657665252e24cab920e23356bfaa6be70379","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.71","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.125-renovate-non-major-4c55657665252e24cab920e23356bfaa6be70379_1619756893746_0.3524637861142632","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.125":{"name":"@balena/jellyfish-client-sdk","version":"3.2.125","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.125","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"37cbe4481bf6f25ed76d92e8b3828c2b67c51dc1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.125.tgz","fileCount":39,"integrity":"sha512-DDVjRKXAZatgB08JLA0aRAHWLdiE6Z6e9VBiRLpilTdGtNNmFErtURaPDcOotYh1aqsyvdst8tY9Rdtei7WgAw==","signatures":[{"sig":"MEUCIGhog4Ko/A944b+lAThtGjrw3133vy3S33IEx7Qw60BhAiEAo67GWnX0EVuExLzqz743WKh0p3yuCHJbi7bRTu+ribE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi4g+CRA9TVsSAnZWagAAd8YP/20aNtcUJcdOMiJYaYWn\nj3QxMktV71PBEVZ3+rfniuipVuqwMyJ8q1TB1Ozre5SYQaESJnEUg+7rohcl\noyBIfp0HN6Wktz9SXHRwaohrKC6/We+4EXF8UuJN++TnPPz6AEpa6GN05p/c\nQ/Fgp4sCJrVtGkGyoe0JqecuY/iZAqipExer9JDRbZQEk0dOMH1oOyKoYfEX\nO6ylJah04Unie5yjjfxhfVvBenxJeAFRGmUEXAL0h9OztcokH9KCE1BmfBQI\nLq4iYRLiwtgUb+z4vMzKo3SYNWwiGWafHhPbv3RxG/JwSAGjhuOQG0ngt1Nn\nLdRZvufDWFcXWnBIjEZEqdbCtZzPCeMUrpI6DofpKt/rEsMyWd0W6iGZ8hj9\nmSRiNo8GwntkLIKQq1lEjguPsAg7ArO80zTJw1sZ0V6M4spqdfjdCg4P00OZ\n0UIIgf40SVCluyFAGYnxZIaWAJNgqI+pBm8a7+NuDcZYvsbL2UWcrL4X3XRD\nH+Q/jC6sFlLQMUVnFwZdXcU/mW4iTgNTIOORwqnGbHsH/MZ9fOT5/V7ZCIfS\n6RPYyX2bQzG0Zm3m331w+AyOgXQMpXY8Rp37lPIkKxo7ojMhI7rrWLmfYV70\nZPrTnCgNPZYYdayD41LF5Rb3G5icfKbPMD/08ceBvs8EO/dcMbzdPzSROIh8\nK5oI\r\n=z29y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5aa42f7f85368570370ccca8eacd97a9eb0e0ee2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.71","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.125_1619757118209_0.8556575799862582","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.126-renovate-major-socket-io-packages-cc5256f066a3ab9a802377cd40878652ed14e19f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.126-renovate-major-socket-io-packages-cc5256f066a3ab9a802377cd40878652ed14e19f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.126-renovate-major-socket-io-packages-cc5256f066a3ab9a802377cd40878652ed14e19f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"69e5b5bddbcb26d5a721f3a9ba6ddb0230838df3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.126-renovate-major-socket-io-packages-cc5256f066a3ab9a802377cd40878652ed14e19f.tgz","fileCount":39,"integrity":"sha512-uxRRTGfr55cXJqGe7m8aEFZvuHPfQcKLn+b7FCoFOEgEJlLk+YNblET05tGOXz/sVCBASYuBoE8rNQGmPEyx4A==","signatures":[{"sig":"MEUCIE0R9dA2aKuTmC0YnmJDsKrr8f4E1VQ/7gTnLHEswpsbAiEAg1wpIYo4a+QgN3L8GNxsRN5SV0q+6lzLErhgxy5EOFg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi4jxCRA9TVsSAnZWagAAjtwP/ApFpToV0ZRxULXuNqtN\nYVP0m9q2c2CL+/W7aJu46HUEJrTy3sP3QG2ofqA8V/HyS9A//Hz8prW35doJ\nI7TI2+TzrTtEKYcV7FxdlLjvar14FyKMRAYDJsvg0Mm2XMIX4TvUQhRkoFkc\nvREhhyPTlvsz9mT4S0b0izRRLn53IOd9q8lZu7Wvs/J5biMc8d/gmGRmrnnt\nuAlp23HxS0UyETtRDW8OebEcvCvLprCdPUrDzx+GloSInZ0FQJi1IvNZZWNh\nmVSY8Ho3xfsbQYFY+8TCb6BgbBvxlXFWmDFGvzv5F9EVIyHnBbNfuaClnns5\nbo+R+vs8VHy0bjIXAOz5LnMcxyqBZIL7vB5jrB3qg/9L1PUsUO3w/pMbiQdr\nQ8q2HEf3OGxIxv2FjUbA4MIHraqD+VsjXfrivwhO58Sd3y7jb0OXBHAuqvND\ngNVeXGaH50hU7efv5g9z6GEuggQvKxN+cdGDEJY27voFtRkarb9OVq03g9ON\nbMCyAKakPZLsgqsJKDGkOxf3+o1KkG6zGvB3CXyTyyI63MbEb/kEP1gz10ov\nY+ucXdFRnsdNNJnc4SFgP3caXjTV5O5PDRb+iGrTcGhgu5iNWIZMEKGUtBS6\nr5wXo6kiEgzCh2qHhjoKv23GGSMd6g44p51ZnO8w3QH+SPTBnbbIQxYMsB8/\nKyCI\r\n=F0DS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cc5256f066a3ab9a802377cd40878652ed14e19f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.71","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.126-renovate-major-socket-io-packages-cc5256f066a3ab9a802377cd40878652ed14e19f_1619757297363_0.46861083898044","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.126-renovate-non-major-c3dcad0b064a2a7ecf84434621a7cdb05e436851":{"name":"@balena/jellyfish-client-sdk","version":"3.2.126-renovate-non-major-c3dcad0b064a2a7ecf84434621a7cdb05e436851","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.126-renovate-non-major-c3dcad0b064a2a7ecf84434621a7cdb05e436851","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7def0f1086edf80495a80595997adcb17c62637d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.126-renovate-non-major-c3dcad0b064a2a7ecf84434621a7cdb05e436851.tgz","fileCount":39,"integrity":"sha512-OupOvH6va1LdCkFV5NnrKgQcGRl4CncYWj171WrQ1KadWqO5D4lGSsF6yv9b9IdoFvrs4Xr2SUWQmGvi4E+L+w==","signatures":[{"sig":"MEUCIQDrMmcZMWjdb08v7tF2hvz6D7Jlle5BdRM5MwT1lKtnjQIgEQQ1MgpuIYkBvC/r1dIYvfX4lAvgmWCRhI1A7g11PfE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi8T7CRA9TVsSAnZWagAAcgIP/3sp9bpSew+heHPDh78R\nlmr3fYeReEPUnwz5dBZZPtRhQCHa3KwjDjNcuPFPdikMpTk4ANw5P3rxRP2g\ng3xheOeRTsrdZz9oTRUplTt8GlC18GSaGO6D7A3qjrIsmtWWz552I4QxdFpD\nME0eQWR4AP7Idgq7SpAvbIBkcvnEp1fxCSqZ8Iag9ZnkjwB+bkV5ia8OmOCC\nWgGh5MaKH9Pd0spSbthqtkJOpYhg4HYxU1/Zzm6yHy2tz3/LaR+SG/oCau59\nehaaG6Y5/qvQW0zox7pJK2ajfY93v4sl7KNBmXtcE1MU8ocjJHmlpk7Im9YD\nIKf0wp2+k1mCw7Q/aK9oYduj+IPlyreQvOlqnops6In2QUP0SpyWBJ9OpCTh\nR0vu++jFFw3pWVTvRvRWCOsJ9ss8wh/gAfyp9fTBO2BCDedtcN62/KHrLEpU\nyg8EdVlXX3ixmoDrMIQIF39Py9ahCLQ3j2MdkTQQatNvUR2Qh6Dc9hOJjeEt\nrhdYlm0WGQZ9fD4/GLfn3G25TPW7qaJatMVNWUU81QLsfGostbuGUBRdIlkq\nt2moMA14/0tgFN2HfcjHx9JWoYSswXKBnpi/5j7SPFTG+lK9NwovToMyyXv0\nGcaZBu0qpsHa4bJQ1hzuVqmBklkI05nlkJ5P4DZgJHLn5QIpfAQm+hrNSXRT\ne5SA\r\n=yKgI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c3dcad0b064a2a7ecf84434621a7cdb05e436851","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.72","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.126-renovate-non-major-c3dcad0b064a2a7ecf84434621a7cdb05e436851_1619772666500_0.4037612913982762","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.126":{"name":"@balena/jellyfish-client-sdk","version":"3.2.126","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.126","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c59575f38c166858cea0869b4df211b766eb4496","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.126.tgz","fileCount":39,"integrity":"sha512-IVwSPd8KX6F4T9qe017yBkh649zTFTm7AyuRPMunfnNIrAH+51//I/oxbBDHIco6yXGFKnFRt4nxUXajsulBRg==","signatures":[{"sig":"MEQCIQD0vcf7/0deeTkzoZoznKB9sPda2zBI6s7WlrefE53CGwIfSJQgpPJ5iOLB8ruxQ5DwdtxKUSR2bl3/pipoxQwc7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi8XuCRA9TVsSAnZWagAAka0P/01moOHw5zLhcLWO1ltI\nL/8aDdWcgkDm5qUftJiOE1vM5A+E9Pbop5pXKRtRr6p/20jxel+BgrG4QMCp\nU98hnFW3qnLrFmVgySiB4lXZz0DVfRyd8xUVBZg7jSyyhDaBSWMkcY1zjgTv\nSNdXkrPdc328MvIe0O1hryHUXt1J9AGTo3QhEPZjUQ4uU/XU5ObIZ4giP3j5\n56JI0TBulgHDSXYsfFdSxTscks2uazCtUrcYu+tTaB+WzjObA3RyLyGL2W/O\nl8qLi7e6QD4x24PmXJOJ2VJeSgr3fo69TCdUqhfszevroIP4jdTjKVr6MnX8\nulrOKJ8BVkP8Z0irPcDxx1RlLPPOD299eM8jpXIejEmf6AU+5cnQ4KqP430Y\n68DJsqxN+nd6lQfJpFP134/6Sjyrd8I8c4ZQyR9+FzE1y7TnUV5PUHry6gWa\nDp9aeaauNupWChCaetiM7sjNeDgLD38z7k01+3VPi1FBL3PzmH/pB9+zwQmh\nhVCEMuomkogfze4U+aXvu9e5O3a00UXYr8LARgD4xALKoIGA5Fyk1xscz08y\nwCXbMhJlIWGzFMuaG/BegBpkN4c3S83lBIFudGYJAZ+E9zYUgGC0/3kt75fm\nzx4byAhFNRXYmDvekkdHHEbnZaYsia18fDQvLeK9L8Q70OWXSgksdK3KyHRZ\n+r4Q\r\n=9TRC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"be550475c6bdb0d1e6935cf1516a51701fa2e440","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.72","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.126_1619772909884_0.44037671938701806","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.127-renovate-major-socket-io-packages-04e711d3e4afc20fcb65824ded53cc237a2175fd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.127-renovate-major-socket-io-packages-04e711d3e4afc20fcb65824ded53cc237a2175fd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.127-renovate-major-socket-io-packages-04e711d3e4afc20fcb65824ded53cc237a2175fd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2618813078832509288db14cb1582830010e0977","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.127-renovate-major-socket-io-packages-04e711d3e4afc20fcb65824ded53cc237a2175fd.tgz","fileCount":39,"integrity":"sha512-V1lyNs3E2MlsZFUiAX7/04PX2MkurCEwqwnTqX5l7rlItZ6eEaMQk5aHyt0uD4bq7UwBZ/1VlIRO9bD3JskKvA==","signatures":[{"sig":"MEUCIQDvPbw3SSZFH3unt/finVB3DLWE6L+V2lrBXluElvLHsAIgLoffsZync7hO62nB6swvnrpNj15wWhs+QVZKk4eWZjM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi8b9CRA9TVsSAnZWagAALgsP/ixvzBTvZGJseNafwgg2\nf3oLSffd0qREgrbtSV/AX1P+XUEORNtdjKSfloGg6Dtc/NG/CM6HjJji+TaT\nv9QvzfybWjffsYgvxOAJKvUvWPPiAJXOJ624qO9ph3sVm+hGexgGo62i6Cz8\npUrRt7hXmNRbxyfRmGW3UWVyjvTSMTcoHSePaYMQFga080lcrUoelYRKtxYE\nnpn1487NNt+koGlvEzlHfBbE1DseSTFEBQnYnbu/N8YiOcfC9jCXFyAS/24z\ncNg3TKx2/iC2EPkrtR6nQrCV2kgVCacAvdNhcm93PhMx5vSV2d5G2THfWX7G\nj7xeWRD3CEamwSRZT1mWCQLQ8K+sa5pCza1zrbv8L4NTeEGru9KjxutzvQFA\n5K+BRfPpMkxnDKpDQuPvcqwLY8BnGatGfdZ2P8owPx+EWCOP/oiZiguJATws\nXL4zvWaNX5VxN1+tDFBySQM8Uy2OqpKxex3LYS095dvWxgXhTTrNTiSH3kxP\npiP1p6cREgkzqxFWUQXjMHmtWt1tFHepEIlihwDrgLSOTnczT9h6fJ0WKm4Y\nTpCrxfzPfm+G8enF8b8X353WQ0zWTycTIXlCApM+DvFa5/xd93PX2gxIy2W3\nyFGo5Shx9lWHP5zqeRTILxd2f+R45kBeSRWxayoReyUxJmpxqxHw+LloqJYv\nH8Fy\r\n=ZcxM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"04e711d3e4afc20fcb65824ded53cc237a2175fd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.72","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.127-renovate-major-socket-io-packages-04e711d3e4afc20fcb65824ded53cc237a2175fd_1619773181163_0.04336359663482647","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.127-fix-link-method-types-a8120276615e97e67379bf55a1d37aa6a6320ebe":{"name":"@balena/jellyfish-client-sdk","version":"3.2.127-fix-link-method-types-a8120276615e97e67379bf55a1d37aa6a6320ebe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.127-fix-link-method-types-a8120276615e97e67379bf55a1d37aa6a6320ebe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"83876add2d10961275f317dca293176bc8f87cfa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.127-fix-link-method-types-a8120276615e97e67379bf55a1d37aa6a6320ebe.tgz","fileCount":39,"integrity":"sha512-KXlp/YmGKO742OeKygia6bQiFCI+VBnUs9xgYjr6O1RwoW5p514+/JDTzpygiir3nBBd+kz+EpXTD2pUx/Rb7g==","signatures":[{"sig":"MEYCIQDmwG1EkRRP1bCdBQyOEvPPclA1+onhyGrRsrmp4z+/hwIhAJMqggCPOK8nz4IeLcXzxlysYFZ1tfvx6H/gUGolP2Sm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi8gYCRA9TVsSAnZWagAAQUwP/iLPMAvexMDmicPBPcj+\nFokJziQgKUqBgIHcd8fYomyrix/TExgzhwnE+XAetlllojv9bVbYF37HSZF8\n8+yaBZhqh2t2j01RHEejpWRO8Aem9VGoX28YDZYU0Uc6LiPDDvQx5FgMJ49M\nXwHaXHEwDYzQXSQ0sK1x4flROvYsuECz4wV64/oObkKbiDAMFYSox7midu8r\nty7NrDH44QpcGhTjxY3YgtbHmt/TPZJ0aRDVSzTXQUPqZ00BmG7D2IIlgvP6\n9TT/ctaI1ThIorbDdt76bOXCNeLBknTYcVTYgIwwxwlxZj9WNXlinRONgSQy\n0pu9dFvfCv+sVhbzdlODhDG4bYeseZmekizUIWtIQkcBt9h84TK9KZ7hAcfB\nnxqH1IhGVNVZaXKPJobANzMnfBbnyo4y9KfcFZypxJQy1ZxMoEtMM/usxvtW\nJ1mztfxTdiWc1R4hjnHDJZuWeVTvw7Z6cFoTkSAq3LJ7CfQvkHTFC/XUXBBn\nr2xmGyW7IdDOxmUPoLRBHPymLK9CJgHhI3ZOX+uVdf1aqPLdD2KGnxN8wzbT\nKnbdnfBheh2cgM5y4Nu2SQFvZyAoHkYgMpwQIWNbtKK/ErLy01fS9jUtFVuP\n0t9zeypghOBBDW9694YffusnX8lptduENFp9hSaMWI53EQfiqhS6rwu0VDPK\nR3bX\r\n=ogR3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a8120276615e97e67379bf55a1d37aa6a6320ebe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.72","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.127-fix-link-method-types-a8120276615e97e67379bf55a1d37aa6a6320ebe_1619773463530_0.3297523231841055","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.127-fix-create-returns-null-a280706fff7c57dbcc88542da80fe4485c2d3faa":{"name":"@balena/jellyfish-client-sdk","version":"3.2.127-fix-create-returns-null-a280706fff7c57dbcc88542da80fe4485c2d3faa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.127-fix-create-returns-null-a280706fff7c57dbcc88542da80fe4485c2d3faa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1e512321b18af27676a5eebdaf3a05803ecf317","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.127-fix-create-returns-null-a280706fff7c57dbcc88542da80fe4485c2d3faa.tgz","fileCount":39,"integrity":"sha512-Q/ASuacrQqVx5jS4iHCRKTM8oPFrQRv1utzHC4CIbwnMPjU1NPnkxiT5LsIgD+k7EPoTXD7x8ikThf9saGro4Q==","signatures":[{"sig":"MEYCIQCbgbzQoHKUafr2T/SDCjAmj/tdDcyxXfKttJmGKlmc3wIhAIo7SGL+6YafMfVPiKyD9GnqujZF8QC62nZcVYYHuJFf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgi8xKCRA9TVsSAnZWagAAtncP/3a9tTpWK9ULwf31aFt6\neeRMFkVyLeM8z0cFz1zCD+xqKZt+LBaURn0OM4v7KT7Ehf+z+rGvoBmrwn6E\nyhh4EPJuA3M4O0ZrH+bGjvf7Ql4GFFBsgxBJnsocTsqgyA4kXroEN9AzHG02\nZORC8BkH5WZtbgwVLXNA5LWAN/TWQ6T1iDPqPHdTAxuXAG0N1o9V2H2KHYvT\nkn4fJERcpNLdfYqki+wa3F18AVOSB8S7f5/wohSuIh6q/34oCzTelxl4jPcJ\nWBe0pEb4nXonDUJuaQ49Fgx/X7GIdRGU1NTIulX2OMqqT2HwsdJYxwNS+ZVn\n1dMGoTBr+omGmgUPz23GMiRhGiR6moeVn+U5iKadtCR/kOJieUq+/9Ctjra5\nmvcTVV6eE+bA/bOKNkbuWgj7UVeQ5nx5pkEJuzVJN2JLmzpfh6B7XTZT3pFi\nsbzsgCRjQzcZ+ppsVHhmevOIUCXTY7R1oiGaYBnuiTui1Cvqs1c+1Wh97Jki\ntMvBsE9Gk2RVitCkNSdamoPybf9HdYDC7CeVY++EB69znbl7WK7cxi4udklg\nx1zxvyk0OD+vo2KtWmkj90MCoUyc4Q1v4sL6R3rLq1q3SR2PXAWbolACZ6jV\nKVNYZAz2D8HhrMvxHyLK7XtmcSJETe0IKKpF0JclGR5GJjMGxt8/9iyeAGCj\nW4Uf\r\n=wApL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a280706fff7c57dbcc88542da80fe4485c2d3faa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.72","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.127-fix-create-returns-null-a280706fff7c57dbcc88542da80fe4485c2d3faa_1619774538206_0.0183835364687841","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.127":{"name":"@balena/jellyfish-client-sdk","version":"3.2.127","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.127","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"02f6eee14495b7404e991a94bc5c7abc87b07aa0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.127.tgz","fileCount":39,"integrity":"sha512-fjE7gGtHvEQd2C1iU+rBAulVDZKPqxYLV5M3wgKoMOGu4KHtgcjQESfjdntFw0ZVTMvixnYSlUmX/THJZVwUwA==","signatures":[{"sig":"MEYCIQCtx9aZdMiPq8kwZLmtmFlLJ0jQX00hA6XJ6ilBKB3xHQIhAMFtVQWdoMEjiStRf72zNT8rqiJjiSQRp5NCp1Zl/9rM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":241899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjJYBCRA9TVsSAnZWagAA4RIP/3yf68mHbXhHza8S0CP3\nh8k9/tjS/USSu1Jiby0VkQR/IyjGaZWB48VGNKlm/EdNUboDOTEAVtjRuNmE\n4rh8MldreMuM1/6bnciJtRYUvf1IU+Of8keLmIO/c+BnbBOwkd3roivQpXhL\n8bifcFRW16h5vJjQTZCK7swg5hPWjxnabyktI2JGHJ5xAKgSCf0gXzsja+vJ\nqwPQpPBa8tPQLY6o7bxD/Sbf8LTDPLkH5Opfm5eNiSjWil/UizhvznScZVE8\n8zsEeZLCnUVeKYdHTaBNb8poYCW9436Wq3GWQ6fw1eetw5Oo/+ph0xnuq7sK\nPyI9tt8E9gJB20+ONfokXUdyVe6xqZGRHBmrH380jygS1Afb1s22ZEILlrAI\nLW2dA94j1aCUuVFf68IG01EYsMojHmXVV9bf4mDd4TsPVeQM2UMfh2DBHYUj\nu++rYpwqQj396RDFp9YpO0ZP6yDcycU+uE1KaYeTmnvaDUhUJwgObhMX2uJG\nAf/RzTSHAqLEvQPhDvbXXIXPnP/GJaYiNKXZ4ogEMPjY2DrIqtzi3dwn9HBJ\n7OAMPPy7n6FingkYiXYckqf47iNvSjgxD6bvtTgTdByQLZxV2f3waeUsfmsY\nDxHRhzu3JWswdUsEGFzTu5OtKyhTGoo5njPdlMq6E8uLFZlrbndmoWgZLemH\nuFbV\r\n=RGkJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f6316581cb65c99a962f0e3d4adcdeb444745f1e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.72","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.127_1619826177086_0.7967333277233866","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.128-renovate-non-major-d28b458bcaafe37fd0edacdba4267b075c77b9d4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.128-renovate-non-major-d28b458bcaafe37fd0edacdba4267b075c77b9d4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.128-renovate-non-major-d28b458bcaafe37fd0edacdba4267b075c77b9d4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2e2f17e0e3e9077d459b0ab7936436679e3c7c11","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.128-renovate-non-major-d28b458bcaafe37fd0edacdba4267b075c77b9d4.tgz","fileCount":39,"integrity":"sha512-+Fcf4nE0VihBNQxHVpx9ScyLdosmzzCOn0DNRH88EcVzIxaWdjPNnDoP2rbaIa1j9vmo56DGz4Xsh6eHudRj4g==","signatures":[{"sig":"MEQCIA9b/hf+0JvEelt//++R+TZfgNiFXMRZQjXgG6AZh8V0AiB/yY4Os8jDpa13lmd14YNEQNiQyAilKKD3XKk7jWH7qQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjJdvCRA9TVsSAnZWagAAX4EP/3T2zKiVAjoRrNiq0+0Z\nHGDklOImDjgAqtUizdrW+yjF7B5IIV2YkpA3Ouqx4slb1szeY3IRUtYVNGDc\nZIukJybGqTyGkJa/eBflA5tb8nzbnLe5AvwDe3xvoN9tjvBjyf8IGv7vACme\nMJgS4lCwh7/kaNk5I1BDjEU/Tonk1tPhXuvSjaZnQkfyvjcuXhPBOdXP+Rpb\nKeB1iWEFUDmDerimltDBJL+Gml/AUE2a7P7PSHdQ3fupOTNjXBlluWYqC7vQ\n7Q+5CmNClBpQa14OeasH4ZLM8FWwHLg+BfW4FSW6ZDVxYMKLaaIvmPLNhobw\nRgqFqHFKG3+vuryAfWpyscNu8M6JGU394B5VVp16b4xskvaw+qhvg0bF+pwn\nqv1NEca2FhTp4YP+UT4d6LktgRDPMGc47bQI/J0QuWEih/qDPKsiUVrHgUyj\nuffWYM33zmAz2zk73VgVvnY5iGZ4WCJ8JBolSwnOjGDCqkETjUGJmgMMORrs\ndkRj/wLkC3cZRHetECI+zgOWVISSG30JPrseyxZnm8yRYiNS47YCz9iwCe7L\nGnrY2kqmKZtKVfy4enRgWSA80g3e6skqExyBgZHKTakOjXnq43XDOApE2/Hu\nHHAqICNa2wAn+hl68AEY8Vi3CWPXFhZc2x5p1T0sVMPpsGIEJ+QH/147OBXa\nCEw/\r\n=d4aP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d28b458bcaafe37fd0edacdba4267b075c77b9d4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.73","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.128-renovate-non-major-d28b458bcaafe37fd0edacdba4267b075c77b9d4_1619826543262_0.9631027122527376","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.128-renovate-major-socket-io-packages-ac49177e854f7a503ee8d216bc460735477163d3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.128-renovate-major-socket-io-packages-ac49177e854f7a503ee8d216bc460735477163d3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.128-renovate-major-socket-io-packages-ac49177e854f7a503ee8d216bc460735477163d3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2272dad61aceeef7d6da1be35a61c96312480d28","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.128-renovate-major-socket-io-packages-ac49177e854f7a503ee8d216bc460735477163d3.tgz","fileCount":39,"integrity":"sha512-GR3qIJRrYcmfZKyiIeioVwfgNV+II9gSaYkwPRb0CDdmDxXkNoDUhG00SVDis12AJMGVkBxhfOX0wb8Fx0+vGw==","signatures":[{"sig":"MEYCIQC+78nr/cXAHdly8xH1upPLnJy4y/nxvsHUH0WHV6GvYwIhAMYFo6/vAM+bJ/9x5RirAlrIoZuEgpmBTlinzgTYjMoa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjJeaCRA9TVsSAnZWagAAHioQAIaSJlZw38iwkNSeikgh\naBPfVQxZY59xs7oIfOSlrW1oKfRIDMYXQ+2x7yjPqVXv9C5q/ovOyagBWhAH\npQyZRwMQQz0lQ/VmFsC75Iol1/+iTahS7nAs4kf8DcVr9OACZxu/v5Uhpooj\nJErN9b67XB+pDXVfCI+S74/gT+EV3G4uxLgaJh2G2iI8jx/EP7zav/qMc6jV\nb7qVPbbhiNzULcK24YcK+3fZeRMrG9nwIpEFDKGqPRyirgT/g6p+HJBcCCJT\n6MXJRwJq8d8+zdMOzubYsAnkay4Gk0RSsU4WLe/lbrhjYc9TmwsAPQHVIk45\nCYvzhdJVAE/RaSF6xBxWlLl7CQRmPEcpwfCdxbGYmr6zhzgde6wozRkgmey3\n6hRxMIWg5fUf9B5FnZ2xtH/CC7FxjrZIbZeoFAj2c0uXAAdR+6sq778sdLuJ\n8RLUhxfeK6nvJd2vQSUGDg9w+4hgARXoie2qVzQMx9TQPqthVMmTjy3jdzQC\nVRKuc/rvQjqbhdY2OUVPT95GxyirtSFUtaTQbaDyN0BCuYhowdUxGZ0va3hd\nNwuMAyv3BPgYWROI/IndqIAJBTBtcxKX/ZH5X8Y4sfnXUeYiicy89x/t8oFJ\nXhCjtroML8aOzNXZDoGyV01Vy3Z+leE4l6vCIwsQp+W5YKjK849Xr05HpATw\nozxn\r\n=GVLs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ac49177e854f7a503ee8d216bc460735477163d3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.72","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.128-renovate-major-socket-io-packages-ac49177e854f7a503ee8d216bc460735477163d3_1619826585677_0.20687413225895956","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.128":{"name":"@balena/jellyfish-client-sdk","version":"3.2.128","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.128","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c5b0158189fa7b8a28d495344b3466990ba48120","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.128.tgz","fileCount":39,"integrity":"sha512-vz/Y6HQg7drNtusMqO2+ipVclOM40Effdj7Z0kvkfHuGQSfN5CQvxwmcVppDUU61FHZYoyUO2k0fNo+fyEnONw==","signatures":[{"sig":"MEUCIEc85nYekFIcSd023m5PlS/8+onlFd0vrFCaTf5Id7JvAiEAgKrwF6xkMn4JZ8ZWGWajjE6WWIUeDG2jQHuaLGpEjqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjJhVCRA9TVsSAnZWagAAaVMP/1YVb7FdmVm3L9peCMYl\nAFQTX3F6jx0xrbERcl9kQqjDD5peqi1xqLvBmTfEMygg5sTq7XAmIpkQD2OE\nyn1etGJXMQyGyqUiUmAf03LkDBmoGpC/O9yIHZgJBZ7BWJyvRFmkB8Kbd95m\nx7PY2dsWlXGxpzSU2gbcvDnvMkqUEQzLB2gDYtoTvmFiBw8VY7PAYUmDHzBP\nHS6RajtQsE0sha3cZ2Ac+fvn0ScxCr7E+GPvWIa42Z+FK8m3AcgfHcwjviLx\nBKcVJ7btd15RFt//ZaeuKd+ZYMHHk8KYxC6expCz6XSYbhr3AVy4Es6W9zrl\n4cvqgaTDephhy2MxEBGZpsvlUtCx/eKAdjQbc45/MhDcjVvVdKWaQgkeW1UF\nfOxTG2hZptwCIF2pbTWc55dwiHhBeTxJzZPH4RqsXdI/iWa1VQMp22MOBRKP\nhIBSdMstzh4OHCy+hGPDLYhY+isKvT9Exzqy3LUXJH5U8dbvOcWGRqQuWjJd\nwHOa+4N1VkiQIB+5LvLRm/K9X6m8VIvyJZeTefYmTW60xrm8zvQgVRuz2wzf\niAmYyeHv1zlfPMVSVPKoVOpyq0S9S8Sp/YUqKovpqgTbmlsVY8LAHR4Or0Cz\nmlie0g8x7Ie1YluzOkdGujGL7UA6McIi1kP9hyjB8YWFw3MHjrLH+hsyL3V+\nZwVk\r\n=YBGK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cb4723211a5627ed638aae6d5506a8ec07620f48","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.73","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.128_1619826772827_0.23717948377997367","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.129-renovate-major-socket-io-packages-15ed0877ec3730db47735611ba604da33a3b9850":{"name":"@balena/jellyfish-client-sdk","version":"3.2.129-renovate-major-socket-io-packages-15ed0877ec3730db47735611ba604da33a3b9850","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.129-renovate-major-socket-io-packages-15ed0877ec3730db47735611ba604da33a3b9850","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7b3d280e98ae9238c7a2eafd401733b6f34f256f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.129-renovate-major-socket-io-packages-15ed0877ec3730db47735611ba604da33a3b9850.tgz","fileCount":39,"integrity":"sha512-mxcKcAd+o+EuCXSKXL4bsT6WVU31aqtg+1fQm5XJcJ5Vp/gxc2JNQGt5+kYbOV6oyZ0wMFCflqiDU/yQQfEmZw==","signatures":[{"sig":"MEUCIQCmb1BiqHYeZi/tYUA0TZIGbODvnoj2+FHZnLb5kjSP/QIgPPVmcikqorb785SVer5gzHe12erU0l/xqsHToOznZek=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjJk9CRA9TVsSAnZWagAAklAQAJ004wg2DONrKjCR+ZKn\nIcUSCy8PJ3ZEws7Z49LmQUpVKsrIizidTIQvMMA3JnMUS3bPuNZIqMVwcyTg\nqacYr1gcDzc3d+6BI6C/3NcADvxHr36taTrKl3zXRacCO38d7owpYTkr34WQ\n8UoC+0U4iAVP1Y0G+F8JBjoNW+BKFjR3cO+KaT/7/hcCVDMqoWmPivkpErp+\nu+z3NSTIK/jQMrr4852wABq2uIWcdPYdocRDlpekzCQ0vTcXnhUmGq/zENPY\nYtFWrQq90jm9BsQ/F7O+tMwD7eBBKekElFPDKbPUbUhg+4UerMahn3iG2iDe\n/tUy7bUd0t4J3b9ZUgHEa/pkPLU1FQ9jUCB0Yp3w4Zfk8lLo/rFlpMCOzC+4\n9Xl2ACkvmbWWVEpzAgXtp8+opTyyyr+nX57GWzfY3i6SOW6p73/zx+StCoHX\nAuWFyC1GlR+OXDK2F3hDCd5nxKvwjCDFIrrp1MmpQChemu4oLmyfrDZAqvh4\nRQmCH2QusagBsMPvVGz8bBYlrkiSRlk8MKE6mK/RO3kApsa1ofQAq9I15EAX\nYZFcQI4JPbXxI0pBzs9vK81vskZB4BwrMNIrckFBIGqYsf6BWEAjLKL4Vave\nnO1fAQxSjDwZXMRumuhBW1XijvKyEkYIorlOWIdGUcLFU8UuvjJAKFAbJzDU\nrxln\r\n=pHV2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"15ed0877ec3730db47735611ba604da33a3b9850","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.73","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.129-renovate-major-socket-io-packages-15ed0877ec3730db47735611ba604da33a3b9850_1619827004710_0.8306726797414812","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.129-renovate-non-major-e1bf3b776017678a355e00b00a5f780f488a5909":{"name":"@balena/jellyfish-client-sdk","version":"3.2.129-renovate-non-major-e1bf3b776017678a355e00b00a5f780f488a5909","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.129-renovate-non-major-e1bf3b776017678a355e00b00a5f780f488a5909","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"19c6c5aeb196893f6f8a182c031c34f24f1f95ad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.129-renovate-non-major-e1bf3b776017678a355e00b00a5f780f488a5909.tgz","fileCount":39,"integrity":"sha512-ilz/JjvTIgxdtxdgABi3EMjfSmmq8y5rEAi9oE7SowJuA6jMeo+9Jm65qmWNfltV+w6i3URyxsmcBuTbigPalA==","signatures":[{"sig":"MEUCIQCIIZ40Jc/x8FkRJ/VgJfTLoQP1HUqNt6AoQxCXwATq5AIgQBmvs8CtpGhAImBQJNcJ3hBFMfs7hnXSTSpleeTH//8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjMumCRA9TVsSAnZWagAAd38P/3TaiLFveQ5ePYej1dfI\npHv5+qI/5fL+049WpwRpm1JRQURRANB1SUZaWD5YYP0sDoTprBDU9ngI04e5\nGJ6fm8GPk6i/uj2Nbc+m+4yOB3fr4gD6NiHyfKvggDfP5XxSiqD7g//HbF4N\nhj3yP46M7cbFLaUO+JnvYT0T9cLbAbZ/dr8aaZCrObKwiroL0bRl+jdTWbIH\n1JREJTAQtsvwWUVSy57GtKb6tWPRgcsXPRzqWU+PI/gsbq70pMWqSyYEWk/s\nL7vEeh77hgTSewinEzkKc5QXNuOeKVK0uSckRsSOUmsM0eDx2LatRUBlsgpk\nYILfGs6dr8oIELwNhs/OYVhbvORZzYcqnbi808E/ke7pCSf1X/znQptP9dh1\naGYqMaZ/Advl00rQt1qmU8H+2zJ4QlpRCGgmiX4/Zx8k/UEa4v9wldwphJ5Y\nZs1kM/3ZNjINmD4qT1ReWoT2H+YJrbxvKRekCUIqpFAroOQTlM3AI4/Ptt8M\nEYraMcRnK0gEMm6KS5H0e9/6SONIzMqA4MUsmcB/cB6TA6TGAftxfrFU9goS\nN0YCaKyh6qZKOQOX8eD7sO9IFtKUtMZu80BYHjdh4Ngug58oqqmnKosJgcCy\nkyxArDBp0YzWNvBrHedfZcYI/vlW+FtACYS0puWWIhbjU2jwyzwMzameU1S4\nswDV\r\n=2iWV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e1bf3b776017678a355e00b00a5f780f488a5909","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.74","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.129-renovate-non-major-e1bf3b776017678a355e00b00a5f780f488a5909_1619839910171_0.5459313795081531","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.129":{"name":"@balena/jellyfish-client-sdk","version":"3.2.129","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.129","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7ebe6f70e031ff94d04dcae39a771fd0a76bbdd3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.129.tgz","fileCount":39,"integrity":"sha512-yi0ZGWCSve99IMPtPM8rUxRLs7uVf9wNowtMq5+limkdYlzBsKe4kIzKt+S+0U56LosuwV7MQaA8Dlgu6ZNTtQ==","signatures":[{"sig":"MEYCIQCaBUR9FyEw6RPy+0Y7WBOKh99CyqVL/wppa+NszNs13gIhAKNqZjbbbaCoAouYTKDZKTe8lya9UKxpZiCABNyeUXdU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjMxfCRA9TVsSAnZWagAAR6oQAIrLis8xWC0y0lRCmr0s\naTlnm0hKKfHbKexkceUN9035SVloF+kuTCmMecC3iXyJ8w7BSJGjZ0ENt468\nWt2F4mDvdbgkjfHPB+VjbIs4yuBSD9Fen5Z3wR16iuaeEsCTJcoLOVApSd+e\nBIDQ553ZTz2S0sN4DY6SVD4SnZ6vyqNnwisEWrvT1HA6sWCfthukD3enD9UQ\n0GqShesG5iJzl0686/vffB9PmeQpOilcE2u9q8sl+4ehSMdYcKlM66pBX2eA\n9vw9ewwyIHkzW5ylQa5okMYyMXMHvWYIQomvbPyBZ1wqcEMzX5nMN1n+Sv33\noq8VbU7ngaZEiQO6vj2bNeBW05tbi1f78KDhG7GJJirOql3oGdyRrfNIOpNU\nJNeE8shX0P1Xf7hqLGrfoMuWmKn31tuFLEgfj4WBxvuIfUJV07mrkTyGIh6y\nzmINt9cphm3IfJ9R1BdaUdSmLt6AsPz5rMefp5TPljvn0O7qSmj81W+/ZKl9\nOhX8xbAS9sJCsI8/j/yKubf3j+UZdVWPuOdIlx7mR0qnScFpl9kJiHYnlEhC\n3BIRa4G4VHVwuPiLIuitg9pzo3Z6wnJq0mtmdB4vbQ/b+EYq9FS6oAtghjf6\n3DZezN8NMximXcYzs6PUFNHSbSpDdwgaruWPJezXHkrLp+LCMbV7SSuNluNh\nfuJO\r\n=Jgq5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"94d931c527cfe4f3a44abb6975bde6ce8c8befda","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.74","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.129_1619840094103_0.41443663949796195","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.130-renovate-major-socket-io-packages-dd534ae25c486a2cca6b6fd5775f44020dc6f8a5":{"name":"@balena/jellyfish-client-sdk","version":"3.2.130-renovate-major-socket-io-packages-dd534ae25c486a2cca6b6fd5775f44020dc6f8a5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.130-renovate-major-socket-io-packages-dd534ae25c486a2cca6b6fd5775f44020dc6f8a5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f288d8d05c583974bb3fdf5dcb21ab352ab1136f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.130-renovate-major-socket-io-packages-dd534ae25c486a2cca6b6fd5775f44020dc6f8a5.tgz","fileCount":39,"integrity":"sha512-tY0alABI92jID+0xC4g6cVzsVFrFrg5V5KYdYvSvChZU1T8jPnLC7i4SnHGdUyPVEbEOuSwLv7wJZ6uQ0nWYgA==","signatures":[{"sig":"MEUCIQCmd29XTOxY99/z58rk/BhooGP0jQIBvc2qDdPbJG7jpAIgChIkX/6tVIetmc5MR+9rOZCRFlahs8BenuvXE+qn0SE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242271,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjM1NCRA9TVsSAnZWagAADrUP/3/5Iqb9KOErTqQvmBcS\ncNWyUHsdNRSIh+XN1lzBLtuoQMBmVVnA1rohnxkpjmj19gSxJNJO2QMzPtbX\nvc8n41+BtRFLmrLUKy2HGu502isMQZf2THzyV86uweNWN4SOj7IGNppK6TMb\nAD880bOmLis3KD9wvYVcns7hSB9yac/Bb6hfAtc2bV0Sn4lS03fgqPbMY5Ph\nBD51INW5cJrgJNzMqSO6uVOunpf59qEx1Nw4iA3qs+kbjFlsOeJXDGhN55/c\nrjAPD8mMyNUiOccCnq7QhwHKHQ5LY12NiXEfrbLxtru+yvn/AU1v/YuztqBr\ntkb0+Sg73jQR613afvwnkuNdGuV1tURx2txgHEQCgUnfU4avW57JdB5l7SCm\n54d6B3kNUnNg2KbNCcdk9IWyTd/vlDe435OQuBmXX6l875SJbZEV+MqlGQH8\ntRT0wdFjotTnY8+TG/g78SOdU9tAcePc2hIUyOmg174PU0LXqyPaf0e87j3K\n3pGTTCqr7oLg4xRs2haB8lYIJc8TcBQC6SjNzmK0K18g9sOgPsfBUNsEvq9/\nzHNusqlOJTXplQ0S4F8uF/BozSMpMklUrSyeUznRUFZteWYshin/xLHI7cLB\nrQmbJUXyyjwViZR5ni6g7j+LhVInvoctxicCMAy0quzkptMAU3RBwFEuOaVj\n4YGd\r\n=WtjN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dd534ae25c486a2cca6b6fd5775f44020dc6f8a5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.74","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.130-renovate-major-socket-io-packages-dd534ae25c486a2cca6b6fd5775f44020dc6f8a5_1619840332888_0.6461288289889044","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.130-renovate-non-major-9db66a76c368b077faa80fe63ffd2f30a730d48f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.130-renovate-non-major-9db66a76c368b077faa80fe63ffd2f30a730d48f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.130-renovate-non-major-9db66a76c368b077faa80fe63ffd2f30a730d48f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75b8ad962e7d6193b6d52a95211c4096ac0ee341","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.130-renovate-non-major-9db66a76c368b077faa80fe63ffd2f30a730d48f.tgz","fileCount":39,"integrity":"sha512-ayfc14Em+2ejPM4Mx2drwkkRoVAlcIV2qzitowjAYApjBi/Jy9XmdzcFb9u1wVKNUsTZADC/Wk7ThqFekmB+yw==","signatures":[{"sig":"MEUCIGpYZjYl0emQtsDejYcU+HuZBgUyKRS1pTzwpDgIKGmYAiEAicxINAKSXJD3NEXPupFV1nepx2oR/Y4bErYaD1Mfv74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjRhtCRA9TVsSAnZWagAA46gP/3E8gfSooBom+0/3Yh2q\nIb/dCi0EYWJJSMHq1FIrRYXjgH1LanL+8DpHlQ8hnV0oYZlLMHwTS80WYToP\nAQa2xeApeDohUHHAGgaF7KWijdGKTOd0/DlCWvjenNmWk+6OW58WAFEguwJj\n0Ono+BXUkM0gesb3nxSRyq4u8W1g/jVli+sXAolLDwYWdYgCpobmQBAqxz8Y\nTlioR7kTCd70ljTbzv5zn9aSWZjApapKSouUlVxU0es6/OA3z3qfYvzhAjF0\nge/2pSzhccFmL1eeaJ4gsxSrasBoptigLx0lrhEqDKc8abqgAC+/LtBG8WzL\nvX74WzFidWN0boXE7dJ+4d97HGjrvrDmK3qzVqj0SmORv8YuEZsL1f2wcHhV\nS1MTQreXmrmL574s291yZE2xvksp0a6k0nWOm75VBlPyZCXcS5VKkPXYw7hC\nxTFgdhQyi7r9+aAzk9TIKErInFL31UKV1XwqYS2L+TtKFmN31vKBxg6DUErG\nK4j9lWYCHlNJo5AFQf7txfj1zbpsNPHAm+MD+72YUD1owTVfeydak9aLCuxJ\nDk9Crt2r7pDG4r78DJSBviqXRDM/pRLVBrHnjDdo5THVLkR6+svoMNc5dibf\nsiBFrkyGS1kO0bpt8cH3uzRuyhDcTddOdcBIEgC4WVlArbARvmYoj/MPyBVo\nQmuD\r\n=Ox1c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9db66a76c368b077faa80fe63ffd2f30a730d48f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.75","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.130-renovate-non-major-9db66a76c368b077faa80fe63ffd2f30a730d48f_1619859565230_0.01762517540938724","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.130":{"name":"@balena/jellyfish-client-sdk","version":"3.2.130","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.130","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3cd90ce0b057fdc09cdbf275852d25a3d10372c1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.130.tgz","fileCount":39,"integrity":"sha512-0ZNie7ELQKG5c8E6+Fl1a42OAlUYkwxe7b94jn8El+AzmTfqg+pqGX4m3E1bewAOHorKVHHVOh8PWqnLKcvsSA==","signatures":[{"sig":"MEUCICXM3EzRbt94nRmhgvLb1sk7URvmdmzUf2+Pjr8DLEgeAiEAtuK8jbdNbO5KG5BL3fIR4VC29I47PQkHL/TIu3lCjB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjRlVCRA9TVsSAnZWagAA9CEQAIYlPp3m4AN1uQi3aNlV\nUlPfdervAi7hCAAI+uhTw5kiC31BFzZpo+SvSXoMn4rY3JH858gkN+q1DsVs\ntSqHbb+TL65Qyp85tmtkUU2sI5tnEeFozOg9+SdENaWi8ny2+op9TzQgRGUJ\ncroglkCVLBO0zd/ItsG7+fcaSmSBWBPD+VnUt62NqBCV1d9LGxOfr8u8pGch\necWA8k85KL+IaxA0e+qTuYvtXtHJtmkJp5A7QFf6ttYNC5Ktp4XoXuUyWVOJ\n7yvAFuAUgaGi3mpjH/3qpM7QS+xWyrgKW3RXrS4Q079YyvPiqsWVbzvMbVTH\no637Moy4W1LJNuYUG/b3vl+4CrQOnuvY4NA3uI9x1E/c3oxq3H3w0KPYCEmd\noW1BjCwSkySO/k7p/0UObB5hA/ODY8UzYoxHGZyDDsyH6Pp3Yj1x+OJMSsiZ\n3E2+e0yx5fC0iMcTZzSpS0HCrz+ytgHQqW1M6CWyvNqqVQAq5vr/YJZt+zpp\nuoN5snlJqK5VUumzJBPMumFgDxhIsr95kBlprGvZIHOVmTz/idQnegT0B2vN\nGobOdBE7pNOsE8kB2SQ+WS6zQ4bkHFl6KYTvdXpHizOIWa4nMG8GfbMcSW+/\n8WPYeFomMk3ZeAwkLkr0sNFzagR/TCt1Sxws9oiThnP3aDFUZnChqFXkyrVe\nTdkV\r\n=mX+g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2a6597c0ce59fcb8b5461bba6f32d7d905f20108","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.75","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.130_1619859796887_0.6933149975941575","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.131-renovate-major-socket-io-packages-eb289c04fe440fb915d03cc66b1010bf5c6f397a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.131-renovate-major-socket-io-packages-eb289c04fe440fb915d03cc66b1010bf5c6f397a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.131-renovate-major-socket-io-packages-eb289c04fe440fb915d03cc66b1010bf5c6f397a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e6d35a725ef4d3dfc8fcdc3bdfe1e0b8e8809396","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.131-renovate-major-socket-io-packages-eb289c04fe440fb915d03cc66b1010bf5c6f397a.tgz","fileCount":39,"integrity":"sha512-naPn6XOQP5CwfkbdtEE6oyrgxvmP8zKj80Q1fw+g+YE8kyDKO/J3SIQLohyryK/sa02xK0VidRaETjpQ+M21PQ==","signatures":[{"sig":"MEUCIQC2ZuIFq88s/xBShntDvl8Aiq+VeEmPaWZBdnkThVhDCgIgDt2lXcMagFvrloVG/K+O2iPi6ZecMu77VQmxMgxOlFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjRoMCRA9TVsSAnZWagAAVG4P/13iSE9eF75gRYjbPROv\nLKhxa7DpB5MergAlikS74OovkzKiE1aeGyU9iNPTcy0SsKbajDyDYDT+k45p\nLHVG+y9PLay5ZQt8mCJL27qXg5rou8zGr7fDFFJpiqmgM6vbNND2YzELx9Yx\nAn/zPF8eWIaf4T5IWvM9X56Ei9+isej9FxvregC5Trrb6VwHiFDa0UQJBlst\nZyWTZAlPXdbDk1jDBkWEieqar+HtmR5Yki7QyWdpQ5jq6MZfF9A3DmEeiD0X\nEPl3IfgqqWeh4/xpnLCZYiHXTd7Sc0imDnBuLiaL5xbJqP+Qj4N3+yazNRlW\n1SZh0nPU1qHP/wR8U8ReLv9uAiCPDCUC8KiUYh5FZVSFjHJdJ/2XKfkvnR1M\nsIbOVNubR8abvRTJB4P7FxtX9zw0EXqEipQL+GZP7aflKugD/Xu43eAlXNK2\nRCht5GQnbL+lbTXAm9l5CzOL2tWIa7LgIpv7FOaqVLfkWiq0Qpx4kmtccZHa\nnMguSnZlyifqj8DclVMeZ1yDKsaFqriHwDy6hv4CAi1kYzUR1U+C4fuJ0mDt\no3fEj3A/MQaL8/fzy2fQXPnqXPlvBXlPkTy6Kq0Tu83jLfxDbjY9m6QlFahU\nN9ESy7Nt93XI9SjO9ES28/PL7RGMRXR+rTuKvqn0+BOtBs8aE78AjhxpZJTK\nv6Kl\r\n=eZ43\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"eb289c04fe440fb915d03cc66b1010bf5c6f397a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.75","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.131-renovate-major-socket-io-packages-eb289c04fe440fb915d03cc66b1010bf5c6f397a_1619859980024_0.15644612433945748","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.131-renovate-non-major-1ca3bb3736aa471bf8a8c575a7be1d4edfc40ef8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.131-renovate-non-major-1ca3bb3736aa471bf8a8c575a7be1d4edfc40ef8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.131-renovate-non-major-1ca3bb3736aa471bf8a8c575a7be1d4edfc40ef8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c65c7c525759d78d7bed397ddb174fb17c2cdaec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.131-renovate-non-major-1ca3bb3736aa471bf8a8c575a7be1d4edfc40ef8.tgz","fileCount":39,"integrity":"sha512-bZuE9BsDYgkSjM5NdDDEDHwIvkBuu8dsNFutNGysTJtGqWNHPNYs77W37qoJiBscPn6zastBfrqUx2mP9jIsZA==","signatures":[{"sig":"MEUCIQDgKXvlmVQ6lrOnNUpP3YDXY4OBCaDcsSR6eg6H+ic6/AIgEsPpNptVMY76dU4UW9wTAeN9jmD6pVBDkqhs4smsCLo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjTzcCRA9TVsSAnZWagAAuzkP/jGYXuJR7gedLVeJDqby\n/3WjfhIcA0B/NPcQWcYF7j3gjiCtOAKVrW8IX+E2+gZpwlK+USLl0VDzjESW\n2l9kB55x0SX8+1ROUUpoNiNqKIxFwwsvNHZ+4DA4l3tcLsIJ88SP+uYlauHE\ny9P54IAgn8hvuBeYhn5GYLYj6xskcBE9KfE1toqkAk5P1qNhWARDTNCtL1LQ\ndgVvwd3ac+uM/tpdtCO4WjWeYKlrsMhPsF23ysfwg/BH0pR4UefPzMBVP5kk\nw0p8JDl1QieKvHns80mdWapPUt8z2y89GgU1rM8DrSLlB+7LR5r/nDz8izHJ\noZG5Upu3P1kDkbvBYmtc+O+2ud9RxbxBEPVRtk/5F1WL4gRbA4HitDZa4G6X\nhwYP8R/VV2edK71jTrdB9/7nOn/suDrVCvk/rvYhjAg99cILGF3+QTZlDjil\nGKCkd7LjAgBlnn6gJJ+hRsb6/Z4jjjtw3e7ESaGiTxvUV0AMMpuAMIjscbUN\nXxKdG/yRkTBC3pUiPlzU0LnM7tOdlxRGrvEwWXp31CHrew/40Emdhvwb42dF\n1aqRweXI67laskSiCT3OOYWBG8zWSWC9Mj5CLn2h7Abm3FjzbAlhTPhFeeoD\nJrPh5Kpr+q7S0C8mbk7CGoU9amUWRVQeAilnNCR4wDwqHDCYa9WDbhRF6ftX\n4grs\r\n=TFUn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1ca3bb3736aa471bf8a8c575a7be1d4edfc40ef8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.76","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.131-renovate-non-major-1ca3bb3736aa471bf8a8c575a7be1d4edfc40ef8_1619868892400_0.18111295307152786","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.131":{"name":"@balena/jellyfish-client-sdk","version":"3.2.131","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.131","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f9a71f27f1897b37fcc30a37c15f19c2ae7b45af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.131.tgz","fileCount":39,"integrity":"sha512-NWvyXFgvyjG88hwhFdCaLxnxr3+xoH5SmyyQJi2D1e8koitOT3+eEoOIZUm+bhCF4qPHXP/o78QQ8MVVWZt+ag==","signatures":[{"sig":"MEUCIQDWJf0L7wznSA3wETAh/Mca01jk8bhMkxyEX5EwoIvi6gIgRdSdXavgb04c6BavRd0+5lvbvj9f44b2mQrNly5RvNI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjT2wCRA9TVsSAnZWagAA0qgP/26MTfoUZONgDgpOb0rx\n6ezBrmct5P4AFOZCrwdcQTVJRgMHzr7AJ2VzDPs2xt7k3wxHfB+Q4KtVtKp8\nybd7k97QFeQZRolqwTgolF+nRqzdY5nNZqncM5ERUTJKV7OjAsRup2YNa9Lu\nkZQX3byJoNDGJxDVtPpSJLpKBA03Cbn05dHzHnRSJSKMM4qfJ7vQO1ckDmm3\n6mzFxRJ6o1ARqoBsPG6UYDvqr/dlqwI7Cx4CqU7vM7WP9dRFNGpKShAj38/9\nLdSLP9HQHuuuLsYDxpz3o4xH0py1O3mCcIdL2pY+Mn6dLDQ+o72cJBNHndBa\nadZSJteaBiISK/K7o9dWw9u3PezUt1UDPzTa0UwnU92iq7EfBPySMFNknaCC\n9EQuwc/sXO8+Wb3zEPQz1RG8IjI9DfbzroBOYY2NSkml4nvrMGCn4yy5r7F7\njW28z9KGa/pCTn60/wlHhCzM+GJG4RhSDbmImYZwbJtkMXrjuQdBniuOtbHe\nMUIESc84gDQ4VKOYiA0fZ04LnbeMPM88Xpus1QaMQ2/uZ4gMV+fo9KdIYxgr\nmGBsw5dMcZ27re+6KTEfRsH/NE8PHhUccTBtQL5kUiCWciB4QQwrOnx4K/KE\ne8QBGu5jvcRcBRdmirhNrYfAQVnOb1V2mkRGvezA1luNNjjETF5cxWuRqkQG\ngkp6\r\n=Jj3K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"11076698bd0cca3d8d1b98560440536305334d25","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.76","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.131_1619869104420_0.8791435236174139","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.132-renovate-major-socket-io-packages-c3358945df1f8f0fc68cf2dfca7d739945616b65":{"name":"@balena/jellyfish-client-sdk","version":"3.2.132-renovate-major-socket-io-packages-c3358945df1f8f0fc68cf2dfca7d739945616b65","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.132-renovate-major-socket-io-packages-c3358945df1f8f0fc68cf2dfca7d739945616b65","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"23199210b5eb580945b338a25e7ae457f92f09d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.132-renovate-major-socket-io-packages-c3358945df1f8f0fc68cf2dfca7d739945616b65.tgz","fileCount":39,"integrity":"sha512-csTKLw6HM96I8U2bOf8IDnggS3ymaSd36XYBOmVxpNUSEYYhepXqWaT+4zcf2SsdPrIJwnUF2cXBaabFEoF9Aw==","signatures":[{"sig":"MEUCIQCA5k920DqHq6fvWOLPs4X5oSmENEIdllgCXoZqMLlnRwIgea49ZRTJ69GevfHvIi6MIzNluNFpbRV/HYooiKBvRt4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjT57CRA9TVsSAnZWagAArYAP/RbJvA/JBDIfdKMPkzyC\nHTtTWCuTyvv0yBzsJAHwIrv28NtuCB7udXW/eMTHjzFf4BzL7SWmvCNMqImL\nRSwGEWAjketiYu/865MgGgn2Sy7cwMe9k2ap3Av8uayODgIFgQvg56/OrnWW\nLVXVl2WNmSNLUMMXwiknBswdvI5bprf03nqQXHI5yl6g2w5fZpqzz04pCw5m\nuvlpTwvn+3Pj4CeEWB+vScXuLviHAJrIkqUBZf3QxL7kCxv3uMASnRYus6OJ\npjZQQRAW1Ze9KRq5AQG2ZfMCF3war9LFRbzZpSkjbZMoCwGtehKxliFtfBsw\nb2SO1KdE1veRmMVgh0iJqhkWVpc2kdfGcHeFjOlW/EtEFeobDjZtAA+Bp07g\nv06c7zNVAMt03e6DgfqsEyxnh3dsXqugv54YdP74pr9Q+ISwU73wwFYj63uD\nLb9ncUW4otAbQROJok7X9oRzq149t4IKc+f/Sl08b2lGIwR5Lr0jWzmktYuy\naY+RLRatauMpOVTE+Wmw2nnaHQ7lcdpAXh7KWKtg+nIsp0jEmRR2GijetwLo\nrOYN+GtQeImmW2Cbu6mMlhq8JrLeWqlVYrbHo0M3ymaR37dYUkBHdrWC8+FU\nSVTKYWdTxbeLWTMQTASQF21lka0Cch9QxPaUb0W9SZM/Jkw6UUkU2xP0z5sU\n52wY\r\n=z71a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c3358945df1f8f0fc68cf2dfca7d739945616b65","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.76","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.132-renovate-major-socket-io-packages-c3358945df1f8f0fc68cf2dfca7d739945616b65_1619869307102_0.6620587413279162","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.132-renovate-non-major-90b55afdf6852b026d524eaf432aaa6a04373f21":{"name":"@balena/jellyfish-client-sdk","version":"3.2.132-renovate-non-major-90b55afdf6852b026d524eaf432aaa6a04373f21","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.132-renovate-non-major-90b55afdf6852b026d524eaf432aaa6a04373f21","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2ffd14764632fdbc744c9edcb277b2ecaaec3391","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.132-renovate-non-major-90b55afdf6852b026d524eaf432aaa6a04373f21.tgz","fileCount":39,"integrity":"sha512-6FGKMkkfxFwBCpagh5vqT5HHVeGpPWAZcSTU36kfDUfO/xHMNUxfyBa/Yj+eMpQpaZKJQHbb/460IVSyn8cOMA==","signatures":[{"sig":"MEQCIAgzt6Mydu0ZZKrcOTVHkuQELGHHg7wPXwOEzAU24R3sAiBR/Cpn1csP/2bxm4XE0UjhKX/7OdFlXtkSsG8SH57NKQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjVQ6CRA9TVsSAnZWagAA6lUP/RCPr+gu25tcgX27igpF\n1gKSRp8efizAJl5j9kmct7mljciQsOSIghUQM2CFcVN50ew+gFZiOQ81kDDK\nHbuFs427aQCrOF/0a/qmAAiRek/2gqlzULgXE+fiHb4klYpEp2fNferirDmB\nIp6jgYaOrsrz/X5o2VS9US2qif9o88XUnEEkCO6M8OpwKsdzkRwjaZIS9tCF\nhdmHuxib4KQNsgG7LC/c70lkLQ4Fhb+ztqKEvs+RnhU1OR14xTmIehmikeQu\nje4N3056O5YdJOzw8zioWYRgnHQ/8lXV+E7Ym8PqmnRQo8Xr8MiS9DUGyUtN\n1SaJjGD/jR43kpiiC3V0ypvHi9/RELAyerVWUrlmrkZa0IV7pXQMapTPOQZi\nZ2l69cQ8oga2D7ZNuH+lUmtmiVH1T4b1eKMeTWVkjDZtR5fywad9DXWDekD3\ny1U2brKnLLNU7omQlzKIJzut4hQ0iZP7lpe0YzvQY6EpLvp7vM6k8ndhnM32\nx7DWY6rUf8deZApZyhbt/IADBZrl48UXxPzbLnAihEdVfv/2s3/ESGt4r040\nU5wwGlD45d9zyb2HiazwYlavBqmBoHO9DQ06pvUSDDHRjNoAcgFswv3iYlR5\n8UA8qu3vpD7YB60zuSdc5JSjF3+MeaU/lkKSZTbhrLKWdYMIHa/QnY/a8nLr\nU+kt\r\n=QZ7M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"90b55afdf6852b026d524eaf432aaa6a04373f21","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.77","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.132-renovate-non-major-90b55afdf6852b026d524eaf432aaa6a04373f21_1619874874483_0.30542647307015836","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.132":{"name":"@balena/jellyfish-client-sdk","version":"3.2.132","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.132","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4b1362ac62113530ee4cd805f42d9bf0842047c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.132.tgz","fileCount":39,"integrity":"sha512-r2MFhA3KacOp4afhMh6B3o5LZiQ/LC/vO0/gfXPTqXOCrl2PTMn4qLoyrCvnhdh07CBrxObMNHqsPK8YiDOGFQ==","signatures":[{"sig":"MEUCIQC1M/dwbs87AnXdKQFs/hi44tp40WEu+npSCpNbEaXtYQIgDKGSTo46mz8VM2pb9tdkCjAW0TYcGj57FOkm1LrlFcc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjVURCRA9TVsSAnZWagAANAEQAIc9VhAQqdGn1Mu5UVwL\nHhUhwUeavTFKKYTR1S61tye3Yba5Gx3W6fZlsAPmaR2YHQ5+Xv1Qa8/xDw5B\nuwsSc8MSV1blDZK/HbiDlLWuizuns2RCu1YTTZ1h+2ifNtDxF+XkXk0K4gMI\nTEoKhrMyvpOyUaSzK0CfQVkRSCMgwpEKOWR1NLModm9TkPdNxkrf+3xxBfKk\nzTvVfWCSkmpXzc5mm/Myy0c98OzHoqzFjDHHt5+Ew4CQnrCeXnVgMBPa9O5t\nyXjvSqPmisxUOWdk/hxgDsQhGdbnrSNNxMYrdi162HRO+82yff3X06B16S3K\nKWKBHs0Av009Z5oCWTYqTqyng5iHrCQrM36l7TkLwIpKufIHp3V26aXsam7e\nnHnqvnEMxR5fbcJM3SrLgtezBKqnegsJK7vThdv49qccns8s2tAiEZzwhePr\nmQZ172+zJc4glEKAVLsOtk8j3So1X1dv9GzJl6My71R40E1L2maZMrh0e92t\ntmGtnTDeMCAbZsbzT2kBKd6SnGcFPRogzEjVRFdgDYG5f5QzIT0Lv1hsNFmb\nLSy+YfJ59IE1cJP7lqNbozXxavxqBv4EPb+cKuopR2xPr2NVE3rXGnkyxdC+\nfnR1gbyOVMM3Z2z0fGTrajlPzd3yZdJkGQY0FFSDq7pgbH7GepwZeEDPfjot\nKKBA\r\n=10iz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7896c02b938eb0394a67ace083994336d78d68c4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.77","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.132_1619875089401_0.3415881586067373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.133-renovate-major-socket-io-packages-5fcb46b5385583b922ee071997873df3f5a8de85":{"name":"@balena/jellyfish-client-sdk","version":"3.2.133-renovate-major-socket-io-packages-5fcb46b5385583b922ee071997873df3f5a8de85","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.133-renovate-major-socket-io-packages-5fcb46b5385583b922ee071997873df3f5a8de85","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"98534bf13bdeef4b3f9d634c6781148f09b32a0e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.133-renovate-major-socket-io-packages-5fcb46b5385583b922ee071997873df3f5a8de85.tgz","fileCount":39,"integrity":"sha512-rjOrJO58nF+78nv7sndqy/MmQzEgJ2J64yovUdOaiexKdlW6vzx0ht+5VpRcLre9L34xkx5gvDEA/l0YGcCVWQ==","signatures":[{"sig":"MEYCIQClnCtT73gke/tzZ4p6KL3pUJxj8MXhcQKVPYarUGtexgIhALTyM6HlQmN4I372wreBlFmCFb1DhMBtMom9A3v5UBv7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjVZ3CRA9TVsSAnZWagAAvFMP/3gstm3QXL5GHJgs9F5K\nDlQafQjBO+jmltskqMtCWC9Rxqbu90/XZ+IGRVUF/6W4IgQslcWWzDSwMmyl\nuMQfv4YKxKTVFXk58dpRd2KKyfTzETpkEPU7uX+QjmThfsttHYlekvnzWF2/\nAkQId4QTW67sgYNMev0LsBzmjDRTo77gXcFekrze3FHS+ppuLedH27ozcmLw\nqjPQkwLFJ0AFbE0y+0dliUfAFo/n+S0CfhmLLLC3oloH+9AorDNL8Ywj773b\njFT2IciDA+4JdVBrs323kGJKl4eHCjpkkFRJcCmOVzcRHY39WFFqCtbngeFW\nZvtWLOhQM1lF8tc4+NPdjAG7+BxPVcIw4iziXaxv4erRNGQlRIFbDDD0ENSe\n8HMBLlPY8IRaqEbBRbnC8rHzXXshrdF0NAgDveg0T/mkos/1hU05RgpMJltl\n5WvyUo3qmLM2HF9X4r2fAVwmFhvmvMFRxaN6MxKOXCgzMFkTHjzF4D5EDIkT\nNEmtRoZSDByMdnmHHCweNXt9kS1a1TuWb1r9s5dMgm8W6QMPOPvclgTfAaXZ\nMGVIsys4mcQiB5K0AObAaG/u0MlnPHv0DnMeiDlYZmt/8zHPIaQHar4Ns8y5\nlroBpeu0E4267/Vtnxj9Ny67S7r9IRl218cox/KVGCEGCpQLjqntO4bILbx8\n/jfT\r\n=8A3N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5fcb46b5385583b922ee071997873df3f5a8de85","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.77","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.133-renovate-major-socket-io-packages-5fcb46b5385583b922ee071997873df3f5a8de85_1619875446718_0.6139829762693159","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.133-renovate-non-major-4a4475f0ea26d439a9e5aa49d7625113bea0d931":{"name":"@balena/jellyfish-client-sdk","version":"3.2.133-renovate-non-major-4a4475f0ea26d439a9e5aa49d7625113bea0d931","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.133-renovate-non-major-4a4475f0ea26d439a9e5aa49d7625113bea0d931","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"569749d5e457e2a56c4136a746d7e1fa6bcbbb40","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.133-renovate-non-major-4a4475f0ea26d439a9e5aa49d7625113bea0d931.tgz","fileCount":39,"integrity":"sha512-S8TyeVGfHNDmDo0cxf4qXFVRSzBtPtYadzboZfBE62lfGQVpOQA9Qr1btIG+bIbEUOYcyvozjrqwiDYInzTz9g==","signatures":[{"sig":"MEQCIDnq+XIHI/4hzzHPrsEEbmOREHR7BpQb5OTOu5xsmIVfAiAWJD3vCjJKNe/EbjeGqFX0XPJWua2ITvPB2GTwEbdf+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjXdECRA9TVsSAnZWagAA6P4P/3w2AkeDyj3rGIYZyFL7\nrunwS7U0w34jU2W5sBu35/grCt7Lcl++AvJ0Gg9iJfn8qqUVJYwJi2bRyYLN\nsSynfNhh6SRlNCIQLCOkbM9ac26fwXia/NEn2Z5Gd5uUdrv3q7QZGCCHvXxY\nN9P//edIk2MfMcpsXmqUzdYMyfGGOgRcSJjeYX3ojv0Wgp1MOWg630DuSlLn\nif3vIOjImM+96qWzG93OKGdzk+fYRW8ewqAywmw+j145xhBUX6kvePwyd32c\ntEMKb5OxTCDAeio/0wTf5uAdstCaSHAUatA8sMrrSLhveWvkgtpVj5N4a9w9\n6ndLzgZHELF1L4oOjGKM1TTwTBNK/PQ5KLY1e/PnJmMh+0I5HffT91RoGmYF\nFSeGZIWP23yCxvDUpcDHCfREmHtKME7eT3OiZLsYkusLkoOUfS1ht6zAldWX\nPbhIzgNvQYj+C21XnJcpji2I8lmWsbAew/BKddloqzCIHV2vQ60W0UhVSm7J\ngJILEioh8ULya1LLl2s/nkcDkVUnvKqLNRCa8WZxLZ/CTTXmqBoeHSa1FeMR\n8BG7TNVmPxuhJVD+Bjy+jqAX+7f8YP8kZnPyyqGJhgD/rneKYOHOkFZqlUDL\nb2+2c14uFrv6Xm576hQdW0BReioL/6GZJ541I1jjmPDCfmkutx6LFUc2ok7x\nrpG2\r\n=iNmX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4a4475f0ea26d439a9e5aa49d7625113bea0d931","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.78","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.133-renovate-non-major-4a4475f0ea26d439a9e5aa49d7625113bea0d931_1619883843721_0.24927043261972592","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.133":{"name":"@balena/jellyfish-client-sdk","version":"3.2.133","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.133","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"433486cafc9e74a2b033d132b675eeed835c2f9c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.133.tgz","fileCount":39,"integrity":"sha512-gflEprWyxj0u1GUuofHp4Q+BCmX4MimtPYT9QduSxc8Q162rd0x8KneMCcM1cjOunca0w635hUsZjSNuSa43Zg==","signatures":[{"sig":"MEQCIHwo4YfGqOOwsKnR86VqAyEl+aZL9ea+kloeH6c3iu+bAiAkxaQqTKApA0shA36nsbJvw7rfrR54ZacTU0D3HPV81w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjXgkCRA9TVsSAnZWagAATUgP+gLOUB9CTIRMepmj5iPE\nG9K4zpYv188tyQAd7wmRv917xEh5BREXqjA0uZkckINHiXI0Xi3mGEnFCs+O\nbKXT7JAFX406oKLWhRrRoVRQdK1auAk5r78o43qE0UT3mTZ7R2qgZnT00XPM\nM6rVlp+LvheFc3K+9xnpYbWUVu/WT1ZCo2X5XtscMZikJKHAJRFp3ylSjqHw\ngH+dC3JvKS0tUOTxFT2/Dp/cRvqn+nne0FvZsLgEPc3j4JPrrlBz9IUEKWet\nRyOdBFqCzHjMo+gK4aJzwfJi6PhmvSixXqq+uBjYtuEG0zeQfufbG42+9X/5\niSb//fHxSqvf437z/A5BWboi+pR0XgfNleE0PtdqhiEKedFrUL12i5JGyJII\nsNuLJdGohiU+p2K7ZrhO0YhK1bsOZ+kIxBmOgH1r0ZNbVMYy1BkcBDXbTta7\n4CpCbT1SZ0xXt6yiiv16L1gzLa16+8ZQMhu3ZRtY/ZBSN9SfjpdU4O5CiDuf\n/TJajHEoQrF9vsPhqKMZW7ymHtGlqLDGFO2HGvGSlkz0Ny7/nIkh+IUma9In\nnNZBQWo7PUa7t9JUo8S1+D8Y5heHXDKwZbytCp309WPtDWU7EGcp/Tvg70oc\n8jGIrPxR3jpUnDs9xQKQU6sjfAy8B14QZyh/zFqyGcIy4JYnvXDkojY+0cdL\ngUJe\r\n=2ZXz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2c61fea928d7f5d38a714e932e1d2125bcfd028c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.78","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.133_1619884067935_0.7720334515035683","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.134-renovate-major-socket-io-packages-584be0c56591a5cde2fd691a8d93ba428fe2dbdc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.134-renovate-major-socket-io-packages-584be0c56591a5cde2fd691a8d93ba428fe2dbdc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.134-renovate-major-socket-io-packages-584be0c56591a5cde2fd691a8d93ba428fe2dbdc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea282d1451a7d98ab5c1c957ac272cb82672c777","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.134-renovate-major-socket-io-packages-584be0c56591a5cde2fd691a8d93ba428fe2dbdc.tgz","fileCount":39,"integrity":"sha512-G00H+xTW4kvBOMZfWG2Jc/jMOHfkvhp/aj74AX23INDO3VUQEnVrDLalxLTIJFckqWoSPNIiikoF9tj90Fqycg==","signatures":[{"sig":"MEUCIQC7j6xmLblvl/lb6Kf0dJdtIMHIAio4Y3qjbTEz27eEOAIgYTbOz2xR87y8tQy9AqhVVR8UgW9lOhgsIYLG1S8OmTk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjXk+CRA9TVsSAnZWagAArrkP/jiKdjJQkUyVuKlgysR3\nS4sb6B9xQEQGmYUIxWYNbRQ/glTZuA3dPAOTYGBUP7cZb9widXMOPAJgHvK8\nULXYdIr5uyR6dmnepLyIE+sqb779RDCVFCVRfEdPxpc/n955YxEmyLIRZ4h4\nSRU/SpLrBV2wiFXJ3VtaF9gu8KM/PhJTwygkOJSaGfvaUgoKCmV/IT/Gz7ay\ntPcRL3lpK5Qb7UsjbbjaoBINycLeK7r4EdOaq8uJ4ovZiHka8wRwmmR026tf\nzGGBljJL6Re0uRDmkLIPyQjzT7fETd8xmunpoGFtMVFmnOOsHfCrq4J+YasL\nmM8zscZJWF2+CFhsgOxnPvbNYDm9Ve2A8tOt+4MPD8qDbdXK9nonmFti5LrF\nJjPXSJfoMMHKHTWek8YruC967pEl8tQNDgy04NyVeiQ3rwFTAeDjQuw21vhY\nzHZJ1gDugP/e2LuY6Sl4N7uMO8oKpQBWKGHKrt6p5gSyQnHnzgSTQqxBkpKP\n8XIvHCXsF+hhpsjAisWHfIu1/+fPP7ShjkMC+2aeWjCy7dd/SEyriMPvWjZW\nHwXwYaCYmFwuYRC2c+C+LK6sBuvBiGUdSTo5cYqUkigwCkZxV3TzHGOwwmNl\nZYuQ9xyjJGeMyv0KWc0Bgsfxn+yy1So4y52gXwmYnk21UpuNqpgquMj2eUy8\nTaBK\r\n=0XW/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"584be0c56591a5cde2fd691a8d93ba428fe2dbdc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.78","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.134-renovate-major-socket-io-packages-584be0c56591a5cde2fd691a8d93ba428fe2dbdc_1619884349633_0.7361009866688419","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.134-renovate-non-major-b4b7606cfbc7c77a09633822c8baf6d61dce28f1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.134-renovate-non-major-b4b7606cfbc7c77a09633822c8baf6d61dce28f1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.134-renovate-non-major-b4b7606cfbc7c77a09633822c8baf6d61dce28f1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4bda1a903c3900ed54024718011b8a43d17d4447","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.134-renovate-non-major-b4b7606cfbc7c77a09633822c8baf6d61dce28f1.tgz","fileCount":39,"integrity":"sha512-/4Ts6thm2wIfPQuoMQRUlVO1O/jqlFu1JvX/kqqkENbalcdgEHoJSz3KRuCxTEeAreT2QoyL8tv2uHB/vUyI4A==","signatures":[{"sig":"MEUCIQCpwBV+3+6a4xhS77bGdAZUSTWG43sj/c8JKXlFgyGMbwIgFGztFH3sHA/HgeiCYZIRonMS7RC19j260a0q0yDROeY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgje4lCRA9TVsSAnZWagAAvbIP/1rrLEXA+cnTnDxiHCun\n+dHZlWwGVCnk+cw0IKUkP2jx2hsWNm7RvDja3sJkXqORtwNha8zLp0c8sSUV\n20ERwF5uFahPZHYtRL76WmkcR5sVIwA++LWdDI8P+PJfheWhEJ2zyZXngBaJ\n4YRYbjxh7kOzGPcGu+400AAEqKJ/rbGGGZwP/nCe1gHdknVz1YvJ+JUhez7T\nPnUZ1qf9eHSza0ztZzHEM5vOI31RMB7so5suCLdbbpEUHO3QQQ+Fpec76CxN\naaEfvpCr3+jVYH8lNMxy+GcOqA7AFSlBQUlZLN5Ni83QMo2vp+Nc2o/zsTa1\nHQqlXa/Ko4UhN2fIUUJCnw0ORCvQ9X5mUo9ruZBf1evCOgzu3MvyXnM9YNFh\n9a4XNilKemGrEwwwjpEUtuZwJvtH7kZpDOs4eNWtFMtV6EbDF7aX1RqF49hj\nLGQEivuPFVCsGyej2JXg04hMdwKjdy9vdscTWxwKtklCyWm8J6y5nVWSHeh3\nqNiVQpmCKPgXIJ0nTT9yYBvZP+kirVSFEF6fpX7Grwfh+m9no6jUHoSQ/euC\n1SUnn0DODRcWxoMpHYi5LdppJ6QyxrbhKYFfIg6zLY7op3C30CHwkV1T/kuA\nKAdvZlLFkl345VRz9Bkl4WscLJrivOS4cCcsGiIHWwfvTnSvtJTpyJvE3aZU\nv9u1\r\n=XjjE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b4b7606cfbc7c77a09633822c8baf6d61dce28f1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.79","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.134-renovate-non-major-b4b7606cfbc7c77a09633822c8baf6d61dce28f1_1619914276956_0.14732773932605991","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.134":{"name":"@balena/jellyfish-client-sdk","version":"3.2.134","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.134","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"266111d21ead07abe1d4d1eeff36c020a9b43697","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.134.tgz","fileCount":39,"integrity":"sha512-yiOJ6lYlINTBnE4g61ZH3yDU3WlE9gkJHaKczu1LtI23bSq3nPpAg7w6ZYiUZW2NccQ3ZcyCpk7/JH6al+ILpw==","signatures":[{"sig":"MEUCIGu7NWVL0udnGjqdKEXVd7Fk64lfEj9rzqYen2Tw3CkEAiEA91DiQSozS2tWK2GTvHZ8dQwMAk3YcrhFnxVkLVOxm9M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgje7nCRA9TVsSAnZWagAAuZQP/2bINRDBmH9Eb6OugCaM\n71u/sUDuiLoTETMc/bzdD362CAE878V5tWHbhnVwo/0FQgz588yrkRtEo7W6\naZKiVT0cwFOJclbkJyTB79rRZodPQcKUvF3I4zRAycJvuOBkle12DxZ0cgyG\nD3ESMK5SRHMcU+vl6txfFSesnP4zDzOF984aVZ8sPXG/2tATz40Pe8ZPiT8/\nrWMOrVIChPxBUvEqivTutdr3MvnAlfZIYr/0q9VxDpr+TuEpJPXaHB3RAGPW\ngXl6peh/aolss6WFZeK+Vnr/8YyLdSSVefDb7iMr4w4Bqpcr1tlxF4pmcyCf\nog/H9inO1bavFE1fFv6vl0hQeD4wYk1Zx4O19qLuPVCmgfTU3vmi7xo/Kmqm\nO314tzfpCGZZl4T+wdDfbVaqa8A4he4Hd/mg4iB4PpuavfQQaAHgM6M4Xgzo\njGBe4KA49NEew1qY7bVsqGHw/e0PiOWvnYwbUtRYhQvXv9vANxtFIzfov+od\nzuNJ8JS8CiZrQeL+zlxNHdpDeP7RTGJI/W7DGbGnGheExboxiBbPfvmtGElo\nOuUVF3RwdO0xaLxOZIP0AueLeQDMKBMnhVrHcA1o+qASejX44iUsguPayQar\na9Qy7L4BjyKJZCM0HKDnJvO1xqVC+dgMMKQ4Q49IBXRT5K6Key/9jQ7oXIiS\n2Xjo\r\n=TaB6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5cdbe49d57778acc4b0e60a16fb05760bddd18cc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.79","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.134_1619914470611_0.19667906496731935","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.135-renovate-major-socket-io-packages-ffeb0cffe440f1ec4a17017126da1c3bb519da68":{"name":"@balena/jellyfish-client-sdk","version":"3.2.135-renovate-major-socket-io-packages-ffeb0cffe440f1ec4a17017126da1c3bb519da68","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.135-renovate-major-socket-io-packages-ffeb0cffe440f1ec4a17017126da1c3bb519da68","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"43bab022335f3652b57b59d4c85b51a46ed4e0f8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.135-renovate-major-socket-io-packages-ffeb0cffe440f1ec4a17017126da1c3bb519da68.tgz","fileCount":39,"integrity":"sha512-hHnL1+UtCzXFhOrU64q2awLWBCKXR937Z/jBrhj80R+BhlX5cY/t9nWjFY+kFy3+rhnp8lx3LrsXsMkt0eLt4g==","signatures":[{"sig":"MEQCIDtoUfvO/wbbFXybFjKo8vpxN5JTy1WPeYBXY/S+FyXdAiBBdi5UQombjfYQhXU6ZvLHWCgZB/th7HoXOsTbrnY9LQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgje/oCRA9TVsSAnZWagAA6LEP/2+QTHR9sKUxofUtB6eg\n/mxAspiuC8WcCNwnobybtIpJyxGWkK31c48qBsjbPYWgoqqMCGDko6/G2bx7\nNe7sLMW9kpTdNsau1grgNHW3tJ4q+8OXeAMvY0JGdDHri3R3ZYxpTKdVSOUy\nRmjw7eBORHupViYKmBx0m8B/gEkPqADsOEsLtejHIxVlSkkCRkPsfWQRBA4d\n4CL61G1jmH4EoYXQU3drVFkOdkrmEk8pVfUwfRZFAyGYjnt0XIHbKSwOabUl\nDRG2CDPhWaFE8x0aQhJNGkkf4bSX8Jqf66q3jrcCJTx9MYn4lqg/HztGw8K7\nHh4ZgSNF3wCXM6UDMtVBrMyWYt1Qs/OzzV347uZ8uqYbDx8lhXxXJRJUDjnA\ncIQ/1N4O3/wCcn2qYP2cqffhcYjH+fkmqE4HwPA6uRvEM/+PlO/l6kiBxuIv\ni2+Le6tVCGn/cKMOE8VnFGQxDWoA7+BPH/vR8/HEFcyHA4Z6jvOGJzbKBvZJ\naVu8vPtxsm2E1bjaM1Vx7XcXjyehQubLvwUCTkTsNEpKIr0tUJrLPYpUO3/j\nv1cJ1encywY2miuLOrab61h27CVFw1bUDOHtV/jg+TIYloiCjIoXSAmhckSh\n9NRxlGz1prtL58Ghpfk6/H8m+WxwP4cuYgp6NWpIr528QBAzWm/Mvm1IG/5F\nP/Wl\r\n=4lK7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ffeb0cffe440f1ec4a17017126da1c3bb519da68","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.79","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.135-renovate-major-socket-io-packages-ffeb0cffe440f1ec4a17017126da1c3bb519da68_1619914728053_0.30940597502734235","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.135-renovate-non-major-7eaa961b9a2a2bbbbcc887cbc54a3f279235c646":{"name":"@balena/jellyfish-client-sdk","version":"3.2.135-renovate-non-major-7eaa961b9a2a2bbbbcc887cbc54a3f279235c646","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.135-renovate-non-major-7eaa961b9a2a2bbbbcc887cbc54a3f279235c646","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"61139224e178bcb463d69d0f029c3f201724cbdd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.135-renovate-non-major-7eaa961b9a2a2bbbbcc887cbc54a3f279235c646.tgz","fileCount":39,"integrity":"sha512-sCttBGBdewg0FdRGo7hHSG/qOzjCOdjSQMzm9KE1TP5xXqGXzflxY1zLpaidwroKIv6Za7gowiP/xaIr01xUqA==","signatures":[{"sig":"MEUCIQDOEZucWBZQnF729Z5Pm+64sQH02uhtuPuyjB2bM8sWJwIgNRLsvrRNa/DYutbDYp3jXc77DkJ7T6ygZjUaDUOj8LU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjgRuCRA9TVsSAnZWagAAg98P/0IVBqncTgDCQQBUu1q5\n1nmNCT/Zqx/zm5gTSkTy2bVkS36wCvvLl7re25QmsXIhrGr8+DAkpB99JsUy\nGttqiJiyuVANDA6JTJa88NvQTs7EuAu4UZq+xkTSi9zp7lmx2qRZtENVtA02\nOevRZJJXdk8VKP9aohZ3//yggW8R9tMCY2T8nijvPCSuY+o7zUbDqN74Wyoz\nvSszGgtMxRFQxHEYy6mUQZ3id4rXSFFhKOuPlOsqBnBW5pknTILBcKnCSZPv\nJkPcG9GX/PzZYdArVG2vJltr2qWiJhSOZ+L9ufPAif7DbbhfOcNSeaZlPbYx\n9v5Z3XUC6t0MOY916lSmBmhK7k6Jz+gJqd/YmzthhWgJ+H+1P/pDlTvppCRX\n541h3pzU4qJjaWAMF9FcoT6QSiW9sjwuoO/5u7JUyx2haxUINkxA28kVL86i\nEw04g/V0ZCxR3sO5/HUTEmoJNTJEBy2cSUFdsbe9nZbokotywA/9IOSSogx6\nxCBNszAJnEZTQxFjCoMKChHwfmpXWsfjIVZ+yESu19DhUZ23STa+hUn/UKJu\nS6R6RoicxNrCzfOJ6vmmbPAzTvxbJBizNMjCSnKyYuiW0tKArqYwXzYm7X5y\nkgBGaXpW/vJ26S9E3GnDXp9tdoNn++OLrCxEQdMIpwrFAmvflg1sks/qx6B1\noFC6\r\n=HOt3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7eaa961b9a2a2bbbbcc887cbc54a3f279235c646","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.80","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.135-renovate-non-major-7eaa961b9a2a2bbbbcc887cbc54a3f279235c646_1619919981191_0.4817133834967515","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.135":{"name":"@balena/jellyfish-client-sdk","version":"3.2.135","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.135","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"59086a20199c10ac2befc1aee308921f59b732fa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.135.tgz","fileCount":39,"integrity":"sha512-ZAkdPPDFokl5zHJdXTmfveXZOn5LYfC3OxorFF8Y4aGU3UTy4Upr+Qc8Y0olIjPLMDrG0G2qmwFu2fzxdUgbeA==","signatures":[{"sig":"MEUCIExlpFoDETqzz2HSVH6AG1huN5z2RzUHrkcGodskqhTXAiEA7fZlkm4psKCLpQJBtUx5pTYmalJATgZiAUqnL1mOH10=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjgU2CRA9TVsSAnZWagAASQYP/RFD+aMFMe8PycB4k0Zp\nEjw4ouppNE5onTaLNEhF/IRxIjBFzf4+Gmj3uS4gIoiKzzKqBvKRS7DauKOV\nZYyXxp5znYYBSa7pIxcs5xqu2I5FqPpJHX7lraKYOoAEv/IdZlKr9ebVhitT\nYYLePA65mCwPpk/GXGk60PSlu/cfZe5Fbvv8rz9BrrNcsokEKflDwPe93pF3\nIjOdtuvXqC2Ys2T+c8c4ADQXTJ8N2kDAAhS2lO6QTLs7zExJMpxKPbd/VMi7\nUmbX1RxQ27bA5DIJiMcy7Z//KSyyCgbjnULZz1WCJ6uwF2npuVgmn9Qm03kC\n/R75drYt1xx3oHtMGCV+eBE7kbr0jx19md/gW9ASFq5Fj6k8IStgWfDBW4Et\nCwMCnr6QCPIBahITp+evdvxzcpt17IxuroTo3ZqZHg692UTac52omZydV4Z7\nLYrrH/gJm+RBzzhgt3h3TouGus/1RI4aDck4sOPS/RXJ9A/qUg57jIupGK6f\nDWKjnv59ZpulNBOsWweqT12ql8+LlwtXTeO8+9/AZaKw6mJFEtiFarxrG2mS\n9UuQkwlmvfoIS7Zw7lLw1HL7vRSbH1i01NrZDPnshCnpPZnQE1ZYuWfuy50t\nOmY0E9de64EJeuXoISBWvUHK4WijpjE55X6xP4fqhDdcaCeVh96Tu6/lGMk7\nF8Tp\r\n=jccj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"523f080378189aa237362def0fa5c1a79edc67d8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.80","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.135_1619920182465_0.7042949474127607","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.136-renovate-major-socket-io-packages-03fcda7fa7ebddc8f2251a09b8bcaba73ef186fb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.136-renovate-major-socket-io-packages-03fcda7fa7ebddc8f2251a09b8bcaba73ef186fb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.136-renovate-major-socket-io-packages-03fcda7fa7ebddc8f2251a09b8bcaba73ef186fb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f46f602bacca65995d85371bdf0105b5c666ced4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.136-renovate-major-socket-io-packages-03fcda7fa7ebddc8f2251a09b8bcaba73ef186fb.tgz","fileCount":39,"integrity":"sha512-5ruXchsbTgweo92AQre1KoQlrM1zgeQKlZkDu3+3L52CJCNjttbcnzKzyu3VqE1PKEiHkgheB/Pu5p32Wb6tMA==","signatures":[{"sig":"MEUCIElSK6PxHRPQfiLCkdZ8J38uJfpl94kq2hP4nz/sPXpJAiEAhAEV6lnKjn0DeR7VsbXElJKjhdquEHRXEZCPxQ3HTPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjgYfCRA9TVsSAnZWagAAiNkP/0NZjHXySPigLtExuJ+y\nHJESW3pKnY+C3HYpPMywHe14XxHCpTBl7v4SzsJM4v92wgy2AYLWeoLPjatk\nd2CrA6oQDcOrYUB5I7H2YXDu9lgnFM1DZfPkrpQsUS13jRdld5t2+ZypnPRj\nPlzWPlp9Z50ZlSQuGdp81HT7tkp/IpiOzKzOdXnSqKO2kkaC3fqzP0CBStwK\nxySeNctWyjQnKqQ2IKeqbcxaS4IyKhabXqsQSye9TG12Ad4O8Faw7NXrPLj/\nC2FEC+Ohq6NfDjPSOsmW2tUPHVeh0O5E8TUB6g3o5E+Nv1nOxlsMBtoFHw/E\nCNHjx80jSFMu7GQIjx9CFTFia9U1WAHdH8N5HC4y0OvxbOtjlkwUG9r/Iub7\nghTwRLIqzeaQweEuIT2O0WdAhrxJORxEPjjeBjqJTCz9xUBISlajGqkC76H9\n0VbVPvPep7lVuPG/uP92RqifVyhBDxjKRwOwAhIYD2WGub4Uoa4S1bhwoMMb\nrUkGbaa7ObarPFZpGlOrCzAhg9GawYtWuSZPDl5jmbkdhsZLMjuqzY9IbX6w\nO8gaybjN+7EdgDv2OxB6M2h0M/18HPdrpm+JO2jL61wkYqXAtEAjhPj4F21L\nSGTb1sLJXlWZ3GVY2Gf2pXecl5ME/wTJ9F3DYdqk3mMlauc/jkBxjnNgzyeg\nt0xC\r\n=u3r+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"03fcda7fa7ebddc8f2251a09b8bcaba73ef186fb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.80","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.136-renovate-major-socket-io-packages-03fcda7fa7ebddc8f2251a09b8bcaba73ef186fb_1619920414654_0.9449465969398003","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.136-renovate-non-major-df645afa770f051a7a647d7952c310f00d4ae0f2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.136-renovate-non-major-df645afa770f051a7a647d7952c310f00d4ae0f2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.136-renovate-non-major-df645afa770f051a7a647d7952c310f00d4ae0f2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"73f4f4b04b21a3362499986c4b75abdc6fbbb829","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.136-renovate-non-major-df645afa770f051a7a647d7952c310f00d4ae0f2.tgz","fileCount":39,"integrity":"sha512-HV+fBE6HHjLLseog+9fDFiwPkY6+WCgaQCIdrclYUlcYrlUgyOLdhlSGCewj27Q1FcnlrRvj/fI+M5/FptFPzA==","signatures":[{"sig":"MEQCIHzOD9OMwli8t0Sg1dyJfTzTX1kUk0wUINirwejzvWcEAiADElpuNtyH9hgkj4X4H36Gv4uqBZdn1ywB4i9HxOVAIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjg+/CRA9TVsSAnZWagAAqo8P/1JUD6nZ5EHpSCTQ6rey\ns8LrAhVNW0EA++a99Fp6DeSEoqs2TOyDetigQsWJHo1yrX7lU2s/d4Hn1nPG\nhzxH5JIzbEPegv8941h19+yVLrUP02FFjdQ62BNkwDDDZhqTLjMxDbjHfNsc\n7rcgsv7dBRaob4ndxR61ozZp3xus73QoVSEOVxnZqBELgN9butY1pp0/amUX\nlM1yRxS6EPyTCUDBlT9j1kJDAaq58sEIvPhABaZzgRhDYEyBOCXoERGis4lc\ndzDguTwydblHv56Is60sKRCIpwKAqoKCCcQ3LTdmOhPLJgniFByP8adr1ovZ\nriWxLYCE0AgxqBySqMrvD6vSuJWunR0+lGPPckrbz1khn1y0FZxge0S/ZzWZ\nmaN+d25yQWQeR+VGFdemSF5mY5WK37qmP2fDahDDQSXWEPZrXkskyLZ5qDIq\nNl0MrQFBcbOl5Og4TR1TCGeW1aR8YTc9KDUjT314pYzc9sWUWs8LowyR6hzx\nws9kPUlc9knYYkBjGZcCMM+6g33E9tQ1/8qXsqG2NhYFelBWSn1uC/ZAJfkl\nMigZJjxM7P3ZoIV91eX99jIejOm8eMnGHUwdwWpan9G48yASKi+7dccRpqBl\nx6LQzuhwXyktm19SZEkVUEbgXD0b68WuyedPVsY90kY/vl55+rYiW4GEMziT\n+91t\r\n=UTDS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"df645afa770f051a7a647d7952c310f00d4ae0f2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.81","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.136-renovate-non-major-df645afa770f051a7a647d7952c310f00d4ae0f2_1619922879457_0.5604935107407814","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.136":{"name":"@balena/jellyfish-client-sdk","version":"3.2.136","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.136","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f3c3be4adca4d1ad5f06181dba4a07a0a3b6f2cb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.136.tgz","fileCount":39,"integrity":"sha512-QqLsRAjKp7n0q3XaiRhu5mkPjLKcHgtLw4eCRCmDgrlFr0mfjvwor0j9SMIKxlyzfl2OPP8/M7LLQCu+LgrXJA==","signatures":[{"sig":"MEYCIQDkLD2NTSSRPHlFaq28wOZt8SBFdxh5LPePZhKWi9vB5QIhAL1gxxIbVu+B8BsWX9cxChDt2hrHc2jpsczWVc5D9W1M","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjhCeCRA9TVsSAnZWagAAm5wP/iFFboyE1Fv2ocn77jft\nvQJxQFGxcVp27p/k7eAi1cRtWF2Gq3/Y7plEs9xfgFumZdIjNVUdLOyDUbn6\nS9xuVKyCO50qV0XKPnwIx3lPM5bE9XHyB5CTMy1vMzDSgvn9Lb+HgY6dYrO/\nziVhC3SPmVgi428LhMC5WAdBsd8j183xa9wohFSMcdMkdpFEDX65qXrfa4si\n3FYQxPgOD02pOLAdXkgRpRZDqhk7HfSpGJ0eZ5nbXwhAJnZULtCE3gdoitqf\n6dmK8rY00ee7cOrKPjfVEClznh91oMLa+8pItMk7D6JfRBlAW1Pv6PN8oM03\njDiUwBWGFDxTWhjUxzBN117fRPC/TT6AgbU5d233pye3LWIwTGI94jK5jwCH\nDTRGhjm2byazzJPW23TH6uS8ccu+ycN5qeEQrrl7DdAnmUpPiABWH8J9HfaZ\nJHcaEy1HcBiWOvO2boTbQQj6GMFPC5P85u5DZtsKonYpU+6KCjHY9/wdxH1B\njqd2g1MjHFp0UxZ8DPwhSX9jw9ejodH5EV9kb7WD51KhwjtI8yE2qCUcSbGp\nvKYt8yhN3r/Vinml70YzwH2qwATn/qf0qGL9Jq7z9FJJzs513MfMSd+DXJzg\ncRxxRz4xtMaRob4ml4jLnLWOHIqGBNgOtNMCsSkPBpTCHPN+8ROPtOuQd3QR\n80D2\r\n=e7oy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"29e0e254a3a3e28e67bf6b37ae17349d1291e3d8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.81","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.136_1619923101650_0.7882635280774712","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.137-renovate-major-socket-io-packages-2bf9c3e15ff0d2ef918e168e9ad407b87ded3718":{"name":"@balena/jellyfish-client-sdk","version":"3.2.137-renovate-major-socket-io-packages-2bf9c3e15ff0d2ef918e168e9ad407b87ded3718","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.137-renovate-major-socket-io-packages-2bf9c3e15ff0d2ef918e168e9ad407b87ded3718","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"901f211e9e7f16c34ee1d28972eb0906503dcbfd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.137-renovate-major-socket-io-packages-2bf9c3e15ff0d2ef918e168e9ad407b87ded3718.tgz","fileCount":39,"integrity":"sha512-QHYc3UvuM9uKlU0PN73eS63ES2WhzlP+MIb9xphAe96fIj2imr0riByjdn/iOygLVBgpbIdodeyG/ag4d7XAgA==","signatures":[{"sig":"MEYCIQCPP+bT+m2QH2nyNs5QeGfmWlGzfn1rT3s3EQ1x1Kv2GwIhAMVDsFhxDHfATJNE2Kr9k6eENeZXrmTOa45/35NF7zkH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjhGRCRA9TVsSAnZWagAA/AUP/1FWX4stkSS1lSY9TOxJ\nBB28ivNdGHhODOV/g9pQKIGgBiH/BTHRgGnvsuNLPLXPN7inNX77siLYImcv\nF8QLAANDVF0CWkb3hx7lSdL8siEnzobuLxGVaonYAnd9RGf6+eD/Z0nSPqP+\nOTh2yuOXaKwvTfAFLg3n5/+1TyQT/eufkCu5lXPdNhPepGP87IUKBRLSXBe/\n6vNXqmfWMOo/UddQnSZqXg5KOxnZwIlHMzpUo/sU29Ty6Q/0mGk5W7ddsnrF\ntj//+m9ici3hR6e8/HCjskUe5DCLH8c5Soyib0C5PlP4zetjHIWgHYEIGKlb\nhqHFsmuftCl/mmVVed9aTVDzIymfE0S2MySIC8YZS47S2pgO++lQyu/XR8ZD\nweph/av6KRQoDSNOuhiI0vCE29B7iG2rbmmjMfzGcN1HFXld3i1SOFLtJPJD\ne0etdKE2i7YuMGzuo08EmzkjXpv482/+t0uBfApCapkBhiqXqiLAzBZP8yZz\nsdKvJILLY+ynvrxDmym2+yCYps1Qmxi9pmz3aFvaPi+awG4MHlgmG39qs+DQ\n2kKXOqaxglMs8saULYjGSpVnVpOQBzY3HQ0zU1NqwNo+B45g6T3+koqIHXOJ\nhY622lWUFfsGrAMSo7pbOtzEYJA9JtG+zliMYBJwfo24JLwxMhZsvqNU5JME\n0GVd\r\n=Pl4K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2bf9c3e15ff0d2ef918e168e9ad407b87ded3718","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.81","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.137-renovate-major-socket-io-packages-2bf9c3e15ff0d2ef918e168e9ad407b87ded3718_1619923345162_0.6704971474198107","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.137-renovate-non-major-f7d89ea98cdcd2387ea590eab89d1eb2f322c1ab":{"name":"@balena/jellyfish-client-sdk","version":"3.2.137-renovate-non-major-f7d89ea98cdcd2387ea590eab89d1eb2f322c1ab","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.137-renovate-non-major-f7d89ea98cdcd2387ea590eab89d1eb2f322c1ab","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"04f1b36d1dfa1aaa09b6c324135456f3de4d2c27","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.137-renovate-non-major-f7d89ea98cdcd2387ea590eab89d1eb2f322c1ab.tgz","fileCount":39,"integrity":"sha512-fgEERnoQb5qDg71Tl3AQ9mP6MhIRP8Rsh3MP3goXwF0NLxQj8bTlN8+mFeOF3Q42SEV2s+1TcIrr6ZdQlg4URg==","signatures":[{"sig":"MEUCIHdKNvQNE4xFm2DjYZ+uRu3UFzkdLzkH4YQlRyXQIWj8AiEA7gDrQIjtH3tDiYYvBap+hCByI6qYIofUTo2hr1epwR4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjiSQCRA9TVsSAnZWagAAqKkQAJBug3uOTE8rRBO4vTSZ\nAw4SJgQ+8SoF2iT0dQJeNKAhH6Sz+ZrPOLvDDEY6q+/pT6gYAzek1zIJE2Iy\nFBuenTeo2/ut3tkVQmyDej+YNlzKvag3BaX34dckOCeCPJ7rkxABEGkB8jm/\nkqMp60fUQ4YczY7kfL7/qCqwfHDP/fOMeKjzPtjGwO601OV3eDx/r8Xq20l9\n6fPkEY2o7HVevZjkYX2lWlZQ5P4s22xRcGRa1ga9NZiEahOcZo5/Z8Li0tnN\nOmf6VOahdUHlMjDnXCgCPLxTcsA+/Km57olCZxIZM8Uj4oUt5N3IVX6AvkXA\nGGAFZ95FuSuqjSXECtCpVgBDj6ZxUZwfqJglTf8Ontgktg9HgSKNRkcgYO0P\ns5H5bOCWVTTq496AVYY+BMWPAy5lVfMrwCE8zFgAWrG7qHPy69UMLZPRK9lx\nLCsDNpLLVhmw5Nie2KJqubpc+CNk69wc7v3ngLujV9PPehs8Pur1a9bokGoj\nIlOxwsU6QQY3xfzIDqqJS0Awq5N1x/eyGZcgXhyrXF1khQ1k5vHydviM5V8t\nPD6XRYjAgx7EOblqXj1Uqsl/0E7zriWrUXODUw/fjuvVoJbt89IZUgrj9MNQ\naUAppP0QCagw26yZPyJ2rzJRidgKllZiSlOudxR1Q0w2BL2jOXV+ynDBNt7a\nJhC9\r\n=XBqj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f7d89ea98cdcd2387ea590eab89d1eb2f322c1ab","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.82","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.137-renovate-non-major-f7d89ea98cdcd2387ea590eab89d1eb2f322c1ab_1619928207527_0.9464275331476395","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.137":{"name":"@balena/jellyfish-client-sdk","version":"3.2.137","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.137","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a116a6ca9c2eedc3f9662b1ed9423634c8ff858b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.137.tgz","fileCount":39,"integrity":"sha512-5NapULtVNaQM4aw46hvft4hLD82DQ3xMp1pVqzk2lqlLqGpzy+P52L1TFhYQ0YmsowMBumBKSgBWs8HtQUZu4w==","signatures":[{"sig":"MEUCIQCcxWcH/VdQIsU7psnr5yyfupHMd19D/maFEJWaDPv9UgIgIHFGyPD1vgtcgQjO5vSvgit9CnsqWf+y9/UANiCeZxQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":242929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjiVuCRA9TVsSAnZWagAAfasQAIlHCTbR9Gp6hDDaCFmF\nUe/8GwazbTMgE2LGZGTrxTDtxdd+0dSvTdZzqRGCayYZqtd+QpmprAw6Ngd4\nMEKkzTn3Kk0bQtcIdcmYw0h9ehZSlspGp276s5+//M/YksvM8eHsxNYFwEpJ\nn4q5oCqB4qgoQTcBBw01vfgaI1LTkxBcLGyWxwMM4FcJkjAlB0TFzlbsez1B\npTHNWNfvUyd1mhQ5Q6AETSB3Gs73VU9AbsXnbqtVrOueXZhWS6jU5kRVwM1t\nQimkNhECwXrxnPzu1Zdsvqubyu/42HyltfhoHH4onk+2WrTO7BcsmBriWw23\n7hWzW+NvMCCNA1piMqgnJ2bOEr+LS9MwDJPOnM3GIXjW3rGFru0sv11KKvub\nasfi7FzkoCrC5SHucWquPWRoK//uh50Acv+FuGfKt4iJT7C+xkDd0uU33WqM\nTXBje91BG2IUvJkV/i8I4795/HHlrHDGIzkFrAYHo+tFK4gYToTohHRQGEQv\nLRLTgEhv9sWSLoC8YZZ1n+hLsUbg+A2fRBEaVC5fuBmR2sbahRzPgaSQQzF5\nqvVMK5F61ZgP6EDUGtJyhhgTyvMpSurOK2FQmfrSuIEZbi9pagTjgBw6FxRx\ne5QtkRKeWnA2XZlpLY4O49dEJQkjIboFtXH1wv3BuJUDy6kBV5mvCvludctN\n0zic\r\n=xVC/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7825df302ad44d68638115bdd59f5a763deed3bf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.82","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.137_1619928430154_0.18163895043423595","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.138-renovate-major-socket-io-packages-24d391446a4e1d78086644f9c506dbd191ff0e10":{"name":"@balena/jellyfish-client-sdk","version":"3.2.138-renovate-major-socket-io-packages-24d391446a4e1d78086644f9c506dbd191ff0e10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.138-renovate-major-socket-io-packages-24d391446a4e1d78086644f9c506dbd191ff0e10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bd7da2657cb0287166cdc42f2cd30c836cd4eabe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.138-renovate-major-socket-io-packages-24d391446a4e1d78086644f9c506dbd191ff0e10.tgz","fileCount":39,"integrity":"sha512-jkXgqV7vAlsPEq6Wc+9JczjdS/61sd0VqQbOqGtx35jHo9aXnRLeS3UP6fOwRfszkBJ7o6kxUMjE1EVQG01p/g==","signatures":[{"sig":"MEYCIQCYZfpiQ0XEUmEhP497SpGtPwQFj0y9/nsW7G10ibRUhAIhAMaBn4VxP6VhT+J0Xi0g/l83NhdqUML9pWZ8YmZdZjVT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjiZaCRA9TVsSAnZWagAAzm8P/jd3PCfifSe1lU7Le0pn\n/CUlcCyc9TZQsA+wnCPPOZZ8sDpKrjmN8RsSCt/+C443pN/Qmo63yo914p/2\nxFD7Wg9Ka5Yst+GVNZuhfGfQygFWJbFDFbLjd1OJni/zTztsl4rjM5dKBE99\nQ3qZmTsISJ115apPiKeGA8/OT/u4t2FSS/4SmQ+XKmbzoNHHqrhAP81ldF4l\nPferkrQ/n0AIpuOEiPsdNakPwcqdZxfuGJ1OcrsXIkYOEoWUwMX8g4WY1Qif\ndE2QUNNKJcdgtPG4haxtfYuEuyWoyO5SRKUegyuwCnUWlZ6IuS9ZzBPykg6w\n8tyKhGwIcYnF13imOoGV3nMCHX6kTJchyd+3o5SdeJfP71pRl6O4o8vvcT3l\nW+OktrWcZ2eAJewv21e0KdoamCglgPRXHGs+0DhmHJzonzoq/TOudjxSMA63\nr22xgHEDW4IkR/kj/yLavIptmCu8F0zSAVGPpFRmk4FEM6Dd13N673aIVjwq\nsMy/hLPXVhRIjdV1azC060bobGICAeNINri/TkQM0s/qfNbi+fRbc0XfQkNa\ngQw29aZ5K+5EEt0eUOxT85Sx8I7tbjBEpNCv/OoVHSQZ16Q3hWDbqlR5HuyL\nLem3RVb08VT2aavibu9d4M7CYv0x7HQSEcYaO8p1FfEBi/kpvQwQXGsFJXf+\nR8AS\r\n=3A4m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"24d391446a4e1d78086644f9c506dbd191ff0e10","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.82","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.138-renovate-major-socket-io-packages-24d391446a4e1d78086644f9c506dbd191ff0e10_1619928666111_0.44058933071527107","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.138-renovate-non-major-f7d975541a10bf3a61bcf984bc4e60928e46754e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.138-renovate-non-major-f7d975541a10bf3a61bcf984bc4e60928e46754e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.138-renovate-non-major-f7d975541a10bf3a61bcf984bc4e60928e46754e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"29583d3f41b613ea030282ec98cdb8c7b664e439","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.138-renovate-non-major-f7d975541a10bf3a61bcf984bc4e60928e46754e.tgz","fileCount":39,"integrity":"sha512-lRKKBSaKRRbgeD/hBSKEyMUjPLQGyLZQiqGzNCpTrqTEfKhdV3PbO2nXn0C2iI8dmdB24tFM+zQwHCxEXcOGSA==","signatures":[{"sig":"MEYCIQCu9ou8HX+EzkThQQ2nIsaboIatcyEy3opZQaUjW6Jp5gIhAN2vqPKExwTCgWYhSE9FuWLXFCtIYiI+f0NTCPFTFmmZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjlOsCRA9TVsSAnZWagAAyIwP/RmK2VbIg2Tg2+fbVsb1\nuSvENGC3E8NBBpPdqhX7Qkn6t+JUnBrEiiY+EphMP16bVGdl+kgo2G+JxRPc\nhuBBPS4bIePEBTPEYfndil1fx9yzFoVj0bkMzLgrATreVfScc0UcfgUyTnYe\nGn4NHmlp8kzWcwkNNTmw8zhYic+Nlb+OMcCqyRX8PERoycoIXrKPOPEAV6E7\nR8rvE8sKUa4X+WgReBrthxxQV0e/+h3o5UmOovuUc8jK3nTcPE0ipTvfGbFQ\n6gP/06qswcaxGHzZF7EBzg6dMYW01YBwww3epxSr7RlPLKMPuLN1iEGfpZBx\nVdXrPMtovCAhxIUKSsD9qII+I0Em8XHO4mSqwyhkLtzxYKT9ky7P2eQMUsTQ\ncls5lw3PkWczWQGzzBSsxpsRZjhVIyDhb5fZPu24wVwTqwmKolkldQawsQke\nKDeXGAECOsqI2WKXpE7sJcaNVzw3U6PdCSavRB3QKMldQk2ikZ7uKnbl0FGY\nHo6r2/FzJfnmiA1z1OIUAENbbBbi9pCkMzXRLQqdk5cZPqfggJZ3zp+2KL5R\nZXOTK3MqxnK4KMxkXsbkj3al49WKXgiTFGDgk3YURYFS1CfcItLWo9eKsScg\nQ9rFvoHQ5LYdxw1JDkpIALtrbotcfatm9954kSR9cmxXcGqvmCuhlS0kHvEZ\nIhv1\r\n=mcy1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f7d975541a10bf3a61bcf984bc4e60928e46754e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.83","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.138-renovate-non-major-f7d975541a10bf3a61bcf984bc4e60928e46754e_1619940268339_0.7766718481098913","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.138":{"name":"@balena/jellyfish-client-sdk","version":"3.2.138","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.138","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cee22588dca30cebb45583aafae31afc9d0feafc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.138.tgz","fileCount":39,"integrity":"sha512-nOHKiU0UJb58vcuXVU7ShRTao0zKl2I8izpwltFngyS/mV2snKOxVV1WDoAAiPmWtUqwulLbEFpfIN+D8YaCSQ==","signatures":[{"sig":"MEQCIFQ/quvYp9DUAl53QaPmksTogIJpvADT2TR86B5kFXIOAiBmjdR3SPCL75iBnQViKUVA/8FkN6DHmJgEO1TTBjfLOw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjlTwCRA9TVsSAnZWagAAA5gP/Ra+o6cwYUlKAbrZI8b+\n1qN72OwPZihcx9oSZflxTRx+t/eZGGi88IhnoB/6AbFC3X3E9WeTqyps05wI\nQEtCBcGSXxWlde6oifbfbCHNoKKBvG+4FNODSndFMmZSF3kdSlfQgqn21y6U\nk5WUyI/27qBZSGKZD43vzwcskn2D/b5o8vvBqCQBxFbd+71tqeNs+MK6EYOo\nFcUVy/t09ORtrI0HarhJpBw5DFO/CpxFndOb96dNzMM0iVSjBYuTiqApgLE5\nOGsYJ1WiksSLwcYrJCem7OQdlfjJGWhOL/DMaj+TFADZPZX9VdBiwNgzjFxk\n+EYzJsIId0siI6CNTAIxKpY+0Y/NIwINU8qsdGgcbUPCv0uBaRoXVJiE+kVD\n3t73oacbk/A4w7nnC/xbCnub1WULO7QP7DbQ7uQOxlBnRiKttqBShwQ1AuzC\nUQVo1TIvnvDw32GZY3lxF4+FfZSXvcn6PLhOP0ICZYFoXhqmD/freWDsddmN\n5sAG9W/gsVPGjaZsUUISpYvFxXrKN1gfm/V3HGDT3xzR3rF3KeCbkWjPPMMZ\npig6ynKb+eAgH595/YLNN/d2+S93I8EVieFpnUhh9PTEtvY8hf5gpKun72XC\nXKo3x2w7YbAXcTi/D9us6aghKfaa19MeZYq7lupg+x3dni8VNGeH1Z84l5iw\nt80+\r\n=qBWA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ac0a05a9851d4b2fdc04791c54f71082119ac3bf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.83","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.138_1619940591973_0.6491874669955373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.139-renovate-major-socket-io-packages-e07a87211964139aa8355b4aebd5d860ec40fbd1":{"name":"@balena/jellyfish-client-sdk","version":"3.2.139-renovate-major-socket-io-packages-e07a87211964139aa8355b4aebd5d860ec40fbd1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.139-renovate-major-socket-io-packages-e07a87211964139aa8355b4aebd5d860ec40fbd1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"25a3cf4cde69a7e6ee021844f3b3d98f09c27896","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.139-renovate-major-socket-io-packages-e07a87211964139aa8355b4aebd5d860ec40fbd1.tgz","fileCount":39,"integrity":"sha512-PaAXdP4TiNzRJoZAmAR+ml1RPw7YQxhX/h243Zw5pP9FXQ6oVlJN4vEizanBIUIugJsLJnJXqHp6+TFnTXDi0w==","signatures":[{"sig":"MEQCIANWOgaW0nj9+XW3Evb+FySFNhFc/6n+fivZmmHAHIZmAiBiewI3gq/lt+cPf894x3M4wDmMO7uOxRrEEkaPebQQ8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjlXoCRA9TVsSAnZWagAAJoMP/16bauAZ63M7EgqVs5tD\n88reCHnZzggShll0G0g7bDmhGT7AP2tu5RH7mVFl4KjuNUge8l52ogY/2rho\nOSMKcPcemHgxRpKSUTOOqWkUwbDiE0gIWjNS0RMW8HBhOKjLg6v6pajBXs7w\nin5rlGMyD+r9Q4DS8V+0p4t+Ak6VbJprdZ01v5evF7nT79juytbfYEnRFVEu\nzUswqFj8NdHAvJ7t3xyA3T7yjK9sP3USY2usSgc09LCAn32m9gJ+z9r5yzEw\nbjtFz6EEhtILoto/CvQGzndLzY0w4nNbrO9cWWV5AIM0X1d8sPqgUoIrBnqb\noBVkD7jVuoV61TDDSNBp9QKZBPxz57a9NxWXpyLwRUC6asxWCg2YUUIMF/ou\nYKpUlEC4dkngZ6X71882Bu7+E7JsyTwiQUSbusFyUQy9kpsSLzKrVuEXzjTM\nJcEJfosWEWe5uYGT4vOgzI3HFH0mu8kqNTub+gph/MJ6kzAJ1MudnQkt0RhC\nC7eXTNoOqJuXRiUFl9cOrMGOhffL2Pok5NakxdhuHS4gmMv6RPHVxINVLlqC\nc+LxvFiiYfamgEkt0tDZNsq3Sv62KQfFEt9dQivFb6CXG1rj0U0zoqf/mIJ6\nGKJsNyW/DBUulMk4fhI+Jz/q+Nb5xz02TR0dz7vkA6YAGCK3mSWgC80aRo1w\nXkMh\r\n=ATcq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e07a87211964139aa8355b4aebd5d860ec40fbd1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.83","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.139-renovate-major-socket-io-packages-e07a87211964139aa8355b4aebd5d860ec40fbd1_1619940839711_0.2627944861471321","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.139-renovate-non-major-35723c0741945c1b92ab38ad9fddda5f9e399815":{"name":"@balena/jellyfish-client-sdk","version":"3.2.139-renovate-non-major-35723c0741945c1b92ab38ad9fddda5f9e399815","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.139-renovate-non-major-35723c0741945c1b92ab38ad9fddda5f9e399815","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"292d1483d986e953189bdecc59e4395f5babdd0d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.139-renovate-non-major-35723c0741945c1b92ab38ad9fddda5f9e399815.tgz","fileCount":39,"integrity":"sha512-9n+1Y9wYguqwQgHrq1R4WDhYAv0y2hB7LPsqubJ0YtxImB/S4c8ZZ30tJ5ozthbfg4VgvBkpL1/bn6W5TEjXUw==","signatures":[{"sig":"MEUCIQDLWTQ1O4wRLdPLrh1BU7A+LzMkLMtmI5IY9N13FDoHZwIgMXUJFNCGTJf/DB+++XtvjmVB76FXgpINPWqRIN74+I4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjz2hCRA9TVsSAnZWagAA3PEQAKQ6mbW0XdGr79t+yDR8\npB8NI3Y9Vru+WJqNI+fAFV8AsGuzfS2WuYcubM5zQFtNmJ9A1R6rK1q/uxVW\nf7OXPlIuy/nP49t5PFuEWs2M4gAsT6k8H+gljbRPjByQQXOv4v4QO52wuohg\n3SRWMd2KBpzvtL1Bu/xe4GRgaXuOdkftfB9DkqvV1ZtX7QGmjK3/Y8lzxTZk\nT5y3Xby+mXXkn+lj7GaYF/PHu4BVY3zhG9f+DW1f17neqcMxTctpzjYFA7Vp\n0Yk6QR7OGrmvMuwUYRzKsF6jJ83JWMuzOeC3VlFb6JVLHqdFFeRxFxXTHQBu\nDZBBmKsjDwuwVQwP4fR4e2nGla7ilzPxDddYi9/2kK29yl2FmtQwwJy0WKZr\npLuVZ3o1hjY2JuCMk/l9PLFC64+upvGeDmzRB/25tytoOfBYjaOR4Qh1cZJm\nAc+9bLhg/YD0m+s7zpzdugxoiAjpz/D+u+kSuue0ZBU6ZAL8s8VHSWxsgbgr\nP1XGPx7W/49B2gHn5kwdRWTnjW8mLHS1sB/xMpdvBeBnsGFY6E93IhSq05KT\nImo7MfEjCT0KJFjnj0ktkEe9x1TQyynkvfuWU3LeXOzOBUnWsHwREEEcksII\nGnUDkOQKB9Zpqc0LTt4Q+u84wf7zmn0N4imGzXfhH9YEEaxSWrbq6klcSnoE\ne0Uj\r\n=eiwO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"35723c0741945c1b92ab38ad9fddda5f9e399815","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.84","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.139-renovate-non-major-35723c0741945c1b92ab38ad9fddda5f9e399815_1620000160565_0.07797940896599598","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.139":{"name":"@balena/jellyfish-client-sdk","version":"3.2.139","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.139","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"85e04f0ae6e07f2afaab664d85c99d0f785b01bc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.139.tgz","fileCount":39,"integrity":"sha512-JzJPBPVaSAvOv5ZHGRasPN2DI1cZpGueOq11hObpKS9xk17J0WjGWMbxUXNWj0/Swdp6Z0fPjUujedH4HzU4lw==","signatures":[{"sig":"MEYCIQCwwZeI77SWIuy1xVQ3gYmJMq1ehD83ZVjIaArkP51CeAIhAPM/luW6L/WQeiTBPfxbz/NaRVifUAB9W7j5euK56ymP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjz5sCRA9TVsSAnZWagAAjkMQAJkit1LFGVO3XG0kHJWL\n+Ue+2zDP95SgK5vr8ietY/d/aSOVo+D9QaNVLN+WgL6oVSBC9DXHmmZid0fh\nls/mruIFYfUWbrDj3VuskTeWaurkiJUQ5oMFEPIhQtysQOUDq3ik+fjvvNwg\nd1FpxgNW0VVvAmY8Ds43uH6kggrF3CAlABtndQqOPYe0DrcXIualznbi6BwU\n/9+ck7ZnIif3cmRIrQeesp1dp3ZTDVcbQjvbl28rtFlvLOdqOlITnaRANGnp\nFne13fk0Q+wCkZUTJU05DsAFqaHFAjC/uw+I5/FjxVBhUsnJDvV0Z75H0TmF\nkE0mK2P65Me4Vq9e47BgH32IQi5hAwjz2HVK2GLfKRc+DOYoFhxryh12mtDh\nADCFG1gGRIBAMP4ySIcuKDb5Ojdo2win5pAgHnziDOhcvxaJQ1vbv8vOFnMR\nA73yxOAqgsS5rUi5GH1YDkZl6Sjyr0WPMveGw/ZKnJh2mrLurFZuUl6patFt\nLaKgv2ZsJYAwgcDyYiB2puAjzBxkerNmWVOYCZ1ER1+0jHhX5LZ/3x3QsUFY\nSPpNX7butDOOWqvCDkytQosgrsSz9qx9QTIXvTZTd8+rWXQdK9AyVIP9VZVG\nRn0I+oY0zcIUeCrJX5L2h7EvyPjY9IUP2t1LPcmknD1EzjTABVoSrylfMhIv\nfVKu\r\n=Frkn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d1460e382ddca579a911424091dc806e0df38c36","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.84","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.139_1620000364058_0.015841885857980298","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.140-renovate-major-socket-io-packages-77c04d24e2580180867e0b672833c752d5739dbb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.140-renovate-major-socket-io-packages-77c04d24e2580180867e0b672833c752d5739dbb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.140-renovate-major-socket-io-packages-77c04d24e2580180867e0b672833c752d5739dbb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d4519ffaa08b663fd77d2bc01c10c8ba64d5444f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.140-renovate-major-socket-io-packages-77c04d24e2580180867e0b672833c752d5739dbb.tgz","fileCount":39,"integrity":"sha512-KgYrgIPP65yELojIbPgA9kTNJiAJkfidUvZz/Unum28pEwebVZl1tNoSOd5lErd92W+1XzCseih2VnwjtpH0Fg==","signatures":[{"sig":"MEYCIQCvcwC26dOpUvqSppup6+xytj7RTE24uZ4TTIR/DX0AWQIhAJycoIpvvBp4dM3+4DE+XW9N6dyP6ZHwapHvoHCJaET5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjz/bCRA9TVsSAnZWagAAtrQP/3FDHHZZusyb1+X4BALy\nRWUUynWl67eyRC2sOPSqgBwsVWicmlcXkWQmgsi2FbxNTXYd9/3UjBnpWV5F\n3pLlJi1sC3T8YAtDIewr8yF95pbW+Sb8FI+EC8jX+YySSGxbQ6bRM+hVVXrI\nx0ar8W+K/J1dI3uO054P9MP9ACHuxferBC3xAeGzqzzhI48K4/3pswoghUeE\nNdkD6ERsm+u5uSCTIUP6dZuq+bR+0j+uOGb1VXzJHB7XAxu/hWLyIaKT/zT3\nXJPDO51+P90fdcBL0JV+bNLux6eauCaTMaKQebIGoFAY6QR/dkisc3j2TE12\n8RIgjqm/dNY5ayNxyhmBYdYLZpkJn220FvXHHKrV5lt7fQsC/qyn5OQPQfIQ\n16tTQpIyUiPN8B30latS4Gmf7UhukmUxm2r58EKtvat5+fXjGV1tCgXkUkSq\npAi9yA7+pG21JuQrqGk9U0PQB40HWxqRCiykWYd61cMNvzynJ4fLGcin2eG8\niVBdoVbhFn2WM26oU83Ms7rwIsoRXbwAlDcg+GpgrxFcKXio7DhOV+tFBwtH\npvmvu4gjo+jqESY/3R3TaZTkDX6CUG7owtldgAW3ZvM1+a0OuV5bcmTapIif\n4gErWvuw5gr8kgFMDdAPnR4w4rOEfLH/U5E7h6UUJmboNkJ63L/Sx7c6cAep\nR6Hy\r\n=ZVea\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"77c04d24e2580180867e0b672833c752d5739dbb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.84","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.140-renovate-major-socket-io-packages-77c04d24e2580180867e0b672833c752d5739dbb_1620000731142_0.04126182881986207","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.140-fix-link-method-types-9bd87e292fd38b448d95c8249882c4679e53c59b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.140-fix-link-method-types-9bd87e292fd38b448d95c8249882c4679e53c59b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.140-fix-link-method-types-9bd87e292fd38b448d95c8249882c4679e53c59b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"89434d956a97006326a721fda7d94d2cea5b3642","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.140-fix-link-method-types-9bd87e292fd38b448d95c8249882c4679e53c59b.tgz","fileCount":39,"integrity":"sha512-w1Ysqws9S1t4yHwrYBF5lbNy4MQNMCSuvJ2OiOrXplgtjcWeWqn1IWWG1YbQvUOP1iYxWGfgxbaPijtpLZ8HRg==","signatures":[{"sig":"MEUCIDVhzkJsorDSStUqeXi+F79Di8LiaM5Ils4t5pDCF/qsAiEAsqqOPIIRbHUdsbzGCZQ3cyH3D9rRNql/3WdQmLj3OnI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj0GhCRA9TVsSAnZWagAAH7AP/0SoPnR/KvxV+TcB0KXr\nabhD5SneoaNn04/Y7zFrMHbOh9iUizpkPS8llQOqr70+G4Ju7UK2ZwlLIR32\nekZLEVjjeJRHXRkZkqKagIC6bACstwbSQUpamZ12jvrmM8apnSN/rAnOed+r\nzQ40L4OPv8YMpkXwMrqcYEX8q6UFgNOebQ/pd92x8yrLiCvk5zrYW6HTbZkB\nlrEAgLdP0cnTrC1f6WIdWr2Zv7SAPemZf0gXoGJ0VxjYcnrppG+r5SUWeOax\nTKL8aH683dGhXkKNSzJJ3C3BRiZlz3cGZjxBlbRScwxXbao/gcVsqf9S47c/\netPnHVaEjOW12QN0VZe04Ima7gbB0THBxnb+HBVe9a3bky6QhNRYZ/6JHD05\nrrMc6ByRvZoMAZq4EQOZg/Vs5jdqkPIEn56mvNd2vPKf9IDirDG94XiXwY13\nMhQbje2Ne2neNtbCkbAUxRWXFfN4TjQqQCRVANdpTmbatHFYlXyZ4l0UPqrJ\naR2Pyx6dmlz4vyd4kEKrjZPSVhyMN9tA6C97h1+lPZG5SmrYoccJ2NkBIFad\nffgZlOntEHTzjgG85aRlo+/OmyPlk2Eke3pYpL6bUjn3KniMAD9ecOdKbSKQ\nQAXGLcDDmlWNOrP3Npz33e9L3a2YR1+hlI8zXKxhRr6O7vgtUBK8LOxAaN3C\nixyZ\r\n=CmBV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9bd87e292fd38b448d95c8249882c4679e53c59b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.84","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.140-fix-link-method-types-9bd87e292fd38b448d95c8249882c4679e53c59b_1620001184872_0.3940757527509555","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.140":{"name":"@balena/jellyfish-client-sdk","version":"3.2.140","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.140","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c737188e3c52d448287bc061692c5f67b0a3c966","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.140.tgz","fileCount":39,"integrity":"sha512-d+ZkXeYtLnScIDjcAFZrsCfQuy6qK4Mfbi8g0WkvOsCW2Ae/2M02LVBDz11uNXzUvHkR0xYSiRcGsYzLc3FOPw==","signatures":[{"sig":"MEUCIAR6WH9XtjeSbYSGTfAzUp+OEBARueI74LQIDtH7hHU1AiEAj3sUr/YbGLdYK1aD0uvK9sHR7U9OxzRRr7/o8bMVyjY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj0KDCRA9TVsSAnZWagAAFUEP/ikM+OALpq77F7e+/xZe\nW03DSnVUzofpGzWkvTObEsm3EEWyKREOanaUsIo5WwRSPts/zvv4KVwbYQS9\nyNC3ZmbyOU+nRfNd6aDK4YJTAelGVbzrGbVBLC1obff9I5GcsYpemN+O+Dkx\nF0pPvlxZ3MYGw7byhLKEX6jqZDBxhu4KYEGmOi4X2D4MpCVkEXEPOwyjCDHU\nQ3RxgRdW40yGuLnL5OQr+CUJ5cW2k/QSwplXQKGV79KNFruQ9UUj5iPxY+y5\nfCJtWjDRA1kVKW7Zn152vdsm87FaNiBeqbWV9a/2ekcMwToHPHvxAwGp5T01\ng9ikV4sAb5Oa52x7F6TiEPtIuKWZXt11xc8Ul8abqHn/cEIFjcbkDwxznmL9\n4GX9lHjOyhcOhIVnka6bMqlRjhGWTglxWPClQizotBy7l43IAUwLpmPHH74k\nQtoANMGcaXz+bJdbcbMp0z7jW1jBNgghZDRVZG5VDETic6SBtVWP+jecAZ9H\n/ab9It+xoNZnkfssrrQF8MkEpborFPJgWX5CCadI3jPrwlXa2eYz1fOAAv86\nPZCpTpqYxMnVfKE0cVqWJmQ2GO0XZD4xeQlPAvUIG5G4T2UmTrsGQjWdCQJS\nnX1kpZWqSWcHa5tOWWRy9AVR+81LN8XaB0QFI1LnLELZp3AK+tGaAkiXo9y8\nCMHl\r\n=UwYz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3ce5d58578bd8143f2f328503b0c105e8f5bf6d7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.84","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.140_1620001411084_0.7792556192460145","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.141-renovate-major-socket-io-packages-3325d60fc7c28e9a7f9105ac510f9ba1f44fb1ca":{"name":"@balena/jellyfish-client-sdk","version":"3.2.141-renovate-major-socket-io-packages-3325d60fc7c28e9a7f9105ac510f9ba1f44fb1ca","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.141-renovate-major-socket-io-packages-3325d60fc7c28e9a7f9105ac510f9ba1f44fb1ca","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f3838bf193eea6b9abdb6fc390a8c92252d891b0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.141-renovate-major-socket-io-packages-3325d60fc7c28e9a7f9105ac510f9ba1f44fb1ca.tgz","fileCount":39,"integrity":"sha512-lfxrJJfPnGBoAfxsEt/LhZI/lPN5zmZbLpZcEktd9bZ0D+WwEOpmZd+UqxJV/NrCaQj606+/UFpkwBfSmG98tQ==","signatures":[{"sig":"MEQCIFKLFunzl4H/aSg1FDihpMm4u7g+hvGHzmvdTw6trbSrAiBFMsNlo3LiNeVjYLHj8LrCt8ZeKqOTzGAq6ZRojHRYgg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj0PJCRA9TVsSAnZWagAAOHwP/2Yg7yQbF6Ifll2aDiTS\ncIbiuFXd6LAhRY8twT/RPxAs3KVKUDcALqvhPEVSnJkaXKz336w30jQNIRep\n/lfWTTvLk4TNXT6qV0RAJJZKfIqt5XKBi3fhttBKVHG4b+RvnfAdlZCf6e7K\naUK+FTuO6SLMEXZVK4rvleN8yOxmZvqQ63JId52oHrqCWpydBGRxOuJ6OwnU\niVWbBtW65CdwFjqiEj1ZR6shY/xKZ83zTMo4HYq3WDwDj0HyRYszfwS1oJm2\nyim3JhyDzFoTd27JMs12rtVlpyz5Ow7OwF6JjuF3aQny9dCFTxelXpu+s7vm\nK6e7qXqNxOzz/koh/ltiAqnAPuwpBx2WOhOm7fGn7+PwEK1+wehAFxGQlXlg\nQzW9AgvUKbs3DJvla5I4hR/XSUBlCJKeMa3PAkSy1Ir8c3iMkU7NKjCdg9vN\nfyL/A9RR50A5Me8ls0sP2Y5NFMS6dcgieL9m9D/jxIatgex9PMhUQnC3gsQM\nri6jppKSOIvuiX4EEmPUc1XCC4n6SDTthbv0NDjjJrXq4IDxksE9iTCZcpGh\nmuverOMHgig4xY7/KEbNQdPUg9IYUePEpJmu7aOPofQg73zxfnWvbUw6Xo3x\n9lq/IQFrIYXDUs2JzkAZaqTc7qagsH+fkOij8fWM9rj8oEFmC739ShsiYZ/5\n3wZP\r\n=Sb08\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3325d60fc7c28e9a7f9105ac510f9ba1f44fb1ca","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.84","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.141-renovate-major-socket-io-packages-3325d60fc7c28e9a7f9105ac510f9ba1f44fb1ca_1620001736728_0.5789679246714603","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.141-renovate-non-major-918ca712076046dbba97b556e6991c2bf5a28215":{"name":"@balena/jellyfish-client-sdk","version":"3.2.141-renovate-non-major-918ca712076046dbba97b556e6991c2bf5a28215","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.141-renovate-non-major-918ca712076046dbba97b556e6991c2bf5a28215","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"db6a5e89c38e450c6aadef9c645cca58ec9e8cf2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.141-renovate-non-major-918ca712076046dbba97b556e6991c2bf5a28215.tgz","fileCount":39,"integrity":"sha512-6nbhA/KiXkP3mfGBSUFvp5JY7FkMrRsg1YkXICdPW3yKxTCsleNNWd3Lto+ID1s7BXB1Q/hJE3Cdc8b5P1yugQ==","signatures":[{"sig":"MEYCIQDZiX3EEyNfd0ZrULl+59siT9kk1t4+YLeZ/ymwcV2xfwIhAOY4Bw19zgDwdCpDBGU7KHsGMVABwlCHDQuC6eHgiF/v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj2THCRA9TVsSAnZWagAAgqQP+gKjHEF+C3MYwcPJEMCb\nv/a0rNAMYe9EsY7ud8157OR0FRI6Ow8MC+Y+v+r2vsI8ZdUN5GXvsRD2ZvcU\n5JaVYsNFSGrbJdaCC3gzq0CNEoA6flUSCh8CSiH98LzpCZdy4VdQQ7Dn6lUW\nEJvY5ed5YIrfZSF7qQbKFW5gmq+5+7/IoOdx6zLkCYjqMxo6BdOWxPRXhzd1\nxLxGgKuYUGnDQh85Z1QPF/W+LL947ZAbL5XtWxLoq9A+u31xKoCMd7JbHZyx\n+ia2tAU33YQNCjT53Dmt25a+x4O6BStart0GXTXTguAQuBK9VA9u5dSbLMbW\nw+j7FDOrCRVEpXD87QrYxiZSjUOyglw0UjvD/+oHJMDadw2Cau2U8XRls/Hi\nALoTKu715U2i1LKC/886IgL+yHumJBjjK64GwexV+9+BTYu5cCHRRsSP3c8k\nkWVw1w41TpydRdxxP7kKeLSyxAPEA7ZZaNZ8ukOGhNVaq0wL9ove4eJPTiGI\nslY6U0WdMYxAA0R4laEfN52m+gbX4NOGl0aFScpHqM0dEbpYr515CRwXMHiZ\nZ4Gn+pnM5ZyAKUgZw+Rk1voEc+lesckLec36R+jOZv+snZQoDH2gSA67Lb/4\ntzmj8Z4y4IMpVBhTPzDcvsGV6r41n7FtikSlYDxyqHYv+eNBTWlhPqw5VlMx\na8mc\r\n=ezLq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"918ca712076046dbba97b556e6991c2bf5a28215","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.85","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.141-renovate-non-major-918ca712076046dbba97b556e6991c2bf5a28215_1620010182634_0.17423194883970794","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.141":{"name":"@balena/jellyfish-client-sdk","version":"3.2.141","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.141","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a23ac28a479e4ddbff3cefe07e0d34fc1271f739","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.141.tgz","fileCount":39,"integrity":"sha512-pQtw9e71IoGdlDPEJTnKXcKZCi6ogRDDiMJTs1xP+q35yUgsagm0bvhdjEW8Q0iWQCg+tBMUUAZxk4JJ+WPeyA==","signatures":[{"sig":"MEYCIQC672IZXazSio5gk9gXUKJXUTZXDZ6+HICosXcCMC5wyAIhAKJPvkmi3ydC2CuRyDTJ0s3U3Xc8Tavs6r8KGAc0+/bV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj2WoCRA9TVsSAnZWagAA3b4P/0vTFskHUpp0uxgAuDw5\nIUYgV8vk9VDsQkpKBfAWxuwNp/etLytdPsNCU/9eQSKKgAY1rTNanrZGSp7o\nc8iEpeF96JCxlra3S855A1mS7etxamm+WEXZjFtoWTWHxwRj9pci1mVkMGyk\n3kblUivPc9LkputsHhvut7OJOfi+leBahj1aYBz45g8LZvU4QXe2c3xk36GH\nfnsXP8Armu94YrAzCJGAP0BiteboXkvlzDw9gYAvSZkEl2kG9LP2kLOtIBIU\nrhnUNT7Z5OeAObkia/iVxDldCJmR17mQiM76bPwhnFW02iF6ok9wWw7a0eMt\ncmihC4UB18JOk79lk2FWSYm/88MP/f7CmDLSRR3Il4qphc8qHTJ3rNSEV/Ox\nkpsq1JaOM64CzW4Z1MERpdlJw3bDYFiSwyLRBLKWdY/2tcpohih8y+vjEktC\nrwafhiKYOzzk6UR50GLYrPxO7mRPJncKiJbHI0OZMw+xzBLP91qzT27BMEND\nY4MfZVDeuDjG2Q9lDMPV2brV3vAQylTSKU3yOC7iak4OmD9FpZrwIaiGXEfH\n+umdkX6oZMGNe+FbY2s832FBXFDoOEPjbxEw4Tsfmk3VqnMdTjb+uQodjY/m\ndCgws8QRx6WLuUtIdiX1d9Bbk7hRcyjFMW8XF0pmbdZiOhtkp6VrMVKFtj3J\n4vnQ\r\n=ViP0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"65d6f1282e939285fca81787f33c98347306ac31","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.85","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.141_1620010407503_0.029084613066570952","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.142-renovate-major-socket-io-packages-f9c626500dc8cbc8173fe46be0da1efd367a17cf":{"name":"@balena/jellyfish-client-sdk","version":"3.2.142-renovate-major-socket-io-packages-f9c626500dc8cbc8173fe46be0da1efd367a17cf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.142-renovate-major-socket-io-packages-f9c626500dc8cbc8173fe46be0da1efd367a17cf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2656e13eec400c07e6b3f9338c17002cb7243060","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.142-renovate-major-socket-io-packages-f9c626500dc8cbc8173fe46be0da1efd367a17cf.tgz","fileCount":39,"integrity":"sha512-CL3PyxxCqlaSlrlDZOjO6lj+1ZuEDL2SaEhW8eYWCQkbGDDF9eBsd0AmPY1TP0Acn5US2PlxYFhwPqoxdooCXA==","signatures":[{"sig":"MEYCIQC/3dIV75nUjHZ/cbHtIIqFqf8Gdr2qBH+8NrkABwE2SwIhAJx5qp2fXyjIJnQCXeOCa0uIXLwkNhEck5YkV9C0CPYL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj2bXCRA9TVsSAnZWagAAuPkP/1qc+p6EMbBFGV02/v5/\n20+zLDQwICBCGTgEQkcpzcSz1J/i/Aq9iPhrsK5xNi7syJZ7Eyv+/Jdi4FtK\nO1kwyVFhbjG0yWu87hZaDeredZ06Q4oJHO18bEB2sWCwz/arh2j13XMTdVdb\nNsxNARImr8WeNCN73JqCU/Jsf6Ae3l33rMilMFCRVZsGa1EakYJRLcztAcZs\n6khat5MyU4WegoumJSZEysbeVtzdqEd3TlBFVG59nUIf42ewa8cVH2aXsPhA\n0oL5qoCXmSiqB9gyOCHZbxgAD3hQhSsJiQDAhfnQE454NTfvMB5FtbjZPrCL\nVCv5z2riMfIy6QB5Tm41cdCRJejdxIUMuJPjGkh8untEmsCAYa/rHp61cEhl\nsGn3+YL3ekqegrV3u7ifdO50zC9TwykiNGlHbpgUpwfyR39ULKhBStbr3xbk\n5Pkkb6D7NJUUP8jd7W8Z6Yy9i37wiB/x2BAWTLrBDQhAcpsln9KcHebNZKed\nhngSkh/LRPSU6K4Z1mh4HIuHKPcc3pHG2gRAcaU0yVt+0Ptgu4Jy+mRHjrPc\nvEqBL4oodOMEgKR1o4Bp7aIVYTXyHMGB4ZUnBnXzdZ+UU121f2lQwQHmeYMv\nHHkdYf4xF0DEaZhG4NRHCjhZ/mkQCV5mhEd713HAXKvLK5PBwvzSiTjzNZyC\nyaoo\r\n=J/2B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f9c626500dc8cbc8173fe46be0da1efd367a17cf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.85","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.142-renovate-major-socket-io-packages-f9c626500dc8cbc8173fe46be0da1efd367a17cf_1620010710978_0.37552056115391186","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.142-renovate-non-major-d52a546774edd32c5aa8d499a44e49d6cc492659":{"name":"@balena/jellyfish-client-sdk","version":"3.2.142-renovate-non-major-d52a546774edd32c5aa8d499a44e49d6cc492659","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.142-renovate-non-major-d52a546774edd32c5aa8d499a44e49d6cc492659","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"362483d5c6398c0badb1be3e6f216cf1df37d6c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.142-renovate-non-major-d52a546774edd32c5aa8d499a44e49d6cc492659.tgz","fileCount":39,"integrity":"sha512-xmOXjIdDoS1BNdinmxW7DgNRyU/zScTK9p4DoBMyz2Pcx5EttwmXDN/g0HevYtLhqYzDpym1LzdBl4zXND6uaQ==","signatures":[{"sig":"MEYCIQD+4V5OQjRR8eFXoBp5CWugFuB+0c3r34CxFXBt/RieugIhALSWJL6dzST7VK1amJkTz2NrEmcim9UssFNFrhDTLTh2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj4FQCRA9TVsSAnZWagAA7oAP/ixR/kwGp/Q5aCokGiQi\nG4UqbQXsn4KJoXSdlg9REwkLzFuiFpht5O434NM91j9POrExwXlFfN+X+p2H\nh1PBTR1Bo3IfRlynrbn08qTuP7kN/EujqtbzIVvGgc3yRBMeD/EibL6HWdxi\nlXPJWHF4+LKdieUaMMlgRq59iRZwfUtCOqvuZHl19TF2bpprdBv0nPTDb3eA\nCosf0pSYcS4AhWesnD33qFPUNUvmjm7DYNvL1NEU/AS7Y5yqwoweUjEu8fYk\nYqQM/0L54i7QZYTkx8MewCBEEfk0hN7yVk0DM8cWsg+IHjnbuZv2aXHonm7I\nza2P9V7fILVU3G5pAWde4PNslPkbelaLyDba/LTJ9mKPAp0wsR9EQN+VP6um\nyYEj2U/1iDQ3ZAxdZpQSKaU53WC4+afSKe21kujHDGxjxT3osSs8ctdw6H38\nPTrBYXHAfw5g9P/j/VkOmuBz47wjvbrVKMP7TLnE7HZ7pAjfkvJjLTPIg8kY\nhKjXcY2Tl+MV3T8gSmBhbX+Yp9WHUDgcLFGcmnzSHeHazskZ6FLZyfgITuW+\nuXR7s5aCVFZnQ175Xd2J38JvKi1To5bFsU1G9CAcnvfPffbqlRcCwuW8v6aI\nHjMQIUgpNR1nyuDEbNCRzJ/wBY+6ptWy6I6pQaQUjR/SIMpSOtySvDRR8oFu\nYayG\r\n=tE3a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d52a546774edd32c5aa8d499a44e49d6cc492659","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.86","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.142-renovate-non-major-d52a546774edd32c5aa8d499a44e49d6cc492659_1620017488429_0.7498317836246662","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.142":{"name":"@balena/jellyfish-client-sdk","version":"3.2.142","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.142","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f53a8df19b74be09d101615a46b809307be83781","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.142.tgz","fileCount":39,"integrity":"sha512-T405iCNFTKon4mVfFrSdsf9hpRvdVVYOPv2BpICUwhvCOZyu+Tt/bod86N2e2qK71GfIBbMIYePfC7sdlzs0nQ==","signatures":[{"sig":"MEUCIHXHAP0AE9Mts0moInbOtoyUtzKm5rgLnrA1c7NZ7bz1AiEA5DwmKXXk8fTV8sSASjuv4p/Te0/PvvQUIp2Qw07usu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj4I3CRA9TVsSAnZWagAAIA8P+wcXxRBK+zi9/XZ/xxfj\nAsVsy74A91/1P2pRdoxL64ePc4mR5MQ//LLpu7HW04C8tPQnsmTIkN7RTTF6\nc4frUDeg3Bon2sRSObyh/ZdAKJj9e3caZBvhVVKu3nXb8ZS2CnX9lo65DbuE\n0zSZyaN/OZgz4dk9Kqj6dpnb3tCzMs2DKYzy0YSj2LgF+gT88wgkx0cLLtvo\nQQD5U+UjpM693JNDeyZ+/ln+UgS7+VrQy2JlRHBXnKlqLbEtpuy0x5dkZoAj\n+loU93V8zZs6crRShaTgjaNL/aFMSFNMp9V0B0pIRW8tvPjxlOmS6yTnamzH\nrO8WWlhLSyEIHj1LN2yxmhzrytaoyjFeHQ5rnbF8YKHJ+efG+M/JFgg1xL3A\nakrj7qQjxv0oAIt2S6b4aZdVPZ/Vi6Fx6SLhqHPR8REP2MA9djYj1VzvDnoH\nyuvphbLbppKocGWuGegvWmv4Yd/dPJKE/KvJwapKHi1pPFt6rF50Pv26Kwlb\nRE6kXGXwheW2pkpz9cgv+PgIZw3b2pJM+S+OSvzz+YQqkhYGs6l/NLFPw5WN\nqVxyTh0jn12gqm6soKPI9LtWFPekyBiz7wqO3aHC+Wt1ZVbR7MJyNSfDH+Dw\neUN5ggF8A004G7ReSQ/ocRrfWcYm+G7qYTMBWNFxuoxVFcuBTyObiJmvHpzC\nYevZ\r\n=rBvY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0d60546669faf7ab23a6a7895c5488869f7a1335","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.86","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.142_1620017718761_0.3568286795055753","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.143-renovate-major-socket-io-packages-3a6734faf742c8ca5840d56620c99d0867288635":{"name":"@balena/jellyfish-client-sdk","version":"3.2.143-renovate-major-socket-io-packages-3a6734faf742c8ca5840d56620c99d0867288635","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.143-renovate-major-socket-io-packages-3a6734faf742c8ca5840d56620c99d0867288635","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c4c6a2d22cf66007613946fd8e0dbf25e5f1dfd2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.143-renovate-major-socket-io-packages-3a6734faf742c8ca5840d56620c99d0867288635.tgz","fileCount":39,"integrity":"sha512-fyK1EM2iB1o66UCf+WNpPjBzIDUjLpha6VCvNpJeKTlkFxWs/wkIgd2YUTr6MUOoZKw+JA63mzpBOu3seMJ+CQ==","signatures":[{"sig":"MEYCIQDKd/VgIsU2YPr8B4a1u20HEdFlfLUu+34PtSsxs7Ff5AIhANs6KWJGVy3/LOTP29NOLyCkEk1VLeSRJDMaye4k6+eB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj4MxCRA9TVsSAnZWagAAk6QP/0Na8GiQJQJ77ayXylv0\nYWEOviWqWNXbiIVCk9pucpEM9aqb1cYvaqEeGrrPLXsyNYh5f79BepWidCrp\nGyjOflKks8mz/MnN9IlxS1y7+L1wI6w+GeE9M+xRIAFnDTXDaTIPi7K52O1x\nnZ8Bs9ySGs21pNRD/MysR1tRjw4170MPh/P1C6xKiPdBeABWRv01mcdJKxjm\njlBHdfCf4P8RICPtbKtLFKgT8NolNR7eNk42x5e8zLSbLa293PUbax4culh4\nQbbUGpa8SkKYEH3QmeHqoBJHsmtowm3PQCNS0ccKKRHZbb3qvdyJJ2LnO9UP\n2WHzM7c3WS+dNOQ/QPveUxk19HPt+iw/1Pc/ppdVG5OH8+5Q2T491j/upN7m\nVUcPZbN0xOJktH8thzO8zfJDiMnUVU6TQ99ydJlOvUArFVUlZjfRhFwaPIaK\n/WxcMYrpPZeP3Hv9XMDbG4ixwlzv7wUEWpSZ6qwrUbmr2KD4ddZjLRCme0Sy\nFuRF1kL+1F7k04/6e6SQgRVxuOhz7m4K+UsFehjqRG64dOJeYBrGr1a9CL1e\ny0PzgUYyyw0NHyH0zYMGsfvtR6LmCES4FpeJ1VbCJKf0zLOCP4drJ0Zubee3\nzV3dvtsXunaSjaokmQLvihw+KNdzrp/qt/wPK755vSSmQfHvN8KMg6+JMxeD\ngeVl\r\n=WDkG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3a6734faf742c8ca5840d56620c99d0867288635","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.86","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.143-renovate-major-socket-io-packages-3a6734faf742c8ca5840d56620c99d0867288635_1620017969093_0.20142682764691777","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.143-renovate-non-major-0c5958dd503befe0f42cb5face06280c6303c5cb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.143-renovate-non-major-0c5958dd503befe0f42cb5face06280c6303c5cb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.143-renovate-non-major-0c5958dd503befe0f42cb5face06280c6303c5cb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0c87466776908b68404a9455d13a0cd809ca9a53","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.143-renovate-non-major-0c5958dd503befe0f42cb5face06280c6303c5cb.tgz","fileCount":39,"integrity":"sha512-NFnfHoU7Ur8jKeC+T0ABMGi3m7RzFnr09wcW71DAeG5Fx+g4zBxOCrg38EQFFJFLviVdGLE2LNrLnco6P/8few==","signatures":[{"sig":"MEUCIHdGAJJ+JN07xjowu7oOJNsdI2JuZSfFBRcincvHQJ5vAiEA4DLZRNfVPQNW2Gpiq4oBHAYNFCxV6ZL0Ad0/4KC/X5g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj8fDCRA9TVsSAnZWagAAub0P/3MKb5kfP08d2hm7T/ii\nyg6Wcl2uUN7r99KbcOPFtAbGChcGOSnrugqAObbCHedR5vATq7ljo9noYJ7w\nShnUohNciyr/FooQTVrp8sgprldGwLQGE1E6E0RPzJGedBFVnF6YfJkbfi2/\n/7GPLOknGKTBPqW7WLC+4eoR1NqlhN1b+7pE1RDrWSYbsKaGnsj2QzaJqZdM\nZhQk4vKPspT09r+K13TNrJXIPFHlUrsAhqq9fRoz0EmDxtj+FPXTd5Vy5fzJ\nTLDYNgozZLVeyqgWo1fifWGOiqRg+Lyk/njeYAxJ+ymylJQt9QY/f4Dp8FIJ\n7OjqC2/EE9nLwH3ZnxAj1heU95p439lJJ/ZfS/5z/IoeR0iSQG2TuC3HhRT3\nv7lLey5/gqhuOlPLu5pFt27bcfpYi2SJ3DQP8ZN6oJQEbk8pcGF/RPRfi4gf\nyXj3uAliYDVrcjJOwo2TwGs7uJSNz6Pl8OXgtOkbeYs2v67ZWqzoYqmXVyNH\n7zQlui4+7p0XJnk1Ec315CwGvxKm++u3D9Hd6BBkrgbrrJ4wXqH4kMCgPTXs\nu14vZz3U5G5dLHvVOFoy7IFKfnjaU/KE22ojGswSv05Mk4VIDcQO0WYpv0a6\n3Cy/aOo2rUGDQ+rrSc+K1sZOjlWW2if11s7j7i3BL7Xtr8yNs/Sg96YilVlw\nBRjZ\r\n=MKNW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0c5958dd503befe0f42cb5face06280c6303c5cb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.87","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.143-renovate-non-major-0c5958dd503befe0f42cb5face06280c6303c5cb_1620035523082_0.40946355491809183","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.143":{"name":"@balena/jellyfish-client-sdk","version":"3.2.143","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.143","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f279780376207742831f99847df0800167c70e52","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.143.tgz","fileCount":39,"integrity":"sha512-aVL0YUdz5gLfah5hBDC1xQR/iInF9k9oqOtHa1SQQOftDVQjwVUPJH8iPDL7babirTeQjoMV6e5uw0b6L7oDUg==","signatures":[{"sig":"MEYCIQC8E7/hbMbvm7vbEHbTNaMel0Arfqw4VccoMnbtas8ZjgIhALYjO3Tll+o94p2Cug7QPrHj1dP/pX/5/BtneF9KogTQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243521,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj8kKCRA9TVsSAnZWagAA6SkP/2rxXGo2W3+Lw4QqHDag\nyQYluUgTq11fAmDCd1xBDSQ1qwZOEnFyJvNYnNHlZQEIj7GtCrGffSZxeZRf\nIAOUt2WOPEGZnFkrNNomupuwXnpKLVhQwpj+Sse40BD/Hhr99tuPo8eyKY7E\nh/ok1d/moM5cg9mLCZ9WFLLduQwsTjKHatkSzYfEBTnJM75iwKK/QP4WwqYA\nA1OOXNg2Ja4zsIPHwD8H4EYm1qeYPcXVwAEOaAy5yWqr6eA+TLSai2huu2MI\nPKmp5sUMzNHjXqwA9mi+kpFG+K4S5MnW82+ic+RTHV9lKE47LriPOGCS+HQY\nToKzBxuYJXYp+4g18uzmxEXAyLLVzfIQeGasw2gEPu/WQq1wnXnl97WrENiy\nUkt2h1z4P4AN0kJuPLsPOxCXoHk0hMj1EoZaydRMXkqmaxFmZ03VlxDdXeA2\np82Zn7dtcmB3mKHpXMFDg3hStgeaE6YUWX3PzIUups4iAa6ltgLdJN6z0uX4\nKO7RyA+5b8xNrkHzge4dJFcMqIhpwQXxv7Bvwws46GiWNxNAnhCcbzykcD2o\n1OqwaGIA3j5KLPxpLD/26w/d6wlVwBj+AjjxgoSrueC0CqtooIX/i4q1s3Up\nML8E8ZgkkMfw/oMloNS2HoJR9KI2j0jsh4CEgsgnogIAlVNlpUnkl871SGdb\n7gdl\r\n=9S58\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"828fbbf0f368865a1eceabe48cb4c01044ccd660","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.87","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.143_1620035850056_0.8801322802971518","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.144-renovate-major-socket-io-packages-c8b97500b9667be0ed31397b6fe1c14fa8b9e7fe":{"name":"@balena/jellyfish-client-sdk","version":"3.2.144-renovate-major-socket-io-packages-c8b97500b9667be0ed31397b6fe1c14fa8b9e7fe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.144-renovate-major-socket-io-packages-c8b97500b9667be0ed31397b6fe1c14fa8b9e7fe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"47517b9d9ada1fbb32a9a46299653bc3723a1a27","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.144-renovate-major-socket-io-packages-c8b97500b9667be0ed31397b6fe1c14fa8b9e7fe.tgz","fileCount":39,"integrity":"sha512-P3QlQKWrQn8tuPFbUIQONuw7sa7qAkkQjoNz7EwedMYMwNWSjrWX/wfD2PJPnMa/cEg7ZXC0jr7TgWzFINlRPg==","signatures":[{"sig":"MEYCIQDfp1amLG3NFhox2uThO9kcNhLaDWnkNXwFWMGNoy7X2gIhALRIMpM4dYl/3UIaEOaE4Xa9dQpJ/haXPioEVxRuuhJU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj8mjCRA9TVsSAnZWagAAV9YP/jNvquSyYMDGDRRu42Nv\ntVPUa3pY0PcBJvcaINse3dRKxwN0LE1OKldpbzOxUCx8j/IK/L4VfYtAltFd\n4B0wjn6dXVhSZD+4EbsD/Ml/o6OtJDlZamnQTE1Fe6YkejULM+4T3mPAxwZ0\nszZEiXvmcUfKtejigB290zP7ZWxJ2ErBWuhiyCuW+pKFrmE63jMWV4t10P9O\n4wIFdhWT/4KxpimKKJXTxJwNMpeAVYJQKq47AiJ8a8sCsCD+ko3/B5h9UjRK\nWidv0LOcl5pGGPDr/S788YHoHXPS1cQc6UlBt1RPMmpgGr+HJSUEmN4OCvuP\nPd5yCtLWEbLMDeoZPoVpMtayJBUNgUcAvFfkClozFfehiwbdHPfYaxF0IXH/\nrbuVGqFRXozGOTy5V+F3H187FJaJWxQRB8CbBU8JCjcSogq340kun8LZemQB\nmHo0eF/HS2RUPrvNjxOlA0ICkjAqAk/ivi8rW249dyJbJG133a30CpIwnea3\nQzNgwHL7sUGuA7X5LTMqSVSQSI/urToc1xfywv1bIZDb2e3zh1jEQRojWheG\nlMX1qN00sOKSQwTxQVTqxvIP901FjSdF2BVmgrk55aXfoH7accmb+0d5I2bF\nhTGsgFdes75ZmtlT4763NScceT1qloDBHWr8Ebb83qNnqOaS6t4Fl2bruhMo\nzvlL\r\n=BC5u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c8b97500b9667be0ed31397b6fe1c14fa8b9e7fe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.87","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.144-renovate-major-socket-io-packages-c8b97500b9667be0ed31397b6fe1c14fa8b9e7fe_1620036002671_0.7825745070005146","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.144-renovate-non-major-20a48bb677863f8240462250bb27759fc381f6d7":{"name":"@balena/jellyfish-client-sdk","version":"3.2.144-renovate-non-major-20a48bb677863f8240462250bb27759fc381f6d7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.144-renovate-non-major-20a48bb677863f8240462250bb27759fc381f6d7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9affea22c7e5d2b8c6374e2855a98087fee36235","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.144-renovate-non-major-20a48bb677863f8240462250bb27759fc381f6d7.tgz","fileCount":39,"integrity":"sha512-AV1BZ8C/B06a4ley64pqjz/D3YDQbwPzMIg6JSi/fSsbfwZZDuzJ6klBopUKsRKKCWcKQjaQ40pPYT6F1pNLxw==","signatures":[{"sig":"MEQCICBwD300IqouuMwJs+3FRcipJCSS5XUCsvkpFqPP4fMeAiANQWQbwH+VA0odqUpQwjWN1dE4p+3LFIToMNoA/vkB3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj9J6CRA9TVsSAnZWagAANjUQAJdZ/LiiB47MDRjTlKul\noUlwwz3fDgv4uFJHFditgRJLuWpBKElCKCYiQ0gp8MfkGGpXATGmBfGbx/Qc\nBakk/Y5Ya7X8vTPPG8NgZPVigOszrs2wNCD3UidFOtpCjhvrFi3jleJrn6nR\nly+gH0lkEMwq1CJZIsMuCsFwkSzDNjps6jGtL4dh0Q/CK+4SCU8N0Y9t1L/+\npplerCnktIeDernniJ3ykbKRByHuetGLHKariV+Y4wo9F3OQw3NSjjNyST9t\nciEULpTFQqsFkLzGsQrtOmADZqxo4czeEZfe6ISg5ucj9IO1zZXp/MP+y1vL\nNEuSaYwMhmWLR2+67qu5TWqogSIvJeZCZYfdxoqls1O8RY169jNKHl8q1r1w\n8yNQ1tCOwz3vmtYhIpcXilv2DFWEd7ug2lTKRa+o8mCBNktNAhLkQLgnfPqO\nyCpF2xTOaxJpMR491jyvld3Pf/AxHwarTTqYYFWg7WDH7GAxrF3Qn1BY2QdC\nI/iiPh5hNYoKneLDV6k9qwu3/PPjaqedfr4rkumjGTSCnRcLkj2YPlJBGNZ9\n+X3HrhpkFqUCsAMOk3dEKdxdFltgboAvIRng3IGMRuVZhIOlO962sBPuksvW\nPtqBunMrIuHKKnf3YElTvdN/KKW8MzuN0U8NRy4BDV+6NWYt04d/3v1ajTuz\nL2EC\r\n=xltF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"20a48bb677863f8240462250bb27759fc381f6d7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.88","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.144-renovate-non-major-20a48bb677863f8240462250bb27759fc381f6d7_1620038265954_0.277532721931532","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.144":{"name":"@balena/jellyfish-client-sdk","version":"3.2.144","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.144","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b4a28a1c316dab7ff7a4f100dbb3f580401bcbef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.144.tgz","fileCount":39,"integrity":"sha512-4nJIIPZSiBe/iYZg/Xw/lBMrZ28sYB8LbI/MG56zo5rZxGFWDlbxQe2nw1blPugwZrUEBSvb98tZZk1ovkEd3Q==","signatures":[{"sig":"MEUCIQDTP7sSwRDmF7+bIdQ3MwcSj99AzuMH7U8s6sgDP1i+KwIgF2YvdaZcjZnxGosbXdJCtmqimd6/R8N+V3uuN+x8628=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj9ORCRA9TVsSAnZWagAAjCsP/0Lm5lZkncEbgMZz65JT\neVBcYLuv18wfBwAze9wJ892fxMj4Dp7n8dSZ60fpYKD7q/8t+8nS2j+tGOzV\nUqWBkQwd18xVvtrWXa+ArbvOK3Hz7XiMaJP/AXa3UuY2m8ap7wt/tojLx6ej\n8ibsty0L37RjeuN8eDkmxzqEH5kpF2ARw40CtRofttJ/wUh3H0kJ0vcZM5fS\n7Nsct0Ki9WXCHeRUvUJRcmtYJ461TfK7Dfi6lOLowcb82DycrYu5rAGmqaeD\nateXOqKhRDSpzVAFvFMB+L4otCHY4bydc09PcMeScZPXg9B9gPaQh7LLfQmJ\nHiuFZj8AHeE1ykydkt+dKfOsuArYQ43Y5MXYOS4NLH/u51amU0/LTB4dJe/j\ng320HG+o7DhYT08CO3oFlFuKi6gfzjmWrxuedeEMLUrt3ZWmC5zEjmPHQjMF\nyvJBrP4CHiOBhl68U3BP47eInJXhBSAlGsKPcC6PuHDw7VRItrZo0QitsAx/\nIM3QxPvbaZZYgfcWx2gNApmdhM2dVt4jUshws/5uJ5KhAiu2V9G4KwWUqQyA\n7vlaJkmeEWnfmkXAbkoWhkC5aZno7sPIfEYdPt47cGUnxpmwngHt1A8/Dq0k\nxWyWkBZP0QffcWNEZhinz7Hv4/pbfxGyK1aHRIY+9EsSzzCzvO+5HDaS/ruq\nf3SM\r\n=iq6H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2faac6840d7eea2529bdccfccefaf93b1fdfc7ee","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.88","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.144_1620038544656_0.014400257423794915","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.145-renovate-major-socket-io-packages-f46a3a35afb326d11432d938ada5dda2353fb0d0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.145-renovate-major-socket-io-packages-f46a3a35afb326d11432d938ada5dda2353fb0d0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.145-renovate-major-socket-io-packages-f46a3a35afb326d11432d938ada5dda2353fb0d0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0c2df3c23f20d81f61cd4d3a13154ed08d4fcadc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.145-renovate-major-socket-io-packages-f46a3a35afb326d11432d938ada5dda2353fb0d0.tgz","fileCount":39,"integrity":"sha512-NU/MEQtYL/BJOTAXbJtTb7tqr6nL4YJbNSJPPYaFHlDZbf65Bl2whO5hLLfTdAi5b58kWKunsaHRliXeFACsbw==","signatures":[{"sig":"MEUCIQCxfYTtDcjYgs3goK63OTMJI63KbDdVw+7Ar1I7Q4FznwIgXZDOBkTYF61BKgtqOqzj83uSFME9g26wv4JcYclrYaU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj9UWCRA9TVsSAnZWagAA0BMP/2gU5kZlx+nlGccHa1p7\n1vskktH5Cov2KhjdzyQtqTzeP+OEel4JrRAShUnxCWQi6ygvu1smGmuJc+fd\n10xVmhp/Ar/a17jNHWs3IPkrzmch8iazHiUWHGdoSjc+rmpA0FV7qa/qqw6B\nslXryfhpj2xMJjBjwhAWDqRMw8FD1ucL0ND6X9ciZF03Vh8BMNpaJJ+vg1yh\ntnBh16PGk4GggVEV9zWtGgULOL0OJcexuX9hveyrRbvpt7WCFUjXx1Rw0D4P\nqx3EtnvCJpLa5ZktPKaL7mRkbUc+1y8UeOU5AY+cUcxfobFLJGpTmvKLxatP\nGhbomCAjQVkaInusN/MkKKGx+L4eSzp/Mb9C5qBYGFsuHeZ90jFzNSjs9n8x\nEElv/isK4rzCf7G+ULP9mLTIfm8Z23t2XnIYl8Ulq+Bmj9sqlHO8o8clChDx\nYW7jHkdOt3Z3gYRdtJ4IINzMNS1FF60P0V+loys/3s0+o+WQvqxp2FD2ydAb\nYt4x0N44ps0o2Zi2ROlBNpaQATKRNSQ85QjrCH8DiOKj7F2TMBA1aaBhOzt4\nErlyD7+o5/Nl1LexsJnjOpS7pl4qajc5UpzHk2vNF8jS42hqpzsheECTX4dW\n+h6VEOVMJ30fLX+0DULwZKBN8zQ0uedWqWxT32x9fJmglRHHMiroxIksaEQk\n77iI\r\n=Chve\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f46a3a35afb326d11432d938ada5dda2353fb0d0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.88","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.145-renovate-major-socket-io-packages-f46a3a35afb326d11432d938ada5dda2353fb0d0_1620038934095_0.6808379043218731","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.145-renovate-non-major-b846ecd11e529b8f1b6018b737830b1ec546cc3f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.145-renovate-non-major-b846ecd11e529b8f1b6018b737830b1ec546cc3f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.145-renovate-non-major-b846ecd11e529b8f1b6018b737830b1ec546cc3f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2d4d2ad6ddcb45a81789cdb0b7b0a2e02a377755","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.145-renovate-non-major-b846ecd11e529b8f1b6018b737830b1ec546cc3f.tgz","fileCount":39,"integrity":"sha512-uhQMJJHbfeBSr+NeW1/Gyc92hb6oGmLppla2MvShCDsf6EqItcjiPNgztfm1q4mLvReeHF47eMjN8nOlaTQbNg==","signatures":[{"sig":"MEQCIESlyIFVNqfMtV/Qvu1ivXasDtuq7+k7/GV+nb7azLxSAiAUTqTPZA4t9fmRHm/2eM2PTHvZUc0emZg46waPj1dNqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj+gCCRA9TVsSAnZWagAAcvsP/3ksTOwp2vg6pgONt4DY\nyorf3tyxr9okgOZ8/KKrwEvOTDJ57IHf4fxlPQ3PNshM+0Rm3S/NCzL5KFRo\nSf3aSxQ9BvdLp9AzsvGp0qFMmxmLsVkcnfS1as75c/2iQotCiNRowdTTK+7K\n2+suiF7K9keCfhD3yH4owJtJwkS6aUmXD8w8llZTiQh37xxLDdR9DQXGQLJH\nGkpscwxmzDncwBf3zkNWagdVEdHNOgEvv2jeoKeKB088DsjsdEN8wz1+Y3h/\nit1bl+/zdM16X3dtkbPvneQS3Ql0GhiVeIf+ATsPW7hO1zR3+6X6RUVjZh8E\n54FsUhvsrWVSVzciN8TpkHIFhEsiCdbw8ianIyslR1C1cZEHxiS7EsoOz6ED\nsgOYNCwP/xPgJ3vVmwdFfx+KTXKF9bJt6Cz3S6GVFVO1z/DmeML/SMUGRSnS\nDd0YGImGpHVIZuQsNhX4GPo9xnAToS2iWjGYw07UzGJ5dBDd8rK/ZHIRbjQw\nbAiK+wMaW8DVMljwcTXVlSMMsZnEbIfsGMqzxs8MGQHnv1FkgFJA9mOb1uqx\n7WcSbfV61TtEWvMjsjscILINo3XMtUdWoQaThEVtzaMDU2eN6dV7h+F1C+W5\nvq9sD71oyC4CIN4yjJ3GX/s9haFRzApFB9uNpiR/Z+gMcNtgA3zfml98yiFp\nQLXZ\r\n=L+S8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b846ecd11e529b8f1b6018b737830b1ec546cc3f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.89","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.145-renovate-non-major-b846ecd11e529b8f1b6018b737830b1ec546cc3f_1620043778316_0.899206558620957","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.145":{"name":"@balena/jellyfish-client-sdk","version":"3.2.145","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.145","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d9eced3bd498f748596ac0b12df9617183118705","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.145.tgz","fileCount":39,"integrity":"sha512-By9yPTvFBn4qFXoE3B/N+QziAFJFDRAPDliRFk8iTRb5quNIDhlFYbUjFTaOp3najhXXfzcrZsDfhO9GeEDKEA==","signatures":[{"sig":"MEQCIHWHhpYrXPRtt0THlKjoeOxgtt4moGuiRfVAHXBPHJl8AiBrcmBbMw0kLqo2HmmPVeuABbF6fZh2MJD42tY7thlRWA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj+j7CRA9TVsSAnZWagAAFDwQAIoqodKO51xksfzgCoe3\n4Oyp4iT2XTK2aL3YJw9JCzwOyAg2ituFOt+Kdtgya72bbJ9kv6bxWcjtVtl+\nC1VAYKbv95vXUcgDkpmDWefWOtAHcWQHY0sGO9EeHInFXOyU2cZ4FhgRIL9l\nedNuhydrSmIpGA1GJ0B80j9DGQCHkCU29bOVWuaSxHrAwlluyLfJ9bItqWaQ\nlMapDfbEA76JX5ZUVSZPxmT/sEbCfFJnVxIG35JufPM6P/8jTPQuh+cT/S5E\n0qFhm/PE/5rUtjSYnLx6A3srn24VCrN7GTIiIXXi2PUgvWD73wEAFRD6B/u0\nQ5fmWLmEIWVd1SLDOlZJkO+5y8YhkNhoCl6MF+lUyIv1/LB+yAP2MToLIgPe\nEUfED/tWHVCX5bmRDT2O1+4+HGG29BDumADY1iXw0vbCKAqRSbk3Z9JpQ3Xd\nSRXD6etAgBIBFF7DsL+NCFvksWAuATw08JkgqQZYpz1YkCIPgnUJT2ZU6U7/\nv/vwdO667OGMbf44fVTQ5mBJf+nzsJNQdOutngvHEGzjm3RC5iL5VRmhX7w9\nDPsbjciMl6yDaVnoPlhUKvnNXtd5yV2XyHTFEgFYHTXY2b0/NOaE4GALhrx3\nN3vrl5jd956pWuPDDN77uNzbeHUrUeA6K8dyJnbUcQG419oGV+YVN5O0o0zC\nrirz\r\n=+K+i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ff1cd3b616cdc46d346c7273ac8d75d34caa6162","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.89","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.145_1620044026655_0.42297472475733566","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.146-renovate-major-socket-io-packages-af9cd2c3b8cdc506f41b42a6a0c3dae0cb3ee44b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.146-renovate-major-socket-io-packages-af9cd2c3b8cdc506f41b42a6a0c3dae0cb3ee44b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.146-renovate-major-socket-io-packages-af9cd2c3b8cdc506f41b42a6a0c3dae0cb3ee44b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5505bff8b76561e09fb520c7a27af121acae0ddb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.146-renovate-major-socket-io-packages-af9cd2c3b8cdc506f41b42a6a0c3dae0cb3ee44b.tgz","fileCount":39,"integrity":"sha512-4PqMvd3LD4gci9+DSub3WPZ8iEJw6nbOZni2/UDv4JVM7xGuVRt74fK4CdWm4YXanQizl1/DWLWdxpcEWNCImg==","signatures":[{"sig":"MEUCIQD0uh+uwWGQpcb5JC7qR7pfGWVWrHCk4QrPpVqUxCumzAIgZ/rGKsRDkbPiE6gsvrD97yB23G6bBQCb3cwb+vxrJi4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgj+qdCRA9TVsSAnZWagAA0/sP/j0VrH1pj+KK2Lv78Zac\nkD1q5eqKbsDtGfi7yk2RBlepIzbh/d4oeKmrX9Ue/LqlVa6oTnZYmgUj3NWv\nWw52QQFYuRSTc8fSNXG87hcJaDYu0lqp2PrqN3qkb4nu7ZYWjif8rTG+SkFR\nfgR8RaQ8qws84IstWUxdiDa+gbkR3TY69KDFnHt1n6bwOeG3siTsiQdVFvTe\n0HiyKo2H+naA6wYsROeRR4s1Jx90ckZ0EjsEKr+THMeTgb95aYjQ6WamTaNn\nIQE3RkRTnUwsEThR1raQfxJHTAC9+zqSR4uCn/NjkJbuE4WU85zeFIDMvI1M\nxaAOqrUhADSzTWPn/RtyjYIBF/bAJaYjLZM4Lkqpuv98UVwzatPe3dTOPY6S\nbMuaT3l2U32dhlNyx5HDtJRGTnL1m7F7gJhLdLDPNcGP7/pbgIonCmaCdUsd\nlRQp/Zk7SauL6bJzEHONluSilwI6xYITnc9Klr3vlD8oWscDW6CEGZRRqZjZ\nOjhfjn/KHE44o1wX8XVYpUcow9238AzrTPLhpUmEwTNJi1J3GOPxA3NXpzNO\nDPJ9Q6UqfnJMdXJoqaZk9GuZdynsSD0u8WYhl+FLdg4iaNwzhY99PeTqtM+o\ndJyX2Talb6CZiP72xUccdfAGs4Jq8LoWb7DYYOAdkC0YsS3YToIb8G/RYW/U\nXmzi\r\n=2JWR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"af9cd2c3b8cdc506f41b42a6a0c3dae0cb3ee44b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.89","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.146-renovate-major-socket-io-packages-af9cd2c3b8cdc506f41b42a6a0c3dae0cb3ee44b_1620044444961_0.23260156728551618","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.146-renovate-non-major-3da1888cf1e62fa2afa9fd67bebefb66166af934":{"name":"@balena/jellyfish-client-sdk","version":"3.2.146-renovate-non-major-3da1888cf1e62fa2afa9fd67bebefb66166af934","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.146-renovate-non-major-3da1888cf1e62fa2afa9fd67bebefb66166af934","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d1677f20b5804f45320d929ee9ca66dc24b2aa58","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.146-renovate-non-major-3da1888cf1e62fa2afa9fd67bebefb66166af934.tgz","fileCount":39,"integrity":"sha512-bJP7oW3zFE1HSvHK6JTH38OieJ8eUe6ETPCfgr9Z4+qv5NMmdQ7S2z2Ipz7UI+5Ut5UgrBA6d3xVAa8/5XAoDw==","signatures":[{"sig":"MEUCIQDur9is7qRPrqZxL7t5RkfnNYHWg0GA9bXqcd2PGLWzswIgZQ/iN+aFpHRfivmGKzE6W+1rKCzM8cL+YEwFndcVE6k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkAWJCRA9TVsSAnZWagAAUhoP/1DWATGn71phnZhis5c7\nUp2wMSmAEP5UsF40B/4OZqTr2gDpXzmW0drbFHxR3+Is9fjX3Fte0o4NPU4r\nVTGeHroenW5DiqVrBXhjX1Y7waWR/FeuDH0NQWVr3wBgae6RU5PHZN//KUcB\nathTmTgNBs41ByJ3meuNv8h92a35FwxaGMvFhLetwRZuUuQN2KKzVC+wknMf\nfNvQhvkouTSugvuKf+/hbpsL4gIwA402PoqRCIjeouQkPjmK2fcyQaEY6fRA\n9VTg4rEhnCLcpLwBFzj54RQfgUqQm7R5FNVq8qxHo6IaeMnml/iOII3bQrdV\n3i5Kog8jbYhSygoHeghKNMW9gRzN8ZbQQiNZ/25MRlklxvSICn3yl8ITX4a5\nlwdIEmoP8Q5H+46V7atrkKYPT1svZL/bExCzV/KnpBzNKrm4MArB5cshAeNv\ntdnAyPphr8yn365a1KxZfB2xbm4lkMFtWubVowOPIH32DnGR7eu1wnE7t0Rk\nY7pvKuKmbpzDaCAmVal9f2zpLLYDM0QXGv/voY84nPxXo7Y4e6txGLrY2zk3\ndjQr53/ILTyZSFJcd0S0EO9qM+jxFBP3GUv3Mxs9GWj1rd3NmkhvxXPGCkCZ\nqNnYRfkVLXUas3Jbuf3rgXnNCRHCEb90AmtFmv6wC6HWoA11m0ND9ymA0Ox1\nU/64\r\n=Bd5Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3da1888cf1e62fa2afa9fd67bebefb66166af934","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.90","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.146-renovate-non-major-3da1888cf1e62fa2afa9fd67bebefb66166af934_1620051336642_0.7750223255789246","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.146":{"name":"@balena/jellyfish-client-sdk","version":"3.2.146","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.146","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"37c27121c2c254ce24700bab383fdecc35a4962d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.146.tgz","fileCount":39,"integrity":"sha512-dPIiOlHjEtwVtVjTm/aM1cufOGGxfYi6zv4W49ETFVSpGRfLAsrJkm7OwJ8IjaMUhGuZDozdBzza5KWbFvgMOQ==","signatures":[{"sig":"MEUCID+4/34cFeiYRN1UA5At8QGNZfjeHGRLBw+XainohTZoAiEAjPpEJzPMt14PLtfq2f1yf39p5w7z/8P6QJAMSjoFCNc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkAZ0CRA9TVsSAnZWagAAT2AP/39IdgPbHdC17IWhDL2h\nva9LSWwyYraBOEyUFCzSTeQZ7WShXK/ok49P+XXsDoehs02TSA+zZyPo/rop\n8h3SKwokUF0cMAyHU1UqPual9snXVkoLNmnVzY/9qH/Wn1kbFFAk6IrHgGyt\nhiWlW2oL03Dagtnbn7lkPTaaTUWKqP+Gt3YmhbM8OPNXwtUYOkh17WCn3Y+/\nSP1elqMhiZ/FdChlo8lFdE5XxxG4kY6b4b43qSCrWWerEVu2goUZ6QR05PwE\nSL3xW877ZL446dd12Q70JVgDh2FalPnMuuDw+UcNS0F8M6gN7tatrDg7JFFY\nRB6b1eq7JmMKh0ueBjbScI87dgMeArxb3TsmOID6Jb/nDlXm6J2MXXzDQjkz\nE1WAZixsecXFLrgcixHyCc3T3jMO3qDicNZnt0Ym3Fr7b4zIh9MIUPGo3OV/\nR2TI9/jLcT6TqdiMMnOP379AWS1xXIjlDJNWYV9FzpP8jk54lHyS5eEh9OTg\n4lG4MaLi4quVOzljoQhSdd67JF3Zm1T10QKaCmEsDECnG573lp78bup8BzCY\nMU4lYnMmvhnW7vYSFwlu8CMAVDSb6/xhd+59wLYklDGVni80f/QKN+tOozta\nixjrE/a2SVfa64DwAIEpZWo9HkoAh/ASZ+8sSgcmd/k+ugLkxJBpxrF7mn/4\nRjgZ\r\n=Z9QI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e51070ec36a6a435e86e395f6e4c6055e2e7fb03","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.90","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.146_1620051572185_0.3561415777553907","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.147-renovate-major-socket-io-packages-22ead715376aa60ea1c9d06752313b409baced6c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.147-renovate-major-socket-io-packages-22ead715376aa60ea1c9d06752313b409baced6c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.147-renovate-major-socket-io-packages-22ead715376aa60ea1c9d06752313b409baced6c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a29ff08d663e79019b8e81f22893f2b757311fc0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.147-renovate-major-socket-io-packages-22ead715376aa60ea1c9d06752313b409baced6c.tgz","fileCount":39,"integrity":"sha512-MTTgNlsul6Z7/nXU3L6MplZLP6/c5v87lHvapmLXkctiRALtstNE9cncMl0htU5GE/IZcF4JSWR9IUdhtphmww==","signatures":[{"sig":"MEYCIQC1pD20Bynre2Pq87crZVXMkWXDcwBH44bYtk9myvSskAIhAPG0kE7UMCUvSeR1TGTA8mURVk9BlKZmR4nAwc/E2m6l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkAdZCRA9TVsSAnZWagAA6lMP/1YlY8k3+AMPKOshXIMN\nQjBqoNzCZ20kUBbGVHf8XJK12843VvsNYGo/5F/yFNxrkiOOUbo6xdj2ZjW0\n11s2xnsd7RIfhbXEDYYUlhQdUts477dwynGZ945AkphUlJhpir2RDa6lhl8Z\nK+cNHW4z9mHGmjHc+4vvC4ePl59gG3ZsjxuU93d5UzMk3Z7nNJgIZMhRjNxW\nsb6ksXshAewL1lhRv24ay9iZsuMFLkoZRi3DUjV3Fa/KneID2+X4gkC6xgFm\nK1bWNMMi6XrPfn/EPTrnIztVeOgpuYTxDWOOJoGBwoojmY4uFd6a4b4tv7MO\nc8YbkLSwOvLquuu1V8omEC1nmT3WFrZt1B4IeTFPxFP9+1Pur43nHBwbcR7E\n1wOYqlpm6aS12WVSV6RGevSOljGJObRgtYzHOzZeqFZiO4Vdt3HVIpZ9/WAX\nA+6TEPgC5mWrfqoABIYcUaQ7ZlFaBsxS0cu6gcIDelBh2ni7Rfz132ATPRel\n2kOsec6Nc2NxQtTWV64h2UT2MhGOiElRncfGTYpawXB/rFJm0f6s/1RgBhr4\n/O4NyTVscF0Ze8lZLE3//9Ebr3WieSx93MTycCnh7i1FXNx2AvW//X8ZtAEK\nNY5Dyc9XJmdfoTX76YjykPl8OCwlmhlBAiipyH6T877OWZzMWqWzb2FhkqSW\nbkVB\r\n=lrcp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"22ead715376aa60ea1c9d06752313b409baced6c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.90","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.147-renovate-major-socket-io-packages-22ead715376aa60ea1c9d06752313b409baced6c_1620051801410_0.9833853038493918","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.147-renovate-non-major-d4fc8e239e88d521548f32b9bacb0917af2b2b32":{"name":"@balena/jellyfish-client-sdk","version":"3.2.147-renovate-non-major-d4fc8e239e88d521548f32b9bacb0917af2b2b32","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.147-renovate-non-major-d4fc8e239e88d521548f32b9bacb0917af2b2b32","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"591e560e25a93cf876e657759c44c657cd109d91","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.147-renovate-non-major-d4fc8e239e88d521548f32b9bacb0917af2b2b32.tgz","fileCount":39,"integrity":"sha512-rpwB9zohlqlWsCPg35YgoBhFEp+hZCD9Phrm7tJuXTdStdrlZLS0k78+ilawimOYKJpMJ660W117YqnbOICGAA==","signatures":[{"sig":"MEYCIQDXTas1rB44IcbEpwB2ZW0ydFhOJgA7pL8MH0cAqDeqkAIhANVw7NJHxQn7fCgeSdTzoyebGoPpy1rtf//O5N0nEX13","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkBvuCRA9TVsSAnZWagAAl0AP/2hz5dwdea4DOhttgW+J\n6D3rbJxKO7+Z/8c7p4jU2MxeYpQCzaSC78HxnHACxzaEQauH7nELlw0lp0cE\n05FYI4MIfZatN8NzU8zjpWq45HUbN3Gq/LeWF4Gw07Wq8w/3i7XpmaLBDo7h\nCUeHd7rdqZ1KXhtoRt35qtfuAT4syI6/YrcKFPlB0zRL9OyvFn3zleJRC9Ej\nWgD9vQQoBVXyitvFqtPbtq8nupJEgV1lI7QmAUzFMPapFBgEwLELhsc7v5d7\ncqAq0n1O24/1ycrDGiPT0mW5XuiTzfYZCsdCwPQk8bA0HkYQAro4tYZFZP6V\nTWYGu9G5xpMmV7juG1cpkMQD0zrsRYh5xdQC4hKbTGDAU7VzSJ+yWfyVCGXR\nxgUav10zrAuJ9RWYkARgsaJsaznJuHMjUod6NGl0WNvJemho1wUdU7DGqtMb\nmK1fNDQMZGBg+lczCJya5+N4x6rXlsieIDvlCn7axGF4jhFsZuXPB7tUn1XJ\nrVM27qr2qDDCItb/LUt0qVEsKiceQw+cn8RZ3bzq0Ty/wsAv0m4zF88sWJC5\n3E0i4XP5nr6pXkW06a8xKSIyxuj2CRfm+xseE8xs8RwOFLVg6jkP0h0l1xKn\nx8cm8Rl5M3CxgLPQAxvqMQR9LrLggwKwdnqpvT73L1rlCqvx16vbxGamYDg9\n8MVW\r\n=UpfN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d4fc8e239e88d521548f32b9bacb0917af2b2b32","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.91","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.147-renovate-non-major-d4fc8e239e88d521548f32b9bacb0917af2b2b32_1620057069524_0.024554061636100855","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.147":{"name":"@balena/jellyfish-client-sdk","version":"3.2.147","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.147","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8594676547b4f4c1bb873063d5ccba4d129a0e70","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.147.tgz","fileCount":39,"integrity":"sha512-LrJ0WIGbxEbg394mIejhg3IB67sYmAtWPTvbZRsIxZKCBYFogRX9ddnUKCOm+0i8oZKaPWKBaH/D3iNwv7KvyQ==","signatures":[{"sig":"MEUCIEJ+Kdpd72/h10QHJT38MX8GtpQHNLSZW8wRgznsB/p8AiEA7v9ipe1pbhzTeD/QRxYGdrX6Wv5hUVj9AUoun+qhw/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":243933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkBz/CRA9TVsSAnZWagAAWF0QAIwxQBO2Z3Z53ctuvAMr\n1HNB/5GhBm+Wv9Zl1/iQFQGJ5URLtbxY7ENdzwnft+XVJlZaIq4/J+/rERXs\nIjLpTIC3/3aSKEcGw4qePgQ9orewS2pq18Gu2xW57atAXimWp0/FytgUMPPz\nO/l15525Ia7mamktvLx9QH/WnaTpviVbId6e2voMRr0NCnib1v0p/hdRQ5x0\nLRPOZ0cNqH+GjOB62BGS/9bt5ZxI12ouwZnbJTU8ZzdvLeAfIbZPg+u2fiKL\nZ/cYQwBP29QrhPW5UIcCg69M0+11ckPBJ3um/BIk1JvFdum+r1id63TUEUzh\n/fBu44inPVve/QoccAsDv3FdYQi/OjMnWJ4/Ybe6aYxMCf2jQnGUrG4e4cHz\nXQx/pePvYbgr+v7dRblevWZ0bgsUyhpRkQRQ+BjcdlwODClm//ut4VW98k1/\nFU+6VdwxcaQMbYbGGy92dBdi7NiNldbXIPFUCK6es6FGwYlxo9xbKdyapf8b\nr9oAo9qFhlaaeoXsYXS2G8FFyRfBdZrAIrOtTvQDLC+ujDxyUgy4ZRZTgyTY\nijogO+m4vmGb5KqBYqVuUIfERHb77BLi+yadhdjDFIOs2h0N0G+pI1DDJb+z\n53W2kJo6EEwjE5tTS/U65+W5WbaJbvAcr2YbCS38psVyaxnpmGlqviQ7a2jm\n2mXm\r\n=tUHI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"42edbfa5e555ce792c3cbefc353d60bae5a56200","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.91","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.147_1620057342675_0.6084625823223089","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.148-renovate-major-socket-io-packages-bf4f0be6b4777331ab1ab19266700324849c412d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.148-renovate-major-socket-io-packages-bf4f0be6b4777331ab1ab19266700324849c412d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.148-renovate-major-socket-io-packages-bf4f0be6b4777331ab1ab19266700324849c412d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"767ebe23f0a70cdf1d6ed0301f9c1b7a773f32a4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.148-renovate-major-socket-io-packages-bf4f0be6b4777331ab1ab19266700324849c412d.tgz","fileCount":39,"integrity":"sha512-qYpSEgo1au86/N6Za6IJ8wiDCCD24DVyqZPkNha7r691WvF0bw2NIek2a6kLAqefQa1zb9h/H2jFD5FC9Td5Qg==","signatures":[{"sig":"MEQCICBY7wKUeqzMRGyNrFktkQ4/gCpjYjA87Zd0uruxvzQCAiBwdeou1E4byFIrNuQeBu8HVR6mBsrHP+OIEbU8VIaJ1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkB8QCRA9TVsSAnZWagAA7lwP/2C/LfoST6Sogj6f6IC9\nvi0Hfyq3OKT22J89XYT+IHq40uWwwfZ0ByDemAF3NoKWGde1EH1v3GZz+y8b\nYNo2LsO5T6T6soMhWJ2HLXZvzrk6T7BlOyVwXt1O28aaMEWSLCB7/u3XA5Ca\n1Qswc4xJ+3y9bKrN9jDlr7gzF8DuvEV+oIVffbCxrt91E5ff0x7Y03K/Et25\n/LiAAxH0QnwdS6Upc+HEVbdAyud52UgmRWUWIMtUyf7SIC7jmxUQ29jI8Li5\n46r73ixj12nv/ylBao1Y8dALwUmBbIVISEKx4zel5cTohc6EGKxVHdSQ5Ret\nTt8EWntFQbKZAftp/z3gKO5udEURPVdP4l14YSv4SBW0MooEYorlXX+lfpWA\nglMi8kkicy8f0fvRvOu0+buNgeCEj2lCCfPFXiDKAonJ8ToQvcOdNsWQ/pYU\nVA9QgilPtceegL1n1UTXBbwIGh01ZeS9YT78TJpeS1k2hpl53MDJ0FBhmBL9\nn1FcY/4Dp2RkQ+ugmejM/a/dPH6YDBu19LzPwTJvBjF1g3iKu+fA3goN+OOH\na0dd6CV+yxTjK4XXWrdZkEZdPMnHZi+PfP8OWCmak7Lfqak/M5/MnTzeOvSF\n2/BULTfoeoZStkQnou6OkAAtPM3kXi2LHZ/oG2GiQg5tfVj9gc2Nq+8KjGEo\nULaI\r\n=VbfW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bf4f0be6b4777331ab1ab19266700324849c412d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.91","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.148-renovate-major-socket-io-packages-bf4f0be6b4777331ab1ab19266700324849c412d_1620057871945_0.8910618548517093","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.148-renovate-non-major-db6e99d5eb691bb096eed76df6f165d560da1a36":{"name":"@balena/jellyfish-client-sdk","version":"3.2.148-renovate-non-major-db6e99d5eb691bb096eed76df6f165d560da1a36","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.148-renovate-non-major-db6e99d5eb691bb096eed76df6f165d560da1a36","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a0358280b051d547b88377e62bc01dd0ecc2e8f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.148-renovate-non-major-db6e99d5eb691bb096eed76df6f165d560da1a36.tgz","fileCount":39,"integrity":"sha512-NTsAcfKgYGaPGfPhwXBcMObkKAVqwJb5tGVwHTnwXzLu4WE38xrmYnxIGdXuwUTtaZiSOGv0VP09Gx9mFCvrWw==","signatures":[{"sig":"MEUCIBosM5BqqMP96fMopg4+cZ9PpjGSAC2WhbBmmcM5TB9+AiEA81LPQGIQLR/InyZn3MSZpr4RZkQqGy00g6+vjGixSTs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkDglCRA9TVsSAnZWagAAc8sP/R+N9pbmF8lhqgn8cK1o\nVszdoIciRmwgBPcA+D8nJb/ORqZ8lTzTqxS/Sw2WT3B5ApGQPCjXfOhrQhaK\nltv/N5TL6hQo4QxX0rlojgV1xgZ7uiwF/hxyAdS7NyqghIO8Xz1q7gWCr3Xj\ndS0AHLwbcmZKaye7X6W9g6+OQWwc/QfYxUt4q3TzZodoCYIWIIfGcyOsjogC\nXPJqpKWYtJ5Z3F3sSUABHqGGrRhVBz3Srp6VoBma4oYx3NM6IkQksIXfrRKb\ngNWpg2KQNgH+EAVwn8pMwpstTYL6C/4bAf7V2ihebgSyP2whhVUhPsiYwoiB\nKL9E/cxj9VoPq1XR0XDk8Qh6zMkI3eEfw/VG1JFmgQy2mzAeRvTjMzeg/eR/\nr5wRzM6juqCGqac6THwhB2ev8NkjxEXPnt5UmcRRK5X/rv9RFB63ofCULAZU\nEliwGYrImrEiBcUHOoRCGEjYZxHnS4utQC+rdH4VQUupADjSQTepbTRXH+5L\nBY6B1efawfjhDjleqkObpubPJW2XfTZJNhRBQ9P0P/Wg01ozASzofFULMYLI\nxxhEgSYwr3YvUw+k/OiYMxrT8sIwGYv7HBCchPi10T72F0iRBBx4PYJnGVL7\neWeOBb3gn+s7vmohqyl0YMXCUvmbXF8KMT4tTcm7uJjJzmj6g+Pmg/GBIxcQ\nJTei\r\n=5CUL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"db6e99d5eb691bb096eed76df6f165d560da1a36","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.92","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.148-renovate-non-major-db6e99d5eb691bb096eed76df6f165d560da1a36_1620064293027_0.5821898093800286","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.148":{"name":"@balena/jellyfish-client-sdk","version":"3.2.148","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.148","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f100bbc3f4cf6d39ec7e1bfef66e4b78e627990e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.148.tgz","fileCount":39,"integrity":"sha512-99MSe0rc8ggU1mwOMF9PSC0jv4NT9bWgL8NEB4YLIVVRDtqZW8Ov4/nZ/DSDkF6Yhxa5KZvlU01C9GsMk/fV+g==","signatures":[{"sig":"MEQCIF7gAeEHUsX7EghwixilqI/KaKorJcEtp4HVbtF1LZy/AiBXAifD0l9EtXSMyOADL1hpy8pm8HMWq+orLhYW82ilsw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkDmGCRA9TVsSAnZWagAALGAQAIh7215vZniddHrdwUJC\n0KpnhkBzQMiithCDEM7FaqMbhVRCxy8XhRLBI/FNOCn82mlERgw35uLo2N2P\nB0a0sNhghvDSEtKlCrjByoffuzneXNxB2SGzL2I3DSM10nFhY1spNu+2Z+R6\nQ60DFaesUBvBERF2K08oWzcJGaCHFEl5lpyoDcyEFhNfD2mVjNmGpUjklTUy\ngzYOw9Psdng74qcjedf5iClYjAEqFudUkurIPh2cnlOELzvo5ihJylw4e17R\nzP2BuE2hOSSK6eQqw+J4eMXokcnfcT+Q4TnBMxF4mDGzYuwyLQKZyiQotl7b\n2p2MGYy1Xq5NbWwKWENXS24gf0sMZYiRiNewldRkbTn2pwF+IYbWOh/XT3Uh\nbqplktwVwMxXXrpdFbLD2jGMWz7ISFGQvgIppOAWj3lfQb2NOHvcYdnF2a0A\nQvohHuBistqUySNoy5FwS+60khhlvy4Ee+2SGbDTWPwwYm1ZBx1OzO4JvUbp\noQJYF+xh69+FpZ+4q6IiK9lj7cGguwE80uU5a7SiNJRZAvLftKUnWEdqGt5k\n4JLTpTy6Cz3svDDliNBxw7UfZh66eBIYIJkjusa8kon2Qc2cBQjUNgyqcXaT\nUK6dMalZ/lxdmu35udjDh5BRzJSi5xJjEpdoCUiDY7zSNSop3wMETNECvizc\nBdon\r\n=wu1g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ae019dde73373755f49ce6d27936f536caabfddf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.92","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.148_1620064645678_0.20466626003310173","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.149-renovate-major-socket-io-packages-0bd8aa5e48eedcbb7f33f312858fcdc1a07084f4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.149-renovate-major-socket-io-packages-0bd8aa5e48eedcbb7f33f312858fcdc1a07084f4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.149-renovate-major-socket-io-packages-0bd8aa5e48eedcbb7f33f312858fcdc1a07084f4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5fbfe3b03780cca390838d7d63d0bae617bf983f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.149-renovate-major-socket-io-packages-0bd8aa5e48eedcbb7f33f312858fcdc1a07084f4.tgz","fileCount":39,"integrity":"sha512-z3zHmRkB87vd/HVI4A9G/KvJDfY8lzjlGdWqjD+Wh6r25uQdBuRV2N6+j+s0jHLcFCKlV95+n4E1bxCVXLGrAA==","signatures":[{"sig":"MEUCIQDHsw/n16z1lk0we7yFJ4yj4KfWl8kJI5qWxeH4h7NUqAIgd0KjgKqawe6OgwlhYM3Nto79TlrjU8e0erlhfFISeVo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkDnxCRA9TVsSAnZWagAAVyYP/Rx9Bi3GhRGvpu8srjSN\nmgdShOoK9GJjZVsf0ttI1cJWv54AKQWmAQvBjpCfJrCtxssteJ5QKI5myk2j\n3D7PywYI0a8AuaSzpynhhCQphhDj3VvWhX2YD0e3uGH8cb5GQAaiQuh+A1XU\nm3YNzBjJz+QxxG7zzI0XZ1MhOX8iAdTxw3rTt8N1KxFCuz8bFpGrVlLY19qs\nJ7+EP28FpsPQ6obiYVhnrYEfOXRfHHJLXtzCPsKLQCP+4Lzzkloc0KOTqic7\n+fAUfkkc97AEX2A9WmunHggMA0oFXFXMHAr/gFOJDpx/IYWKJGbU8c6AWrT7\nPvhEtwUFI54VzCUASlHPvLRnZWeWOvvgIZ2GeQSwSaC/ogwRDkNBtGPBN0tO\nGxG3T9mrRQjbfeEajUxTplNufbhePXkO6ytzmQbJ37cOL0USJ40Eqi1KmYYZ\nGwaEQ0GYX/9Ruu+CqyKiELkzv4tI2qwEk5TqNQc/php5wIzEMZ5/3UQa0YZv\n6BLGUrlwZY8dQPb9Ck1VafvYojYZYyus2KWgis15yaEsVIyfqfZKXjphR6Mq\njnJh2ZlSBusScPHxwPFjgis5v0p9samkNqPS+fID2JWOPXsEuKlVUDwAjXFg\nwgqICtmpm5ANBfUm/HLnU3qHYMwff2LbKO5WVo1/hfTwS776gkYdILsJ/J9k\nMSTe\r\n=APG1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0bd8aa5e48eedcbb7f33f312858fcdc1a07084f4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.92","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.149-renovate-major-socket-io-packages-0bd8aa5e48eedcbb7f33f312858fcdc1a07084f4_1620064752865_0.3693075510424517","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.149-renovate-non-major-d2a2ee65a8713edc754f230575f2b440032215b2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.149-renovate-non-major-d2a2ee65a8713edc754f230575f2b440032215b2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.149-renovate-non-major-d2a2ee65a8713edc754f230575f2b440032215b2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4296793f2d4ad954d9828ff51a6fe65ae9bc240f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.149-renovate-non-major-d2a2ee65a8713edc754f230575f2b440032215b2.tgz","fileCount":39,"integrity":"sha512-3Jb4YVnSA4i2Hj11+lwJxo/NGdynnV2KyVrxKl7Mbvto4IRsj7GjZsagU86+9QIf7qbsXeiOvrdUyBgnMmDq9w==","signatures":[{"sig":"MEUCIQCOzLRzAIsray4U58fpb5rB6lPNvJ3PpZTfQ1pjyjAwzAIgO3DdNTughjpZB03v6MLoGeOEZc6EEFah/7nINz5bmcI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkFaYCRA9TVsSAnZWagAAPwYP/3qh0O9gAh/eGUqGh3Sk\nn6WiqmcJ01oiyffYaH7MdEj/58vW23U7aQsURjX1DKUgjhVA+CeGc6talz8A\nH5KhZBzofZbkVk45UHYSKla6EjMEco/Z8p+2UDTTgxX5fYdft+QcfhytCaCO\nOp3nysgokdkUkSWWsFNiBYfz1RE6Zy4ucQFdsC//5xFFCJgW9lGEPPl80Yv2\neTqmgGPdEApBzbpIFyxPq4zBGC8zMZUBB+IvoVshvO6w1EhV7rQDAC3uP3V5\njiJzQEGOLN405s1jdLWqUhnQ4dovrMluV78hsAbvAE6UF8IfjT6R5SyEuZXm\n7Z+gQ9zT/UfMiSrZ2ST3QHpjzoKxBx+kChIoeq+grQCsNmN6k7wc5nFOQUzM\nznuacbcDFKwslO9b2z3/yhTKPR4mvH+KnD/uikIHZ7yBWV2+E0xdxTu/7rOD\nGPVyVT5bwRb3qCXCSmQWvHqjmtR2/JlQ8NIvYBibBmP4IboTBlzXh7SoTNjV\nAER4Qm2dOgxB7fcwcx5G6rVo0RtEQIA/lgXY8rM+3TCxjCPJaObSeIfRIlF4\nqpEPgnU3OUIE69kFeX/SAWh67UVdBB8hl70ckku9Fo28hCUum2tnwKnhzz/9\nluUoKK0lLEFuvnd4K8wK3FEOp64WjsHN0Z1aN7IGUB2ZX882nqnl+r4uzek1\n8yRs\r\n=+Xvr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d2a2ee65a8713edc754f230575f2b440032215b2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.93","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.149-renovate-non-major-d2a2ee65a8713edc754f230575f2b440032215b2_1620072087560_0.5323147937391373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.149":{"name":"@balena/jellyfish-client-sdk","version":"3.2.149","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.149","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f247caf1e5c64951ddb82c5812dbf1c35b1b9271","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.149.tgz","fileCount":39,"integrity":"sha512-RPjONgRFBEljxW2mZaJo4nYR6Gbs6MD8KiOkKlhDT46B6wj9YBgq9vB+X0YIZ0VxZW7EdzXr1jDHvtPTrIhxZw==","signatures":[{"sig":"MEYCIQDi7l57CoOijNZxTi4vktVCaM//LhbkBigoto8NQGOxiwIhAOgQh7FTZYY53jGqungTKD+IcuX2xzEmq5ceiQcRi0bm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkFelCRA9TVsSAnZWagAA4V0QAKFxx4btEya8ETLZV3r4\nvEMdBdbKEfnkuwqxJtT4g7dQTks8eGRtceBppnU7DXFUOX1t5vgZrFXIoErs\nTQl2dnX/JZPfYqOmlpDaIE5w9xMrkARZLs8U8LQ0I2oUusQ9kJMe+GNQjvsE\n7v8QujfEK5QjssMcOZoLu/GGLM4dcVe4MVvvQyiydy1GDMwpRTLZ/t5KXajy\ncP27wVGY9FP5A/ZVlai5FxxbTT7u5u20pqKnKlnkOIRSbX72aVqKdTrb/TXM\nIw0mftz5ww/ElhkCNBrtBvFPAHn/gYxcA0j2IWF8QY82PnWrAX+BZeYuun70\n+a80s3ej91w3nHe3A3Ajt19Z5zjxM9Vye2hxtBnHLvi+bfYMgO6hKYYrK+lp\nGNYMO8e8PM5n0IzFLACiT+Tfgw9VXVfYeLff5Ahlvtzq+RemNby61bdxGtxq\ncWlt0TtkOsahcD9Czk+RekD2I++H5wXiKmsbLd05Znj01ipCGoJGFD7EB4gy\nCpHrAGP5qrIl2IAukUkkPIETV28kbeUGHcshqREj3dhCe/As7nixpZ8Pnw4w\njoGB10RZJAdmkfnvIJK5/dzL7xbUFqrWaFCnlHxzhkO/e11q/q3olpdHPTTo\n3rHdeuSyJ/lpWYTu/0yXu2YgyBZRZTnXWyICmZqN1yE6IH0o/XoyBQ80uqCs\nxH06\r\n=EIl6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9d614ac7648827517ee7bbd37f37452806262a70","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.93","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.149_1620072357476_0.8779549356208036","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.150-renovate-major-socket-io-packages-3cf0db20e1ce68682ef4d36b31b092786679d080":{"name":"@balena/jellyfish-client-sdk","version":"3.2.150-renovate-major-socket-io-packages-3cf0db20e1ce68682ef4d36b31b092786679d080","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.150-renovate-major-socket-io-packages-3cf0db20e1ce68682ef4d36b31b092786679d080","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"846c1deb55e934375c155f3c0f869331277cd5c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.150-renovate-major-socket-io-packages-3cf0db20e1ce68682ef4d36b31b092786679d080.tgz","fileCount":39,"integrity":"sha512-kpjrycScfVPatVt4caSLM4m189SgoKqHBpm7WBC9UR0yKV8c2/4dgmNt4+ZuKvPV00v8Jn4f925PDOvM7wM8HQ==","signatures":[{"sig":"MEUCIQDFTudGlG25cdwuoc7k816Hk23XXzulyR6AyVWwXqrNRwIgegfqy6snDsbi597jNoBKjkyK+IsQ0Ye+r009YR6pGuM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkFiOCRA9TVsSAnZWagAAf7MP/iE+UWZdRRas7uTXx9YJ\n9Bv5D+J+yQZyEvQbxyeF2EU+CVAZ15BsvoU//HGONHk0y8BPd0KjyYguOxcq\nl0HIUyobp2LQc+o/z7ZD6LnS2oXKtQuLpyciKC+ZEmqg/8FQvVVU6076ttzC\nxI+DtSIfgHQQOtEmIrE5h7lN8quELQH7m+ugLZllbzc7OA//mgmyNZh4MB7w\nCHaKgsy0UaEMSd+esKvxCvbxwyhIr4Tu+DHOsYo4S1KybOYZQW274JMwij+O\nQCRCdN8FtiLtX4+emaz693pMUTX/YudAMKqv8o3RzD+ZxsHIKMosj8CD2rAW\nszUnQjApi9sz92K5mSp7w7QRZx987rjXWh96zT7H0z3rW/jUV7siIoSSZIDv\ns2ygYD8CjAIlPX8+CUwUskcE4TvFraxn8jJvfFIxHqNjUNZ6qWvbaDI6nvb3\nm0cp+VTbYC3sBfGDnKcpnPx1m4l2EXSawmBKOFCAHSFHKh8vZEYuXyYXkL3u\noAQZQZNsmK5C0LqRHAxNE4zT52UaUfwPemXWjJlp4sauKr2CmaqDrDBrnSyq\nXqhtkVo27DenkgjSHDMv4orLnxh0Plt6uX0P79aKD6Xn1svrd7Xj0FQnMYfj\npJ/bxYxUxeu2Ec6nxOzj2nGj25Pa1Z/0szfRGUOrCpyqfHN0jxskJyrKjaUr\nR3UW\r\n=Csma\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3cf0db20e1ce68682ef4d36b31b092786679d080","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.93","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.150-renovate-major-socket-io-packages-3cf0db20e1ce68682ef4d36b31b092786679d080_1620072590240_0.16897289603444987","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.150-renovate-non-major-34591fa613d1aa9c489199a4d0619af9ae8cb469":{"name":"@balena/jellyfish-client-sdk","version":"3.2.150-renovate-non-major-34591fa613d1aa9c489199a4d0619af9ae8cb469","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.150-renovate-non-major-34591fa613d1aa9c489199a4d0619af9ae8cb469","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3604a469d83c3431a048eb50a858c176eac83be4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.150-renovate-non-major-34591fa613d1aa9c489199a4d0619af9ae8cb469.tgz","fileCount":39,"integrity":"sha512-cAUJnkJvm0n2YNtZDAdA+vD1z4xtd72SvR6+4gioKoX0SNUnNokOXxgilBfHeb3+thdgb4ZB5L91E1KF/wO7Bg==","signatures":[{"sig":"MEYCIQDYmK/iBqjBb2J0jJvUaIGx3Dd5kvAHLsYTv3G3zsNBPQIhANXCK475yZEq8yCpxwIACKAdGxrO6HDeMyOOoKR7VQjZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkHZgCRA9TVsSAnZWagAADFUP/2NzySDrFpr/jC4EjsJh\n1dnxycM13oOGpF/pZAFdSotFNkHDJgTIo1pNQlvJGlqotvI10n1aVlTzBRcJ\nQn7gydYEzGmXfPwNggm/6Uog+ghLWD0HAHu9DVIGNlGXzNMQcqP9QMcBm9ul\n/S7nNaBHzauB5cWhpcm2ZhyGbhQhcslkijgovsWpypp7V1mRxCITAwTb8lYf\nNXxlgKn6IaM5TZuKmJnhwDIt6ucOYI+U7vJT0SG4u+nFh8BOve9m87B3AT8G\ngYKFcDcUPCrsiZgKuZU8PH44EoRQispe/yT/Uls0ZBdltBiggxL0h2MmhHlO\nTy99fABqTfIvR6LB2PEgBCQarzE4G6doAC0B3rbLGAmAwZkykVBn6Xhi6aTv\nURo/4UjJDZBjmsg5Uo2TDKHup+p5bskVVnkL8YttJcEzceNJuWxYBVUsuU7J\nDGJk+dZ3momdlGeReV/6oqE68qP4dPIEihoGrTrgi7o771gutBWK1lMXiCRY\nLMVERk95AorzUZj5ZWk3dLfsGlTavOEQQjfm27vNi9fl0LR0sj7P4ZxDtbhL\nPEf10FanEG1BLrl1lMgwjDw0PNxMadPtvL4HsEeAh125Xy2XiYNi8MJ/RV+S\nVA8GvoCyHHlMEnBnD9uMZudYBPefhk7uSt1OvgXbxKkCigcp/ztf7tBjKwnf\ncb9T\r\n=R/aj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"34591fa613d1aa9c489199a4d0619af9ae8cb469","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.94","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.150-renovate-non-major-34591fa613d1aa9c489199a4d0619af9ae8cb469_1620080223653_0.962382889118246","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.150":{"name":"@balena/jellyfish-client-sdk","version":"3.2.150","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.150","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7fb93847bb8e27a54868e342aade02398fbb3b09","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.150.tgz","fileCount":39,"integrity":"sha512-X9RTzzI3aNCynpvRQ0TEQyAZdF6cD1ug0YanRjVUJXot0VYiuPxnO2Oo+qMa753EjU9Cz7F1hNd5uuSlIVwTkA==","signatures":[{"sig":"MEUCIQDSrdr0xuY6f3xwGVKPVdCg3Ow+DsDieWnyncRnKlqpKQIgALTk+jpiBxUdhFW7Kr7wjW7b/LVmYZoBC09jwskZjn8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkHdSCRA9TVsSAnZWagAA67AQAIuG8ZvWAYeYQc9MZh0Q\nAwLNv7QqYcZw19rrsftGYcAgzlAf/TJxnS2PENhF2g8Wpu2dvKiZXiwlMjKz\nd6LQLg70xX+pSWFDPFPI7NVBhrZyjtEeCBysmF/N3uZ9DDcdWBp487LYVbl3\n5Nww0LeYb9TmqMSNPtv0EwnQ044Puk56pY4cy5my1Su087TNIvWkoPx/zxTZ\njkjY0ieg2AQrAHNCjILwxC/qKCCINtcMmandmgpVu97Tg+516WdyZxYOOW69\ndyBCiOxqIsMqvHSiwsGc43btdald+M6uArWu/9UdC7XDe2dx3l4lrDOw/Ipe\n+syZUg21kL81YQiEg/uwd+rcBqLHP5v89C12d4Z7eYOfm89PwxEjHdcTwiCI\nXVCuohkSK/RT+92+SPUFwFE0TEKLiS1Atr+ydjBY/i/0sP45Xnqm5zYdG7eM\nLCsaaoNJ+N58RJVW2WOAY8GYVnw+HdyNLEHY2Eh4il9F94QC/u/BqoPjwl86\nZym7nMzG9U9bnKa+mD2m9RXWDy6g0zXA6JNAxfwrXdJtSR28/JR9dbDNsruL\nmdWX7D4XiiX0z6EvljelPsMFsaYkWz3UOTpdthRom3YEBsifCzI4KQwYIlv6\nFJf+lovA/ltNMD8uqaAVfoDUI+oKZI1PFfKxqgKzNOe88D8DlASpnGeNIk7a\nJj3E\r\n=lNrK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b114bea20ea4e34dc885343b2718944fad324bdf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.94","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.150_1620080465809_0.41224089141930387","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.151-renovate-major-socket-io-packages-b0d80579e5faaafe3ec8f98edbd4430e0f0efa5c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.151-renovate-major-socket-io-packages-b0d80579e5faaafe3ec8f98edbd4430e0f0efa5c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.151-renovate-major-socket-io-packages-b0d80579e5faaafe3ec8f98edbd4430e0f0efa5c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1528dd23b3154fa69f0c9907bdbb6d716fedd9c5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.151-renovate-major-socket-io-packages-b0d80579e5faaafe3ec8f98edbd4430e0f0efa5c.tgz","fileCount":39,"integrity":"sha512-ULVMJXdJQyK3PRvTBY2T+EMUV11OP05cXozLUirgBEtcanr3/QZVG3ebPCP1TE0NjMsw1Gjz+BfXA0IdrFs7zg==","signatures":[{"sig":"MEQCIHyIWa57ij/DkMBfYuQHzCC921LLsSu6KRQ8zLhOGR0QAiB2/uUBVqGrLdodudUuZyzYrCzoPPX0z5Vk6SOInKVaXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkHkZCRA9TVsSAnZWagAAHQAP/3dFEDY7JfNw+gHhgAGz\nZfp+kU2R5dRJol9NKevwmHorRWvmz++MUJA5K0X5KHlTiX6fuNfLB2MOBk9K\njvzD5rp5p0aBHX40C8npMvDFYPzxP7AA0QxY6ZL7OsKiq4MWBtJPjDsFBc4n\nekHpFm6Vv5byEOYXN2eY0w2d62o8OfUgJfVfhEOSRX/XJFTEMl090Buj2wkM\nu5aVww89VH9Pq5WwvP8kFaLeJbyilwB4yLhvxX20ufB668ldBubyMPE1yBB3\nc53EUS1pdae0toGdaftOJjxe9q73FMQ5Zlgq1GnJAyTZvvvJhVLr0yCnWQdS\neiCSxXIpb3OQEuihrEdsDEdo1ybnp9yYvR2xXG5pS+xjl9ml12wKBnaQLPfg\nu0EBSOrwkoptiUBfBAfZQHqlSuX4W1zIvwsRxE22iHG74jHqwjLZUWAmubQ7\n9zJHnhnK8Yigc/O9aTe+c0LZLJi/JPBzDRctYnJ+MyLWqjK4722NS01IIyCg\nX+iFLbiBWOyv+JiN/p9a8SVX6FihBHUrfs0UCcrsoORqCWoFQ7gM8L/9RmAc\nAgvE9UGdcEmzMltcQx0MBYwA0MUWkBacVdH3LsO294skJpxf5NxCFyYUurlX\nMNMW4T3s2MwQgzipeDVxgOwWSwTHTT3QrKbS3EfTCa0cXRZdHs/HSfx9fiPO\nSKW7\r\n=4eph\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b0d80579e5faaafe3ec8f98edbd4430e0f0efa5c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.94","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.151-renovate-major-socket-io-packages-b0d80579e5faaafe3ec8f98edbd4430e0f0efa5c_1620080920981_0.39271189813752594","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.151-renovate-non-major-f49912788790201f85ad518195547a83b774fd31":{"name":"@balena/jellyfish-client-sdk","version":"3.2.151-renovate-non-major-f49912788790201f85ad518195547a83b774fd31","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.151-renovate-non-major-f49912788790201f85ad518195547a83b774fd31","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"978d36f0cab4bc8607bf447e4fdb88b62af1e1a6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.151-renovate-non-major-f49912788790201f85ad518195547a83b774fd31.tgz","fileCount":39,"integrity":"sha512-x7Mlr4NcofEFN5DEoL1axxNzKiFmefGbCrOY1CasBzlcBfAUEHzCVbKcDWRXmcCzWy20An8443c2L86dIUGzAw==","signatures":[{"sig":"MEQCIBeaNuz5DAw4lE46TyzegPhKEQeN552MnMMhzQBCi+qHAiAZkF83zccp5cx3i1nfjQL4rBJZkT5178cAbz0Z4O5hjQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkI4nCRA9TVsSAnZWagAAYVwP/isNR277kJucMCTdjPqk\nPmyocXsILiPldIoxYLBvMVAb4YKHSHt9WKFfPEDh1SYaNYosmQSC7qoEA2AM\nclr69wJ4IM9GsK81d5gsx83Xo8ek8RUXTYzoD1i8bTfkKBWOH0AI9b+RpWxB\nFFghLbmb6wUekIMAVd1ykoHmc5kmS21ubWENImYkkQff3vi17IvKW/bAqtcL\nNq22xPDlpp6vF7MSDXwgDBSJ/Y0XVWV8VMU2fHe33PLHMr29zSpFvdhPN6dn\nV1abXB+GZRI4k6y0nGvseK5r+1VlIu7LrYd2PRao4cC8jeXIoNZlp7pZRaYF\n9f21XICrFeiLAllpmDbAphsSaZvO1wihC/EzqZQ5PqdrAojemn1PbHngbTYR\nn7m9kbKRBDwkakP3SvcZPex2gyCrokb5qtI4uBbxtl4lHaUsw58WKPPNX4ZM\nsvqyIyT/6j3HLfOM13P7j3yQ05uDA5xoTbBkg+HAxPkRoFXvEmbcOix3fJzb\nt7WAcVPA4NBkharHK3Bx/92Nif8Mb3UUAQmfHcUvWHq2R4P4tgQqq7jWtezH\n4Yjccv1ZUSvHNweNUgklawz0s2JmwkYW1GK+hemC1uVXY3oQTWnJF24vVqgc\nG9q+kmv0KC6eEJtHOQpRv9Fm054FHIrSouD8W+gi4vgA9u8BY+bjXLH4A/3A\nr1D+\r\n=6m9t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f49912788790201f85ad518195547a83b774fd31","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.95","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.151-renovate-non-major-f49912788790201f85ad518195547a83b774fd31_1620086310954_0.7769370791106134","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.151":{"name":"@balena/jellyfish-client-sdk","version":"3.2.151","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.151","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7242a182f1fdbf098d438aa01e5987448e466064","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.151.tgz","fileCount":39,"integrity":"sha512-vi4UrT1NCqOqbVFJjxNbSTa57Z+E8H6B/byQRC+w/EBUjVbHI0LJCQ2wg5eoGxDEta6oFCng4oF142ZAsQ/a9Q==","signatures":[{"sig":"MEYCIQDFXcegfGt+qAVGMGBbDcAMPcIGcJ6Y8tpoTWFzSjmJcQIhAOhb63ZlW50mJ1WlIgi7DiE4jYWYldybxaP/aDKSCh7I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkI+BCRA9TVsSAnZWagAAmcwP/i7CO5XN/MUCdXigazxM\n/uBTjTdGCmSkBHsmJop7meSlOtVV01ATDU7Z50cS5xziExJrkZ9auBb8xons\nrnIn9myHA0nCqT6mI9tehPr3w8036FlQlBIX7Viu9c0fNQZBTtSXYc6Sf/Lt\n6c7t+DH2uJWdvtTySctd4ZLlgm8V8uURg6POdcChCsxcUOZoJEMFRDAtpczd\nip2+X2UU+cEUdvV3XPJx+dTgpq1Lg4M20gT7xZdhE9TEplU4/q6d8cKxKl8l\nVhduVej/T86tZ9h+XMFjFuSL1qfGlYiTi/P1j5TzD9OV0yJAe0e6AENOr9fP\neR77rZqEnuQoLIDdWpet2NeTS9IJifB7EHkvYuR/auM3jgbp/QLJVhYS7+bg\nQhuZb2v9u3ieuN9eIuv2Rne9/SPAvtMIkTV7laxtPnhi8Zr054x37GKHrOm0\n+WDfK8EBWwvk8TLCDTsbluVU4zBSWW6GlvP9iB0liQVCBdo9Y6YjB1vqB+lr\nfK8TsBqn5rJQ4Igi9nQEGvl7jhGeAc7IaBAJPyFKTj5i0Q3bo3IHRjj+RG30\nu1ZtsK+vbH+KfgfLZjI4ZnY99s8uNw+NopVhzlGNzI4dIS+5tHH9yqtKoJgY\nLIgvPW/uYXKA7ifSVQqvWcv4gVLTePcoJ1hqqFihJfSoEcyU8R/1xNBnYyHO\nfl5+\r\n=utEm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b397e675ce0f4fc99a5e18b709d128e1f18f7840","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.95","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.151_1620086656852_0.6904603774611697","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.152-renovate-major-socket-io-packages-26e3a50a810df5f6238fe51c73a0884771743372":{"name":"@balena/jellyfish-client-sdk","version":"3.2.152-renovate-major-socket-io-packages-26e3a50a810df5f6238fe51c73a0884771743372","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.152-renovate-major-socket-io-packages-26e3a50a810df5f6238fe51c73a0884771743372","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"65d4c80ee6f2c9d798dc5620a39844c6de4d9c5e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.152-renovate-major-socket-io-packages-26e3a50a810df5f6238fe51c73a0884771743372.tgz","fileCount":39,"integrity":"sha512-7RCl+s0HG8+fUhR/vpY7c0h3eoSuJlc/uz1Pyhi34K4er/dNQj7o0E7ptHJyud2SGU7kUjtXhcqoVIeAqwqbHg==","signatures":[{"sig":"MEQCIAaB6CIYjEHG4C1OdDjavemVprXgcLkwQEQvYG4Vo45GAiAoGT64rj8uHEpQa5+1leMDnHG3fW1wnaOYjogObCY3xw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244511,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkJBVCRA9TVsSAnZWagAADJoP/j93vR+3fL8do55QukM4\nfAP0IHwGnCxhAB68NGF7qBGWeN+HqB/4tTw1trd6Yk4dEOkMSmJL5XhE/Ip/\nXd6JYu/T8gevcgpg7i6OwsIKAEhY0TJik72lvdNRuvv1CjTmCSyaZwjuFsE/\nf1Mc7ALAkzqDSMahDqToVZibGJxiQi5W5Wkj/EVAhVMweJdGP6xtlrk/r+xO\n917Ad5RUvUZzaeQdILT0D5FwozD2zelk/tFStTE2aiCmFvOYEqlTBenukkd+\nad/w8NrPkax/6WNPhFsj2X8YOrXfU2VGNZQfg1kxhd6MFIUaj+VlK1FNmAXF\nLomJ7O96kMdIVg4SWZoQz2GXZin8K21nQXZBKASzXT4BaroKys4/purCyBMd\nXR3QmFJiWs1JStG9TbysfOWtACXqLeCYQ2HCuMlNAE3d37A7VU9rXI9BC30X\n3K/JyBPMz8fltUmjETha41ob6J7uZTViN6tPo6fAaCUGZnK+mMyuuh7nEWQr\n0/bdGH2fH+kM0zE3SH9Yhhyey2xS7ZwvoEvS3TcWDIFd6JnThdKFj3C4gQaG\nzUks94u/i0ZZ2z9/eOXyyKpVdXrYMyDISgBOKU31J8lHZ8o3D2kZd4xe+ego\nvSWnbTwYr2R1pwgBh5FaUnNy2Wdza5WasPNUCFQLSBo4hRApB0AizO5nVA6z\nhAFo\r\n=ZV4s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"26e3a50a810df5f6238fe51c73a0884771743372","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.95","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.152-renovate-major-socket-io-packages-26e3a50a810df5f6238fe51c73a0884771743372_1620086868861_0.4453741689027768","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.152-renovate-non-major-8f33a0694b58f70effbcec832fbabca55d899e5c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.152-renovate-non-major-8f33a0694b58f70effbcec832fbabca55d899e5c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.152-renovate-non-major-8f33a0694b58f70effbcec832fbabca55d899e5c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5bbc8b87b2ee6a7243fb02601ad73815d32ac18c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.152-renovate-non-major-8f33a0694b58f70effbcec832fbabca55d899e5c.tgz","fileCount":39,"integrity":"sha512-2O9dAKimInwwgu4+CSZmcgNa/emb63QNYsot6OjqNpr07Khdg9IIJzmnUtA+/q17UniQDmW+WV8yXEsrrgewsA==","signatures":[{"sig":"MEUCIQCZY6R5hgAZ46Eh/sUggJJK7A8GU1yx/KU+B5xa3e0PuwIgLn9Alk7nJp68B7gnph4ppGBKf+/4k50GUOdpHvTEzDc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkLtLCRA9TVsSAnZWagAAwFQP/1/4mQOhZ6F0w+OWx6m1\n6wDiuQ182hUcR79tGeM9gwWqRdWyh5hXqkj67aegfSHmXZUQcUsb3roArk+T\nvscGHuJLNS6h3s64fdafwaghEgoQtWNIJ7O/sz1IeJllWF6V+xeOdOMIlzb3\nXhsuvQcxx/Ux1ZIyrSyvDSGX5iLDfafIaE1AF/qlXATlALS4vnOAeT4oADDj\n0U81XN3vo+ni2Wwcas3pWAWbr4fYnT+dXh8ot2EOLsYIokVrmO2dXHasx0/F\nkfMDa1HMaEt+eiPTACBvJRYCRioBh59GAyvPJYk+XzG6wblYV374xuTplk9C\ntO0syQPc0MlFNgfE+jlV2LLwa6rJX4Tt+PcKCZ3WPeqQBwPkxfQZovlMuyz5\nEFUa/LSRhNkZio0xI1ksew3e9Nvp4Yf2XT7TCjWT6E4T/bVDdpQaCwYcgj/8\nrVsCQtMxRDaGzQ7/JLCD6r2ksUEMAqfr1Z+uIsXL8I+b1bXplici/dkShUxF\nYraxOJsOqxJJk4bPJL6mIsSxtu5k0nBWCOfi3nLScDbppmmsMs0pTyPdX+sU\nv+O9G6ThEa+dEPY82L2O+VsFs9q+hfDxluD51C4zS1um3ij9RRNZvlj5muMi\nwkSnVgSkDrnDMoo6PFyL3tp8R/m854VTsX5XaGQTtp+Z98olkmiBn6n1iPIE\nev0z\r\n=mVrb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8f33a0694b58f70effbcec832fbabca55d899e5c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.96","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.152-renovate-non-major-8f33a0694b58f70effbcec832fbabca55d899e5c_1620097866433_0.13424334451959608","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.152":{"name":"@balena/jellyfish-client-sdk","version":"3.2.152","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.152","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ed15e4e10116f7c450e0b1642fb8af703dc906be","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.152.tgz","fileCount":39,"integrity":"sha512-ACyZ026yttZrxRPdN8KV0HG8a8plU4c8eRdYq+GxgMHD5qpkqqykLTZgTzP86g+KFqQzuNw+0YQjWXw1OUgLrg==","signatures":[{"sig":"MEYCIQDZB9bB775REEFc0r/qxe6vepOwy3r1Infzzxd39tXouQIhAP0EUoyvETOpiCkjfw7uT8aoNblCbjaqoYX1dnfObjcq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkLxtCRA9TVsSAnZWagAAARQQAJZbjSlAuCY+wezHdMsg\nPddsoGF4cRxS7/DRDjjDsC6Dtw+0Fz0ItvaYT9h+4dzvsz6pnZH+BlKIq/4Q\n+RcP0GqbVW9uFDp04CIqhVHVpUEt5wQ2gZEk7m44mH/73dPEwLs7nzdDVteo\nvQ6L0XVls4yTe4yLtUPesbvhrqm+I+2+8EkXWantlVqySaS6Y+C3rKQL8Nqa\n5Ga8EoutTRQHVX5gGV/sW2jQtzAvKR4Xq+HLdmMRTyI12ifLdRLAZQQ7mnOI\naJ4SiqNdQJlbI+aEtYm4rtovQGGm0Jer6pedE3otr6NF+IW90FWPkJtKCzbT\nuVDgvD0Kwn7O+4o8+uhAJOmSkYQsXQC6UUrwrrUDgpbj0MvaD8JzfvNIhuJd\nSnp5QS/zdQJ5Scr3vc+aPGj56Q9wzliwVxDyHMe3EukMXhL/EpgfyxFRg19l\nspKm4EeyGn/GVjISPrW3mS8J4Ve1MKFGMAFja4zPU+J46/ocpGjdMZehiCgx\nzh76FtlI+heaEDjVS5S6TIzAddsK22dtLpQu6qpAdJwVxrqujpPDtb8iBleQ\nh55++yQMO+DM9x4w9Hk4XgQuY4BhNDhXqCM+E+RaJKk0RWucoJPK6FhK7Meq\nw4xPAq9Z4rtsT7w1RN7/VcUSPOxcwC7qKaj/hPCkYWseSotjA2QzaCmnqd2h\n2cG/\r\n=Kx4W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d07f04617d7db816f04cb0307ccd6c2f000d9fe9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.96","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.152_1620098157241_0.940987333745168","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.152-renovate-major-socket-io-packages-b282a72e3fb158bc1716ef1f970219ac6b2b6a52":{"name":"@balena/jellyfish-client-sdk","version":"3.2.152-renovate-major-socket-io-packages-b282a72e3fb158bc1716ef1f970219ac6b2b6a52","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.152-renovate-major-socket-io-packages-b282a72e3fb158bc1716ef1f970219ac6b2b6a52","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7e9c73213d9cbf05993ce7a494b0a7949ca7c00e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.152-renovate-major-socket-io-packages-b282a72e3fb158bc1716ef1f970219ac6b2b6a52.tgz","fileCount":39,"integrity":"sha512-Jm68g3ULp87JY0MTbQ0ONHu3quVo0G/rH7G22oKHXv0OrzgOxb1j8fotfy3XarnW0wh9eQXySTc83DLsIYtfXA==","signatures":[{"sig":"MEUCIEmgse/B2Di6llcywXGvUAlPx5cmutpqTEkd3zxKYW7oAiEAoG9CyZRBmDgapj+L2QrTAq8YG1qGiqVCvhFt6uXP9A0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkL1CCRA9TVsSAnZWagAA+c4P/iGuWFS36CI1CDh93+xt\nmCXmSzdkCpGB5TJjJHsYGmmBrHZ/J7U0PIZCNe32TZ/Q0SxBgDh20lW8OJHd\nTczacowTmvgVg6Z2+rveHk8GJHQ4NplAy1y+Yrr8efYIjvqu177Th4mR4k9K\nD0teHRtLRbzeUHLhOY9Yghq3RphV0lTlbL0vRfmSFCpDkonSiV53DNn0TJxU\nDgFW4F9npNRhhHvnPbLfyxP0mxAiin5AssbltobK8zJklrnbE/2U26HImqhd\n8PESbZ9GcQX8lTgYGmQc+LcJqOY2mrmQStX7OThVwNXMTasucxfF5JAO2BOu\nlTw/jYBz0mYPGrvteybwTdMqA/rjipGLaXGEABGyJ0tYKbgqsvUqRXR/IW9c\nqpily3A3S6c/OyB+t+mMGy8iU+g/r2GUlN7V5y/RYZ1RCj5xBKMk0c7waG4R\nYkHTzHTHRw3A+MQCaWKCBDbod0UyBoR8+cFqZf3dh5A/0KVTYk4vQejeQQRj\nKviVdP+5GeqYQSuLI4Vs1OABfsbg4KMjxaQO43EnnIoowm7ee0i3p/0vEcLl\ni6tg0K7ZWu6IqH0uTCetGFekMu26eqyJAIhQSBUBKUcT1Aq+uRDemsS6KEzv\nl0nM5QVF+Ju2wMNJBsomf9y9ITZUrg/xfQ1xIs8tOqbTEWA1NtZMw6NQI2d0\n3ZpD\r\n=/cba\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b282a72e3fb158bc1716ef1f970219ac6b2b6a52","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.96","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.152-renovate-major-socket-io-packages-b282a72e3fb158bc1716ef1f970219ac6b2b6a52_1620098370364_0.8219169473178014","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.153-renovate-major-socket-io-packages-a46f4b30c5c47c06bb2ece76bb8484acff31a2ea":{"name":"@balena/jellyfish-client-sdk","version":"3.2.153-renovate-major-socket-io-packages-a46f4b30c5c47c06bb2ece76bb8484acff31a2ea","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.153-renovate-major-socket-io-packages-a46f4b30c5c47c06bb2ece76bb8484acff31a2ea","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e66d1a77f0550e4bb05396a1112ebb287bb67cd9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.153-renovate-major-socket-io-packages-a46f4b30c5c47c06bb2ece76bb8484acff31a2ea.tgz","fileCount":39,"integrity":"sha512-HeUK2rFBy6T1P3wENQonTMnl6P2ad8xO4mNkebxGnfQ4Y1isU1ysWHbg0Ub+v2CrAdTbfR8T60iTpEPXJLgEaw==","signatures":[{"sig":"MEYCIQC/ds3vF3/DFS/aTSZpIOogYJL3g0rJ77pwjQf5jpni2AIhAIjYWJiimBxB5LAlIbhU8Q5fM76DMVdNcVuU5wGrTJjR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244614,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkL6NCRA9TVsSAnZWagAAruEQAIPihhRZAecRz3Tmw8e+\nPg085KzIo2fklnoujWuGqXKtECPiS2uVyFOjTKH6RfmRB2BTulxWsWLPUB3y\nvVslmfq/ShiakAalZBC0AUe+OW7lgFn81tJYhmIStV7TEuuW4BZlr4S80hvh\n6e3qHjMocFYpJym/W/nxYZHY4e7dshe+sdFvDENbQBe+8dotUf6Cyxvt5Bx/\n2sW+ypiuLiPW/n6AsBXID/kLalVqT4Jt+5Z2mcgHmc9t/zWOMwn39lKun62O\nscVsc+zTgurOYLkj0TkT4bJPtBA52+Q7Tx7myhu5DlAZRnKHL2N1wtD2B2Pj\nOMv/poIzJd9r9D4onlbDerxu0OQSKKzYpZILnahkL/+VNrHZdWER2ZJaRvr0\n8gdsXdiFjtMvmx89p6sXfmt6H+0E4SjFyYIWacSx8HvBUvG1v2S/CTQr8pDP\nBS9FEDA0AZQjJGroOC2GiaFGE0KE4EOGa1OyHpEafJYYette7MZXPVRjjZFJ\n0vRERPZzYvql7or8Kcv70CKDofhzhpmHxf9Q4TetNaZp3Ph0fXtPrZHPujwH\n3/AxBHfzzP+6+bv+ffZWrQVkZp+4mSkiBLPS/Xya5bV+hGevdAKWYjZw4uvA\nJFMK/VNvHOKG4cbvxSDOadFj6nh3w/Hqj5I2efwSj7W28Y/x4rgmjK3TSZbo\n2TBQ\r\n=jSF9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a46f4b30c5c47c06bb2ece76bb8484acff31a2ea","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.96","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.153-renovate-major-socket-io-packages-a46f4b30c5c47c06bb2ece76bb8484acff31a2ea_1620098700383_0.17333498786725698","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.153-renovate-non-major-8dc4f8fecb6308a8ad37ccbe31baba045ff6ed42":{"name":"@balena/jellyfish-client-sdk","version":"3.2.153-renovate-non-major-8dc4f8fecb6308a8ad37ccbe31baba045ff6ed42","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.153-renovate-non-major-8dc4f8fecb6308a8ad37ccbe31baba045ff6ed42","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2cbf4d84f53715c968df6c49e59839026cd24108","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.153-renovate-non-major-8dc4f8fecb6308a8ad37ccbe31baba045ff6ed42.tgz","fileCount":39,"integrity":"sha512-CMW5xvqyxdgx+huayCkl1byzgRkgVoW3+KhYt+hYm4Pj+KpgS5IfFGqA+oupwVnh1RQFdh51jyfGEKKzDEwHrA==","signatures":[{"sig":"MEQCIG23/zeU4GL3qNTEK733u7DtyU5IQ0gQGpNXMT7UETB9AiB316HsZKwljOt+gy3/NTOXhSg20+/jpNkChLKFBbHIfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkNNLCRA9TVsSAnZWagAAV0YP/3Fjl2KvzeHKa4CyTMTK\nWhowPMtOe+d8X/yaEgjOxb5a0HtAeUrN7jHhaSMdrvSxQfP8JCSZyMBdeHxf\nK+sNgEgDOaZblBUzFUAvjeXoUKYBbV+lX8Nc5MO+jW4Ti1yiKF0v+jb2wSBQ\nhfe4tlTNmkJVHDXSNldaF5EaHWnhXmW6/y7ywMoSKsk/fP8pJLp+NgJtKJnr\nlEDg8pmyTi2zzOb5gxDSe1u5Uri9ITF9auYgdov2rKvUxNH2dMqRCgcFDWXa\n4gqgsqmI0uelzyAPGe7GiZpv7hM/4yJYDtjhPmioidoBrCdmvYVF1dQFcc4p\nU8dQxT97e7aWDBTxA0cNxzhLuzZdhQSiz34IalSVoj1G7ojaZjQZeRbdyaB9\n7+ykVIeGrkpZb+e+EtVXYzm6E86SLNBXvkGhopO/tbXnyMeXsSsiFg65RuNk\nbj/R+xL78FjxzeaKgrzRzvWcQfxoiDSBE8EcUxcZGCAkmFI+rkMCiiKCKhjr\n5uhLfnXRR8X3ChQ34xjN2F1Zh8RgrVxoadYscHNwicHsZ3HtECGpZWLtiTFC\n7HjhmDawxUmOwt5iBlxa8cpQKwyh4VBpll2EM1JiZ7QIS6Y1dHuygmhc1SHH\niQZvxjHofwLIffSb1wHk5Z0Gowh2FPcS0LbX4kM44R8Ry8K+RHOtdwE3FPNK\nRzGa\r\n=m8P2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8dc4f8fecb6308a8ad37ccbe31baba045ff6ed42","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.97","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.153-renovate-non-major-8dc4f8fecb6308a8ad37ccbe31baba045ff6ed42_1620104010934_0.4810471793292881","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.153":{"name":"@balena/jellyfish-client-sdk","version":"3.2.153","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.153","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d7fb6b7be14d3898e816b1ec8d7db639978282c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.153.tgz","fileCount":39,"integrity":"sha512-p7bxh3FlEnCTUNMEZiSOqd6WmlvUm7qnmo8FHXDtCqU7xJjxb2FIZwY7iFopPchK1nrrd8S/c+zSTOw2CeCjQQ==","signatures":[{"sig":"MEYCIQCtgz3kITEJzrxTxAAyJcwwByIirBkds7ITSm+OIcXpBAIhAPU9zYMwU9sf+/HG+H3WddbOWqQgyqk03DEmO2MEKtrH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkNQgCRA9TVsSAnZWagAAmeUP/j5z5WcEuWTOc+NhgOeV\nJHIm+0RvaCbwnlj0ARlfsdieKevhI0/y5yNmFFliJW7DDGsStk/9mtTMwbc7\nGbfMNjXfFUPMKH6FENwwv+qYEsUzf3jQdbhXnAZarMGmjl1/v5bhsO+EftM3\ngS1/szRJp85trPklD0wrWyKmCkgQrjlulxDbKS0pVHAbc9Xo7DLq/OAO+j0D\nJ2trajCM95jG4zUZsbVNbGpet0Xyu5agOzLRxX4T+XotKhVTuepCDLSxwaNy\nQ3YN+2oMeCnrEsEfDzJjuxT4DHsPjXiPFHF7rEqMfiBHKkvPwB3tWhK6D94e\nW1ChtmlH7t1eX5bNaMldQTucR8+hbqp/oyyJjPhX60+I5jUHETm4Zkz68zVw\n8BZB82mgrb3YQYuU15vTN8Ii66moYg2RtT49OGq74qdCCGEJ6i/dIcKjmOMU\nZZGHU7WFz21HnnD1cTKG93Wq9zVPSAejg+sTRL+q31kN1Oohcl+OhNiRXPre\n3MxHAP4Rv9pI6fvLvzEi1DYBXgmkwPBnMY7bsLrpQsuXl4z79L00uwhivKXu\nmCWnfXMRqn6WW0jzn7WtxcVz0GI6zvhs1ACT4IjsjzITzDYOQH0mXFsrObKN\n+jyLtw/ITgzX6nfxQQ5AYmo3D+ehl3GHjquXUY83hnVPexdFKrM4rlnhNFSD\nPa9N\r\n=9Dxi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6f7b9277c0b97ef21243bfcb76ec39c3182a3bb1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.97","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.153_1620104224228_0.43136963040436815","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.154-renovate-non-major-c15a0d39dd7202bbf933cffbf66286bcc005fb8a":{"name":"@balena/jellyfish-client-sdk","version":"3.2.154-renovate-non-major-c15a0d39dd7202bbf933cffbf66286bcc005fb8a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.154-renovate-non-major-c15a0d39dd7202bbf933cffbf66286bcc005fb8a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b49c65ddc73882a5f97540135caf503bbe1b6059","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.154-renovate-non-major-c15a0d39dd7202bbf933cffbf66286bcc005fb8a.tgz","fileCount":39,"integrity":"sha512-et22c6RCcPw0fUPp31KxCLl/Vf35RjdNjurJvcwl2xErn4EmJmpldbHYV914vcVx5RrzG7EmiYSYD7nb0XltdQ==","signatures":[{"sig":"MEQCIEGbft0XOz5rY1KgCVaNkeRB8vGzTENp7hKIFjSYcr2oAiBMo8Idj+NF+qrMiVwz58+9OJz9PvDjiVxe4+CeXqHuxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkPbeCRA9TVsSAnZWagAAvd8P/itC3+hXrBvmI6FJCgsr\nNKzCLgip6WBwvTWSyWolfCve4KcS9GDsJrjQri+r++NWOLM2ubLHApJ6yDYk\nhpIqTftC42CBpt0/JQqZ46bGZ7SsMxHIs7Y+ZPmEJsbgTEQAkkbuD/X6hO6v\n7upjySbDHH40nuIJPV7KED2CTw6QCRIdO1U03awhDBwOJM77kpwpvAARCMfY\nEy8bOT/A3vzhHkj942MB9gAqpaABOz9i0dF7yTesOwN7AIZYWeZ3IhR52NsI\nIM20EWsvyVLx7vKI6O08JAZE8X1y7qEMe5f8qmXlnjs9DC/1D+xdm3ne40um\nwdq0YFGE6dOmdJ+7w0t7KL41au7+gnnUpYNKwQBtisdFn0S+c082rU4s3dWH\nYZWtHh8e4Ekj3BCIAozOosMbjKMfqDZEHquz3xmjS4zVR1/H5QD6P9LgzDVF\nA+X/vGE8FK5xzIz7PzCuW/3NLH3OgNwg5r4IPif4Vv1m4x5DDnvDfBkvpfyS\ncFPTc1Arv1JjeTFZLwqywr44rmsbegkmgzXnKY8YBndBRPdAhW5k6udEapHq\nbmNFQQq5yVVY0uAZQswGVtUqlwDY+loqVAFsIz75DLe6PWkB6YXWLwAo3jms\nv95X/yJgXIAxid9B0mFG4d1h2Gd+OFQUDRVDiKBg1IPMNpW/5tOixomG2SvU\nUt5d\r\n=imeY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c15a0d39dd7202bbf933cffbf66286bcc005fb8a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.98","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.154-renovate-non-major-c15a0d39dd7202bbf933cffbf66286bcc005fb8a_1620113117837_0.6056624139803997","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.154":{"name":"@balena/jellyfish-client-sdk","version":"3.2.154","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.154","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dd6f6ac831a653a2dc397ae03e13a8730930051a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.154.tgz","fileCount":39,"integrity":"sha512-AmfnnsC4eym685GQPZbhZteSyIBW4u0VHCuQ/tc+N+YqPwsLdgzDH3HLhsOjT/0pSkb5cknqGey+DjQUUGc5kQ==","signatures":[{"sig":"MEUCIQC0LrfVyWuiRCKipeoV4zxPDDf0rCUcq9g6NPOV94djXQIgcesNdKkgZ+BEJePthwl4yHUsXybhJTYKjDNGK3tGBwc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkPekCRA9TVsSAnZWagAAflcP/1b8+FgO2QZor5WMgSF2\nw1kg+51A4DpE0B7djfDoSUUWZpUk8SvbmoRhymhbL5MVHM5LuvoVtpzw7/z1\n7/y9JOUdIs/KLLasbY+Tgoonix4r+UPiaRHUxA4HvXM2wc8cyr09EhWxGMTx\ngCp/io5ls8bH5shWJfIIZioLlq039n5P0lIwMsjEfCaiEJYvWvi2cy0UgSLd\n/RyjZrxcQyBPswJW/HhqX2qUdesoU8i+vRYDlV+KRF/fwYxmYvrtVARyHMXX\n2ObQ1OhpYG2Hfm77W4nD8UB0sQOu1dteogHgAIwHt6DxkEMa1PSPUiwbWfat\n1sHDJuCeBXbVnNF5yCckV7zC6TwRJKswEFLkYzidu58DiNKiMapWY10keuqw\nkmyUrM+OtNMdz9t+9xN4ATAowyr3MEqdGOVYftDV1AbA6h37lv0zbSGjaS8W\nhSF/3ryQxhpCl2IQe1DQ3gxfh3Kg5kNtzfjGacu3fpl+sbIZBcZgvPxoy/8N\nWw7MEuGC0PsYQsN6LjhVVpDvNp0wrUHQjwrQhYs/dipqVl7lZyw9E/hlwgD3\n75qcnDYuIX5JTHafGqN81qPUQKkmcpXTTKxwbJz7P8RX7dZxMzynPI9yUBYI\nbYo00v4P8cxJNRVY6fwL8ukGghDdmwQUx4e27VrWLffy4BaTpWTrn8h2P9lY\nQOV+\r\n=oPDm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8677e0ce229f6ab6c0c9f47373d23556234f2e79","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.98","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.154_1620113316200_0.3245483330038528","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.155-renovate-non-major-78e39c4fcefc195dcf91abda379d619aaa5571cc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.155-renovate-non-major-78e39c4fcefc195dcf91abda379d619aaa5571cc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.155-renovate-non-major-78e39c4fcefc195dcf91abda379d619aaa5571cc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"66c7228b375e0104895fa090c755866346d168f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.155-renovate-non-major-78e39c4fcefc195dcf91abda379d619aaa5571cc.tgz","fileCount":39,"integrity":"sha512-wZby6TspEu84DgApWZBb6x18WVHsVGGW2e78IcyjjjVFZKQoodkAo0yBHxpBVzWp3YEewXNDZ/lAgUcHAnUfHw==","signatures":[{"sig":"MEYCIQCjTRMjXIjv/giDg0C/DKQFlRoKgikFZA8/SoENBp14qwIhALVmNRSdHc2e7wp2et16h3AQ7b9+MZzLxPt3Qyk9epf2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkQQnCRA9TVsSAnZWagAAWaUP/iB2+VCj3j3E8jdXTAmb\nH1nURK/nte/JrWgaQJfBgXBTEHypZo9hj3l3/kEMq0MrmounEokCJGKn+FjA\nQOtAtOLpq2YIZ+2No1S7KVgFGJhnD1yQYGYCBmte0MytN8WtyJJLuvGUbDfF\nh+jdgUiUBIpRlZzhaS4NF+sx4pURQpD50u9A2oARi97IzGRqTm91VjrrD3/Z\n1mtnYoEVFO1zH+p4ea8VVC4NpOmJz4H+7anRqYpIlYtQnWM3bLfpX2X+J0Pt\nVKjXp4wrNrKOQhUUDTKRMn/NVdsQJvITcTSFnQXswiozyUfKPLjBIllWg8c9\nc/0O3TisoYEBV5llS+UWlgA29NF+XHeQAPK6Ks1QlU4R9qUu9r5vculbnq3+\n7RWE+q8DsABrcKZoYmyE1c+T5aufuSU8KmuwLWN5ZV8lZ4GNh1DCOAJhlzO0\nJCWsjpIpCKJfsQu/3d5s2oQBdjf3zLOohjqTZP/WkuE4V//x4rTV/tzyx93i\nR65eeM6d/gEF5Oj9WKs27EIyynNCvM6dOb2bohuxepMHs5FLkS1iEFupOROx\nmnr8wsEP1kljq8WiGw9QLsFwRWPrdogu3bTcffJhK37IosErM14rWF15lEIZ\n6dVEaBoOzk/5j2ihrfISKbRnjbKLmbmJe04IRiKkDWZMg0V5cRqsmKvfUKTb\nSKfV\r\n=jO+g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"78e39c4fcefc195dcf91abda379d619aaa5571cc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.99","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.155-renovate-non-major-78e39c4fcefc195dcf91abda379d619aaa5571cc_1620116518823_0.7407856704993319","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.155":{"name":"@balena/jellyfish-client-sdk","version":"3.2.155","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.155","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"74b0ed1c8154f4f1716e5ef0b5be81111344d38c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.155.tgz","fileCount":39,"integrity":"sha512-cfwi0bpgWKE+WD50LQIB7on7CYcpAEVulbU1SY6F/7ihM8a165n/ymBC7muBAQeF7vjDoFGdcN0IA258uwlMqA==","signatures":[{"sig":"MEUCIElk6+unvXsCLdJf7g/+TcwrAl7xie/xK0bpl/9RkLnkAiEA1i+5bJui1Du3LMgPvEsJ2q1M98c1ujrFzdkImT3HTMQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkQUfCRA9TVsSAnZWagAAgFsP/AgvlYdMssBg3J4b8TRA\nAy6Jh1vT2D8DB6oUs0/1lH0KHbu7V/anXbuuQicRpV3TXO/mYK9df23iCgWU\npHy/frqtnVB2Rq1EYNizPqI0cpfHV2NQANDtmDyYejck0gwfOJUk7ozih8RC\nJLTIuSgL21okAB1utXn8KARLULjD9kP8ihVY0LulK9ors6X2EeNSgYkU3JfG\ndmLP3CVoqmdL+JQOJxTrO6VGejY6pODF2UAWznvRr9LLavCMnu7TdJTB/7Tz\nVeqcmnKZYK2hxUsl7AnZJwAC4nl8PAIaYSKwShpK3HJ2zFDanCacDV36w95x\nt8pZ0PpugPo3J7+AYuVflzAS0mc3EtqrEkBYIamiy8ZU/ZMx2L5aaxa4GE0K\nzIpnBrUdomiQKVozPgnhNE8UMmS41Ik+XUimKTbgKBwbAYZXnQarRvsjpMTr\nPDjM2p99jA60eKJXEkEcBtx/3WkzvLa0YsUhUpbVx4if91KAt886EU2NN1Gl\nmB54qLbgFrvbFBZkw7QxfrHWHx4AyktLG/+yX4ESWMCesGZ8Miib5DHdk08Q\nWkbtedBwdSsIsO57wuho0UkVehZ0S/IaHOHRVhEoZ97g8cn36VULFFElhWDn\n/3tB3FUYXPnuBaJD6oJkTEoo19uyzaJem96yvGdV+01frvlpOeYT+Xz4WGgt\n2aCh\r\n=SrpC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ca819a521a76c371299c0e430d41c652a14c1d12","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.99","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.155_1620116766558_0.8307413992285266","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.156-renovate-non-major-525a9e614db68db133a607586d617367bb659266":{"name":"@balena/jellyfish-client-sdk","version":"3.2.156-renovate-non-major-525a9e614db68db133a607586d617367bb659266","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.156-renovate-non-major-525a9e614db68db133a607586d617367bb659266","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a8ad5516d2832138fdbbf92610b1a34eb4659e90","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.156-renovate-non-major-525a9e614db68db133a607586d617367bb659266.tgz","fileCount":39,"integrity":"sha512-+v1n8ieLhwSudqhxy0rlDPk319/yB/FdQ7h2h+BPH/R7zAjExDkpD6vqw8FyRA7gNwIiLsqb7nprA/wKaCgMfA==","signatures":[{"sig":"MEQCIGXzJUw4AfGC62i5/khbLB+nrVq/exScSGu8ljtDgypTAiAfYrbRajkuuaR8T8RzNcD278J9iM4YVsQgvnVkwAzRIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkRKPCRA9TVsSAnZWagAAi/UP/iFZMr7mhb8n5YRO22qw\nc3DGxP19gxaYqOQdONAq7b7DL/v69CUMzZvW873yR2hDMd88Pigj7tDSaVEp\nk4vZHaplO33NcNHEjX1CekbKYyPM1UIaYay1Z4J63IbUBhvi6CuswLpU1/Am\naig53+I1cWIYxtCObUOxi+0bKGQagI2YHy7AvYahaxWfH3Obzf71qrZ8anrp\nBRhUc1UjNE1Zk0HY79F6jv5VFs5S7DThMIZarB6AW54z1F0XGlI0oSmWrOwL\nR+/l9ReB2rEdJUvdljtI5qZ3RiIP1cxBAUs/8AOxBcODlMx/6FAsRTAhbmQF\nZST4PoRJv5rtBtAspW2nSKDcjgp2Ee56yH0EKzG1XIR9sUZIE4dz59gNJvGq\nPTa5X85y1sJJSpflJ0KrKcTtw4uY0ael8atvkOmHuDO+Me2cl1PkJRF7je3k\n0S0rkTDQpcGXaTw0NC1qFnhIK2v2clgqICy1UQay5WpaUtwSUirytu9usenE\np6bl8BfWs0PxTZ1Gw/d0ooG+rlR0eeBPAFZJwaB6GW70y32e6Z5dG/nqktrg\nuYoUCVhLXdclKdTqYNkSFCE4rfqVJQP8DgEPdTZ6cktTwRBatJ79VJJ+9IRH\nSoDARbBKTL/yEX6h3xC6Xslb5wdJH16pqwyY5VQRNk8vKjVV7NfWD12cOfX3\nvBrM\r\n=seR5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"525a9e614db68db133a607586d617367bb659266","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.100","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.156-renovate-non-major-525a9e614db68db133a607586d617367bb659266_1620120207113_0.30649235221137383","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.156":{"name":"@balena/jellyfish-client-sdk","version":"3.2.156","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.156","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3c6b4aadc770a9a8247a1c52bdb894018498a80f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.156.tgz","fileCount":39,"integrity":"sha512-7OjH/J8ywID9X2iyFIe/bonvM34R96J+4vFYJ5iABCsImL8gImjc713KHDVKTFDhbZnueGpe4J1zzEx7bHxiEg==","signatures":[{"sig":"MEYCIQDD6L97tGkMdyKq0O/aDrRFjniu+diQIPlicfztldzApQIhAJB3YBCRRQTL7B+7YH02RnI59mYbjh3O1ObTw4VAS5IZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkRNZCRA9TVsSAnZWagAASkEP/jltcEoUf4IT74eHoiFA\nCvwAUJW1zH+gUcwA3gkl7HWN2rzbWRAkNNHH1Gpk/vm4Ckky4vJsVBaAYva0\nnpG03IpKFbdORh4bogxDItmrbEEX8Hqy7gyQ/kEp4yfE8Srj9zAjXZCro3OL\nff4EltZCD8dZu3IzHnK2nLlZ7A8dmfQgE0Ib41klbm8ErEMz89moCOS66K66\njk3qrtdOTduowTbP0U8k359KDRFZ0BmDpHjpfwWI6sSewRRemuA5y7rafTHT\nBSdJsteTZ8i3t/1/nx+vlquyUkniX+8Xd3XbinHaNae+QKeA29kQnuiyKXf9\n8NNhPW597ACVOliOr80BlvizLYN2TWhZthuDBvQ63mHIiiuGHq6t7EcxsEv7\n1pNYCIq4L4HgPTim50ThgJbRPmMKiGXc5oDvU+UJpgn2AC8cwQfuPzhyUI8f\n8egaCB2inNG4IcYIbL2B61ModQzCQo+VsG4R8iJGyy58SJX3egTeizU9VfMb\neNnoRbZZhRsIo/X58O34o/G01F9Ex9AvA/zoq2/GwuI5BWPQyAcJfAI0/UTr\nWQK7abXfGGrnT0Wg0MaFDJ3j+mpRCNv20f/IzN3V4u7vIGjITQd5cg3fCB8C\nIv6MLL6ips4Iq1YFqko8MVygdTwzjIStQp0HcTUDvbC+4iVMEnHVXBcp++qL\nxNLo\r\n=Pcyh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"118f5704c6f1f32e4b3eb24eb77c27b5e0b25237","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.100","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.156_1620120408819_0.4151715191449121","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.157-renovate-non-major-632c1d273b5e5324eab1b3b0a33d0d8fe5924ba4":{"name":"@balena/jellyfish-client-sdk","version":"3.2.157-renovate-non-major-632c1d273b5e5324eab1b3b0a33d0d8fe5924ba4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.157-renovate-non-major-632c1d273b5e5324eab1b3b0a33d0d8fe5924ba4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"80c91b27bf59b2305be834772a03be02efe59451","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.157-renovate-non-major-632c1d273b5e5324eab1b3b0a33d0d8fe5924ba4.tgz","fileCount":39,"integrity":"sha512-wZz11DqQTqDNtGR15FkBQ2NxrYhr2PhyLBigdbURul0uKi02rB3b8N5tEZEEqVBgpE1DG9RZZb6BINZ/yXmI7g==","signatures":[{"sig":"MEQCIGjjFeXcTS0VNxYi2OjYEU9/lClbg4+gyxcF/R/O/DWnAiASaJz5BtbBy1nW4F6q4KBLg65/SY+CwxAKaTb/BcEESA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkR/WCRA9TVsSAnZWagAAb80P/1pNnfsWbV/aNx4OtUeO\noC1/JgS/qk9DUkwahZlHOpRrguqTv1oC/voTyW6n3zqcAnZjXvWTFhHmVFzW\nFJhzjuFq5Yd/bUQhY4WgCNmFo2tHuZV8zWmSgDc0SQeRFho/TOH/nQxc5kMI\nIaF8LKINs75Kn4S4/Tp6wjFtxxQByzG9LT0/3wLho/zRciXyeUrPhnBObb72\nnM7AzkH9IzpJkwiLNS3en4kU7U7GY+S6B1lVYTidki0Wi3oqLBRz67KDxQ3W\n0xeqnB9c8c2gf/PvyagdW7oCr1oqKWujNHjFacugGo1YmhaGDInTxzaI9rJw\nWRA9Mhc9wxzO6FZWB/rKAALvjZb3M95J9u3kmt51f+JKdczysnS9ya9B6KA5\norFD4waGx98HtnAkChDvauUq9gncShCohC0br+0hr6XGwYmi7zZLMDi/iFT/\n7fwQdvcvGaJlVXs7CbAeZXjqDqv81WlUyu8oQtKTyf7esQbptqXzb0yRKLIZ\nI73uff476MTE/yPTjlWYZizXC/H/asvQF+o9R/ZzVciAoq43dKTgDQgxGWJI\nGZT2rJIsMQsRJ3i4bCwzO8JRwsZkllazccc9YoatmqAsqHUiL8Gp+sy6pZ0n\nGDX+oI8tIjnSz+49lL5QD+9U6nSCxq9taTgKw8qKupuQMTGwxP0WdyznCKAI\nSfFW\r\n=K0O7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"632c1d273b5e5324eab1b3b0a33d0d8fe5924ba4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.101","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.157-renovate-non-major-632c1d273b5e5324eab1b3b0a33d0d8fe5924ba4_1620123606295_0.19408521898335307","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.157":{"name":"@balena/jellyfish-client-sdk","version":"3.2.157","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.157","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a752c73d31dff4a73d1f5739308827faa3a44aa3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.157.tgz","fileCount":39,"integrity":"sha512-nRmgNo1gw/c5/fl2o0k+Wbd5XCxMuIhrPsTr9sFqVO5p57gX81wSTWo2Y1QOQFEtRdG5H0pg22O0r9uHR2PxDA==","signatures":[{"sig":"MEUCIQCXkM1zRTO6HlP1U2qWYaVQdX2DEwlBrtTEcqj8r6qITwIgbONj6RBID0ZG/ksDIg2TVEJbHwXoCI4roC/U7D6xTYo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":244966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkSCxCRA9TVsSAnZWagAA/+sP/3pXlFEvGoE1gCFkf+eY\nQYUZjLL8ym0QFku5HTiUV+Rj3NlwTs/QBpVcVxFTSFBStQEUKnb9thfV+wpm\nppiMyT5pfc8FHcQBsh9HoWsedbr2QT/Jr44wCVrJJ3QTiGE8PKxH3TihXYwO\n5dFcm73r1iuHl6cHzkJymk8mFma9G9tYGkonwCKnAt0uG0oOy3aTjIc4ElkE\nTTmH5kcEfNypuFSaVqk+YqRjymRbC7pqGUgcr/67CMQLKAt7vUPCdPL4CRvZ\nA+IIgEkBX5J9y61qY+28F7CwlMErNq0PVZnXUWdK0Z4h3Q3CIUxRMFH1gQl6\n3XbBQHTfVRZOaX3wxcIM7LmiKUPwksnekYvw1r0FZBwto9/6jppnpf3bO987\n1vt6OUjLvOyNxYgWd6tRx/ilVZyCHhSFCpFOA1/0AOneqso4LtKgpiTef3+T\nWqBCqaGVuZGzax599t8pu9zZ1NY+98ejIOwtpPEh8GURR38m0z5RC3K67FEQ\niKAnRLm+2+S+Zp4i9su4sgYKwFIXRbfpb7O/AuWkjf3G7C+hvujSib97bF7K\nAYitQ2fyWsbAqR8GRmL0FglvvGarF8isBIugV7BX4KSw882JX4lomWZ/JAG4\nzSzVunqc5OrUDacazC2I+5iyAU/eb4tWft3grCurCqWxReUAEZrjkOkIUJcz\nT/3v\r\n=KeQE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a1cd0ec12c3ac6bc7ce6835284a584566be1c0e5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.101","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.157_1620123825360_0.8046585517795084","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.158-renovate-non-major-af1fe29722401926cf5db29775edbf7cc7e3d9cb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.158-renovate-non-major-af1fe29722401926cf5db29775edbf7cc7e3d9cb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.158-renovate-non-major-af1fe29722401926cf5db29775edbf7cc7e3d9cb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df7513e07c6a46c303c94f4c6bda417a824d7c33","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.158-renovate-non-major-af1fe29722401926cf5db29775edbf7cc7e3d9cb.tgz","fileCount":39,"integrity":"sha512-Emz5eFCG4cPT9IMR2Glyd7oaVABSoUfifQ/Qb4+3cc0IWn+AMefP826ECqih5jmmZdojHBf2nZHfjBvnNSm0nA==","signatures":[{"sig":"MEQCIDardswT9MvDjDkn8VYKMEM2dHrVE5TF2lHs5XOG9bMuAiBuc71qTHnu7RiIZgV2/EH+qYNIjqGrbpo3r669I/9P9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkTD/CRA9TVsSAnZWagAAvg0P/jp/Oj4EhVb3r5gGcbVV\nWZrvcZjDPkaONUEDAZmc04YcAuVLKYtC1nnIE8tTwq3A1JAwQjzPkhbR7AHr\n0wPpYttnVU5G+dx0DuiVAl1AQ1mFunB2QBJvoJV0re+twT6Ma+k7tGeKCjgF\n6tUdSWdy5m5pQ3vtPhVvsF917eCENp2XhPWaXkoQsm2YJ4rGk3gQN5ce+abi\nWIW9mY3o+liEksEZyaYlJMpnsV9DSgI5+JpShwPBWhP0Comp6XaRzN4LCtc0\n9R/fMj2hIzpWc/c7EJvIxlaHUn3fd7mO3Hk/3BInff8Aw7jjw5l2pbjjA5TW\njXQyU0VhbXb+k9NlZ9/F1ScMUk1olCITI7jd7pJSCsqIIOmkE+OOkRhxEETM\nydzdw8vRra68VA4qvgngFY7XunhG0Yan8YAs3qz0WwSXmctMrjtn9H690e3r\nNqjW9EF9YRYE6G9/c6Vx1ktlCyLF3LcFH0NjD1qcKqKPubwSKyZ4UGHx+6pm\nMExUJop84yHASGd4BDq1ESBEghYGBXZiegAbDZNOu713xeWERHl9O2ME4m7m\nK/yv7YkPxYCkPI3s32HeyVAAcwki3Od4tc5/ogHHTQfUDFwuSP/uQOTaDym4\nA75neJGZIeMUQqN7wQRzE5bL94mzjhZcs/AOfaPLPLTIvPhSUDKoWucXDZmn\npF99\r\n=1ygl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"af1fe29722401926cf5db29775edbf7cc7e3d9cb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.102","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.158-renovate-non-major-af1fe29722401926cf5db29775edbf7cc7e3d9cb_1620127999301_0.1147044759846847","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.158":{"name":"@balena/jellyfish-client-sdk","version":"3.2.158","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.158","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dbc0cf8d4d60cffed62673e471de640838740282","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.158.tgz","fileCount":39,"integrity":"sha512-m6uweEq/pTu9eK+e7EfshX70G1+YDvAPcfltGgWCh92yFqMG+fepD6MrgAlPZYuieA+6W25ILpyFVnIaiB6iuQ==","signatures":[{"sig":"MEQCICzp76GuVnLhFYkeN8NwrDoYL4T0LGovFekYShT+4cv+AiAzju4MwX5uGyL0Iv2AIUGjunMR/ojNs3liRbX50bdDdA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkTHQCRA9TVsSAnZWagAAbFcP/RveQA7JPeUzYwQVgcaK\ndGPd8zg3eS6x3KlCvNmPO+vL1W4shrOjII2HxWWaBJ6iy+YIZFzgMqFKd8hA\nqlkVDTqNrh/sjr590PArURCbhXZ2pOAsTbjtxknnDE7/91qXTvk2jJx5b3Yy\nnkQ93oEKjvePNhNlvZtTmwaaI9sN631AFH9hhy4nr9vqyOkoyfaTWJH3DMi5\nYsp3Ap3eLqf44FBzrkNz842SMUlyq7pMeZhTwI0aSJr5d4kj5+Ft+h0W7ZZn\nMp1SI5CX6BAJaai5xrFou/OVz41OF9qBxNHuReYqIQBICNsO5MU1cYd+zgAA\n1ZqfUdKTON8/UjNJpl6cIPyMtoo5cnu2va55xUSf8gQ1027/LtRCk+Vbx2RY\n5iWms65PUPCjPrOrYJlxSW5iSAX6k48uNQrIw/StB0PomdLgGr0BSrKkwbGd\nYvP36lUdAlwp6cHG3TWckDLSIAVwLaOVAqyxZ/fykceoGkv30qmBaoA5Lf9B\njznNldci43LKKe2Izt/mKtMXp0uITWzorAhVKqsSwiV7j6YgQQFSDI3I+HrL\nHT/v7Tg3zj8+6QPCm/9+8B6xCHLJc8t3yIhoZxriW9UomjWBclxlHQv9iwU+\nm3mnZFNSd9CWpA/vADFGteM8EyKcdNvaig5adBP5axh/b9Vst5J2+UmoeHZO\nCv/j\r\n=hGDP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"969b5ddb8b9d48ba27354d0ec9e747368ab47432","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.102","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.158_1620128208475_0.5593539718375529","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.159-renovate-non-major-2272f4a81555a37962c15ec0b5ce9f4425039e20":{"name":"@balena/jellyfish-client-sdk","version":"3.2.159-renovate-non-major-2272f4a81555a37962c15ec0b5ce9f4425039e20","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.159-renovate-non-major-2272f4a81555a37962c15ec0b5ce9f4425039e20","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"648ee470307824dbe110b875521adf99c86f5ad4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.159-renovate-non-major-2272f4a81555a37962c15ec0b5ce9f4425039e20.tgz","fileCount":39,"integrity":"sha512-P5eqh6B9rSmsMhCKQs633RgO3mU8x+nnlDduVo2XJBDrIAohgXJuV6tIikhSv+effkJaVulTuiesOgDbFOELCA==","signatures":[{"sig":"MEQCIDv+DB+/1WiGX231nzFMImd0ejcrJv5nZKvLH5+e+19xAiBfWRmj9o9e8U3esjMxST7hnbEQMf/sxY0uO6yTVEVLQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkUZmCRA9TVsSAnZWagAAcN8P/AmVQEyrpTCFzV+oqKRs\nxCu/wH0L7afA3jOdrTLQw95zQ1t41kowyzWDDQPYHEd9rf/bn+4slswmisVh\nRZCu8LSZYDMtK2s3R0xHcWu4br6jBoPmPtWoh5/gILvJn2hG3zNushEm1XfG\nAeXL8W9F31c97eKC+ZCBozMnbZgycEnhIenN0WavL7sKE5AePzvqAn3cEBEb\nn7R0yTF2WfI2vNcXM8twH1fwI0xldqgjrlyP/UDMZ92tsM137GSpQAYughYH\nNcc5w8M0qSkuzxoG5E8g17XHIYbVvVTR0M0dFAS3RNuKMwPphbj/bTmwdfpq\nHzqkg96VTCONoaQe3OStMRVM/duxelWnUMB0ysLyETwakqFQPYfJ09h+stpl\n4sxegbOlYyxSYg5uvfSoBYjWOwDlQkXM3dmVP7fQF8hYop9YzFzVnCgtrWgT\nT/uhkXChsjQGaW75PFgmE349nC7BjBzagerZjSLWNqpJXm1fHJ9kmB9TYnMM\nQDzd+gFsDHKkT6MDnhLqzFnWCF5oFJc7ED2qe4pyIPSKrzpo3vnPjyQwnRkK\n2VKcywQnRVLtU7mSwz1kQbeH56tOHKpfQczvuQjYyfC8z7kAvZ1xmY8xipTT\nDnVDu1DPt9eazaudXAECHZCHyWey90+S0DEK/V0cEptizFhsHw/cV5QPYlgD\nYL6O\r\n=bzN+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2272f4a81555a37962c15ec0b5ce9f4425039e20","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.103","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.159-renovate-non-major-2272f4a81555a37962c15ec0b5ce9f4425039e20_1620133477512_0.8405761297080301","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.159":{"name":"@balena/jellyfish-client-sdk","version":"3.2.159","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.159","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3e2c034d7040fe957eb6aad4721c49470229dc61","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.159.tgz","fileCount":39,"integrity":"sha512-hjRH7tA1BQJtSI/mapoiQ/9n4+UAo0zumqlTjrPvL/ve95LXlgaAQpIfsszmXzERrPGiGN9X3ldpdo4pv6f2XA==","signatures":[{"sig":"MEYCIQCpez6yPxw1Y7QpRMt2KZHpMhcxngXwOW1avjJ/qDWkbgIhAIVhE+0BpeoeUg/gP3vMLjDkF4Fr9fToeCbxrIQ/IgfF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkUdmCRA9TVsSAnZWagAAj+oP/12yKeA5OQJ7gWA4+4mY\ndPl2k5f2Ms5xf3qEgesagemeaR6ES0bdYQfyd0NCka8ltbeTmzAJmawGEYnq\nU/wALmhp4jx0Q080eWbLTDoW9R/NEp6yD/7PoN3Rlx/EuhQas/H6fuSWWxjk\n6lNhj85zLtuqXYU8YVR9bDlz1UzFOesr20Lv/Y51fIK9VuRynM/E7MlFMfJ2\nTqAvAVgoHl7xxwm3BV3jlI1wjHM5ayz3clS8ldE47rul62rjrKBJH1f0OIuk\no7yXUn4unxb/yj6rgy9LvpeCh4ztyEvNtlpF4MZDDdfi+N1jmMK70+MRhOPw\nSRYHjmKIQgDU9HE2bzP1qohgICgjn95abdq0bdN44mD5CrU7mY/pYKGApHow\nSoBWzRSs0GXXZaiDJoiOxiXTNWaxuUfFnWWJTnmay9Sb8eD3fhCyrNCHbUNq\n3ukiP9TMBwGrOkaQCRxj+zdNneGsmG/kd/bCaVzLCTLwVBU4jcBO3ftrUttF\n75Fk+OAKKxIrmCrh4rfdVW/suPYVykWBsQyD1q61hmKd+/k9NdCJu/3zFSu6\njRugkVyqPFUy+UQQLTOM1XUuwnJc5WPS5hnCkLOVXqVVllBwVr036rvsgOrw\nQcuH1L7A+kKEMIc5vGMiu+85qzAVLt0BR6sKrL/ndfmLunWw/mxDa1vA7Ojh\nWtQo\r\n=agKQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5c1eb1d791d81e438fb467a36f73481e3d800ae0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.103","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.159_1620133733534_0.20776628279345632","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.160-renovate-non-major-84f00cb6e808d9ed0424c9729970388e276c58dc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.160-renovate-non-major-84f00cb6e808d9ed0424c9729970388e276c58dc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.160-renovate-non-major-84f00cb6e808d9ed0424c9729970388e276c58dc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bcc319292377aafa2ff88aab294ce0c428f988d9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.160-renovate-non-major-84f00cb6e808d9ed0424c9729970388e276c58dc.tgz","fileCount":39,"integrity":"sha512-z5bduHghLcw9Er2nTLMicy/c7Izrdk8Mxrm3+fJQabJJG+4da5DacApPCDENg6C8rE+N+FlBpq01hy1FPPhKoQ==","signatures":[{"sig":"MEUCIEbkMrTDST8XhSYjoa63WQXm/WtdGKWeevN1mj9sXPsVAiEA6GtdTSUdxM5dq9D5NjxPgoitRlu7NJvOwEtHtQwanW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkWINCRA9TVsSAnZWagAAYGsP/jTxD/q7NgGnDJKjtqZn\n/s8S3mXQXNuFKzwe/9WuazWI4jvA6/9AayB+bsQQOoZ2Bd/cj8LfxIjRSJ2/\nYAicxFESx/Xz7N9AWYiLP75/4GPfpF7LpMGHnRx89+iOo6gdOyA3sSRiUxTg\nbTDvPAjSsbGxKU5nl5VDGGzdyQnNZEJp7jtHycePDTmSW1NY8q99GzX85P7O\n60sDt3qSKTptDU9nR6rQDS+hHGoo7OqO2aCr9O3C1iUzzAKL60E9bJRh9LPw\nXtDM/clhCly5FitlyklgHcgHjhPTaxQNy3AwweNOg3rzIgtqbUWYLKDxfjGb\nemObcG84fhqPMtCakBVxJKUm192JYj4EFp6r7SFvgWtKwr2UHB/yOLiUK4U2\nAaUvriCOzUWVHfCq0Hk5HuJEG1DMMdWMFqIJykbX+CZW/Hy4emeeIRarkTdm\npXcSC3q4qvZ5ppEEqLHtNz+X4WYzTKFTLeeGQDmO0z6Cr38VurdqvVXHE6xx\nHGO9EPUkOr/44GaqJ19+z+sHEYTwU/on/9I0nq7LhrpkBZLp64cU0g+jFQN/\nhZO72FTkbPOmbeP99vHVsUXpCshv02Wmx2ydRl4XtJFXryI9tQnWK+oGV/RS\npUEWog+Bxtv5IzaRcJX9gtbhUlGRZg+pTGMb5hhSjQK0xSgu9dZihJURkw5B\neLz+\r\n=ArDa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"84f00cb6e808d9ed0424c9729970388e276c58dc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.104","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.160-renovate-non-major-84f00cb6e808d9ed0424c9729970388e276c58dc_1620140556965_0.9953960249651557","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.160":{"name":"@balena/jellyfish-client-sdk","version":"3.2.160","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.160","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cfbe12eb93ebcbac4f7d7d5b3efec0dab85a348b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.160.tgz","fileCount":39,"integrity":"sha512-x66zHOc0WEgGN7DIOLtVMqo9nbFOz8zcLTPDSs1wHZivzeUx+yO6AV7Zh0zeeGN/RgHsRFV/h4MFBe7qG+Bn1g==","signatures":[{"sig":"MEUCIQCGEL/JvjiBO86MOxB710i6QlXp45Ric/Sup7nXBwufUAIgQ2Lr6+li8wiPJCzWRBWn3zqbm7BamLUuuo8F8Nm/Ml0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkWMCCRA9TVsSAnZWagAAMFsP/jYZk2m8u6zEAYm72IZs\nswJRMlF87tpVOhzAaFZBinyUMEjIHCJMdFxymLhOCJInTKz2nPFNLTyJc9Fl\nG1WyAhKRacZRJ/NiunROEAjiEmhN7KzoE5r73IJcbklEXObeGPDjnxQCGVdb\naiT3qrXJnuf+dT48JOEQlJI/TulRkZ8bUMip+yhUDcOvxSErMWSoZdI213dH\n+42MZqGHNHS/4gEf9u/NRm2l3lnKXXVTchLqwQk6W+OXjzLN+0rq6AuLxM5l\noabCEmh5829LHUcVrVWuMYERTLVjnFx86wxOvBU12MCTMRV57P1/YD2RGsJH\nOn2e+s3df8xHJMA1k1KpJn+s9bYCEu1Ml0rxxG8/Xy4pLLGf0dq4lsPhEk9l\nfOVBphuRYgKM+MHCRzO0dVXktpfXoE3hso7q+xNgzBqIimNsvSgnuHKYKwMD\n5vZI1NFXSqUT8kFrfDkUU+KRfqIaYcWFctTHF33NY1cQcDd2Bil1QeoK7gXt\n/QAVPz913e0p1JPI3odIpQAMgZ1+r/ePyoKopVfAkrbZyEEA1U7yVTc7SZOD\ny1HzCnKs4Pk7Gx1K0r5IF1PHKS/dyz+f6vX8rwgfFnJr3mi+gCKKHs2EdDjU\ncsLFRQmsXkjt7M8pOAF3FKpSC2qqxYRieEGlbp+W/eQlcE/WHJzFH8ketmqp\nzdEV\r\n=1kG+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"190698917e0e65b780b95d0920cdc464ed2fc7fb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.104","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.160_1620140801697_0.5350419138183982","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.161-renovate-non-major-bb5a7ed92107f3f2dc1e3b0c4a6744e72164bbb3":{"name":"@balena/jellyfish-client-sdk","version":"3.2.161-renovate-non-major-bb5a7ed92107f3f2dc1e3b0c4a6744e72164bbb3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.161-renovate-non-major-bb5a7ed92107f3f2dc1e3b0c4a6744e72164bbb3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6b8d1a11cef3e889220bc2d7dab196ffbfa20ed5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.161-renovate-non-major-bb5a7ed92107f3f2dc1e3b0c4a6744e72164bbb3.tgz","fileCount":39,"integrity":"sha512-WrUR72cSKcDYkceZgxjNez3Nm2MzI1/2sTc9i9uN2AKHavO88PHFHTjYzTE7LRBQMCFP9zDVlrra3aa99hdlxQ==","signatures":[{"sig":"MEYCIQCvYRbCH2pvYs/cNQi/Xa2Jkjs6Q1xHkw42Krt2Mv6tqAIhAMBaKlfTPCIRqufJcEL8Lv9iPwJdhYnw67dxMS0Xb6Xb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkYP+CRA9TVsSAnZWagAAb14P/19gXCwiH7MGpJwskl7i\nM0TfSdsn4HEkev12L+79eWw18ZzaD4ooMnB2GH/wJ7Lb11POMvfhP4+NL4v8\nvRq968n2c6bb441OYxJMU7xgca5XrXPtoFAZHJ/sZa1DzpTxBzXHm3xNIqzH\nZwOI3UwEr23CJl7qjhuJDRy5JXblPYaXqZ546yK0DPXrVnK8QFmG6JDog4um\nRIuJykaS4YNJURVhjQ6hvGEHF08eNj8KI68OblWwshv0GBrkTPTQRDCQj+ib\ndqgMTapD/i0v34BwZv2yMlBYQiTjHAFVScMyDoDAVqT5ocVFFzojmtgxFj0A\nbFVjWrQN9Hd96EehEChBNUojXuz+9VH6JFsBZtjEFVS+J+kNFMv90G3sHPPq\nP9ud1a1gS6MbwbNEUsgIwO63gfPX3LZ+UpCZm15xBPD7XyNYQSC9NNYMp7Jd\nmpjLjPNxvSXrRL2WxPnLNHmAy4Ye1BabIWO3ZJVIUHWtbkcDR8qJ+DpPoD+s\nvAvcEzlGxFihi8imtF6NYSAUhE6IsZx2i2TqZ8o6mZfwy0cVXyIcf4hQnY3C\nOevVQnS8z0L4OV6mgKb6i6CXxIHbcqibxspt5V5HlCm7J99gQE3UxEObpeP7\nickHjbqSeGWcuSiyZUkRPAOjhm2BlA2IUjW+novDD0HF0iZzLTvUEbZEzdJx\n6OaM\r\n=UZOW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bb5a7ed92107f3f2dc1e3b0c4a6744e72164bbb3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.105","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.161-renovate-non-major-bb5a7ed92107f3f2dc1e3b0c4a6744e72164bbb3_1620149246325_0.7020685021137207","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.161-renovate-major-socket-io-packages-b9146bda837757bc3cb7e26dc06a61b6cb6e7d44":{"name":"@balena/jellyfish-client-sdk","version":"3.2.161-renovate-major-socket-io-packages-b9146bda837757bc3cb7e26dc06a61b6cb6e7d44","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.161-renovate-major-socket-io-packages-b9146bda837757bc3cb7e26dc06a61b6cb6e7d44","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"79e0a55c29665ea74fbdc8e83a59ed74fb9c7e2c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.161-renovate-major-socket-io-packages-b9146bda837757bc3cb7e26dc06a61b6cb6e7d44.tgz","fileCount":39,"integrity":"sha512-vY3z/m7jOt49FBG3+i9rZnWDRqfkzafnR1PJNqxUUwmcFH4g/hwYJMYNklPYS4mglzD1BjAwebrqLqLyEEdvkQ==","signatures":[{"sig":"MEYCIQDcK1l1PLYN7ijUjtwykBItu3OQImF9wm1WnMN2jSPRsAIhALLckL9SXPf+OX2ZRBKbBtQoypJ6xc3ceIiSyP/zy1Ss","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkYRECRA9TVsSAnZWagAANKsP/3ymy12Pz4zblzP0GHRL\nWtEpK7ti0ScUOG9OQUuOWXw38Mrw1TQdRV974nq67N5z38uoIKQl9X3/d5Ep\nACQNeTee/UBtMFVYVMzBxhSaoBKMRpyABOAA0DgUvWLMe3BgjbG6lI2Jjy2I\nfi9VYS/nsDnSxwPIWPZZ9cUy7ijwCIbsxXhQXRyECs+lUBeudOLQnqka/R+o\n48uBAP8eh0jaVpE7lXk1OeEy6QEmJgCMeBq7k6TcIFLMxI0dG1IfafKdgWmP\nHUGUyBhkOZ0nE0L9ESnQd3w/vNfXNky382aRYbt0kf/Hziy2pqnRU2hkK0Rr\nM/1uFTq4HwIso5UbkpYZrkctXBJGApIDUblOXv8+oy17vr+etk58oNmVvB5w\n133XvdbCDIVg2yOQtzuduZkp8iA0Ns2rltMk29s2XwnGp/3g77LYsYfQGznx\nayn2ErMspGoDOW8HL7d+M9FT9Ywthp3qduqc1rgF+NQT+y4wHebIecB2hCb/\n5cvbdPsaAJORqrEv02LugpYI3TuQQjpL4YsSr8MHKDCWl8k8dFHRcnzay94A\nNEGwAUWxTaZ96Zdxo1I1ChuKM6ociDOYQ1+o0uXAqMIdPhpmo9L0gz79ld6s\nWKWcaTkpomQFZYhd8Lnsq+7gmTu/FgZB5LVNJD8CQSP5Qb22d7gtsy9wrkVC\noL9b\r\n=iD4u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b9146bda837757bc3cb7e26dc06a61b6cb6e7d44","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.104","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.161-renovate-major-socket-io-packages-b9146bda837757bc3cb7e26dc06a61b6cb6e7d44_1620149316570_0.4992214225591456","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.161":{"name":"@balena/jellyfish-client-sdk","version":"3.2.161","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.161","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5ea9ddf9da70d414d644e48d9ce2e4370555953f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.161.tgz","fileCount":39,"integrity":"sha512-cDM/GPHDJHPAsBjzGMmFmSGGzPcOJSGwwsKzM+kU0ilEQOxjim0LGddFxG/AUhpqeywVStJt62+Z0pU2rJe+Eg==","signatures":[{"sig":"MEUCIQD5yu7fO3w5bVcMaVQ2vWbMBZlxVc1WrEyanInrW8a2fQIgVs7WHePilSq7zjQQUZAkjAGJjrfRvPZ7hatuXfGdMzI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkYT3CRA9TVsSAnZWagAAK78P/0ujwuL6JYWtdTil2pZp\nb5u+Vy9ubyDgtFPEJzgCzMO005aYFJ4FZR7HAcl3adgQLC7bxcSk+VZhvw3x\n7osp8fBJ08PKx9j3tDQfucYJ3IlYTVLbVGJRLuiGvMceyuszC88r4wWZ1o1y\nWhAnmykPZtmudVb1aINZEKUgI0vG2u42qlQyNshZrHkND4Ya6B/Go3McbGNd\n1vCarcOJdiJBSdclzScMTM1sIEekqNLyqRnnfOT9JdW1TalVF1YexTXexeOe\n6pWNHYVL2Y5AlHmHelXeDzvqa+j5jGu4Omo0CtcKOuqnUH/mdB99RM3C+Nfv\nPGWQopDJ5dK+awYGyBLKgvKJRNnUzNnyaf0EzUCSRoqzVBbeMsAuN0B/ya2l\nDZtkYTgOGW2DxBYyvm3/pBFK9KJoOLHsWbDgEM8aNnw+Gg01H9Jxd/8WLIkC\nrFeER37b3l8qFTs/QGaBSJbqrAejKmtOg84QAfnaYRuVR/WZbmDrtmteI/CJ\nSAVf0O9Nc4s85y9ktOgesGTZGBABqIGbgWoMvYVEhHXKDEDHnFnp+KL1EJu7\nzQVmwoVcfp2lW3dkO32JUTyfZvU5yzEB2xhScyOO1pE3yWeqzG32qEX/TyBo\ndU3dvQv4LPjYO1xiYZgt7K/28MMun2MmF1EuXjtON32SNKGR4n23XPth+ZAg\nBDzh\r\n=rfuN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e4a0b7870305c0b0aee03e7e75a4a2db523a85fb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.105","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.161_1620149495472_0.5383830982679481","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.162-renovate-major-socket-io-packages-bc692ec8298962e536d08cfec75a4f57e23be740":{"name":"@balena/jellyfish-client-sdk","version":"3.2.162-renovate-major-socket-io-packages-bc692ec8298962e536d08cfec75a4f57e23be740","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.162-renovate-major-socket-io-packages-bc692ec8298962e536d08cfec75a4f57e23be740","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4b488daad6a96e173ec0fe274934f6e3c630f22d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.162-renovate-major-socket-io-packages-bc692ec8298962e536d08cfec75a4f57e23be740.tgz","fileCount":39,"integrity":"sha512-p5wNUsQJWSjzpJyUuHJapvVI8JDJPbolz0+ubppP0pmOUFX50S4lWnIIT/gazH+1w8XbCtXWAxz3qSpFvXNXTg==","signatures":[{"sig":"MEUCIQDqGG7mMCDcLHC1kM4gM1S+i79K6V3SGo1ry52cHDDFBAIgJsBBs6kkQsyiD/IVnng9qZVYx4YrKDeDiW/wzFUYsfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkYXuCRA9TVsSAnZWagAAVc4QAKTKuRx1/bLjQ/nGLurc\nkAiA84HXnXvz6j36HR2ASmw/i4elHuIkAMnanqPFDnpGScYI6j+oHXmPn7AX\nMXP/z46Gf1PjLNu5X1Uj5yw6aXyM0eEEbAjrB/VGx76AnZTkGIociRUbDcwe\nu0v43jGSEQcoNNh1e3TJIimcvzcTJzczMVpfzo3iz8iDF5FuUv5Q+FY7BMfs\n67TCYhDerfdetLUNHQvegGWlIOk0bQibbt++2xCjsW/lBCKh4jT+qqejT0al\nBiE/8ZoHQslOzctHZxJNj4arCFFJx2jKeoMUVA+JnqA2gmqy7CuKg/+suJol\ntrc95NQT3kl+T6QT67DP9i2OuwUwB5KpmoTMSQkUuhVTC4PYxiDegE1+SYdj\n/u0PUgqoD2eavPhbVNkPcQ+KHlYCv5jsi5I7Q7fAJOPFluePFopWKg2NBTrN\niniKRUFxyykPM1MHKt9VKH171GjWPXe4bS3gDfIdrHcj05rEXn2iO4l17JEc\ntljmLi8iToyZCGovJqG5C/LcR76HmLUeUtF4w0NyIDcCdysN6x0dDsqBt6zN\n8Hleq5UqFx02XMi9GxuMK7DAv6A1Snr3TpZpQnPrwM5Ge3NUAqwA5PNPb+Wm\nfBfptLftQqSsnItPz+ZJ6pZnEHAQz0iXLcKu2gfhfER3g+55PRn9JOao1PHq\nBbYi\r\n=mfR9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bc692ec8298962e536d08cfec75a4f57e23be740","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.105","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.162-renovate-major-socket-io-packages-bc692ec8298962e536d08cfec75a4f57e23be740_1620149741979_0.3384203270190915","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.162-renovate-non-major-59ba2bc56675314a049f7163451786317ea23aac":{"name":"@balena/jellyfish-client-sdk","version":"3.2.162-renovate-non-major-59ba2bc56675314a049f7163451786317ea23aac","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.162-renovate-non-major-59ba2bc56675314a049f7163451786317ea23aac","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3bfcc3dd638da1e37608321197d5dfb2adb7a1a9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.162-renovate-non-major-59ba2bc56675314a049f7163451786317ea23aac.tgz","fileCount":39,"integrity":"sha512-KoP7BkaksmIQ4pkFy5YiuS4Gw3qcDEO8kvdw9aFA3CZKANHH55RSF7p1+JGydxF0ZZpK62OBsrapczidXM9vwQ==","signatures":[{"sig":"MEUCIQCoKxpRJXQMaw3dj6BkQjqLhfjeepAwMP8/7W5tzK4vdQIgUlxgx1b7gbyW+dOoPAFl9RClx6Bijg7lsDF/tLgd9MI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkZ2oCRA9TVsSAnZWagAA8F8P/2wXOh8Wwstx/Vk84wbV\nV5GkprwgVxICffqv6DTwqUQOD34rUbSY+PCUoat4SVttNHJURD1jx+TcpLge\n0d7J+SQr0wb3P+lITDyuwKN1TIO40kFBCKZ4z+v7ynFuCDajZ5KnO97xmVhP\nc4XZnGYZeie/xltZ5VNdCj20Xu4IIU3vNdGkEZAdwLLxzU2zZaka7+aQOdjO\nTd7wUcQAOMFmwdXvy0bmNlaOHnscDm7sPeHgKB3Lq/oEUFu9blBXSunG0vGD\nsb7q6rfu05JkIYKw3c9FIhkkXPJzvhEXSJhPETFSTQwqc4tiHWmFvmTA2Uus\nQ6gGQaMYNGTMEZRuwJ57bJzC9yzeutvVDGG7V7wFzjjOjI+1ARqXlMsOSO1v\n/e4b/rpdRNV4iU97AsQmLlgGzds6f0u7ddQjdceQlhScGl3w+GsjECc+H81X\nHYu7XrIgppw2iQiRPTur1WgpVOo5lxohO5GH+uzi3JWWXMG7lEdMb34imGhl\ng3imICwUYqjaI/U5nYjPtkOPsT3k/BJkQwfZ4/qgB2PSelQtVcz1koGnQdgd\nrEUBX+/t9YxWGy5dm3eW5g9jhFlKo+wclZWL3K7zppk49qw0gNMUJzIv04iw\n5PXt6X5SAFRBg3P+wzIcViaWdLufFwWV8Avrmojj1FfWMfXbmzuSwIJSsS9V\nGdOr\r\n=tnNb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"59ba2bc56675314a049f7163451786317ea23aac","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.106","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.162-renovate-non-major-59ba2bc56675314a049f7163451786317ea23aac_1620155815505_0.11819248486252931","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.162":{"name":"@balena/jellyfish-client-sdk","version":"3.2.162","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.162","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b5acc173a9f552d40c2869ce391843d3551ea4e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.162.tgz","fileCount":39,"integrity":"sha512-Oa7LcoXJpHxgdvjD0GSJkvLuSFhazOXFn/iWpFvr9L4fHtr07UXswQ+AtW3I5c4WMd9MxtNjo4NhTAdmgOefhA==","signatures":[{"sig":"MEYCIQD3FrKdKlkscpPsHQnsIquDv9F8aMQiaoDBqoz05rkK4gIhALB3jkGTARvrYAV2PpUSnKzeuoGTUOMqr2hJwSSjQeja","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkZ6aCRA9TVsSAnZWagAA9K4QAIdMprAa20Ova+ceB3VH\np5DxPvCKYC9l9UDw6bxO5c9uLNdnfxjH/g4bsST0p02CAUft7Zxn/0omQBW9\n8Dt8C7TYZCbASqHEV8bLW9foGYolaFcBsdVIEQ2CpfQN7n3Cq+Awv7Re9x4E\nlBzprkw10Unv01y+i45Nsm5kFF6C/xIZDYbr2YHzP9Iik/qPhG+a7qVmc5f0\n1R75wB1Kjq/0pOqDVy7t2WUKbH+FQcWcBM4WlFR6KPnVHBS7I1Vb+mczzMdd\nI+JX9bjU/2iFwfryhbvt+/1VdlZgFSs+pmfYZc0+GZyKGaUSAYh14JXw6RwK\n/aQdiXPy9AdwD9vE9XA6InZLO4RDYu4unZMMfvn0XIUyEXs9uTmLdZHc6PH3\nBBza9O9L1JvjZQmHNXKEa1+JjWeI+6M68OECdQR2i6XSXje6OJexf5RWfp7i\nLMMUZ8zWlfyRt4tNpufE7GA1WnxAbzKNQRaqGvnf5YOvA0nvsusky8Jxb4pR\nEy5+54DdWNpdv8iQplYZl1odA5t57Gn9jW+hctFPgUHXwi/gJirvIbkKjgqz\nFT2/Gt5Lt5DTjhunKLH9V1X4+gWDYrxaFWjOpbZcQ68pLIL3w5yqO+oNSM3V\nwjvfIh+W4JSeOPP15WwSdcMOOolFhhDA/lASEDKkOxCBadGMCtYRmQfb0qMM\n7v8c\r\n=JLu8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"142f108f831427733b8d02e841ba626f1c6e8d34","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.106","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.162_1620156058080_0.34796322249387024","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.163-renovate-major-socket-io-packages-bb9141bf51859859edcda938cf000e4a5bc9d92f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.163-renovate-major-socket-io-packages-bb9141bf51859859edcda938cf000e4a5bc9d92f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.163-renovate-major-socket-io-packages-bb9141bf51859859edcda938cf000e4a5bc9d92f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2b412972b4046585c64d410b0b8dfbadc5d6f884","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.163-renovate-major-socket-io-packages-bb9141bf51859859edcda938cf000e4a5bc9d92f.tgz","fileCount":39,"integrity":"sha512-+OZ8KqEUT38oP7TclnA+GiCnSA3P4rZudgAA5HVGwPycx1XUP1bFB/1/j9QbIF+MSqchWJcweMrqEpPagDUuDQ==","signatures":[{"sig":"MEUCICQ1Da9Dl4S8aBnZM0GzrmEQJkHjbLKrz4oLyleCVKVVAiEAqgdKuhUMDcxza05z1CGqsQBKKbn4HdzUsLV1jkpG3HU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkZ9nCRA9TVsSAnZWagAAdg0P/i8QDvaVVQ/ZkZCAafC/\n0U9IPx1D1aCMRPt8d5snC1Rh1w4UWmi61ELAMj4zgpx2LXnsbzFfhfTEh88u\nHvxFP5/WZFCMjZZk1Q42NSZ9ECjFRpa34Zg6qMIRrQcMAE1kEI1lmaFtWrDy\noe0XVFiaPPySjTEX4HypcYRCXjZ6CCVPHJP5JvwSJx3HJ7UgomIQ+x4cQS5o\nRQ/edpCptZg0HJE8yB7flV1IYxAD8GhZHtQpbC1db19T34bzg8yWxF77MITl\n65+uB8SCommR96UzeHXN6Io2vHDUxo8U4rVa/hBrDMW9l4kEh8oXl25x2f/m\nnr0KPEagnVRd/oJWFgaz+4nPgImWuRLUkPb67UJ0CzFYW1AfYyrxp1JfZ3aL\nw/xYrxNfzejq5ap2yU0Nz7xR+neCPSb2mf4H35ttbQbWcDcpVdeVjoithhXh\nlxLakku9WqbH3uZJJATf/OteRaXMxPiziCVIaVsHgvIn9h3+APxTP9e2ITJE\nmZAhdhNw+DRw9hd6pXhgSv5u8aMQyjq18m7xI26c+E95JIpvXMQzl9arfvyl\nE4W6Qt+4u7ZwDlwnFfAMy+SVwSK2XY7AyV0xq9Y9AFR5Jy6uXYPeRnXondtY\nQXundV1QY1+8RSSMcf63Wx2UZim3ow0K1cpbIhvNQdTc5qxBO21Ha1nNQFZI\nl58k\r\n=AyiX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bb9141bf51859859edcda938cf000e4a5bc9d92f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.106","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.163-renovate-major-socket-io-packages-bb9141bf51859859edcda938cf000e4a5bc9d92f_1620156263443_0.9984975969585979","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.163-renovate-non-major-c99f607025ce89fdc6153fea4238f4c1052a3d97":{"name":"@balena/jellyfish-client-sdk","version":"3.2.163-renovate-non-major-c99f607025ce89fdc6153fea4238f4c1052a3d97","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.163-renovate-non-major-c99f607025ce89fdc6153fea4238f4c1052a3d97","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ae0d1110b675d49b227c19b4e24d1ca129dfdd1b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.163-renovate-non-major-c99f607025ce89fdc6153fea4238f4c1052a3d97.tgz","fileCount":39,"integrity":"sha512-6cBEiRsgjtQXa0ZSXVukq3IIZxp/DCTK9aqdfF9hz0fu3KLSPfE3kbvmN7xLKRjYPy1kS5tTNJxjQDuTLuVbQA==","signatures":[{"sig":"MEQCIAfze2HT0ZWD7zxxg/X2E7SjF5+wuEx6uf8ZMVhs7ueYAiAwOfN6N6iSB26NCdETkR7Uf/Y+2EmLcZ2tvlzm3WeGjg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkbCMCRA9TVsSAnZWagAAQ5sP/jnyPCJbw0QhmcX8VYvs\nenbloN6kH3ATAvo4gPI/dOy5jUeSscN6RIk7t8EW+neh8i50+TluYV8NCQFB\n++Fro4iPtvYNjzv2Q5ZX6I7pR35i+PTyqxyQJ1yRmjzzIywLdrw3IkRz+Q6p\nXiXFFGaCEt6MrGUIOrY7VyRZ1nuRQ3eGTV15W2K8mPl6jxAfMb5CJU+8Qeu8\nPQOiLPZ1rqwywM5jesrEUcBUfxQn7qin8AMbSFZLq4WybvaubiteQDu+T9xu\nKcdCmlUCrtcQeQAdLeJXWKIEZV7enoSXYb3vrPDUG8Y8/mgdTn/3UaKqcZwZ\nTwrYfsEi2x5OMqpMT0d8Kp8i4KIAG6+kECvef7y4EmNgdIWdaLGFw86Yjtz6\nliDLYBnYnQ7Do+LmsOGYMZTiMmlkTSQEVf75GQ+uhu4x+LHl1hWPclOGQCpm\n9hqcbM/ImtdLeO/lxfqsIPlkLrMQzoF2DGljDzT+N9XBShsTJpOnseof2CYt\nh9+zFrjM4V5HfbgT+lu7A/jkVLedhE/s7O7uJjzfoC0GrXN/T5/F53qf6PMI\n7zINXYMIzuP9wXcqYlf6Jrfgdt6lvM8oW8SlSUMf/ZGJITVG2C2VRekEAM5k\np9k7obfNYaSu8GPldxWPJ2rjHqR1qFnoZ94RPRMY6PeJ22Qt3uDkXSX4f+N8\n/AWH\r\n=snDl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c99f607025ce89fdc6153fea4238f4c1052a3d97","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.107","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.163-renovate-non-major-c99f607025ce89fdc6153fea4238f4c1052a3d97_1620160651816_0.18399016865894535","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.163":{"name":"@balena/jellyfish-client-sdk","version":"3.2.163","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.163","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"afd4a89ebfe27c1de9aa70b90fd9b2a475c704d4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.163.tgz","fileCount":39,"integrity":"sha512-LsZf9O3BeLe0DPZARVfw+Byqy9wsjePcQuy9KMwOZljENKofoVu4aF6Z8PY0T/Tr6grnxpvaJ8JXsERhIPJP0w==","signatures":[{"sig":"MEUCIEKOeFYsqcRPQxBheF+u4s7D7SSur0JjiMdWbNsPBw1xAiEAv1BisWwSLHuNjHDmwyKyNt9i1FbtHciHn7t5uoeeZlI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkbF8CRA9TVsSAnZWagAAoCQP/jM1vtJbNoCUAePbFaqf\n5mwkrSqg5uR6NTnH/wrRt9Hi3DddIR0fCYSrpQoKbH9dUNsX/i6+lnD2DXO1\nNIzSDfvLpQJ7sqlY3emPQlxGutYVoYPgbBKKc8Fy5pIIToWtacKEG2Oby0gI\nSxM1rfQpxjnXlPSYt0Wz3ACHvmC1STdJpn+qZK0zypTM8JDF1S9r8+7n/yJd\nb1Sd/csAGm8wuHIs6XtU4ECv9YdGtYZhrmKXgQKgNInxMVrrFhgF9dDAa5GS\nZ80xdsbnf6dtq1ruUI1EBNUHwlh+GWXJwUAolxZmTYBjK7EGdOL6xeh1DnJo\n/PkxTDnxUx6+l4BB2VCw+9dkUnqZTg2gneCe4wr1tgZwAf9t60Ets1MiF9jL\nYLFR3aGU8pmoDj2+1M8hXr+zrkoli3j2ebV4+BXhliUB+wYpNuCIKCU0tdb1\niYBkyTZnnM8MrIGurbaCEi0XHSTiyOFi+OVjtNukNQdJzqbq+lAy2DuL1Epc\noSn6tQSFyhiPEMZf/h6hq3MMjUTt02J/UE1AQ8ZLC1gdL8SamOHneKwiceYS\nd0mQjQQp7epHL2TuIPQzD/n21sd+plJnPCOeZfRkVdZJCgyxL5q8l1KUv/gq\nnXV1XWSedIqf0H006UAi0wJAUKOyIk1glQONhS1iyVkKQCl/ol1N+7V3pUSF\nJSOD\r\n=xow1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e1cbd03f7b4a8e15bf07951031d687ac2424ece3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.107","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.163_1620160892205_0.6829945859913886","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.164-renovate-major-socket-io-packages-77f3f088a6926bd363613d934be09f51d5901445":{"name":"@balena/jellyfish-client-sdk","version":"3.2.164-renovate-major-socket-io-packages-77f3f088a6926bd363613d934be09f51d5901445","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.164-renovate-major-socket-io-packages-77f3f088a6926bd363613d934be09f51d5901445","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f164b6439c9164354c3ddcb628c297228838e616","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.164-renovate-major-socket-io-packages-77f3f088a6926bd363613d934be09f51d5901445.tgz","fileCount":39,"integrity":"sha512-/fygHjSFk381pzJ3svKi1TlEOOvwZzNK6/t2QGTFfXrgDfpDPzJ7HSbRygIsyjfg75LWR0CGlARoXBH25vDGKw==","signatures":[{"sig":"MEQCIGfw7oMLWnMGB6FOpDJliR5r1jCCkXMnmaJ8lvDKqhCPAiAf/o9LpULWTnpZbV8vH0Db4pqIbiJqNV3PjlJUiR210w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkbJuCRA9TVsSAnZWagAATzYQAIpdquJnFIXQeaPpQVvU\nIT4v9MHRpa1ErbN+apm+wHfVPenQXW+eoQRDX2cH6KRvOKyQ024nYezw48w2\nKa0xOETH8KOlIseMUdxj4i4RdN4P67mETB6Mj4rmJ0dezTNGBwqzYsZdofp2\n8uO6qq3xFJldEEtPp6Myzk/xoFeSjsH2DvX6J+5k9xUynKpIndKo7bUdLX4Y\ncJkeyAtG+ykUbvShW7gh1HBCuU6DZd21HJP4rwPop6O9YpQmu97CV758qS7F\nr8lJ/iMbYOtXlTq+jt2uDWkC6hHy8QEhkB0BFV61i3SaFtD0HEyO5sJsN6YM\n29EMX+inbYbc2DDXVBtIKnHzlO+LGGePrIG0k1uQdiXetx0m1qFkgsJM/lil\nZN2sDfifoMAYBrRBhL36oDUWy0C1jt3aGEWY2B+ZH2jZM6yhrXntWk/7TF8I\nSb/kiAq/bS2psf5m6tLXm9UArqXe6Z0XjSzidSFgvmvooHqZ7JlARLgTf6kY\nW1njgY/2a/cF0EoC6mNO7cSBb8+8xdwmzrML3ngMPlecN4YQavtyDC51z+Y+\nO7+1Mlg6BOzo87XQSdNLnXNoTdMYNyfFemZXQYyJIX/IAaqFhFgTEq+WtRFL\nc9PSEElHMCzjY9vbmWxK6W1a6nxFbQSh2HoR6OgG5V89wc53ApGGa+/E3PaE\n2OVt\r\n=xDBe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"77f3f088a6926bd363613d934be09f51d5901445","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.107","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.164-renovate-major-socket-io-packages-77f3f088a6926bd363613d934be09f51d5901445_1620161133666_0.5335507049586836","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.164-renovate-non-major-015f0519aff78d7981ae02dda83ecb991c6c910c":{"name":"@balena/jellyfish-client-sdk","version":"3.2.164-renovate-non-major-015f0519aff78d7981ae02dda83ecb991c6c910c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.164-renovate-non-major-015f0519aff78d7981ae02dda83ecb991c6c910c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cc9594650f65a9d050b7aa2d77ea8e90365f34a0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.164-renovate-non-major-015f0519aff78d7981ae02dda83ecb991c6c910c.tgz","fileCount":39,"integrity":"sha512-uAT1IJ3hsPKdNYseKJLpzIzEXHx7M7sf2NG+P0LQ3aMoRpwXfkrHESnnAqDQueea82pkOH0iaJrm4UQBuIHG3w==","signatures":[{"sig":"MEQCICLF2T5GYlAl8aNiCq0dfIY1kj6Ri23nWLP5wsgSX1z0AiBDzkQNMP1ZM9X2p01pY8aLkAYx6q/4fPJPx5CA48bP3A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245754,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkcdiCRA9TVsSAnZWagAAsIMQAJsg9SYbLffPBndAH5As\nipOahbz8m+ygR44RLrBfdKPltEUQYnJI5vLcWWtpwlbsUtqPQvkxOyXHBs2Q\nNvBYcu1oh7NzL8Umf+R65aGZzgLoYC1Aet7HIH3FvmyLtdKszBnpAcvxZhnx\n2mUYla5klOEAVjgRlxkjHiCoWqhlvJNYX28uVBZW20hVOU6sPQsXWKQlmA8C\nA80/47ZTunq/ZM4xfT/0tqhSgmhxbwhUHhfxrV+v7SowpEFZl/lYEj5NlOVV\nrv6iwOF8trmLMQuxwVfUKbhhwab6r+8SUzwi+UTwgsgurbEl1EDdqhqcwZTp\nNQlG9tT8/hP6W4vJlEfzFs580lWi6Eeq7KNBju31EiOiLllIvPLpuIoCZglo\nSjnj2ZZuLQcS1x6CajH9kidy5ZoZ4HQD2EzV/6wsmsOFZnIVtWl0F04unPfM\nFIsSYfB2kTwmhB2A2KNzrujEIJgV9niAHTcugjRx+zJINPkUx+0rCOFypveG\nt/otHmYO9cP4iK+4ROPRHOv7CtOqK48UknkbWFh81WPgCN77iL39BC1H8+Np\nRj0iWCprNINDl5+GSCNmEdiyoGzgCzBvGUVxd1Px9hnqrBOl2AXFhzCBbHWA\nk09zcXTEcP3BAthFHR42rI8kYPevbpNhTcfl6f7JZmc++u6ZbBQaW6YL1cMu\npvX8\r\n=Al3n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"015f0519aff78d7981ae02dda83ecb991c6c910c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.108","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.164-renovate-non-major-015f0519aff78d7981ae02dda83ecb991c6c910c_1620166497551_0.8397742583526111","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.164":{"name":"@balena/jellyfish-client-sdk","version":"3.2.164","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.164","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"de72e814bd5ce1b91eed738c81452b29845dae65","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.164.tgz","fileCount":39,"integrity":"sha512-taHMM8whXr7QtdTJzRpw5jT7Oa8jG6ESbHR6XWhh66HTJqnjjwMfFELwSMu/uOBkyLe/5h9dkL1zACrPpwW8ag==","signatures":[{"sig":"MEUCIC9w/iiYT07dw5USaaIdFVW/ZencnxlJi3D3A2+DdKLGAiEA3n0LKICwZvEOJIjoVpgv5thwnvfpow5CuDfbakXvEgE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkchXCRA9TVsSAnZWagAAt90P/1nL/gJJUrI8z/PQsooR\nsel5MshsFBKEyYzTFUip5LuH6ERF2raHVoNzbTvBq5q0vXRlYph19/dELCTJ\nMQOM2pDV8GYt15y6FPV2UnCFIRNc9fJVCpL8rUok7zHrKlhLOoklq2EFohX3\nrR1EfnEQ78JlwXix07+8ZXIvbr+DmVatm6C+kqN6G35a8YkLX5E76vCa8DSF\nViJIjotnz21n7GkvzI3qwz2LZVtJwcOjK4sodZAXu+BNXOyI4KwnLCUAWBwd\nmlNNo0zCx8lu7oVOoH52DwXPbTvVDeOD9zxxaQnvioDlCXVpetXzX1JfQyPX\nBxgMNZ1PqMxuhjNRE0WRpE0hJDOWjcyzJrqQLUJJr6c11KkbPQlcb77xLqvE\ndk2ktdVAzB2IdhePZaHFR4HCSkJ4Q+4i2hJQlBwRGaxA8q91eJBv7lO9fIHK\nYE9DBoulN95Fp2DH9ePSadeBawWrLWqszrKnrTh2rJZpy2fZri0/UZv1lBoo\nsYtWEikcwEN/YPp8Wk2iWf8n+bgPzZmFoWBvbXTqY1eDaA6CtCw+8r7I4BSd\nejT2e/iyoCBJsHyAGTOMIqQSvY4dscungcSO/KL+YU6R56ex42UUR40hu7GI\nir9KQr1cMQVAsaUv/Norm+hW7KDkYRrth4TC4RC7LLDaabOajRH/vJu2Am7W\n3hpp\r\n=lKuo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0e951e409f696fb9323013cecb38d6a018750369","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.108","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.164_1620166743068_0.730248972623811","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.165-renovate-major-socket-io-packages-84ec206847b3f2480c6eb9767c9045439d838086":{"name":"@balena/jellyfish-client-sdk","version":"3.2.165-renovate-major-socket-io-packages-84ec206847b3f2480c6eb9767c9045439d838086","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.165-renovate-major-socket-io-packages-84ec206847b3f2480c6eb9767c9045439d838086","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"afe5a046d0055b19e33efd813ecbfcdf5f4bd19c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.165-renovate-major-socket-io-packages-84ec206847b3f2480c6eb9767c9045439d838086.tgz","fileCount":39,"integrity":"sha512-zekuLJZpFnK/CeCZlN8wVfyzFBWXmvLDZ35P8UnWAGxW6f43lzLj9Jvw5O4sJ+64j1Vr4ljRRTwhFdSORpmZmA==","signatures":[{"sig":"MEUCIQDr9P7wsc6AlIHEtJ4PjUUKoKdY8jhKdpvqwMWhVoysyAIgHo97nMmpeJQs2QhvsZ6gDsR/QpQbeDct9sXLcCZPAA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkclkCRA9TVsSAnZWagAAzskP/2w+1rU6SkV7bWlsnbOQ\naZeysNtxuzuD+xtC5gUGm1dIJBO0+QHSFUuWY7arKcAdReGWcxdmkdwQx/BR\n7wk6/BG2G/00i3F1hsFdrKJC8CLDH3zcb14C59StxPVKy8GjQ7k+7WH7k/qE\n0hdBMDZczZ94kX92md0r5Bxy2B0naSubcPjdVr/5mHZ4hWkkUMGWd4Z2Q/nt\nMHEU8EhTngYngIpK3f759pxF2szyoCIHoX8mxHxtG8MzcLEB85a0iTOmJe7n\npSokzB6JZJTYLMvNA6v7IWorefcaNMXUpKq+YKimHIrhHViYcaokVttlrw6U\nvIOlMfhwjS83semPylQscM16P8el+eXp6TSFpH3tkj+CbOZs4QY/3QXIBoSF\noyUixjISu2S9uXDF5p3uGJPDEG7PuDAXISU4dWlitOZw5jkeir/5LG3tTqXa\naAmHEDwWeyLpISLCurHHtRxLCeJ3OzRYCicIc7M0uC7lRuPL0POoaGBhifRM\n7nKXW8hHkpntOfbE3wxyYhjJ8L6AzkO8+RnrAmrZPod5ZdGYKnS7O+jlcRiF\n/PzMFkBmElJpa+1lQzo+e1eFyCwlTqsuZiuF2Qxn3hpx5FU08Ov4joD98Tji\nay8QJroUtFrg09CQoI5FUFU/k6hxbVHklfNUtLHl1m2W6OijwHUD3zkhLq1I\nacim\r\n=EZEh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"84ec206847b3f2480c6eb9767c9045439d838086","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.33","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.108","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.165-renovate-major-socket-io-packages-84ec206847b3f2480c6eb9767c9045439d838086_1620167011957_0.5324712356561025","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.165-renovate-non-major-1284222f95045a05fb58f3763bc4c3a96facd657":{"name":"@balena/jellyfish-client-sdk","version":"3.2.165-renovate-non-major-1284222f95045a05fb58f3763bc4c3a96facd657","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.165-renovate-non-major-1284222f95045a05fb58f3763bc4c3a96facd657","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"53d2ab05de2522f8e4ead16943509b712579a65b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.165-renovate-non-major-1284222f95045a05fb58f3763bc4c3a96facd657.tgz","fileCount":39,"integrity":"sha512-XNu4QtQX2/hEnoC/AT05VMkQWLD7OoKZzUzgMzsF1VAf7dO3WSesxLmQjLynXEjnhCQC/HiH78ddouXFGIbChQ==","signatures":[{"sig":"MEUCIQCbN5u48MoihSRZQEhVXxmfLSTiYPhFz9c8/rvxwNWhJgIgcxqN8ciujAOq4hor8XtZQyqWpYLcUoUFtGNqHc2psGI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkeL7CRA9TVsSAnZWagAAn+8P/3OfRwPmny3Jant/hmwu\nyzbEhHQCtSyNbM4SiTZCXdTNaB1T9063sx1ctZN3G95b2oFr31JGDSwH7Dx+\n88ApTxC9WPSNueZpuns1BaCISB3hzE2wdYlJOPAqJiEkBzMLOcsIwCn5yp+c\n5H8WKETXz5em2XoMZecMMye+p+UFUOmnVMcBDkQRthd+2ReHfOtVTEp8b480\nNKbzNB7togEzW+aqijxXXbMJIT0tuqmvIuVDIHdPHXG+SrTDKdosnkYqdM4n\nCWbG00R3VeFHdsBCdP94YegexE51pLCb/q0vHkEIXnLRLRZhpNw/RG1CmrOt\nWVwg+szkwKGYBkjt85nEpmPSYhrsZRurtkaMijPCPtV+BvzQJBmNy6hVYb9e\nv7KvBOurtP0Sy508ZVPIek9Ykjotb6jlR1Kxc+V9HOQmD/eVJwkzKX0Z9wTn\nFmSXAI8KqubyGUfyC0mfQfKLEyakQhfnjdL8ZMs1KMfnx7U0EeCHvDpDJTFb\nd21DJigDfuMe8/QFBzl+/f/OPIvmf/O0WM+eWrPv8DIsCbkA4M+T4afZxLhO\nlzdooGcT6PLjBvPskJ+9IwFPxLJjN0B3PuUxi2S3RI/hNqxkSWL+g1upThkw\nqkhA39zwvo8aZWLsKO2cfXApUefBQMp0LiDBhnaPMrFTHGJNLnbp9l3jJRGv\nZUgS\r\n=yQ/H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1284222f95045a05fb58f3763bc4c3a96facd657","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.109","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.165-renovate-non-major-1284222f95045a05fb58f3763bc4c3a96facd657_1620173562887_0.9065727691162215","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.165":{"name":"@balena/jellyfish-client-sdk","version":"3.2.165","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.165","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c4bfaf682ff4054e430f7d24893d581b584afa38","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.165.tgz","fileCount":39,"integrity":"sha512-dO8kzYmhBqkp/4HvpnpbuIaCYsaX7Nu7p5dg/VUFE3WANgOhY32gpCJacW0lhkSVbQTzUHm+cwXHuN70dJ3GBQ==","signatures":[{"sig":"MEQCIFVJl/nc91jK6+2B2cOfL8TqRS/fYt78IaqsymCcMBGJAiAcFz8NEzBAoqnvA66YGs8KimJ44imi4g9wjJtf/ZXWww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkePpCRA9TVsSAnZWagAAZc8P/2RN3zDGGx6AOoNpEleu\nBTgZI5bY3EDsBZtCELfNPqLXNFWII6IkdTZPr8MghOjOykMR6LGkmLi5OyUA\ntb8p7CFql7ehG1yJxmAYTiUE1r1eGFaR2WsNCx9y1SWTC0WOwmlB+Eoah5xv\nEVC08X25AaTgKWJ7ehf5F5n3JF6go1/36jnRoVUanYly2GGvCPZR3peNS/Q0\nRbEflzWu++7uB9Oir6oo+nG3D3RN2H0dPS6kTsAp6qlqIVnCpDyad8nMG+cB\na2frQzBTRUNYJSXT+xVXyDyMZxwSOCX+AiM4hcfKTKP4mqrv5bGmtIqhGFUn\nV2NmD1O3Brl+E6pjP/KRj7SoZi6cyciRQtzP8Poc4cwuEgC42u47h3qOsnH6\nh3Z59xLAtevq9vclWqI8/cztjJYEwIdRfeHnXBA8awkGPoKlxvDjIbcpzVvs\nEzO8/exdeHtQ2vZmnzNnrFHwd2Cxu7Khw1LgI/szfx02ZiG396g5DQyAxLzu\n7UWBhroL2FtAcD/8BKICpjGXNUMk6r/cED2+sD7UMlctxtVmRdda3Liv6Ye7\nD1vvG1GMQypptnzbFTqb9f6bM6iotNe1efEnQ6VoFse29BqBf4v7Xp4nqTgR\n46YkYnVGfeireNFJIP3F1FrQ563suLPyIJJyhvkI56Z6Q1FqNHjLyRd8+RVv\nyu/U\r\n=IT68\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"da1d794da481960583e245d76fefb74177062365","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.109","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.165_1620173801400_0.4985535218610828","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.166-renovate-major-socket-io-packages-792a1bed355def430bdb8582b1087ffae9b49a14":{"name":"@balena/jellyfish-client-sdk","version":"3.2.166-renovate-major-socket-io-packages-792a1bed355def430bdb8582b1087ffae9b49a14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.166-renovate-major-socket-io-packages-792a1bed355def430bdb8582b1087ffae9b49a14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"57b880ce80b562dc9ed1a339405bf2b312934895","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.166-renovate-major-socket-io-packages-792a1bed355def430bdb8582b1087ffae9b49a14.tgz","fileCount":39,"integrity":"sha512-8Hfn4M5r7qJ4/x0mjPSqYUn3iqdJHxS0SkUj1y7T+H/4FdhKLealFRxSPMcQH5ofeu7E0GE5sKtXawoJHHgW+g==","signatures":[{"sig":"MEYCIQCANEekpjr9LnBJ8BXfDR6S+F19GYWRv/ttJWC7zRjVQgIhALEjBD+jxlXbPSGYL4CLrmf999KFwC4e+RgA4vZNS+iK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkeSUCRA9TVsSAnZWagAAJZYQAJKVOQTqMyyj33dsObSH\nrPTwGwTI9VaTrldPsFIrSwmbCuHrK7pE9QbAAtIfEm/RXJelLJlBL+AcBx4v\n9SKPwhWlteY1ZMW26Qq9p00kamo6xxtJ0hzXjiOb98z+kMw4k74ilCzTCZfE\n37nU45Mbe2/QfEK/fz+vbWy2yrXOye5z5ol7rRl6j25VUd4NjLhqpYI+rxOF\nSluTo8MN9e26/eINFEI+JJJkpjvEnWz6/tGE81VM7tiLhcycucfBdXl2gD8J\n25RUpERR41H5ad5O1rqug2EDKAU/nJFmD86DuFrQb1EBBwi2PlgFGmKW9JDQ\nYqytRhR6y9RrqHozyZ2vzzzltUwBCwl4wxFZgN/fbi9n72kj46N6ktuqg+WA\nhXf8ssFvtlyLkNDgRdfB2TAI0pcZ4uJQFJ62HDmCNjpkOGnv9kCeLMabiEgF\n5W1T7iL/Sg7IVapgzb9rLWLBvINv64jGfSUr3/rYh/b+9I7eBWgEcFqJ1xSZ\nkegYmxSEMhXuCxwnoeQ+EWFGT2CFcxygMOGPWXxjbUiwt/HkEIUolVthEAQw\nu6C8vYn1IBgqtV1pn4GEVX4qb5UzNdIUraroacqzTckjqxiYNalXfuF/whRj\nSqlk8syIZaercu11nKZ27vW0Z6ihYYccGDarZ8E4j4sTPFUR6qZoki2fHylg\nNaIE\r\n=L9Ox\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"792a1bed355def430bdb8582b1087ffae9b49a14","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.109","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.166-renovate-major-socket-io-packages-792a1bed355def430bdb8582b1087ffae9b49a14_1620173972007_0.7364776373190574","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.166-renovate-non-major-a00a99e51cf569afb8e992207b7ef643c967cc1e":{"name":"@balena/jellyfish-client-sdk","version":"3.2.166-renovate-non-major-a00a99e51cf569afb8e992207b7ef643c967cc1e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.166-renovate-non-major-a00a99e51cf569afb8e992207b7ef643c967cc1e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1af8d54e1b883e05939447c05fa2ed5b3501346d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.166-renovate-non-major-a00a99e51cf569afb8e992207b7ef643c967cc1e.tgz","fileCount":39,"integrity":"sha512-A2eBWR1WZARUFw8A/uTUSR1cVjJDjCodblSlESpv9UFZNYy7oyzGlRa9uzrKPdcRk+SV2IqxYuDRt/hCjCs0lA==","signatures":[{"sig":"MEQCIBjUaxtAlkNBFwqEZ2XmL0WnyhGfz52HIQpYJWOzjI+tAiB1/xs+o6pRGWS7CVFt/aRuzbQa64FVVzGR9/cfqma+/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgklhvCRA9TVsSAnZWagAAlZkP/jvb9xX9ER0fc2rk22r1\nZN+hqNlapwxduAZf8U4F8vMWY37AKOkoqk/oQW5VcVsju9YQ7reewJZFExGa\nEvkNqyFKMsyxYVFKs/PH05jCtcrPTMUf2Iv/QNB1liZHhSeSVJ9ktZdhGzCp\nS1zs5ajAKnMYeieLjZwUNwhwalDvrbIXoRVkB/mB+IF+8QK3kkVpGbNmKgcg\nC6c56oLWGVpBQd1TPhCpH+prf36W0jOmVIUrhVBStsxQBsS8fV11dd3Y09QC\nnP0aC9TSo+pZ0RbJaqpXnoNPS7f5fRXfGYM6dJuylj3VbsQtHw4CrStrv1M0\nBbNOGdhQdRvbccvbGgt2QKWWdYQiLDRv9fOwQSBxENTYMRrc3HKFNv8VsPe5\nwgwrqq3ZAbdSJL13Ku/TPw8oliVCGvqO3lQlkDB8M5lMksuEzYU2qGwtagRp\nI9qhDY8Fp13QO8wIvluyYOLa8Ln0elTdvonqh95q+K68ttMPvUTZRxXiVtvu\nc42+8puI/SLK1+2bdrrFCjB1TRl6RzX28nqtb8kWoCbjRUVdFiH4EZxze9Qc\n+CkLCwpb3d3siYxU47oUEmWHiKahzPHuspsRbLESPWUUVpgh4SWEehtHZurB\no6BHAo5vGneZsAKvvQmfW8mV85R5Yr3HIEHOFrlXfOFDMaL6bG0pObbb2OEy\nMcvJ\r\n=H1QM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a00a99e51cf569afb8e992207b7ef643c967cc1e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.110","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.166-renovate-non-major-a00a99e51cf569afb8e992207b7ef643c967cc1e_1620203631360_0.9310592761161471","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.166":{"name":"@balena/jellyfish-client-sdk","version":"3.2.166","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.166","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"234c6d95db8026a369962d4c46e4257d3b6aac4b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.166.tgz","fileCount":39,"integrity":"sha512-GF0uyyjjrDRChDyCxvaHiBlHV6EMo9amnJVLkGWcVsV9VmcpqJvxc0bnOnJnM8OGVy+wOltre7+GwuRZrnMu6g==","signatures":[{"sig":"MEUCIQD52MWGUQU61ZTqL9qxrDSBQCEqLWS/SqoNf1Bq9ZrVMQIgQd9yY52SPBZhUlif26hVdtXrhYZFl60WvKYT2BZiSvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkllyCRA9TVsSAnZWagAAO3MP/RPm2OOZtc+wkLxFw9lU\nipzqztV7nX05RD0xmTyQ23iG28fyavzD0zIP3g9pywonpps+BrEGKEY3vhdU\nwHgdhWyy8Wk0AH6aZveuMyKRgaeKBdZAaLggtcOSSo2p79e9y2OJCNAyUYE/\n18cvP7DEnO/k5S1uhhFR7Gc2+r0n7uI9QlYkE77yGJl6r+gqFNlIF51p8kJR\nXnCYmTstl05nKF+kU25WTYm8hSfl8O8oIwyGG6hU/VQa8Ac9Q/2pWg0z3G/o\nxqf6wyAdzGgnJLHnP1XPSkHqsRda0FCsr4ttfqHm4LxInpiacgaC5kWACoj+\nuiiutKAZiOB2PzbhACLluW2QK9+V5vFErTqjLac8RLTymO/IUZDloADJf8JR\nI6hShyDJSPUXHpAhlVMCbLTFg80pYWRuXFo5bKW8/bQr5n+oKfgpdt4yL75Y\nKZmHgW5RTzOi0l1th8HTs4eyRW95rT0Sf93kWDWksPCzxRvLGmb4vdDhSC0j\nvic3ouaVoBHtwbktra8AqLOd2SSYtKPwVoyQ/WOkPayPAVRy7PB3MaEKM/Et\ngvDvt6db0WfnHx+pGXkVYW+aMbw0PlLR5mZPN27ATedc04EtLAgrGF2JQ4lD\nb5LSvoy055J+/VVXMUmaaocKdo1VTcbwSgnBaFAEritMDZ/KsunKNYu6299l\nnpi6\r\n=s9fW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ed32ae9679f43b74cccd8e0d2e1f128dcc8d7388","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.110","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.166_1620203889856_0.7727379738682891","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.167-renovate-major-socket-io-packages-bebf22e33e44aa309ac64eb2071ad47e5e2b6bc5":{"name":"@balena/jellyfish-client-sdk","version":"3.2.167-renovate-major-socket-io-packages-bebf22e33e44aa309ac64eb2071ad47e5e2b6bc5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.167-renovate-major-socket-io-packages-bebf22e33e44aa309ac64eb2071ad47e5e2b6bc5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f949ede5623d316dc836fb268e774206455b90dc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.167-renovate-major-socket-io-packages-bebf22e33e44aa309ac64eb2071ad47e5e2b6bc5.tgz","fileCount":39,"integrity":"sha512-/xB1bdAi6s9g6cxhJPA23O5wIqLiFb+C60e+nhySisRlHkgYgiDTGepdAP5NW4djXJ3KkQgpF3A9l0jsus+oBw==","signatures":[{"sig":"MEYCIQCv0HJ47Zrl5LHutZQBC6PVa3i6EX5nmndOivi/4FhCpwIhANm0NUH33OlT/Wuhl09Fhvgbl8zLPQx3hWx4JeM+xPSA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246031,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgklpSCRA9TVsSAnZWagAAu3oP/3nKroBfaZc/PAX77tH0\ngFD4zBXkmYNPC7wSrL/Dcq6TPU0pdez2z0JJSSOv4sCSMGhyLJzY7USJL8J7\n/q78L8aphak0eeUhAXgpZ6JHkzaysNl9Xm8qMkClgrm4VZesMQo0GTNx4Bxe\n6bQMJbewx/Szj36DT7WfSkBwTSWByy8GrC2CZhzraaKTSMHAenXmI6geL5f+\n3qd6U0tZd/3EHr0vkNUAMmYCHISwSat6BskGErwTgY9IHfAypgsLuqEX3PcQ\nl4jubvs6ZABicUzFx8sLSpFiCQcxNU5rycrgoSOm1KrDXWgCbbW2jfVa3dN7\ncZefZRlQ4HET6ZpZpyUn6Lh8QgFuCrqV+sKUsL+4xk3WFMjbAiF6OVACvIEd\nDM1Dk9lKZllIvN64t6BiQfChR1VxDCgrzs7Jhb8GSP5/o9BKmaVUAMuecoNn\njGe88LLAqIlzHw1ItmfISyQtJepMOy+rsxE/0wNttkdYb2e6utVxAqiNGDQ0\nD+AL7YV1JJUj9sY7lSY+Qi1loAZAyf2kpR/R267TcEJFXhMvbRJb1H6dfTTk\nkVPAOeoyJ7Gio9zktSlOrqQMBgarDpsygje2Ab2Z2Myshh/Xo6/ppqT2bCh+\nsoom3PmmRth8Tl/R/OeX2ZKKWWnKr09HiW4gWewcET1PAhY5C3zsFTCw4yje\nzAD+\r\n=N/kP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bebf22e33e44aa309ac64eb2071ad47e5e2b6bc5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.5","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.110","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.167-renovate-major-socket-io-packages-bebf22e33e44aa309ac64eb2071ad47e5e2b6bc5_1620204113959_0.5742765633550582","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.167-renovate-non-major-311c9983844544a83c5f94ab99c79e58f9be1c96":{"name":"@balena/jellyfish-client-sdk","version":"3.2.167-renovate-non-major-311c9983844544a83c5f94ab99c79e58f9be1c96","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.167-renovate-non-major-311c9983844544a83c5f94ab99c79e58f9be1c96","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6dd34686be1b8b20293ab4d9223785fee43f5dd6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.167-renovate-non-major-311c9983844544a83c5f94ab99c79e58f9be1c96.tgz","fileCount":39,"integrity":"sha512-snJbn1z0jI+u1q0HADJw/eiW/1OgQpJyUJ2qsq1HK8LaM4wH/YPfvtxUztuQoV/gILeZnKxsg3sbgMmMIaNhOA==","signatures":[{"sig":"MEQCIC/gxcBoEqTzccFAr7yMTC4QluG1hUamz8lhjY8wJ/UOAiANW9BXRO2jatQgviVnT+pHHB0HaynA2ZvTCfyrFl0Y6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkrCNCRA9TVsSAnZWagAAo0cP/Rn1Y2V+280CdBh7H1jl\nESXLy//fvG3Y0S8bJw58leutSGIYM/eHAlXK0fozwD+0sh8qST5jyAst1HJX\nU57GNZQK68XrcuhdQOLJrEfghY/1cDj2wBnfAwnXA57RM5H9jnLtJG4JWuUc\nkC5UCMtHdOcGOB78VdpmU/oPojcBL3gt+npbwXztWzKIlViQ4M/lV7Ci/l2I\nYcZiEqXtaDfkDMHi5J3lD3PafC8m/m3E/Au0rgaPAXe9JAvk9B5ByhkvGTfj\nQCbSU2kL3Mkw5FyGsqjIkZkWwdUbjAC+k7ZjaB9oTpgVETuynpDE/pnxFpqW\nplgx45RKbjFwisvsQbCZBMl2HcwVLMsfHhxblXUVu8JoIbHbA8MOwfEpifB8\nOTc9yHMtExo7WycT9YAxeThlBMA3O84lwVJSyjgW+itCnBH9+9+fLEG1tS/V\ngqIx8Uu5l2StCn1eDpscSpBqz8F8Che9GjsdQ+3z1gsbYMuRJfCyJ6kkjBsK\n6j3bdHBKiDuWxwORZ9e3PntRf3rM3wKok2RXtpl/kx0hE/ix9zL6ypVcaP/z\natubjpOnlfcd7UDCdBjEjcNa4AtSDGskvpZkErQg3UpaVfk9TxBSVEeBQqDD\n6ueG0ATpeM+zt8oNuv/5piilhwJvxNt8sCh5M0A7O3EksWq8kdrNqy+mn9Uo\nOZeX\r\n=K1mu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"311c9983844544a83c5f94ab99c79e58f9be1c96","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.111","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.167-renovate-non-major-311c9983844544a83c5f94ab99c79e58f9be1c96_1620226189064_0.9817357190161486","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.167":{"name":"@balena/jellyfish-client-sdk","version":"3.2.167","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.167","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"14233063aa6bf7e9c7dc2d82622596f8bd140209","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.167.tgz","fileCount":39,"integrity":"sha512-AhGP4WNASc6T8h8Jx/eEAhARjPI99Xn4stmv9CX/V+/lJXcC9T2NdbK2xAjld2DWkYIaf0c64jL+QFlU3YXoIw==","signatures":[{"sig":"MEYCIQC1+ewRS57u6b2NIfCFu68IocsaYH/cW7hQMzkCklBA/wIhAN1yomEQvvD4X+pvQmaUpQK8wHpNHI4OcK6eJ6x/nb3q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkrGICRA9TVsSAnZWagAA8ucP/20iR/fRTNyK0qLyGxbv\nFoD5og9jO7XahJsu1i4Dt13+imDAKs7Yju3eJcKZ/uDZAtBcnhIix4kOlczU\nl2x3i8nE9ByPiFC/SZepwvIE0gLTt9eiCzi3pY90GqAt2zo4ZwFTqWYXX8uX\ngIBehHW9/uL/L8MWL1e6V+OMsvI6Jq1sRksFPgM2RoIpDxF03sanaopEPRi1\nWeru39P67ZspdTe61QEHVlUitG4l5suI1E0FoHwZbYX1MzH/iu7i9w2SXZyB\n6PUKKdJMOrqfeoTLiP/Yvr4WcjcYEnIUGU1395vH3BwHLzOesTXEeXElrl+x\nqtlr3xQUj6CdehVPuMPAApvpLgjy6wRPCLwko95vJDHlhE3/FOTtRumzjvur\nQuttIiP0ocZvjEeJW9AjyGGA+GokWUmGpzxwu+BToFXyPFBMWFX2kmNsYpZ8\n0N0yM87OihFQZYH/e3xmOBBXih+H0LEWGKdEOFAGbv4vVs8+eUjFrBzDnwkc\nLYjCkj/SD6+qzuq3JVfW3GSuyIpKLtV33qe3VavOtJKRfMkLnzhTbiOEsAzf\na+xsfN+0b0STkSG4W4PYkQwdrsYwynfrHg2Im8NUBPbX+36A5onqi4G685mx\nCsz1vdvk1UirIPCQqEmgSrtMUikPHYSW2MsRYLHZVE2VriTXajgStu6X2k76\n1EIO\r\n=YBZ7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cc603322a4ffb088047e3a8de2357eed1df03585","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.111","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.167_1620226439808_0.4171504931829031","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.168-renovate-major-socket-io-packages-554c69d8b51617d292395b8c3383b47e5b348bed":{"name":"@balena/jellyfish-client-sdk","version":"3.2.168-renovate-major-socket-io-packages-554c69d8b51617d292395b8c3383b47e5b348bed","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.168-renovate-major-socket-io-packages-554c69d8b51617d292395b8c3383b47e5b348bed","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1c5b030a53c6147a94a451bfc3fa1107d41c6807","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.168-renovate-major-socket-io-packages-554c69d8b51617d292395b8c3383b47e5b348bed.tgz","fileCount":39,"integrity":"sha512-Bu1tbRd/3u7FhGM6ExP6olNs9jleeHPyX/tzOensBO60DBagI0k8svONWjktTlnQ7cpDmoEXVxbcMGLPK6OC2w==","signatures":[{"sig":"MEQCIFexGNFwep5yBG3MYA8lgDbjAFUJtVAX9rez8vXKiL2qAiAx/ZKlgisZPcQHEsxTtLqyjZ35/zY8yQBY/WsPUnRDNA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkrKMCRA9TVsSAnZWagAADPMP/AgVz9k83zLlV8Kd89C0\nNH3KiP7qKrlIPG+1kRF4Bt7QpXpeKxl4xegj74SkKreKVXdSW3vzGrJlmQIm\nmG+t9NrTfwYag0dmzYIN3s+3xWs9Oikw6RlVa8qXlVVL/hdaqAreUg3ooZ0W\np1EMJ6OnuQwGJXAbj9nS6zJAqd4HSKEHLNJonDWPsx49wtiFI1ITSW3/bhSR\n17DWZ8msInnEApUbN7tK/pKufnScFNg5TKm/UMDlsxi2HJAxbELk9n6JB+2V\nwQLmuBBTFl/04kqq6LVjihsiVB5sXVkoO17TyX/XY00ZPsHuVEdbf7DFQwPb\nn2YckJHHTZ3tZa+5M9O12PW03biEe5gxxjDWlVWtt1ehfhKG4YQy7VVIG7lh\nmmQNkb5dm3YF0aTZSiQ0byfbl1CYrkbyLKBqmxyv9ixZK2dKJVtEp2mb/S3b\nGLEydK9Vd07/x98wZpXXxrK6VdAUHZSugt9T9cCF6Z5ZmULXuP7IuFkbnL8z\nQfBND/pOTtDxd5/oRk6G/zEWWOFvdXIaL2+4vPGAqSbHdPH/Dn1D9N34cKC5\nl8gMskPxjeZmfJt9Vru9e9gnW4DeJk8+GjSdkXeVvadOC8X1SFOPV9NxHolv\nQV3hUoUyb194jykUwiQG1RAms0Q7kzn6zLm8POFnXPdLNuXEzaGjmwZ/3dFZ\nes6J\r\n=4WBV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"554c69d8b51617d292395b8c3383b47e5b348bed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.111","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.168-renovate-major-socket-io-packages-554c69d8b51617d292395b8c3383b47e5b348bed_1620226699516_0.5077750902678828","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.168-renovate-catch-uncommitted-2-x-127bad1e34798049b50a1e332138defa41df4d8b":{"name":"@balena/jellyfish-client-sdk","version":"3.2.168-renovate-catch-uncommitted-2-x-127bad1e34798049b50a1e332138defa41df4d8b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.168-renovate-catch-uncommitted-2-x-127bad1e34798049b50a1e332138defa41df4d8b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fb3903245b429d2b097389ba02700fd61917a4fe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.168-renovate-catch-uncommitted-2-x-127bad1e34798049b50a1e332138defa41df4d8b.tgz","fileCount":39,"integrity":"sha512-LI4zQd42t1+XXdHqRsQld4grnRK/svVnrrIlNUqIZBx943midbdRaJueL9mzZBsZkLFyXdjom51DW8QIfF4tCw==","signatures":[{"sig":"MEUCIGme7F1Hn1dMSb9ToISY7yCK/yumpfNY9B/5BDHn1ZpDAiEA36esmrIEyazUHWibYYtv0ziNZEtqR88baoj3dIU3QOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkyWuCRA9TVsSAnZWagAAB3wQAKFdf5wWD2pl+loegarL\nlKphG6hBmp9aQDz0HNkqp9fBXdB1uiOXpXyd9o8GZ6Cuc6WstI2+q1v2LwoP\n4j0B9x+H2xsqWcDu42gXtpgWOPO17Y6ndxjmba6td3Vzhbgd/wH57+SoM6pY\nPJvVUGYkxvhJhsU8vARxoAm88jfs2YBR49U1fruzfEquOgPMT05OFO5JsJxq\n/Ai2ul292k1Z9Lgb2/C6AdJOdICYBQ0c8kyQrcketIXxc41kZAsTaDVCAyH1\nIO2PoPGCLSBT/mAs1Au/H9vaRE9lVl1NMh+Ovabr+6mhnpdXwcp0o2CBeaAr\n6h7JaelMM9J/G4WJkttfbp+rSvI+jJu8+8PVJkLeYJt8l+KJH50va7URXinP\nQDIV6Ry+KKOIV89Gh+E3GCsLsUEzYMeeoR+o68cTnLbgGGuANyPknNHIo2zO\n52J5XT2ZlJIApFGRXp2k71Vcusk8mII2NT0h1ySX7JtUXum6yYU9PusxwRK3\nJFNoeVTiY3g9K3XyzBGBBBhiiOU9m6sMoRjAB/jkeUPrNZxSMDQtYBhblGin\nm2OSovTvRDU8CGlS6xf6utpPDfXj9XBw25FkpRX1F2ctuNZwu5lRm3XQpYub\nlRcBd9SU+Fo6PIXE0pxpZQMZKFG0syDohYNqVavklW/f9B66I/tAQui88Ysg\nQK+V\r\n=Tm+O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"127bad1e34798049b50a1e332138defa41df4d8b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.111","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.168-renovate-catch-uncommitted-2-x-127bad1e34798049b50a1e332138defa41df4d8b_1620256173628_0.506617688163733","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.168-renovate-non-major-bc2fcdc10f38bae754adfa808fbc6052cc885afc":{"name":"@balena/jellyfish-client-sdk","version":"3.2.168-renovate-non-major-bc2fcdc10f38bae754adfa808fbc6052cc885afc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.168-renovate-non-major-bc2fcdc10f38bae754adfa808fbc6052cc885afc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9c206f1de204c7e24f1b84ab2f4d4548b3d5d15f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.168-renovate-non-major-bc2fcdc10f38bae754adfa808fbc6052cc885afc.tgz","fileCount":39,"integrity":"sha512-kvf2diUdPFDIzb0ufHfmvnyPLLtS9TTah7Cm4+Td5OjzL7D4/rqDKcA73yIBIy4091ebLLCDV5gupbOzosz6fQ==","signatures":[{"sig":"MEUCIDjlxX+hcxhIEwEy9TVk8PEu87k4myIcGoARAaeCgnASAiEAqd8Pm79BQVyfokWJgUBEs505XGwzuq7xuUy02FNLoNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkzmUCRA9TVsSAnZWagAAirAP/2kCQbSPRBtplwQlDdRR\nMcvhHToEJ2PGZ9ve4xhvOmTE+1tt2VbamHukLpF5VDxf0PIVLU8AJ6VY/zat\natQitrIqThaDO6Zgbkl0Pyajxb6VDkZmHIX3PHVPvnNhQ5YzrIkZZoLdiE1B\nlfrzOldA7CXoWZyK/D2K+rb5Lk8fOlCnYysQKJr/fRCe+jFEBTuCiRJrOJS3\nON6Hhcv9nAz/ny+yjoDI7xATERjDJirJaHwXpEqCVyncNd3n59Cz5ysA3DH9\nj/u3GARB7Bdb+uopuk+icamudywJddRf7AmgC9LxGbz9grYRwjI6vkKvCfki\nWSGDfs9t+N7K3wAko6C84Wkp3yYXZ3HMxH8HIaDx1JlcT/CkQVfrYx13xbzL\n5KzyXoCa9OQL3bc4sZ/AY2Bn+eJ10pBeO9M/UnkC8MuHVj4m/bRmw1iMLAxt\njhQ3ggoHQ135q900qxOH+BC2RFWijDpI59AVzVyFl4MPORwwSiuhue1VBoc0\nwGR0rY3HJRRen4M56dgE8E2XSOVhdqb9veo1f0cGK3Z6KvG5NfQemqb1gqeN\nbLz72GlQBE+GFceHx1dosPVQ9/H1oxWUd0vDFNlSusZ5kO3KDXV4qooSnkoX\nFLEVRcxwrFO4SG6mJgeBgWnjER0xPY3OUvcMSHzudN2hkhinBfbQlHkvZpb6\nQ5Au\r\n=iD+A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bc2fcdc10f38bae754adfa808fbc6052cc885afc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.168-renovate-non-major-bc2fcdc10f38bae754adfa808fbc6052cc885afc_1620261268342_0.7191842089711125","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.168":{"name":"@balena/jellyfish-client-sdk","version":"3.2.168","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.168","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c3b1f5e3d0ec90a15559af57da678ca6b4f87ded","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.168.tgz","fileCount":39,"integrity":"sha512-Og+T9UqMVREgAwXmmI2p3cKb720ueM/RJgBA1UmmUWpNbtWIoyrqs1nRK2tbpxHTtRwdxTQYeoWJhUjkJgqr4w==","signatures":[{"sig":"MEQCIGmnH7KNHJjhD3jwT5cOUfnwCtXbQBjg3Cv3KP/d66f9AiAC02x+lk6W8UqJyXb2KE+RPO3Dlvx5fGJcBLQsnKqDlg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkzplCRA9TVsSAnZWagAAjJ8P/3JDL9d/MmTX3jX3dk8/\nOg16wQuFOKDBPS0ZuuW8Ctti9NX7wRrhSn2Mr02jWSzbdpn5xBMTQOVY23Li\n3DNuExQHCId5UDrCpgGpLbIFLV1jKS0jtgAdm881JiGIbvE4jYFSETCqiQZs\n3et912sIpVeLcgnnS0xun2hjxUHlB1gm+UJQ0mBhdN0SbyPSGkvryXkhlt+3\n+fNzZ4f97J1P5gJL6OoaOszpo35J5gLZjnRW+KkWVuBavNzXFbXrjdQiJ4lQ\nACUlR0D9QuD12gFiJf0Rlqzx13xFIg3fWEcW3o0t6GGLoiX42vuz5EOINgc1\n7GDdNfi+mx9kj19xIc03bJRRraZjGj4sI6KJtGbIhZoV2/st1nVdhhV8xAJA\nWQlufcheTfYY0EP53rC4RC0latYRtSRSprfVTvX+T6WY3mNZ0Xexs5bTsRDm\n8SLpg843lztNQMdobKpACyxHb8mDkFRxU51YgvLde/ghwS9I82LWN+OTA9/S\nenccCVRmd3ITA8Un98QMAqdLEb9d26tJ4alqf28ac/EWuqBgUjvW6mbaEpKY\n0+j+R0rOBeBRTyfYs9aVAt9+lh47IQcIELFpcsoczDyI2QPeD8OpFw4FTjPK\nnF5AqxJneLO03TzlW3KForTHaxJWokG+k25viicvbBeS+As4XxNPxYmJdlL5\nJspi\r\n=JT8e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"62e9b496a7a8ba97135bc6d14f2635803c6d3cdc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.168_1620261477083_0.3769656017698719","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.169-renovate-catch-uncommitted-2-x-232691cb1fab7aa32b2759f55530109a0a406912":{"name":"@balena/jellyfish-client-sdk","version":"3.2.169-renovate-catch-uncommitted-2-x-232691cb1fab7aa32b2759f55530109a0a406912","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.169-renovate-catch-uncommitted-2-x-232691cb1fab7aa32b2759f55530109a0a406912","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a874afbff7c21e793b49159a9a9ea3225ff2b590","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.169-renovate-catch-uncommitted-2-x-232691cb1fab7aa32b2759f55530109a0a406912.tgz","fileCount":39,"integrity":"sha512-u4DBiCxJ8+fY4LA5ev16kxdmR+IqEQ597f3deC17QSa+bb6A9ESSEBlRUmF5IWhViITF1QXW2eBlsTZRuGwOLQ==","signatures":[{"sig":"MEQCIH/hc50wvC6MT/dAnnYFWRljm/9+GMsLfiXc7E5zdxS1AiAIN0m9p33OeXMRuQCdqns2tQqKfUnR2cP7oGWHy/lQWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkzs9CRA9TVsSAnZWagAA358QAJjsGp1eQfSoS6igd9Cu\nAPPm0MpvGwkPn2eQHgXrS3DdFc+VxkuACNeX+is1OU7U+xCjSwBS1dIDkE2d\nlaBxJ27i86nel649NytfcF/jXWoAfo9JL+GuUzKfYLI/bJ66XWYPrjbPJccz\n9a4nBvcvnDFveOpagm2jxCo2N8ESEsqTwbUVMd2J6Susf3WgkZ5Vxdfuz3M2\nZPl4V5qyITpnFlrqrhuv/Ii0zv92ymeoOk8WYDKI3pjGLY7U7z+wVd5A2P7O\nHZm/9R1sWmIOwiEK/IbGQG6m7n1FYQ6xStpjzl7wf+sXAWerXD8bJRpSY/J3\nNycD+z6yPcTIZoYlpQAh+z4VSPzG8dHUWQgfZ0Unv5fNdF0aVsAofaBC11kT\nmTjCl0l7hSwee9vOfyuhV6ybh9nJ7EHcPxWo0kMajyg8m7CtE7s0D6sV6C1L\nxYCK693fNqjt3mVrGVpbxXiAksjicz17I7RSFjJFUCyt3kFxWr+U/htAUuXL\nCNoICSc8nuCL15yZeieLfc8NV1uZ3x+gTztQbAN/SsikUZ5hmhX2m8CgP2ex\nqrgR4QNwazZA533svnbF7i2byHf3LRNZMcLBObUNw/NjnxLKAYh21kkKwlcI\nI8JySirFygfVR6IRumYMllINbOB3m7N3EfeQooZaG1y0kDTNGJhCT5lrJnUp\no7rw\r\n=suyK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"232691cb1fab7aa32b2759f55530109a0a406912","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.169-renovate-catch-uncommitted-2-x-232691cb1fab7aa32b2759f55530109a0a406912_1620261692546_0.8679547792111619","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.169-renovate-major-socket-io-packages-1d30887a06cb4f20239dbf93da9f1040db3a7729":{"name":"@balena/jellyfish-client-sdk","version":"3.2.169-renovate-major-socket-io-packages-1d30887a06cb4f20239dbf93da9f1040db3a7729","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.169-renovate-major-socket-io-packages-1d30887a06cb4f20239dbf93da9f1040db3a7729","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"126dddc90046cd840b2ee57dec7100e6bafedeb6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.169-renovate-major-socket-io-packages-1d30887a06cb4f20239dbf93da9f1040db3a7729.tgz","fileCount":39,"integrity":"sha512-TIVYWvZZQQaPhPkpKHumIh1HxBUaXtg75eZn8q/IyPz3G5buPdxKCPUT6ALS9+f5YPOm0n11WJePiqzhrAZSvg==","signatures":[{"sig":"MEQCIDwl10WxUnnronxBAAX9gUDWbYCwjpAGXCJkw1hnJulYAiArPiX2d7ZUYOQXyUaC5RmNlsxQz4R3zt6ubP9ELobMHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkzuBCRA9TVsSAnZWagAAF2IP/jHJPsqVQiMdbYjsmOLV\n/YcaAKrXlWFMKZAj0noehjx1IGaB0Suc2Nx2fkQlEQU2HzwgKC92HW43qHK0\nYO8B/yCXrfJheIA0IJh2N+3cYetVlXA7wN9Gj18TijFS6Jtl2F5GlkUu2Hg7\nLfuOJTL8S+97bXq99ZhvrxK+6jLLn0c/HwE6WR7HF00ft2dvbAK7Rc6hce/6\ncNCk/7zbnIFXqTWbXf+StrB1VKP+xuGhwiPRjEqSjVRrIT9ALmdXVdNhjoXX\nGkJ7KwLFCOieJQQkqPd6RmXXt1agTNDV5ql2aEwLtylu1Qtrq9BhFzJ+NBGM\n7knsKScZAUOwo1C6UWPV6dsmxCTlbjY6niskrdY1M2ZB9ur4jdzGG0cnH5Q/\nAaoicoJNr+Es9x/FxC5CKuLOulYwQhTF5icHGrgsYSk2Kp2tt8znGzMgyIR7\nkmYlrl0SGg27JeH0v7BDWdBHibo8Ax/2nXGvK+YHcxtUnOkDPw0+oceSBPtu\nfpYdLwW3CrS5kjMWL29rNYnl9FQWU6R2FtcLMbKWn86ARxDp9niXiRcUm2ww\nZLliuxdOHRJvEmCXGVc8OvxPfyqMsMidRjGgmSDYnUZ+sK2Z4+rxCH5SJvfT\nOcUNHsUlMaTFXQ0uE0pVmTwPg/Ob6VlOyGPk4gJ3ZbtecXnEojtbPujbnAYx\nHv70\r\n=/05J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1d30887a06cb4f20239dbf93da9f1040db3a7729","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.169-renovate-major-socket-io-packages-1d30887a06cb4f20239dbf93da9f1040db3a7729_1620261761158_0.606340100138685","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.169-renovate-major-socket-io-packages-ca8d3dc23c4b12cde3233cf5023307d94d4c4b7d":{"name":"@balena/jellyfish-client-sdk","version":"3.2.169-renovate-major-socket-io-packages-ca8d3dc23c4b12cde3233cf5023307d94d4c4b7d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.169-renovate-major-socket-io-packages-ca8d3dc23c4b12cde3233cf5023307d94d4c4b7d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"65e224fe4d9ef033c17e2e6c67b4194f2d5260bc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.169-renovate-major-socket-io-packages-ca8d3dc23c4b12cde3233cf5023307d94d4c4b7d.tgz","fileCount":39,"integrity":"sha512-9qX04dQFRfzpTObCH4UShLQqBsMoeB1Yf/ybKTXUr/MptBpwaTCno9UNpwwcRU0vRW2mptVftB/PtcYfmZJiPg==","signatures":[{"sig":"MEUCIQDchjwlW9ug/Xgdn9u2Qetgke8wFWMVAnlkgTE/E9y5dQIgfM1Mn3PMT0KBeUmzmT6KWnwmYGvd6J4vd4xSJLNwGug=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgk+eqCRA9TVsSAnZWagAAD2YP/R9mVpnV1DD92T3/phIm\nX4WhLSlJfr5yrk6gOoL9Grr7jLybFfad2rsgmcVYupgUZ1lUpqt/KZBzFSQq\nJgjwPVHXUnbY8Zd3PA0D1IKiRtN/gHf14DIQuORjuDAf4QQM9a7mM35lNUTJ\nwDTOjm1D3iHxgyb6/f+qGLfI3J2XTcU1YsZjw6M7h1L8EhfghZGyubiGOQJU\nLVTukymxKh6kT5ZYBmrUL/czseBRuPVqLwML9Pi3vDvpudttQzh/KqgtQxbX\n101EiY4m8Se1icAVqhMhHsOgDjjelezDFV3O6veqW5B+mklNOj6palSg6HFp\ni33WvGixQuHtfzdiU/rQ7CMoM2tD9DmBm4ICYboHhvDQ7v32nUbLH0wvtW5O\nWd5MwtavzBXWD9wEPNXbfNiKzS+1wUEI6L5MU8aASxxUSljtnnNqyu0hTdhy\nEtXnHQmtJQKpDocoImB3tkMXn65gyXe3O8P8UjaH9MWgD1T/TjQij0FlooWE\nRFb3QaQyFeOtqinFnOMcOht8bU6zRTL7Op+TDe1wNli0NiCG70e30yLIm+ck\nUrxPUbLUIZOvsQEBoJly1ti7jamx2xQZcerJVaPFVB7ymS/P4/obloLsPOqQ\ngGPK4XvEm8CWoW2zNK6nsBjKL02wdrLfLTX45+0bo+L5AZya9kZPZeUuxpkt\nh4hZ\r\n=U+SC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ca8d3dc23c4b12cde3233cf5023307d94d4c4b7d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^1.6.2","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.169-renovate-major-socket-io-packages-ca8d3dc23c4b12cde3233cf5023307d94d4c4b7d_1620305833521_0.4600454677702073","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.169":{"name":"@balena/jellyfish-client-sdk","version":"3.2.169","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.169","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"869eccda52ea45b7f3b1418d404e60afd7ed629e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.169.tgz","fileCount":39,"integrity":"sha512-+MIxw5Ykn3IIl+uJYEkldzNVWsB2On1w8SRZ1Ia1XIDF4GTNCE2iESSL5nvWVD2Ta3ROvdLmfsjSC4NolhcewQ==","signatures":[{"sig":"MEYCIQD0swpc/6QWDYhXc9PXObMYpSz/AVQzg0WIYA3gTXcdjwIhAI9SYW8uiV/GU4O9KB+AmL8VR06xqAR6ZUe9MYDK2q9A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246128,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglIF2CRA9TVsSAnZWagAAbdwP/iGkLxSyGsOnsIqeaCyM\n85A7vv3gksB1BLChyLN3Zj/XSTEo3GX3tSGrZrDzf8mDuJHfTc8aFzawI345\nBQ3bBd80wHZl5KmwRXrOJBZMt7yjnjDcqnjp1PL0zDZEsFIvc+2FN3Bm1tHh\n0jZb5o/04h4Vm6FXAWBOeXrXi7fIvaVRQ6eM97LtoyYd4+2rVXWBCcCpfkR5\nHV0jobbnmIRlsIwAXdtlEY72S4ZqjTT4g6JH5RncoTA5Q4+6nQLhg3GDstQG\nm3ZZl5iLA5A9KeIhU7AXHoWeKP7QWMrlT2FcOCq9530Wxffo9gzPVOS0B2+u\ndR5tXSnxsdZJ3vLje+sJYl2VJImnJ7UZcVNEtVE7tDm5xgnsInIi8dAL/uZB\neuk56Wfpj/DRucXSG5/zb+msOeiWkV9Am39neAssCLy/LPAxS8dyeBzlRPKE\ndsUcNyXM2yT1oWODiNK8voH9vAcSBBMUoNIZCZhD9Wfawl4leF9rSHe1GiVC\ngRMO9j5m1Lw67OtuaTNya5ce5X+8S2DGjN8EWGGz/Q/lIqlw8prJTaKLhsn5\n2ZQz6OcxTgeMWA9aFaOeEUtH7ulgc4cddm9WQn16VVwRtcUCWkj1V7C3DYBu\nAFqNEnUHRYS23l4gbjYeTvPn/qmE8Qc4ACXtcIRzNPUGM+FHoV8fCnIMyq1v\ngIOh\r\n=6mHF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"147ad82c3cafb58d7c62abcab0896a771e124e64","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.169_1620345206249_0.5581232706076729","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.170-renovate-major-socket-io-packages-ad72156efe99e83b88efa7224984d1f50e036101":{"name":"@balena/jellyfish-client-sdk","version":"3.2.170-renovate-major-socket-io-packages-ad72156efe99e83b88efa7224984d1f50e036101","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.170-renovate-major-socket-io-packages-ad72156efe99e83b88efa7224984d1f50e036101","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9fe47ba8ce1424d0b8e67591f9830e3086568696","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.170-renovate-major-socket-io-packages-ad72156efe99e83b88efa7224984d1f50e036101.tgz","fileCount":39,"integrity":"sha512-KhAuwu+D6By5xwbG1QDvfecwUBaomK+bSYo5KoP/2nB8Gj1tk2/vaB4wkMc3XBqIlrY5yBZGBb54wKn4+D7Bsw==","signatures":[{"sig":"MEYCIQCWhMKv4lK6YZbsLTQ8tY1eAA6unf0dZThNkCt4pCdK0gIhAPH4SXmGFmB0QFHt6LfpszF7LoDfObh/B3vJTokEwKyq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglIJ+CRA9TVsSAnZWagAA5zQQAJ2M+uunnEDu4gKlSKAC\nIuVikYBXkFCGy/kbcL4xAbVBCHxL44vaCfFkj0jzdFwKo3QtRGjK+hPnlf9f\njVjP8QoCcS49R0y+yx1VH5w7JTEG4zh5HwPLBeZ1FU90rRElSLTM/q8Vapw7\nWu7c1cZ672AU/8Mh9/jqogL+SAzu5+3TcJu44ARiSn6PQ27vW2ZUNbuwhOo2\nPxliWP9BWaE0fWEjUs8zmw/08roRJMiPQd3Tkys127wIPcLaxL2IQ32K/k3G\nrO16Tmw9GgR5E3RSYzWwyqcXZcorUau/teRExPEWMegTlN9mOGF0Gjkz/bYq\n8oz1TCnGzQJJb0CnJkrLaR/5rObOVHnA+6Dk7Zd6qosNoX4stQDGThluR6uN\nFg3JaxfaUP1lqP20VeuUtMoP9c1QJxOxcocpxjr0Z8wID5vxJec33YushWT3\nOAkExuNHeb8v+0YtzPKI+vsCFY7ytH94trho/1x8DkALTFmXcq6PwaZK66s4\nNI4SSdKY3XjfkxDa181FnJaoplYbcVcDA4CX3ngVjmOVEluUpWmTBaFivSZn\npWy2wRJnH6hYcbA3rbzHMLlidllHIoKwEIekIavVzZt2RA4CjH1NDhgDPnei\nlSkc1oCYqDB+IFgSrxuODsp8LGPmTHT4ZOcqrcO3aAe1zZ8679nk4wZWrTkU\nUyqt\r\n=ruGv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ad72156efe99e83b88efa7224984d1f50e036101","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^10.5.4","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.170-renovate-major-socket-io-packages-ad72156efe99e83b88efa7224984d1f50e036101_1620345469727_0.5920391697243912","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.170-renovate-lint-staged-11-x-3f6a8628d8b5ce78334e2cab9098a4b2801d9aeb":{"name":"@balena/jellyfish-client-sdk","version":"3.2.170-renovate-lint-staged-11-x-3f6a8628d8b5ce78334e2cab9098a4b2801d9aeb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.170-renovate-lint-staged-11-x-3f6a8628d8b5ce78334e2cab9098a4b2801d9aeb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7d189421761933f892997d9c263cf376f9af1cbd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.170-renovate-lint-staged-11-x-3f6a8628d8b5ce78334e2cab9098a4b2801d9aeb.tgz","fileCount":39,"integrity":"sha512-5cuMPHpx34cxeC+mPjXV6f/SqMzAo/SptxDk6H05mTG92+NFGbAmJkHA0r/ug610xYzDuygYqZXc30TtnS8k4Q==","signatures":[{"sig":"MEUCIQCHAiTv82Zq5mANuGCERppqh+oI8NT9YybH2b0nnt9VPwIgJthcTgA5BI1rOz9wbpobe7L0nHVNI1srgTHucGnCFwo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglXZBCRA9TVsSAnZWagAAUgUP/1GtEWecGw5lG1PAFS8o\nDZ5ZT5JRLuSnIhH7UDK6eQ+Xw/FFU/G2n5N8TF92IIswchlVvRk170luesKG\nu98Bl3Jk8OLqMF6JRXxYxPP2JFcWsN0plMoYugSguTxnyjM1aV2rV4K6FrFy\nxnuKvzcIhFhqVSh7xxCvmj+Hr56FA2nvvBhC/+Rc+ebIUn7IY+LMJ3V6vE2P\ng+U6i4k58lJnv0Jek5pwE+F5wZpdtgmlZtiwcORfnu2bkOo4KtpQtzSIDe5R\n/3DVmVUNId2pdfimWjqhsLu4PBxK/VYpUZUoYsv27g8jHW1cjJUwF2fUUcsE\nnUDH9Hq1meBIVjtrvt5UuwXSeOCStry6y1qluz9wPmq3uGzGY6mkriUbDQQj\nuVq0zQGI4dX4cYhaSZsC4U9uTv1sJZ3+jznve5XxElL9mtkZQ0Som1HaHYsi\nFXh11Q5nAo2WbFUAN/W4mA0Cf4DEGctqAPFAB1mbMYpr1UXURcLFuRWW5tV0\nCR1HTej5X8RWnitXnuTmGoNy41YfWobVwz9dxIvn7NAFmBlcHs18BsqTR5QZ\ng5TyKdl208fMePWvIzRwx7UANQJxxJ51+VgxAl03Rubdu+Shvg/3ms2fN/2z\nSY3gvWAW6pzrLQEVboHsjM8gZbmXX1iRi1/npn3s7c8gLOYjjh9zGrQp6zrO\nHFVv\r\n=z6Cv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3f6a8628d8b5ce78334e2cab9098a4b2801d9aeb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.170-renovate-lint-staged-11-x-3f6a8628d8b5ce78334e2cab9098a4b2801d9aeb_1620407873317_0.7226218992537097","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.170":{"name":"@balena/jellyfish-client-sdk","version":"3.2.170","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.170","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1555775de037af5b8868c132821f36a77f65f8b6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.170.tgz","fileCount":39,"integrity":"sha512-1uXDo7SqVpoB15LbZGrv/RqBmqgkM5+9H4GPb2+1cAMBvNi9yeH/1Dg6W0SN9QYK0vJ7lzz6dZE75lSgCH7glg==","signatures":[{"sig":"MEQCIErO+/8/ApxAkC+AL8F7Zm7UCDpT+tEFo8zpNmyVm8n1AiBWgoMpl8YG55MfGslfAevgBk5RIMrLj1gVAH6XnzkZjA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglddsCRA9TVsSAnZWagAA+6EP+wd6WkahmvisQUO5Gcbc\njm6Jv5ortV7l/B7XuQJ3l6ige89zCHTSiRMM0QPGplR6wBctxcGl1YLWXkBm\nClEP5E4llX+25trmX1oIT/Xtmv5W0DzrXZ0dhHMThroApX7d9nuOGq8rEePn\nL9pSF0KsGF4Tje2ZpBlWBJZQBZuegBh4yX/zsC0IRbdC3xq5pCw6+Gn83J69\n9eQwNa7OG5Ld9QGq/DHIiCgFiapiFAzTewYwUgp1dfzRoR8SuYRZc/TMm1dJ\ncYY3CCHS7zKTBFCPl/7XxEtFqpLUVqzLTYaxhyPikuSCsx6DTmPkkLfYOmni\nVXJgpxDP9AIiNcTFveEgKVMYf2YF7b5kSWcNPD+sq0CQuFDNpE+lggYJlZjy\nIF2uvMrb20mcytum+NKwVOyr3jD6cbmB48w0TDs6fJ77sfwi6UbCqNw6BrDg\n/p8NscsmcW689aKMnpEGu2xQEtAcU7Uyf09eXr2FdKWkNN2tb8vw4yX7mLxX\nnRwunnz1aXnsglrT+P65ixxWrVFYX2tPxWf5IOtb03wuWv+/1/RCvEzh0+jb\nlPj4p6KnI4PyJ9QB8lwN/KFbo3lOVlJhZUVWjGbtv3X5Xr3d+xoSobPGZCoF\nVTYb6ghzjq1rmHE+g+HJliEIev8yw/8mBCGejUGOjDy3RB0mJm8bKsfEme6t\neYZB\r\n=XE7F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"502e6147c8a591e75dbc20c16c9d02b06cf34d93","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.170_1620432748249_0.6320957449420643","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.171-renovate-major-socket-io-packages-e8563fa8d0b14945473a62609534bae530acb03f":{"name":"@balena/jellyfish-client-sdk","version":"3.2.171-renovate-major-socket-io-packages-e8563fa8d0b14945473a62609534bae530acb03f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.171-renovate-major-socket-io-packages-e8563fa8d0b14945473a62609534bae530acb03f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ecd385d1607fb3008bd247e5bf5b10e16b93af34","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.171-renovate-major-socket-io-packages-e8563fa8d0b14945473a62609534bae530acb03f.tgz","fileCount":39,"integrity":"sha512-nvNSRbjRw/QZ78wYxn0iipLMp9FOuOWw3xd4nCW3MgjEbiPrt0T/XX23t6ViPQyCeULOu2ladvOAxS0rOuc42A==","signatures":[{"sig":"MEUCIQCZ7z/I6g29yqR8m7ggr103vKBGQyDvPbPYB3/gCWw2jAIgFqeQHVacoHK6Swg0rzrR+HOYZzXY7dYEdAuD2k7ah54=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgldngCRA9TVsSAnZWagAAB8EP/3KLaoz2NtS39gWAB+RT\nZetTH1CKXo2rX7vfGG08gJi8vVZXwQDcf70L7nZTDIES2qihW28DtXS1XQsM\nyCksWshHOBgmI9jWDOlq/YXDZbrO9ARjXidW5+kgq6D0bUu9v2zyYahQpQg3\nAtnJWFuzGJ2JcTT2w0UzYE/z7pfy1ssV+dskNKx6hDg7xgQdm2Wo1H9zG2PK\nLWRV2KNW3soxmuMM3gZtoT4jTAAfk/m1qoR3xHOvjnlDEsUZhvy0XSL6VpjJ\ncx9yienv1SjoSXi9o5cEJCztO/4E8TL4cAt5GJNUC83xnIufTQUTiAhlxiMT\nmGSlhW6F4h3CBhVdJK1K8yJNhqxuWZCCDwGSCZtR21lhrysqgPXhQvCCxH8u\ntUKG3PrjhTQGJ9LdAJjMstHl6wdR2f+jXcyQW5TfqwuM0TRsV5XNjmykuv2Z\nZCKifNdABCTnCj8zbKVI/jLUQ2mX/HgteoN4iBuzGnHzR6imwIJ3MgvcN287\noBS0swDCopAO+xS19hpMj0GEq4ihGT2VbAdfuJzOMugw8wxESQIbmRtGx/8i\nuvePmyQsJXvMJ+pg9dudygu7zviC/mINuW/TKLDObo/Mpfv+bGdjnBomVL/5\n/+93Wk4MZfheL9gBCQibsbghR7h8MUiKJPmrc0zZ9STsfx7hqrOVk1r8/Aab\n1SZs\r\n=7ODw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e8563fa8d0b14945473a62609534bae530acb03f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.112","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.171-renovate-major-socket-io-packages-e8563fa8d0b14945473a62609534bae530acb03f_1620433376207_0.010300233385550861","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.171-renovate-non-major-683f2e59b396813b7973e232e7a8c8267492c8a8":{"name":"@balena/jellyfish-client-sdk","version":"3.2.171-renovate-non-major-683f2e59b396813b7973e232e7a8c8267492c8a8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.171-renovate-non-major-683f2e59b396813b7973e232e7a8c8267492c8a8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c29155aec80841758e2828251b5add4eb09af1fe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.171-renovate-non-major-683f2e59b396813b7973e232e7a8c8267492c8a8.tgz","fileCount":39,"integrity":"sha512-RkkOqNxkcjHfe6ggTafwTecgeVQ5In3OfYfGvK/FwMDBpIFkPxOJbWGjdCdVsOoJRXcYdmPbDFH/+KCmJYDcZg==","signatures":[{"sig":"MEQCIEJwvvX9m5OQhaBKy2gwjPYhKs3Ai+kkK0AtN1wHFjHuAiAGjduaFQE+GLzDFpoIZ4CR8+fVmlbQPr5u1TkVQx1mmA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglgHpCRA9TVsSAnZWagAAqekQAKD8VoIetHqwfVnyTq1R\nXHe92oM13nfO4u8E0u5wxYkd0IfnJ9+7x+NfYGdBLaMzaIxydPwdTJnZuC35\nwTeAhZGuThGos0HUErzubhEYt3XQbuk6owSxE49lncEMFQBeTidY7zlf1vV4\n6dxzRtAIio8bK5T6i9ZgRSEJGrWT66APHkwwRCTe7UEjRI/orgnmwKasdC3V\nnB6vM9SUJEai7WWo1ivOLMN/oU9xI0ykFqbGiL2ptNo6rcGULzgz43NLjijx\nnwCas4ynNr8CAGLTyIAue43ob3SDpr/yagmZ8eMC8hulFGiWKBU2wy399U6d\nAhAM0a44T4pqjmPbFrf/VJxnNcfI7D8ZVLlVhDEgxwYFy01USi6oPaEGjdck\nGr53UVMieafOrRcxaSTYHC+SNe5GgGQ49kK0CIT7zCD4BiYQuleEeDjyRUEH\nw/GlAo4j2FpvQGmhlmdkMkP+x/skyz5YaqtsSqzgYMHFWag97zUVZ5gEHNod\nHVxyKo++7UvmZQcf0cmTa+/Y3RcPUSwYRuHqhQkyDqyHR4Yn4UBgVqALAMZI\nYE2l9GyjTbbg7JjZcMlRC1QWE4UH1kZ+HmGi5488Au6wgzGDcirhn/KRUSdM\nh2YahDlUTsTqqHigcsQxDN9tDM3SX/P6JIv1Ie2iilh8p+EBHykTXQox/9W9\n01/J\r\n=bj6o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"683f2e59b396813b7973e232e7a8c8267492c8a8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.113","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.171-renovate-non-major-683f2e59b396813b7973e232e7a8c8267492c8a8_1620443625118_0.9057864628798122","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.171":{"name":"@balena/jellyfish-client-sdk","version":"3.2.171","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.171","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"01361a0a45cbafb5405d2131f7002d8bfd35341e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.171.tgz","fileCount":39,"integrity":"sha512-DUxu+Q38vWTJ4KTlarxpQRQjMLTChbMb82DXS0sEF0HiF4a+WHyfOyq25Bzn5A6woBKkspjgCbNED+PZIJhdwA==","signatures":[{"sig":"MEUCIQCUhZJ3x+GiqFd7CHqzKmw2IlPbS2S5xwzrBfKz7dlzZAIgBIROMWOZrjToxt/yBfzIZVxVXASHPrmxwApvxgKdPl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglgLpCRA9TVsSAnZWagAAE3QP/2LamLgwgBcpIfX2QWlM\n/W6ttpNm1RfDufSGUxj+cvNJNpxCDJttKkbH1azXWwnY9j1uW6IOAckDH/1K\n+23LCCYMmMmPrziJFffXjTrCDm87T2TBGnfGI4EJ0hL6LHbto0h7RPJCb5Ka\nbvD7Zlevg8jHz3hH4yYz/leX/JCdbDbtQQxIPY0BawVZdU7KroXKu+3gRecz\nVvawkF+a0dOZSwFFVw+Li8SNEThziETtLcRjIRdAwLZXzKswna8BpZHSjIA5\n0B78SD+DVolBVzWOq8iq3jfEjWsW2ZdURgGX2SFx3GGhK/w7jM3c9Zfy7Ukv\nINMbe962AVOp721bk0tWubBdTUAFv6YNhVTOUrT6e7vXnvk55fz1LeHEaoe+\nfq4navVGxRrupWHOnOY0dpO7EzO2n9UUdr87khe0MwfKT6H9qAIoU7NMN7Wf\nTl7gVLkbh+uQU8Errb+B5kQPjOTsc2fYZr3M4Ot+lBSVZ+CpD+qddooC4HiU\naHOUjtk/9p7lZDMluKaR7r1pJtihDT0Rwi6uFLH9kHJHD7xGY2fNqU1APWGM\nYfXDOmRLADLJSdjz1FwGw+l362MCqvzatdvIC2rw/P5IZi8ZkZ6THwhKMziv\n+GACdHkgqdqi/uoPzqGvQcfPwsxHNSbmWDt/F8zxRoZyhnDl2TJnogb5Xp02\nDePH\r\n=7Mhx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"62018a42c56a61ae8878926453fed2d4a9f4dd4c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.113","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.171_1620443881139_0.3647719160643612","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.172-renovate-major-socket-io-packages-5bac170eae6161f3895292f4aa90419510372485":{"name":"@balena/jellyfish-client-sdk","version":"3.2.172-renovate-major-socket-io-packages-5bac170eae6161f3895292f4aa90419510372485","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.172-renovate-major-socket-io-packages-5bac170eae6161f3895292f4aa90419510372485","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8e570c950de7fdb12b51b03754947aaee94661a4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.172-renovate-major-socket-io-packages-5bac170eae6161f3895292f4aa90419510372485.tgz","fileCount":39,"integrity":"sha512-NqySOObRHGv/FCSDB3SE3FHSsFuiQO1eIUwwe5myGwWSmyOr16JeWuICUkNN1R1VrJ1NYEMi27DleEwE1cPZ9A==","signatures":[{"sig":"MEUCIAxJmebXXESQG1FmrdZ0NGHr6Qg81yi2eT0gBlj2QVMDAiEAnJLZYqSKuQpFCCGAc96WTOSzpNa4RS2oXVUtwi7jCwA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglgS+CRA9TVsSAnZWagAAZN0QAJLvn/F0GfPUHnwjeTEN\nQFAWC5wWGj/AB6f50wCnbn57kX0R2whM9BJAOT9IdAQt08jJWyhTseO62oer\n6o3aG62S+leWMsAZOTENvThW/umdsdhzIfEOSrfPVTHjUFgA2RRM5kQJNzmX\n0M8uUZplBgdJuMt4WGNHgNM3IWN1XnRPhJXKNKpsRYWIOkoy10/cFi/KY5HW\nICqhd6CjaOImBbjWIN6rBF8C9U5ij4gHRUFlucCTYOzZQdjx0Z5fBVEMu6sl\nPTsG+U0qTB4K0J5a9piXcEHkiesWZTjU/JraJL54+jZHk4dDWPBD0VbrEZM3\n1SA6usLJu1/Bqs6VG3A3o/SizYmS2uwUBxBdAYBNEeUVWKtGhNSIkPgdxajn\nKO6hJ9a9ULuou7a4azqFe/8o2EFCjaJfsjF0/59vZ+Pkjj6J98r3tV7LVcAb\nNhMGX04gTfyvxHGoQTrMiwjPMOzFqPnVgH9WNv5uHepG5i1h9vg7e93uPGnR\nP/EHy4vdttPqs7WBoHAMxK8ecuR+JJ542XYHQpq28TrjGx0nxKMgpWcYsW+K\n6lEwdYiMc3ewImnRNg6jsUn5eANUhCSERLb1ujc3+iLDOFyBO2/VjCaxssf2\ntCJDwSYLKU1TuVtPryLO0UBTu2El1/4cywjRrjNTw8+7vrupxpOQumoFFqm2\nYpi3\r\n=sRHT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5bac170eae6161f3895292f4aa90419510372485","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.113","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.172-renovate-major-socket-io-packages-5bac170eae6161f3895292f4aa90419510372485_1620444349853_0.11831897922653112","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.172-renovate-non-major-e25fa782f8a05d2d0c978bbb841b9e46c9c516e0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.172-renovate-non-major-e25fa782f8a05d2d0c978bbb841b9e46c9c516e0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.172-renovate-non-major-e25fa782f8a05d2d0c978bbb841b9e46c9c516e0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bea00123f5b3126e32ebd66a3939dde6e25e98d4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.172-renovate-non-major-e25fa782f8a05d2d0c978bbb841b9e46c9c516e0.tgz","fileCount":39,"integrity":"sha512-zUgrLaSe97udVGpaaXEuU59ZXKFc4qJHLxo7aVfpIonOjPcULSybN+OHl/9ckBQG9usuB0INRlAshCheKpw5Zw==","signatures":[{"sig":"MEYCIQCh4y1SNV6bolYix/lyCtinBrO+e+JoISfOmCmQJBXawwIhAMY+lZwgBAkR668MgWY9CGY4dDEEjnuqqADtXnpIfD1y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglh4jCRA9TVsSAnZWagAAeVwQAIPut5EuLL02ia6a7dKO\nZLy5QAClwSPZDhsv6QZzob/86lFcjaf6STPAmmz2J3NJp8+juIlbPFa25RdL\nfAVTMJv7T9yl7H0oOPaxwXl2XLLDwk+eW6blAMSW73sB4WpqbTdXxPIkctBd\ndKXJj0864BY37zQXQWEPQrtHldxjKBqbw0Tq0ADj1/93ACGXgkzVQV8hp3iF\nlOpsNe9s4ETVErqyNGFpxtrxIXboNS31Tvw6ULgpja8l+M0t+FWLMLl6wh+W\nIQAXE1ZZLjIPPnkUlbD/k+aXKylCZiGfYpkPZ/FmazKtLEOONi2IXf3NDAWd\nWWrkcVuwNdAjDv9ncnXNK8bRJKUcyYtq6FLflnHKmBEO9PU8MmH+QOoOKwiK\nybFxsOLI53uM5zjg+ee9FhsVS7gp4pT+B7gd3a5gWC7bGBI+XaGNjfgb8q6p\nQ7STcsNgztBz09ARftKAg04FFLkiQrZD9HSUdo5ww1UVN6Hl9upeHhlcar91\nkZwv7jO4B3QoMMCvxK3nj57XudoWYCt4OkcKKuxO2QV+Dia5cnpMA1WYq0Ld\nIa/WDyHyA8EevbieoZu4qD0RkXX8dtxMA3HxgROE+ApfcxsdwDCyvvxpa3Zf\nge7Civjth1uYuhMVuxiZJbhADjrBdHJx9Nae7abTgH7yMnzkxs0YoVz8m0Aq\nZ1cU\r\n=PaoW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e25fa782f8a05d2d0c978bbb841b9e46c9c516e0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.114","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.172-renovate-non-major-e25fa782f8a05d2d0c978bbb841b9e46c9c516e0_1620450850589_0.7846391194076765","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.172":{"name":"@balena/jellyfish-client-sdk","version":"3.2.172","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.172","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ae88231bbe2a46a8f2783fb244f3f559f5a78806","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.172.tgz","fileCount":39,"integrity":"sha512-kkkarZDn9nEuJeSYa18xjGY62C0TwZdZQpeBgDbXnSm2Qu7URhhvwFNFCWpdhMYCE/EEJ5g6p2Yzh9TuHn+LBw==","signatures":[{"sig":"MEUCIHGO8q1sREt4qDPkeoudJJqvZUaMpvFaJFTYd/Q8swtnAiEAsCtO5MDrbyc9JDTh8xrvwSjJqJytCIEIBOa+c+Dkwa8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglh7+CRA9TVsSAnZWagAAwkUP/jwE46MgjQFjX4fX+FEG\nfNlVdcJogh06Wy4Eqse2V5VvFFzNkOqHQZdEeVgwRLKxCecJVEfIFKy+oFFi\nSqwlmt/grCxS7HufvudMiKwxQBeUldkk0g9+c6HUfYwss16aAWo5HqHQdyJ1\n8NgW7gSVA/rHSn98zzJ5W1Q9S0LgJnLX7CFzEy8VnE/Tm+AWboHrx3Ef7SWW\nSOdPTPpgKj+s2HzhaBBWOg6ZLieJ08ZpOS3xxpfXkv/uf4fI2SBvvcDkQMWb\nZPhWv5rMqaejFAqHDfln0+0Ag1X7rIOG3HjG8o5YmvZ/tBZ5xmAD6w7Su6tv\nMQ6zriR+7DmBX9qWM4xhQNumJcgS7zImN5vzj2M3007GmtCd1bDM3X45mda3\na2ixzoTa8YMnBsOSlwc0R9wxUm0zbx4bLpGZR8JjdpkNZu0GMyWaN5Ofc2tI\nb9H4yNZdJrQ9zXhIPqHu7P03gR6oIiGkACn9PATQZh/BAJJ2HowowLCTf5ir\nhsQclfgfGvpBcUDX2rURNnn4JkWrhk6V20Uh5zglRphSURWp7nai1+1roYMo\nIUPGl+m/SB7d/iLB+cew9Pn+R8P5YJuufHiDoDCHenziRrlMYkPiqm+EJQcA\n9i1++8fJ+ScIW/ODJoHCwzUqhomyKz8cypSFCn4AI2lCPSkdXmmAWYY49e1H\nWFFq\r\n=nctq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"418c5f510cfa3311f43652a458d88f069ec5be13","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.114","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.172_1620451069813_0.4440443309753259","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.173-renovate-major-socket-io-packages-0c53b269d76015d939a9364cc71df499c46139cd":{"name":"@balena/jellyfish-client-sdk","version":"3.2.173-renovate-major-socket-io-packages-0c53b269d76015d939a9364cc71df499c46139cd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.173-renovate-major-socket-io-packages-0c53b269d76015d939a9364cc71df499c46139cd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e844fde24336594d28f0c931dd480a718b9fde0c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.173-renovate-major-socket-io-packages-0c53b269d76015d939a9364cc71df499c46139cd.tgz","fileCount":39,"integrity":"sha512-1w5L7QM1E3ixptjHHkPPhka3et1WmpnP9XHxXBrj7Bh1Lwjxh/9poI87iNvrUmBjvhi3pIO7Zyg/UCvuVmEbpQ==","signatures":[{"sig":"MEYCIQCuNL3fwEcjSbbs30BgmpcNvWL6xg9k9Ifb/O8gmgs2iAIhALK364LDVDlDZep8oor5n4jzbY89WpEuhMxLuOZpqvah","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglh/6CRA9TVsSAnZWagAAZFAP/jnP5Y4zHI1l0iCy3JBm\nuvpKKEMCeGKjB7ev03NT4O51xwe3xSEEHRG8+nk5CQOI9JoItycliwiSNkTJ\nZz/PON4hd/3WtCGziT39T6n6Lc3j/Vwcjm4U4QYR3WI0vTz88R6ghtCN6FMk\na7W+iWWfm+K4TBWHuKt+zRuVnQZERY46caYYjv5N5VcjB/STGS9BzPy9t4IT\nwdnooe9XEo4yF1q60pwpmr2EMCXkxfZXRJ+ig0crPE5DJCnoLsq2mVc7nAAN\nya0BhlZIOdtD2EyY0xIfV/zEP1j5hhQC5z5GTaNeXjrXmdfsVwltTtURDRC5\nfjRFfZM7B9umUhY8h+Q7z8vOsRsigXhw9CvYy7KkLrWHYOrfs6whT7nL1Mis\nUEPCVKiyZOwa3+D8eb3DHJj2vWwbtnGMnrCwlSb9OFMcjXQ9MobbgI1jjKlr\noGJkN+tRJclo7twiaFDCMcK6WNGYyBfUG3EJTBKPuHEEhsOxgz4UFo+Yfbzp\n1JvFAp4gqM+Hp76gEJpg2i/RIjHNP9rYdz93Z94GDikT4yzvuEPkSpUXKRs2\n1JMtATKHYlDjUOnMCmH9mHTN5iLRolu8ablgACmiVAYctIKW5Ihp0NiUMeOQ\nrW/JZiQaz2wS/JIK2Cvj/J+hqn1QCD+UPSjwQURgErEbK8Z8ry5o7TJjL54x\nf6sJ\r\n=r/J5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0c53b269d76015d939a9364cc71df499c46139cd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.114","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.173-renovate-major-socket-io-packages-0c53b269d76015d939a9364cc71df499c46139cd_1620451321994_0.2243756801032768","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.173-renovate-non-major-6aa6b34b0a22fa73a9d6724f1dd2d5d0170dd9bf":{"name":"@balena/jellyfish-client-sdk","version":"3.2.173-renovate-non-major-6aa6b34b0a22fa73a9d6724f1dd2d5d0170dd9bf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.173-renovate-non-major-6aa6b34b0a22fa73a9d6724f1dd2d5d0170dd9bf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9fe6fe1573d1f086c4a8f570aeb0b93110a359c6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.173-renovate-non-major-6aa6b34b0a22fa73a9d6724f1dd2d5d0170dd9bf.tgz","fileCount":39,"integrity":"sha512-sKdFT8HN+J4EPT0iXSXzrRsJPJNnEh/3aDxirhIpK4BqI3LlfK+YvP9BcnUHXLCL9SgQ+QtJd5hXtr2TSZtb3w==","signatures":[{"sig":"MEUCICbe75kD8u6LGRvbD1CfzTzuDvad9RW9RON1bx103F8mAiEA9HzUyCCCB5DoPZkuUATcuhOtEsCwFFZb1x5NHUWueGQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmN+PCRA9TVsSAnZWagAAkVEP/347rGTvfeKz4QXJshOL\n3FTEJJ598ibUnZwhI0hxy/Sd+x7POus/pXJeoFdZQvDup0/GwS/wlqsA1dXj\n+yGxKoBIeFLQZB9zd432tT52tw8kd+qNI8x8mcCQfisxDupKxhjomPZjShX6\nENm/u0h8MupzBWr11OMJgYAtYeoHZenqmnK4uURkmNhwLpZ23VspK/r7qBql\noTVnU6e4VcxIyyZYuBfdRwGjy7Oifzr3qSeR2+M/8rLUHV/2URQ1h2My/LIv\n1m5zO8pWHET1DMPS2IJqTkvkA9T9Os2aR9x65XG+I3wKcAoWiXKjKC3NRvQ1\nt76pqKvLYjnpbwp5KYjb6A4QY/0N4jWOetSOs1EQ71bDtmb4WeVZbd0d8LFb\n4JBqOW8P3yA7k1wlLdnMQ7Rf3wbDxjjB1ZfHr4GOBpl6wqo5PPxGna5p+W+H\nDpk4D3XM8djhjCnghEbqe75eO5t8z7pmmHxD9FIvh6gHv9f56qX7o665cod+\nu3T0sZLAkTfTr7sROa3WvaNHwQT1DUYCjP40PHGtlcRK2oaPCX2IuCAY/zNH\nM/8dkQVlXe78V/TucH1IQqrwSuIeTUqfz6X9P1B9H0m3kJNLQTP0Q0cFGW8t\nP52ltAa35LVfjK3FcD3AMnuUCp08u295fCi0hB/20ctl7dlHos9AK8UgtrDI\n0Sw+\r\n=ch25\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6aa6b34b0a22fa73a9d6724f1dd2d5d0170dd9bf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.115","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.173-renovate-non-major-6aa6b34b0a22fa73a9d6724f1dd2d5d0170dd9bf_1620631438560_0.5522943750738323","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.173":{"name":"@balena/jellyfish-client-sdk","version":"3.2.173","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.173","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"54e7c26d22aeb90d6c326015d0497007ec0e5733","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.173.tgz","fileCount":39,"integrity":"sha512-Uyjoe2OXkJ6E78pHNuGulRWJ1mSUJHnYcFBBvTO4K8KWm/QlIc0FQm+cFJ54SIOnhXriDXZr58A5g1iNKYKFVA==","signatures":[{"sig":"MEUCIFFVsbEvLod455RBIR81KMI5Ah8hJmawi7wkX9Zegcw3AiEA1RtKv7/H3DbxBe3Pk5uFvurCwXSXgJDgtLPjzImR4rk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmOD2CRA9TVsSAnZWagAA4ZMP/2CXTWj8zEk7FgHp1hl7\nEo970AKDlKxgvVAEJ+qoAwHHeLIsStNtcFp+/7W/44U3PXHG/z5lPhnrH9VS\n3wYcmsdwhUKLe1I9FNRzhI90D4H+L/ASGhF9qBY4IJLcqhJh98UA7AfusJ8J\nubUphiq7awbqRdWk497I6ceK0nQZjPjcSnA7m8LjIej3O9WU6HREuRiDlf4z\n1nl9gK53vjj8Plezemnn2NPDZKF8GR+3MjaxOL6yNnnA3A8LBsR/DJcm3JWa\nRPuCEqzA8WAI4rmaKwtMUpfrU2YckttbxVzHfKzoqkkAJ4Unv91LIPIURZfi\neh8/JRVH2LKkzDMLwjEkyBa6LKrkF+ep0wmlYUQhMA1+ofwUWuGXrTC6Im+3\nZJyCP4lkbcNsAxOqf2Xawb+KWkLNkz6GJ2M7s1HQEbt1Zx9yLfKZLbtFzlNX\n12N4Pyg816jIRQL9UIMWjvS8EDMEzCMm6kNSi1XdF4SrAXs08Y/CdkmUATNw\nhacs5+YTtutWiaazmzkM657mZFJhTjTXKl3cEuXAQ0zVs1H9NEC6hyylRm5k\nahwjfpqT7Yp6P3hrVWJGVu4Gfge3XCgP9PxXXzICFxKM36tJFdb3K4Fy539T\nZyVIpJzUm/3eZLBgmgZhH5zKXo+vtjvdpVFLJqTBFK+Bpo/h6mPTqJvyB0nb\n9yOF\r\n=jUcg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bc125bb85520c9c59e2324e575ef8fa05bd9fba8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.115","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.173_1620631797573_0.15228995120438027","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.174-renovate-major-socket-io-packages-99586b8ab506288e4d9fa2a6622cb5384f81e886":{"name":"@balena/jellyfish-client-sdk","version":"3.2.174-renovate-major-socket-io-packages-99586b8ab506288e4d9fa2a6622cb5384f81e886","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.174-renovate-major-socket-io-packages-99586b8ab506288e4d9fa2a6622cb5384f81e886","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"effb267863a7fbb39eeef8a75818ee908372c031","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.174-renovate-major-socket-io-packages-99586b8ab506288e4d9fa2a6622cb5384f81e886.tgz","fileCount":39,"integrity":"sha512-/rylcQLHskvUvUBuCw8jiWbjH8JsFPQWV3AGx6LjyDn9P60N8EMpICRWcW6ww/tZxCuaB/U4AyElYVzJKHC+TA==","signatures":[{"sig":"MEQCIADffQwvP7JnscW4wn5m+/WVGFoutMYOQG/o87pXewi1AiBHuggA01tONND2YW1w+UKjPyiZkkiNF4CgHR1BiUPidw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmOHECRA9TVsSAnZWagAANHEP/iGSMoDzPImRab1XLG1F\n4QBvS1+yp24xnGhZwPS+v4AUAUDB3QwxLOWk2TCXG6FbVEXtDhnVFNUsmKOp\n/Ok+eTTxdOyfNVsW0Z4LQta5E7sSG+K7s2XhT0V/c6Fl/ZijwxHdE2IGk+r8\nOrlPNOu3wxgs/kaI8GgbN4dlR/tKko0ctNuicPab5v2WHwzdPTKShNpcUnHE\nXyZaHSzWAylDMTNsNHeZwo6rbGako7IFqNC/E6GZ6phcrbAcQlpDcoxlhH2E\nm9bGs/IUUb61xyopghX+cyDVZXrURqg2GhE/thr5S5m8kwKzc2FM88QBomkN\nlA76qLY2AY2pIoSCvc6j9DW21JXj+ZCh1qM6T4zs/UMGTGETSyCaDw7g6ZED\nFbQAfmh9Hc4VzAGHrXb3mesJkQ8GPUruf5pWHhOKcAUI/7aghrpkWi5WemnG\nGu8XNsUbAV7B/UrV9ZZ/9mUH0x+zQ3tvcm+UHHdCrvzQkcPz9ULWziPLh7x/\nhTkaJY3S5ECukWxiLBNxrQaQmqFyQZ51TI+RiHH+SaI0FTRet1iF0/UkSeZm\nWbkRWCkg5XPZ6td2gPZolDc7dOBMICbB0j7vtJX0lIRqL/3uXiqKO/EvTQ9q\nvyAt92wahhr9ZlhBShQPSl5zj/E/vjeUeHr77XN96dqfwrP5qzm7cDREzG4M\n5W2M\r\n=wmKD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"99586b8ab506288e4d9fa2a6622cb5384f81e886","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.115","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.174-renovate-major-socket-io-packages-99586b8ab506288e4d9fa2a6622cb5384f81e886_1620632003980_0.09461174569793784","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.174-renovate-major-socket-io-packages-471e649d72f755c3618e37949da3adec1fd55fb2":{"name":"@balena/jellyfish-client-sdk","version":"3.2.174-renovate-major-socket-io-packages-471e649d72f755c3618e37949da3adec1fd55fb2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.174-renovate-major-socket-io-packages-471e649d72f755c3618e37949da3adec1fd55fb2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"62e0ae319ba17c0207b15eb40426bbc928f045b6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.174-renovate-major-socket-io-packages-471e649d72f755c3618e37949da3adec1fd55fb2.tgz","fileCount":39,"integrity":"sha512-mWjdXMXehSySt/Jig+IQ0ZXclyCXCqjJkkppqNVVuR11EKGHLN90AeBpuOQr3Tu6pW0hhhvKGcUi6XhdF/gCXA==","signatures":[{"sig":"MEUCIAckJiAE+2L+Wl1RMJXpPIIke7cIyNOWZ5VhpEpdsCPmAiEAsHF/7Xn4CqJOUOlrDlNBsqaUQpu2eA4oE4la4hp46nE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmkq6CRA9TVsSAnZWagAAVe8P/2Vk45dHFzcxtb/wuls9\n2JR3raxczxtDPHKX/spDJ3J2ArbZIpjJP/5N4dmJf7iAzfm/SYeCwkzcWFNC\n/bULJVxS/X71hdPLf/PTrU2X9ag2ID4EsN/RgyG+lC0fWDIeAjFLfHv+dkEU\nDtj85fvGkVOAGLXcFeMLjwerSeQVD/tfHvN7cgJgiMOifH3Cr76ikKZtYLyA\nwPbDQ5YaUcN5XuQjp+gHJnuS/mJt8m5yYeMHw8BSc8mopM9E/IMMEWZ9PgS/\nFlinJowwbHV5ojRnA5jHF4ZXbDysnuQEQD8NJGBTAOswxYqyzyPbOtXnSjPT\n6tOqD7GDQx3uOcJby/ZyPfeD9VDHQXbYOT4TIxm1jMTk6uLVVG2Kq3iaF7M9\nwopbOymuMjJ4dntyf3S/kcSnxHiXcdxGmDAFO59N0x+qiQSD4oSwWyPHSMdG\nHJXiSv8CnKakuZIIr+25efDphBizEyy+/jJS3ISbQKEQjkizwrroL+7eF0vD\nsNnbMN7invppqISjLYiR3uXdWV/7NsxU/QA7Xm7GYo+5SODxUAmC3KWzu+Kv\npvXrFVuB0/zHMH9HhWP6PCyEexPsmnGFceFrsdIipEMXQ0WDnAIc5qETZ/bX\nC5XVQ+EbKLiyju8F7uKqgUPnJn63SGXvU2Lo0mIM0AeHD+PuHiP9pZp9JGbp\nN3mK\r\n=XOwe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"471e649d72f755c3618e37949da3adec1fd55fb2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.0","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.115","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.174-renovate-major-socket-io-packages-471e649d72f755c3618e37949da3adec1fd55fb2_1620724410179_0.11891899352818736","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.174-renovate-non-major-a8312f080a442559b77ce71aa74fb5d8dd9f6937":{"name":"@balena/jellyfish-client-sdk","version":"3.2.174-renovate-non-major-a8312f080a442559b77ce71aa74fb5d8dd9f6937","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.174-renovate-non-major-a8312f080a442559b77ce71aa74fb5d8dd9f6937","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3f8a34807e95e1564c74ff0e07fab8243ab2a3f7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.174-renovate-non-major-a8312f080a442559b77ce71aa74fb5d8dd9f6937.tgz","fileCount":39,"integrity":"sha512-DgW8heUuC/msumBeQIyN0OCEKUDkgRQSNsunZNzWF/ijoCRi2chxlF4gCXNT4F/TWE0OkoYo0cJ1E2gCDxWfaA==","signatures":[{"sig":"MEYCIQDuxBKgWHPKu4QBkOb0zUzK/Qvwe2hoR177M4BEmhgOkAIhANyhA2MGkyw3eaUupxfalqWH/ldCcxA+adn8BKMf+seX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmkxzCRA9TVsSAnZWagAAnwUP/1ekYtXi1YWIK805eUOC\niNeGr+K5/bhyTZDyW41kGS34mUhqbOLRDmdaZl6VbPqm04Tvv1LujpENS6na\nsmd8+u8r7c6PQEe1JJ2J8dKm1MOdPDLykqcK5J8P6Dndb9SYvmFzrx0DtBGO\ntSxOnkaOQ7qZ9Do3geN5eKvz0bu61aD6EPVvHJvfUDT5ZAKpSsEOFKqnW5kI\n5Ocpd2VbRfrkqQhPTiaQBPclrbyY6cnYWSSjDjuhw7k4m4X2iOiQLyQIshEL\nfMCftqK1C+TvFqVgsi9uAbsGzqnb6GSgo7KDKk9gNaigJgBAx7OJBPbe6/8e\nSh3g2JuFpkI7GJPGpcz0IBIAXtrdNRR1HR58RBycCcrygXS+FtBncjE+/obI\nOGqVvTk3bEKIqsviuPSU5wVfDjjwpB1Ae4l8WLamd4fnLZproye/Xswk+aYF\nI6sma3amoBpoOfEh40cWi/4iJjacORMe/PfZbaDbfY+vGtr44GiiX/2O/A4F\nJpEsWl4xdDnlu6KdR6rWObNOvAsIJn5CMMDcTzqgWnrKvkv/Gb2Nb1Ln/syH\nA4zC9l5LpeGQEE1CTp47BbjE1P0w7A4fxf0QLytGeYkmTAnXBGN0Re0cp8Ln\nAbimx4JoTOOCgYCslUjhCybrIujA8NXgSHVdti4GAdsAlG/HFL7JB+x/RmIl\n6+u+\r\n=F3DF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a8312f080a442559b77ce71aa74fb5d8dd9f6937","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.174-renovate-non-major-a8312f080a442559b77ce71aa74fb5d8dd9f6937_1620724851436_0.9546771154011358","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.174":{"name":"@balena/jellyfish-client-sdk","version":"3.2.174","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.174","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca6aa7f7ffb95910ad5363a4999e97c342b0e25b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.174.tgz","fileCount":39,"integrity":"sha512-HzuNjy5csmfGUM+n0oCSg2dYqrCIb/qjrWyHFHPEfpREu0EXbP1kIrMsjCLd0VSNDfCoXF7/Iw3Ej+cfZF/nHQ==","signatures":[{"sig":"MEUCICIf4/3YRdKjoJs/BS8FvAsRhULvzvQjCSRHAwwgyGavAiEA55O6mbkiTPmYOdE9iekxH0+QqiE+CpjVdhUV+YsbMuo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmk1dCRA9TVsSAnZWagAAZo4P/0NgVnC3+IdtWlcL2o6h\n+gFENvSOAfWCfa4cyKhbJ0abNJVJcMDy1i2ZELaw/mxPrCMmF2hhB47RsM+E\n5AR8+hGQnd6Db3UnB4uLPpIG0TBzSKpJUv+3zqx77xUERv76Im9RhEfXWek8\n65MM+lHOAdi9az8aXGLktaQHcktzuInGuY9ksOYKKuT6uxJP8B5p3i8zf6tx\nf4b/RIBQ7B8Sf5TDFDpb0IS03UjfVBSmVcSizPsdPw7V0im6bLcGDyl0Jo9Z\n4V9g4hAYyBDGrIlwGOIN2ZwshuWY2nBmtcgTV9H3WAed8FGpc2P8xMsTvvAs\nAEssxirpTH+q1xZduNKdudPkmOYNM1YE9kP7u/LFWFBCK/qPRpErOwLASMtc\nJlJMgI61wuLlTlTj12x+4lj5XdiDD5+Kg7Gs6txy1I64C+Jeq7GgRMYyKPfN\nL93Arwag9nXbdItq5V1+VT9zUI+RwA60A2JdnAyZDaLXGpTRFN0Rkc4OZzoz\nDueDldgPt3ajWQY1n6GFRUA8mkW/1wZQk1Eu1sajKl6A/5jxaHR1pA1/qHyp\njCocyGhrglZ/Vn0erckdC52lfF0FXYTeQbgsgKy4D31T8JROU4OltyQE9obq\nIUfKFEhUDeJG++OghxIOm+aVZFt4J+ik00WEwI6e0Ra4bM2ykMQYFdIOgnUy\nE+mv\r\n=VLJP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a8441e5e163f15abd7d82fc113250a88d6d38b1b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.174_1620725085020_0.5322902967586052","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.175-renovate-major-socket-io-packages-564a28943068ddcdd5a126e1a9d1f9bd18a9b520":{"name":"@balena/jellyfish-client-sdk","version":"3.2.175-renovate-major-socket-io-packages-564a28943068ddcdd5a126e1a9d1f9bd18a9b520","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.175-renovate-major-socket-io-packages-564a28943068ddcdd5a126e1a9d1f9bd18a9b520","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bb0934c52efcb116cdcb0e47e1fd6b33283a401c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.175-renovate-major-socket-io-packages-564a28943068ddcdd5a126e1a9d1f9bd18a9b520.tgz","fileCount":39,"integrity":"sha512-InPs8oSSTv476uc2ayigHX7e5DpXJ9JaSfrs3ubhP68Mu5eiDrkk5SBYDaN9ywjW0WxWmuaCdTpFwNOJULsnpQ==","signatures":[{"sig":"MEQCIC9wxvSE+Dpr+NFKXpHcHoTAJULcRWIoD8NTgA8wK8uPAiBde3S64MGjkwEp4uLt9RwNS50rm7/TmcEa+9QW8Su7Eg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmk7fCRA9TVsSAnZWagAAtJoQAJ8gBgWZgiL9A9CLABiL\nuByAS8E4kGFHDEQpsP8QotYpWLs/VCV6CFCR0IzT/SyfbXiWp8Axn6V6LAK7\nSkfk3MfkbFp5vryMHmNL6iCJ5/+9otTtSi267zgmD3ZllDTUMYuKyzowYvQb\nEm6J4MvyPJDfN2mDX5LoFvUuyxNIj46vSrDCPJWfESr78mVawUdytqqIuhzH\nrjKTwiyC5owO1NFDJbynDRXF7GWkW93nqZFylaP+6UuZSOQWAvax0jjDwLFD\nddVXAp98NaAB/2yWPuf7tvRlovwcFj90ElahDPH420fFnt8Ex4vXFsKuFpQD\nbYLFCQakJsBGJ7KsbE0VOs/TgVFVUVzcALM4FEyRBz1dw77dYGku3UEzt3Wz\n45808RTqpiOam3ZRQsLaY77zTM22ncLsB0Dgw2lhsa8dwiOGVV0RdK1Rhw9y\nd+8KWrK6rPAFSnqlgvErz32R/akMrIvvcV0SV2kQAvF62PpY/LiyW8e82SiO\nowP58vyBaiv2QvJKvBwdi1CJjkIiaXzQHrel5Vag8dJo+Ak5U2bQxKpwiSXx\nk25nNedt+UT0ZmqAG5wKA1X7tQxdvh4NmGC5VOAyEk7uQbYY3j5d3Qui0JgH\nn3Q+wSB1qluxolDKUFNOqW0pI+p449b4m40X1i7CDKHRWhtEt8kpaE+bqeap\nuM5J\r\n=zBhq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"564a28943068ddcdd5a126e1a9d1f9bd18a9b520","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.175-renovate-major-socket-io-packages-564a28943068ddcdd5a126e1a9d1f9bd18a9b520_1620725470541_0.24645597576328204","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.2.175-renovate-major-socket-io-packages-b5b0bfab6f63165e39533357056785b010e20ae0":{"name":"@balena/jellyfish-client-sdk","version":"3.2.175-renovate-major-socket-io-packages-b5b0bfab6f63165e39533357056785b010e20ae0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.2.175-renovate-major-socket-io-packages-b5b0bfab6f63165e39533357056785b010e20ae0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4925e7d84d4a640bbd72f2d4da5eeb482df8d8bb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.2.175-renovate-major-socket-io-packages-b5b0bfab6f63165e39533357056785b010e20ae0.tgz","fileCount":39,"integrity":"sha512-6uia57xlu9VCOTJhO4zb9VnBMsjPUH7vzvAMqXMhbt8/ln/3KT3Ecb/Eja4ifaxTVp0U7p+syjw1wQ4S+TfYxw==","signatures":[{"sig":"MEYCIQDtRITfs1HxZXCN/OzlvdMTKRPQkC764/WWSFAfBi6uUgIhAKKNN/47/ovzemo8pY1i9wxp3rQq4Ws0FWieqyj8kycB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmwvnCRA9TVsSAnZWagAAYiAP/1j90v7MsiT77w8t/pU9\nQakjMomFBnFMl7M65QamAO1mOdBjV4CmQCUp9VLnQlvEkEmdnzVdub0MENDv\n8LgEHQzqPV+V4cCQEq/VZ/ijPLoPrMP50SiWOQanj83b4I1l8y7yGW5Tg+C9\n1nnUVrgCITS3Q9xkGW9CJcqXL7xVOCe6FvKcd64o+Njtuk76W95uvpvIkL79\nuN9kD5STExozuOrYPupBjrcVvowZlkdlLzGreVzNvwgahLC5ct1deKjOgDqf\nmlo7rezctArasJXX7kz567yKmE8luMQ27jiR2TSEqMOYPEwb4CEDOIpUAI8k\nLVE113ChvwJlbiKA6j8Aa3LgkfQ3Opp5vB7RS8szxcb63EIjN5kbgH1kVMA+\nZ23Mx/gBu0Ggwo7qT3gt4MFlMQweg27T2+zgHhNPOHrYq6/0GGbqzaKBymA1\njegsumdMSEDeRK+4mqAjW6tIBeENJNq9tfCedPoG1T4P8J1suIXJmzwru6u1\nNC02wDjlIPDfxfHVUo5M7snSyW7/+ylArBDOeoqosQjgxEwxEHP9CKeeTxlw\nlUX8NhbIaODf2GBeJC++uQEmhqgFkB7mfEMHzEdwiD+HTRGxfjSMw30zSX4M\nSeTYaBFqGj2yoHYUfe0Ns7TYbRELsE2nZqLI0vqUFGPgziA7UQIWRnvIDwAe\nfupB\r\n=9kZD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b5b0bfab6f63165e39533357056785b010e20ae0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.2.175-renovate-major-socket-io-packages-b5b0bfab6f63165e39533357056785b010e20ae0_1620773862856_0.576299783804689","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.3.0-pilot-rope-link-constraints-1-757b98c1b3a4c6ac5613f10257d7cbec862bf301":{"name":"@balena/jellyfish-client-sdk","version":"3.3.0-pilot-rope-link-constraints-1-757b98c1b3a4c6ac5613f10257d7cbec862bf301","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.3.0-pilot-rope-link-constraints-1-757b98c1b3a4c6ac5613f10257d7cbec862bf301","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3c3ef7ed3c48066832cdab891e96afc7aa695921","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.3.0-pilot-rope-link-constraints-1-757b98c1b3a4c6ac5613f10257d7cbec862bf301.tgz","fileCount":39,"integrity":"sha512-om2lXbJJOnZYwBmToq+YW7rouzpLQ/hcOPqbLxrWJFEsqu9kqvVI6kkJzh6AQdsC2t2HVvSu/wXaQlm4ceYCyg==","signatures":[{"sig":"MEUCIEYwMhqm/WgaPnbbU7V0Weu6NEVfQaTdCU/LvlJsvB24AiEAlNgUZEeEwy+A6P1F6vy9RkyjL3PL1Y+KOgiMKIB3FSs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm3L9CRA9TVsSAnZWagAAX6IP/3wm1OoC2/tfP/Yunm8K\nL4Ru7HSh9tISVU/aK+FhWtSn6Q2iG3qvaMtO9p09Zlzh3bf8ftIvx5uPNEDv\nAomWIWBxI05Fsq47265ZbQxlzpLWd9MmhWO397t8DtJLwLTT7ePbl3DV+GTl\nCQFaTCt0shFJOhDk4lvE5pYVjtjVoWB+rtHe/4QCa3q4AUiyslL4kqSTSwrK\nhbr5ibW0qKBlD5xa/8zZWtu5YK6qxYo+ybSlX7UMDCVZrS5KTm48qzshLDJ1\nsdfxXhMP8EmudPPaFhwwdSD5gNMT9UIsHITo4Afd/bLXUwtqjHDxxg3UYlp+\nqeJF6trkdfiYMv1um7HgTjqJa8Q1fQeZlYpgBzgHO9Lzm7+NWUJkdPVD8Qfi\nErJnuKK4DwFenX3AU+iGbeDK1L31fVungvlJdX5C4X0n1RE+Ej2nvWtOXzMN\nuhjzmBRROvU3mJT/hbnKQHXbQG+ZwD65C/mVNZvmTLZxEaCG5AthsC/H/X2E\nm0X/hQyaACgPRYoH0GKS3jHLmuKMgpUNIKAJuQGyjAtqFL5cdtRTCpQ3Uo1l\nw9wBuu0oTmdIO3st5MjzKqck6MpoMBdaq8/3Ynhb0uPolAvI5DcR9CNouDPH\n4L3+1FRQWPF6aXye+nCW/o5zBmkVPEZ+jw/FmpL+3NNzlKFZDTOkQqZMfCbo\nc0fM\r\n=CVg8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"757b98c1b3a4c6ac5613f10257d7cbec862bf301","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.3.0-pilot-rope-link-constraints-1-757b98c1b3a4c6ac5613f10257d7cbec862bf301_1620800252895_0.2584758687160369","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.3.0":{"name":"@balena/jellyfish-client-sdk","version":"3.3.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.3.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2815ecbbe08cbc4347bbd89f3c866d179cb3d369","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.3.0.tgz","fileCount":39,"integrity":"sha512-orrJ72/SVK3TzORMwzoaZMn9j3kDewU1wGrX+S8jL3MOyOwcnlrDw2eiQ7oxPv7WUM8qFdDwEU+S/mX03fIsDQ==","signatures":[{"sig":"MEUCIGiuYmqoa99Ol2RnGsVQvU5PF9pKK5M5y5OF0OHjBiA1AiEAxPANBVz6qJ37qZmKftp7KshcUWvZVt917rdOZJMJ7Vw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm3OxCRA9TVsSAnZWagAAJOgP/2dWk3vBWhu1+BaGIKbu\nBTf6ODmB0+oCUS0piziy4foSgx4o+i7VmOxbFI1hZsHDLC/fsv7+6y+F407z\nnH0fYGi8GI+Yp/mOW3EpuM2s7Wh0SsZelZNgEvm/77XUSIjyVQ1wc+fXcpXS\n1xfRgJCDIvlmjA9y7BFxvN1t3mD/hEWmDAqdRTy1K/3540JP0rPt0S3UWO0e\nuD1HrBQ9RESmDFzxqsak1uUWnWIYHcEz9j4sK9a0M14zNSZFYkY/5fVMODSU\nQ2w0uZnKVmV7CFDiDZ9gcV3NmC9MT02qMAq3qDmVZq02tIRC3wjbSYYyUy8k\nfl2aZOdRPJbcXwwJT4rRmBfF9jPFpl4rfNHxacE0N4F7byI5yR/tmu+MFp56\ncwzqrvWBv7u5W18rIBsoWpKsAmGNNFeMiPSH2cNpb6wYvR9oYslG+WVQYT+e\n9+WJ5q4O7Z+PrBUEEOGywF1vFqFEkfLzTUJHj5P85gVt10Rzz9rFQmn66x8D\nP1cklbPKbPycC6/A/ybrNujxDJrHDIXGHidCBgWL0lS9EOHM7NdqxAmizp2z\naXVAaMn6cp3PFxxnnElJQJo1t86QestQugIN/NKI7/6HjW/zvCOqcHgyy3ZV\nhYJnaJfco1bSpAKJeVQ+MBP+kpYRffHKJv/XKjCZiE9igpbzp6ppVTXTzcZb\nZ8K7\r\n=YuaK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"728a77b56dc040d12f22f8d18bbf5f56b7495503","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.3.0_1620800432577_0.21126807911757117","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.3.1-renovate-major-socket-io-packages-8a7e6a3215cb510ff80bba6797170801d9cf411f":{"name":"@balena/jellyfish-client-sdk","version":"3.3.1-renovate-major-socket-io-packages-8a7e6a3215cb510ff80bba6797170801d9cf411f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.3.1-renovate-major-socket-io-packages-8a7e6a3215cb510ff80bba6797170801d9cf411f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"be25086fa3bda219c049972c738e13d594528542","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.3.1-renovate-major-socket-io-packages-8a7e6a3215cb510ff80bba6797170801d9cf411f.tgz","fileCount":39,"integrity":"sha512-dA/0dBUXoCkP5E2ZueELaNVRQBq/h7Vmlxf0Bp01vg4VjqD99Gyo0B5Hsh9TwO1KDjf5Z+EC9+gDgfF9f78Plw==","signatures":[{"sig":"MEYCIQDrB97IQIlxQGBxtTNbrbre7vTRga0i10swja5CBqokhAIhAJMclMMNps3Qs8b+z6ssGIntOOJw+vrAEAfYbs+G9ToH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":246760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm3UJCRA9TVsSAnZWagAAK84P/25BDBj5GTolsLITpflC\ndqvsCEJkWpCVSE/p2EFyZ83Dtmi1qbDsdzG8mMTeDjNkpYeL2Q071+kZRgw1\nw1fz/KDuH9MHu7SZBHOHGZrKGt7LuqLgC3Cm+DjRGcfdTT5fMrVmGVeU3RHH\ns8YXYarLAOBdkGOcj06qK7n5rd7n6MygONyXtBcpm9g6gS+VVmf+whLRbWQA\nV0eRilxrq5pDBMFunANSRVw35g2SczdVa2dnkPSQmeB6P7s2IuWYsmKghSk2\nbirLnKVSSIiHd5FC2BBjDyVsEMr82e1R6dwUcQYmBh0FpZ3l+9DEFI1mv6GJ\nQSlxkyYOmsYM8f4pxmwPP98CXdW8/HO7EcnDnDymA+M4VSYsMZl3MrrXLgT8\n6A4626FGHcXEOSSlFXLuK4/jP/i0O6wdDM+fJ79/CnbRa4oFCwBmoPPe7oHe\nEIhpVedvhIBxszmc1uGI74abVcAAui/VaPkZa4BYZ7sKcF4wCpIWJPuPZENT\ndbmg7XeThb/IdWxkXmtRPzMp/JGMKhUg6frovo9fzedAy6CvNG+SHUFOr6wp\nwCYQ/OWCKLrL6qASnPa/RWCdpPc6wAMYhxxMP1Th6jSu0G1drnNylregvGSg\nu51RN8LztUJ/GtEbup++rsjTBlbOt9nsYdVPIjH3XrdK7j0aOfXExglr02AI\nUBNm\r\n=+02B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8a7e6a3215cb510ff80bba6797170801d9cf411f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.3.1-renovate-major-socket-io-packages-8a7e6a3215cb510ff80bba6797170801d9cf411f_1620800777266_0.6882009684663928","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.0-pilot-rope-link-constraints-2-c8ab042c5ed8ddb04db3930ad09d134dd4b48d8b":{"name":"@balena/jellyfish-client-sdk","version":"3.4.0-pilot-rope-link-constraints-2-c8ab042c5ed8ddb04db3930ad09d134dd4b48d8b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.0-pilot-rope-link-constraints-2-c8ab042c5ed8ddb04db3930ad09d134dd4b48d8b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"69f2e56bf894db7c8c967217e4ea311d594a4540","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.0-pilot-rope-link-constraints-2-c8ab042c5ed8ddb04db3930ad09d134dd4b48d8b.tgz","fileCount":39,"integrity":"sha512-jV+UF8DBP1KYbS+IQyF28wCZiQOAbtpftgoVdmrCvvwV6pkKIAQgmnIl0dnbllPXC6qYcnwGEk91MQMD94cWCA==","signatures":[{"sig":"MEQCIEf6LTlz3VHbOPZKJ9mbkpJWGas8lWj7iUd9ED3ffGs0AiAfpfBM6tHB7sxB46N2nJdEQ/kDEQPuW+LKRFzO4Alirg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm3lzCRA9TVsSAnZWagAAyfIQAIVQxc69mC4hdn8WQJUT\nvkP9LqssHR3T+KUPIT0k79A8OH3cWXozoa7LdaqKsx08m4YUJNqvXxUPW9rk\n43Dmvx9np0OF4yIz03NCQmPxOeSxKR07+ntmCoNYp2q7b/p1TRbq+mcXZw3U\niu7bMfcjg5Pj4hNQeae3a8YdZgfUnCg5pLbjDYjf5kFPy4Egqa3lsxGJ6L1X\njE1FvPKWEHYr4BU2qr/97HT0eB0jmDTHtFfAF2QwpxgHZhUq+fAraAEB5NKP\nPaJhg7t6yw0LG4IO9fQqccQa8AC3QcoPd//RzlQi0HA7ztFgATVS+/7wxKp/\nb2fw6B4+S57dN6uz+qhGOPpWZ8u0w3/3qLxL0pw6F3KPVA95zdoXPLS+ZiC7\nVORbNzsokjVoPRFW0QDnBTNdbkA34vUBwybt0zCmiGUK3UfcnUCIEGmDHkPd\n3nshyF0ePSzFQdUyRwcizP8IWiT2mA/lvGu3zBFooabjvAeGaXKy25CldHNA\nhsdSz7OukaoFnhFSgYzBEyyqiF5xRhQemU6erDnq/YyVN+p+ATaBdb5py2KC\n6dQs0VbCtwvlcf/ZLv1F5dsLuS7VC1tZsOM3tZGm8ewYNtVu0fDxcJIC7BCm\n7TxcfDOQtRbSkOTFHCqf4P2+tTpyqV5B7Y6kV5Z8IL2jfGC2ApCxmWBAfHka\n2xi6\r\n=mN+1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c8ab042c5ed8ddb04db3930ad09d134dd4b48d8b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.0-pilot-rope-link-constraints-2-c8ab042c5ed8ddb04db3930ad09d134dd4b48d8b_1620801907027_0.5817723581151517","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.0":{"name":"@balena/jellyfish-client-sdk","version":"3.4.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1a518fcf37e72bae8abe6dfed759aece71683d9d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.0.tgz","fileCount":39,"integrity":"sha512-g7ZRV6WF+DnhZNDLy/e2bkyzQPyfDHnf8DsfjpUCAePumuam/mBWhhXPBuU6pa7ObS0U0Y43vh/G6E5MrMwBgA==","signatures":[{"sig":"MEYCIQDDBk7cPkji5pL27O/gVwdxu2eTc76qC26Z+YTK0knVkgIhAI0d4zwZlG0CBMVdRaD18KiVUEWbmQNz6G8OTMxm+HzE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm3ovCRA9TVsSAnZWagAAI+EQAJEzOuQ0Uo7TU1dohfga\n7zTuwacHBH7wtbNN5RApASk8NB+xLTG+84ZqZsvSMp2LO0y3CwHwqmIRsndi\n8kOLIsoSSUIbeARMT26pUur6tuyKbndDKLjskjp3kl02ROoxSy30T9kl5yQm\nDFKjTO5VXsBwQ7NvPwl1yQqMb5XTUuLoGq80UtZJ099a53SEkaknub1EL008\n/kP/lUft1U40NaT8kmmO1h0psOaNGafylUJ7XRqqqlleSlwcFGRCDzIWx0Jt\nZ8zN2Q6+vxgsRHkBTgv8iEXv4fQnINIb54+sKFR/tGnYONhnyQSefgRTH4qI\n6UChuQ3YN8QM2iOrx9WHN3gMuwlfDtJiXejDCjjBNngJtj0gEe3cc4tUJJP3\n8LKN3gM3OEU2SKNNCG3qDSwG1n5XCz34M9fArjSCaWj3hmCMYbz+KJdrwlqv\ngIOCW3sVAmFjPPSEEMwubpzJzgPPSMpapA2sVke8wcmn3QWk5sehux+ypjbP\n67tDMX/qfaljS7v+iFGHGe5emeIgXwoygQ1UD2ZAyT1+pv58P3eBEA6SkhO5\nXFyG5RqFwjWNPJtZYBpI5rAEyf0MdFhQMCaPa2mNa2Si0DY6refes+fN0Edn\njYpVGOF0MZkQf/KBvHjlhUlEexNwk35FL+mUHGEDinr+Zl+kFkkELMTaFqEy\nEDgX\r\n=0QIx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d9f662f437511c1caa1d865fdcd5f6cc7af4beb8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.0_1620802095301_0.4026707082875436","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.1-renovate-major-socket-io-packages-ea37f430ef3d1db726086d60f728b6a628f223e9":{"name":"@balena/jellyfish-client-sdk","version":"3.4.1-renovate-major-socket-io-packages-ea37f430ef3d1db726086d60f728b6a628f223e9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.1-renovate-major-socket-io-packages-ea37f430ef3d1db726086d60f728b6a628f223e9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cb821b3efe13797ef8b10c82e903065851661d4b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.1-renovate-major-socket-io-packages-ea37f430ef3d1db726086d60f728b6a628f223e9.tgz","fileCount":39,"integrity":"sha512-XdNfBpdMUNQ/w5KSGmBwjYs5hKr5ioOy+3ilc/VsosFFahjtjHhQcbeHCzZO6melwKkzcurDDz4RHznLB3fvDw==","signatures":[{"sig":"MEUCIQDnvHZbAups+ug6nQ7K3tKBgscLkqrc7LhIIAJqH/rbSgIgfTB4gYJyV6g0PK5eHJUbFjwfLGBGGeuLy2krEET0Ef8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgm3wYCRA9TVsSAnZWagAANK4QAJPUxW/2SrC/cOSsOF8c\nUiqN2Si3nzaXOjKluQ9s8sUHMdL8mHUmRna1jiRjnEjLn9h2fX4Mq5iMYz4M\nkY59QSMEFPVHcdRXPJGlX+U74A2fx1FzQXJLQzkpXF+y7xroKVZ1Q2a2uyj9\nwULanDyAn/b/eq9my9OfvJniSnUHhnabdFUe3xmmfVFzqpYpWWg5NJWSpD1l\n+xhDtQFERQkLNiKy7WHf7o+yYk16QoUVWFfe0KdlSw5UzWI/LSWUVuRWYB10\n6q/kGCeS8/QZGjAgb2+3O0NH9HqSPm7URMBF5eC4DzIUqLBXRnSyc8q1L6cN\nSLOTdYwxVIkpO7kaWvygDPOXNcLqF6zqINablRBK9TBqW8b0UZYF60+lD0xJ\n4vRF8CEwLZd5tAmO349pTtgh7t183lMdEhTo/NcXGWYklw6K9QcaZ1D+lgo2\n3ot4LqMLD0W6NLmZ/i+i9K+boHuAYEIR72Ynbl+D1vmCA4T/aLQ9MuWaQ8Q1\nMx4LYHKajtuuYLCQyQ4bBcw/81erYQzHZJauc4pDUD8plRkF01Xe7BX6bCyi\ndlJEZ2abgej8rHI4Pm0C0wPOe+YK+qPb2CKIc6v0yVw+qjYH/c1P55XV5n2i\n4S8yDgkPB2R7CFWssZimtb16nTs4LVA9ICRJOIpide2hc2sQUWE4gAuwkqhc\np9EL\r\n=s5s5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ea37f430ef3d1db726086d60f728b6a628f223e9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.168","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.1-renovate-major-socket-io-packages-ea37f430ef3d1db726086d60f728b6a628f223e9_1620802584520_0.05751240701232274","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.1-renovate-non-major-def4b4b0f77a5c8bc9d5cb4f35932fdf95d72147":{"name":"@balena/jellyfish-client-sdk","version":"3.4.1-renovate-non-major-def4b4b0f77a5c8bc9d5cb4f35932fdf95d72147","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.1-renovate-non-major-def4b4b0f77a5c8bc9d5cb4f35932fdf95d72147","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"724b255cb44d6b2cd1f1991bf4a42bf6431d5c10","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.1-renovate-non-major-def4b4b0f77a5c8bc9d5cb4f35932fdf95d72147.tgz","fileCount":39,"integrity":"sha512-0mvq+zW5xcQ03O+xO+DFj5CtvbZBJMz8kM35/14RgSf13YIJsVnWjd0CX5ecgsq5O50u6Ikqd5r9AS7btOle5w==","signatures":[{"sig":"MEQCIGRVlQP5fqU5AkpUy/NpMlZVoGxhrigeRV6sddOc9qoPAiBfTPqQOndP2s8lPktjgjUg4aknsNXl5aditvfSIqHRqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnGv9CRA9TVsSAnZWagAA6ekP/A3iEXN/48ruCf487PrX\nuGWVe1Oi0WhJzNubpluqhwINXa8Og4KawofA0gVuDNdccUB5kEA0LoewgF2l\njKrFPTnbJ6EOY+LEiiC3+wDCpnISJDNmJeHhITUnPa+B37s7sqeM5sn0DoTN\nAXskLGw6T28u7MIIAk8LTosPP5Ac1ZcKBSKnn6aitgNuFzLUgR5x1fyNmxaX\nCcgo7fl2kcPSYYvZvq6+Hd6ZWcHURdIlKIIaokXuVK+ThSCDrawU/tJoLqsu\nyj6fitOQDiDYrMZ1Ed0rP0Q/T6Mgl3csA9x3WPdakul3MmuVkIRSs7IbHEWM\n53bWaVX6vpFbYtadYhw9TRN7bdKokfVKlcg23HZqM1zC+QISdQttkvso4Gw9\nRWVoAfDsjwZpJfEnGAtDwSGfbOJ0SX+J15y/Twygkxr2WyeacwueteBYcfo3\njI+KuTMrv19wlyiIz2dhrkPt8XHLgsoDux4gQIqT78SJMt62OD+Q6CqJNSRP\nnlCs3gPlfnq3DNDpSdI6HM6djozI0l437AH1O/Ii85oOBxSRuaEPHIfEbnt3\nwljLEgYQ+O+0wll3eFFE5cw9TfypNq3cNunwpcHgkfOS250TDC9v1AjBgJyZ\nyW78D0aIYCxfzwB29X8Ojf/3/VjMchB6b0pIP/s+wFxRNMS8HepmjPaXoWhI\nCFg0\r\n=qGqD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"def4b4b0f77a5c8bc9d5cb4f35932fdf95d72147","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.1-renovate-non-major-def4b4b0f77a5c8bc9d5cb4f35932fdf95d72147_1620863996856_0.7826151535401022","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.1":{"name":"@balena/jellyfish-client-sdk","version":"3.4.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0d43128484490b9178adacd86536adf5e8a411fa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.1.tgz","fileCount":39,"integrity":"sha512-gtOQ2ZPv4uXHuKv726+oJ7ZFcIGae6OsCD53FVDELGUGNwePS0jxrCRtGtOaZ6rt6yrb3RpAnq9LZ/nxOEiRAg==","signatures":[{"sig":"MEUCIG000FrqaB9HqU88P6YwiWSwlLmskoAYXkhrmlncqGD8AiEAonYntNY2tysputC8d4Ejhj3yM8B9kj4+nVoKQE1QbKo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnGz2CRA9TVsSAnZWagAA0cMP/328XfyaWfJNEgG7S9MV\nDJkWpBmBcK17JL8/j/IizslS6izCS/vEvtWeSHyBvPpR/lnrd3H+Cfffx1gJ\n8IapPsHPvUqUmJDIn1UbIzCJWA8Qk5o0TZzgFwPsL7BIUKXDDIEMdcmKvtss\nL7MVmsenonfE6gqV/OPkViuXtp0jabeKzI23tj1Lbv4P4t8UBX8gMqsis6zs\nRXyDoljIkEpFYvaj5xzB4O8AlSe6O0+Cm+Zi+5F2YlDQPcwMpy1l06TgZMIy\niT/GQcZMYiH22kZKIixZW51W0GgL9+0Gx1cxy1YuvHfeBPvoB8WakCBtsdT2\nrdog6vBDfk6ywvTTi68wEvpoyenPrCZYC/sIYmmnqnq4R2cmGZ4ENEJYclyj\nanggxmNFigVL0TYg3hc94r6/nbImf+F0I0/DVqKVAuamljS1DC/84v7dv0x4\njEKbnZgL7epqVyZ3QJSI/6KGbyM64YHdJCnphbIPlxBKpDn2ViJylumEBItg\nK5ynXI3N8j094JkJS+Yha/LYEYL8XJQMtubixC2RrNvkFkMjmNFhfM95GkIP\n6RQlH93g9GzjFiJ5MYyvxGpsX4J4XypmvYI+gy17nz5Xu3ZWMzOaf7bjJ3fC\nUECvNIzStBSYhvi+m1TzxXjtvjWzXwkJg5vcxxCpbZ+bTb3xaH2nuqgTo81N\nHA6e\r\n=Fv0F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"29f1138744905acc99bf5897f87c7ad5cff13e54","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.1_1620864246372_0.5050126238340977","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.1-renovate-major-socket-io-packages-c76e6f9ca4e69a8ef7be12ba862f258672897b49":{"name":"@balena/jellyfish-client-sdk","version":"3.4.1-renovate-major-socket-io-packages-c76e6f9ca4e69a8ef7be12ba862f258672897b49","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.1-renovate-major-socket-io-packages-c76e6f9ca4e69a8ef7be12ba862f258672897b49","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7bc3f08f167c46a644b032d9075e681f50274d32","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.1-renovate-major-socket-io-packages-c76e6f9ca4e69a8ef7be12ba862f258672897b49.tgz","fileCount":39,"integrity":"sha512-41FJOjm5EXjPJCqzyEQwNmW+Xnfd+ZezrerI1Ujl5OBPp57ZrQFmUZ6eEX8l+uT8cZUJWTvMKVVvyMD/HsQkQQ==","signatures":[{"sig":"MEUCIQDa48EeoCucT1hzKJaO9LKtPNN1YfZK0Vpx2o+0tq1qHgIgGnXasF9cAgWjWBl3vA9vH1xtndB50EJyplUz6vIOEAo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnG37CRA9TVsSAnZWagAABXwP/0uMHCA5d3qv2HQrdJ5x\nI1gJJiOZzme9yxg/sAVv2PPgs1t9QPaJmYnl4Pg0aTUg09CNEFVqmdQtnBMl\nBiB4TeyTWxMOQrvPoFnuSDFBd37Tw2a5WSQAhIBhB6oEY/Cl6smgjheRCGA8\ngwMRei31DG6qn1rPbu/wr3apbHLstGRVJXLUI/dotv0dvA/azQyg+eGvv5hc\nq9vFr/CziM5CVUtmzpN3Et+HcU+kf8Aa7A6w/g95nfQG1U15Lf83LKhmj9vB\n3Fh4kaAHSmetYTgGWiTc/QpTXihk/LotzBt03bCyFsFUPO0TxZuVkbn5bnb0\nQqXdOLZ/uLqnVY7Zp450nilIvEo2OFJInFT4p+STWOYPLu0W+cbzFHqfpAse\nSB57TGE1HPBPfASfBWijf7DeDIYr+a8ZdL9UDkY7fWBNbM6UHjGM17CUxVue\ndPRgrnkdW7hlrKMvMZMbSFUPpfsdCgns5XgjceptE0e90hg4WhK/CE2AhLLr\n//C8xzpEL3D+7VLMvovSTVj9tVetIcGUvQ5fdnUMbTSVbNA83XqSdFxxAPld\nG16mT1U+Y96AR2LKlvHLMO+vo6BlWgp2XZgzBJfFdDOBrFWo3o5obgzLfEKl\nbSBbSSwKiEm7fiD0IZqz3CyNG00TG7DZRBT3bS+B9rtHS/rwWyQSibfl39wx\nIbzv\r\n=lz5d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c76e6f9ca4e69a8ef7be12ba862f258672897b49","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.1-renovate-major-socket-io-packages-c76e6f9ca4e69a8ef7be12ba862f258672897b49_1620864506854_0.5000578350599445","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.2-renovate-major-socket-io-packages-ae8a3589744ebbe9dc35144ab911c4d05cd8db46":{"name":"@balena/jellyfish-client-sdk","version":"3.4.2-renovate-major-socket-io-packages-ae8a3589744ebbe9dc35144ab911c4d05cd8db46","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.2-renovate-major-socket-io-packages-ae8a3589744ebbe9dc35144ab911c4d05cd8db46","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"641c70ee461b52054fa667fbbca8a0207e26d71a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.2-renovate-major-socket-io-packages-ae8a3589744ebbe9dc35144ab911c4d05cd8db46.tgz","fileCount":39,"integrity":"sha512-y5u5zA0ZJRldjnwZcMk+kf+tTehVgqxbFpVSGX9f3GcQ5mCRVazMn+009tk27ni7/++IsTIekX1C+Xk4N7/QEQ==","signatures":[{"sig":"MEUCIQDEfyWYzetWm8PkTzjwHPEBzDTmdbSKrgnmKHHQDQCVRwIgVoJnaQqRLFKmFJ5oEe5uJTG2iQZqD0GEX36PzQTPEXo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnG8RCRA9TVsSAnZWagAAjdQP+QHE48WHnqlu+qpRGBUc\nbPIlLLsQPkrqLgIHHfDUDAuSQfi7h6uiawmcclPXgiMwMnE1N4EywRHQYnTx\n2Q41Vy/i0HOlH2fmb3tOyOMfKJMoK6cjx05xoEk2WcbZL1AlkdpOc4de/+Tp\nGKHgpCbcUzVv58scyGwrvd0SnxixtxeIEMsMzIYrza8NLnGF/O/VzSMVm+ll\nOVq8eR0r+d0YVF8iNTB3D4R0TM9mbJ4jyOdgPRPx2lr3uMy+ki3ioBDQZUGR\ngxULw4TwLhpawpNiMKf5N1p9nDwxfUzTl5LS/1Kh3dDFdnBS9oqEG78g3YM4\neY+1eDM9cenIirDvW+fKiVG+L0vhomaHtjbloV3zwlfcJk3eAXu1suFGXjiS\nftx1MDBYUJeV2e+xCRUf+3twS6LfglFXTQIqv5VCRlJl12mavTH4OloLNnF5\nvwfnIa+vrRCQn1WMhOSEeI+aSrvV/rjEjv6MA1veLKDhtTwo0gnUWVUIosNf\nt3dkEmm9K7ndtvU2xgkhwSiKMGB5ehI2nDKWM8HZdHTv8QaA/p2tEtwZQ96q\nu+4MZuWX/+BFA6cwZY1r/oS+SmyV7v/rbyoVUvbsoMwGG+eYrQbEHQkgCo5A\neKTxUv3+pWWLJxlf4bReJLRW8CXan0Qt0oCU44Z+cd5atYaLKf93FHRvvmpE\nj1/i\r\n=21hG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ae8a3589744ebbe9dc35144ab911c4d05cd8db46","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.2-renovate-major-socket-io-packages-ae8a3589744ebbe9dc35144ab911c4d05cd8db46_1620864785310_0.7822648701229966","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.2-renovate-major-socket-io-packages-750fd9b9eaa03c2d81fab8c5e8f60ce18fcf8744":{"name":"@balena/jellyfish-client-sdk","version":"3.4.2-renovate-major-socket-io-packages-750fd9b9eaa03c2d81fab8c5e8f60ce18fcf8744","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.2-renovate-major-socket-io-packages-750fd9b9eaa03c2d81fab8c5e8f60ce18fcf8744","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"299d04154ad264cb8b55d105f8888c4bb66c8ac6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.2-renovate-major-socket-io-packages-750fd9b9eaa03c2d81fab8c5e8f60ce18fcf8744.tgz","fileCount":39,"integrity":"sha512-HRtx/ymm+4giBvACgJVBGmdVDLP9w2y1hke/H/CgGMZLrmTuRJxQCb0qfNO5h3uGT7qFGxYLbP14b0ZXuJOFOA==","signatures":[{"sig":"MEUCIB0c7NBpzyDlkinq4wpw9SeZnaIc6l0tsRPeWXqpgO87AiEA+EKG28tSTLworucdVu+uIOBFcdUbYF1kBi/ITTLl8kI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251501,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgouY7CRA9TVsSAnZWagAAk3AP/jF5sG+lPbDupr6hy3W7\nwEWpeDsbWzW6xFsaDOeKwYF78CoFh8woeC1eAo+pE78MROoMXD5tqT0v7+B4\nWTDCHpoyiuokmj2OZP56CV3C+eYIeGqCKFS/qTf3d6Vi+50cTBwDIVAi4VVj\n9iXd0KAK1UAlUM2dQd17zCv+bqN2LA8ZYHk5+BtDUYVEVvKFCNI4mGazrq5v\nBr6ONmuA1Tvfqe9wzkCUdizvVDB6CUovMmf4hpNEVRe2Cq++kfiSpGXLIGJI\nafVLcd0OMU7TcFNPH88FdjNo4muKf4aMfLFDVCSjcTEUfOg7Volccgpr3KTu\nGXP8WdyFMlSf1QRmc2MV4Xo9cphbprZsQ7x2uh3qbTtkChtx3M9hguyxfeAm\nb5T6Jhn4MZtNogCY1d39ZwpGAEYb+zqP1qLH/LmsNi2ww8J0RFH54J0HygxI\n/dPXlAod5AvP3YcDYrOCyj/OnSWj6XFDoiKnBYDWQaDTt2qVCJrA5+dl9KdF\nfXdslERHp8c9OEi3+ThS9b3EoSPg7/ybb9hLaFRXRVTC08wNociyaSE9Jx30\nHlmX12tTHLAHrX5xTG2tjwQPhpUrBi+prVGjApLKPBEnX8hqB6or4vtQWZ8m\ngC3RahoxIXzoa1raXs75F3zNGlv7rrs6a87v+K5/jMBcBJuLr98X00RLUpJS\n0NvN\r\n=obpO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"750fd9b9eaa03c2d81fab8c5e8f60ce18fcf8744","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.2-renovate-major-socket-io-packages-750fd9b9eaa03c2d81fab8c5e8f60ce18fcf8744_1621288506349_0.3952122578856865","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.5.0-setGlobalQuerySchema-1767571b52d38105c6043666bcfd01940b15836d":{"name":"@balena/jellyfish-client-sdk","version":"3.5.0-setGlobalQuerySchema-1767571b52d38105c6043666bcfd01940b15836d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.5.0-setGlobalQuerySchema-1767571b52d38105c6043666bcfd01940b15836d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c42fee8daa4550829b8870eacd41407c9294a99d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.5.0-setGlobalQuerySchema-1767571b52d38105c6043666bcfd01940b15836d.tgz","fileCount":39,"integrity":"sha512-WvD9G2JYhXBkAYeil65or8e2TzozWyGH6j2AgtlJT7Fu74GtaUrLhEFuqkXsouCsjgS5EUTeLhOuGbb5XdwmmQ==","signatures":[{"sig":"MEUCIEuzS9k9aJR6/ULkX9OzT+W/XRKluRoW0HiHw9NAmrsQAiEAixTzBIbhz0dzn4Vh9Vk/sqoRv3C2qHCZxlZt+UiXeIQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":262315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgozFwCRA9TVsSAnZWagAAP24P/AoexlmYbDQmf2uVI2p8\n+mdsAwGnIocbHU6iKz6I3u4S+bq0RAxpltCbV4zEH3si2Tmv2bXPaJ5Jx31f\n9kM2+lMdVffDW+c7g2y7DoDlB2MmO4kFYoMYK4eNbad+KDG7LjD7qVNGDtnq\nUhaRqyyKfDeLrV6HnPkDs5Z9hRswWg6VAGlRyYYYMtAXzpWhYB5htOk8gi55\n/yU9XaZgO60uR9f3BpbAIw2dgzUuKtwVExf5dhgsfBwnjSwhbd71YGstHwVd\nxQiVg/ZZieI2vbyPH/1+5WovIxHqllfatO+guwJBCwnYn83KYayaHmGX9wtM\nqmSp4NsrBuRaTEt7b9IKyExuyLQV158H/ARQHtJ58BBxJMJB5zwPgbyxnQJU\nB+lFBKCS5K9sVMiE5hxL0ZRDF9wNbXVFccoVYeEcGrelVLDsBHmWwHAcmrub\nnt/ZYis+KWevFK6CUZQ5QGLpKDu/Tk24sIPC5tXmFnV73yeeH4vH/1ySdjAL\n7BplRhLd47fQLxWisPszNz6vCGpDDUudkn/EKo9iy6q+M/V8dNT5MceFrMVq\nQGzXCar6H1lbAuu9iQNfHe1OENKFvBeAu1vxCuJTOVn1K7oaYfpgjEeAlrZh\nmzHjWBnXnuVWoI+8K52RwGIClguzWPh62wASY6F4FRkfxNwzjhGDbJK80k85\nwSrb\r\n=IbDE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1767571b52d38105c6043666bcfd01940b15836d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","skhema":"^5.3.4","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.5.0-setGlobalQuerySchema-1767571b52d38105c6043666bcfd01940b15836d_1621307759813_0.16090345594813615","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.0.0-remove-loop-constraints-eb769cfa878a274fea49681e3fa35c35734490b9":{"name":"@balena/jellyfish-client-sdk","version":"4.0.0-remove-loop-constraints-eb769cfa878a274fea49681e3fa35c35734490b9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.0.0-remove-loop-constraints-eb769cfa878a274fea49681e3fa35c35734490b9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"28bf9cd4403151225fdce09818f411e8560de77e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.0.0-remove-loop-constraints-eb769cfa878a274fea49681e3fa35c35734490b9.tgz","fileCount":39,"integrity":"sha512-cZipbkVmoDjgGBSXxM8eySsLuYE6BwIECz+qfYGIv1FZIoN0LU8Db+5PWvOpG2YBaF5KTdMRi0ZpT0yWCiTQtw==","signatures":[{"sig":"MEUCIQDSKzgynCbibfkRMDT3ojUsXJ1aEZCaYR4hLxvYI6b1AgIgBtPkM8EKAb3Wd99gh4gEZ0jhI/0phRA/x33RHTxTmqc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":247912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgozS5CRA9TVsSAnZWagAAAW4P/3kiATHUIsEjYgnbhFdj\n4nX1U2ffktOyaXXEpZJCfka8Q4xiUyVZbdn+GU6PSiB83ueBM3xcvTEaK+Mx\nSeIfOJoEhKcTGDetlocjHKPXb/bHd8rPuAj1ysC24+66fhkKCEC5tDPvcPTx\njDi0+JdK2y0ng5HfYYRpXjyeAzC/RTNMvkyIRQ3qvXxC3lWkWDuNZCCtt6qQ\nxGuismcFwu/dJX5VM+idwVAPi1vmmIEpHFEqEkyEhRygolR8Z05EPPkfgRVI\nRdNk9SSTicBkTe/t9bxGvUIfLvWDba3axqBrYBCUIv9wbKUhs13TvkMj4jwS\ndVjAWanXZ8CJJVeNpYh8IYOIBCyD8k9cLIiVDJtH+zdwersdRr2uTH3avtx2\njJiw5+b3NBgOUM9/JP7Ba2vLz2X+o2/ZU9euqyaL5UnoUBHOsMPma3AKgD7o\nv0X4RNlZFIu2J+LskFOkxG0enji9lmlWEOsXeR3cTsMxvXAQVkynkUR9tYbw\n01tZMs7k1AiDmGKiwhY/SMjc4XnEo0ZZlhLbopeYuYV2GbxJQj7F6B9rB2Xe\nPfBjp8/PlQlNcPTXb444WDlZkOE/XOCxjWzKUs/wdarcCqGwCBoTJNT8SEJC\nFMiWCgUrPi7cvkBaeZFkInbdd2j8PaZLJ8phASCncb8NR267240aTTHaoFSs\nnWpQ\r\n=ZUXg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"eb769cfa878a274fea49681e3fa35c35734490b9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.0.0-remove-loop-constraints-eb769cfa878a274fea49681e3fa35c35734490b9_1621308601339_0.6837586441782861","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.5.0-setGlobalQuerySchema-be8cfdd440b903165ed6bfc91802469e7ca42acd":{"name":"@balena/jellyfish-client-sdk","version":"3.5.0-setGlobalQuerySchema-be8cfdd440b903165ed6bfc91802469e7ca42acd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.5.0-setGlobalQuerySchema-be8cfdd440b903165ed6bfc91802469e7ca42acd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3ae0facb04f3fb0a0e117a362abd2769eaef343c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.5.0-setGlobalQuerySchema-be8cfdd440b903165ed6bfc91802469e7ca42acd.tgz","fileCount":39,"integrity":"sha512-ouMQ7CoTzfqECYpY1lhZN8CdUIcraJrmaLG/e4arklTn1WrQqPzqD5QExL6871igXFzGwlSkpinxAt/FyqceSg==","signatures":[{"sig":"MEYCIQCgryfFOvlQQL2oOYm7Rq3P2vfUxUPtdWQlSHWe07uKNgIhAMe164qVwgroVUF7tJx9qbi32ECxhlF6dhOIa/G9gCAk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":262755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgo4kNCRA9TVsSAnZWagAAGk0P/jkPkCfPRvtpz9lCJUaA\nHxCsiyhzJoSwvmR9wLXL5ZNuOt/fC9wZam1onXusIY8sWtACp+x2M7Qn37KK\nOqbpn8LWZ1DMH/OqmFbk0wb3PWsJzFvlMyU6lcQJ9Mv3tPrsbj9FRzWtEB2D\nslkZ9pE/3flL31+MQNJ1snoaMmn0vhcg3A13wAoq0+5nGoVhDkYnV1dlu9l9\n/oUef5OoBm9VYwCkZlN8AlP5Gp0bdo/sTRP0PEDbIPw3nLb6dBFD4ExYajkl\n3Im9IBZGKxDyDKZLdTwr9vEvd0+h+Dzrp5GWQzHf5+Kl/O6YlVVOLfL8mwQ2\n6OZvIe2PvIML5sXc+95+ipp3j9YrxQ7WXueTCjV5cN3ZRhHOoKNJMLY/hIhb\n+C4emlZe//ajcQqBpx4B+h1oH89yGtzMH3kpUuCL8zF2hfai9/h9mc6ZGA8P\npGQ+n8QRvzwB0e6mLaLTPzEgkHSJnoFGCJQK34GdTnLkoY6ZZI2iFk4e25SC\nZOB2ytjpeLnb++GQOxmAaTA5a3Nos5vIIuiSGXiKSwbjUSpsmTFttljagZCO\nn81WCohlKx6Nza8P16tY4Duv7INz4gRQ7MzA3Jso2omNVhk8dOsrQS+P5Q6s\nq9rUjU37mMhXRFguGvZIQ7CG+7rRCH/sunjwsFhf8LMYCOBSYuCvlnVKWE6D\nJei9\r\n=unwd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"be8cfdd440b903165ed6bfc91802469e7ca42acd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","skhema":"^5.3.4","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.34","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.5.0-setGlobalQuerySchema-be8cfdd440b903165ed6bfc91802469e7ca42acd_1621330189282_0.9280166886442385","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.2-renovate-non-major-e685d6d54ad9f5a6d19917a5165fa9b471b0124b":{"name":"@balena/jellyfish-client-sdk","version":"3.4.2-renovate-non-major-e685d6d54ad9f5a6d19917a5165fa9b471b0124b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.2-renovate-non-major-e685d6d54ad9f5a6d19917a5165fa9b471b0124b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"599ae0d5393f48324fd799dd6d01e2eeaec36f6c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.2-renovate-non-major-e685d6d54ad9f5a6d19917a5165fa9b471b0124b.tgz","fileCount":39,"integrity":"sha512-m81IDB1hDFhb+5xAobiP/r5EV5ZJJhNKKxh6rDLDDRTouy9eCyY0zl1PuJAcThHtVfo9/3LFN6RUBvgsrkjHKg==","signatures":[{"sig":"MEQCIBBeC1Bp/lC5AAcnkPq8Dj6ELYJRs5JL3wFsuDrD4/PbAiBWTAEpk03pTug1vTMRlzRYA9Va6/yljZpSrU3K/tR/5Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpAcTCRA9TVsSAnZWagAAC2gQAJimX7fimfAsz0YU7Yn5\nFuj5XkGCQVnkGKTKHT5ZrJLFlaMdEEns64PG+pkPowYO4DgyN+YfNEoEifZO\nhmTXrLOsKwo8v7czUXRqEu3q9o6FXOOdOrnn7WhwMBGkUgGlbqU1iu8Yv2EP\nMk7yaEUgqjf4oGUUSPLtc3krTlG//bz/p/UlmC8gu1ujcNo9HfUVOWIw1Pb1\nRD00izAv0vlIoe/uV80Bcz1Y8ai9WEl1wc4IZ8eFNXJP1WtwlW+sP64zYbcL\nhOTq7QDWqpief1Vl9FWCyclooDmZ5Ig4stul+hoPfHP9hWTBPoOk5I1bICGK\n0DHYhcUSSPpM0rLet0IfrTliKVN5chKRNp/M+OxenD4o8Cm/zzV01f94j3ro\nka74SyNeH7Ua3qHmKdCDZuO0qkKCrimdg3TjAp/WIVNgiHt/ldpMjbiMudvq\nOb3NMBhreKT95BeT3iVimj5DTEXTHJCTrw+hmC/A85SEjHdq5rlZHJcmtbSg\nvQo+qHQ700HJKLX72gGTNW6qwArNX2ZXBgRWSqN6cdPitcTec2Ga8GjmQrOs\n8uI98HsSH3wxKPIGmHaVkP+hKSPwb7+uhX/ptiTpCTXmSYSroZJLDKhc5c7C\ndQC1a9DrWMEfH4Ro8Bimttatf5v7MAOPh8sdodKwT5vOnKMQd3vZHJUBklP9\nlwUq\r\n=QdWi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e685d6d54ad9f5a6d19917a5165fa9b471b0124b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.2-renovate-non-major-e685d6d54ad9f5a6d19917a5165fa9b471b0124b_1621362450776_0.06523023033491149","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.2":{"name":"@balena/jellyfish-client-sdk","version":"3.4.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0806d50213e1f5356e89b8fd99f6d70820c4236a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.2.tgz","fileCount":39,"integrity":"sha512-4Ua7bkSlsk3fcX4IG65S9QjGqcOi3isJJ32TXu76dnp0rrkJJbRZP+uCK9SmXg3kKMz7/tlxEoVHKWnx6KKLYg==","signatures":[{"sig":"MEUCIH8cA5aRCDYTOq8El6Gei3veGXHtLUnLaXJj9XSi35PyAiEAk54AuuFtl6tcFBSdfLqK8EMl3lDoVtBLgYGkhVp1p8c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpAfdCRA9TVsSAnZWagAAdsMP/2iuQR2x468LH5qR2s7z\nu6nM+OGTlksi5APD9a6nJ8GiIHwAqqmr6TnSqT4AHij3aCwsvqJS/NOUEzSe\nKlEFtmSr6hv6y5QTbRtwMkB+g8eMek0YkoaRy/TfqVrAWdROg/h8w+L+EuJ2\nC+O0wIFs6+en8qaq/Vzts1WtyH7fApHGeyB48aUm3+v/YsZyCmDwmSq3pUNh\nSpLss1TuY7uD1Y+65uLOC0hLIq6plow+J63oMlayFlCIATkcwzaG/g2fsJDt\nBylk2OZZTW+4Ph7gGniX8owV85idzdnQgXHLnJMlmKc5KhlfyazcI6cdW2vF\n6X95reO4XhVp+tm/sOq8VZWepFQOkS31gCgV0NfvG0x9Odu7fyWShFvCOSCJ\nPo5cTnqrFitbggAc/+p91/g6e7s0INnDZErMfjyhDdXGgaIjS3WGZbzT7ZbO\nmVPl1Q0GUfn7D2OULbatxNxMpeuXJnNauF13Djdu00T7XUn0Elrr/wsxRChQ\nTbpysQYUMQAfYEIdI/QDl6gj/RPh0HPdvpHq0qS1BPPyFDjd534hfLQITiWn\nU775ZJZ83zd+g9CpZ8yMphglK+6A+aUhPT12R1/S5hWN6d3LFQ1BDGMmxk6y\ne+xWjjAcivkefT+YUfJMrBdoHRg5NnRUdbktAE2basIMDvi6f3TkS1yjWUTB\naKKA\r\n=+ef/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"551b73770e6609965a49f2078aa9eb459bc7ba92","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.2_1621362652900_0.7999796669504011","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"3.4.3-renovate-major-socket-io-packages-87f6e2717bf912a6819e585426e449a1da6d80bb":{"name":"@balena/jellyfish-client-sdk","version":"3.4.3-renovate-major-socket-io-packages-87f6e2717bf912a6819e585426e449a1da6d80bb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@3.4.3-renovate-major-socket-io-packages-87f6e2717bf912a6819e585426e449a1da6d80bb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9f84c8925bdebd2bdf646d285c454fb6ab39b8b6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-3.4.3-renovate-major-socket-io-packages-87f6e2717bf912a6819e585426e449a1da6d80bb.tgz","fileCount":39,"integrity":"sha512-xLzw7B6HBsKu7g/hcrq6ib/v0A1IS9436ApdWFSg6Ou2o8eUZTtWxoPdfTp+XnYL6WZz0GuTssDh38+5tr84dQ==","signatures":[{"sig":"MEUCIQDsZTtFZdQEiuMRA+sM/Op3kZDSs2bP75S4KMfTBxbJMwIgZFmTpTx5HWnH4aq7/UyELki6/OacvyU+Dk2FCzs4x5U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpAkkCRA9TVsSAnZWagAAOhEP/A5y8x/AWSThb7a95QOG\nKutS39ff1CdUGuVyXgbcqQZHDAnL1GUh+2IgOM2ZUIYZxgIBCk63APESkYRu\nlnRKtKp/14J46lNtsE//6GuLAJjCrVXJHNApjaBhU9HsxhdTsGXYXWjkrBWZ\nZF+m+rs6V5zD6qzJxYnLB28TgBuzv7ZLigTkfCPrlYvf87H2BbOAiSF3hTOT\nY9wVoZ1pGdyy2i3mZDsHasKTd0vkCkjc/2EqrIGBvq9aoCs0TTGSfJForSC+\noSYP8LlaEf153pLKX6XxGUMxmTBpZzRDxNK7jDGR6h6iA9Yc743R2Xd+hfYL\nAFubNO0Rr06zZAxx0hoizA7zWMT/8Yt1eBw4mAVpUuIxyYJfYpxSkG4DHTu5\n1LlIEC2sLh2Mw5VhXAxGfrrb5ImHM/OdRWIzhxfFVYo/YvLu51ZhqElwU0GW\nY4TxI6wma5zklAkmPOEpRLRR8qVCofpu+ePxEHT3/az1qtvJBpx2ae4pzbFV\nW9jR3iuNq0/m3MAnIPVnDalVg9/q+LUYFXMwePk8pMCDy9UdPqW1915Cyooz\ntq+1Fn1eNq61QT1tSSNDio6maJqC17CUktHMxwxOx/zjttv2Dh7Vlu5Yquxi\nl2EmHOvF+W49XJNTDrPq1YpY15O8WAa66XcaV5BsSzmvd+MgVO+dlxi8t9YL\nSWnn\r\n=XI2E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"87f6e2717bf912a6819e585426e449a1da6d80bb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_3.4.3-renovate-major-socket-io-packages-87f6e2717bf912a6819e585426e449a1da6d80bb_1621362979946_0.24634104988987438","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.0.0-remove-loop-constraints-d6a012e749a2ee82c5d6ed61d1456e46849560e7":{"name":"@balena/jellyfish-client-sdk","version":"4.0.0-remove-loop-constraints-d6a012e749a2ee82c5d6ed61d1456e46849560e7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.0.0-remove-loop-constraints-d6a012e749a2ee82c5d6ed61d1456e46849560e7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"35952421e08e0b10ddfe9089f030aef2462f0667","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.0.0-remove-loop-constraints-d6a012e749a2ee82c5d6ed61d1456e46849560e7.tgz","fileCount":39,"integrity":"sha512-Km8+m2yuA52kO2pDMlPh/fHGf9XQae7aLAoO9adrb5A7CTJIGhr2lrXWzCWm934HLZgbCc5iLF1tTS3bt2VnUw==","signatures":[{"sig":"MEYCIQDt493tK/a8GsbNPciJlOD0Io++tka5la1Z0MLzLc6CcwIhAKyMytddgsnOQBJIzW9ERN4mhPwaYIKfLbXo2V5Sgwi9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":248005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpE8KCRA9TVsSAnZWagAAugIP/0LSwIVo4w2lp+814LLP\nL3eJfiNKbr4sExUa8q+QIPLFxTqIJf+YYevemYh8akEBRyOueeeAqzs1FW9N\nU4Lf82G8gG3Cl+/6DBVdBChpgN7uhTJVKWqa5KIzCmqoEk1xewLRYiSsCGRq\nH6l2yV5NVHWaHq9sci3ZuT9N3DqAMIhRb6sTWtd/7On2wLdYujXN6t8nhWZg\nNPmKYn90vRBUDwWGbtE36N18d0b6x19qG2ziG4wqtE7PLpnHBCY9kRBczbq1\nglodTqK5YbI0DppPDvTGpaPWwixAKn45QaDWOD2Gghua+zoHFHOw14O4hR1V\nRdNI8WACf8XXcOHMTefU2UaZfMsqfWobdR+JCufiQs+A1zMuna0jWgZU3k1a\nnp5LbgIC3+a2xhzU6gkY2mnNtC61d+syXTGYIDbq15V0+2FnWGik9trzGDev\nL5O7wQCwoCOOKBwuCnE1C4m9aRC+Phl+VxpXDxko+nNtg9GZ7eAYxCu4Z1p4\n8f/G1z/wYQ6nVSPteRGHP5xC5j7x1gLQEtyBpu5Z7O1wcKmeh/iphHr5y5qw\ns9fwLVx5qNO9horxWOGXSb9pCEMW58y0r/gJHeawcjWqGDGaF4Lanyu2AFZd\nX2Yu6mdiQz6oo7sX/s4dqRQJQv8yQRf4EzzN9M9DiMy+Sej7BDCnroThlqj8\ntyP8\r\n=UYEh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d6a012e749a2ee82c5d6ed61d1456e46849560e7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.0.0-remove-loop-constraints-d6a012e749a2ee82c5d6ed61d1456e46849560e7_1621380873726_0.1740814472245351","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.0.0":{"name":"@balena/jellyfish-client-sdk","version":"4.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"29fd5eca5fa30642718ca17cfbfc6358dcacb78b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.0.0.tgz","fileCount":39,"integrity":"sha512-ofZihRDKKwZSqQdbDF928kskaFsRVJcdWlfXYfzuBM9I4toxAWJkOoPgx+Gl1FD4A3gaE4fSIUJ+k0PerM8crA==","signatures":[{"sig":"MEYCIQCpARBZRE7qVG6zRJcEFiGC2wnyQftDGmVK0jTiUKc27wIhANjsK9Vvh7tRv9hkCPWammvxHwnQfLAInMzuj7orP135","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":247940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpE/dCRA9TVsSAnZWagAAh5UQAI1E83sUWZX+Veg+dilK\nSvXpMX2DkwBExSDDtci+MNRvLuPOQ+3HlNivGLLJxU9/dkziVWFmDRnN6luO\n27F0VyITXciS0Qk0D0z92KetGDE6/jT7f5qfN0bRXaJHe49CO1K8b6Q7FeeW\niafnpTWH68TanOnC/qf+gO1tWqITVd3Igt6S4INq0XlwRPtGl+j8aDm3MFI5\nN9EDphTE6/zNsvbYx7iOUcQcsy3XfXwtdOdalBD08QnLlM5k4LduTHHAKtpQ\nhi+8VDmfoLZgOspjQtFpA0Te16n7UcUF0vo2D5tXmNKL31kJLc5e71Ovdqqb\nJy17AOk0p/1+Q5qZ6vqkNIXxZtgd0c9ByQ93pHfSFVGc3f47Cuz6LUuveAl3\niyvcPDJZaBXakSRiW8a6F0EtRMPcaHHhSuWOltm0vvantUDgYd+q4PFiKN+0\nUbM/r+6FrnRqlbTXT0gtMlsruntf/LyBGBnYlk7X1kgkVkqb+Lan2qhtSNN4\nwIyd+2bGM6+Mz3uaMAo5XzgPzqkcoe0yrzkZR+tK4LMq9oR6qxeP01RYjTIE\nVmHViZbUKz41UcBoHYRKTaaxlt5qTtknvX+gdNaehn9TouzajcQ1KtfFMBWb\nbLtEPW8oXTJ2tpQ6jGiq9X0oZ7qYj1IVQWyKvu0vr/aQXl1xoU+zvZCu///q\n38pN\r\n=yn/G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"66c0d250e7c88a7f22b14f7cfcf4a2b41666545e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.0.0_1621381085004_0.6906190642122627","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.0.1-renovate-major-socket-io-packages-cc26c4da75551dc305e0b31a38d75b1e43d70da3":{"name":"@balena/jellyfish-client-sdk","version":"4.0.1-renovate-major-socket-io-packages-cc26c4da75551dc305e0b31a38d75b1e43d70da3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.0.1-renovate-major-socket-io-packages-cc26c4da75551dc305e0b31a38d75b1e43d70da3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4f2a81e50efb587a77eb099379f45bf42d85819c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.0.1-renovate-major-socket-io-packages-cc26c4da75551dc305e0b31a38d75b1e43d70da3.tgz","fileCount":39,"integrity":"sha512-1uJnklNBBfNCvmdQqujGjavWkOiunMKevW2x2h8txx2SxnozF3iQkYRJ0iWGfa62gAkEWUfzSjX0VfRJ4vkceQ==","signatures":[{"sig":"MEUCIDaKsZcR6C+2F81ymHuvUpsoz7/CQqwCVwJ24pN1RsERAiEAu8WPsSRGb5RaYvlTySMJIwShrMc9xiKAUfnPZj6GKwY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":248104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpFFGCRA9TVsSAnZWagAA+R8P/R21qhT2QPm9YUC2pBM7\n5m8Zng/PG1mQ71XUtvsUgInEiYm0x+zdchl12eBT2hXLH5LcAlBngOZnThyX\n02VYjEIBALy0i9nfgc2svtExjiwDB531lDil57TSyZ6MJ+pTMKhFJF9xBLm7\nqPWpQeGIomPrAStSEy26Ml+xoCXcRF/Yd+yS3Tcj3N0Ezrporybu840bBz2W\nxxRb2Oj8rSZtWn+avGr9PQY+SxwF6QI2prAkVaBNr1wl7cYE1j8ZS70gXQZd\nSnQaTqFxB8Cfxt85Z6/aqSkVoet+SyFdsYq7PZShqAnxfgxMObBJiGA6NNbi\nKz95muf1uXmzz3DPFtpO0ypoq/kLdGx9ZOxJcReXjH6nSn7GMrnv1xdBkT+B\ngHDQGgjjP07p7u9gF0VRZiEMjtfgOD9/xjYU/unKRr4q4YByHFLOurbaV+3h\nbxOi2sX0AHeQ9irpjtxefQqQBhBN5uoqg+IRo6aiE7WNKSxz0o9VFygWxwvC\nkslvQg/8pczZU+6XA+XDqb9axuj+Qeb8Y5L9x2Mr7PK4yaw7HPlP++zFy8uT\ndpzVda9r/7i9JwaceHjSELkn/uLd6Xw9GKseC3EAb27X4e6FTnCU0dOLTKZx\ny1aHG/jlnLIEnO17Je58hUHlVYrCxYX5DJPkbASe0jrUAqEtq4iv6oRrkbBz\nLM12\r\n=luf/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cc26c4da75551dc305e0b31a38d75b1e43d70da3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.0.1-renovate-major-socket-io-packages-cc26c4da75551dc305e0b31a38d75b1e43d70da3_1621381445744_0.13263177915940227","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.1.0-add-more-link-constraints-360ec164caa926fde09c6d28006725ffd2c56e2c":{"name":"@balena/jellyfish-client-sdk","version":"4.1.0-add-more-link-constraints-360ec164caa926fde09c6d28006725ffd2c56e2c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.1.0-add-more-link-constraints-360ec164caa926fde09c6d28006725ffd2c56e2c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"916d25e0200511cdb25b647468317358f850ef11","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.1.0-add-more-link-constraints-360ec164caa926fde09c6d28006725ffd2c56e2c.tgz","fileCount":39,"integrity":"sha512-eMm1rrR6oHY9IdJQttRQXK2K1WuzoBjgc4dGpR/b6JYD8Ibup6nSkIJFmTXLxM+gNAb7mHD1lnYkwXS4jgsfQw==","signatures":[{"sig":"MEQCIAQwJ4nBtUoZRBntKt6HxB/jehWnMVf6UlpS0jficgRdAiAC4mkusjwbtLbPNgn+/0eqgbNHMrJJ7v+FhWMThDqMwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":251055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpebmCRA9TVsSAnZWagAAtBoP/2XGE/oHv1QYbM7rd9rR\n9H58d/9e7PqONYsnGbl9YIdRODniWkmY4r8KnFjWoUJw4xbcwZ2A5iekesjL\nKfa3BiU8mZW1L22egFob8mjiOfOjXGbZ5LTsVG10GdyBv2nVhpO+lq9gyPBo\nJzKQT1fZX2wcL2di0U+z8sDpC0ZLp/TOV0U0NmK4OM9sKEG4WLtMQzXsWSjH\nH3ldVzx5wtvst+i8OJlBWqY4dcafM6dH7q6DlxovBN7ezTkO0mtbjKlU5gBY\n3syLs6d0bCnxu3+7gXTsN4rGgbGt1Y6e+e21BbEF8OBx/VGZEdNChAOB4oxO\nf0cKGVwxoEzMUgmMtGrCQrlDTrWx3DGYxfAhUIBJ87/PivFYUxiiG/DCOrjx\nRz3CtbB2stuS9SobCQBbIiH54ZEB574cT3ruKDleyzY6Dk7e3O3LWMeDgw3h\nSuv0o6hupXRkoa5FmBz0DlBv7FFr0QuPrT5wC2FenYc8KGVuBs8lqB8ZGUAU\nVwwKXTCSOt5MxVARCt7CUca5Kg6z6kL0qgkzrHRNcwbRod9Ib1LgOpBgACUF\n0r+wObNfCevh8/OMBgx+xxLaPsrMAa9/cEfi4VTGyTilyzxHWD86hJJ5TiN5\nFZBLS+d85p9AoZjf/CNHEKl6w6bRI6SiD4Lnw2yx9D/pG1o91RqTpYqCxAZx\nF2Pk\r\n=+4Sz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"360ec164caa926fde09c6d28006725ffd2c56e2c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.1.0-add-more-link-constraints-360ec164caa926fde09c6d28006725ffd2c56e2c_1621485286503_0.3048720074301121","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.1.0":{"name":"@balena/jellyfish-client-sdk","version":"4.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.1.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1e938c107d009fed3d8b7cb4fc019b3ff8ced85d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.1.0.tgz","fileCount":39,"integrity":"sha512-MFN5t8zEcIOy/5Xwc4lO5nknRXZTvWtmelFB4lf5Fp091GGlGNn2vMHG5f10ITfA8YTfEKN1x+ktTtrZoEszUg==","signatures":[{"sig":"MEQCIFlDv7UnacOcPC5Y/OjLYq8Dh2qk3sUI3nTZUrv2W6abAiAHeMy1kmZKub7JmCj0bbkKl7XjGRp9aP12oA0WfpoF+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpenqCRA9TVsSAnZWagAAAFQP/RNYzK5BY84QZWXlprgy\nzDEXRQVjI03WIhq2WQIz4YEsyG3sWd7paoQXS7i4r9S7uyZJp+4e8rSiDYjP\n6ipnoEuy8CIB45p6+3GxIAFPF24H5UA4dB6xc9E8sucGT81CRRCHCUH+gf3c\n+PdZ11lLcerhbcJa+QUxrzogY90p2cUscyIT1kXCFqtSwjZ1/oBYuRu6mMGu\nAvgkG/20JMBtwGVmeIc7nNm6/maOpfSjI/8PKTVlUW+Ymw1nBFypqWN600PL\nJWpDZsjxW3PYdFUEvIoP1Gebm65MgiVPwAA2hrg/eGKxSJtQQmEBMSPNs2rk\nYDEnHYkOzuiJkDveJDpD3+gXnCeHIp/X9a1SKJuFN5iu+Jqz/8sm4xmiPQm9\nndMS8QCY0jUiJ0Xzm+fYFCPBzkvEEEh0oVoI/z88z8XlwLrvFF3VP9fJ/snL\nck1D/dw3JkMvwxlLifc96nXISdMuOcdoajfAb8dX024UI4BUz61TZAEzCr2M\nxm7L2/2KIHOsw+mwyxHUHdJ+sPqGNvftHD4k5Q+5bxsyxKobktP8gkmqZsMG\nzQouS1mYH/Rxx8v43nzmgl1p7JkT6vWWnDSovapLesM3zdxcb+gheXyzhPb7\nNgOZVlKF3PGceARjZHIFndVq2uEJ414QEmK3VnzLw4OD6q8Besr7clGSlnTC\nX3Bl\r\n=lBVi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"81a31f11682fc9c5020df3203696cc965d9e1cfc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.1.0_1621486058165_0.9458227987146206","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.2.0-add-user-improvement-roles-88cbc5863a59bc2ad5d0a71a2849c1525a1f51be":{"name":"@balena/jellyfish-client-sdk","version":"4.2.0-add-user-improvement-roles-88cbc5863a59bc2ad5d0a71a2849c1525a1f51be","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.2.0-add-user-improvement-roles-88cbc5863a59bc2ad5d0a71a2849c1525a1f51be","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c362369e01511660281e4fe67018d8f5834df9ac","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.2.0-add-user-improvement-roles-88cbc5863a59bc2ad5d0a71a2849c1525a1f51be.tgz","fileCount":39,"integrity":"sha512-oY3yr3uyyet61OMno0BKmdGNdnFfD1zeHgAGcT7k18YTuDGq71kcecFkARZnCIP625jOJUl6YurnjAjumAan5g==","signatures":[{"sig":"MEQCIE++sPX4C26WVprp6603JL3lpRz8TJPk5+IRiZowaTtOAiAS1tqGA4U+axOaVruQHW9E4cbPTrAI9MGwmNfXQegKWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpgllCRA9TVsSAnZWagAAeFcP/RDN/dHd1ItPMPibdNUv\ncEnmR0YAmJ+kUoxW4/xiEkBU0MTbcLyZq7k+kMgzrRwnKvfMWekL1FF9BW9H\n2pv4FQoYFtcH0lps4+59nchjCxTi+myQF/VZHuwW8BnzxY/EVBNF1zIlTVgS\nL/QfNeb1yhC3lh7V8IejlA0qUCMPc6d0ytRqkAbhihL/esmv0ys+rL592iDn\n3c1AZWpY4HhZz3JBgS8Ucf0nksNZmWzcq6N2f0zZxU24fOMejENFstogNnGD\n04J4A/BtIFORjHN7XoqEv90Xa+Mh9/RVqDRLjVaHJ7t9YXNTycHyPua0UoPV\nf2P3xl/jPXvoOOGhKj++K1V3bUZL7KFPg598FcTYqhVRBbw7CUzQmAQUxnhQ\ncBmkdqAtDOMAccuVtP4FMBQtYhPKxpGalR2eEf0NA5RD1elnU/PzPMMiy6xf\narkzXlHlhHIXMjs5IZHkx4Vy/UKyhOs9ufyLLB2WoppsQVmgcnvjeXM2pl3b\nGvUv85q0o3CcmPHOUCXqmHYiu0M0KNodRKkEpTnthyQU/B6b20spTXJXZsVx\ngRoQztJ4lr1TK9P925v5/SfaJrEY1cMeas9RT/j0IQLZhlvkHQowq2Rv+Qt6\ngf7SxonCvJPMCQTsDJ2eeWHt4JijHZd7HTWZIcRVHEBW2RJcD4lQWKwpOyGG\nf4Pn\r\n=lxqV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"88cbc5863a59bc2ad5d0a71a2849c1525a1f51be","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.2.0-add-user-improvement-roles-88cbc5863a59bc2ad5d0a71a2849c1525a1f51be_1621494117045_0.7970947483214825","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.2.0-add-user-improvement-roles-c8b2f3350de17c5902f5d10886388ed3feea80ca":{"name":"@balena/jellyfish-client-sdk","version":"4.2.0-add-user-improvement-roles-c8b2f3350de17c5902f5d10886388ed3feea80ca","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.2.0-add-user-improvement-roles-c8b2f3350de17c5902f5d10886388ed3feea80ca","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"221a115d55c63dce8d185e6eff8beac7669cdb30","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.2.0-add-user-improvement-roles-c8b2f3350de17c5902f5d10886388ed3feea80ca.tgz","fileCount":39,"integrity":"sha512-K4ucsxaT2srsLp3Xuc8yTdL8xg9oM0ca0bfdHDoBss/lgpDD88oxm4Fvh9GwOTHnfjDIISdVdMX6ssqjLCyolg==","signatures":[{"sig":"MEUCICs0acsvMe8trrlMNTrjcjwhBJUAePQvG+m31nLKSKuGAiEA2gva9ZBP3xSjoHRVMrKBAwIQEmgIU5Sq869FMbELBho=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpg7ICRA9TVsSAnZWagAAcuUP/2DkftkoW9mfE6e+OD22\n8cBDLE1Ey0K2b5hAug1sWOMdqFJo8L0OXhK1eScmEnihsOZ9qDUMLlRASWCS\n45elY+YbPOjyST1N/1tQitDI8JvJVgaZKK6rnlplKz7yVKRukjnjth8a6Tjk\neH+QzMTWxy++uaTmpy3SEJN1dvyDBRXnb7dGLt0F0CaMCUnl6axSj0S2MS22\n3tFVn/WVQPDks/YhxMpZcrVsslBqmbgiKi5R4cINTIk623M+Vr/9/cNCycns\nSB9eW17rMqGoBlSlAj4ToJ8I/lvTEu+t5gb6lOSvYltslGcmTwedppxE5BvY\nLdFQVkT8UlzK97zK5VUEilzv3hyRm5C+Zpdb1ovwpG5p/7BnUCnqE/Bf6n80\njQXjatcdwT49gfD3NgH0k5pAd96Lt9RycCZpzhhM8cZgtTOd3lozSIwktxHZ\nHRgKjdJrVjld3XV9hwZp7kNy61BnZomRLEcz6VH8GqUxf1XXFm60CXo1RUr3\nLQy1QagGMXQrs3UbHDJTizEKkUT53uwX0CwbUdSHfYBwAcFH0Qq3kwdak8em\nKWLFuZM8uJy1qfz6lR7wMPZcvErnBw9/mplK6k347TjPu9SyZ2EjQNwHq2xQ\n7WqS9v7pdIkOd6najLdvVSBPPROKh6NylucrCcCiqv0W4QN/pl6CSQKzrpfI\navNx\r\n=twkz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c8b2f3350de17c5902f5d10886388ed3feea80ca","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.2.0-add-user-improvement-roles-c8b2f3350de17c5902f5d10886388ed3feea80ca_1621495496001_0.026393554181327605","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.2.0-remove-outdated-link-3ff55d4b3674305dda6f18c493e8424876e28584":{"name":"@balena/jellyfish-client-sdk","version":"4.2.0-remove-outdated-link-3ff55d4b3674305dda6f18c493e8424876e28584","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.2.0-remove-outdated-link-3ff55d4b3674305dda6f18c493e8424876e28584","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"10f292884255f5b52bba500026d79f4f0c96afd9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.2.0-remove-outdated-link-3ff55d4b3674305dda6f18c493e8424876e28584.tgz","fileCount":39,"integrity":"sha512-mBiqrvvr8jQ2fHL7sBAeX+NzOFBfUAkr8CgJGAwHld2Alpux1M49CCoawnUhZPlFdoq6C2OatKuR1BIErUbQhQ==","signatures":[{"sig":"MEUCIQDu+MB8qWD5hWqUot8i/cXPtDa4lIjgKF1Qsyik1kPeywIgLi0gzJAW88OJfSLvSkqV0HYY1F9KnbdJYnM8QUJquHk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":250120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphI1CRA9TVsSAnZWagAAM4AP/2+WYGFHHUbiUaH0y1ED\n0hWH7g0/vi7Bk6qlanaR5B1C7rDMzYerp/tLfvIWflzg2D4BbLcJYidjrCLF\nhpiiOCcrEit/24kg8bnLC8u/GmeV8Dothxn8cges1WFz4ejcArbGb+2WU3wX\nDG/athmueF8RReuN60Rz4TWHDzN6Ixb/t2ogtXMnQtq8bpNzgoEiPCko1hNg\nbvReSIFvEDiyMyNHs20uK34N28uvwkinYK9SDjj06mWK50drnmNhb8PM2XVZ\nY6AKCSqCHjY96fAQOyO84MvmnFoblhs9bMPDOiw9zTJbgaYP1nVzAsXLa4Sa\n1tgKh534ekD/cG9YEOHAWj31pocZWJgtrJikMyE/REQj+dJdLnf6bynSmtH6\nBQlgTlqRzrojnZ2mZUX6ol9cO4rgPewdV/EVj9VPyiJ8oLQlH4Ru+JiG1yAH\noiqVSGp/4wCXqSFwBF/gNMIS5ixlOHxxpC+kGaOE9wplcI/WP5JYTuoY0jzk\nlNO2hutyan4gkcscqMHkF7gfAk0Q3jYXiRZN1YiR53fqao7F49PJOYp4cqcR\nsfpQsfKCRwrCQxfmKKFPMoKVgD1Fr2u7PlgQgL/o4o+fYxOVvPBr0qiMkcng\n9D6iCNciJvh000aB4n4WIiHcm7z5fxKAflAUO5SmOGYkbZsxbI2tsmbClZST\n8v41\r\n=1cMa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3ff55d4b3674305dda6f18c493e8424876e28584","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.2.0-remove-outdated-link-3ff55d4b3674305dda6f18c493e8424876e28584_1621496372613_0.4633690750443231","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.2.0":{"name":"@balena/jellyfish-client-sdk","version":"4.2.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.2.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c892ba2be35217960f066044330d11027576c0c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.2.0.tgz","fileCount":39,"integrity":"sha512-qA9JeOvkeUBqHxoDALzl7eI7zCXrNYBE97XzDO+9S6xOyQH7Ll5uBGPlKkSlULMpb4XjvFpeClJjE6mwpmOTVQ==","signatures":[{"sig":"MEQCIGujVWqzzsGhy8cUDpfMrWnfkouE4hnBBOr/4pkKPvTDAiBD3Q+jXdi561AsJ94Pub78MIWe0NKLwv7U0bMNwOJnSw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphK0CRA9TVsSAnZWagAAnBcP/RXEFjvLiWLoyhOAmJGB\nmXiLU/CXxHtTxRTM55Nla99iE2hG5tdj22LW4C6LPd3P8YvMHzmLuqNsgDNe\nqbWRiDWrhAaxk3WtVQDCBohBjW/Po+rhueRTbhGFNz8nOAziLBSuX+lLEJRo\n02m2P/8SiayCtdf32I5urNg6keWr+4KuQqFF3vY60tvL0xUrIQ/3Jk3MvOKr\noYnqRqvsxJycOBi8WkTMvB9VDIk2opWEgeoDbUI6HCYpBcd1lE68BPoXpK5t\nYwucRBjVBdZYfvZjnmtTP2vwOr26M/ba9ma1gVEQcn/fksRD2IQO0NRAWMJi\nJVFnGyZbRXxxsncCozVxmzHeVUpBXehYqLF1FEylCOP+da87lKfxW25+qXf3\nCdqxnmJosNhIZ8Wwkzh+YxI1bHun84zeCHODZaRSY1ihMaTD1DxuP0a8rk7g\nN9xi0/CL9iGlmRkWKwxCU+J8WuR7SGouwQAbsvIaENZltj3y0Wz2Fw+yHcTS\nvZjoIpAETq40WDrM4puqENCKNWOHy7qamIM0+XrowMvo1c8pQOxg53Mf8X5x\ncBcSUbjYvCPeIx7MKwJUzdy4577IZiJlCwI68oCbnF/tVAtEasgTgLZsPlAn\nCcvmkhJ0dFjx3A7p9V345rjDY21QGLf/Q3ybilCOa6kBixveYBOD2vxa2jJB\nckyC\r\n=jiHY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7cc78ef671d6fc02ab405b0c8d6fb46ad5ea5267","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.2.0_1621496499966_0.8752591909233873","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.3.0-remove-outdated-link-657577f27c32f5f2124e5374b32c4ac07be84aaa":{"name":"@balena/jellyfish-client-sdk","version":"4.3.0-remove-outdated-link-657577f27c32f5f2124e5374b32c4ac07be84aaa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.3.0-remove-outdated-link-657577f27c32f5f2124e5374b32c4ac07be84aaa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7235622d222a86144d9814cf5830a9ed334f9e79","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.3.0-remove-outdated-link-657577f27c32f5f2124e5374b32c4ac07be84aaa.tgz","fileCount":39,"integrity":"sha512-VwVyxnTmP8zsDSw6XYdNxB17VVAReOCSpa6kJBu+YUmPCxVafzExFJkirrhcDk4Dnl2Ow1CBsfI9SLLK0JuV3w==","signatures":[{"sig":"MEYCIQCz0EP9o5ZB8oyniOWMDRiDAMnZITGQvjg1HZPgVHuS8QIhAIGUP4ByEpq8NY3kM3+7X/W/b/EiHomck/K0ZcWaHH7f","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphRGCRA9TVsSAnZWagAAFEcP/1LmtWpAbz7U8RkX0E2r\nEo0v8Ja9LKClS4N77yCXYP7vBZ3Ibeplmw9+b9FS+TPiEcUJCVFCm9bhOBFU\niPE7BjjLxxsFBZKF/UGcGDTFXJ1nOYAQ81LSJ1G2vZ9xIrB4nd0DZNOeUtXA\nelvPQTHwY85AEm6hwF8LdKTWuQB4cN3IpVVsqrd/HGrtP9XYNpOxfz8scVFA\nf4hubXSyYT2NsE51fPMu3RvC3pOqmwxnLIm1DvrRxKM3H6u7jCMRXGPq9CYp\nlIMYsLMyZfhgPZ7DVfUOzp7ngMLeonClgoOxDmJiu4MWWx+eDqv82dgTVN1n\nisUh+Lq773HdMetoQF6t/HkCzQAwqEEpns7v/N9wdD4o3wXy0R7I2z0tiVcV\nn7vCLZ091VdzOj7Sli5qyAIt54Bk1ji2bIm9YfMwW2MPtK6rtf43NkDSaqEx\nUTXK+DOUgcypC1bil+HlHFjBuz8NpbDm+qGjFiSJhBBYIQbphbNbpw6TNJJd\nL957uUzzbuGsdIv1Hqlw50gdDwaUyfrU1Pu/3DL8PGcv7UxxicLMRC92eRUd\ns4Pa0TdfwcXGhWSzxtClCHSITrbcXfgomWMntNu5AP5hMGxl3pCa06D4jCVQ\nJXJQMDxiMZy6BeA+qMj+x+zTLPyGJ9I6Hf2I9wKJWdYBs2HOzfUtftSovjzp\nOUQl\r\n=KrDW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"657577f27c32f5f2124e5374b32c4ac07be84aaa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.3.0-remove-outdated-link-657577f27c32f5f2124e5374b32c4ac07be84aaa_1621496901798_0.4205780707964739","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.3.0-rmorillo24-minor-relatedpatterns-d4f3e6f1d3c99ae6c0cad9d0e2bcbcc0034f70ef":{"name":"@balena/jellyfish-client-sdk","version":"4.3.0-rmorillo24-minor-relatedpatterns-d4f3e6f1d3c99ae6c0cad9d0e2bcbcc0034f70ef","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.3.0-rmorillo24-minor-relatedpatterns-d4f3e6f1d3c99ae6c0cad9d0e2bcbcc0034f70ef","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b699ea7d6c7237195fbf8db056f22dd0ffc7224a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.3.0-rmorillo24-minor-relatedpatterns-d4f3e6f1d3c99ae6c0cad9d0e2bcbcc0034f70ef.tgz","fileCount":39,"integrity":"sha512-j9kNRf56tPpTbl8KlbPDe0IKmsmnyhe7SaER8vjc9PPU/LADyC+uigy0DznH40QcNBN15wTEw1oEB4mjUbDQYA==","signatures":[{"sig":"MEUCIQD9DryMY0hqHr0QDarTHxLr3Rk2DypOfGgwKOC2fJMmigIgcGhgOyQQvig7E1o7rBi01p3jkpLF4ENkh+G7HNN5Kug=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphScCRA9TVsSAnZWagAAfxYQAIaBJsEwxDZjA7sm4bt/\n2Gzx5JdYs3XP4WObmb5Y5oZW5hPY9p6Mmp5zjulCis2R+Q/C9MmEGMbI+JNH\nYSLt54uIG5b2Iak34gElmX03V0dy3D1po1XvULyimNZQCoqJWoUy2o/jwnT5\n3uAlbDKpMGXqMNo87eoGTwbcVbtXGGoucLuFKDT66Jf5nzeVdou1GmhIuJ0c\nyQHCFNvAFajImBaWk3N55Cn0LIK/2BGQnAAxnPnVJis1eDUIpGc2hBjBXJ1Z\nJPKI+0b3pTL0ZlBHVUwm4e11f8pF8H7gNpGgHplla5U2lRSMolLocfbnSA5T\nleCW+DQUyn5H60V8XZcaNiFFMJX99LNbShma/imGATMAgOpB3ByuEFxBgfli\nhvnMLGWc8WsE/ZiZRPNSrhla0eUO2j+eZ0vpqyWz8ycRExrLb7U3QkS0B0OR\nU+fbbq3EYTgN1JgIj/ukOjyGnyBrklhp7m+imRuGVtevHInILvNPqlJVQleC\nFSnfoN9aylsoOwg3N25A/r8nb/zv1PezbBqnXI19IqOeQgATeY/8chvjTM6h\n/bYi5NcNLM46Q/1jb7n3rFE3cSex8VB8mTZibxHW7JI9nfC+CZ2BYbj+cj8s\n/kgu4QWX4cRRrb8LS3CIZokSByZsoy2f7sSUSGFU9wiWDZtNQ0LReWuvyAvE\n5x9z\r\n=V6fS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d4f3e6f1d3c99ae6c0cad9d0e2bcbcc0034f70ef","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.3.0-rmorillo24-minor-relatedpatterns-d4f3e6f1d3c99ae6c0cad9d0e2bcbcc0034f70ef_1621496988271_0.6862044801338212","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.3.0":{"name":"@balena/jellyfish-client-sdk","version":"4.3.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.3.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"707fd409567e9dc054853b602ed1b2cc8a7f20f2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.3.0.tgz","fileCount":39,"integrity":"sha512-wIEFjYcFMG6sVJKXyPlH5/vt+MRmcBGjMP7O65Pj9i3HJBEanz/ydmA0Uy0zs/3TIh40qL3hhvyHpt2L3Mb3Eg==","signatures":[{"sig":"MEYCIQDHOJkHVmgtqpzcPAIYBMtWnUwmxcKDbw6kYTt3Xecx8gIhAKz4geoPBNQX3fOPzl/zVo8usM8Z/5X6NDiPRxXl7X0Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphURCRA9TVsSAnZWagAA4a0P+wdby87SYmbPoxyo1d0S\nMbcZqW4MgwD6cB9q71jCk96982oHQItenJf45un7s0BC46ojPf9P6pX4eeAH\nckZOjanM31COBVT3Pmsr/20UfOPEjv7GFfqKwbAB+TuLyWtQkJWIdb8kBeQ/\nWzkwjnJJs7qnEaIrlNuMB2pxAx8hY86ogRCIStdP/3oeNd5PitZzkptcl81R\nXooKtuhcOM4wd1r5Llzv1c6W1CCT7rxfXVJVq1dUzz7Ai5rYhmf/gPJ2MHH4\nkrRQS6TKsO4Ywh1Cn/q3hFvOSQKRJUXYRmrh0jnnQD8nUfJOD3AFNISgzaDQ\ngAqURep8SdoBfwcojpQ3bXkiLbmG1MZaTbr38F2q26tu+ogyY7KwTTA+1jt6\nGw1zyXkiZAcmFVj5i+Ic1M4fGevlz9Zux9Jdr1jqyAyHK/E6JlT6BZGDVNjP\nwOKtY+WZzL7dTHVkTkqVwyLVf6/ueQZBTn/QKTHk+bM2c2PBOrgNKj+PzOYP\n2e85S2KzBQI6beo6Duc34NbQFZ3/PTLEYEB1i0hP4k8oqlJkmEcaZLLBlPRs\nuKXyOlf6MWMtVaAcXQN1yM/vbWT3mpmM33D5bXuYJCjfB5lO0p6176pNGzht\nnwU8CPnA7CIXyCNV6JZQVdzHmHuQXlhextjhIzSHfRNIIUFEBVe2fUlgqjqL\nWqIQ\r\n=jZdg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6f09abcabb3c7480798569e93b7fa4a052dd8828","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.3.0_1621497104881_0.6373287819977722","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.0-rmorillo24-minor-relatedpatterns-12efe92e4ab182c6b1ce58d97866b278fbe8418e":{"name":"@balena/jellyfish-client-sdk","version":"4.4.0-rmorillo24-minor-relatedpatterns-12efe92e4ab182c6b1ce58d97866b278fbe8418e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.0-rmorillo24-minor-relatedpatterns-12efe92e4ab182c6b1ce58d97866b278fbe8418e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9212cb3f0385f230fc72e1232c61e2b051afc5f8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.0-rmorillo24-minor-relatedpatterns-12efe92e4ab182c6b1ce58d97866b278fbe8418e.tgz","fileCount":39,"integrity":"sha512-ZhB4ZGGTtpdtJ51qeH16zHCeQ2yk5HC8+rf2DZ1UAVyH0tCrKsvXhPTt8wZCTCNOpBf15Pmn1nGUXb/R6kQugA==","signatures":[{"sig":"MEUCIQCUh1ETynhgmZ5wJePIi/ZhYIeuKDCOhyBY2XK/TfhWBgIgXZumv+XhUPxudoMQIYHEI2+PBJEI3LEhPdTu6rqm2JI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphZ9CRA9TVsSAnZWagAAgoIP/jxwxa5VtAaoPbS37tJC\nNsebuq7q7lQnY8KD4Ng99Mw1MMe4I7HKGN5AFSFNP5XaFY2FI+x85vaK3XyU\nmxYfKV2ipCrHuQFqXE36yz4gYFmKmUSGn3NL1sNWsCBC6xdGZWfeudHXzprf\nhfC5LQJSQDVp+4+KV9xa21oirxKH9qaDbwbRwVWwdKaTUCJC1DfcTq0Y204k\nJua1cqfwe0TvC2FFBiRHbF+1kqRZx9i4EeQz5FU095A5RPRaJlazJzI5scA/\nDfgDSinlZVt0lB/0V6wB7boqPk1E0EXQQhSPvi8bFSxqvRllxLXMgBb4mIH3\nBa2RhMTwpuN+YesIEe8PPWJzR6W0WKQmNhmSn7yVOEfhi2ut4FjoKh9zQ2zk\nOFygGtUa2d8AdGFU2Fnx8FYKi5HvIjjaKN88acwpvwwCBEn9AXWYEOG+Khk8\nMfzSh8LQB7DKfNwkFPjaYKABaXdo/3Hc62V4UUMZf3J1Rr4ze9G3eTLKxQ62\n094wZvtsPtTEmlVjCUVlk2APOl78nJoqsY6i4f82Iv7RU5CfCZlzNN4Fvpx+\neMkl91g2MvuVoe/UhHV0b2zqQKVNTj72WtCqnBfF1RFD2d6LHSfFCVpjv/NC\nRa17PJYAigqYMfNETT0fk38c88NqRdoOY3ViFnAkXlzhngzEpsTqSXg6Oabc\n+4HY\r\n=nnAt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"12efe92e4ab182c6b1ce58d97866b278fbe8418e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.0-rmorillo24-minor-relatedpatterns-12efe92e4ab182c6b1ce58d97866b278fbe8418e_1621497468885_0.0340316563182701","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.0":{"name":"@balena/jellyfish-client-sdk","version":"4.4.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"10f48747b43c0dbe52cbaa4923356ab2838d2239","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.0.tgz","fileCount":39,"integrity":"sha512-egsv0t2SVy8fMEJOY47DAX2d0R363+phqaR+S7aCYgImpdWTWsW8/C+Fsh8q1HAZUwGEVeWDZkpurDYo32aWMw==","signatures":[{"sig":"MEUCIAGt7Fai4gQzDHTwQ/ZEBNQ1QO0iqpv9qbh41YO8b0zaAiEAlV8UNwiw2XRZ9V4F9D1aDZP2msKCbjEwxIkLqxfSe0E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgphc1CRA9TVsSAnZWagAAW/gQAKKW1zab1pz7v9HAfDHU\nU7dZ23IonrQXKCbgH3lBbnRy/Q7lxqKaSVdCRRQY+euFjV3omXkQcBqykPax\n9RjObt4rTXbUFYvmantOWzegGlFsmAmiCu8j0PQwHRCJy5fhc9A3cwlr5ujA\nJBMnMow3Xf/iK0bKjY1ADDUvSnK/DkGe6eEyD4vKi+26G+bSoMPw0ZxYsH94\ns2skliTX9nrEAGljkqCSz8bI1a+DrCjg8ZR1Xowe+aQMKaSrYWL3traxmHJR\n5KeshkxYFPDo+lfcHRaRPytqiMqp5VmQv/57QJq7kT5Y8XNyvOuwdcgBKnvF\n+ImSz72/uvF04C0pPLiS/Ez7HFi56BSE67Ft2v6pfQgBTfATYrVqDScRHXNh\nfuWXxDBOOVJKObXi1z+VgmOaNPUB/mPGx3F4kEq+cRE05GU+yEIH22J8aE3B\npxC4V17tePC8y2KavT1TiSinlVe8XbwLXXeMDc1i9iGOWE/IBkSpsdhHxFmc\ned3eaCpy0PQwhQD76S9Ihh7XUkdmnjT6y4VEYL48z9lY7/WcbPPOMQkBTrvr\naRS2Lce1ryOsRtQxHlbbriRv8r+vTmGRi63OPUbMdvbjHScb7WD0B3QfLikG\nj/tp6hJZpx2gefpUypxlbpbMMe04UKEYJ661LxHbFgvcs1LwnayuQ/Pzpxr0\nrqYa\r\n=68Uy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7e2c5637ae1e4c61d95c9cc51d9a408daf3cc71c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.0_1621497653352_0.06455111798190005","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.1-renovate-balena-lint-6-x-1850d36c863071e5ca236526659cb1c0fb8d8197":{"name":"@balena/jellyfish-client-sdk","version":"4.4.1-renovate-balena-lint-6-x-1850d36c863071e5ca236526659cb1c0fb8d8197","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.1-renovate-balena-lint-6-x-1850d36c863071e5ca236526659cb1c0fb8d8197","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8e7a0c4987c3a35cdf0c3c8a5509db33b0e09d5e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.1-renovate-balena-lint-6-x-1850d36c863071e5ca236526659cb1c0fb8d8197.tgz","fileCount":39,"integrity":"sha512-M6BqcPqogqXVvVLQZX9rRO+wI+4ivMAcE/giP1XlsnIjcHtC9tTv4rvJ2bRUxsSBY1JBX3ZxFuLMwoRbsPI0LA==","signatures":[{"sig":"MEYCIQDJE8D11jjuorH103pGXcXYjksSkm+0zlE3HSmA7SQiZAIhANannCKkWLpd8nXLXidsLyfkY4+yVlDzxatJ65zykn1v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253802,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgp/ekCRA9TVsSAnZWagAAUFsP/1oI0f9f2aq+bZgE1MbU\nhdSL4Sa0ZGZYOt2c2YRetZmgS50uUwCfvusGjTq4sbXM6hXR0agitDsLQydq\nCfekdLLz2b0u21NJG/tbKr4jJQ9xRL4WzfneSx6hPhXIttUChdnrVQSLQQh7\nzi3W/7rhon4U2MkJsf4XUmgfSEXL1Gb+qgbtkUyY/1XjE+yaOeg+VZR7QFX3\nb2sdLdSeZ7k5E1e0aPyGFaUtg1qeJuoKd5GC0R5Px4mXla2NRisv3pzF+IUO\nL0OH8L8ZzUpYWsNQlAMNrUob+JpotcrL9yE4ZR/OQN4yTdcmxzb+BDockLgS\n34aUZLp/tOybY2Dxk3fToCGvXCU3phDsgfr60+XROkPqcLFFbWS4xQ9GClu3\nq5kB9nCLPV1Z8G0HUuHSaqhXCN/Tt/PllLfvSpb/v+pMNmMzE99N5m+deIQ1\nsgR6hCBeT2bZre2ZhuGjrg0Hyb/IyWiPP86iaYkJNEGYF0ge0gZ+qJ4g+17P\nw1k7MRc04wDzBrMhKldR4QVY0c4BAoRhdj2+V2dFTBaxrj3lUBLwEWLDCoYU\nF8ENfgpSFc6zrPdhZwYkch7BntyfqRTHbrEhXG3wcvETtxG3TLtsOkWi3X/e\nSXmPNYfzQuE5YY0RyjMm1hBlalXWt5HRCusBEzYzxAeuEJNCxJ/u3sALa6Nq\n9KfE\r\n=JQv5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1850d36c863071e5ca236526659cb1c0fb8d8197","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.0.0","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.1-renovate-balena-lint-6-x-1850d36c863071e5ca236526659cb1c0fb8d8197_1621620643859_0.6986029813615622","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.1-renovate-external-non-major-78152e2cfd4be2964b311a2eae30094745972a4f":{"name":"@balena/jellyfish-client-sdk","version":"4.4.1-renovate-external-non-major-78152e2cfd4be2964b311a2eae30094745972a4f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.1-renovate-external-non-major-78152e2cfd4be2964b311a2eae30094745972a4f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fb7239b16e5ddd164b2c5923b30d58ddb0b3d3f6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.1-renovate-external-non-major-78152e2cfd4be2964b311a2eae30094745972a4f.tgz","fileCount":39,"integrity":"sha512-Dddow1JRT7nf87wmkpNebr6PV44RxrDkWnMg7FqdL5XqXaLDNQVId9Nkypqnz3EAQW9Jl0o3Gpq9wufyVi1+YQ==","signatures":[{"sig":"MEYCIQDXJH7e6Myc8teXH3LN28LgHO1g5O/sG8ggH7ltOc1FsQIhAIc1mT39hf1jS1KuAy4WoV1yuH+R2CNnvRnfELnocZvs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqFx1CRA9TVsSAnZWagAAZg4P/iD5XJNsEFK9F2M6TNXi\nAyvgOM8TmJq4kGVftSKre41rMZMUb7+jaxq9MazHXga+glihSTqvKE6R1672\nA69NUAs6ktddxUekxPZ8RJhA3AB9R3KlZ/QPoiimQ77H+qdjvN7zaofi4NGP\nn5aeOErgIYPlF4YZRdU172Ec0r+nlFy7OIKKDKcAZMkLtdMnGgRZUcocDsCl\nYwv9hFYcVa24FSEA9l60Av23poU2GbvVR/8Ys4BcIjJDYhnvfLmPKdud/6J/\na+O812Z9tTdUms8fZ1zzYiICAH3Oz9OE45TCkfmjvsV5Mzac/gP2z8u4y812\nkt0uTNsqec4BiuZoLVKXI668Rh4DO4TONDOxy1I1kUYgKB/sSByf9iDrr7Sp\na2ywKKrb762ohSmFEJojH9GSt218P0TUhDr3O6Ivs8WBLkLhVlAZ0XZYbY6r\n28Tq+VypYTf0Lv2rNPMu0Pv3HxkfqfPGgSt3J/r6UArLnvHlVnB1QV4CmrGz\n4e6ogn6lTDF13O4O4ZSp4XbhZvUAvxMfGtdpc9Rmr5HpCrNzwig7jJZW94sw\nSsoVaZ4GPRtziwcA3SMPK1Q8zlVpfvVWPKnVtCcDprAWH5TucfOZenfPAXnV\npzS5SDOa/Fi8wliN1NsKLrY7Fmp/NFT4xx0M5QYuTzzb6twDRhVPR461zI96\nhptF\r\n=2CCV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"78152e2cfd4be2964b311a2eae30094745972a4f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.1-renovate-external-non-major-78152e2cfd4be2964b311a2eae30094745972a4f_1621646452573_0.607689760249879","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.1-renovate-major-external-major-5f6358587a22130b409ce588f46b6f661a08c03a":{"name":"@balena/jellyfish-client-sdk","version":"4.4.1-renovate-major-external-major-5f6358587a22130b409ce588f46b6f661a08c03a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.1-renovate-major-external-major-5f6358587a22130b409ce588f46b6f661a08c03a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"172d91d3a1b28df22b8133feb9d4378e566bab40","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.1-renovate-major-external-major-5f6358587a22130b409ce588f46b6f661a08c03a.tgz","fileCount":39,"integrity":"sha512-hyOmGW48EC+zcdhYLSkb3fIn+/FWdpdHRCvk4pGhCzWy9pQ81QekaJnZzLSQE9hwO4I4JUJF/Pv6T3FvFvPpFQ==","signatures":[{"sig":"MEQCIAZO1YAd+91EQ25k3+X+wZmU0cAYAt3dC5OwmA9LS+9UAiAWs1ovYo/OhYSzdqsgG3FcW00Y7vND0VWicjnLSbovIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqFyaCRA9TVsSAnZWagAA3WgP/0CI85GnEh4a1/STBcaT\n4SWATO3zfKoEUqMU/1UgDGY5vx+42vB6QR7P4UshqnzvnyiBxHXun5RzPjmY\nEK8Zz9h/dSn2XeBqCztxJK3kSkmhbrVgEHJHAmvi/4rn2M8W0xY2utXeAqs0\nx42CAotQ4Hlrwx2ASuqY/ykntvySDzFVO6Tvup9ZXhkKYi2PqpECdGMmibO8\nR+KnWAkIEc9nWXvaij2lXEBidz/E+6h3/GrqdptzIOaL/adnihdz5iqtuK+E\nHixVfOD+K/yQ+jxjWZpIbGjW/nA2vAZMmjUtxdNWc45doHYQOVILK6MVE2I5\nMSGtRk7bGl/5IAs651DBQpvHtpzhgAtPZhWU1qqwoqYEagD6JLcBQlsk5Dqs\n++19BikxZ4kr0NIZIjsONfy+CjVqP7TGvMMLm6V8xNG48TNQfEiWg2UmnwV9\nfvYF3JVhitS+ThIUDGWLjPsBWVy4Ta7J7G2Fht/3xm7XsRSOfNWiXlD6slja\n9DhTxuyxeUEFFCzfzUxIEDHVxYSdpoCdnVWlSj2zMFDkzPprikWwod7LQTTf\nrSu8BW8iSHKHiHigVAeLx4gSaHt9STE0jjAVVB/JtcqkhE5NQwMHI2zP0PVF\nOK2nkPBJgIipDNLePdK7HJHLNLYkq0gXijlnIhKVoP66OeHujIpKsKuiYZJH\n1avf\r\n=mE65\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5f6358587a22130b409ce588f46b6f661a08c03a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.169","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.1-renovate-major-external-major-5f6358587a22130b409ce588f46b6f661a08c03a_1621646489930_0.3723201349919334","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.1":{"name":"@balena/jellyfish-client-sdk","version":"4.4.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"09d1ae6537f0ecca9a9aa4c791a5eb7e0937ab6a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.1.tgz","fileCount":39,"integrity":"sha512-C23h6uZuVGBNgQcZns4eDHRb9iF1jQiQaLkZv8I/4NQtr+dQ9qSAFm04F+goIKJFgMIpDkEenplsB2kO15VO5A==","signatures":[{"sig":"MEUCIQCfvaWjYLipHnNOnZsp1pRrxQJ1vMYxQ3vcobXHFt96mQIgWEWO/hxMSbDfgeS+4zjesXqUExy8tOLmrukyjvF6ZGY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqF1kCRA9TVsSAnZWagAA3dAQAJP72U/UU9wV9SpjQHmr\n+8DOehj2ci5Tw0jnc9OjF8W2+Xg9ZyXtL1mk//J1YoCMyy6pVvr4PUf/BBvf\nTwKGk6fN14VO/Uj6NKZIheF2EWeZDpRulHnr/Q0wJCrATBlMwUR4DC5PXG+7\nffSyEDRs9l6jps8Cwf/yvnhARkxsrZAxo2eWDyVekXoRT6fp7a9mBduGgj6r\nwrgfWnptkNLDQxYbDFjDN41AXbsh1Z0i/wSJ8eYt//p+Z6QItJELAqmfNBMW\nRAJpq7F3x2Sf8vqiZi1OImorrernDmgYS8388YQ3QjGFjclXXpeQSJ8vJGNs\nhKxpW9guQacHqJ3X+qzKmFL0Lpm7N8V5ergBUj4P0GAdbTZLHCVy3AsUKc5q\nSJocfAe3icD0xi4JaLYjpr1ii02O4r/ys2fUCZm87j3aN9XQvW/J5gHUm+WZ\n8naQ7IcG2PfL+1vhuvlwq0Ty2+xIkcxb2MuTrtG/M9UfunJTUN3de1z4Qm/q\nCwsvVcIuQNg4Ad9FsRvqEsk2Q2mzEPpvmIqP8SRLk0aArS8ryS9KPRiVRSxh\nTK39DYBBxKZxJk4OQ7ZZEivcQY1NZi6mnBk1w59mD7Aks20N+wXfDVTUex1Z\nYlM3wbDbT/8bQ25KTh5Ew5ZO8r2k8dqPQomXS6UyEnCvmognNaMmkR9D0M9l\nJau8\r\n=IVY1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8048d4a77317545234c9a84c53f1dcaffd79e9fb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.1_1621646691511_0.5316903141601861","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.2-renovate-balena-lint-6-x-d431ef7643233c83e7ccb3d9f6ae8849de7ebe17":{"name":"@balena/jellyfish-client-sdk","version":"4.4.2-renovate-balena-lint-6-x-d431ef7643233c83e7ccb3d9f6ae8849de7ebe17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.2-renovate-balena-lint-6-x-d431ef7643233c83e7ccb3d9f6ae8849de7ebe17","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"47afcbf7e134982e165e03a05193210cd09657b4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.2-renovate-balena-lint-6-x-d431ef7643233c83e7ccb3d9f6ae8849de7ebe17.tgz","fileCount":39,"integrity":"sha512-zx7pT5SYTZx31NyFctvJgUIoMMOUnd33Oo6hell71qBJnCJH78qPzsUsvzRjj2AVU1t+eVtnLVKQNFeq6K2u5w==","signatures":[{"sig":"MEUCIGInPwjhaBnj2SYZCSAfd6dJWdsw7xAvvgzSb04iGz7+AiEA/W9Mm1REG5ZgIoBNxD9G4nntlpl6Bt60Q0sPq/Mx2mk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqF6PCRA9TVsSAnZWagAANuwP/2na3welx8ZAV+T0pEai\nPj5oUwfEsnZlnG1ugFY6I5l8bSgSV8bO4R8ZqrO1XEXD2NpvKGi+5IKnFYGa\nrbHLlvm8+1qbKagpuYwzVavzClIdDHGQkckiW9RzlpZOhtlj4p80wztn6/pd\nQC44YkZfcFzlMuUVv1YWU5qN5yNv0zEglhsVKOXVKtbrM2/8Z4rHnBl4/+pD\njkyF4zXuJdo3u2kUYD+QautqG+5V1WjayM1SyWf7i0cX+b3Ckt6JNu/kb6u3\nHs4SrLk57NWvkEqorkpRMPkB+xcHAtkvUhL33fSe2IMaJW6K09H6wu2+u2j8\nLXX/fKsw7MsDQH4YK0WJ6q9OQqHnyPA6ILbRGRnKfk+FdwDjD4EmLLjo3DWC\nqULGo2gG/oqJNESGX2XhUa4KE12SUFdX9wkepgotsplTaOFIs8I8sdyd8jM9\n8BXZNBjuX2jAZJGSkpVrRj3CGeCoXcDELf9VKN6cvXyxypPbhithCjRbIKHc\nciMRaot8rHGG6k1ohlGW5/qQSGOenNVe3/MH16ucGnj8bVZ3tv6afPgQPXBa\nV8t5otex8NNDF7PIfr1L6KVfTTesoftHMJbjeWWcL/5s3GRSOlaiTWDSY+8y\nXXQsAHjMqLCMuZf5Q4IFudGE0Gu6VocTFZM5+F0bdElaSh8SEr34nE+kQutc\nBB1T\r\n=RVLr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d431ef7643233c83e7ccb3d9f6ae8849de7ebe17","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.0.0","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.2-renovate-balena-lint-6-x-d431ef7643233c83e7ccb3d9f6ae8849de7ebe17_1621646990600_0.7895416609065375","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.2-renovate-major-external-major-6a50ec225b240c2623449245ce13d9a09ba7fbd6":{"name":"@balena/jellyfish-client-sdk","version":"4.4.2-renovate-major-external-major-6a50ec225b240c2623449245ce13d9a09ba7fbd6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.2-renovate-major-external-major-6a50ec225b240c2623449245ce13d9a09ba7fbd6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e61d4ea6d15dde72acfdda749df780da519a3614","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.2-renovate-major-external-major-6a50ec225b240c2623449245ce13d9a09ba7fbd6.tgz","fileCount":39,"integrity":"sha512-XIZ+Gm8nWd00ocPclUqa2h3BTYxKw1kkX4z3s/IbRA8BdroM6+LuUrJX69liS4s0bVneZCBb5Nl3SCEGWx7keQ==","signatures":[{"sig":"MEQCIDRc9KitXIKROBjQJ0QMBGmCEcywHVY7DYwwI9V8QGraAiBFHNrgfZ8HsHkcyuXcVdGij3piXIqTAK4CzbXx2i0CCg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqF6bCRA9TVsSAnZWagAAyiwQAIVDsYpxbokh530bhxIp\n2jWLk3KIKOGaPLGFO/i8EDmqZeJfenUFaee2yd9MpVMvvI31hDsVN9PwoRh1\nWC5QLSy2cw+m2KWXIaLUeulTTMhfTd9BjwXoJALR6pWn2OvgC6DQEVAPRCwz\nwX08EbX06rJ8JeJ+T8t/tTMl/Btj1wBVkPtCOAn1ryTMHxebZ1/NDV8FV+nJ\nTBtq18DHMDOmgk5JdgB1MfmqnmO/+HnRYx6sROomLwMNPFgsDKx4x8r9E3pS\nzscQBeO0Ig8KO7qpBaeKLYuQFMfZFYulFo/h63G2pasAkdDliNlXIo8n2YAM\nzgeWOBRB2yo8l8BvW0OaohRbQrt3pP53Ml9ris9je4TqW40xcvOhNzNtDrNy\n/13F4GzvinNXd4DROEOUUcplkJzJiJlFmYwr53mgWAvMBdC0BzcpRZd/IX9q\nlYdwZBi4i6YilzOL9c/pewB4WLYSPV15JEtArQe/zxdTPLgFCFxHO6LWWkdu\n1KsqEWC0j274qp0vOXNEF0vR7I/Y4oo+T0cPKw1O7CHPXll1d9n/ItsHj74T\nRyhnwj11cW9RkIGN9dy7Kw5YT/+sM8QDEL9oeKhZf4FEg2mpcec6bTIDj291\n0MFclNNCIsLYIN7lcBJ3LLQivuBnqbyZGIo8BVlSsyReZ3TVBkqYSHzJroi7\nQZTu\r\n=SKMG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6a50ec225b240c2623449245ce13d9a09ba7fbd6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.116","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.2-renovate-major-external-major-6a50ec225b240c2623449245ce13d9a09ba7fbd6_1621647002467_0.9434967149121531","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.2-renovate-internal-patch-94409e7ed7cf0b8eafd6540598d567822a8dff00":{"name":"@balena/jellyfish-client-sdk","version":"4.4.2-renovate-internal-patch-94409e7ed7cf0b8eafd6540598d567822a8dff00","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.2-renovate-internal-patch-94409e7ed7cf0b8eafd6540598d567822a8dff00","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"86340525d877e78d6175c77fa46920b230af8101","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.2-renovate-internal-patch-94409e7ed7cf0b8eafd6540598d567822a8dff00.tgz","fileCount":39,"integrity":"sha512-D1F1SRapC3KaiqaoTbBmQt0Tom8vUNtVbwQFRBouw2jRrdontLT78aHbhWrDPTf8qoRTXwjRyxtj4O++KOif9w==","signatures":[{"sig":"MEUCIQCDdtsGBi6ks1HdvJD7GQ2TrQkji9DkvvKbWRTA0W/QhwIgXoiGfO0Dl2R6gjzdIR3vpGi1XP75xlmv+deTtQvPEIk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqxN/CRA9TVsSAnZWagAA4A4P/35CFkbBRurH9FCg7IOh\nIZExlrlGoCqncU8+NvFQl7Zx8a3txUDEb7WvsVR3yzoK7JDM6BqpdaWMiKGt\ndI2JmTya4WLTo/50N7sEV5waXIE9ZTCA5hIrtoVu/B/cA2RD71tlYmWU6zyV\nGbKqE3lhCPR+KrJQJMC7FT1id5NY0wj3UL/HoCrmTE8VhdZ1hWVRoTK4ceWw\njDwjJZBEdDwOFk++PecDfX3pFMoap4K19QgSDO2N1mcoi49vt0hTejBjEAF3\ni5BoEctq8gHGPAi44eqi+IUXNq4liu6yc7Gt0GVGGLnOWC5mBjH94GmUzYFs\nj/nPMKHwZXgUWDhQwrWFG4SrinAFhhp7k6XxMmHgJADLa/H/UCyrcwVRQO5B\nxnDqbsLM+o8nBXnr0YU3YwyBNj3G1T0z0jXE7rrtFbmzTRRkWfV0xzrXnD3W\nBi3CVbmMIaDns2PQP8i7xnZpnoNtpsTZ6WWe39umJgBNrWJBL2oK3s7KkcJP\nSD7ACnZ83hqjhlEuGgrtoMjRiQjWRoSAXBLldL++vgwKuEBkGPkzC/PMH26N\ng6Jm1tG/8o5BkCpFOdfrItVSn7N8SQH1IsrNvZmkiKx2RZh3oiZq+GuS/k5S\nMFRyMOO45FLLedv8gNrt2NDC8x75fgvL5YLvSERnK9K3zIFKlJdzRh4aOVtn\nBMSo\r\n=E6cm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"94409e7ed7cf0b8eafd6540598d567822a8dff00","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.118","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.2-renovate-internal-patch-94409e7ed7cf0b8eafd6540598d567822a8dff00_1621824382647_0.5325580271979524","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.2":{"name":"@balena/jellyfish-client-sdk","version":"4.4.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1037915387ca69c76e319ae6b6fa18f47917a879","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.2.tgz","fileCount":39,"integrity":"sha512-G706ft3RaSg3X06r5S7XiGZOPsXzZArNu+L5F3PwlAfs4utXSIeeYhH3CdgoN/uHNTVb0VVTY3vK4KOXPdCDMQ==","signatures":[{"sig":"MEUCIQCdhoc4Fg1hfIdl/2pdXkVt8cYSGcZ3nqDechl5iopDEAIgT6P46tWG88vKmiXVkJihjQ6g+bVKCCCIYV+c978PAeU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqxROCRA9TVsSAnZWagAAuWMP/11moqHeiu9y3GNWtAmg\n3H2lMdtqlbOFAsYKme7WswbHzK9rviWfperRVU10d0zphg6InkABe5Jn/KZu\nhET2yS2HK53C95a6+k8LH9iryWTv4aAULEkJySQTH11/oQhh+8XJhY8t0lMH\nTCAPMRcEnVBQEmTh76WIUPPknhGPnUmX0d14rCFxhJsJ2OO7BVo3a3YyoL/J\nA9WILyqCZjZVtVM+6cjRj7h5kx5/AtFhobOGU8xm0tG8tK3TdCIpldVeEeyY\nI392KldvgWo/7XS+6x28rFjLGRfLAvQhMBKSki1ntoQ2Dec5YBMCWE5J5NQO\neKREFj87uhW7loAeePtRM8WV4yYQCYdP7ptrprFfMtnvt/6bRP0xmfpuhkfl\nYg3spWC7vgla5IDWE5Yi5zKzkpCxIziTuACU/AErkP8ngeZc5MNIVot1QGcd\neuaH05Z2h8ltHeYFB8bArHSrXdW719sPRJ5xbEblfuDJRnVdCOThcReeJTt2\nty88u0868scp2thwDqqIOfJjwcYZblhroURx168Z/u9s1X1BYqAz/QEeQ3sl\nOBo3a/V7eNwjY+/12JRrJW5nq/imsy+ZJibgi1rrkDmNbAF7BA68gr8tn6B5\n+xCBtRu0gl5+6wmtJDkDlMbYD7d4CBy0j0Zml64imkJE0HO1Q/ayfLxqyWs9\ns1GM\r\n=lTh1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fefcb4429a36bb1102be67c917c34e5dc05ab2a9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.118","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.2_1621824589442_0.3059957487009506","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.3-renovate-balena-lint-6-x-5728a882f34f35dc25df1285320a2942e9923079":{"name":"@balena/jellyfish-client-sdk","version":"4.4.3-renovate-balena-lint-6-x-5728a882f34f35dc25df1285320a2942e9923079","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.3-renovate-balena-lint-6-x-5728a882f34f35dc25df1285320a2942e9923079","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"07d94c1bac553e1239780ae6a12a63e544892968","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.3-renovate-balena-lint-6-x-5728a882f34f35dc25df1285320a2942e9923079.tgz","fileCount":39,"integrity":"sha512-iHEJ5Uag7P3+fOp23KwtBdMfrNtSp2lOzURaabFUiW1vfEXztHUxYNlJoU9XQj3w01Pg3HOhWylij4UZdXs3pQ==","signatures":[{"sig":"MEUCIHQJMM+zZIjbQRvo2gyV2SKipSB6XE4E5VZf6udhiTfqAiEAugpQsq5EvfF6OksDTQPk/ElW+LvbeuQtgn/6/TcMRf8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqxXdCRA9TVsSAnZWagAAUNMQAJpFIsdsLcvQO7NRF9lo\nHBIID8fz1BQmSSu+nLHbig0ax6iU8vuEj5qvsKvge6TrOWAj7Q07PpyPKWqb\n6OtjP2ueI76fWDsQ8WSrq6PSTxwz7hgTd+r2qI3alv3ojQmIWS3PQz1fiPMn\nyG4rId7sHhnhw64F3guXh/i2hYeKvH4skJVIPYDRje6RVrfVjMQ2kEjM/eix\nWoi3Lt578CjtGC+a1b9yOffZcon9pEhemj3raQyDRMCVgTnPsq4jKuDGU4vO\nWEPi522om5YlluP+to6o+FF3mCiSjgp7tieyFz0I61WH96DXcnTG4OQVdWe3\n1H4EOo4WyPoXRnke/JhESpExqXbQDilGZcNxKvTYr7lBxwniKzy69OSui9Om\ngAgk0dGjjALtvY8pmD/nK4qFmZZIhTJGQoTiO2jmqFxXHAi+vQbJNT78MQ8Z\ndAYq4n9RGkV37FCtBVRghkZoXegSSrfokMrNeeLA3Rj48yFw4rNP78NPk2BC\nDy8D//gP32XCBMgPkRy+XaD6/+TN+icEAxXB0bqbq+qeVhXxrdmtxvyS/BpP\nunFJjvg3CMEZ0ko9o2oTZMsrK8vPuoamExkn5W1+L9GRZL4pXmnOLGLJarQ3\nyyiTWlVBALBy7vNXyRzFjhlV0XFnpaqXtSbFkFI/SFeKt8T/OtUtQepsnALf\nd3hu\r\n=6O1r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5728a882f34f35dc25df1285320a2942e9923079","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.0.0","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.118","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.3-renovate-balena-lint-6-x-5728a882f34f35dc25df1285320a2942e9923079_1621824988664_0.6590139370337773","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0-setGlobalQuerySchema-cfb40179565d755accea2e5db3fa7c86a801a226":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0-setGlobalQuerySchema-cfb40179565d755accea2e5db3fa7c86a801a226","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0-setGlobalQuerySchema-cfb40179565d755accea2e5db3fa7c86a801a226","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f76f4e7cfdc025d1f21c9a6a301cda9d9878d97f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0-setGlobalQuerySchema-cfb40179565d755accea2e5db3fa7c86a801a226.tgz","fileCount":39,"integrity":"sha512-UploAUQJuGJdMfKocabTn0XbbD7Vfk6D3VvNz6FxJwCjsBuuihJUSsu6xxohNVWj0+dkOEN/k8HKNQTeT4ipbQ==","signatures":[{"sig":"MEUCIQDc08mKRwdG/wDPfz70cfq4rMHaUj+T46dNTnQAmQz9gQIgBt9Ff5crqE9ZfWETXTzgZNMe3jT1jCMbwb+MMKOYjuk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqxqlCRA9TVsSAnZWagAA7voP/39NExy0wpBVsanv7BK3\n4yVORvGGsi4jTqkL/ZtrQlmcan7LTsewoCDJ17vprMMlmePLspeVeSoFEQFO\nx/Smtlzp0xIc6jUnLUoq4R7WvkLJlfG5GY6PblZNps4uqqxhrN1Ttzxz2/xV\ni43qKjIH8Qkt6XBWLf5LZhDsisGpmnrVKjzpQNGir4yuN/kYt1mkIcCHqN0C\nIQFFFf6/qlPCEufaaoeGyQRT/rcTUam7hm5hz9OUsBv+XA2+GV+363ruovET\nhD6REzpuYqqIrkCs5kSpZkDSjdqKDWQEmX2iX+7JyrmnnnN+6VeOnqtFrcTf\nQP+B45DODCg9UzsF5o6rWrzQ4EVo2KXNEf2W32eoSa+49+aVwgtuKqYwekHP\ngxReBpsMilB5y30s5fOt9zFn8opfDIK083OWXLIR4sa15ZyRKEf/FP+Peu10\ncFUXmnvlSh6aZpN6pXmzamcOuuB2EYFtvEY+YiSIXZSGKBSiRegEtox+m1r2\neLiqhYqja+gOTKQoShXzKTo5CP1rMYhZaSRY5uJ06ntMaVzt5qS9czYFR1nC\nJW1uvxINNxTKq0jBfKyaLUle/fWh0HvDDYB3JvapFKfkLB4UBd3GJ01oLvEP\nj2/hTy0duk77bRjPMYVZWRu5iTbdetUHtO+HMQlPn7QgVbJ3mrd0H4ZY/kt8\n1Y18\r\n=+USp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cfb40179565d755accea2e5db3fa7c86a801a226","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","skhema":"^5.3.4","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.118","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0-setGlobalQuerySchema-cfb40179565d755accea2e5db3fa7c86a801a226_1621826212764_0.40345610387699793","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.3-renovate-internal-patch-d97b0bda1fd39e6a1ceacbc6693dfb195431dbbb":{"name":"@balena/jellyfish-client-sdk","version":"4.4.3-renovate-internal-patch-d97b0bda1fd39e6a1ceacbc6693dfb195431dbbb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.3-renovate-internal-patch-d97b0bda1fd39e6a1ceacbc6693dfb195431dbbb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"edb86d414e80f92a4079ba79d3b609ceb45cc880","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.3-renovate-internal-patch-d97b0bda1fd39e6a1ceacbc6693dfb195431dbbb.tgz","fileCount":39,"integrity":"sha512-LpOU9rCZ7gbYN7QO7STcj1SlfaUopXYogdRcKkPSqviEBLxbBwdYp3tyc5BnmvKsZdcQ0ZQFCTUjYKmHuVmDuw==","signatures":[{"sig":"MEUCIEFMorfEc5XTMITTs2Lzscg/iFqKCpEOG563fyu34l4mAiEAoH0BP4ZzfD4fSR3bYlY03A/1nj7G1dva9D3/Xm07Sgo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqzAvCRA9TVsSAnZWagAAOlUP/RtfYM3kyXpkdd+0zPIn\nsryhKFzBD9XhSAHR2hDvw3Pz0dRTF9dy679daFMP/7NX4QaBRrezNjc9YoPa\nSYGBIYU+zkYBQe10OXtbrJ3JedknWw3y/cEqyqtShN9f9hgQfDKsUjtOta37\nS/zrwxZQnnm7fYliPIo1h9+7/VIINqd5ZAsHOgiLz5FgNW5eJJIip70KM/HZ\n1O4l50O12aqEphaeVRL6PikXh+OgJofB27xF8RURfcgOJ0FpUBO3FDVDd/lJ\nDZSUPIIJDXb4AuNEk9hJELrqbfpxHb3r7p4+3+LzlPrqkrvRKkq4bJJuuMj0\nxdgqIUw5EECno8sSB937ikQCWANFxj0dIf9+T+C8CCl2IdcdpoFD8YoVQHJa\nxDSPHwEOJPiQFB8H+kys9QHi6zbzc/mMrk4tnIJ7vsCi6xyg3hx6iv/dFJsl\nhMP/zbmrmtwNBkxD1608Po1TNpp0zyclCfTaebIV7R4i5O0BVcUscMxN+OM/\nrAVSL/QUkPTRcnVSaQlLonJ3Nb94iRHnMUoFZOOlaZ7DaxeE6vw/6QENVczL\nKNCyTEGu8bVGP17av8Bq/ElBnmIHbTZfHjl2R281VDTAPUR0MccrSq/zpjo9\ncLwLyBQTK5Ld54N2VuSxXImmrfqC6Uu0agmWaPUQXkV4sUHvEolZUn0j0Kvx\n/9Fo\r\n=YGTF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d97b0bda1fd39e6a1ceacbc6693dfb195431dbbb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.119","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.3-renovate-internal-patch-d97b0bda1fd39e6a1ceacbc6693dfb195431dbbb_1621831726756_0.19054525765151986","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.3":{"name":"@balena/jellyfish-client-sdk","version":"4.4.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ef8f67944056096f47d0a1ace7e158dd8f6cbd36","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.3.tgz","fileCount":39,"integrity":"sha512-k/zhyzea91RwuEVT9San98i/HCyLjPB72G9k/Aj/KK15aUx46bXhEkU3bnSOWMhlcaxdELsWZ2u1JOI1QsFnSw==","signatures":[{"sig":"MEUCIQCRHOtqn7qAzuLh5vyuc7rZ3jOlRZ0wCsjjQFvOeEA18gIgadwmOxevGX16ILcO4RSUlwNPMo/3vT0cYoE7CNEVsnM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253948,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqzEBCRA9TVsSAnZWagAANzQP/A8JIXpcoXmFMSo5TX5g\nldCewGkwpnT4iw8albDVHfufeHN9XHNZW0ikB6qeFEu1HvxRk6+OnYRmKNJX\nT/+AYu4pQ8LKeJQofiY2w/CxT3lCKDvGHV4WpLZ0xmEtTbFVXMElo9cQG/54\nADcHv/7mr4Unk1MoO8EMQa+qenG9WGxz9VUyXowpQMrLkB1H0kyekRTrbDcz\nBnyredJcDtI8u91heH6lEqtdwGOrGke3aDpKeY1rWRznCED9pQc9IfrzGZVG\noBY/n8sE4O5xn0W0ilb3F7RoBDBVSMU8hW+EjywgPM0o4N84cVn9Ryt/gsyD\nGpbxszQxJAhI6gQZJesCNzuUhv7YB1rWSdYJQNPIf6kVLAjWcp1/pEEzVKmv\nTSjPSlp61vlGpUi1UAozn1uTeglTiAaC7k1irJ7ap57DYPor6mDhM6bHPlXE\nQXcacJ1JZrxaR22nY0TWw2ZG9M/dCM+LN8Hjwhf9yBV8SPmJUHCCdp9Nphci\nXNVfv/jmA6mRybu3naMo32BzR5wndpUdjlxoAJp7R71QEC+XmUsCbtDoEirs\nc7/ri35tDyQBB/ynkdk/D9cpzqoDk8dAs0XGAepRbMNZ+LriSX3Iwm00XETD\nSqK6lhFnb6tiTT/4kwQ2VDEy2Jk/CRC+Ayyp1QrY6+DSoLVqtJ+HWUb0RhC1\n+mJ2\r\n=dIWe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a366990804e3ab880eb231de9771591e5481c810","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.119","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.3_1621831936919_0.4527277378779351","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.4-renovate-major-external-major-9248950a55371f46e519ab4374e12442db15fdd5":{"name":"@balena/jellyfish-client-sdk","version":"4.4.4-renovate-major-external-major-9248950a55371f46e519ab4374e12442db15fdd5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.4-renovate-major-external-major-9248950a55371f46e519ab4374e12442db15fdd5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"da2004baa0bc490292dc8da5bb1df1c8ab2167ed","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.4-renovate-major-external-major-9248950a55371f46e519ab4374e12442db15fdd5.tgz","fileCount":39,"integrity":"sha512-4Hc7Wqz5EBzEf0+PDiEcJRsGu/E9BraZAinO3IvZfjuJHW1hgD4VmWL4HobU3DP334ZqG+7j0jWuAnNDIEFvbg==","signatures":[{"sig":"MEYCIQDEL0s3XHnyzzCfaAp6MvegaplkQlDr+sG+ro4X3Ht0rgIhAPrtMsBfjBg9Rl1D4qmTyVVSJHnKM/WRkxNpy6sou9JU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqzIvCRA9TVsSAnZWagAAW08P/1efgFn9e32SqKrugWhj\nFy4GWWJFjJY1vi09udxkpl/TYAUec/uL8LX9hFJhQxKUdbHDjfzBIf+7T7gr\n55g3lZcOczdmjYJOMQmf8ePityDWM6PRnOy4Yhwxezi4nJH/N5Y/eNunVgEU\nh7hjFTUkpUsz9VFW0SNKtc3bZvXDs2dCLfJ1rlWXNXSFdUycnRG/58pMSa3v\n1uGFW3BwCOic9HC84Iflf5moBBNPb/xYG4McNh+9FQhQ7FfpnP7JkvUxsMOu\nCVQQw22mWHMbpHd2O3VvjZZPFhz2OUqYBYq540t7+yqN87aeDptjj9WBB/80\nWOTNK2NXJLBX6X9OeXxUeyf5qzV8BVOb4+SnrZzX74eENNYi44bnRlogTQVG\nK2J2viSx84dxortPxo8l+d8Y3P4QySmVU12QGxsFmWLj+TducpnXvDWthlOf\nVZTrga+iHc12Cio7JWHo9pV/pjMBqtlLl6NsAbCsQBnh1RWJ9ua26sPBWNgV\nnftWm3ZXjbfXcgOjrxZ7zAyNIDswnk7Hc66vZintn+uhAWUb2moslimJOBnm\nR1reO7mDm8jXKLiLOZMO7jAmKzHSSIinkZYD/NvuKlgqj9sOCNEJ/51y/rwK\nOE4U2HNxKU8X3PC3UAwytES1IqcMio4dxmYZTEfojdGnTo9/vPiBz2vntB5O\nQPiy\r\n=u+Lv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9248950a55371f46e519ab4374e12442db15fdd5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.119","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.4-renovate-major-external-major-9248950a55371f46e519ab4374e12442db15fdd5_1621832239324_0.7148808821690653","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.4-renovate-balena-lint-6-x-65063dff593a24b394263d0f6773e5b508cbf37e":{"name":"@balena/jellyfish-client-sdk","version":"4.4.4-renovate-balena-lint-6-x-65063dff593a24b394263d0f6773e5b508cbf37e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.4-renovate-balena-lint-6-x-65063dff593a24b394263d0f6773e5b508cbf37e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4ea881c60d3bcdb72fc505985fc4455c64aa980c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.4-renovate-balena-lint-6-x-65063dff593a24b394263d0f6773e5b508cbf37e.tgz","fileCount":39,"integrity":"sha512-D+dwi18GXZ5Kq9ENnTZLM+4hblaV18XgH+OwNRGil0FWI3gRAGBa1FsIDAYEQfmzTtCWcq2juByZbbpqnVV9OA==","signatures":[{"sig":"MEQCIAMmJNQSzrPja+2ScHLWmSE046TKzAK1eY/1JGPIRoWlAiA1IrNTIy6waUmUajt377Bj4bPTSKeATEVzyCVj8LRWzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqzI5CRA9TVsSAnZWagAA7hUQAJ/iZ6pt6EayPCKWuyiz\nlCTXDXgMnDV82QIPiO21MmBsYV9YVT+DMXuoR2f/98sQJAoEcUkpBdhzmJN5\nZj6pkwUeyD/YAGDRkqBc/jvEo+gDL9a/Hjhv+QSUe9cFbhi7lj9WZFSedGdq\ndy0gGQfwTstDm1p8RTen98puE9WOCMb/xBrR8q3ZkH8Mzf5oGTFLa9IXTdSE\n1WHdPCJuQ0ybSxO6ghvny2oQt9TmtJsCtaI2THcEAPGo5hx/YarzLaWSYADl\nbp2O3cPrX6Mv1hPNd0gVojEXMyEldYp0qosHBCpr9KeCKL9acGiowUH3KzTR\nIYOx6fyQPmbym2K05ULLqr2xvUjDDDH6v2wW0RZDtxeQp03GFXhJesNp3zd2\n1FgLWdpbJQSWP8PLzvyRgZjKII2euYbOnee277G6r25zxNtspCQTRHvUdEmA\nmscy6zjgPLQjD2As8xm2SOOScTL1Wb+YMyp/ZpYGJ1TeJBSAeYWt9oxAwKkU\nrW6DvGkNTgMSUBAbreT+vC+y3V0LHJ2yfdiTOOq/kGdgpeCqaWArSLZFmrUF\nW+1M9p5F/yozd7yWpzqYKYNZ+YbyeoLOTy4E7SAhVzc/NxLeBxq5e3dHxos7\nly74Duj7LlmFSVPNY8DSPKXbXXWpPaWBpJ+G1jVnEwYRMjjZO6dNlLEJPwbd\n26UR\r\n=ZV5J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"65063dff593a24b394263d0f6773e5b508cbf37e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.0.0","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.119","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.4-renovate-balena-lint-6-x-65063dff593a24b394263d0f6773e5b508cbf37e_1621832248985_0.4707030567339876","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.4-renovate-internal-patch-23074dc7379f7c94cc12c6bf0cc60b61e39e8a49":{"name":"@balena/jellyfish-client-sdk","version":"4.4.4-renovate-internal-patch-23074dc7379f7c94cc12c6bf0cc60b61e39e8a49","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.4-renovate-internal-patch-23074dc7379f7c94cc12c6bf0cc60b61e39e8a49","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d91403451834e952918d04631168497193280b8b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.4-renovate-internal-patch-23074dc7379f7c94cc12c6bf0cc60b61e39e8a49.tgz","fileCount":39,"integrity":"sha512-ZFg+GaebPaKmgavmd1lbwmBViH0fHCIc1NtD2dIWDTs9S3MOeZ7KIAdTwNIuF8IicBTFUBEGOFD288tRgG6dsA==","signatures":[{"sig":"MEUCIQDGS2UcGlrZ/3wL/OgjxUB/9BRY52Y6hi6+De6eD0bYgQIgfcgKKDx4ejj15lshPcg0ON7VBrzzxyqvrNaedUv1PFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq1caCRA9TVsSAnZWagAA5lMP/jZZUuNruvNpkm4OoEqm\nE5EP3ZzD7NjxgMUULSBX44Mi2s6xYp9RmVLfKxmZpdNBl5WPWY/eAiMiETKT\nK3BkmHQJt555+DF8KmHnxxyMrAdUGWgcWSnvpy+ihbySA2YEOxVAL+BNIctN\niW7s5C8l0rBEyU0yxaa+PgjgjGbjHbHIAEOAnlgrHU8OzN1/HilnACWk1crV\n1At9E8UqI3rggzMU2UizqKaV309ht02K2Ht9b7XVxUfWh9uApBn/k+9KI6Rv\ni8JQWtTG6Q6+E5e2MLhlKEd7pSEhaBDa5KXDBNzD8BmhBr/nH4/0FSJrF5fe\nPxGRHEFI3v0ty8NigtXQbi1UbODfaE2BiodrQeLYuoR5G+wgtCCe1wRjW/cZ\nuOkz+dv5wH9GWXwe8uIvlc/eeIwlT6Iegox/L65AiUv7BNoeZVYrg7SpdkxT\nfyNUvbkOZAlFBD1FZyjELS57K2f/cyU9KruZMfH2VyGbaGbwdsB3M2Rqxice\nyoxKbHyzVfpoJTaEShnbfynUPlJDOiZYID6BEJPUBjWyo5k+lucCgTj+XRc3\nVDKxlYrAGFBhJubhnjjpxaLddl5keQAG9QdDnRJftRVpwsRKovNvjU/eLHNP\nwZYreZK6fnNejBLDai+3EycRFF24jtr6Ymro22H3Q/4ONXkhAf7pl+p1k3ow\nYcZU\r\n=WR01\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"23074dc7379f7c94cc12c6bf0cc60b61e39e8a49","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.4-renovate-internal-patch-23074dc7379f7c94cc12c6bf0cc60b61e39e8a49_1621841690422_0.05299534723925947","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.4":{"name":"@balena/jellyfish-client-sdk","version":"4.4.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0520bbe194d564174d532e0ae28851ab6be4d072","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.4.tgz","fileCount":39,"integrity":"sha512-BWyiweN9IE8aq5mAjvG0Mw2sj10mHCL/d+n2IXR1GsSqpAqV89CEdadSBZKo47L4ip8a+Jy53f4/OVCaSyHwpA==","signatures":[{"sig":"MEYCIQCCb95YZgok4TqfKMG/GfH/xprY3+BRc5RRsd3EBZOVzwIhAKOPog3t+IBt/KDYhLk2TH3zTTNs7AowSmbU/3dRERZA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq1gACRA9TVsSAnZWagAAUesP/jt9xm4tCTUMjCpPwXSK\nkqX0Sjib0j01xNuP7Rdw/uLqThbpTRhB+9F2n5UqXEQdOIBv0PjWqXIchDWz\nNGrR7qwFQ60S3yQf4+WmqV2EZaDndGUFhoKfgqWBX/U6WAmpBm7mnyfKsg+0\ndpEyi+0GHTJWqhEYs7XrH3nNnV6ElGmRNldJmzcsn21paZ+qYMEfF7mKHE61\n1o5OGWmdJ3/+ZGblIay4A5UZC7xIUie1UjLE+HzB/DzE35YEyzK/FGhlYRWH\nP9T1oVBjrhn70y9mga+WefDNARacWaHlCFj6bFJGV+KVITiTf+jxqHPkI0Kx\n+yKI4VZAf5F9QFkW2vJWXaZj+nQiKlmKky9i6sH8ZOpGVUNu3NRrAZl9AVJz\nQjiVWTpyGBCDRvYWK2ZPHIdv8GirlpZgPZpQJNNyiuQuRVbDWsManugWKnIm\n0cex5gJCzMr+BzbJ8IrMzXoGsXXl1+L16CuoECoZx96Xe1ad9gLxKFY6aT5n\nrhNxBLP3XfiIuxW/tsPTQUIv8m32NltTBT/cL78PVZaCT7X7tjwd78YK401H\ndcZ0FNXUz/p9Yu2ZPNvyQ4HCvSDnVzTmKior2bdJhDUFNQrDO44SX5v5QHMj\nyaj2Xhl+bUpUQJCyS92hIrXd4CcmslvSijPZWAdRbyial8Bfho2E/Hjc6nSF\n7bUX\r\n=nwqX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ced5a4342270bb231eea3bbdf7a05a130b7f7b93","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.4_1621841920062_0.383509428222756","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.5-renovate-balena-lint-6-x-9717837a5ef5f6a1ea1cb35742caaca7bd1e2a8f":{"name":"@balena/jellyfish-client-sdk","version":"4.4.5-renovate-balena-lint-6-x-9717837a5ef5f6a1ea1cb35742caaca7bd1e2a8f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.5-renovate-balena-lint-6-x-9717837a5ef5f6a1ea1cb35742caaca7bd1e2a8f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c632f4ef4d29f26184bcfd11a91484a7df09f621","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.5-renovate-balena-lint-6-x-9717837a5ef5f6a1ea1cb35742caaca7bd1e2a8f.tgz","fileCount":39,"integrity":"sha512-VqooZivWCdmKYf2i8N4pEo5lUVqd83njpnlIaWGWPNWYyQa6BLN/nheGmIpmrWpLHMqetAsgngAueqgt0oMc1A==","signatures":[{"sig":"MEUCIDwNUvOiwi+YR1lbiOX/vrfDKro19Bj9WFZAMJk4hGJIAiEA1qUdO5LCJQkqWwM+CXBU10C8vt6cAkgkuOaIH9mqN/s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq1kRCRA9TVsSAnZWagAAF3wP/isrDTww6Ric0pRhTE25\nOeIkYye426TAK67c0Be7sUH0YCrHDcdU1Qnv1hPw6LENyb6NzYVH+8ESptIf\n2DhSH0Z1ZO2ZshxOSQxJTZ7FNnkePnGYiFXPlbiS2nsmUAZDEqgrZ2Y8zeJ/\nkfK777mPdtCtBlsxl1Kwn/YbA3lEe0AMlpxP/n2CKk4zEd+AQT+Eny2RFl61\n8cBDlxrOdZ18Tk7bQzP/WdNI2oMm3kY9uDjPYnhliahL59mfjwePdj+IjD/a\nIFHyPNDuhkHr+K1fLLjwFfZjc/sUEUx5stmLNh0BBx648ZCocPcV3z8DAqR2\nxLmGr9md156Ha/VemMZxeTeUP72XwcQqjAUcJJxRaZVv9k0347GMnpDrU6oC\nHNB4KWscdgy0LFCEiUaIYYIhKQ2ZOm0dfioLCrOgNFArxv/GcNf3Wcs4YOYl\nSbUB4qK0LyHlEncnAeE2tqeEucVW8FVrXuIJ241u9cwroM72mTobJM12JVBa\nGD60V37Jyfr/UpU8o746IRjEZ/BfCgsPQ7WKTKFXYPsEeXPUXvECde8ff4E1\noYrB1ZACdQfmriQM1w9Yyg8qV+Oc4Veiih24lqZC+3oLERqOlXfIUVXScKDr\nqf4rg+ZJkaViVgj+Opi3Syv1rbk/wgODJh8fawL+irW5V3+EKoTGovncNnTt\nGNPQ\r\n=eGci\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9717837a5ef5f6a1ea1cb35742caaca7bd1e2a8f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.0.0","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.5-renovate-balena-lint-6-x-9717837a5ef5f6a1ea1cb35742caaca7bd1e2a8f_1621842192794_0.2586554204809077","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.5-renovate-major-external-major-29b018626b2ceca455314502e19dbab6e46ca7fb":{"name":"@balena/jellyfish-client-sdk","version":"4.4.5-renovate-major-external-major-29b018626b2ceca455314502e19dbab6e46ca7fb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.5-renovate-major-external-major-29b018626b2ceca455314502e19dbab6e46ca7fb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8d8817b4570fd64f8c2f06d7b02cc318d32070a2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.5-renovate-major-external-major-29b018626b2ceca455314502e19dbab6e46ca7fb.tgz","fileCount":39,"integrity":"sha512-mU2b0Xy9d52EElxCCcZYGlbviIFLaKdJH73EhAr9lvLRy75zdijEgFsSKWqog1owlawgKuf0UtLZMnoSvBL5Aw==","signatures":[{"sig":"MEUCIENV2vsCvXkgPSVVFI2yDEOgCs45vHvEMLg4HigW6Df1AiEA2hPAqRXFPSzNzBMRf8hppskSkJlgIhI+JCE9JdPfcnI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq1kuCRA9TVsSAnZWagAAYcIQAKKyIQy0LUN8TwhhRpbR\nuwf+oghHNUmEWpu3ZpukpYI6e/nHUHuDmmPFDP/pHOxZIlP2xuEerwXWTsUf\n7K9Fd6dKeK9q2xiFwVppkj3g0RZkYlwLBsKgwrYMO/N4R4QvTULDvrMfs61c\n/USLr1BCe12goq3yFOKRSCp+a70Z34qZqyextd2I4RBnwxfPu/SlWUqZHv+8\nlxA/DFe2aH7aQc6DRJItrqpak6yyw5kw8XM09AlrNmgBn7Ogk154V5rwRgDa\nDvVmv1lKaXnI6tX4jjvn/tOjKvpyf+FcbbdD9OTsXIK84HDp8CRwG0y1YEzS\n8xykaa3s8SwDrq0jfCxSgbCXxqU6b6ibnfVgcUAFFBIqRHjl/1G5s32G03qs\n1tjvJjq1zaG6mDcb6EMGOFYI4AJw4F760WsWL8VVW+/sk7w2m7ARfqikhzup\n9wVQqgCNOGcRXb1zHp2v7zfCxBEATzRwvLaRVvkcsOYNbuykGLCzze7BIhnp\nze7X29VFpJaFWN+GKooQlQPuKfiRu77PB3LBErRqHi9ncdlMR1CY+VpRJ5+U\n/tDzaOuXq6fyvGAbUIuf026hfweWTDzc2kj7LDSdI4zvblv0JLOaioYf/I9u\nBCmb36vTrNoEXbHv96bKZG58MUrmbzP5CnRNzL50o7k5p5MIsXmMU+OgqKAh\nHXLf\r\n=3tYm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"29b018626b2ceca455314502e19dbab6e46ca7fb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.5-renovate-major-external-major-29b018626b2ceca455314502e19dbab6e46ca7fb_1621842221949_0.5107736478243363","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.0-rename-product-improvement-0bf102e276c3d1eb33483df7af3bf6e260e11260":{"name":"@balena/jellyfish-client-sdk","version":"5.0.0-rename-product-improvement-0bf102e276c3d1eb33483df7af3bf6e260e11260","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.0-rename-product-improvement-0bf102e276c3d1eb33483df7af3bf6e260e11260","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2e77dbfeb02fe5648a1a350c7c44ded36405c88d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.0-rename-product-improvement-0bf102e276c3d1eb33483df7af3bf6e260e11260.tgz","fileCount":39,"integrity":"sha512-11xxlI8REWk9SMQUNcw2F66uAUqV1evMdOXhvH85dpIeDmybpUPRzwmNOaHbq37eRoU5vqqA6rc07KNWYLO5Pg==","signatures":[{"sig":"MEUCIQDckMDG2ZbLuM38Kfh2KF7bWnz/WmSE4DYNtM2aXT9aOwIgVWXUk5KRR4+6yuVVHiv3eGVC9po3V1WKpN1nHJRVx1M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":253657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq2SwCRA9TVsSAnZWagAADSIP/2ja6r4NOpQGcOYlsSME\nNrlnh6DMfIVKVFow9GE53Rumr6F2At1JYSBbchmE6YLd3SJub6kBM2/ziUeb\nh0kC7VdjkWZ6p67ZWXK9jN4zfiJlEz8PrFYEUZKmHXWydZnzpQhPlRr5IuLE\n5yZn5+swTz58kdk6R1jSik66ccOeM/CrjtN5JL0Re9qqtvWjiTr8kJGEi763\nxg3S2fO8n+B3DfjPsR9+zuk13pvzl3UROV74lJd9ZuZC8P3v3Dx8EVKcCHrJ\npgkt2blpSYuUGmKZVY8H44JKqkUFNXyz4s85uzDHRmEEk0hHOs0kqreym7q2\n8X1sDVpW/ziThh1GolefWm1l1nDtCVng5izOZKEnnBqzERG/jNBkRtOjo2lD\nSrnbA6e+mp6YeM3HoyCjNs9jqKtEpSfNmzGwIJ8KZYdeNMvb0Lv1EwfFd2lc\nP1VRSkDZNLEgGJOYeV5s9gGwTxxqfmuB/tdk4O994D+T2QCBkiZpRL4m/Qw+\nGF/+DfNQOvbheA86jEC4Hv7BNqn5dgyK38L9CxZKDHb9kXH5hUYx7Cd+u+HC\nclGqD62nFzNHvDAenWiQ/elFqvXwRIBpPXZlZ0JfvfY/IZZR7wirD7eZQanG\nPP/4Ue+zZRTDhJNxWgb5rUIP0FrM5xqwYdq2GfX0qlQTF13K/fA6u68GxFUo\nACRw\r\n=tecG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0bf102e276c3d1eb33483df7af3bf6e260e11260","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.0-rename-product-improvement-0bf102e276c3d1eb33483df7af3bf6e260e11260_1621845168421_0.6298445039312066","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.5-renovate-balena-lint-6-x-cec20a04687316c99d5b3d04e347fad7f629b0d4":{"name":"@balena/jellyfish-client-sdk","version":"4.4.5-renovate-balena-lint-6-x-cec20a04687316c99d5b3d04e347fad7f629b0d4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.5-renovate-balena-lint-6-x-cec20a04687316c99d5b3d04e347fad7f629b0d4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"afa86a31bcd164e66d687ba4ce8bbb00bfad6675","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.5-renovate-balena-lint-6-x-cec20a04687316c99d5b3d04e347fad7f629b0d4.tgz","fileCount":39,"integrity":"sha512-TqHE544DhqY/CwjjdCbHmtrF/MT6B+Y9xDszQE26qC6bO/aN5fObngRXG/S97SQbxgL2cHoC4gIH8qTmy1Spew==","signatures":[{"sig":"MEYCIQC4V9Hn0xPhtrDp5QabLl6gTibquayBbL2fWAsXylEZFgIhAMoOuf8jRriyztNTBsVJdIpOLWfdpeQsRNiPcuN9ZBwd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq2rQCRA9TVsSAnZWagAATAwP/0qF7wE6ezi7BgmtPHaR\nQuOahJNpKSsKtOYZ2auEoq465drOnL0iIOn7NYRVZS4yaDzsVBLpLSi3Ve7K\nOnMvGzKFrv+aNu03ZF4wlm8OslRUE2iHg7uxapRyXe6aVrMVSplyGZx9ZkXp\nIzJiTpy4ZG8difpKkvEG2Lpiqk8vV02fD5MRrHdVW6GghendtYL2lwmumCzr\nd9CynAGOfMNcMnk/NMy9SAkGwQNFeAb3X9y9SYMHfPbtqKBl7eDk/8+IpsSP\nwIQqe7xlUS6z+GQ0ggCMyaygIItP/BwKOi++OKCqXrtsTdFouIt6zPkCmUUY\nk2XDTLgnUZC5yzdL1LxxZkTY5eLI5mJRmyXpvo4AxLfZFQxCEAl6QBE5mX3u\nuLoHHoeXSP1bxREjuXVAfWbij9e8oTuZ98A60nvaXwDf5S8O5UMnzNiEJrHB\nfKP5GOl2TKvu47+Y9+WXRMiKz2iGJwERuHXnSUZqRG48PpBbcNd/GvoXXhO5\nf3GP9biY9ZIJYTE1P9j1JfLJH6/mCb7BcxHAD+vbIu9FaBmVS294pL7TC26S\nhkZfR8HhW4KXmedkxFypa/hyMHrsXHnBJ3FxwrjSJIaL2j7CRON80TSaVOmM\n9JeUhBBZ150+jF/vW1B/g6VNDQOc26xadUXKEdGTfdweNFLof5KSQWBcv1Er\nxC8t\r\n=JzwH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cec20a04687316c99d5b3d04e347fad7f629b0d4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.0","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.5-renovate-balena-lint-6-x-cec20a04687316c99d5b3d04e347fad7f629b0d4_1621846735559_0.6767543486494163","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.5-renovate-balena-lint-6-x-4ffcbf881a3b74d27a413e6257a5abaf50856293":{"name":"@balena/jellyfish-client-sdk","version":"4.4.5-renovate-balena-lint-6-x-4ffcbf881a3b74d27a413e6257a5abaf50856293","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.5-renovate-balena-lint-6-x-4ffcbf881a3b74d27a413e6257a5abaf50856293","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"210090bb4313a3318eab21d20e871e1eb30f2c1a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.5-renovate-balena-lint-6-x-4ffcbf881a3b74d27a413e6257a5abaf50856293.tgz","fileCount":39,"integrity":"sha512-ZmJTf1xzkz3SWPkRl3SdWQ/JsZTSLo1Yn45AIdLDI0WoNiQaRtgq5yBXzi/tDlJKeTK4MQ5CfI4Qz2WFbKgkCg==","signatures":[{"sig":"MEUCIQDq9sGatRcETYt2fOHnOnDHaL4LqAr10D068bHFWv+WqgIgBVqvlqRRKcKSI2N4lE1x/TS9VA8q1Kc6b5qCp5lLtCI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgq45dCRA9TVsSAnZWagAABDMQAJjKJGRKxIynpYnpIUwL\n85maR4Y+P5Y+EDAmd72eBPg+4nUMTRH5gB/7H7OhemveMC8V6SuliLKmDnAR\nRsz1vWMUvvKN1XfSrlMIb5zIQRKbtaWxAE+hpyNNwpTqHmIpeBeB17d/eusD\nRX4Nykh4F6vPbdsOe0u0nGKvIKpxDUbgy1A2Xip9dqWi6Q4v5s+EWCsjoSs7\nBiKz+cUjAHJ/9cC+FTjU3iSUOMHyzlSnsfWvVBat7asRlRgiAEipk/f6XxW+\nqS9VgU1xjCpigdlBwU21po6LExK2AhP/ruiLNeTMxv3xsg4Tx3VUDZ7lbxwo\nbaWw7xJ6Gch4MYECQA83Aqz1g23pzo4Ai4EsY8r6KytCHI0lT3OBgmGvPKu4\nFpNrTwQ0Io64eGtJ/PQfKckeAJheQGNE1nxAF/NJr258jk7y95+BYt4vR7qP\nFKRq0mFuu8xy44yrQ/Uvk/DAvTlJi2RxGFc1e/WZs66E1KOkhu8zDf4upiJq\nfD36kXgWvy6MfFFtf6e9k5Wfb4vpZsljr84cdg6gdFzJ8Y2huYCH6eoxFiu7\nkNAnCLThegWqEqo256qhQBOLPBP0rcx5ts9GuJ4Vk2eQVsH/vay+3fY4IpNX\nb3GYu8Vl5dpeQ3lWeOUAgtSrRxSfnChtUccby6+VoKGcnIFYoSkQz5izhjDr\ndKeU\r\n=fME6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4ffcbf881a3b74d27a413e6257a5abaf50856293","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.5-renovate-balena-lint-6-x-4ffcbf881a3b74d27a413e6257a5abaf50856293_1621855836330_0.5524305154930409","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.5-renovate-major-external-major-62b1b9d30d76491c7060be54a50d2c7ebf4d5e88":{"name":"@balena/jellyfish-client-sdk","version":"4.4.5-renovate-major-external-major-62b1b9d30d76491c7060be54a50d2c7ebf4d5e88","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.5-renovate-major-external-major-62b1b9d30d76491c7060be54a50d2c7ebf4d5e88","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7629bff88104a3d8308d89d17bde35d848e127d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.5-renovate-major-external-major-62b1b9d30d76491c7060be54a50d2c7ebf4d5e88.tgz","fileCount":39,"integrity":"sha512-E2Yj4SoeVXxGQ0haSd+yIqdtievCO2RU04VSXiAvHkfnBCsUw+G7G55qPbtffztNCWlvz1YqyiM73BAcRkK6Tg==","signatures":[{"sig":"MEUCIQCQrTXmoCopHn8qGgH7zS7t4wjvZn2N5ivYqpsniVrGlwIgFwVKps59+TO2QQcOwmYrMwJMXFBFDA8oBKMRpsI3ZG8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrDAPCRA9TVsSAnZWagAAO+AP/3WPLLmZ1tuDASv1zeCS\noTJ/cqYLq2l4UCOMOtlEH1kcXhwPQdBJE9nREvu20Q+zpz5WNWNBMY9D2Fz7\nHPP2IFI67GUBhi6+5sOCBtXvQHy1M/W3c0zGeND1VERh1isAeGwnicchEYGS\n/1wj7cnkXDXCwzpgEkS1nCRmVphTXfVn+mvqjlFmew8nhoKjKZRx+0QBpBBJ\nSTqp7xQ+GNsfpDcjh2Wih5NDC5RBackVjaZV4ljTJgA6bt0AvdROcbTU6xVu\nK8MwEcgRJURDTwt7Edcv88kH/rQhy5d9nh862fOyrCibC3VdkTav8OJhNb0D\nu4MZplPjoBmVbmwUsFXNItA70KaoGo/7ATkAJn2Oy+X9T8XbSV2/tP1TuwIB\ns/Da8qdlpZQgmhoV4FOikJYqTyr2+MU7+ekyrSQTLandbhGQFAuQ3xNHUr8v\ny0KrBjKOVv4Eg50DB46G8f4lserzzBG1nJOhgd9nsVTnVuUn1jdtvf//Dk5F\nIs/9OlED6PjvOS+VPKfwtLghv0UXvM6OJSkrcWDa835UTVjkmjpX2FNVuNkL\nnEh3xqAwwbJN/nCr64aYsCBoKlc4L04iatr+ZbWmpYmQOBhG2XAzhKEM6MsY\nHuESxLuT/omOqOycxjGn6w2eoLNSpE1b2VqlZQj2MQ64iwbGIIYENn9ZEPyi\ngfm3\r\n=m2eY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"62b1b9d30d76491c7060be54a50d2c7ebf4d5e88","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^11.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^5.4.2","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.5-renovate-major-external-major-62b1b9d30d76491c7060be54a50d2c7ebf4d5e88_1621897230637_0.9942079520651066","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.5":{"name":"@balena/jellyfish-client-sdk","version":"4.4.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4136335f1cd5fedab36e9d13126220a43ba4bd1a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.5.tgz","fileCount":39,"integrity":"sha512-WZNUDUAjK4f9jaViuiST+4kv2R5VE0RAK3DH5CSNQtO1b8EeBLP/3HB3VVACurq5r0PA+3JY7wk3VmATuBdXNA==","signatures":[{"sig":"MEYCIQCLxMl941s9RxhwfaX5pXAsNHSGDt6f9vjZk5+9hPKLEwIhAO6c+3UM/63NLOq/Ls5S1lyR+FC8keAmialvGPTNS9Ht","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254135,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrD8zCRA9TVsSAnZWagAA2acP/Atv2auyDXj65DIdxF3x\n/LO2sFQz7habhoBhhzTivObtQif0cWRhpPMiviPOeQ+aUie76xqhzQgLUzOA\nxnQEbBTSqPZPE5eMNKJbFt2zVyJj10GVYXCRUxIqlJtHkBgpefA4voF0IuhI\nTsaw5arxBCeJDy1H6L/ZcnhCo5AnU4tA4d++g6aBQAYRDI9wBLMx5vY+Zzyg\nM55OVJh11+EJ4yyPFqlL+pXtFyRd62IJaPEh6rPYJEXgAaoBSuJJy4pNWrMW\n/NKoM+9TYQFx5Kcf1NtHQ0o899jcCoOlZ6zYmpUxoXdQfWSrr8qfGXQgwc5v\nZ4HU+CaT1zVelydI5Y7EwozAUBGZEMEyHmymzJu/GB3qN8BMReuJPJBvaHU+\nJ2K6CawD7p1QpM0T1oRRVV2OKai35ULbDZ+tTV1z6DULIkTtwTHRKe34cGYc\ncQS/Aa552GVMuT1+9pFkhWSLOts9vXEwsj2KkIVxmoc9P/2WcKgqrWjhlJG2\nfLv5C+5zsn7ymmPc1lXTswQjrostxXcg49OD/NBVMEjiXQqF7mr64YN5W6RA\npYi7PgbwNd+nI/HaBjFaInkAog/Q7JIyxiMVDboICVL14Kh2wMWa03aQFUKb\nHdHkl5xYsPaRbvhRmYKtNonSBShcmbRFmuLVA/3z5xnjQVuug6Ip1Th4CzQ9\nKikd\r\n=EpaA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"33c9c09b4a626c343b3951b24edf8752b61a96c1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.5_1621901107086_0.2123391700308923","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.6-renovate-major-external-major-c9d6b5ec75f674e7f13b0fb1eb37f6e58ee6ab7c":{"name":"@balena/jellyfish-client-sdk","version":"4.4.6-renovate-major-external-major-c9d6b5ec75f674e7f13b0fb1eb37f6e58ee6ab7c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.6-renovate-major-external-major-c9d6b5ec75f674e7f13b0fb1eb37f6e58ee6ab7c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b21e7eecc2e2dd732f240e406bba412d7c918ec4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.6-renovate-major-external-major-c9d6b5ec75f674e7f13b0fb1eb37f6e58ee6ab7c.tgz","fileCount":39,"integrity":"sha512-BB1YDbhEZY92KwFkKaBHQm1EAauacaVHQzY0RgDX4jwChMlF29+iMWcENazZfpsOUMD2grixVlfnXZR6pVXp7A==","signatures":[{"sig":"MEYCIQDgD5X6GQEpleNf64qLqtQQKjnxKzuCIdPcKCbyDCvDEgIhAOf5Al0Nz+NWAcK55IZGHetoTSyFZ/WLZpg4oUktzfRP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrEH7CRA9TVsSAnZWagAA9TUQAJ/3pssONTY6s4peZV6u\nh/ZxZla4czH4c7PrGdXjTgohjUpAZ+s0v/M1e0TWxiliC+IbnUnNjCp9p/lf\nq/gmr50xSKL1VqCl5KAjnVht2LX3aw5F7+l7KBx6qzYFwsrO1hgqRVkHJvLR\nQO6Vl5BchdoUQUKOOgaS6WpOhOjGzOKVbUtt6HOO6z6BjAsSZVq0edSWJXFx\nNfemBedIjigqfw4tTG5z6RSQ/SSFqpRdI99uwWap6xhgMFD4A3qBrzdRL4dT\nrxfIWLZ1qLBCdTm+gZ/xzinhhrcIkE4zmc59k2/LLJNQy0TRfurNB/Oms4XV\nZvNKvsu/3O5iC+Gbif6rNUH1JXhiN2pxEVMN3IeD8RqDFwtLQ+oF9vrBUF0C\nW0c/CttMMjdNeNf9ioIB/t9EMFJlaIXQeSxvj3I4j/00ZYj70lVtJZUT1Bj6\nfxQZ16mwWKz0DFdQ1ymKarlbZMn6XubrQe+xZdcZ5us+ApD9c1vUADBdbZNW\nxdnCD7YU2YPOvipAWs08i+pHVOSkBT/suzvt6wVBlXxcB7PXOt7Bc8uNyPBk\nSVbj/RUIiNvj1t0gMEcPp8o9XGDiwWMmgnTyNPpl5efc/APMKjdWr2HfgBGn\nHrPEeSqqM3Cnz6YCILe/xsNFXzchoF0gWyATnsvlB75QlphldvLB9VvdvMKT\nkxv+\r\n=urHz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c9d6b5ec75f674e7f13b0fb1eb37f6e58ee6ab7c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^11.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.121","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.6-renovate-major-external-major-c9d6b5ec75f674e7f13b0fb1eb37f6e58ee6ab7c_1621901818891_0.983704845157193","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.6-renovate-internal-patch-ad38507d61785795af757b2270f77bae9f4ecdcf":{"name":"@balena/jellyfish-client-sdk","version":"4.4.6-renovate-internal-patch-ad38507d61785795af757b2270f77bae9f4ecdcf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.6-renovate-internal-patch-ad38507d61785795af757b2270f77bae9f4ecdcf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8539b7a4d57a01cbe03baf31170d15c1f9cdf79e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.6-renovate-internal-patch-ad38507d61785795af757b2270f77bae9f4ecdcf.tgz","fileCount":39,"integrity":"sha512-ccNAg8lIRhyzSO/5JrURQl6bG+z0vkN5lBRG6rAcI650bhO8KMo439vE0AEiw04k0lQZxb7ocwqAEMKkQOBYaQ==","signatures":[{"sig":"MEQCIEg/R+FVU/YyHZ5qOC0E9lhjDMRG1uiNKuzuuMlBTaYnAiBrA4xw7pIUBZVxuH1dAG5gIYz+wiiOOh5fi7POrElzMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrF8JCRA9TVsSAnZWagAAyIEP/jd4HsXiCUQLNb4XBo28\nOikZ7e/PmprtEQTSYk+/VfdCtSMovdYQCA8echBycJzX9vjwU/re3Jay92vI\n1AfggswoNWcGFacKFbLHne+VD5Zfwihn98HIXV0mzrjP5Gd5Ax9rQBd2dObN\ngtDK2IYmYS0HqfFV6HJz8oAvfHDJpP/4scwc/bLD6rDE2ChpNoV7OkOIX6/g\nIO/gRcpiU8XgWrN0ftp8wlN//xtcVDTwWGLQdawJHxJ0Y3ipjk+F/KEuBrEu\nZ6lwxB7ZHPxVzyGCp3WKlRhtbUsjmDRGFk+aQZpaEQeWG8pEsw0Adxd54iFF\nTZQkuy19C9AWYcda/N3w8lVFti2SR170sdfffwxJ9FrLISyH7pSJ1+PwD6Ot\ndsWAwylEBTIupTng1cWn/Szm3EbzRbrlDRTSVf9AjEOwsDAQGQn4XreBCW5W\nyXJYGWqReDcXmep0XfxnC6OWtOLwi+OslQ4lW1+1YOxx8sRUNP8iV3BHYlmW\neYUzHpRjkcG+BRbx2EYpKqp7y0BlD1KgqE9V+1aS76Plr0j0jJLmeCj1+0ey\nHi5mq+S5zvjOHCL5D068lKxgJEyte3S7NlGybi5ge71mkD6If+OzB+at/v05\n/L8/nsok8n1BGvT44KOic1aJ1H3p/kjHwQtnrnJ9i0IFYDGjMN2T4n5PN+Vz\nEIH8\r\n=XW3g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ad38507d61785795af757b2270f77bae9f4ecdcf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.6-renovate-internal-patch-ad38507d61785795af757b2270f77bae9f4ecdcf_1621909256771_0.14860132252901215","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.6":{"name":"@balena/jellyfish-client-sdk","version":"4.4.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e8e07814d1f1e0d372349382d4fb6008d1a816ff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.6.tgz","fileCount":39,"integrity":"sha512-6XO6fa1Iww9xHe7p2LApILItP5M9f/J7ArFhI0r5w5ijy7KklDjqOsZUmAw4SgP38NOt+Xpp4XKhWj2NdfFz6Q==","signatures":[{"sig":"MEUCID0ZUw6OGRMDQuqJcnXMKoLWZDIJTppAM9o+YUdwpLUoAiEA+y7SR5ss7J0LdopGyBS72eszro+kBxUAuGiLFa/3KMs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrF/6CRA9TVsSAnZWagAANtgQAIp2A9rsqOItDyd3akrZ\nEz+JJhFobbJ9Rznwm5YARPGhWuE37+hccY5OsBrKwF8sDLbwT55LUxenLk9M\nk6LzQ+2/fvq61rXBAvqqg9+KbZL0mRGnsPJXCfJdmd0NG2PQeYz2K8eorOmo\nf87b/eojr+R6MLL86IozTkBJCHCESp3AeBHvwUARW9qdSMnQ5neuz/JPyU6J\n1oQC2rjnWnI7oVaYA3H9+Lkgy7CYvehVAk083tgYT3vmQSASxrUK+7NWlDHh\nJFpOiQ7yr+GLdDCqJclMEQsE3K/+lJRqh9XsBJ2HpNd9NLesc15mT7yhil2/\n1moJCbuoye5M3c7+vkM08EJMeleO7VW4z+tSF3RREzi8mn234mr0O19G4u+c\nJE/3EjpvVtFhC3ooWtfrkdIpYpKvM6h9gIosIR9PgJJ2V+Hak+6jNxdcwnSJ\nm/T4xMLoOB7ynzxEVk5oZtCfc4cUD+BQuJl8AWsN36ZtxT0+SL8WwerNs3dh\n9fPtINVQc2Ugwzw1LGCkw1sJJZTVyM4G1neHc9A3tB8DwSX/edOt+rZ2yfhB\nScz4tZPN0YcHJor8yGRLu9ZXG8fWau4dBqMfL6HN/u6G1xUzaPcbF/2y7JI4\nnLdqPwzOlmqbtErYKl7VF8kUQtSAMJk7ojMC/y9HT5ecNu4hQzlcSslAAsD9\na7tM\r\n=bR7/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"39f96aed82eda0cb7a6e22bb880f8fb709f6a2d5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.6_1621909497949_0.40584870687274344","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-renovate-major-external-major-7f24c58783c013444fda51a403523342ecfea19d":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-renovate-major-external-major-7f24c58783c013444fda51a403523342ecfea19d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-renovate-major-external-major-7f24c58783c013444fda51a403523342ecfea19d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"204484119be171e1f851f4293fd964b36b021b13","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-renovate-major-external-major-7f24c58783c013444fda51a403523342ecfea19d.tgz","fileCount":39,"integrity":"sha512-eTeJS2hT+En2kc88Z9Dxv2CnoYojs/DythRRcCzCTjS3X+5u+IvhdZJZ2eWcOhAf3vzMh5IS8OnMlTFBCq6JWA==","signatures":[{"sig":"MEYCIQDfLgw930XpypMaSl/+uyn9jFgu8azha3AaTHHE3kWuAAIhAKf7cVwl31CX1btn/dLQQSkThUTft/jxG2Qi/pCU9IHj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrGFvCRA9TVsSAnZWagAAJuMP/Rnpj6ms0z91LlcXHxLq\nh3gPAEFUJeR3Okm/MHoxRL/TlQZHL3L/Np55uZEhdOSv8CiVpfxhMjSQjOSb\nV0nUYfqiFWo/t60Tf38AdmJm/uJX+1I/h0X5XxWVeUK012DduKRTmx5PTg+H\ns0Xq4YXZi5pcKaM6d8mv9igwOYu/zBC9SaNflbw9sTzjPDI/yYSbs+6gzB9b\nxKdHlb3knFBkRmEQ0k6tOTlKXis3YSbPxAVm2XKWWIRQi7kb75fBuDNanrqw\nGk4v7CKKatu/JfuZGrHa63aXp/GZh0mWw8kqXNXtH3v1mlgsoj93H4srVS9Z\ngsov6FbHjAlQMVQssCqo2KkEGmGOKlZJ67iC3poADlOCd32/YbNaEEDXW0lv\nh+dui7wl6yYGXlaPqkK02D0YehNEKy3X7Rxe7odmpLdWaZ7ilxVoE2r79WK/\nB/8843mJ5J2zcPi+TGZpG0TFqDeUn4OEOMKFhOQ0gsOfSsjTcHqjJ/0wmcKX\nMtOtMaTrlb0hItzWXjD6LNl9QMCQFcsVyAkl/9MVQAgmDjfNpeZLututhAed\n0I8+3SaPMqeRAyqd784TX3uhoTTXe9Rf9PdKdVgg0MQdoDn7yWaLuVA0F2l2\nCrgnDrdK7Tlq0qGASSBQdQXbq3rARg0e8uoe57O5tK32s+K6BEXwDynmk082\nZ9U5\r\n=h+LK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7f24c58783c013444fda51a403523342ecfea19d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^11.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-renovate-major-external-major-7f24c58783c013444fda51a403523342ecfea19d_1621909871216_0.8339128525333741","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-renovate-major-external-major-1b0a0fde3ae188b91d969b1850930109f90110ed":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-renovate-major-external-major-1b0a0fde3ae188b91d969b1850930109f90110ed","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-renovate-major-external-major-1b0a0fde3ae188b91d969b1850930109f90110ed","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"14249fb4e4374c25ca28f74431d2c0a99ad9677f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-renovate-major-external-major-1b0a0fde3ae188b91d969b1850930109f90110ed.tgz","fileCount":39,"integrity":"sha512-E3wvrrd/clH9sSuPlxRs7Y9kpRLNDoav8DL8NY8fGWB3VFIKCfMQ/K0mkLyYF5w5It8bQtetkgiDM27Y1+x5iA==","signatures":[{"sig":"MEQCICRpTk8Lx+X9eRnikMpUtcpBTBFiA5dGBrK3JvT+DRH/AiAgTDYWhJ8CMu1ypvPzOjf/3eCfpXDXqHNLUZfEE//NCQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrMXsCRA9TVsSAnZWagAAgXkP/Rehqtd8nqxr8ON17lMr\nw9J+oZnXnEzSdmc9brMGfFWqmJwZcm9IALlVI6bPPi1sZLpHVnNmIj57rdu+\nz0quCaK65BJHnl7HvPUukSRzAGq4NWuIdboprskAAdMfYhRjj2JS+GTo4xdw\n2X8YNP7raRqmwu6Dl76ti+WzNj4B3GzpjbxX9Bx3kEk8+i8dmVyie0QyZ4ad\n0pMp4F/EPoMAXoSWFLdbjd1JIBdCQjRpmDGzgKoyIm5JKrxuGUNPNKe+tfHx\ngPl33QAk1Bo3CrjEwZH0S+FT/UMnVZD0jkfLbqlrJi0fk3v9aaQnisD/xtiC\nnM1TOG/HwCY26du+BqLGGREPAJX3WsL56pqIaqh2jLf+S0kOZcjJuNqG7ojX\nhaxtDwELbad5BzCmwYJK0FOznqWpUmMufDRy6+FcFEdohYP2ZtUtOoPLpU6Z\naiktt4F4t5BANH+3YOOAdcRuhGnYBSMo9eHbhHvMu4E5WklLEhRuc9cDFsvX\ntsZ3V8bKpjwRiu/wrJ05qABKR/ZQop5Cubl/YMtSGzGy2lHJSSmcqTOZRPU/\nyMREvOGS1vbSHyLiVAwbpR0S0iS27CnI6V7379kXffX+/6DaDwn3NazQFmhq\nJXha/aP2ygKqZpRElNDb82zxbDOT1wKs+TSkmkdTho2O6By0jZYSwmqher0Y\n/xk7\r\n=w5LV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1b0a0fde3ae188b91d969b1850930109f90110ed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.0","nock":"^13.0.11","sinon":"^11.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-renovate-major-external-major-1b0a0fde3ae188b91d969b1850930109f90110ed_1621935595607_0.77101892416978","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-renovate-major-external-major-74b28df643e7135db980a325348a85296e5a62e4":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-renovate-major-external-major-74b28df643e7135db980a325348a85296e5a62e4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-renovate-major-external-major-74b28df643e7135db980a325348a85296e5a62e4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"282f126945758a27c3b94819003923b4cd490d3b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-renovate-major-external-major-74b28df643e7135db980a325348a85296e5a62e4.tgz","fileCount":39,"integrity":"sha512-VFhYKlCUg0XgdxzzMhoFzPPustk8rwED3s0BTPBQhhdlnMc8QupSmQpYrbEE7uIHsiXpJ1EI+SqaQCREQciJoA==","signatures":[{"sig":"MEUCIDka9JiFoAMahIfpD2lfNa3xEXig3JKARtf363IdH0pfAiEA9N925oBed/PNm0PGdlFYnPGEjW/SRi5eq1xhxbTg7js=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrOHNCRA9TVsSAnZWagAAohYP/RQDwXoU1ArVSSggjuS2\nm91YHty8UVnGwLbNwoFQTWnQCZ6f4Pzm7dqocEstqxtxPKM1HIW3CT5eMuxc\nymjLbBaTKiauMhI9ozke9ZTCoEyPCUjLIG3Xgw6mmrLeoHXy4273w0PqPyVq\nJWYom7JG0+9uf1CfktnnQ1nxRYC0BmSE2CUH5mUmwghqfq2wHwUdiI+jKRwm\njMI4O8tqvMen8cmThrTVXIIaWMLrjiLZ50qcFNa3sxW0rFFCWfn6aBYhKi8J\na+8l8lTqEUxVH20FUhIPYexzAExAFI4WwJmSw24ADFEd81pbbQHW+aEkMSY5\nCpC2lMf0z9qTJ20jBUDi20wPfJC4AcMmTPOUXSwEnO0IG8WxXheRz4G3gzKv\n8HrrthEaL+GANghWW30Yx1Qsb8VMSLPtDM0EQgcAasg4N2nwNjnc9mBaTuV5\nBWU9RgP2Usv36wi2TFwW9NbcU0/lWr6MVnGgc7ua0vzdZ3WC5d8DNsT63+i/\nuZssstpY0fGgJpEJSvTIScG3uQKuDkJrEIi8vmMdWhlGtBI0mO1xR58fShEJ\nAkEus3BrVKriAoSzxUMdOmrMdW3PFAu9zW35OIlBauOhlWAo1iNNmSolPVhw\nUeG1j8cRj/DCRmwOdMT3hy9f/ODEMKR4p4ooqAt+ibaWF+ht0633VIS0t5IJ\nxtjl\r\n=8UbJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"74b28df643e7135db980a325348a85296e5a62e4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-renovate-major-external-major-74b28df643e7135db980a325348a85296e5a62e4_1621942733228_0.7057578590990792","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-renovate-major-external-major-491faca3edfab7c28c9bae77d06bb3990b753153":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-renovate-major-external-major-491faca3edfab7c28c9bae77d06bb3990b753153","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-renovate-major-external-major-491faca3edfab7c28c9bae77d06bb3990b753153","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2430b2b8df2e9a03cf6a5c4326ade7f7cb7229d9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-renovate-major-external-major-491faca3edfab7c28c9bae77d06bb3990b753153.tgz","fileCount":39,"integrity":"sha512-eRQYMA3FS/HaAJuZsJDaM0GDwELSrrby7k9F0b4Dc2CWsAF/WjnTXQshk02l+wYG2wFX/vwIrZL1OzRP3NbqhQ==","signatures":[{"sig":"MEYCIQDTUez7aga+xHpoYpBYYjSIpEZikghUV2qvtkFXKkFt5wIhAKXmcpeRdu8fIGQgHqHENg59NKNJicrFX+hQzNBMHH8G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrQOvCRA9TVsSAnZWagAAkvIP/2IvZolwUaPtJw3/hAQj\nhEaXyoS/Rq94xZBkUOroDY/mC9+kOZVaqe//dvS4a+Jxg2EhUuYI543x+P5d\n7VIJiK859xVCVatkjuA2KpNw3zUSOgwbQSwyxBQSiLl4WYHaBkM7y9cM/yPQ\nULo+LECwnaLvl9tvjYGodLSywRN+BFfq8Cs7Ze2x4LzDUcRCbNjUMuqDeLdq\nZ5fkx8VQYb9F7F6178ZoTOdc6cBivArKZy31OPoth94VCE0GuRbbnNYeKwxP\nKg3stm4pztw3TSVfHAo0YAEhmUTbgenVY6DfVxt9LXnEg3GBimGd9XGkH+I0\neCwWuYuO0tPZp4gpAM8PK/O04MEbbEHclRuGNB2ked+e7So30vGzeGU3hMj9\n+SBE0zwRPAGxtb0cFXVzBderpSkvlrPXeO7Im0r6mzzCVskzxz45Y7QmIoef\nOtZVyNCwW/lFWOPYxsp0eH8cGgS1jw2r7GIeFgjMOGjDaN5EZoFIo1ShKYrq\ncRzrKboy8/pBKLfUQ4urIsuOu8YH2LBKY0hJwTxHAZQt8F9N0vRQpZMg7560\nr0YwC9l5EtYJ7ik3/Hc5zv3jF4guk5UrJ0ewzpcFWIjoHeQcO49NcLbj85i/\n4H2HUqo1WCyWK3J1TgO6Y1Wlbsmg2PfXzevidAEIx5Mf9imlc04ggW135nDo\nNax7\r\n=Rib/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"491faca3edfab7c28c9bae77d06bb3990b753153","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-renovate-major-external-major-491faca3edfab7c28c9bae77d06bb3990b753153_1621951406880_0.8774280656081066","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-renovate-major-external-major-e373e4323c558e405d23ba430892b3795667ec29":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-renovate-major-external-major-e373e4323c558e405d23ba430892b3795667ec29","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-renovate-major-external-major-e373e4323c558e405d23ba430892b3795667ec29","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7d2406bef43289fc07b0a14d474b53d0ac2e55aa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-renovate-major-external-major-e373e4323c558e405d23ba430892b3795667ec29.tgz","fileCount":39,"integrity":"sha512-LTD0M+LUfkHHKj2u4h+ScOnvJ27l0XoeHKu0hhJHXJTvHjZA9kmuVvagCnq+IKv9VrPxc/M5O6TqfCAsw4Eu0w==","signatures":[{"sig":"MEQCIG+8cBslD5GQ7zsFFuse4Bs4sD2VuaqzOZlQymbTVGScAiAMCNgWpSL6M3HPKO+HdimkEM9JlTHVIpc+dBKxuoNR2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrYZYCRA9TVsSAnZWagAAZIQP/A5AqfR6epYIFGtsLA/x\nFMPP2gxRGMIYEdjsqKyLa1sn6MRxn+8gC0sQO9qBgUX/IzPb94Ynup1xD4hh\n1J+E0yYm46ccPzExYsR0oXtSaHZVyZs7HFRZr+RHVdL/84ZbkFqpfecRDJ0C\noL4Gw6MDpPJOOvIb4xDdhWGvjOFxUmpGrDAQoaaEGfM+zNFu5/+20rYu8XYC\nnUn3DOl0qhiFgnrrjwP8UwjBI7qR+oKTPVQQbFZxiwKFQU8bgZwsUM9SQN5g\nqjIyvt5EIKraPebP7Ydr9yWUse0ppAiPPevtMZYClrU8AU7x+Kbrqrrqj9Eu\nQJfONreRtNoLQtypcoleTuDbR2/iT5qh84c7BZ/fuOe8pBJD+sGk19x8JPmu\n58Ozg8tVoRJj+p7mWFomaxTVUmNISu1eXhDb2MMzXwu0NVZ68GEIqod2xZeP\nXQcSOpHgPfAwQRI4CpiNQMDi/c6/dLf9gJld+zeCDlwTReCpt6DcSO3//lwd\nELAo76x7u6Br/21D/IgNKyLLpT4CCyDGYda9qjYIeJ8V2Pdv3e0u6mEVnKiX\nsUFD5WrzHSNW3ZJ9TFTIA5/JUKLe1kM9xKUUE3YpNDw8cnX8kqgiLdZlMzT9\nPmWEzynVCpx5Wf4TYGpZXJiM7o5xdQ0MPIVILZrMnxkLQf1xw8SSvsX3rsH/\nok5w\r\n=X4CT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e373e4323c558e405d23ba430892b3795667ec29","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.0","deplint":"^1.1.3","ts-jest":"^27.0.0","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-renovate-major-external-major-e373e4323c558e405d23ba430892b3795667ec29_1621984856332_0.04690789136060536","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-renovate-major-external-major-949549905ddedf888747e2d8f989c4bba7962928":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-renovate-major-external-major-949549905ddedf888747e2d8f989c4bba7962928","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-renovate-major-external-major-949549905ddedf888747e2d8f989c4bba7962928","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"21f310440696e8c128bea73efb0e2667babbea07","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-renovate-major-external-major-949549905ddedf888747e2d8f989c4bba7962928.tgz","fileCount":39,"integrity":"sha512-a1upmHvhEwnyZk/TjFsNBlWYk8gyjMvImn5YwQEn0tIZ9LsXQgKNYonIS22GBxJLKn4DRIfnH7TkOwxFbRZABQ==","signatures":[{"sig":"MEYCIQDJj9Aly2mjYecUc9havkEcur9F8e6p8Tq69Uj/3/FjJgIhAMyRfNK5O7PHp96/a/KH75WUqhloRyqrwFtxvs2rFCon","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrmkSCRA9TVsSAnZWagAArjcP/j5He5eHVvlCUxXqZ8hs\nLZ5be0eqoWkUcmyUiPuV3Ij7aBMzA/rWXYLGyv6Mcx7TKKXYP2EJTisZiu4W\ngoc//2Kf6RiDS6/+wHBp4BaV3KKHcNSDjEzxJD3aG6MCHFMB52p+Ddt+2gYT\nWgS4MxA4gZjG/D9BgfeTuplcpI97ETLj/FB6uuOZCtSwqTbSgDqPoqpmhVSn\n8voYwbmsn1rPNjBbhaze/MT5xFQVQ1KFlkuSluvZOvp585CfRHeAbMoIMzoN\nfmq0WOP02uQH7OLrtB97SMU9vbC1Gr1Gt1JEZOT3owF9VWbIwYtWAptolG/M\nHAX/CrAhGH8EGQRY2GdYUchy0yZo5LTEv/uSlzk2Nb9XDPlbQpQBshAV2oHE\nkwaWSk4kO5hevlpODradNvQcEQV1RnviPRXLl70Q/0CtWLc+aVE9yVYzH/Y0\n+QmwL+qt7J/ycvcYVyrjcIlGLfbJfmtc0olnPRmUH8N3oetVpl+UfW5z+Yow\n7XX3r7VWnCo5xMhx+5zeJa12h15khq1rWDC+vntDf4JPGjco+6hGv+z7yRib\nDpH7+joCxlZsu6eG+Hr5ayZZhR8wV0EQUY5KHEH+wo4Wg+RLefz/KzUkNJGc\n/rI4gojf0CFoDXQh4D4x8/Y+/+35nWPExujZStWDYWYZ1DWLImaaeMz4gfEc\n4zIo\r\n=gDhZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"949549905ddedf888747e2d8f989c4bba7962928","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.0","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-renovate-major-external-major-949549905ddedf888747e2d8f989c4bba7962928_1622042898074_0.24074746391853896","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-renovate-major-external-major-4566b46dd3684529afe2b2a4dacc749027eb8314":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-renovate-major-external-major-4566b46dd3684529afe2b2a4dacc749027eb8314","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-renovate-major-external-major-4566b46dd3684529afe2b2a4dacc749027eb8314","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0eb8b4f86540aa3988709d4d3786f9a6d5c6c3ac","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-renovate-major-external-major-4566b46dd3684529afe2b2a4dacc749027eb8314.tgz","fileCount":39,"integrity":"sha512-dJA22GM5w5RH3jZ4r0HBHkjr5y7h2hxyftBlAarP2rrK5iryv7P/cww+eRX2vsKiD0Hbg8HAigmZwH1KZDbWxg==","signatures":[{"sig":"MEUCIBuF9+s2MjW7wN8pd4sDsC2YAkl57fRrQ0RMqAGVw+tbAiEA3SJB/0UMImL+ziF1WHZpVeKrWSb0LEmm+BtNtnbRC2g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgruPiCRA9TVsSAnZWagAA8LQP/00ImPn9ayIrgdpP2Rol\nq2l1zp+XwmaGSjqbNrjQFL4vLAQGgDQDblNkLCbqZLtugzC7m4VwTp3OChcB\nzlEMlEpfbkpX/HlhooxeS52sVL3gjkSOOd70LY43Nb5q/fbNPVp3hKg7XUvf\n6Gdkpb+7BPcmlr8m4PnWV15iM8mOGz7jjR/+akQA9rfnda1PaCknyzPmJwi9\nkmb51J0FkXn2Hr1uE6Olxfqut7rpwNbEHt/ZHVRv1v6YcIvrpQ3nLQCXFzm/\nrl504AOcTwtt1KDYbvBk+1Q5uuoPYavmFYB5KLFffLNeoCF+nsxL1T2rCj8C\npe8yF+9mE7xP673HJ0EaHhw+Cl5xKj1yfUSxn1DnsHoyyXqgNBDqMyckzFPk\nKIzpoM00y+S9zpZZ5LIz5vIzP7k1iUmET0vAxfqvylu2hsLJEOVyYQXWpzBA\ni4GDWCa9Ti0Cp8kw5tuqlzUd3HB8CfgmBTDmwAGZHieoPyXG/lDkMRWryXqV\n0k6O+rij4y6yPGT6uInMjEHnSNn5H27N5CLVwU/OY4ynE/tZxUOQtf/Uy6RV\nE0l+4iK+PnmrfE6temNP0z3zks2UGFDS+ahRxqO/V38hfw24PWRzih0i1yek\nRsHgZ1raNsXfVTfFJ92Z/wzpASbdvoGeEtgscD93MHvpLatRzFVCTVQXXLTe\nXrSb\r\n=TwmF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4566b46dd3684529afe2b2a4dacc749027eb8314","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-renovate-major-external-major-4566b46dd3684529afe2b2a4dacc749027eb8314_1622074338235_0.0016480339054982807","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-repo-sync-jellyfish-config-default-e8ae90bb8f43c5bab6d369452ee0e0f38d77f47c":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-repo-sync-jellyfish-config-default-e8ae90bb8f43c5bab6d369452ee0e0f38d77f47c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-repo-sync-jellyfish-config-default-e8ae90bb8f43c5bab6d369452ee0e0f38d77f47c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d4bb7bffc505dfb8144f094a53e18bcaad953a13","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-repo-sync-jellyfish-config-default-e8ae90bb8f43c5bab6d369452ee0e0f38d77f47c.tgz","fileCount":39,"integrity":"sha512-MPRJjzdjx+P5rTqiMEvsLs5c09XRYgggYEPYmY8CznjC043/WdSPgu1CCng9o4a5pbKOhe74BN5JLeURc6yHjw==","signatures":[{"sig":"MEUCICdpyz+oBSK3NQfL4SDzD5BXCenvQ5eK4P8KiFolwh12AiEAyE1Unk/5bZ9+Yg9gAB3S4kroC/zoBAXc3YwqXomw1+0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrvQoCRA9TVsSAnZWagAA5DAQAJhI1YDZUcMglpMr3/cL\nM5KTDYYdRuqt/ph0BfXTpgy12csyPk6zDNHmlZCTMXzjys1pmyYcR2OtwWKb\nzRCzoq5sBHHPONd6gq+v1wQMorH4NTr6IkTMwq2a7QCBAReYOsrLqeqwnMM+\nCzIZsEOOmRM6hXQV12cf3/tfWWL2JOTldZrfqa5IiN7+VAlNrMM6T1dDDgra\nOR8sgETatw9DeyeFjoMQYkFB2Wj+jJX002Ol54JNvtGqyiLVUqgYHPRIyPpJ\nKQKwoxncc4fo2WXbABQ+LLMo4vksRx8vQeBOQWsdc+owf+kthaeb7I8WJkRg\nlEdkL3NV+nno2A8+r/kaH6OjEalK7SufDl/ZHU5UWLVpQG6UTbAZ7lwH8ZWH\nZLxx3jC4Q8JA15E4oEEbbEx05vvWxvJ0YIce9A9qK+Bs2cs7DwOwiTVlccow\nLVVwhDIZsei/hqaOxc/1izn4wZXbqRVv8B71MoxZJ2a2FKck1/fgbngRM93q\nuSsrXoeeBO6AgCUXeiNrRv8WFHrK249wgrabJaGdfmcPHjn+WJQqb96uykai\n3ninDRy/ybyQBR0LY/2LgPlGA3YyWdF3oTikG4MnKclqxSfKSbyTcYwr29AP\n6zRyij7Ahuu1r97ITihiKPlVEV1ZKd/9Id4vWiBgVe+0/2HiHg7RJljkBa7m\nUVN5\r\n=ZSOV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e8ae90bb8f43c5bab6d369452ee0e0f38d77f47c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-repo-sync-jellyfish-config-default-e8ae90bb8f43c5bab6d369452ee0e0f38d77f47c_1622078503794_0.7221958722302395","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-repo-sync-jellyfish-config-default-cefee681942c2f47010d0bcbe99ef7d3985f0921":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-repo-sync-jellyfish-config-default-cefee681942c2f47010d0bcbe99ef7d3985f0921","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-repo-sync-jellyfish-config-default-cefee681942c2f47010d0bcbe99ef7d3985f0921","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8fc45a04d05ff445aaf321e17fbe38f150bd4d86","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-repo-sync-jellyfish-config-default-cefee681942c2f47010d0bcbe99ef7d3985f0921.tgz","fileCount":39,"integrity":"sha512-XYIJinMqFhKiI8Zg3a2Ko0h1xdFVHzHbV7ZBzNPnW7QABh7h6hEMuFugUaR8EPomG8by6j1CLxaQw1TOBaryyw==","signatures":[{"sig":"MEUCIARrBFZtj5v+J2OSCMqVjLil4G72lC6qUrsOLqThcHnWAiEA2vcFGzI5rM6wytRYQPGKK4o/T9PD6fSxsvmLIkTNxX8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrxFJCRA9TVsSAnZWagAAJE8P/0BDBUYGtbIHll/PNRiE\nl+OdkZluVmEckVXCU80JCacp2d8RQobY0tF1Od4gZ5gG/+n93YuTdBxHgFEI\nZMtH1D0wj1bUT0wX/4LQw2dUfMkUOV7fs62HRzyuyCGAzY33iceXa+F49MFQ\nRxofPLdSNRTU4aTnSiB+7EoP7Bbtz3YrGbngJp4mB5tqIhDwlLH1rkhDGyhW\nsyNxZIDlkF7/UdxPssfVgjPdMLRsNGTUV1uX6u73RLGj6BTiasS2lzuravwP\nriw7Ig2w/SvJq/YRD68i2UhXjcUHPurakmRNZ5PDxTCzo+q1LJqoxxXaCGnn\nbXQL4P2ULqhiY7tu0bu66YfoLZ1mooYi+bTxyoFqa3pHtztDdM662bmvPIP+\nwJcqSET6yTOq1ce7eBsHe1Ke5dEIe0DPj01LFXZnLx2cM1sd9Iv6YSIrYdu+\nOXkSgQGUujvG4q4K6CExg6ruIs0Cc4lgyd1m6ga5MCU6y+INifrolXB8xqWy\nv/7N7Xc9dgYlXAsROsY5t8SiSFdK8RcgMOExq1mUH+l3FtHC0xXbJapqDdqC\nfiUP/PDOx2KyiVMTO+fhJ/2kKxNo30aF+7Fr+py5WCt/pZIF8X1aE5QWWbEy\n91BFqswg1JF8R4cHbhWiBk7R5fzM0E5FclyCCKTe5bK+TyLE3LFGxU6CX2ka\ni5Ge\r\n=CrEn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cefee681942c2f47010d0bcbe99ef7d3985f0921","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.124","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-repo-sync-jellyfish-config-default-cefee681942c2f47010d0bcbe99ef7d3985f0921_1622085960720_0.9957418611575402","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7-renovate-internal-patch-4f85e23119a2d78cf9785ee59af89913682d92e8":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7-renovate-internal-patch-4f85e23119a2d78cf9785ee59af89913682d92e8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7-renovate-internal-patch-4f85e23119a2d78cf9785ee59af89913682d92e8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"339de07ec8af3ee555bb23b1dbe766ce1154c5e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7-renovate-internal-patch-4f85e23119a2d78cf9785ee59af89913682d92e8.tgz","fileCount":39,"integrity":"sha512-r3AszP4c/Z/aEs/jVLWaT+h0av4zDS0GtvVCosO/pBmiEXtd6PVr4pn+9PQTJpQhXcyLAh/Qp8kIj+6d4miJ9g==","signatures":[{"sig":"MEQCIGWfpeBlbrtGNbvolSTF69QV5FpwDVUxCfKIhBCWGqjUAiBHbsvGm0tD6754bJ2quQWbA6vCfDRzvRLPlnz3rYD7eQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrxJ4CRA9TVsSAnZWagAAlS8P/ilyf/OWKUJTIPx4D/d8\nyVomyqERaRWDjhfhs7eQsfFBwOacl5iobZVKCd6hPA/ksPLcNTcN1zQQ8XUl\n0JCG8FQSe+OrtQWNv9WKn8jRUAHDpol0ISO3IyG3YCC+nLL69Y/3HZAikzjo\ngyVV+MOKeGRa+u8TeDsJcPM0t5Bp4jZ1IsshXs1fvele4MVTIsQabu5E51ZN\nPLkG8JPcnZMN0kQP94ZFyjzbUdXAWa/sOhlwtXKejzJks7i/MdfowRQaequ2\nZUaPwrs9mY0buQmd6hiwchZY819F3McS/k4pPs0asMGPOnnXkihMPYn3Vzyr\nPrBrn0FjW6eMKN7Wp4HyMVgyowOd8Hw77ztBsvOi0L4tM6ps/Npr9kbKe/SU\nMCjAXFD2yVfV+95W79BD6wnDsnQ/rPuUIq8eeQyxyda/JlclpIqZzeyQza4N\n7xxfWjXzdkRUCogbFd59UVuWbgmYquLpZq4FqOZw8EmlK/pwIpQYp47FmuXg\n+ugmCnylKefHvQnFlQMqDkfsicxsLo/mqYz+oDbtb3BVCO06lM8IW4go22HX\neVCrPcBoz5wyzjWYtW4aCQBiVogL603lCix4Z+C8QBxstnkAJjjkvAMEJtqN\nsEAHUwFqzF8UyopNyFnA97AxfTWt5C2vp4i6q+9lzCO8S8B1HZEQG6fPlGpQ\nrIEK\r\n=FbBA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4f85e23119a2d78cf9785ee59af89913682d92e8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.125","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7-renovate-internal-patch-4f85e23119a2d78cf9785ee59af89913682d92e8_1622086263484_0.7613982122152025","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.7":{"name":"@balena/jellyfish-client-sdk","version":"4.4.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"28b368685ed990b11536d811b1693318ddec675a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.7.tgz","fileCount":39,"integrity":"sha512-qd82KyqxWD1l6vqMVywdmp1+4QPiDJr6E8SiqIlQM8rXienh7b/SexfkTlC9TlfJ/MwX83+Uui7hiovXMeQ9EQ==","signatures":[{"sig":"MEUCIQDZMqowqsb7VAjqvCp6SInyMyn18f5QqoFbaJhel4ljRAIgHePX7oIGjqhXdJboy4Da427PIJSGuiREjPQDtIbSl+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrxNGCRA9TVsSAnZWagAAgmIQAJQ6S/Wb9laOx3TDHqc+\nPBAJlJdkG3e9vU/I5mIm91sL+u7L09hCVAPyEoTNcwCRb9jJmtd1qO6dKRb+\nAO49DNq9ZP+++mqwlB5TRUkDwTSTMo6DFWaQSkiA2HiITzFmlD9Qkj+YTXpH\nM/PJSxwDvaHw5akFBBu2GgJYvlgHzNGsEu6ytnJXMRSXyYuEd6pTQUXwaMqv\njDoj7UGXwF3xuExXwDrJ1cVagAqUIuHHBYcxiIW3ZTSIj6QJQgjQ8Gnx0ONo\ne9Faj9O6KJIGyTgKqAm6SOYD2sqNl6M6GFX01C0SERnOO5W4zer1fKc8WFc4\ne/+br/rlz2lSa/u+9t0PIl2Ay/j2xq222ipaRC93/xlQ6ljN6cdoyZ/DhXdh\na/PrTFc51dd0Z4Fw3WwtLEyTb9+1mKtbEFE/OpwN9vLbCvB0lA7NIpcUJLu4\nhmEIxeE933JwjvIZt1dcx/sWLglodeSh9sye6PuvrKnYHy+aLboo4AAm4rRG\nHP0YLFNTyNu+ba+bdPm2hmTZcggourhB8Z4n9dy50s5ApxAfsNE1pjze40ce\nahFI3xldBq6wv5R3jEOUG8Ry34n8wJHh9UVhjHoXEzEuv/78dvDfTWXNzr1j\nvN2y1x4J3WA8FvOGFPV8C++pglgBPJbLQEZdOO7tO4GP1KGn9dNiu/+1EkjU\nuSeP\r\n=TnC6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7f395e3bf241b5bf5a6b42ef9bf04faa4e5220ff","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.125","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.7_1622086469944_0.927138187566428","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.8-renovate-major-external-major-2c9db5253a7d0be94a381e215398334943fa5b3c":{"name":"@balena/jellyfish-client-sdk","version":"4.4.8-renovate-major-external-major-2c9db5253a7d0be94a381e215398334943fa5b3c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.8-renovate-major-external-major-2c9db5253a7d0be94a381e215398334943fa5b3c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9f3b0e79555444c3c7c95dac8ab12cdad451b10f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.8-renovate-major-external-major-2c9db5253a7d0be94a381e215398334943fa5b3c.tgz","fileCount":39,"integrity":"sha512-xCRIjGLB4i6i4qBPN0bUHTpYpLoKDo8+lKeo1kgJB8zr7Ge2jjYSnUdVBeqVPmOipHvQziZedeZrCMmGn6q6iA==","signatures":[{"sig":"MEQCIERvn42ji0rEM8A6lPW7YAlMgUzLXzMelXmVXS4HX7vQAiAbCfKqEqlXk5Um/fE0p4X0LLy1BdVXACLN/hfK9f3mNA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrxQoCRA9TVsSAnZWagAARCQQAI6nLQSAdhgJLMKijLP/\n7qSroygUdq7ClX5WFys0mZCduUC91SwDa6OZQpMHlxP6bGdOCsscACvJ5TOD\nh5d0nKQqEVwJ9gV6uOyVxnJeFVe5vgaLcz+lYL1LXJQUflHSFVVf5CdjJkoe\n/CakbdOeBet3qK3kF53TqlvfasI4ZzjilAjs4BXtTFQGefTl9j2OeREGncrO\ndSrp3Nm1uGJFp/1Dy0spv2/AR+BZLgE+Lbq/GQWa1oV/WwcAZHA0GNeEEFvc\nsKU6cndIT/U2vj/L5jm0Xw5hkZ+WuNbX3MtlzDV+cGL7SnL8cw1w5J9nBqGm\n+DBQxfpqVr4jhtgtJdEIuhdoW+2Vwg7sgg4Awo4U6DjE6K752ZeaPMzW/OnA\nUbcTahsKZUFUm9fuqxCOxky/hmhQXLqNJDXkJ1f60YETg7+VnSN7amgrKWRo\nrOyBWtLoTbZRh9VcfVlfzoeC1131ie4Q5g7B1Tj2YoRKAaTDjpG2PuYdynaa\nAd2DIdxjj5jNO5BXKdLK6lbW9tma+jE0qo5D7T/diMKMKf9YEPSm5jZkQ/c8\nuwpoSUtjaYvoarC3Wqnb4OIk6F+l5ItSBGedh1stHsAZl9ftt+OSz64GUr3q\n1rmwvIkTF410KXOSy8XTIkqNb0mmJVfHS9VrOQrrTOgKGVj5EMxAMjCNg5zD\nF6ry\r\n=aLVJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2c9db5253a7d0be94a381e215398334943fa5b3c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.125","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.8-renovate-major-external-major-2c9db5253a7d0be94a381e215398334943fa5b3c_1622086695607_0.9547621961580648","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.8-repo-sync-jellyfish-config-default-831ff2751bbdbdf9f2b968a6122300d0071d7502":{"name":"@balena/jellyfish-client-sdk","version":"4.4.8-repo-sync-jellyfish-config-default-831ff2751bbdbdf9f2b968a6122300d0071d7502","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.8-repo-sync-jellyfish-config-default-831ff2751bbdbdf9f2b968a6122300d0071d7502","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24d49195059ff80711b35d6b336e5103fa300f20","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.8-repo-sync-jellyfish-config-default-831ff2751bbdbdf9f2b968a6122300d0071d7502.tgz","fileCount":39,"integrity":"sha512-+kIibNZUjzzNWQV+nk+6nLdA9MVhR5fpPOestTQZ0RUK7qLkz/88pi2D/2JHPOLKBloqa2yzIJCJIKXE2cnnZA==","signatures":[{"sig":"MEQCHziVoYAgRG5LLYTgIvsLUFv+JgiDuV+FCkLUJ2lyr8sCIQDJLHF5JEJV1RqkQ9dOSL6A2RPcYgSFNhigOGnLuyLXfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrx2BCRA9TVsSAnZWagAAnoIP/30kssti4yfiN9BQPTbb\nHXSOaDeu5+Wc0tUNTmEZ/2/aFNmqJKc48gflg1fiOjOZDyq+3/7A3vl9tDF3\nsVqmIDlVr5S/W/XFoZqJdQZHneHvL2U983deGz8VocWeRURs29SXpDTzm9Ao\nrRp4sCBuUh/dT5B0lcI7XIuaINj1fknH/A0R2FhbgupA6dMch4KmupeAcDXL\npnHVDtTyFr4XSSwg5HYhMmmDHennyp13/2/GM8e7kS+uYg2dUfbcG72eSdr3\ntZ3tKCy191cILgfftbg/fIzWatZfi/p9JKpU4IsTwBqhmcXCKsSlSQElyHar\np+1FFN2fy1Uc3+syKLAYj+QCK8g7gp6TFDOlMLHx4Hm3DDHi5zHEFEPRGutq\nlVKOoDlSPI2Bvn/HUCWtnOFed+gnGd7AFhd4mvStUKD5IMxu4qIoIwUfBA5m\n55CcaMsuWupYSVBeo+PkMc5ujrqX4JLbFcN2u+fWFDPHF4N5E6IK8i09xrl1\n+f6IL9c+2Dh/vX5RxaEKnuWbMKjYIkyjmhqx9XrpHcZ1o1Qay/ILBtuXEinB\nv7W1InfAvdxQ8rDHNu/9Ow3aqNFs44rlZ3E+vaaXoWgwBIXmxV9yFtpv9u49\nKCg5f0IFpIXqSxLx6HvAf2D0jMJquP8afJTfehwPNiZMzelOOcXuTVHdkxOf\nkfPh\r\n=kjQD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"831ff2751bbdbdf9f2b968a6122300d0071d7502","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.125","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.8-repo-sync-jellyfish-config-default-831ff2751bbdbdf9f2b968a6122300d0071d7502_1622089088647_0.17573952504091572","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.8-renovate-internal-patch-42aee5ec93fad57bcd953329b1fdf334cff7fa8e":{"name":"@balena/jellyfish-client-sdk","version":"4.4.8-renovate-internal-patch-42aee5ec93fad57bcd953329b1fdf334cff7fa8e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.8-renovate-internal-patch-42aee5ec93fad57bcd953329b1fdf334cff7fa8e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9d16b023a53ad34c6ce4429c3d74c3f044a357da","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.8-renovate-internal-patch-42aee5ec93fad57bcd953329b1fdf334cff7fa8e.tgz","fileCount":39,"integrity":"sha512-ylfxF2lSdHSSPsuP4r39d+fulrFYK3coUtucyr4pkP8vm5LvtB0snsBzb3saVnGsI9aa4z+FkGhG6W4dwXi7cA==","signatures":[{"sig":"MEUCICiEf5b4HQb+0AwHESPcF/PLewpOwnamVQSIVkbDgUkcAiEAiRxNAniuSYv7Sn7ZuT49G/JgM5KNa7CdYS7GZhgnzZ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgry60CRA9TVsSAnZWagAAOPsP/jB1sEOmLgYG0OJUcfIW\nvrQ+oIioF7OoobSl5vCkw+ekRyT77xqufZ3dhx7fM4ZaGpBQWyol6kh5wfqC\n0hTphbZIOstsYXaSE/0KKA3pDHVW3dLQxAIZe07nQAlco2udUFdkLRnlS1qR\nd4PIC4ztvQRT3ppPw4PnpOnI6uhMWX5lbJsNeIxSp5pekG73Gb9q2SDcE+5V\nd/2GUA9zb7vnmkoAzM2vszTq/sHBJRZ4XdY3oF2oPd0VoddPm6w+9yHQlV85\nJmPC23QKh5d/HpFQyYSjTUJaSSHKj1ekj9w5XGwAfMvrhBUpVzrZI1WvEkJ3\nJ7LiNGZv0Pgdu1NhleZ1ex+7b4G+sE86RPWoByCTyp5jmd/barNhFugsTXAH\nmvVwdN4gttdkE6vX87t6GMjFJeFZlRo040VdFO3pA+skMKKl1K3nFRoW27e0\nMspMhlDDgfegTEfcFdUgIOqEzoUrRlkiOUHbx0xVGgqZT4JM4b3DVrbA7o+w\nk4cYIKDayRfzLTX3QgBg2Yv3gzdqj7Nhg6sh7JHxAkLZhF/h8lkgb18VzKhM\nUSlD5EAWJwP+FGxCA1OtQCgsB6hihNZVtkYgRGpf/sHXBfnnXFiiZ5NcJHPK\nrhkx5/ORS9tH7kas0//uVdv/Cbd2HsO/YutJEaYbFm2e1FvJJ+3UQSp4uGuC\nMz4/\r\n=Gud6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"42aee5ec93fad57bcd953329b1fdf334cff7fa8e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.127","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.8-renovate-internal-patch-42aee5ec93fad57bcd953329b1fdf334cff7fa8e_1622093491949_0.44847436294214327","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.8":{"name":"@balena/jellyfish-client-sdk","version":"4.4.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df3223536050941af9cf6f2df8b490939b979f3b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.8.tgz","fileCount":39,"integrity":"sha512-l3d5n2JEO12eyAkzGDYkVGsKrbUYxSTgDkeiuLmYK7SgYzqz67TE+Q8kNSA6d6wy9pSfCaEwl/CAxJBzcmNvQA==","signatures":[{"sig":"MEYCIQDBJV2xwqeFQxSez3PEPX6UDojiA80qBhyxPtHZzlQWTQIhAKFcOmnfdg55fYKYG8lrf/JXtgMfTnx+6mYH5P5EXGYe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgry+6CRA9TVsSAnZWagAABzwP/A8iJD4XPD7I5bU6lpux\nRKVDmhPPBn/V57XJge0L9qu3UHwFlJsK8abL4Nugev2fUI/CKgP3nBibdS14\ntZ1cjP6W7FOBYIi13YWZ+NKWYboAElF7LZdWyi3b1wAuiKFDYjECtkKuKetL\nERRuf70OeaH/w4xAQTBBedUrHZbypMGj+Aqa0SnmAygR8bpzGLjy5l1JLzi1\nv/q1ht5e5rogk5u2EVlVkxEjaTbZ9mQYQFgpeFVPS/bewXHKC7HjMan0fsaC\nSdZf6GQbkoVL0LDADPtBsnZPZDrt0RjRJR6HerYRNcab5xVrN90mQl6HC7Nx\nsSr0LX8mgFk8gKne71/UdPS8I94g7cB18nng8p42m7Yt4K+rfTVggdN74Xgf\nDkSXfY/xFIiDK9qC4fiCJufmmeJkh0Qxb8vdA+nxK2rvmwERpQbreAhwwUyf\nRcw0DixPXPTBzAyLs+SJBNLgBAvGBMQH5D8PnMCKo/Sv/j09YqKVoCo2pR6p\ncA0uKsgjoNAk/keXSMxN75VvOsXBVcABDvlHjKoxYO6LOF9ASuKbE+U6x6yL\n7KfvGbYHXGgEUw/GPldwQ8+Mw/KVoS6H0Dm7QQkR54dU7TtOdghPt7ocXhKn\no+7cw6c+xrPV6EnyEjQHlQYWRTi6t0CWeEZSRir2JSKaqX8m2+8dsUFn+Oi3\nfQ2Z\r\n=Bgmc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9dde7debe8b59c4b48174bb7825afe6416296d86","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.127","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.8_1622093754373_0.6262942319944251","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.9-repo-sync-jellyfish-config-default-322982922f0af4dc8eb9f43c585c485a2f1e62f3":{"name":"@balena/jellyfish-client-sdk","version":"4.4.9-repo-sync-jellyfish-config-default-322982922f0af4dc8eb9f43c585c485a2f1e62f3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.9-repo-sync-jellyfish-config-default-322982922f0af4dc8eb9f43c585c485a2f1e62f3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ecee2627ec6cc67f5e79b034a357a8930065b540","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.9-repo-sync-jellyfish-config-default-322982922f0af4dc8eb9f43c585c485a2f1e62f3.tgz","fileCount":39,"integrity":"sha512-9Zc483UUAlG24rWGA/FzYiahplcWKWyiukoyTkrcepEQZmiEOa/7jQhOTcWgBN9S08P1X+STP5UYoNEiJlgGHw==","signatures":[{"sig":"MEQCIBpL4PFYotV980nX0oy0iyEomi1b+6IDGnwdwF3t602cAiB3gdtZcspz/K0+vuvthiVmw8RmV4dgDof27v8BsXHHzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr0HiCRA9TVsSAnZWagAAFW0P/jMhk909wdkpKLJ9zW29\nrJQ3llOjYMB8MvUS4QMrrHaZ0R03//pC1PWKVvjg6Q7Mnk/uJC3MjkwWUwyU\npxN4z+vAbFVFA3qOpFCgGLVlKcDpXRRBgL7wGRiCrd2c0ELIeEyvcsvXQERv\n6ihnHMu5TBkLIQ4T2BtrByhlmsTwCbRYIuJuu0pN3zgXNxaCnL6ThWPjovkG\nRU6+aoL5XfIQaDdmU0tkwPgB5xpP5DrUDs2uN15xgCGhZAjxkK6a+083ZB2w\nNU/g8jKXP2lWVVA88/NsENdnco3TGfg5Up2mOz29oVYgmpYjD7aMIdc2HLhX\n+qMadoSWv/5gb9f8o8rjwcjSNawssmBhN9CamFg2ZbrGlQRT9p0cIhGFM1pN\n5T8oSClfMMotJ6PLQdFpWbevwC6EvcDujzW6NsM63mtrD96O/gKCTA5iPfRm\nhmtmoxnQyZtG1KbAd15ATtCh1uC/UzVs8eD+133sthkpRyFUTrShSnt9lziK\nC1hK1P8efx8hLBZm61PnKUg95++MJbzqy0QehbLqH/51xhv5FL9RbCGMmF0l\n5sTegHNMCFlVzWnybODgaX70uzuSKO8sLD8boHW03fibpRhVtzPbt1Pt7hTy\n/jbx7lZy2UzUj4kCZbN0w2awUoSc889NFArGrzNrfLd5vFi9VADnfYg5LZmr\nL9bf\r\n=d8Lm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"322982922f0af4dc8eb9f43c585c485a2f1e62f3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.127","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.9-repo-sync-jellyfish-config-default-322982922f0af4dc8eb9f43c585c485a2f1e62f3_1622098401900_0.24273735944775954","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.9":{"name":"@balena/jellyfish-client-sdk","version":"4.4.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"284a52431a63245f2d6e0e3132505c419894e277","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.9.tgz","fileCount":39,"integrity":"sha512-FQxnXpD6jbt8s6ZS//NYtP8YpMUx6D2y5ub/nfRHL2vWbXMDWRO3hyiJcVS0Y33JtraCrovha02qQN63IOMcng==","signatures":[{"sig":"MEQCIGqMtYSCgU64yBDijUA7hYy4AIolUw7YIj0YScjsw82jAiBuiDNuX0IQ6n6ZOG0+8r8nOsGsK3rV3lhQ6suT2qXpag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr1jmCRA9TVsSAnZWagAAUd0QAIRNczTCjFZ3bp/X1Gcu\nSCVhapV8Yr8v+vG5J/DSClKyEnkeTqMcWgluG4DK/EVWzcrqSygPU/V9fQBQ\nQ5SVJzKlu8GCegoJjs4Bx0RRT8opohVD/A+hnaG23X3WsxkbCj6FmziPtFsD\nsNvotXOIz0eAPu05xTgeCqKYls0NYaVTrGvxRRrs2TDnvHI82Ha421AgUuRA\ncOR+TmsX+rxi3cIvTEdEhoHtiTGW9ANPx7oY3lmfpjQgpnLVbCgXOXc844Wn\n3M4B94x4MqpbJpqxZnkKCkgrG4+0kg40PrHa3KztdY6cBYkBtubhGHRXFnSi\naMsyK1M97HdD16XtjfzR1YSCI70m/HbbC4XEM68T2X4wIHi5y3vyQeqoqXhL\n6P74zfrbytpbeI9QcJxAGZ16HtQErd+q0vk0R2Pxx4tgUp2gl/0KoP1lx9fA\nExV0+nxq7QeQ7/mX6wUgmnAm2za3UlOqE/4W40WoQFy0TrUprmdWKi5nAIt9\nkREZU5GWU9quH/33eru2u4P2KpM46TXHeqaj7NRlM+17wNIgFK4cB/f8+RXC\nxV07x7vPtQic6Mi+LcbOJmwah4iY+HXAy3pcgVUZ+VThNMS7dz89Dty9/JgT\nP3jInkzgEQCwJsUdc1Ns0sCnwsirtZP0vBGbmNrpT8bFsXYuRfEr7m8fYG9C\nBz8b\r\n=xp26\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"80d9ced5349971867b9938be7f8bbd91dcd16fed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.127","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.9_1622104294395_0.5262484708898603","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.10-renovate-internal-patch-2978e9e5f94d0c2c071b4100cf5b62d877b2ffb5":{"name":"@balena/jellyfish-client-sdk","version":"4.4.10-renovate-internal-patch-2978e9e5f94d0c2c071b4100cf5b62d877b2ffb5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.10-renovate-internal-patch-2978e9e5f94d0c2c071b4100cf5b62d877b2ffb5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b7c5e27eb10441ab9c19fb9af50f98d3c7ecfe90","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.10-renovate-internal-patch-2978e9e5f94d0c2c071b4100cf5b62d877b2ffb5.tgz","fileCount":39,"integrity":"sha512-kR1qjJMS3IzyM8gahwBPI/Eew0GvCtyGlZEAPhWsfYTr6+glv8CeqN54cKkmf0gvhfW2lQoy3lqkSiXVFU/Edw==","signatures":[{"sig":"MEQCIDly+yh8zLdk2vrUiY54F97czlXJHN2Yl2kpO6fVt6q+AiAy8v/Iy1R4lPSiW0gfcDtwvZ4oU06lm1Avn3n9mZjOLw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr1t5CRA9TVsSAnZWagAAsMYQAKQ4Q5O/92PlqOoJDivs\nr522/wyoizf32LRPfYQK0kluugHfYj5EEMmv5UL1oBelRCme20Idcjz8U6Fw\nQIeZo1h6NsX3tDqLxKHZkbUlKWjIQQnp4l8lcEnLEeCgWbp9LfRSR+SJRi9c\nrdo72pT7ECzYwfHzB7WDsWrutbrlcStS1r8rhObw1FHzGloyfZC9XYKNlTA+\n4KAgtclesh4YqeSeCCmwHa7YBRFrSITe/1Ax+oCI23bOzp1zJUmOOkSmr2lG\nd2SYnIVXrYIYwjg6Lkhz92JHL7SdAc34qhqFlY6cS/lQyH5vyLaCmvS/O6fW\nHKNWw/YTZN05WYO/MgsPMJ7/N7Nf2dAJwkLrAWYaTaztY1I+67cboNF9ZqPx\nsSVWgoktLOSi0Z+Id/ehfom9E8uq9L8OBPWp0wmTU1XJRzhQy5PEKOTx/zHm\nfFj420clq93yc0qin9sub4JhCohnOV/kysTLDR0kjiRgHpX8KNbL20u+LZeG\nmKuGgvrFyYN1yIzv9Fx1u5pEEbjJxzgXaYTaY6fiw0/Wgbd8Ub7mlbE16pp/\n/sPIUQUKlt3Xs/LkEyszsnkxHV7wMwHWFoHyOtZD9rIiuvrNLiejqdFWJyTi\nHIS+bQWdIv4ZxV539xf2sxgT9/VVGbwSyf0FljggM6ABZT/OxG6vNFzoaSWE\nagGR\r\n=EVHC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2978e9e5f94d0c2c071b4100cf5b62d877b2ffb5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.128","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.10-renovate-internal-patch-2978e9e5f94d0c2c071b4100cf5b62d877b2ffb5_1622104952986_0.8867137227228981","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.10-renovate-major-external-major-b9e56679bcca591fb46bdd2482540b712b201268":{"name":"@balena/jellyfish-client-sdk","version":"4.4.10-renovate-major-external-major-b9e56679bcca591fb46bdd2482540b712b201268","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.10-renovate-major-external-major-b9e56679bcca591fb46bdd2482540b712b201268","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"99985293570cc74d214ff6d4ec7bfa1c8437aecb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.10-renovate-major-external-major-b9e56679bcca591fb46bdd2482540b712b201268.tgz","fileCount":39,"integrity":"sha512-wb2mfqtEAWA1pqCOFKoOH3PcWXmzPT1kwJ5pPmk4+IIh93Nw3We9MaNOzr4a1Uuli68mZxhlL5R5Ao5n1EV4gg==","signatures":[{"sig":"MEQCIHtFGVD3z+EfGyhKmEg4lwycp3PFa6acfd6uorGkLh6dAiAuHJtR/Cb9wWsFQscCmSDVQmdxzja2DPF2zDa2ta2YaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254679,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr1vuCRA9TVsSAnZWagAAwEEP/3wQwRvgpVKOhQ0RjF+F\n6FXvYeEV+9eL9OD3sqBnRpoBZG2hB9feqwwb+DyCVN7iii/dLv5yKRY9pXmm\ngTonss9uHhHAVlxjgoRXMnHTU0q8xlMxre/cHEZ5MxlQpgjC91kURSi6W0cz\nD5ZpIIwl0CQmqcHeAZwWYDsdi3lykkLMkAiJzBaiyLLglNv23jB0sm39yl28\n3b0HVPbb/OdZVo8FCsXmq1PnKsdxejyGuFin91NnIALCTMhQaqHQy0aGKBqD\npUK5Q965fSkMvqVXmx2MPq28COWyv3SJJo4kCLsX+dyvXw+zwfW4SglBXWJ0\n4tkx5OyISJgANuMbUA8a50QARHcevw7/mwFL6GVYYs1Vc3XTGMfCDGf1nibD\nkJkTgJWzUijIJ+CM/LsLRor+EuGHjtNE1Uhgsq0r4K4Z/UnzI5yezUFM3xYx\n8lo6f0wLayu/R9VFuwgOrI3+XjY/4LG4/y7xeNPHazK7NslSsPHdZRl5oCLP\n/eKZ1SBcEIqIHrFHOc+XjNc1HK5UwSmIGfl0G1LDk3nAmLOhC72p04BaR/p4\nraLgykub2qtTm+EEBaGwJTJBR4JHv021KETVSuhVMpGmYRCeAnaX+5+QH+nz\nCnEFJcmEHD3ZBQ9DgxCpsd3JPq1rT3h5T1NYCUuJcbZgNsa2NI6vpz6hExbl\nAsE2\r\n=Txyq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b9e56679bcca591fb46bdd2482540b712b201268","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.127","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.10-renovate-major-external-major-b9e56679bcca591fb46bdd2482540b712b201268_1622105069691_0.7492155513203398","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.10":{"name":"@balena/jellyfish-client-sdk","version":"4.4.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0816bf9d497c6f22b89ff16edc23bfc4ca3fefe1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.10.tgz","fileCount":39,"integrity":"sha512-wZp0++KeDnrVVWu3ACj4EfvqHB+VsqUfiA/KWwkM9fxOUbeTYVqKenDCVQXub/NNZ8IYM2cCASEEtyNkLHXV3A==","signatures":[{"sig":"MEUCIQCRFh2PiGr0WRSRI2mvtdcC+qXlH0KxXN/l7OFc2FKMXgIgR3pfFd0SnuTDg8Q0u/TC/ZmKgE7DMHP8cNTbaEOSuNQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr11uCRA9TVsSAnZWagAA85oQAJOjYXwCuXC4IUAxflSW\nHIwUadA1G0156Ug3F/Jkhvw3G63wpF5B1F3SR6Qj7EJCOnTaxKxnG5+zMMiK\nHupJlFsUrIQZgfEaRbQu8BBHLEGIa2WVuf4ncZMQ5NunrQViSW3rWfiPqKfT\nxPS8vwgv8LKf0poEwrQ4A6Io2e0783DSsr5HJDCGjWIpgxqf3bit6xnub376\nhd8+Su9mp/k3GK9s8AgF51yR2eNb1ok08sfOJwUj4rRJNfAhlM62u2M8+Zk6\npbP46f/Q28oXc5bxy56t+qOe6qV8VmN9Iwwcr0V4DpYbeNhyReDOSH8sTm67\nBpKrqFnd7U/a6k7AE/zvMLxag2cI+fRTgl8eIBJZgn7CS6FIIRm+xD80gMs4\nCS4zWwiG1sG6IUnCFVihMjqsKhEI3GgAqXYzFI0jPrUc7U3WjeZmKAKS7wow\nqoGn56DEGMcP9T73rQl8+leqRMAIvYMr1gbmMdSJm1W6ayHcJIGsAG8ALzG6\nqiSSXHzF1wB3jsH9LJChLwVr8ubdgDFZWA47XmcbOxC05ZACfv9DwDNoVEry\nIMJLeySmpOiirQPrYPTbW+fdjR5zvj7eqKrZLgIWiyMfk/xMwYb1QJkecHM5\nhwwXjLV7NMCULSFWdD/W/rLpHxL7rXp1E6PU9f/XSzfti2M4lIGD1TcHDJg4\nhJ2X\r\n=8bJb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ba9ca11530290d348468833e410acdd559f4e236","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.128","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.10_1622105453821_0.1161893703873973","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.11-renovate-major-external-major-175a40f556364599b3021ba578fce8d92312c332":{"name":"@balena/jellyfish-client-sdk","version":"4.4.11-renovate-major-external-major-175a40f556364599b3021ba578fce8d92312c332","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.11-renovate-major-external-major-175a40f556364599b3021ba578fce8d92312c332","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"96ccbf17f784e04dc9cb7c4a18e6617bce0aec96","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.11-renovate-major-external-major-175a40f556364599b3021ba578fce8d92312c332.tgz","fileCount":39,"integrity":"sha512-vybDWe78vI9WbgrUGubKw4yol2heb9LNQUSf/KlNVdGq2qpNg7NVhX2ZqLxXize7Rz2du2DonSUGoodyPS7tow==","signatures":[{"sig":"MEQCIEC9WbzdRCc5e8xglL/5PFNvbbIa9y1Wswv/gH38QiCiAiAhHQ2S3/ufg0BD+La+kQlMhKsKgusjiQz8i9nchIKR7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr1+ZCRA9TVsSAnZWagAAwNEP/R7JC4U8H/7DZ4onfd5A\nGsNrPyG3ayuM2H4qMXhRtgBkXNEBY7rpzMcDVEgR6UcgnocJZevMEChzRt55\nTt2bqcZNgidnDZFvw4JY4edesOtydpwqN0a1KU9a25DOA2aaw64kHoGlJIjb\nfFcj4OM4P0hjUng/XkqsowKdcCX+mNtMchyHS9ovh3D95fhyKcU7E60Z0kjv\nSVo+Uu2JSwKO0Nxd5XfPjrYeIx/JGRhh7DVdpszE6eOQVl8hrDeWGbOpque9\ngiSyk5m4r3SHsox9N4o6We2OuGHlkgsj565SS9ALry0Q8bSs07bmJcRLcu12\nAtZrxBjoZKNWp8ivR9pa4BY4IlGyupRnuxAgbcM88rD3Sud0mdwvN8P+8Gsr\n0VLWWNSp/Rbp5/5mXtTTlMV+SCr08Z5lebWOCAzuW11H567HpgRIu6rXyrn4\nxeF2/iniXHH9s3JQ8/+CHcwfm42sMUObvMWsFmDzzCZXl3YURSQJAPCqCSRt\nDNvtH/zlSZD6Wp/Ed6l+2YKnFcA5hY6qDhHSGzP3zCqGn08LcYyroGtwNiLb\nF3PiEL5283yEd0kToCP/rDWuFSwMxaS204SXXfEENtKz3IMOss8MzHoStYgh\nZ64C1bX+RifjDwYPZ1BU1YAK6cVPI8lDEOiea56Rgc36VBIvF6W2Qi7DBooE\n0HiF\r\n=8JYd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"175a40f556364599b3021ba578fce8d92312c332","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.128","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.11-renovate-major-external-major-175a40f556364599b3021ba578fce8d92312c332_1622106009345_0.2583962915185647","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.11-renovate-internal-patch-acb21c1cb66b793e646334ae8478ee0b4c28bdd8":{"name":"@balena/jellyfish-client-sdk","version":"4.4.11-renovate-internal-patch-acb21c1cb66b793e646334ae8478ee0b4c28bdd8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.11-renovate-internal-patch-acb21c1cb66b793e646334ae8478ee0b4c28bdd8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea4b04f89d153e3821bec7420c9fd86241ec2385","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.11-renovate-internal-patch-acb21c1cb66b793e646334ae8478ee0b4c28bdd8.tgz","fileCount":39,"integrity":"sha512-6QwU2Q3D86Ueg5mVCnig6BBX791uHgs2MtxgFs3rTNGNMdOP9Sf/ShlM/znd1Qvqpi9VH+2dtVr705QlK+wp+w==","signatures":[{"sig":"MEUCIQDUUu5ZvcKA3BY4rVEyIfCKrc40HUs9l18NtHKwIoGjfQIgNUQl/rqyCrw28BJDf0mN73oLStP5Aqjxj54nLjREQw4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr37lCRA9TVsSAnZWagAAiKMP/RBvQCKAfwSETdhxcj9a\n3bvL1vyTuSTp7Gbi1T8A2VMeLJph5aPcBKhZax4uhMWXg2yXRB2nl1LFvi3s\n5R8Y522ZQWOevhqapyTcAB1KoaDkKnwCylguQ8UBcMMfZFgE1QNvduxkJIno\noIktEnXbLBTU4LhCOBZAjPYhfy1zniykTVNotLXoskGifojglBs1Yx+l1+s1\nflUZma3myBhcmc+7xylPisPHTqIaIl+IT9T4kyYcp69QEEiX7LJUS5wHhQKo\ntZdNJqFcPFYKM6DwspaY3Rl++bo7eRu525I4Ddz3lefv2V1LLxuTGfaeyxfX\nH0mRuVOSy4vgZuY8Hf1hbyRiWeQDkOSjHR4UJIPOvRWs20g9qBU6khNBy/A6\nD8WrFuoTPVQv+qv/OTaAWFC/d5mB3rzAOis18Yd3Cz8kmB+b+8+KZuYwW+qb\nIBlQfHCZee8qL3Vk7oWdySYINrInM9dt7gGY2mHTvla/sPEGOGXpdsA0Xl41\nMDLwCpHUPR0O3U3zAUYg6utJOdq90RKQ4iYb7IghBZzeHYdjkTQa93xm2WkH\nemReBtOcNtghEzPhQ3DeBhN3PufwmAv2x7UbM0aOZlP4FFrip45grMRIlBg9\nBwYN0X8oG6HlhuFZ4mpvy3Y+HUIrid42DHFCYGKqY6wHBT2aPktK3h5hm8cj\nXuEb\r\n=O3bT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"acb21c1cb66b793e646334ae8478ee0b4c28bdd8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.129","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.11-renovate-internal-patch-acb21c1cb66b793e646334ae8478ee0b4c28bdd8_1622114020590_0.33499584995433973","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.11":{"name":"@balena/jellyfish-client-sdk","version":"4.4.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8ed2404b3118180422df3448ca9eabfe799aa38f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.11.tgz","fileCount":39,"integrity":"sha512-CfR+vnYTmCSvEXz3Z/EQeIEvSZUJp6aMeTo8DlD9IqTlclCaQIOqra329Hq8KsKt4ZPa+1L+0OxNCbSeL/ud0g==","signatures":[{"sig":"MEUCICdjYOBBU+m08eBNuVuqSOLsk5Ne9IKcGuBOdwlsmd3GAiEA7YOPCv/+9bDFyAXU7yYAmw/rCd2b7OWXMPUBWyzO7Ps=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr3+2CRA9TVsSAnZWagAAHNEP/Rdh6ICn6db3wBdCjaEP\nNZezfq7AJPyXYVq6IQ09dnXNus2SxIkl26Sgwv90zxWRcD7o61tg7PCtQLkM\nQ4D+taL1Ud0F1fn+lRZIU7JRo7py3LsXsm2Nxt9WjNTewmOn9Qmd7bahjKR3\nZrpw9mOy8lWprodD0TM8p16vu3qPpTx0gGNzMZ7zeOur/Q/udeRPUtbT4CEP\nGAfpaX+aH9L09bb2GqgG50fyCTb4BNDkkUO75cJ8qTA4n3iOs0Tnl6OBnCt4\nQ3n+SN7VdtpVmbCcFGHehfqIi0zAHHK5OIF8SX2T3pa+W1XN+pW7M4J4NVq2\nYjWAyHcm1Dis08LkJAiO0DbwdST1rtdWkHQO2qpx8pDQdGtwdltiIuZ+fdzL\nsqTP6l4b3PNlBSS29vbj2DdIcvJJt3hOmlwIAAalecxslOFJl4eIlFMdhU74\n1o95tVi8MDNR97UpyjqmZJBUdNebzeoKjp4tFESw3elAexoOYgXQdbxdegGC\nqCitCa+dVgYFKJCy1e4SRvQkSZHQhrnX2w4AUNaWzFAgoHgMvhC/nrQR3P/k\nAJgXJIKvtP+jq5NU766JM4QSnZhHcxsnAa8VKb0PxOS+dFbqnIbY/LCeJUPE\nZAcRScyabUQaOuqSi0JhtSXgDl6dDyf7L28sVOJPjSAsQOZfmTGENTkEnj/Z\nbF3W\r\n=qZt2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"369e08e54233b362fadda45700b2199e7375c333","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.129","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.11_1622114230422_0.3253623051016221","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.12-renovate-major-external-major-b9e9ce1bcd65fcabbd2f7f96862783996af68548":{"name":"@balena/jellyfish-client-sdk","version":"4.4.12-renovate-major-external-major-b9e9ce1bcd65fcabbd2f7f96862783996af68548","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.12-renovate-major-external-major-b9e9ce1bcd65fcabbd2f7f96862783996af68548","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b35ba184c2c9a6ec70f6024c6f3c1001018e02bd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.12-renovate-major-external-major-b9e9ce1bcd65fcabbd2f7f96862783996af68548.tgz","fileCount":39,"integrity":"sha512-Qgc5iP7IAB9V4hpUvUDg+eqNEJO2aQbkkGTBdrXcwISO429vK5HsedJLQjBdho/w/Z5Qwt01jQ9UiMD49tGPWg==","signatures":[{"sig":"MEYCIQCHmmDfCg8GAt0OhzolAQqTexL9Cmfjfw0czr9KBP9m6AIhAIa9mrt50N1TUAiH0GYdxM9MhgDEx1mU8bd+NCVgoGzU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgr4CMCRA9TVsSAnZWagAAY4cP/ilX0VFV/DePm1qbQGfL\nWuJt8iRwEBc9uQrgi4hpAtqAhaET7CDt6KimKp/U7XJU9B6IbikQWtuWuybc\nKWaEPMaWDafnVSsnUF9o2pO02IaxDiMrRpfnqczfq7Kx0nRGf8IsZkiH/3Iq\nAapL0iuTTjwX5TcGYZdZYy27xzsazwSP/QbszR9wGY7p3B4cXW5AyKj67r1n\n8bdywZwk2OQ/sKfDOl/q0CvPw0O5sD0V/bcRSw0a2pkM/Z1PdBqepYXFgMnv\nQJuuNDdlwJNzyVzVriwvAF8vRAujgc+kq16wVWBKmqk4kHppO8+nk0BIMfsa\nqA1MsI3UATLHWcpC4cMm9frMCCcTMVF97MKxn6BXA2N0AEb1QWAnKcDWMM7j\ncDVsLFyXe20Q27AVwgaeOc03hxDHMk6gJD5hjduh7BwZbzcNZRpFjj0QYfY/\nPce2MiYL3oKMfsUFIzBhXrPQKNEmYkBiz4B0g0fE+u7XpypVkac4kbeU0LjY\noMCyGP/boMnlfQiHG7l4vJ7r7zgOL7sVTTLms8o5N9M+XUcNrsI32oPM5apt\nfE8jVEFziaEwAqmfZThFdpc9JDk5ZLxSC2+m/tJH6gbJ+QP2cEvDvNEblNPb\nVo0ldbNGp3KKZOnKDk7oQfIWOxLXopSE/b7LJXXVm/oQsM7vW67VlRLxK7wb\nRN0j\r\n=2+co\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b9e9ce1bcd65fcabbd2f7f96862783996af68548","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.129","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.12-renovate-major-external-major-b9e9ce1bcd65fcabbd2f7f96862783996af68548_1622114443805_0.4910925017882908","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.12-renovate-internal-patch-cdb234392721486b4cc71b6eab3bc184ca052e1b":{"name":"@balena/jellyfish-client-sdk","version":"4.4.12-renovate-internal-patch-cdb234392721486b4cc71b6eab3bc184ca052e1b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.12-renovate-internal-patch-cdb234392721486b4cc71b6eab3bc184ca052e1b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c8807cd437ad4a3029ffe4f6666289e46d6660df","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.12-renovate-internal-patch-cdb234392721486b4cc71b6eab3bc184ca052e1b.tgz","fileCount":39,"integrity":"sha512-ARk54h0kgBDqwWorKtsZe+oYaNU52tZpYBzsH7s9vsAbfv9UtZer+VXeJlo3vuorI3p2Joww1a8IoKvUkGyjBw==","signatures":[{"sig":"MEQCID+0el7idd3RuGkrLMbpYRHzj7g6nBBHY5dxZ+PZbpDjAiADY/RWO9sN+/NuWS/1OJLF+mLXC9WXc/1atQGFc9E2bg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsZ5/CRA9TVsSAnZWagAAZq8P/3kPOoHRzjvAEDHfJ0qr\nNS9JwBGeBCe0E1zMZ9RU91JXVvvMaDQ+h0OlSn4pZl6GXryvULHXekNNfwWn\n+FYOXVOT1DFoGxsAeSrPj51pirYceP2l1wq+IMRo8tT6VWarNj/I30qibIeU\newwAZOiA97HF9vjmPX0pOHiC1CWn8qzSCC42LUpNqmVW11qJh68X4I7IBKVn\nKqdv0Vb2cqH47ZyJeOppHr6pyNvwqLm/BJtNIaNYELgcV4pC4tD3Ja4Pt5Au\nsv36/wP3UL0WlpVrlWWFWPCmljw6gEmlWUnNUmeOdSQV24rdI/bjfLieRFUi\n6yWuzBCHjOP+rwQyfxobOVYjrlnTFVgA/ZklnqWIr38cvzAzq0Os7FN0wMS6\nKaLeLuvTvCm4q5K0Ze8zlR0TdsjjZ44z1afYK9TtgPQNx7pJ6kcKzEtDf6dl\nn02VU2o9Z2+ZPNooQqoKEXjw/xMlRHIHal6t2kzpqLw+wjJMWWZerATVC8zX\ncNbJS9YMvOU58GcJL2YgTiTwRIeQoviyZncfUKO+nl3pOpTmdNSpML6ehWCt\n3uS4GU0ywtnf8zHEw8wA/DuMqLtX5eSKJzohYJxlEfpiyQVWkydWe/f+WMef\nnlkcD6XbragY+cqJ1QuPOAtXpaodCuJAVUjpTF5JSjD8bbG7epOk6BiR+99i\n37cc\r\n=3AfY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cdb234392721486b4cc71b6eab3bc184ca052e1b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.130","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.12-renovate-internal-patch-cdb234392721486b4cc71b6eab3bc184ca052e1b_1622253182700_0.668869306847168","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.12":{"name":"@balena/jellyfish-client-sdk","version":"4.4.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.12","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0204bc1ba9624e5172a5ba20851c3ac0fd368989","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.12.tgz","fileCount":39,"integrity":"sha512-axSYJh7zZEKOMIJshsg3Onlu2LU3XR2V6EbCQ5LIwqmnePmdtK2q6/Y56riml3Hi84/hOT2UST+pwJAFaM1Ybw==","signatures":[{"sig":"MEYCIQDA+IE7X5w3QEIk+2X/cZF8D0BOrgjY2eRbKR8V4MjjTAIhAN/upR5S6fyqSyOqDkaPeCllLBvFzYJdspaf5eFyWpKT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsZ9gCRA9TVsSAnZWagAAuBwP/3f3xkLqWY+4QeEL9ZDX\nijv7MOhnUFFh47DUJ2huEypHr//dyU/GTHhQ2pLvElEI3uZyhT3yDRG5is2U\nt5PGBKZOjXK3xv/4LT2N5jYBLpW5o0OmILsYWhPRR0VXlqAnz/T80YTilOtB\nIvZBkjsfcYWG0pM3Lq+X8jVl96087MG/LnPjcXzo5q2KINdmSZqV2thaoBE7\ncVcoX51Tk9z4cegQRSOnUKE4UFTeOd8LiRqSueAwq4+vnl5SJ3lJ6NQhxKlw\n7pTxB6+3Krwz+MWwAMWP+i0VVYVV9F8ZjqDe7E8lHO7I+nQdFQfTU+byhuLb\nYFfCyTX51fTBPzu0953VkKzVL6rFMRE3OTamhTOHVz8bDgSr2c3eUpoUnQ1Z\nqz1gysfIJMHFBCtqZodUbM0nzF2d9JqyClir4EDgNLLcAuCBbdE0DTE4QIap\ntl+bmCUitw/vf4bwRMutuxilZMa83QTuWNjxalq5cBsAKbeEtnmInDfeVsee\n0RP2O34+5rpV7GYtd4F+UCLhSN4yaEnUozx3WFmbxHDNuF3eTQjbaFspaP3i\ncLNP8w3Ra4BqUfFgqthi0lJb/mV1krXN7Zqae36E6BYOSyOdrnhvsxD/Kxpx\nbAqimD+dcRygkYU8/fLv4htj5fmBh7zawsyuRnQF6P+t44gzKV4FupTWBwwJ\nJcqp\r\n=GQI7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d364f824b5b5d5a955826ba3016e27b4e5fc1a71","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.2.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.0","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.130","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.12_1622253408517_0.050142832097910706","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.13-renovate-external-non-major-a73dc8117969dd0f428322670199c365f1a456ae":{"name":"@balena/jellyfish-client-sdk","version":"4.4.13-renovate-external-non-major-a73dc8117969dd0f428322670199c365f1a456ae","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.13-renovate-external-non-major-a73dc8117969dd0f428322670199c365f1a456ae","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cba3c0532595daf28c97fff6c99d2ff6858ccfa5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.13-renovate-external-non-major-a73dc8117969dd0f428322670199c365f1a456ae.tgz","fileCount":39,"integrity":"sha512-aiZEvqs3YYC99sfrkzJXVSsdPnuHjMJWlvWksTIEu2ta+DECMXGEH106j3i/B/x135ue7EbPdu7Ckqe/gTz0TA==","signatures":[{"sig":"MEUCIQCidfnufkMvBbNNCEsEfMrivkT6UdWreo3TTPfT1I9ibAIgWKaQvcxcrswkut59XJe6CdQHEsm68vMhXnrN2RQedE4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsaByCRA9TVsSAnZWagAAZb4P/15hMorVgnDOae1PTj29\nCZvlRJNPct/+3SMpO5zRaPetwq0IAMy3niYCBlEY6zEKfllhCIfzeAuna+NE\nEzd8Bbw5faOVqWA1rOa+8pM9OElyDMC7KTNd8Pu7OA3PJHUMqiec63ns/xld\n7+AFzexPMw3adxtT5bc/PNi18Lvy8ZCUpZE4JB0N0tk6dq4M2Xpe7hDLH8O0\nw1Fe8fRZbFcqvCIIfigMJvoNOk4A//uKzS7xUiscsPnuSOkPETMU5SLTBMCK\nqVb20peu1ycaPlBDBiXigm3yCmfkFySxLwDUbuG1Jx5OIpUh1N5qiTTNWXI0\nPbHpkLW49aKjGfCN7+8AsSbcqVYEz0V0iru9JNwRjqqB0/kpQjhizfC4J6OT\n2JOuFUvMuDm73VmdjbHM6pQz9tJfdQNGZyICFi2NvbQX8qcoV1Qm+9iewtQP\ngAIJ4mMZUGXCU2p6Sp6NlZ/HuHrZHZBI8/3c099lLBdl0IW8/JXhTrZBWDEz\nNpZtvdFmb6IO8TdUnbzRozBQIfsfuVoJMV8ywlYmQzaOqo5ZuG+sajEpDfHI\n19ePO7owmR0yRWiiMO9AQ1rk6KaTMLpCBBap+2ixD9KpEIN0u0uFtXDnMJ7o\nQ7/WRXnntkvfu8sq7sXRoO+6RjAd/akEd6bE4Eyf81KNmbGNKMXQMNoC0kfV\nF84r\r\n=ZYML\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a73dc8117969dd0f428322670199c365f1a456ae","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.130","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.13-renovate-external-non-major-a73dc8117969dd0f428322670199c365f1a456ae_1622253681678_0.9775700094321969","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.13":{"name":"@balena/jellyfish-client-sdk","version":"4.4.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.13","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b53def467cacdaba00d5672f9f1fffb9c6a3edc1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.13.tgz","fileCount":39,"integrity":"sha512-U0hMw8RuItVZZO3Enub9Iu7n0WIRV4m11ugrBEIxFnqVYQzo670xSgnokAmMtFyE/+qUg5X65HpfTWO/hu0OXQ==","signatures":[{"sig":"MEUCIBAJPRwxgpCsHvIpsFBdGDZL1TRVDRD9NStztYpEp6VEAiEA810EJl8MDXEQ64PAn0kRWCNMg+OwbHLb7lQtmFJcHRQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":254921,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsaJXCRA9TVsSAnZWagAAoRIP/0SLLjo8p3yFPZD/3BHj\nULbLhy96nrSR1rYsrRH4I4rtm+sffdsOxqnRK/vEa/ycFZMVo0oj6Nqr9233\nofcHjrNzUAMj2lqwc1Toum0Ny4ZWAXgHuKMcqMPo5Aq1pJ4vtgPu1M0EJvFH\nb+X7NRslDMhD3CkOQmWhgeotT5dLGAWuRQj8l5OqqJ3udZubLa6v4V6hUybE\nnHDg8wSApZWtgWJ6Yj4DPi/A255a1cKesFCSRPTrCmFlK3b7WNeQf0TjP93p\nwCnWhaIXgd49L3C2zIoznH29LPlvHYEkEkVUG2d02wfCiWltcNV/4QdqSPnE\nLOOUiKtDHB8NRGe5dSwyllVlQKJU13lbJn8LI7gLsZx8Dpo0wVowliVnpLBl\nBghO4VMQS8JHAE5Oa6RIMDr1+SQrMFMLrJq2zlJURUPx0wH5JdS4u6bR8OAT\n4K5Ug5DXY8Mm7WjPCNZEgnFhOKDOVRfONwuZZxekFzPSz6rZ+vhv5yY2ld6O\n6CA5enOKEYiWCgAXKYuZBaRVlwD5xKxlO38VxDPi4ZJoIncBmeOdM+wie5Jr\nTQoT3MI4S37m6Ek9eEn1AumbI69nIczXPdXNXaxnwJa4xZ1wg+ea+ypIFLsY\nFceULp2KojjyUe8PPA+S18rL7dEuRTYSoltUMWdLMPXLoU7MFEt7VywNA41T\nTDH+\r\n=/frm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9b82c04b4e7bb5e9d25f4994e848439821a697ed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.130","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.13_1622254167300_0.7249220514498373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.14-renovate-major-external-major-a9f1c312761bebba6e8fb404b57e4bb03b1d4e58":{"name":"@balena/jellyfish-client-sdk","version":"4.4.14-renovate-major-external-major-a9f1c312761bebba6e8fb404b57e4bb03b1d4e58","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.14-renovate-major-external-major-a9f1c312761bebba6e8fb404b57e4bb03b1d4e58","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ef63382cd3f8df8263e583f81b418da333010cd4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.14-renovate-major-external-major-a9f1c312761bebba6e8fb404b57e4bb03b1d4e58.tgz","fileCount":39,"integrity":"sha512-8PDWSAkgFpzzOZlzmpywzyPxqfdn0+z8T6+mzX8Yid4VpaKYlP5zT5jzxzjyR029kwQ3/a4BpTohBA3BylMNag==","signatures":[{"sig":"MEQCICL+t8YMW94W/26SHRBrufUg7JOgouKiTTM6s1JuduiiAiAjvSD+SFORbrkFZV/kaBhQ8UAnEqFyh4CbXpvMyMGqOQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsaNrCRA9TVsSAnZWagAAntYP/iWGS1aAThy9PmZXNzyP\n7YAWCS5fQ9QCUtvUXt+dkK+3dSU4RQucq8R95WV1fslqsv+4tuCMcf8+4xA5\nzBmVk1ubS5vy6BLkiP8E/k3vw4Pkn38nNjsImC8BUWqefavHRd6gDCb7wNM4\n9zDd1DinASDNqtDvHvmW7FDzYium0B8kwMCcA+pPt2FkiQcVbbYYxdxgG5g7\nKOmGaLQvT7mznWO1kD+eL4J3+SsrjCn+t/6qANkdkDRL4CwDiUybhObsliVL\nW8Qz/4DfPK7aDPD0UNL5lQ+Hsqq+I2OYLvO69XbmIxJOTBkIOu2pvD6nICcR\nlrf6y+BnERA+6abXqzs1/KZqabZUDaIAg266n8m924xgca/WS/oUSMUHcDTm\n/xf3/WfSED0+AgNSPLdW3gbTUIbLC8TJrrmPg+UH7JrXD5Z6se+uXyPJM6KH\nrbsyjsbVWTWtDpLqV1JDcLnF+D6xNb5XzsJh/kuw+pda/x7/qovlHJ9CUxz1\nmd5zbE234ginl9pS3RSfix9bMCrLgtkJj3taK9GiFnn1DsvCprpg35ygZK9E\nWW/KQOXl1BaGW08AVfiXDtxdKBHBjA+j+Xko/ShC5NF0LwXdY7qT+xSAVVrn\n3pVkJR2IFUCXYr+CbB/h6qrTmECWqoJNWQ0Se+9BRypX+nrDL81XjA0yRQcx\nbHni\r\n=ae++\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a9f1c312761bebba6e8fb404b57e4bb03b1d4e58","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.130","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.14-renovate-major-external-major-a9f1c312761bebba6e8fb404b57e4bb03b1d4e58_1622254443425_0.6195954038724174","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.14-renovate-internal-patch-e14ee8297de51cc96df7a16b91f2ba0571bdfb5b":{"name":"@balena/jellyfish-client-sdk","version":"4.4.14-renovate-internal-patch-e14ee8297de51cc96df7a16b91f2ba0571bdfb5b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.14-renovate-internal-patch-e14ee8297de51cc96df7a16b91f2ba0571bdfb5b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"01501e00b0315af7be142cf26630a7451aae3c3e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.14-renovate-internal-patch-e14ee8297de51cc96df7a16b91f2ba0571bdfb5b.tgz","fileCount":39,"integrity":"sha512-PwNCtV9qHQDKrnAVtZnBFPk/ZuS7rNePDsFSqsHWkYqqt8QLumDoYt/nR4xmAx/nRKodce++xQfx0R5T5TnoiA==","signatures":[{"sig":"MEUCIA3lpKv8EuZukcx7f4ZfA02vn5moqFwSVP19/IWDscvTAiEA3GTWygMwMECbTqRLKFALueXmqdu9Z07QqxDDwMM1swo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsetBCRA9TVsSAnZWagAAL68P/0NvvL9anAjPtjDwJVqI\n7xresb4wXZg7opFNKVrlU774zWGRtj7g8KofRBgSEV5GrXF+Eu3M7gXk93/H\nsCuh1VKdnGO/1kCRXseWlULWHAtejeJD4hocnPJji+Zhuit9+ZmuL/7/6cy9\noQD9GrmKe75BRfQYuAfLvFBYdro/BWSsUtcchZbQhwb27fGJSawoE6lGZq3f\n2xgynBhdgD1U6HORCz1h+7UjkzxbIPHfq92pbDMfrYQ9jewrioFtZq+eoiS/\nK5d4GolBdjy8W/Da0rJpreJ7Yv5wMBbCN1l7y2b39AX2A9sgmqHHRb37lXPb\n+Z/uDIgYU6G1WLRK0YEFc7NYoyNe6AZNQS/algzW0sQveD4WTdnf3DDA69Vg\nLtdtJOgbqYlt/3aRaHgX0lCkR6fo/fK9fHfqEj0bg7h+Rbof7XOfAZsGlHPt\nG14xdZGHIm91hna0xmY4b5SO4fmHbz5Oc20wZOHifSyO0m8NKU4qICRaIZFS\nUF72kvSy3bWHvR8sdGPp2tbOi3OnYoB61W0yebdPGdWekDDjenIzxVAOfQv8\nA0iiqkyJt2jwmzhyC24xEnoOeBNXqcYYp9qXXJmTvTk1zl/J8B9jXRcV+ipA\nFpGGBBNmHzGiJ8ICioogqB12NprFR8OPw4582O5HyXV5v7CSbeWVA1OLY2Hq\n4ToT\r\n=9kyK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e14ee8297de51cc96df7a16b91f2ba0571bdfb5b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.131","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.14-renovate-internal-patch-e14ee8297de51cc96df7a16b91f2ba0571bdfb5b_1622272832697_0.785175747768321","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.14-renovate-internal-patch-2ebeb3da887aa3922bb6e95c64ee529c72dc7f17":{"name":"@balena/jellyfish-client-sdk","version":"4.4.14-renovate-internal-patch-2ebeb3da887aa3922bb6e95c64ee529c72dc7f17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.14-renovate-internal-patch-2ebeb3da887aa3922bb6e95c64ee529c72dc7f17","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fe854a3ee6785f71764fafd86db534fdd458eebe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.14-renovate-internal-patch-2ebeb3da887aa3922bb6e95c64ee529c72dc7f17.tgz","fileCount":39,"integrity":"sha512-O6d3tQgF69xdMBeGPBKwG3y8UNKGj0Gp69lSMOvmypzfMnmPWteBd8UwlGqqU3gMsu9WlJWW9vVDyaMVBhbkBA==","signatures":[{"sig":"MEUCIEy6Mglan0kX/zro2dO4Gsaeh+lsuR+OpUFkcbGU3hziAiEA6P+ecS9dt7qh1X33pMY45pQ4rr6fLS7pqXIT3z/Kq3U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsgn3CRA9TVsSAnZWagAAG1cP/A4QccJBk4htGj5oBNey\nOau37D3neXfd4hnsDbitXnDM06JNkbhH3emRSY9PSeIZiVyngCayuS9aI0DQ\nRIReZWlGjoUED0+d7T4Z+nrS/XqIfqHZqBidTZK2U/2N8C14zGeq2TYtTpz/\nXV9jMnwuHdlJNUW5BEktlf/ZmA0CmJ/g9FwzZwS5dBHd9QfFl9H9dQ1VMbGP\nelJ8azC9oAhD8m2fNU82lA3yaqaFEq3jH2Nj9JiAWErO8einHsLmY0NSYten\ntJtEGsR5lsxUjLGGqcOrJPVU6pH8Kv4ia2b53Rx51Gupfl3oMhQBZ0qtH6Ed\nPfPxsIgoxtT7qQhBkIozuGp+z/Z3Ma7Y8UU88+Ek/1KleBw+4skZqqbuZxLC\nfmIIM+cJ0eQkeHWE9eszhHewTgwfTMTO0hbuo+PMM1x4M02F2xNSwZk5Rbe4\nwpJc9kszqdB6iRctdqRSvLUIdBVjbRZfBgvof4OwlhVcdNTApzosbHRsJCVf\naGMy1lXxXq3ktnjDFbl34yQujhwKXk6mV2cNGd+kxsixmehEfarHggL/X7PE\noharrsb03O+ITYIyX+H8k1gZqmnmoxuJPIPgQLLFmvCh79uJJT31GkI2qSzm\ngExMARGCsvXyr+qIGvR9WYKR+SefzYpHb9nQZKHqYjt5W9AKtj1yoOmj3DLQ\nnxWz\r\n=Yff+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2ebeb3da887aa3922bb6e95c64ee529c72dc7f17","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.132","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.14-renovate-internal-patch-2ebeb3da887aa3922bb6e95c64ee529c72dc7f17_1622280695416_0.775252959518355","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.14":{"name":"@balena/jellyfish-client-sdk","version":"4.4.14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"69ba813908ef09b85f5a4a562e6ccfc5f5f83de9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.14.tgz","fileCount":39,"integrity":"sha512-huKzp6CCh8qVjoI21W96gMkkesJufmV6X6LqYm8ybhkSIQNv5eIZyi+UXSG1mtyXHm0WMk+JVk086zt3LJA3Qw==","signatures":[{"sig":"MEYCIQCFe99yZ053cy3twt+4lpdODolIgz/hDBMRkZHfTG+NEwIhAPTan6psmhgtMpwNqd+1U8vTyxe4Nh3SsvhVub+K8Ciu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsgqgCRA9TVsSAnZWagAAGacP/j6at0SPtx99tpYdUmje\nAsgCEZrxNSnAOBtVRCPB+LEk2PIquzlfvLdB/XhS3xrdxyZ6wJSaKzVEtZSr\n/1GGUJGzaNznO2QICZYUgM04/g8s2TerDr292nCD8paQxTWcQAI1cbX0cJhu\nm32de+Yg3JiFr3ZfEVc6YS5hI4NUun33L03wI/le8aQYTr/f/WjaDhAp2hsa\nmZYeaEIeOnPT2k1v4HivAQRD4VCx2XieHYAViUol0cDnGB96bijSn0fFTYyS\no55YJGPUS3wb6LJz7tetn1eP3fuQzyo0PYwWgfXwIM1++Cum3MvUKxesI9b8\nVOxo0ni4JcW1wcPJbFu2nK+0VZ7hY9IBIlSu0Okt0HRGAyVVr04ilFSCcfaJ\n1sd4KHSWXTsiig7t7TkJ7iB62DJWTffhsKe2lkz/28Jk2ep/o7OxrhnW4B++\nKGfrwf4g5HW6rx1abq1vfnGJoAqfFuaGKQ1JV8rblEqBvV5N1wA17tdOfi0O\nphxBbc7D+IIgW2OFneeJcA3cR5r/s/w4uakL2qOFX+8SWGchyMF5bv4Y/UnG\nOyl8WyjHWZsgx0lEAIkBVRK5pq2/yPJTQsfO3MrkFajT5w0aevw/zdIE2kwA\nP2yAzRP9CCJZNc2lWL5fsQIXXBiLu0Bh3RO65sgHPc2mN1xmvKfpG94CRmdH\nNs1f\r\n=dTY3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c4cf37998acfa72ffbe3b7c84dddcbc9f0205058","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.132","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.14_1622280863763_0.16229415626207278","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.15-renovate-major-external-major-162f21cf00dffa79906c7e7829813ac69e66c950":{"name":"@balena/jellyfish-client-sdk","version":"4.4.15-renovate-major-external-major-162f21cf00dffa79906c7e7829813ac69e66c950","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.15-renovate-major-external-major-162f21cf00dffa79906c7e7829813ac69e66c950","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1c584bae341a8390d8a0e70fb587fd2327e77deb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.15-renovate-major-external-major-162f21cf00dffa79906c7e7829813ac69e66c950.tgz","fileCount":39,"integrity":"sha512-JblULtzWCuO00WN+gH16pEfcc1nBfGIu1HWWhLRx0Di4aoZOBeP39GARswjxpO8ZP2xPxm1VIoUVIjbDMuopHg==","signatures":[{"sig":"MEUCIAKqUj31G1tREe9kGJGo39fVXQ/C2D1GVZNUmN+Dp4lGAiEAx5JzpfdA2dhavR20m1es/X1TKX8Pq861XNuefzzdFw8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsguDCRA9TVsSAnZWagAAJ+YP/R9swnQwVcChCyHpCg9q\nVgO2Ik6EnGsyTCP0jWwknVxJjEWkgpwlmqO9uJeqRzsz7NMfX3hVxxIhgfUP\npqZoQO99WMuBNfRS69VcyCT97y7qzfiSKaah/UlY+jtk/eLLiWZ8FMDPAVQX\nt0sL411CZIag7P7epQGu9bRoee9Ae13iRDJdu+EnSK5u4TPGglDe06PgmpBA\nKw67Y1vFfYeQtOa0xOalHidCreJXGcIOF0pt5q/Zv9TUChQ8bM8Nix8B4qcN\n1RQZ1lxurOU2hzdHO2qb5DIq4v31hKwWrR77Q+DbNuH7OO3OLcwwphO2mgxW\nU4hGCYfZsAjs0Pqy/KAEoLoYcc0F7+OlBahXfIPLj9P03HWM7MlsYlwG9TG4\niDqXSATC2QnYSJ1Ef48fnaxZHf2Yz0DeTRxDBY0O5g59kIr1NnmUmawUrBex\nd38e3zUPHV+VaEMV7K7EGXsJMOTLMNngxjdVF4PuX93WXootmOb72pISk8gc\n7v8LUf1BZ50+AmQ08Db+DcAlI9VHy+RlkFLtrJA2U3hJ54zBjKZU8kHDntX8\nXc4FhCCbB7h0QYnXDJHfUoJISNlr5rh+52KRzYyBpku/d9y3fTzms+OnZ+4W\nNi6wI5fpqtiUmY067oGMfis0tbPVZkekUJMPPlYzyIgTrNxnlhIZZ+jJI9ne\np6Kx\r\n=aaif\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"162f21cf00dffa79906c7e7829813ac69e66c950","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.1","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.132","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.15-renovate-major-external-major-162f21cf00dffa79906c7e7829813ac69e66c950_1622281091023_0.017865984876642704","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.15-renovate-major-external-major-5f4f52f7ad31fc732792568b0c0220d47d7d34f9":{"name":"@balena/jellyfish-client-sdk","version":"4.4.15-renovate-major-external-major-5f4f52f7ad31fc732792568b0c0220d47d7d34f9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.15-renovate-major-external-major-5f4f52f7ad31fc732792568b0c0220d47d7d34f9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75956d47a2163b61e2a89f2555785de27b91f449","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.15-renovate-major-external-major-5f4f52f7ad31fc732792568b0c0220d47d7d34f9.tgz","fileCount":39,"integrity":"sha512-0U/SNuhuNM/Iw2A+/97lVk4zngkFqGCRG5RYSss6d1rHwVSRwbTonGJ8zzyyOPmhXhEEkDXpvK4WobTOqKXhJQ==","signatures":[{"sig":"MEUCIQCe/ys9P84nHbt/Fn6KbH/z4nook1V3UtUeIEFg9hE+LwIgTdzdzdhYV46V0B4MKasvZzn7xt8N+w7ecPIuNcpbHd8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsj5yCRA9TVsSAnZWagAAL7gP/jf+vqDne5/UYe4mMbso\nNyPB7GnhUeAVfqunw9XJHeBnA8vCkZ/cQAfAE3s7yBO0jpQ/QjxzMhdnd3tE\n6Ul01llt1DgEDzxsplgtR4oUzo2vsyG7rSIzQr7gP1jsVWESGZMbSui+m+No\nP+wEolbkazUKAZy+J33zmCxceuw52yJXhi3r8a2Yoqhm1qw/B2f95ZUSdBVs\nSHpheDt4MeXiBby9SGX4hiT5jRAHAVBa/7HVt0wYr8TxliRhw96KlAC9Fke2\n+mIQhGX9X0hRqTy7tKjhohoVza8LHP+xfyh2LwYbaPkgWaGMdVyCt/PhullB\nlLUjNod/GfJkoNURxuWdDSH1lr6sJcYKFDErPKz01Izv8kRvq60WFppjwh9Q\nY1U1Fjk4fvK/Do6QwqI6N028I5aZ5rocaVA3AosSwzuWc2abql+JF8B4CRDs\n66iuPy2uZT/O72eOsUL2TGzSZo2i1gIq3lQelgzEVyQGpXXYI/8E8BP69LRq\nQ9jkpvh1yJIhOcLhko4Re5ebn1YsuQp/VNcmiEPaOEy2Bm9607oGzJ477KEv\nsTnj2gnV2Yr1nOJnHjihGG67ZNHYK0ecA3s8+ESeHpLy1H/ItLIXF+UOPVsa\nGRSUkcQJXwOPFuTPRboGk4cZzOiPTMupU7wRAYH7uRbtUxAmIjas/5P7kMK4\nmpx/\r\n=lgwn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5f4f52f7ad31fc732792568b0c0220d47d7d34f9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.2","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.132","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.15-renovate-major-external-major-5f4f52f7ad31fc732792568b0c0220d47d7d34f9_1622294129548_0.11449704298777363","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.15-renovate-major-external-major-9b2590ff9af16eb6d757655956d1bdf80c941511":{"name":"@balena/jellyfish-client-sdk","version":"4.4.15-renovate-major-external-major-9b2590ff9af16eb6d757655956d1bdf80c941511","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.15-renovate-major-external-major-9b2590ff9af16eb6d757655956d1bdf80c941511","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5034580301463a32b2adde5d8894a697dedcc677","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.15-renovate-major-external-major-9b2590ff9af16eb6d757655956d1bdf80c941511.tgz","fileCount":39,"integrity":"sha512-hFH7AmQgKfjgKA95TBEyXyn+eBZH519V0/41n3wrqFVNkKa9Xwb8pSfjFS4zdwDRoeneNS8Ak5jglLVd9LwTHg==","signatures":[{"sig":"MEYCIQDEDcbTFUYTsXgVqocWj3D9Az4O2On9nZA2YjPhW7C97gIhAP77Abpl7k0xTBCQvh/Mqler9AeRHywkDr8kLe0xMg+i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsonMCRA9TVsSAnZWagAAEloP/AzrPyeBnbt4Jat8cgD7\nWGU26MGMQtPycO1TfKeCkNWgtX8Izwz+5RdJUvltt9JjWxbdCV246SzHWUXD\nhQw/Px6C2zh9B07TtXIGaQ21hxv2uyznnD832JrLl9+3iL12GDYD4uCV5j1t\njycl9G7Bxmmm2Lpa2eoMvcr84sdySJPbMMJFRCHwqWKlqPPX9DzJOaouE+ZR\nnwGG/K64sLNCjTdiDNXdLqaEADClEp/KXV+Ubs4XQP6L8ofspRbs0w6rAOQz\nvUgnG0pDVNbenhPLBCJr9mFUx8U70guBNAas5+hFYA/9ZlMa5i7POEGAPQIs\n8CC90w62NEyqIJDh0Fmsnjw6cmS1AEbVdF14nU4yOFAHmU4nGTfeyOfhx2Xo\nQAaSCPp9x8P2wXAT5yMkycqn0I4Qt4XFIZMaqP84xy/5FrvSAG7T8dY9+ith\nPMkkOZB1d2P7PtyumzZbQVylIjIRnXY4SqO4a4D2wWMT0KliKLn+3d7C+cSh\nRe/jrcHt27S87dgGqUQtcFvhFAphq6jv/nw1hS9wSqGcF/h1J/3yXiwncLEt\nlLd7wMGWWS9YsFOtaEFLDbqTMS183FMoqgT5M35VIsMzWeZFR+dCQrvyGNXi\nJvo3AcORjz5vO/QeUKgsPwML6zgNaUuxHtxZTq71gLjlJYRHEVHdMuUoDpP8\n8yAE\r\n=g2Zn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9b2590ff9af16eb6d757655956d1bdf80c941511","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.132","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.15-renovate-major-external-major-9b2590ff9af16eb6d757655956d1bdf80c941511_1622313419705_0.40376629183514123","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.15-renovate-internal-patch-2e00aaab6df1d64345e781289ef7781989df64bc":{"name":"@balena/jellyfish-client-sdk","version":"4.4.15-renovate-internal-patch-2e00aaab6df1d64345e781289ef7781989df64bc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.15-renovate-internal-patch-2e00aaab6df1d64345e781289ef7781989df64bc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"04459f686da28490bbcfed14cca221c08e806ec3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.15-renovate-internal-patch-2e00aaab6df1d64345e781289ef7781989df64bc.tgz","fileCount":39,"integrity":"sha512-FKLxqp4qi6gI3e+hAzdWoMKO1ETq4bygSKWeNzfYOxb8gzGY4c3xL/FJxFCGxxdNRpnsHiowv7sUAyRdM823VA==","signatures":[{"sig":"MEUCIQDZL86Qeys6asCBZmE0zHCVwPldllP3yutanreVJ2jRbwIgGppXH3w6thQ/lJI0/fY4WhfPnBekcBHyVVQvLw+IwdA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255192,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsqLxCRA9TVsSAnZWagAAX24QAJcD5SwI0/dkn4xndxev\nRk9rWwgLnmdHYd7ds5eVgIPGC3vwYJMw5EdMQIs1koih/4yDU09kYHhoBghW\n4zCe4XCmKE7BniyLM75VuBHOZyoL9031doCkcM8ITbHYvhRexZSVtUKS4JfT\nLgWX3bJKhrM05q6zXIZMvUJFNzekRk9RMxJTaG7Gtwk8sOK/uRncVRJFply4\n22cUAVlVMtTaNnUrZInt2gLA1tLZav3OPxtghEfpdjw5hltFHznwnqzf3zJg\nUT9QgdsQUs6sEO87/Mc5n6PIL4U9BmoMt47b0riSgy3JIjiofVZPxsKW+t2w\nmMnMN56/1UOwOcKxIeKWEp1e4iEOSegXMD/2TrhzIqsmjiNtcgihENFZlw3H\nUXtwXUBqqhL9BsniD0WEj8nbx/8qapY5ufbSGh/PYEeDsGXik8vm6CBZr5JE\npwRlS/kO5j1Dtz9LwpPu8ySnHj+SoLhx9u4knReKcitCfKkulLr5CMUDGlX3\n5/n1HyEXNIp1yYIj/CEwOkrzb9UAZnG/wJ0ya5tm9Y/0BOnCQgwcXVU6VCPg\nvU41pVqhpF1rRANbdWf6kaclt8dTLIb5nZrlKD9QYoIFU9KPahwMVZIGZTjL\nqIu1yDfoNwPvGn0wYkKbbed1eck3mTx03GR8nExu14k0neNXD07cRkJ29d9s\nhFvx\r\n=ntdz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2e00aaab6df1d64345e781289ef7781989df64bc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.134","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.15-renovate-internal-patch-2e00aaab6df1d64345e781289ef7781989df64bc_1622319857172_0.4538867765716261","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.15":{"name":"@balena/jellyfish-client-sdk","version":"4.4.15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.15","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9d57268b004b0460fa6d3d7d387629563200a2f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.15.tgz","fileCount":39,"integrity":"sha512-/uiejtYlUb9i2BmZdJsqlhP9O3vm3xwZg1ersLSjIN8Im65ueB2cYg0U45YfXM+Jd8thkQUsd7Ucx5TbhdaGmA==","signatures":[{"sig":"MEUCIQDy63PQ5qCmsqx8AQ6w6aEx85M5Sx6KUY+Y/ejXBsEyOgIgYBZ3/Xed2UHWRBkSD6DYmWQzlPOxYrVIp42wRtRDWOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsqPoCRA9TVsSAnZWagAAi6AP/iHraCFdj+NxvyyX+ynq\naTqcAj+wToTRFRjiT2774rLrDerhi0iK16JAKPgxS00TEQL5Xkbfw6tVxASq\n8o40eIFGv1JZSjZUBprDDBgMrZS0B4s+ypJ0ycZfiaFa86yJMsXr5R6f+XQo\nCvaZ4W48bucoW1PSNUoYyBWC9parBed3nluvWqlQq4UZF9aE6vJEPo0CxsGV\nMF2o4rHcm48mCpcLx4jzgDAmgKiVfU4Q0ublfkRRjvf4zTWAsgCp/hfchjBd\nr23qotr5DzVFLvTe2jE3a1sDGDtFr/ds4bD29n+E22W2obRuNDVfDHfxrEYb\n4FOSfvhnjTzEz+RLFklpZXLF5z+zuFS9Np8O7yAZHf/OPAU6NM6nc39ZKytu\nWU/2DY/hTZTVLkC2Ohr0Hpq8SYQVgWbz+pudxwxvgvRDNWOk9eyRh9NFs6so\nZyz0vgVu9GpaFvZwT4sgsCghaDr+xaewxkLLSMlZaDqQChKqs6UrqCvM3EQ8\nC9LLcFmIhCk/dWlDhC30IAhJMnaTMJXVIE74trpOw9BgI5hy2Ut5C56dYMLh\nfzaeai5yey7ua8G1etKUkDbgn9b2SBKb6wflp/hhQIzbhj/aOMO3jOm0OFvU\nzcy/Ekdbbl1LVPjB0WiGUNXQZ5Ccsrrarp7bJi6YMk/bDmYNv4+ioue/2y/J\ngKiT\r\n=Q6Tx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2842c788336428a954baa2a0989b94fc23dee83f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.134","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.15_1622320104044_0.8554124985392288","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.16-renovate-major-external-major-0d7b411135e7ac413b8896e4df70fc2d0c481ed4":{"name":"@balena/jellyfish-client-sdk","version":"4.4.16-renovate-major-external-major-0d7b411135e7ac413b8896e4df70fc2d0c481ed4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.16-renovate-major-external-major-0d7b411135e7ac413b8896e4df70fc2d0c481ed4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"34bcc04824f183e7ab9c939cbc53315f19bc090a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.16-renovate-major-external-major-0d7b411135e7ac413b8896e4df70fc2d0c481ed4.tgz","fileCount":39,"integrity":"sha512-TQ5qNT61HGxETaYxvPZLWg4wLsUlraJW9XaMXGMgGyuC1kP5kgynK/+zWRHoTbL1E6HC9M3m7Va2vkKa4Cuuow==","signatures":[{"sig":"MEQCIB6DvQUMlSbetZN4UZTWKHDq3zg2k4o1LcSBhYvfIERvAiAIYi75/sVfgqnc8YGk7DlldNn4j3rb3ybXdHH4V+dp7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsqT4CRA9TVsSAnZWagAA02MP/3klGwEfpozISEMhutcP\nYGxELYFZ8KXz3PkXGNncoJvj/xokoIJaUJA5R6LJeCTebYtx076p50vcT1z9\nF/CU71iWKvURNYIAqTnNnxW7cu/pulGGkHBi5CRElk5mHZXo6O8S4AZIbNag\nTBrUjJKAWhC4sqK8hpfP1qJgAKsrWeJ/uFF+tNUkl0K4IEClY3fyrg6iG+QY\nOx5eLhdFK/iV/K+NECi3+HltsetPopXWL/KxGho3Ke+cuoGKBGDnrtEohF32\nuuD2KPQeUIuejMEAJPH/8Doj0nHgvp9NbpPE1j4RUqQfmTQxgdk65eA9Tt74\nTy/z8cqulLKAf7rjzB8Gut1hQrwZlNIM2RI11I+6dIkeIQ52CZyqA1Qs6LaA\nZgBCHGHBcowLI9fQPHtifqsyCPL6oDp8FHJmlh9XVWf5CN1HEIjOe/ncbKQC\na4SK8vUb+1Fst8dwtUi2SyBpe2zIXy/GZM4APn7qpsI0eGKBoBxXkzCV1GvB\nZcWzqCDv7eXwzZNmp0gZ8W5toddTs4qp4cP56dL9WpXhR+Q0mffwcIOsu3FW\nunop06JbO6v764ccbciM1pARNEChVvoZoHQZmiwKkbGzxEY5OqSylaPiheJB\ngoi5nLOitIW+QVqsCtLNOhUyBGS2dF6L+Y9RpHPe7JLq6Le9sIa4pNixb/C/\nhI4Y\r\n=Tmge\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0d7b411135e7ac413b8896e4df70fc2d0c481ed4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.134","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.16-renovate-major-external-major-0d7b411135e7ac413b8896e4df70fc2d0c481ed4_1622320375778_0.558096949246407","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.16-renovate-internal-patch-3bb6f0991b6fb5f2867d50f13eb8e92b225371ca":{"name":"@balena/jellyfish-client-sdk","version":"4.4.16-renovate-internal-patch-3bb6f0991b6fb5f2867d50f13eb8e92b225371ca","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.16-renovate-internal-patch-3bb6f0991b6fb5f2867d50f13eb8e92b225371ca","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7269e4adaee3d365dae07b00180a333b003b13ad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.16-renovate-internal-patch-3bb6f0991b6fb5f2867d50f13eb8e92b225371ca.tgz","fileCount":39,"integrity":"sha512-nTMbqlURh11SY2FLlvDNuNJGBk7iyXm9srvkiKgf7uNGnwi4AN88r7B4BhA/GR3TS/2z+AQI/qcS2jITLYPgJQ==","signatures":[{"sig":"MEUCIQCITlNOGbFFObRDFPPMRVv8WSoZdB5QRnmPw3Eye8MaHgIgVXSEyBx50MLCeI5yChBIe7HbtvGiNMuaukBcA8Dn+eE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtF96CRA9TVsSAnZWagAAXucP/jigOUTyL6C7n0H48UuM\ne5H1eTdnSLiaz9+NW+4r75ZPO5uSYuBMC4wNybP7utbG1Pon7yW9YuJilRvw\nd+zibMTXzE9qmH/0UjtQt3bUPEPz0nlsyAd0YKi4mMRnYb2hFBlU9sajgyN8\nkkVWHucn3T3RQMloaI2JIqKZiGwWNyu0dy37Di/59xW3zhL8gBIsgdBhPXYr\njLEpyLMwxyrDf0uu1u7AwFUVQjDr+1+mXPkMFcMR85skb7Yb2ajMrrQMKXoO\nmQZNnqRXZU9Mzw3u6a+wq59l3dFVzXgQLtxV+P95o/fsOkZBWGlk9bpMApVM\nVJB2u4shsjzjcMDx9skTCZD2cvSsJzCHTgYbKmNOZ7uNStM2pidVCjCgG+6d\n9UWGJQ8Z44smCqtIhtk7z9/+AxcQf3180M0VPjzeV1Tb1AujmqcKe9TAS2O1\nEC7L14ig+1iWP5T4+I40eWKyj7k+KjWd0MM2hufluWkpwKzJks6OE4fcfIyO\nFhkXb11Lk6OBOx1hCcRJ2igwWUJP0ZR5Jv3EGLec4MaJUY7XHhGAQVJwJvaA\nXGnuJRtQwDX2gXcTUd6p3iX5CnWrzfLHOGZOvA6bNg0mp9tyissJblAy1oJu\n8c7nxNS3lBwIAig/skvu2dxhGuGy/SlFuBtuNHmykd6qh32fePlYg7ePHtuh\nDvFY\r\n=+pXQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3bb6f0991b6fb5f2867d50f13eb8e92b225371ca","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.136","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.16-renovate-internal-patch-3bb6f0991b6fb5f2867d50f13eb8e92b225371ca_1622433658114_0.6922341892807555","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.16":{"name":"@balena/jellyfish-client-sdk","version":"4.4.16","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.16","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ed1837f6d2cbe9e87aa4d7c7deaec83b9cfbd93f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.16.tgz","fileCount":39,"integrity":"sha512-xqVT1y4TmdOYh+h16DPEp2FWB1M2iHFo8HEktf3LQC7n0j+1m4WJGso0K8P/qUpvnEyKE5R8WJoZmdTA705/DA==","signatures":[{"sig":"MEUCIQCWHra2mmG4nXxeNmqML6m3cR0DjlTFQyDyaG3rSVRF0QIgBNc/1yIcZOOzWtHOi0Q7y3Z2+PZU9+Km0pUu+3jRa5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtGBuCRA9TVsSAnZWagAAkcQQAJcR+D4JeY+KDlD+uMRw\nR8pX+nRsxrnU/0GD74XobMNNBSrSHJi37AsUr9hc7mNQYmd/dr9s2+HoabX1\n/b8UptxKmTAB3fRNXkY3r3Ic9r2s1dEoLCwUlUy/46jcK1fxhHc+fRE4hIbb\ne1FonbGKwYixVBGS6Q4wMr0b/L3CPmbbbqjlb0zNiM2i3KjgmGEYFZao3rAq\nP9diDF9kg8H8uGxqhSQYrIeIKEXUoxSMQAgvLkeUwnnHTklkS3pPDrqx1TKs\nOyLR8voZ9WUXYEN7o/tYD3AcEQuZ4q/5JeABku9MqffRy4Bew44M1rCIj1TP\nyaxGX30K2hyTtinagWOGCzLKDGGOlWV6d/5hG3fD4VsoVc/B1yFvsRuiFJmo\n/j/tPI1c4ddB9BurGGPtMrmdFkUKa31VNpM8miIZPYWWkq4KjqJMSoz0LeGQ\nXeYVs8ZwqgI/gJPLurrdt9EIjjZEVwyf/hQSrP/COtlG9dFOfWyiBO54FWcH\nem12P/9y44C1zyt8dGPSOQt+364QJSW5xDw0iwi/hyH6HX1jync9nFA2QgxB\nrNI3a8sL82r2BWuCx6h/QQEfTg4HoRtjITrjeBu7rmBxiwV8wDLSlfQBlYg7\nBOKNtBbcpTdYNgCS9tCYY4Kb3sw5/WDLZALfi/ZqkIB+7qmd6z89+Nd8V+sZ\nVSdu\r\n=Uf6D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9fdeb8214642189b8bfb6c60169c226884baad68","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.136","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.16_1622433901620_0.5738539768683233","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.17-renovate-major-external-major-7b1b518b14ae29f264888fecd331a207e0e6f483":{"name":"@balena/jellyfish-client-sdk","version":"4.4.17-renovate-major-external-major-7b1b518b14ae29f264888fecd331a207e0e6f483","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.17-renovate-major-external-major-7b1b518b14ae29f264888fecd331a207e0e6f483","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"907a8215254e273a113e4c8d331d51e0931110a0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.17-renovate-major-external-major-7b1b518b14ae29f264888fecd331a207e0e6f483.tgz","fileCount":39,"integrity":"sha512-a7UsZZJByX+Rvqm1CMNnqbizC1RBzlng+nIWyHKzuH6MAkFN5Tro6qVFbzltdCwfc5gvsDdvoWaa7wdBs1qFoA==","signatures":[{"sig":"MEQCIGzBJ8SwNQ84stAoCTT6tBbuLVstot+pN0/Ql94OLkaGAiBvlLkkPaNa/YoZxN0fh2Kmb+R4Rk0CAt9QnevCOkEM6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtGGWCRA9TVsSAnZWagAAPlcP/A1gu+DfVcqe/pSZ5mr7\nhcCLVRKvCAqsRey7H6+w5qi+2Y92VsPTWsiD3OlTxahRBQqlojeCXIQWNODU\n9/m369x8nLy8Emlz5Hz33SiNoZ6Ae8fq6MIr4DjMl0l6/1SCHtjrnIoTFgLH\njjp1ZKRW4l1+EQV9u6JqJhkwnkZKY7ahLz9100yuIjQYY6fNm+z6iYlBXXoo\nyKkTywNV5eTYOHnREDrAIJFF1AD+aCUJgjWsEjzxiGFy6WWRJNCn+SMjw9UN\nJ0+wax9rVy2cpwxVYtdfEZdPomCC+lMJdQigFA2+zmk0XHJGNZwqi64lCyfH\nhfNR7acsxzoTDiQIMTWi1dxyWbA5nHNL9tWmEx3r3/K/so67aPds6POafYG/\nfCeknaz7chwOxiOux/+V4RxXChIXtTLmc9KnILrM7aihizdy8MGf5n1bwqCh\nSkkyRDUcArqHWDBtrGKkVIjzpPyBCWF3tLnUT+cy5H82MmnJJKhGPk5iMApz\nFMgMKFLmEvCWo3tbuHuNtZaInG53ukk3l3upVS/WcWqPurbXaU6nczCOS61J\nZTO8IJNipv9QbRiEf8sPPp5Q/FmUDKYN4Ahp1XjR3EP17KSb7PfMq5D65fX2\n+qGrhECeIF54PFDzjd7CGJCNXuFYXZp4OLzcDoCHz/DXPjURNqIXgsbSHBVG\nwwST\r\n=uEck\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7b1b518b14ae29f264888fecd331a207e0e6f483","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.1","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.136","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.17-renovate-major-external-major-7b1b518b14ae29f264888fecd331a207e0e6f483_1622434197994_0.2621337601042004","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.17-renovate-major-external-major-3df2e1cb4d96cbd011e8473b00ce7c18142a06b2":{"name":"@balena/jellyfish-client-sdk","version":"4.4.17-renovate-major-external-major-3df2e1cb4d96cbd011e8473b00ce7c18142a06b2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.17-renovate-major-external-major-3df2e1cb4d96cbd011e8473b00ce7c18142a06b2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1e57068ff73d1d061fe6736589c9d339b17842e9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.17-renovate-major-external-major-3df2e1cb4d96cbd011e8473b00ce7c18142a06b2.tgz","fileCount":39,"integrity":"sha512-nBHjncbw1qJMIVsEaQ7dG0NAdVjwFVAKsMgA8JCDhWKSYI8ZrU0MZpQQ6Pyjpu2CRh5Ek5q1TIpusKLRMsCIlw==","signatures":[{"sig":"MEUCIDHqFLDfFjIEBpjyOtCP0317JU5wagwlQDNYygYkRcgoAiEA9hOYuHnRlkBjtCZA8qDKgkH+tm9ajF/dsL4dCB3tmhM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtJ3eCRA9TVsSAnZWagAAObYP/1upU+ipXBs9xJ8/hKdQ\n1i611T4ZGULy9DqLzCxze+9v9E4DzhxuyF8TYoSXy293zZkDmNtysEwdvah2\nKO4WiIHlC7j0VOivjjHK/42uVOm9Ygn1wr1iZXErbBt/yoEcZ2pKwCOFfFhK\niPEyrnlcufNMJwjQME9PiNod/Se6JnbvN/X7RoBFRr4UHlV7T83JS40Au8Rj\nRN+tBWapC631y1Y5Ma6M0/7FUU0TlIPhFA72X8jxG8+dAghWUbiPgudwBYRb\nd7dg/R/1mcMD70QhspEWZSyu/UUBQE4h/W9HXdqydeUziF1w8BzrA768qhua\nfanDwRXpF93Di5B39A5eGgEDkYBSLs+JIC2uwiB/woOC6wfz8EFjmSwiehBN\nZhB4OY6MJxHnms8nCWS6CdHYmrid+gW3cFZVW5/cUUsKuj8zECHxtjmiSlpi\nGzhQv63bgkcuKdax1dx7mLdSCjYapXXvA/brHRq5KAPiAEaFAatIRNEiSbvC\nMMa1otFpQexBptIfafMblpokoWrfYqfRnNaBEkDjpfzSiXerzm5xdQDWF8mK\n5YiqXFQMxxf+eLmHVLB++VPNj0H5lTyYWH3rZ7HmSwJb7o0EZ5P/kPAOMWQb\n4l3JWzhomRmpEFh/HluS8Xx91RHNMhModOzY2NHZBVqObZoaRxs9e8tcuFcC\n4L7x\r\n=L6kf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3df2e1cb4d96cbd011e8473b00ce7c18142a06b2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.136","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.17-renovate-major-external-major-3df2e1cb4d96cbd011e8473b00ce7c18142a06b2_1622449629840_0.9726717911747782","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.17-renovate-internal-patch-7302aadd4c556993e345c37a50bd5c23c64c88db":{"name":"@balena/jellyfish-client-sdk","version":"4.4.17-renovate-internal-patch-7302aadd4c556993e345c37a50bd5c23c64c88db","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.17-renovate-internal-patch-7302aadd4c556993e345c37a50bd5c23c64c88db","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"966087f1b5799cdfc22e592ae5c0515065b68700","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.17-renovate-internal-patch-7302aadd4c556993e345c37a50bd5c23c64c88db.tgz","fileCount":39,"integrity":"sha512-iBfFI/e0Z0W7JITqdUBmdsTtydA36Gcck5if9ve2z4CmnAS6V5maa/VbuZGmZ6RwjhJ6ZSYNu5mZnPVV+T8xVA==","signatures":[{"sig":"MEQCIQDOpKt4nVHUfQ5uomJIDSXcDhOJcv7kF2m7NVdaP40/HQIfGUTLta1YhCuxbNrjpWecCudHC1NlSHG0Lp1tM9TEcA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtLOiCRA9TVsSAnZWagAA1NUP/j16lhEgijYScdKkhdLn\nwfXzv3BHqBri+5yjZKO8WT0QW4eKNj0RqkZNwIg43Rw55wq8L29/xWehhfKw\nYVqFBMk0SSxV7DAAxfwsg+yehnvvlFGgfuPIS1FoyhJH8+otn9qLBdj0smoA\n3F9aVTNVSD2JyYTQrQDHNAJI4vMH/KJHJgfIr/Mn1Eis8E8p4IcUB3gATQFX\nj4m+iTPBZXygDGgnQmYUEA7GhBgVbsSrscIjidtxl72D0KygJgpA3zvIaok3\nBrSMKOS38dUh1xjAVnzj1hCw6X/K4J3BqvS2g6TA5zKvHN9ft3Z5lpt1C+CD\nz0+AuOHCmp1Ank43AF1d5RIPlz1+knYU1tMD3BL0luBdxIv5CjglarmOHYW7\ngwH48YMkSgCw8ywgpBsDC8zKfAgknz+ZRYROTHA3la6WPyuylBXh1/8yfqSi\nQWlcAB5+DuxbbtwtxwhJoPAk3VosrF7mn2A/zaechhbf/Yh/A/rVCUgj6PNr\nwXZLnc/uilKKjc1snrZ0023aL+osGFh55jsbD8DqDA65FyS8mb6FXBEn4zHf\n6gxpWN/sQF2pNcg2ddOeNujDa/RLNxr40Q0jur4vk7ksIyBsXbSbj8CGsrKl\n6XBSvpBaXWsTD2SRgor/P2gcWYVnH+ZzTp3BjnP/w8UaCz4WyCvacwG3/kva\nkWsX\r\n=tXdJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7302aadd4c556993e345c37a50bd5c23c64c88db","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.17-renovate-internal-patch-7302aadd4c556993e345c37a50bd5c23c64c88db_1622455201917_0.8813064203204259","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.17":{"name":"@balena/jellyfish-client-sdk","version":"4.4.17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.17","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bcb73e1b34bf7d70684aa7029440a37caf24f8d0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.17.tgz","fileCount":39,"integrity":"sha512-dlP9BEGSJV2CcUQ0GI1uGK65yOYxrD/Uh6l7sB9Ts1D5mWMe0u0XkcJ6t9T2Sk5NHMpuMXFjsjqWCddB8MD6OA==","signatures":[{"sig":"MEQCIDNKElvbIqD5rIKZ3jUupHvNIHOmfxS9sXfZRXJfJupDAiBXIjT9w9lLnowIznvydr/tIeCC1j0qOwWFgOOlT06hXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtLR8CRA9TVsSAnZWagAAFQoP/j2yCC616Hu+iIY9BsxW\ndE3O+cNPBNh7cEwlHFv4rpZiAV+Te0xblgNgKFAdLDMChRIxQ3BUhWfT5ouQ\n2UlJdVb/Sf4CZ9rox3196H7Vr79BYN9O0HmV/VgLRhSpiQBuvBzsUoukmUfo\nAX5hJAbtCqxikDdQ4h1JRjcXNeiltcZzT7qSNXSL/KGO75sZPIPcEh+YYye4\n5H8oPV6H3e2LVVioL7D/srgIiPLk0QJaJAQs7r/n5CIcNr68Mz5yANkYyStP\n1CHg6ehSPRvXccj3EbfP8nKcQABQGmmVYbR429KSEmeA3VgBUAdrcw/xiiG8\n8wgJOKgkukyA6YMFNx9DxdY4H0WAxmktREzTHHVS+oyz7ScnW1BgvYIGaYac\nk6/YkYxsfJI8R03Ih4Nki0IuVNmdcj1BDnJbdknvrdC51dka+z5bX16XmK//\ndVKRBDsz28MUKicBLmEA9Q0zePvgHwhS47fCcIJEwQXjv7N+PT3Ioui3nmZJ\ndktGl8wTPAuIrru/CyoL/VY44XRMTlZJqbR9FJHdCaOdRKFz8webBj7iQ9UC\n2UeHFXx3OBCrzidw6W15UVyVxm0GYG8XHzMKB27zj/HEc1uVpBymicRBUNnC\n9NWfKxOJT0AiMcyYLHpkeZtiZ72KZ5UvYFWp2mHVaGsCqhCiUVwgIEC4AM7L\nCyql\r\n=cVgB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"69d2c97ad82a5d834f06565866bb3797efee46a0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.17_1622455420224_0.8859149865206575","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.18-renovate-major-external-major-8add9089f57d5c87fba6b43cf0960a21531c96bf":{"name":"@balena/jellyfish-client-sdk","version":"4.4.18-renovate-major-external-major-8add9089f57d5c87fba6b43cf0960a21531c96bf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.18-renovate-major-external-major-8add9089f57d5c87fba6b43cf0960a21531c96bf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8da4c8de7677a98d6c12299dce57752b2d7edf03","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.18-renovate-major-external-major-8add9089f57d5c87fba6b43cf0960a21531c96bf.tgz","fileCount":39,"integrity":"sha512-nqALF1lAbmzYN4Y586Un/q/sHNnRHtyZZYVUPh8SHWrCJ1P9qoGWCI+KFvvdWeWYAIp9+R4HslC2Oa2SuRv6nA==","signatures":[{"sig":"MEUCIQDs8/6XoRADIKm5k2tenMMex0kAL03PxVLfa6+hdr3feAIgZRxdhFR1FS7vCfC/+B1YezNaDJ7spvzG3T9PUQheddY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255475,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtLVeCRA9TVsSAnZWagAAisgQAJIQ+gmtD2xLEzgQO2WU\nuQz9vhEErXgHW4LsXb6QcOiB1VBthtE0RVWfpBeeC2Jj1Q/cF8bwEPKzBURo\ng68HKU1fOI+nzDxe5JRIvvUkTdrca4zhs/YtqirKH5hGdZDq2TDEHRHEXZ+b\n/7RhOpIbOvxKO2xAq3G/wAaSoODbImdpzWuuoVHRccja1WN0O+h2E2HZa8JO\nbGBXz1N9pAJXAIgErRuOWn1yeWy/P7o2vPiriHWg4pjBeZ9aXTzyXJj5MYYM\nwQqTx8ybTkhpDYJho33Wv76xSICfvE7CW5hzyb3lWybBHiDOibkY2RSCFlTe\nJU9UzQ3LNQ1X/t80ho3rA0EmOGTCvxCEghUhdlRBaRDfFLNcwzxdobtZwEiM\nJpzSk/RRN1Xw9LnazFQZHPgG//Jqy1uRVmMAa06zjlmr0947afwktYq/rQLi\nVzf/biUstZz7C3qEHf9+0R+k5QQ5PfI+mG+0Z+fSHUTTbYNi07C8Bx50cnlr\nwCL+r2ifJnuI2SRJufM2NiF2iXWX3PnA3st+ZRiU+Rdg+dJudbmci/v3OrdD\nG7+2jZCs51l8GJfsE6BXisW/bhgezozKVvbYVCY3rZ+HHqI+T/vKCVD7zNfo\nZu8sLDz50vWoNQfRBNYhYy8ufQIbDoHfkMRw3HNdRkGUHgdTg7CfNipLT6Wd\nXD4w\r\n=kHe8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8add9089f57d5c87fba6b43cf0960a21531c96bf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.3","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.18-renovate-major-external-major-8add9089f57d5c87fba6b43cf0960a21531c96bf_1622455645847_0.5070078634129427","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.0-setGlobalQuerySchema-cbc78996d17a8f143cce3f0a74fa8d54df2d7266":{"name":"@balena/jellyfish-client-sdk","version":"5.0.0-setGlobalQuerySchema-cbc78996d17a8f143cce3f0a74fa8d54df2d7266","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.0-setGlobalQuerySchema-cbc78996d17a8f143cce3f0a74fa8d54df2d7266","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"784283b05d69b430f390e91ef4d2c8c92e3d70c0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.0-setGlobalQuerySchema-cbc78996d17a8f143cce3f0a74fa8d54df2d7266.tgz","fileCount":45,"integrity":"sha512-Nr1dQLOUjV/alhixjZxfbm+Lpc4B2yAHnr7/RWW8Um2RT+Gv9l3wHVFEGvaf3JEPlBpqhowCNiZ2yq0bgXA36w==","signatures":[{"sig":"MEUCIAWffpwhxfVkpbUVgG6Z1dlufw/yqDFDIbzgJzDZUpFwAiEA0XL4019EsQjle0suICOC5SGlCE9Yb0RbB9xnuxlgF7I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":276324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtMW/CRA9TVsSAnZWagAA6cAP/0TT9ZETaJSAPb8+6VM9\nmgrd6rwNFv3xI68pjbQEwvWClx+HT9Tombd9M+oXj3+PLhqgqrd5xiOjzlQu\nKWr1ThvMo+E593kEniFQ9N85h2V3qK/+2XlOCHx+KxtVGLDpRsTH+fLn6TKV\n4WoKupYZ5LnDC4877MIsmPvOXm/D5Ikkdm73Ljpzbo05fcP/5LLDkCr0V6J6\nZSzgpFb+Cs4HHEFcgg8T7F9G8GmPa634QgzscEIEU3e7OLugXDoZhEMWRlBH\nBtohv6rTi9A4CKtXX05063bhKAC6wSTiOHX1rI98UgXu+Bh9vW0yI+1HY4O1\nJ1WqEEThUS7mlwqxu1IjD05KToeuFcLiJhaIUH0h8+tbVIrs+M0+vAcGwc7Z\nbJHZDNjTklrNjGJp8NV6o8sdX+YTf6uXPrHuhT4zeoeJgnohNITtx9q7Hr5d\nekA0EIhiOgc6nzvyKaUJTasJbWzWsBLGgI+ngioCnqCD1fkNZK3jjz2X2azj\nxmpk6+vN2mdNKqUsT7xlMcOKUrq5dRlWvkvRS97r2edGXjnAx6ce1VcW5EET\nbVO6M+a8ixkP02prClJYx++o2ZeRk5TYsXSaLmS+i1JE+aR7Rd6JxdAOxNai\n3I64/P/kDKGR2sV3DNT0xzKvSTBiueNOS4i4SHxLIIELFo+K7ZVvhKpQS6Eh\nXz2M\r\n=CFwv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cbc78996d17a8f143cce3f0a74fa8d54df2d7266","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.134","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.0-setGlobalQuerySchema-cbc78996d17a8f143cce3f0a74fa8d54df2d7266_1622459839342_0.1745550495270336","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0-globalMask-055f6a12190759377051d9b678e01aab85041070":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0-globalMask-055f6a12190759377051d9b678e01aab85041070","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0-globalMask-055f6a12190759377051d9b678e01aab85041070","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"77800cbb3c7ff37e1bd73a18b319f3ace3dde378","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0-globalMask-055f6a12190759377051d9b678e01aab85041070.tgz","fileCount":39,"integrity":"sha512-Mam2QkuNwW7vcGrwb/5uLwiTwL97nEw4L+fK+yzTm6BzzP8nWsdaZgz4wObcckzY3eMS6SQs2snKDmTuEbzRoA==","signatures":[{"sig":"MEUCIQCKhC4JuAmBRetB+bide/TRgfsXUgAifqKDIUs28R8uzgIgNFI90GgfrOZjUHhXwNZvkUT7hY4BSAiYR4B/Kx3rbvY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtgmJCRA9TVsSAnZWagAAxboP/Ak8+E6/t19A4rAVXQ/c\nPx0NbKoRiJCv6vK1ZYciyi7yFouFvWgUZ9oUqUHGlmtBmvIZ9IWvpd6XfwLB\nJfdtBM0DSWGFa/D3z/PLUi3DzCk2m9HDU5BiJWa5aCNMoXEPIKp83w9INX9N\n/m2ERuB7I8gvaU9VkVSlR1OiLARo6VgZMNnoTOjLjn24PiiC2F650Hkh3xFb\nA29Dz6csk6oFRuF61kflXvTmFHqodi0QMBdOvQREUte6x0O2hueYeJktIJ5R\n2qK6Ch4gly8DONHLTqfKsivXL4ydDa2XDTSbmWUnX60hKsyU/8/Q70GqZuUx\nxz+rU7/dnAGNY9J21MIX3e4EKfaXnsiwNANYTIMMEmTFu2x34uk+68pTGdiT\nhBbgXSU+a6vkO785eh/wuktbysFgyRYrT8GN8manyXKbBmXHKysF+oLimVEF\n8DnWc8WVeDyZ0H4+M4cb2wBaB7vs8Kt4eq2k1mWIqDxI+bBXzgDQSWg7uZ7J\nDM8tdJXi/XdrYvhzRrcWbjGInTrgevjkk/u6/76RKB8k83qB0unUXydRmgF1\ng2ZUxYzW+FuGKJnPHZbTjoAakg2ECp9mcQmoXw2ms3YrFFsD7ANG6bGNKz3y\nwSOXtexdyjk/9BPm+/u3wQ3ZFD37AFwCTc9ENnsux7g8EKnMx5cJBIgMAw19\nnaeV\r\n=3Ek8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"055f6a12190759377051d9b678e01aab85041070","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.134","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0-globalMask-055f6a12190759377051d9b678e01aab85041070_1622542729282_0.6178177647486855","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0-globalMask-c70a3b7f48b33f34ab9b2d0b078eb9965dcc5e59":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0-globalMask-c70a3b7f48b33f34ab9b2d0b078eb9965dcc5e59","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0-globalMask-c70a3b7f48b33f34ab9b2d0b078eb9965dcc5e59","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dc38d8bea2062864c6c911c6645d6228d2a3e667","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0-globalMask-c70a3b7f48b33f34ab9b2d0b078eb9965dcc5e59.tgz","fileCount":39,"integrity":"sha512-If8/zaKQXfTxOPw6xICKukPLngAQ0Div0Gx4+rO1+bhwnon7zkiST9F8oaOEgUcOu931TVvxDUKL3K0eyuNqRA==","signatures":[{"sig":"MEYCIQDULn9PUBxJCf6iayH67H2T8c2z/ZK/VFdyONMKJ8EAzgIhAKkt9PAaH7sXpb2ZSplWUiPU5fo7aLFzR34vYrhwcNNG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257599,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgtyaxCRA9TVsSAnZWagAA8IUP/iqbOL6erreA9hatQhZm\nB/Oyhg4E5sLacKY5sTHp01pcplvTQ5ite4XE/dIucMvhKUiYiwW9WdmiNx8U\nV/5VqIG5QaJeZroXtmCKVtPWZYdhsQrys6PlHGPfP60FjWIe51eGza2TTeAS\nzv9PJ2mRVYijyKbCtaxbcJQGuctibpbnr3EZgZsNQTCFJcdnSDAQrsN6nBJa\nUfUVn3AaQmHLTZUA2n1roWIkspGZXmz3Y0FbHA5fh4sL5Qkhoe5tI7KCQhId\nMb1VZlrK3I8ZBzf84unvlGAEmrtpnNcxZTzXyet8E9q7DML4mGk4sCWZcR4f\nT9qH0VnHoOled0aIZNoR5qM9tP/JxXbjJMdeDrjSkqTOwHetE3DnvfpS1t3p\nyfTdMtzNISx5vBf6YHHXVN6mzP0qS0pvt5ZoUNdtOpNQrxViuFaEUULspZGn\nZPhp1KEXyh4A1tYUZBVuNglb/UrHFyUWAkM+DWYLxSQdHq69t9EqTGXaQvqZ\npwlknOMfles3V3yEqi/2hFpHL6scJaOAvImMOAHEOZhYNSQ6vHICT7RFT6Tk\nNBoBdZkXpAQ+FyBSuAZXFQt4vnbDa8BHH5/PBtLC9fDadhhtgcGeDwCL3bZ2\nhpCrVm7m1Ah80a9x4VCBQ6foIx1SWsQfnkvWZDXQg1IT2Mm/9ZzExKIH/OeZ\nekrt\r\n=y70d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c70a3b7f48b33f34ab9b2d0b078eb9965dcc5e59","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"catch-uncommitted --skip-node-versionbot-changes && npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","catch-uncommitted":"^2.0.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0-globalMask-c70a3b7f48b33f34ab9b2d0b078eb9965dcc5e59_1622615728494_0.6230107316237783","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.18-remove-catch-uncommitted-d56b0d2c83e2f958cf0372cb6abe4e30b5892e6e":{"name":"@balena/jellyfish-client-sdk","version":"4.4.18-remove-catch-uncommitted-d56b0d2c83e2f958cf0372cb6abe4e30b5892e6e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.18-remove-catch-uncommitted-d56b0d2c83e2f958cf0372cb6abe4e30b5892e6e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"653e7e04a8ac124bd5e92ec39f971b01cf69e145","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.18-remove-catch-uncommitted-d56b0d2c83e2f958cf0372cb6abe4e30b5892e6e.tgz","fileCount":39,"integrity":"sha512-YbedkqtzK2xV5GVdA1e0PjLnTtZVIops2OF1+9AXKscV7vcbM808nDlj5mFAsXmuc8aa2DKP3+LfX6xuGgksOw==","signatures":[{"sig":"MEUCIQD+RIm+0q+h+2+zilMOPm/xfE3Ahg9gmduXnUmruv73jgIgPAtIJGH/Ryqb5nZi/+ZqQ/RqpZZu+p3oM0Efr5+VHMM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguBLMCRA9TVsSAnZWagAADLcP/1QgzaYYhosjL4/qe43h\nqdQPuqflsIh1S1oARriAJLqn05Dm//R22aU0G3tfASH7S7Lj7BtIACZSiYZI\nY7Rc8/Q4YbvY2mb+8mPaNs4DGKYiR97CaL+29Ow1pktlMNayaqs8K5IqGB0y\n85IcTqi9N/pzframKE5N3dRmJvlCs4PZvTz4IABLtt/FB+f2MZQ8ztluRS+4\nxpEGkykxatK7TRgUJJHgx2ZN147C8G3rJj+vfrBOLP+nl1PpvH0QB4faNa/v\njJLTLA5/bFOdwzetTRm5JsdrP5a/QeWewDTLrpDMneRfD42/22oS6IOV8VOz\nia8RazjpIrMxcw/RCOsubdtZo+SK3ZZc3AMhcr03UgAWneMX5SId8MzTuVyf\nynR8bme1JTtscVxW8Gg4OmdcNos2p4Sd8dgsyWjXD3zvoo2rlp1oqjcrROJX\nAzSJqBDDvOVzvYZGNMNfD3SSq3HZs9ipsp+Gu1sJqii94sC3EYRHPqJAvj2M\nG5FlRmALIbSsXtYk6Bv2YrIf6byIsceIo6tv9r5X8X2D0RLfvmxy9q7iZca1\nFaJ0Gtf2gtQrh7bcohdP8TEehQbx7Gipm0w0p4pIeRCdbBoBNykVAn4ZNHA0\nw/R440AkVY5UaaRqIaGQz6bJjGaSk/kEC2LF3jAhMxqsWNGb0zCRmNcWrvtQ\nRJ3r\r\n=Pdr2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d56b0d2c83e2f958cf0372cb6abe4e30b5892e6e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.18-remove-catch-uncommitted-d56b0d2c83e2f958cf0372cb6abe4e30b5892e6e_1622676172580_0.006090854650963262","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.18":{"name":"@balena/jellyfish-client-sdk","version":"4.4.18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.18","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c0e10ccc2539cf75e68a6731d185c177468b63d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.18.tgz","fileCount":39,"integrity":"sha512-apF7FrXisNhghU1HLWl/6mfJ1WbwL53TMyWrmWF6SjghYshPsixrkFt49zcezkzEoINbrRL/8z+Fm5OjALvrrw==","signatures":[{"sig":"MEUCIB9wuOx6VU2RxYU0N+gF08fypcDywh5MaK6Ll8HtLrizAiEA06T7b8Guu7aiWmQFjFI5aCenGf12KqopFD6jlIqEcVM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguBOXCRA9TVsSAnZWagAARWkP/jbUbXbyJhku8dKOcPfe\niiJu/z6rGYhWHThBqMwdhW9jTXh5bpSjzMVITgTI7cHqmCD6AKpaLQIsxTVa\nvUmE57FaxcxhudOiGRWT4LVmOxK/2uVemWMaBZ5BzsuNmVqDB+ReXQtdyEm0\nZTy1DiZlJrE556LM+nZN5k98h/ydN8sZr+BhAUTR8MMsDKL452SDnF1L5IO4\neUAMg9kArNCFLkFZeUW1Wi9xZdd3DuDCUrll5sQq15SOztxvLn8yh5693t0r\nybH2T+O3QvwcNmB8sbcutg4SFrDZ/vfcKm9IlR4jBGI+fsYG0tWzYHzGEqUg\nW/IQyKgikvijCvGGJWUUlYDb4r2WOKXHKoGt1az61rrmKu34ZtfTUZklRrMj\nbPDCx6/U67nfgur5joRPUythsmgDcRW5103tVtXHtHHRLl6Uf71dUv/cyYAR\nfNFXu3JdtiFgGXX4xpgqLEX5XfaNpTzzmeGHxxjnqs3PS7HY0sqU48t2NFvq\nIVgg+X5fznFCRKwhSWcotbMpF2Jf08wCU4/Wwu2vKQW/KIPhZSyLslvUUlZh\nci8YKfUl1XFqO8E8XyG9AE4E/jyBlB0BsBKFpGEiFSh/GjjiHxxfOM0J9eKo\nbJrLwzwf+SSQHp/ra+9w/rp4ZpTu3Vx6iBEvKkukALTwd5a7Ip5Yj91zQDce\n9jtU\r\n=leqO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9ad710a24fc1a6e8c44e45d938cf2f07830ae15a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint --typescript lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --typescript --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --typescript --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.18_1622676375464_0.968773078323522","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.19-improve-lint-staged-f48446f52f25c28a2f113b5bf585bb98cb20081a":{"name":"@balena/jellyfish-client-sdk","version":"4.4.19-improve-lint-staged-f48446f52f25c28a2f113b5bf585bb98cb20081a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.19-improve-lint-staged-f48446f52f25c28a2f113b5bf585bb98cb20081a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"010e63555e7c27d1c4592ee298b3cdb8cec16761","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.19-improve-lint-staged-f48446f52f25c28a2f113b5bf585bb98cb20081a.tgz","fileCount":39,"integrity":"sha512-Bf1/LdMUK+QEDRUJs2d1KpbdSz3GdmX1T/Iuc6AhcaduXEtKhXx+N45SxOjUae4mkP128w5C/SC1R1ELZ755Vg==","signatures":[{"sig":"MEUCIBnMmrk3XW9WcBnOo477XiltnoInwyyxQ6yRJFAF0tixAiEAhIXCSkNW+DJC4wfEja1IISXFQZ+Fny2fp8ZqueTosaA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguWbACRA9TVsSAnZWagAA4YYP/0jtgBnTaWyjU1oSbeAS\ntw9fTyTVYOhAZatfTXlH1+SegH1HFws2Zw+eEyCxZaROWxqaoRNRTt8EZIgt\n5Bl8AkN9Y7Ub2N20cKY7i59E/Jxoio7Iu8C8NxLnX+yOy2AgtjUKanrieaWC\n0q57gyEOW8Ug37fIdyGtIWdyQyykEPrelXQyyp/1jVl+YgYVf9v1jkNp/y2s\nLg+oxFM9nytJGO+MWFeFRAXT6lMC7ij41Iesra/o9Kqd1U4Vm+pPwKZv9LOS\ncGIqmeCW7SFudwobMVoukVrRjokOfUuWvbfOUunBzPnHpUQxKk9rsVarKK/f\nU/iwGGcmg4vd8p4EhRDUCbcS3RUPGwR19P80SLH5z+n206hfOiM6/G/FWpaY\nAYyHkenI4yskvRjleh7jMVlfiPIlHAKogxrtgll2qAbAps8LJX2OrNx6C+nB\nQDdXXgO2xgu6ENGK4pi6mCwcw/gkvMCdERJSBgWz1jZc9cfEWtowM7lFBIWu\n0FHdv0nkUX0iij9Rdvq/hU6UfVhGAHJtoXcVWo/YPoW6dj/ok/78YCrnnu0d\njcTXgUviFZD6HExvLilVQtTEEjn4gnRBWfaTJYOODqufcfP7B4NwoyPqO+gh\n6wtmllPHqjTjecJOBmU4Vr7BMtLR0xUOFbXGnWAYv7MOH9kiF0W2xAZ8jj0M\nBh6G\r\n=zOLs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f48446f52f25c28a2f113b5bf585bb98cb20081a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.19-improve-lint-staged-f48446f52f25c28a2f113b5bf585bb98cb20081a_1622763199893_0.9738441929437063","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.19-improve-lint-staged-4ddc490949fac5c8c9a0680df9aed5e1168dec4d":{"name":"@balena/jellyfish-client-sdk","version":"4.4.19-improve-lint-staged-4ddc490949fac5c8c9a0680df9aed5e1168dec4d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.19-improve-lint-staged-4ddc490949fac5c8c9a0680df9aed5e1168dec4d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"341d229c1261da72760f1a8303ef28289c1fa41f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.19-improve-lint-staged-4ddc490949fac5c8c9a0680df9aed5e1168dec4d.tgz","fileCount":39,"integrity":"sha512-G4/ljLC6A0of7Z7LCX4dAA6rKeYSRgsS22TH2WsyiHEDuOfxDK0K1sgEVOZerrX7fQ/1mxaa+iSePzpDkmF99A==","signatures":[{"sig":"MEUCIQCQxGQnUzfH3CGRvrO3xiyEs/zdpnYlH66Dz2BnGMA4rAIgJovllZSAdRFa61f4h+qRlvPvVFKXuAt/OWNHo+OVojw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguXCVCRA9TVsSAnZWagAA3m0P/1I1iErRuk0CU0iNtzZi\n2Ft/5T2gf7Ct2q+eUlcj6epKasZIioI2sx/44Lft5EJ7H0yOljXZBkT5cM+m\nzTafAf5JAUSbI9HM52gK3MmQ+/JaNieWah01UzWtkupOAts9TKTIZqQfi3ix\nRKdR1lMwNItZeIAZ158xSwQbBEY2vR94W7klDcGlCYl523OpDGyzYENeyoce\nLI1j+rcPY12B6EnSn7JQHnYqoGmJ1wnxQL6xhWcfgc6xNRb+x5+ENQ1LJw3d\nAqyNX4hA9ouCBOEY6C45KG1vfg0av1HXUeP+cTPlFyKWvV/CMOGktuMTQUzI\nMKUyJnBVARithV7kag45W10N4p8Jn9dlBBwKQadrceym3LKWqv3wRf8+T+JR\nUxVJyAJ0PomJqxCNCkdNpidsplT0jSDAbm75rUmncLJmrifS1bE1g+wptRKH\nFCJEbUB6vewQneDqnGS/Z6I+ztamZRnyIX8hZvVEUzqtAqiAO3Ltg7sMrmYw\nZbS6ELb4u4BMEV2ursa3YHQfH7s9SwAHdwRygtMZI15rbL3Xee9bDf7qBK+v\noPUQscJIwq7cG+GxWs9WwBhSBF8imUvjwPUM5QHQHOnq2U8XYb5tzB+9DQBp\ntf/tINjGfRKOaR2qXXHKTerPZ4tJ9FzSz78BBshNwx0rArTcfh3RkJTvfJqO\n6rr7\r\n=Rus2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4ddc490949fac5c8c9a0680df9aed5e1168dec4d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.19-improve-lint-staged-4ddc490949fac5c8c9a0680df9aed5e1168dec4d_1622765716882_0.13853430566785208","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.19":{"name":"@balena/jellyfish-client-sdk","version":"4.4.19","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.19","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9eccb62e0549e834e9493d69db4d354bbc1cd8a5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.19.tgz","fileCount":39,"integrity":"sha512-4xwZw9Aw47qv+zB92CnGlh4bGXH6if5bIqnjrhVC20EY7m8jmM7Oe4eh+u9mOn+ox5iHM7hUJ5FPN8DQXn4wLA==","signatures":[{"sig":"MEQCIGjU2dj62jL+UTbspKuY1qv6jpd3dXO5CTl23oEQkZ9xAiA10XG3+2RnIfqsKIoP2ldHQ8q0lujRMHm5ZNOnb1+dYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255388,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguXFDCRA9TVsSAnZWagAAFkMP/1uxJeGx8IIytDpoA6Yk\nOdAbX6jeyjyxe9XRhNQonhrIgjoI25/B//4FlneTYt0f/7mPBSk5qaiC2SBo\nQPIHjUcNktlq68/JY/BtZ1Njn85ja69gfV+ycAhJKw/IAh/c1sjjgIkcPnF0\nskYRpY5Vv2Hs1Vr35I8Dl+A+RPHfntumgTmUiSxEfwU9fg7yeK/2+l5ulHNu\nOd11mYf3NA4xERR+zD/ivN6ZqUoY9PPobGaXuHd/YJD7Ei3ppPcjk9v9N6EB\nE7EcP3d6FYLx9382421y0wpHnoiAVATjnhPxeg0fLs6SCKj0yyEM5C9uAOkb\n6dkN8IFcFRTf6YcCkMdX9N8N6qFTvjbGrjaGQUvEfv9lLvHPzLjSnAvxrni1\n0CSPL8WzMVseO999i76nbebSRVGE+qIqaX12/4nLm4RnqGG5WhaZ34jMra7a\n8JkwO/r6GQipyvZS+R0YW+8D9UTVrl9QV5yHOZxHGSWjfp6RsWzpFuWF068O\n2V/fzLyr9jwTC8DOWiVzqZECUrfGGkTRzySX7LCPekD0nNEFME8TLf/xuQ1u\nxZWdMlhiiGoXAdKHlG63m8ZH0FjKA8yY/gB54ChVsLLpkvVWOykc7OZvI/zK\ntaz1bmfgExDoPXN44A4ps/ZsGyFEmC1LBAXmgplyk4wzYX6jLwPQOajm3CT4\nZELA\r\n=GXCD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3176744a29f92185371dec4430d9d12f050d43c5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.19_1622765891108_0.8010774170383148","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.20-renovate-balena-jellyfish-types-0-x-b43b4dc3704421ef97873a60e87c5737593a5a78":{"name":"@balena/jellyfish-client-sdk","version":"4.4.20-renovate-balena-jellyfish-types-0-x-b43b4dc3704421ef97873a60e87c5737593a5a78","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.20-renovate-balena-jellyfish-types-0-x-b43b4dc3704421ef97873a60e87c5737593a5a78","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7cd146ee2e978f9bc26af5456ebd53d8201d66d1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.20-renovate-balena-jellyfish-types-0-x-b43b4dc3704421ef97873a60e87c5737593a5a78.tgz","fileCount":39,"integrity":"sha512-aktCuIXyJPjfUZdrWMcYv7m3QfPm3bU0icCv0guqG22Duzpq4TJ+ia7WTZE6gxjrP5qekhjSJteMxlM7vDhfmw==","signatures":[{"sig":"MEMCICcGwig9QP8seEbl3VUK8xm+52DxeWeuEmfsLurQxxyGAh9Y1bJpSvcu5DbcZ2skfBItIMtgu9wwSQwlij0WWBWf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguzcBCRA9TVsSAnZWagAA7lgP+gIlhFRNDzP83sxhSuOl\nDyyjmsy1HgU+x/SCbMZrBwrfrq+GPjZyA6m+auZ4fePJatcu4p7HOzUOn1PZ\nwW0xc2l6Bx/o5a7D2RlFOcWFVOP/pIQsdLf82M6iacgqJ6sDhiKujVm7HvmC\nwU56SxOSsnhBWmo5oKTHIa2dtT5441wgbLIoSpzjubz8fqthTee9RHy4M33s\nimAjdPzb4C57u+HeTQxj4VVCnbruiQunJMTUpa1Cr93Jckq1S28oKqWaRe9i\n1M8Exwe4rg6AFu/0nJUZsAZHkbk+ttsDDy7JkLuV1dG5M/XVeQ12PKzaSLE+\n0+ip3j0/RAHec3ekZUK9xxVWcYa+GhzkyNpfOqxpQ1rjHRutImXaH16w155z\n2OdPkQQ5919HiAyW0DmQpFFQJzBK88/6QTC5iytPSn11Ll8Ya8l+ojWDgr2j\nqI3sFkORu9+ZHPP6QA28o4TcRm/G4jGCibwuNK9NAit3Q8o2djEW/NUD0r9r\nXbHYRMA2tu5bSpfsSi7Bm97JqpF09o/ATmQC0Z0dyLEv4mCl077IP1N/WLzS\nmtENk6JuVeZrQZgHr3PSad08ttpppfj7ReQkvp00ROYjVR0WM7g/qZ1eJFyU\nzOYzsypmD5dG94Lv5o1KPTDPenh3uOh/GuQzosNcmhUNAg89lNBtbLUDF8UD\n/Dyo\r\n=6cv/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b43b4dc3704421ef97873a60e87c5737593a5a78","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.20-renovate-balena-jellyfish-types-0-x-b43b4dc3704421ef97873a60e87c5737593a5a78_1622882049613_0.7031760148236976","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.20-renovate-major-external-major-a150369abf45751b6368387537bce57fe45312f4":{"name":"@balena/jellyfish-client-sdk","version":"4.4.20-renovate-major-external-major-a150369abf45751b6368387537bce57fe45312f4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.20-renovate-major-external-major-a150369abf45751b6368387537bce57fe45312f4","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"666ae5debb652106e1045e77a832a39caa612c2a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.20-renovate-major-external-major-a150369abf45751b6368387537bce57fe45312f4.tgz","fileCount":39,"integrity":"sha512-VZmm8GqJvTDpL9+CjfCyiVZeOHcAQpBjd4x0v4OPc7RnCbs7R4htO5t7cfkuIuaOsDAtolyQfd9jjALQhAdt7A==","signatures":[{"sig":"MEQCIDW6mnjqgA30vOtqPpMEDwHWQiZl6vl69da4tAzPQPQpAiB1MTZJ+qBcviovd5FuUKoHUoWb5LrC+OkrigvCuYi4+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguzc+CRA9TVsSAnZWagAAJ2EQAIEUqFb2ByiLZhKBK4FA\n3QyHT/8VljgRhUibRfEGayCjtjXhollZd/CSHt+V9v6caH/UXnWF85hIuSF3\nTkrZnudC7o80BCMj5VszU2E4r5RXt568TEXW59qARfQRBYCuyJX1mZY3EXAd\n1cK5pVbzlAXd8Wc6NHKSEKWX5LZ9WVg+QnkVLt3iAj8IvAgwB9EK/n82H0Cv\nhAaFq2EI9tflkdO3AhAA3tu5F8WdPwIITPqHlihj/qjyAFs0DFugONWwbND8\nxl2D098XqB9e1W6icYyv3E3fL5FEAf/ofdb12pRqLFmQj4LPuY5ZnWogmLH1\nUKnqfybtj3eqVd5mRSZBf7NJOz9W+kBmB4OdJ3pwNiWUpUDqdTYOJHbgL04w\nOWueVAP8Aac0nIZft3/fPAU/jz+WVRQKhWDhvbgp7O1caACMALI0kFPrIxi1\nBfZy2ukVH5ybkq7bQ/W6kbFc82aETwK8ac7nJeCJj0MjHAh48eDZen3JAPe0\n9Nj6qGC8V5bqOd04a3w05wCDV3+9uyefSERAGh4N8UrQJoffRcEkRN+6CRnv\ne3HeSwelbUEyu3eFozdmsdpaFDWvTmQjEHatXJGrKlKh6W3a6w/LDooqL5Of\n+/0Zg2AWpaKh4X/T058fMJ2DLYxVeQ2qi2ciCkZXpc59M+nbaCtfP7s2yRNW\nPddF\r\n=dyvc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a150369abf45751b6368387537bce57fe45312f4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.5.137","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.20-renovate-major-external-major-a150369abf45751b6368387537bce57fe45312f4_1622882109454_0.5996112818071084","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.20":{"name":"@balena/jellyfish-client-sdk","version":"4.4.20","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.20","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7219db69c1e1a90ebdde6299001382b4f4b579af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.20.tgz","fileCount":39,"integrity":"sha512-Qe1vv3/w5/sWwkU1E/buKpd0VlH+Em7JENJa9MyhjpMmqZtyIvtSH1ZfJAeqYh+LJFcKs8os6VcHA9LAFpqYMA==","signatures":[{"sig":"MEQCIAHh7JTBfkAFf7oSpGcvnrcGlZTh1w1oyPu225cpCiANAiByj3wfgNXaVqg85RUQbdx9IRpMz4oYs3y6ninQ1CgnFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgu5TpCRA9TVsSAnZWagAAY24P/R4z1ru6SAFllx88/bnV\nlWadJ7TMNEmpZz/PwlxvEQ6dhbtdCFOZuTpzBrE2V0PAPj0p9F4D80oryROZ\nTPwJkF3ju8FBvwsjd6uDNVDbRtl1UIr72V4Oz/Y4MW4Gh7nbcYqobiJcqrak\nmx147HrsJkmpgC72wYf5qBOpLeKY1FoIv0IDgmcXa5gl3fUZnhcArYgSKYlS\nRwK+h04CnU7Uisk4btSrYB87w5Rbz20lTs7n8UnGlNdXc0ihKtKWeHgJL+6G\nuM6mkMQNpdVm0ggE4eobqF3h3YHnfR/dsF7luyKtadFzC+qxlOj8kh3u3cgl\ncZ7CqA5U2/8OrgZbltAI5hLtajEuno7Rwan/aUL1D4CrHC15vr/kVt/u48XR\n3guaYWDwagsoZGgaP2m35LKSWbywayU2o1rFr037Otb/0cNjLe4dQfSRGoDq\nI/WOYbe5HQTphqEVv3pyA0r8HYacPIOQ8h0AdleJa6enm6x+xQCdJHtlm/gb\nvttZleh2Iakhs+0+qPxqUTCCw8/RgYV6SCwCn89JGYNhnW9l321V6Datcxi6\nZ2lXC0MV7u0HZr9cQLZJY/iQRmC/fUc7A/P8ilSeZBCB6XgE/Si1Y4f0wZbk\nIYI2f16bZ1tDMTuh5ApphS2tLIBYXr47UN9uxoWfL2gCzirB5DE8Qyq9pyoE\n5dpI\r\n=LWlS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c5c5113d3ab9df035a97890d2bde4fb5751c2103","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.0.11","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.20_1622906089402_0.9442216536968258","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.21-renovate-external-non-major-b45c978393b7e9113c530256d97f35059f6fead0":{"name":"@balena/jellyfish-client-sdk","version":"4.4.21-renovate-external-non-major-b45c978393b7e9113c530256d97f35059f6fead0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.21-renovate-external-non-major-b45c978393b7e9113c530256d97f35059f6fead0","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3b4289626ecf34b460d2efe2ada5955cc98fbe62","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.21-renovate-external-non-major-b45c978393b7e9113c530256d97f35059f6fead0.tgz","fileCount":39,"integrity":"sha512-kRdAsBpHHDf366Nph47FpcBS/2NWT7lKQZFecVRGROreJTXCtfThEgvoViW1XAYKouCnZvp0nucmh+bA7geVgg==","signatures":[{"sig":"MEUCIFgbvlrEaH/R8oTLf3FJglxb2BcM/kdJAvCHYrFtqNn7AiEAhP5DxI84Fq7O7dFMe2H3TIMTWFOomnYKOz/TGizIXFQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgu5YACRA9TVsSAnZWagAANRoQAJHBwsyIJMB77zEeepuL\ntX7r6NB1Wu/tlB0UU08OF6VNZBqqAa5JPq2VeL9HwcuX1/exS+15l57YT/mH\nOfwzErpsM7J5W6UI9QhxNFHdgaR4Hi63lOOeO75Vm8rgPIhyydEsY8F/3Cf0\nP/yD8sI5FjmuM/eLNKEBNMSKpDv0j5M86lMFqpzrnQzkuG2kYnOKLhNL1wOU\nOTbyB7ASXw0XmzmEVptOMYBRmKGEWdHxOOHzTol4LDLPLetBh3/c8mAzx+VP\nbMTm2aHAnbPBXEb0mjIUs0Ilu+nnpqwpgx6fma5oYuZO5pw/1MMhOUVs5Hfi\n8VMivDeuLUmcKQSElrb3Cmq7R+nSKDoiTU4oXRDUdHIPfAg7+RevZihvcoW5\n56k7KOco5emY7hgyLG6Isu62gAS6TzToPYU16ePfDFpL7LpQW0gysrzl1Qv+\n8+MvLEAn4LKOr2YX0WmOBhNAzqVHgpB+ef5bEod4Cm4z73Qbp2ksOfAY//7Q\n/AQ0dGDIupvYkJkqmeq9hgAS2Lm805ljqlvGX0XK6vXOdQEJv8e7QqOKS3lP\nkfIHQlOb3ctkxExCpNhHENBbhnq4ANOj8NhEhx0vMJIgjFxWF6J/F5ZCEoN/\negK6IXu+zXOkpUe+j9OA+3V+I6D/5xlUqQZy9K0NENVYDYSt08QgkEruGra/\nRjdo\r\n=zfCF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b45c978393b7e9113c530256d97f35059f6fead0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.1.0","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.21-renovate-external-non-major-b45c978393b7e9113c530256d97f35059f6fead0_1622906367932_0.26772823569790916","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.21-renovate-major-external-major-0a881cec5b14bbda1498f684d62f2056db9d76a4":{"name":"@balena/jellyfish-client-sdk","version":"4.4.21-renovate-major-external-major-0a881cec5b14bbda1498f684d62f2056db9d76a4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.21-renovate-major-external-major-0a881cec5b14bbda1498f684d62f2056db9d76a4","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"63ad3f0f5ed114b0719c6fd32efe2742f22977cf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.21-renovate-major-external-major-0a881cec5b14bbda1498f684d62f2056db9d76a4.tgz","fileCount":39,"integrity":"sha512-MNx+HFFqBP8Rp/J/fMoZ2LAVc2hqrQtXKQstYkeLpFXEAavNMblAhTO+BJstaHVB5Nzv5O8ZX8i8hoAu7KaHPA==","signatures":[{"sig":"MEUCIDKrFQSP8dxEkgnbTFn5+JlgQC2h1JNdSO0g0e2X5LZ4AiEAruIn+S+L6ZhPMFsDyFl64lKhGCyFnjO+zfH3xTQhKCA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgu5bNCRA9TVsSAnZWagAARZkQAJD7CFmlZlORHvirJT+A\nJyXVwkxaBgy3lgzhCUSTOc/2FkT85PTGw/k3QaGYAAfZ7ihisTdROzvhqVqc\nk7ZwE9c2fdME+z21kXT5wWJYgjbL/2T/qVbCGacmqxmbAa5chD7uI3fpmOb6\nnjxFs6o/ILqA2QJ7cTixhqLlvY7iQxZHCKlajSDzwZrwh63rs3mn3O4RPXzm\nAgBAtrbmbhfCpVDiRZVcTxV95Mv9IaJjPmPBDhaYR1rYQNvS/6moo/2eun+2\nTLAnZK9kkcn2RPKcqZs8cfkxJn8rd8cNb0GkxhHy6D7RExNHGbxbzUtaR/nF\ndIN1kbz0C7bdFZ4Dk6V09Vgh8wtkQmapQL55MuBp0keoVJ0848JHZXnbAUUj\n/nC2vP1y0jTGurV5Nei8YrIamecar2ClvwYSqee19FmxuAzra1gGg26BT5WY\nljaNb/v+z0LYJqaQ4WzObT8DEeLBvoXvxeObhHaKE1ER7ohYZ2UHmtpPhNrC\nZl/IEKzmoTRH+uTj0MOYL7VSRGZerFNt9w/kTAclX8lnZrlqzbUSWE4Di/Cr\nTbUxeoUAVJtUZ2kZa/EfJa1uQ/L7/AAJ131JGFEsNNWhEa1OZi3NNB8B2jnc\nqWVktKetS8GyL34UcoUE5VQPcHT+GEov3XxWJ/Zh9SGxmFOp8j/p9JsbGt40\nApNw\r\n=xyte\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0a881cec5b14bbda1498f684d62f2056db9d76a4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.0.11","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.1","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.21-renovate-major-external-major-0a881cec5b14bbda1498f684d62f2056db9d76a4_1622906573079_0.4459076276278753","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.21":{"name":"@balena/jellyfish-client-sdk","version":"4.4.21","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.21","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"538c10a6b20a197224ee2e04d292af5c0f5cabff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.21.tgz","fileCount":39,"integrity":"sha512-fEPPdpQRCdgcLVU7uFBBmw+AGKUOFYGSK530du8mB8Zu0sEO6ZO2/DA9WJFQApF9m2cpo5T6KhyqSIkfOOfp1Q==","signatures":[{"sig":"MEUCIDv8CYFzr+2/6wnN56Rd35OYMo84Sgwo3HcJYOyTbqs0AiEA1o4Ron62TLJY45S3rkLhc2aBVIOtch5xZE+KXheftt0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgu5dgCRA9TVsSAnZWagAADpgQAIXpaDOJ0L3FSlBwcyGq\na+wiuh1wPf7RbM+miHfg6VSVlC0nR9hHCE9zApOlLwkDLoh5lFSSNEqdZ+XQ\nxdc9zjG4kdExRPiHBl+QcsSJhyAQ8gXoUzbRJodwQ23/3T6OaojDz/Stja7W\nh1ACUI8n0H2x2A48R3iEpPo3npnuAqG2l/79MGbUjUl9xfRI3+BUp/TYaSB2\nMk0FgJoB/c7S4ID946t4BdGja2X1BsJAJVpoZuniQ6pdGZvmWZ+FrDPfKISS\nFp8fVqloi1gl/l6PSF22zMZBMWvT3xc8AunPvWlpzgCpBNzhmu1UXHZGTigQ\n6i6cqS4BsVIH3CqzF98Ei6URsgdDrE61FfVrvi4jdsLpiIyVzr6BSDP7HeYh\nCfJsG/0e3epTNR/FkPEtdOX2MbIv6V+RgoRkk6Wpr1jwOt8+aXykqVbu0ev/\nP4/0kHLiZHCkhTqoTakxYKyfMyssSR8OtQhbc/2a+ixsmEVCknRSMmtvMxrk\n9NpPiXgT0xsKdAkrYivxqNBK8T40Ti5ZwS96g06hew4cREx396fPbBVCbVT3\nnG4stp7OfLHIuxCf6MEstfEx3zu3bgPSBYPVwEQHRmB/xjUcza/AlocsFsUY\nQruuCrKBvj7jI/E9iwGZWQfHZDLpr1+Vh/1hojPrwZ8tdBc3P95XFZi8HWiE\nwS9s\r\n=1610\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c408974054bbef5c03a004e4b69c37947daabb2f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.1.0","sinon":"^10.0.0","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.21_1622906720452_0.04135875777913811","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.22-renovate-major-external-major-723e597a76a9eaa218e81e7e88bb5c40b93fd226":{"name":"@balena/jellyfish-client-sdk","version":"4.4.22-renovate-major-external-major-723e597a76a9eaa218e81e7e88bb5c40b93fd226","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.22-renovate-major-external-major-723e597a76a9eaa218e81e7e88bb5c40b93fd226","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"909379fd22339a702c82f0d90aeb4ea29a917d7f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.22-renovate-major-external-major-723e597a76a9eaa218e81e7e88bb5c40b93fd226.tgz","fileCount":39,"integrity":"sha512-m71uF/0n1XGuWXZudEACYQWneXwB7L/3Uy/VuRxXxaHBLEFFVTq+AFSRpQWTbKx7JszLzuvzVd3gQ5NhFioW+Q==","signatures":[{"sig":"MEUCIQDUYn+8LAuotMviCI0BcSSxMgQOIc4yoyuDn0fDK4nXGAIgIebRRc3vnH1T0GovwWMigVzbJJq4USkqVGAEbwTchBo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgu5hOCRA9TVsSAnZWagAA2esP/AslR1I72vyATSYBNmQB\nld6d9iUgfQOyqOC0YNXdGswuJwOy8I72YYksTODw4nU6XoHyV6RcO7pX6Fwz\np14ZQt1nJWBo0uIfh9s1QxEPIcsUGVcxtwYHfq0QTpCHCCim+5ASo/Miftnq\nPRQ4hnNByfUVJ1/6XjUtioczfDvPZ6dhcaPbDqcD15+L3P1hei0OGN0DaWHR\njjViy0nFAue7bjI4Af6oOr9V4Pw4kuyPVdSGmlzlzF/WdRVxOYXhN23EvNNV\nGqI//ayOu4xF5fQiJOOaPQHFdtVYV8QXMcNShoFqC4tAMJx2MBhreXlEDwxP\nU+M8YJBXi8+ba+VxQ1WrS0tyEW5d6SLpLesUUFyOPh0HC7VwHdhLm0UQ9P+6\n2ZZ1LbD6c1U3Wr+orIxj4DGaP29q5H1aJXgjav8OfCoG3aSUBWcXStC+owMt\nlFdo79fu2bPI0H1qWToIANVkM1nwka6vwzy47E8NqkzBcH/NxSI1kt8Kpa9t\nFoiYcz93HnPPrBSU8Oen/Qm8+UGbFtRWzswymmqBC+ommCWX5puon5F7pEE0\nTsZXaljD8YtOzkThzww6+u9D+uLy8eKEgZM5iMYjRUnjdxpAupBHX6zCmcWZ\nXvkzjh8N1++h9E96EsfutJwSme+dsbbEhF7ATuYQgtns65YmqrJm1yqKH6AM\n+3dG\r\n=VYMk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"723e597a76a9eaa218e81e7e88bb5c40b93fd226","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.22-renovate-major-external-major-723e597a76a9eaa218e81e7e88bb5c40b93fd226_1622906957898_0.6678359372960898","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.22-bump-sinon-f6645958e658e286720e77ffcf9f138665f4acab":{"name":"@balena/jellyfish-client-sdk","version":"4.4.22-bump-sinon-f6645958e658e286720e77ffcf9f138665f4acab","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.22-bump-sinon-f6645958e658e286720e77ffcf9f138665f4acab","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4be193f618ad2848c495e166912d89aaebe5257e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.22-bump-sinon-f6645958e658e286720e77ffcf9f138665f4acab.tgz","fileCount":39,"integrity":"sha512-SH8VD+m8q5Vi85CZTyQzlSFB2Ic3OjkfIs2GAcYe4rCk1xpMOJZENpx7eCeVZwa1b82N08yEx5gC3Yz0HDCC5Q==","signatures":[{"sig":"MEQCIEIblYvo7tAS2A6kokLi6qFwsseEqwbkD32Ct2q+d+8fAiBHQT309uwsspELhS7Z02yadYnMIsT/luJAoCtzSsKA2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvBBKCRA9TVsSAnZWagAAQekP/3a+FiFbIeXiRfQyrmNh\n7D7Kh83+3IaJrXOij7jcr7BKidXRmKDdqm4k22v13SBPvUP0BRurEXK/c7Ta\nL2Cr+NbMgvt0D/vqgVPMHcIbOyCBaAkZQcojR3pGFNBzHyQBzdzFT+2Lmpfw\n7FKaxDJuAwWpeznJ/2/K694yoTQvaotju5tPA0B8cAJln6vnBEVigxD3VtHG\ncC7A8BXmsiNUaDv6nc/jVlkVhforY8ealPVjRxJl7uhZS17N0iJCI37XCmng\nkh/3tguciUqzOA5toc2amkrbttxFQPDV4CHqOp4JB3w1lXYVoHJ5p30R9b1P\nc8sO5Iku4EBQY+Z4TsBwG3mZyySvyNYNa+PIdnIwh9f7sUgR4doBI2+rocbz\nibc23pbgIEnJpBEnRqmh4cRaMMMtuCMEx6NGaf0QuUN9dP4k6W7p3YvMOvHM\ncPafC4XQQdkc1uyBV11pGn+RAsPaxVMFJct6SQ8eSaQV6sxcj6MArPCjh6rP\nTy/xa5haaBIbGkWJuWyLOkjqV1vYrrCLsgDEcc0QnSf4QAWnnEls8Fn8H1q/\nhC8vdOtkdaqdb771EHJCboaS7Onv3ATgciuA8UbKRPPVKQR6AwU61C8Lzwz6\n8V1RedTDvZoNc+TRQOz/O0oCBSVTL2Mb8UU83ooL7Q/+14fLZqOLuToiSjqW\nRhgY\r\n=uvss\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f6645958e658e286720e77ffcf9f138665f4acab","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.22-bump-sinon-f6645958e658e286720e77ffcf9f138665f4acab_1622937674293_0.37270834715823287","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.22":{"name":"@balena/jellyfish-client-sdk","version":"4.4.22","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.22","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a0fef77b752050b90ca1b994d66634f9107a9715","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.22.tgz","fileCount":39,"integrity":"sha512-upjgEfqNelYX03XdKfpb43aJxMGdlqdhopprQE9X8/gf4v0dlKNj6yHv6T8mmwWRXIKpvvfSqNWpyx+F8i5B0w==","signatures":[{"sig":"MEQCIBzbqqks5i8akgOb/vvWnemsxRMjetNCVynelgYJK3efAiApA0CXYgJ2mcICVEVmm3/D72y8if1pZQAIqht1t8GyvA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvBKoCRA9TVsSAnZWagAAx1sP/RsZhTBWcRD2ulWJGswT\nADnztBNBmaS1J2Dpp/KgwxiJvTw2TMvd8BTjgschQtU4bmxIr68Tyqn6NoKr\nj4MakmJaGCLkxlxpkBFQnPGP7ZwZB8LuURUyjSQyFVTw4SWggqSdtGwYTgkm\nbLPZMB3MvOPsJR1QZj5pgBc1w0c5TfjR6QTLAn1QvNfUXXpoa6A7n4WR5ct4\nR3dnL5GvJIVcj8ojO1jbLLB8Nagj2JIESGW+lCt93C4EgBJsIHjVlF4OZT+C\n4KlLeGSexdOTNbi97I9h6e+Brf9+KU+slx7prXRzcKJFvPCd/jWVdGUAUh0s\nbyWRL6QHnFIrrh5uzHeK/17gDZf7zinHV0d3BFPvjYTMnP56SRFyJeArV0ML\nG/3gUi9QpeVSqhSGI1KgsxjqXhODbiuODU0IBNiK8lc7UiHyDQ899m5Pma6i\nq+8i6SI/92jrCutn1CLVTuW3oKSqfaYf9KXExn4UUZ+NW+2VuBuZE+Oew0Hn\nuYuGPnzhrzuurJi4KYeKPZiOD+7eGoxU1tnedn0+UHlPj0181XHiGx22pQy4\nOTMfhctES3BTRdY0QJKitFIWUTb+DKCn9ZQxJjv5OQ9RRNgKGFCmFtt8yRIt\nckIjV50JVaXu7ZhquYTvfUDHsKmPRWreWP4woOg3jzSjJk2wlcQyBHgdeVF8\n6INw\r\n=BSUe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0b328b64ab8ee3b01334db5c0ee0d1598f445664","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^26.6.3","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^26.5.6","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.22_1622938280147_0.5151348335368326","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.23-renovate-major-external-major-5ef58f0189594ed9d8976136b0d553a0a58ffe66":{"name":"@balena/jellyfish-client-sdk","version":"4.4.23-renovate-major-external-major-5ef58f0189594ed9d8976136b0d553a0a58ffe66","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.23-renovate-major-external-major-5ef58f0189594ed9d8976136b0d553a0a58ffe66","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c56783c7a800547a03e69a41f6494254b797d19e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.23-renovate-major-external-major-5ef58f0189594ed9d8976136b0d553a0a58ffe66.tgz","fileCount":39,"integrity":"sha512-KAcGyzD9VoURE0694bN/qFABuxRMzE2IqWHWqE3uAF92678Kk1+2r3lTrVjpNSeU1E43dHXSp1IL62zVMWSLYA==","signatures":[{"sig":"MEUCIGuzz59mmOuyyHRYtOWJIHhZkSQOVuRtILNJjp1XQ2JPAiEAoAI4Fcm84PYvaEGJVGm5R1g65/5atFmpd0MbCRiSCpo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvBO9CRA9TVsSAnZWagAAlzcP/21PukWh/L2rgdAiH7ef\nDg4+35HHCaOPQBiP8JHQ2jpRxs6jAyMhjF8IMxBOWLFZIARQHxaT/6ljLlVl\nGxEVb4nKC0Oa0gOblN7hZ2z8BATh14QJ5i0Iw8Of8HP+DOoiwpDJOU0/Vdpf\ntDdR5dLeVoiuP3A5zIw83X3SJT5M6htJ06/w0UOaJHgdvfXrD2XJEe+E1cyc\nhlr7qP2eLK3tgDe2RjdyeXy+dxdbBPFxVph4LllDvzk6NoFgy3W+AnCO73zb\n+D6H8rNjquO7BtQUCzVYfuWf3ImqVsOvrayNXGnArlfgKsmldPRDP3HBaHGQ\n+P8L4UYU0mxhrXMoHShJ+JiD2zQBL/hFL6QJDIiPoTMDKxj8JgflGT46rhhO\nDfALx4ACmVbZawkrQzKZPDPIbxh2B1hmckXisi4RvHEC6QsBVC+GHzr5RyKp\nudokDOddXhaZcnxUrw/x2rxxBnPnhZUjFb17lvipXm9hKYhyWzeQp5r6bbvr\nxybrgOD5SmkI73+mQFmzMBAtu8vOeNAeatdGtrQ6xXQDs3CkIbBCbHSG6UPi\nw2inX9s3ILNj7sP0KR39cBZ6BOxfI/V7nq917I2GA7nhlx+sQuwnL4zEqzxy\nX/i1pu9bMfruZ9AdjvMJIudCRQumJ6keHLyz+Q8IYtI9EdF0eVdB3JVmi4tf\nQVZi\r\n=9AOJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5ef58f0189594ed9d8976136b0d553a0a58ffe66","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.23-renovate-major-external-major-5ef58f0189594ed9d8976136b0d553a0a58ffe66_1622938557597_0.7934644343958133","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.23-bump-jest-6d5ae48b0d37dfbb7a29f70a35ebd4983e04d6be":{"name":"@balena/jellyfish-client-sdk","version":"4.4.23-bump-jest-6d5ae48b0d37dfbb7a29f70a35ebd4983e04d6be","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.23-bump-jest-6d5ae48b0d37dfbb7a29f70a35ebd4983e04d6be","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"25f8482c84885509e0b8513f1edd46669091f267","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.23-bump-jest-6d5ae48b0d37dfbb7a29f70a35ebd4983e04d6be.tgz","fileCount":39,"integrity":"sha512-gMeB1l280WtDP/VLpcpafjHz6ALt5bKvQJBDbYiZipPf06q7f+P8XoNXWwzqVPoIS0driFEBj8W0zH+CTHai5g==","signatures":[{"sig":"MEYCIQCvmRYRyvqYGqhkbEZl9YJnR9iEWPpSTV9apUV8whPsQQIhAMYsD+QGGgNGr77GWLhm062wzj/3lri9+1gaBylMkxAr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvG+QCRA9TVsSAnZWagAAI2sQAKQ3KKxlPggujBIcgjcP\njeTcPEuMwv6m+B7e/uw6gRhzMH3D0TcCjX8mbcBlii92zjlD1STjvdv/oLIK\nbIZwJjLfN9Y1V4YESZ2bnUsBAa2Dlt0QtlhQa20wG/XDwmeSS178tQTG9JKh\nz9R4QxqKHcBUGj9EYke+qqY37z9LcbNvn+tYVavf8aiFWsnvzxGsWntTkrd4\na4t3GqFQxXRRz3rLy8gQoloBC3z8Scn39YCKW4CeHo2yKOzFWCLDhTURUHlr\n2fbz8rkGa/8nEV1x/f013C2U2YhgjU5g8kWrKdc1PK7ZYNuXP5x0mIo+qr47\nCDyMAysNpe50Nq8aAkgaVIBjYfwKjPPRT2JMYeJ7+79jfHJaleySFLbWPG+X\nMz7nfUWGykRNl94vCEIz5OeeQAqLAFbMli22/hAMhKJ+JZwqmEAU5WIFygCI\n9pvRz8s/cwrSstYMce21JqdafZ1m+9y6jvgECRMcUjc4RpI3BLUVcfUon0Sw\nfXbP86K4QCiU5c3IImusdfm77FSx4e2471iLF1W3f8TF0eSozWTaEADb0oux\n5UOZ25pcCsRMX1ZyVHBt/BRqTuhNQy4qFh5woO72fvNgJs9olotMEErSRrVf\nLget2n9Thr7fj9lZE51k93yA9HcyOf3Z8gJHWtnqx2S3WZPKoP2o4vhRKiss\nXMVQ\r\n=yzPO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6d5ae48b0d37dfbb7a29f70a35ebd4983e04d6be","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.23-bump-jest-6d5ae48b0d37dfbb7a29f70a35ebd4983e04d6be_1622962064644_0.318738711356102","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.23":{"name":"@balena/jellyfish-client-sdk","version":"4.4.23","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.23","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2f92a1d23b30d3cde92777abaf65dfa81480eb7e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.23.tgz","fileCount":39,"integrity":"sha512-SRfHxywtyJpucKdHeiZzoi4gysEVPaQAliIUhlInYNGGSBWwBBZTOySy5lUwwA8GoQFkamTDcqQ/jaByonnjYw==","signatures":[{"sig":"MEYCIQCJuxebaPRVr0OAliwNHdD6ts8wN1bl3dLOwyu8blfrZAIhAJJi7GAu0IqspIFUTEnBdlwzC5FlBxERB9iY6VvEH4X5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvHA9CRA9TVsSAnZWagAA+sgP/2xhF3a2Q6rw7zzPtHt7\ngJ2IMt7UH4opBtmmLSDk1OxUSkktllL/eQG8D4XdphCUfCNc+mBOsSxBYHDe\nuTmf/ACHxedE1oz8upMMPh8cGSuWcbVYAmVOQcTJrush6P0rvDFDwYlHBQo2\nHNaXZyvqM7GUzaA39nlXr+b/CryeEufqzVZDdUmEhEk/UckiZQJfToNQkPSo\nOQx+rhpY1t1QnfTcZwU8qiAI7PTwgF3lSNHd7sW0sDPtk097ZxbI8oJTxThe\nKR0jZwSIAvjwkg/cQ4/EL7nJKYxglALeSV5j300tno0mzUJQ5w2Eba/MlhpI\nQ0WTCbw+PPW9Qmgr3c3DU9ogwb1hsz5yfWUUaMKgw3spQqcH5pmGe6ydRQiG\nij4AF4vBhHVEfGZnAbTdLRhj+7sSuJwZ4pP3l1bNK+Y1XWLkMmMB0kjIGLVr\ndTF7yV6v3P2Luzyysb1ijGKagAvltbPpVPoPg1MtXAmx9xXl2m+VwxDPdbmK\nwZyc7XGJNouut83vRc8gtM0H0osNv71pFv8I5d8XJnCuUB2c0LyFwmvcyGbF\nXO0xqVv4hzFvqouE+Unf1YcR0tmE9RIuChVHXwIgA/vpIc3ZuHxtaIUoRNpM\nIFdLO+9INgvqMEUckpHCYmgKDnsRHFjZRHBKQ0Wb8ENbx3N8l6t1hbEJ6mHb\nuNXZ\r\n=UZKS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"047e54937efcfc996bcd1bef597835f93af406ce","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.23_1622962237022_0.9914359720357653","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.24-renovate-major-external-major-5485c099ef3aba28d189a3d83c2a18ac2ce0e232":{"name":"@balena/jellyfish-client-sdk","version":"4.4.24-renovate-major-external-major-5485c099ef3aba28d189a3d83c2a18ac2ce0e232","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.24-renovate-major-external-major-5485c099ef3aba28d189a3d83c2a18ac2ce0e232","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"026817e3ce1617b2d29381631960f819af233253","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.24-renovate-major-external-major-5485c099ef3aba28d189a3d83c2a18ac2ce0e232.tgz","fileCount":39,"integrity":"sha512-6/XozJFaF2P23vIUwZkv+Gm1sSsaOm+TLSHqsCteKDmIaeqsnhogb1zlXR2sYX5mcrgC6mMwND/0bJhtpWpDGA==","signatures":[{"sig":"MEUCIBMc01o3mgMTCfvhuCJZXMpj6/qEc2SqRwi96EteRQCiAiEAssT1YuwB1h0PRHVgosEulmAKMRv/G2tpUhO+Mb0mKUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvHFvCRA9TVsSAnZWagAAyJ8P/iJJJZ/lKRsyH8W6l5qq\ngLpO5QmgzCE98KS0R56jX4xxlRoPBqPNPiqeqxEaFZcp6WQ21hmIq77GxiAr\n0q5PpMEEHTygAHkLI+97ItMxz1oAZJJcothW+by0gHtI7gijhVWmUxyaJM3m\nRApNuXMI0IK6Yjt72zNFI0SC48eYLQQY9BdJXNpdNXrGMnzPepFrBKnIXncP\ncCA3+lagcOb9pgcmwgx0k1aDWPsxIQmQhkCc0NnEWUWAtyS+UmCuRFnqmUvr\nsztv6uWzZUanHgfKai9lDqQEpr3oDjbibuHLAbhZo7B9yNUFDHQuccIzSLaz\nqzavoDD10IOc8VB5wJnew4LXNyATBpW2do38Ajh+oHzcKsB/gChos4fabuNy\n5hkiNJ484PKBOtbTlkDlZfSHbBRQADWEvqe7wWoOVqgznyMmYKI5vo6LGvdr\nyrSjE5MufYg0S1qkV6yozgfRFx5B7pms9me6pAFtsnCQForCI72dyZJ8gOAR\n0lqC1owmTTTUobBQ8dz/BvLuHQmTiOywlB0ZwAb31yXnq+MxWfPAOhegkBqv\naVsUDI9oHj5GRtuDDe7FbZkQ4G+NUDYwev8b5DtMX2SomRyPtb3cjuvsUN84\nIU5c+xjjhx9nVOfTWW/ZmBDnIABOkG5oIK1FfFuFyuYBPaHKFAjfek3gDWj2\n+CBs\r\n=dlmi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5485c099ef3aba28d189a3d83c2a18ac2ce0e232","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.2","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.24-renovate-major-external-major-5485c099ef3aba28d189a3d83c2a18ac2ce0e232_1622962542881_0.6353657196866598","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.24-renovate-external-non-major-944f6ec2c0b58d091e7d9c8ddb06b7ebd281294a":{"name":"@balena/jellyfish-client-sdk","version":"4.4.24-renovate-external-non-major-944f6ec2c0b58d091e7d9c8ddb06b7ebd281294a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.24-renovate-external-non-major-944f6ec2c0b58d091e7d9c8ddb06b7ebd281294a","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8486358d8e87c66ff30be48f2557a90b6d2d1678","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.24-renovate-external-non-major-944f6ec2c0b58d091e7d9c8ddb06b7ebd281294a.tgz","fileCount":39,"integrity":"sha512-HTbUdMEmqwolp7oYPqmBPDbTE/OL54Qh91NvU1YoNYuPFnyAlgqPxwyveFPMCdpapJuuvhjGH7KOdm1vYBHJxQ==","signatures":[{"sig":"MEQCIE0WGhVeNz6DzWrV5Cyn1TT3eLS0mgBW8hxvohu5UlvEAiAoVddCtYyZ8FghMWIcit9Z3TqIHvtPeOCwH4GWS+yvpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvQd5CRA9TVsSAnZWagAAkDEP/09BPn6HlBdATRspszGV\nBR2aYAPmfGG5tWVKTKbw5ZTkQErV8e5ekYNdNtlhP55FqnXrOGNSmAt54CcR\nEe28lKK12XSTESZEcujQp+1PF5fWyiQ5hrVFLUfoP1fksebC99lmw6CeIhol\nXpHooNL41O5N1mMZj9vg+76ccFB5as4L1xVivsMsCtERe57/ivcUQ2pamKWw\nFOZNwXwGfGYg8P88Ag/iXnXSBZaybHgNbelu+vy8xLp2V/Yx1YwbbxbGXnxE\n0nTqar8ExCWnDaWEgJj65uBKMrCsPmJVNeiJlzK495dqSaTBfMdcUC1Ur1Km\nXiV6C8f/nIpNooBst9zlf+bcbKMJOiiHIqW8BCtr9EsloHKY1o/DxqUcZDW7\nIeKiApl+8+pNCv/q1a5yK05emHzPsaL+mV1hsnHlX8GVEvAcvGjR+KP9v9fi\nOPZGYv7dAuuXla3iKtlR2f1TpLUbsLSJ8DxqtluCdnelDSg267UVxp78GE3w\nUBwJJMO+ZSKgVGQraAEZKnDqsLyq/yRAcstNFDE4SX63SIx4iX7t+E9OZBAK\n0BapK+8hW16T59fjj23krWd3PagTYz1EhOPWqhYM1vHQJPvsK6bGfi+vXxF/\niRPj95DsMQw3SYPOEquSxVeEa5SCZ/edSjD8KszmPOjHHyOdwc6GhcehRU46\ndRpk\r\n=CQQY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"944f6ec2c0b58d091e7d9c8ddb06b7ebd281294a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.24-renovate-external-non-major-944f6ec2c0b58d091e7d9c8ddb06b7ebd281294a_1623000952920_0.5011231491623587","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.24":{"name":"@balena/jellyfish-client-sdk","version":"4.4.24","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.24","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2514c452f43f6e51e09a28daede4be4c8ebbc752","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.24.tgz","fileCount":39,"integrity":"sha512-Fa7Og0XIt15X/LwSibeX2YXZUVtAV+M+Yr77XNJTm7LuxJzoTqHCdu69rqhxQNemucNwGPxREiQhdJHWWx3etA==","signatures":[{"sig":"MEUCIFmXQxA80SzE/3JkxNsOuOCax+xwmNyFVZ5ULNh/ZBk4AiEAgUO0cwICcJeGKZ5SoCTOhQltIBhAlKASvgASOyI0pP0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvQgjCRA9TVsSAnZWagAADDEP/3waEjI7t5xFORKaCE7B\nMAg7wSuNtNarisYndk+/DPcw1JxLA0y0jeAICmbjGMgSay4P4oIiVlr82fgh\neCBiM45AGYKcHALMfaKERb32WocxqPCfN4wF1G6rQczJKR1C8KSbFWq0ii68\n3Yz7QGtZNaUBsU3EIC/j1lAYSiU2Sg8d0ja52GlIEBv8BHIaln7hYvW0rHR0\nmEii6VLW39zWPCeg6dxQMu0VltH+aZoDyzcWkzzqgYzt6v2ukUGzNWz/uOrl\nFFo+78dQ1dW/0ahSqdqCAXHw6rL48sjjLKfy9XRXDxiX+0SpljWtUyhWjwEG\nZ9SCH14Hi3RN1pghF1UiypYit9dxC5/rKczS7kf2ECmK0YW2KysoYxrAo4kw\nLcdnaJVhwJ841PfvPVzydUY+coQrupiC0chwoIT5eX2MpuxAHm3BGxm32UpT\nT7muZnmbRKmmforB6IxXTjF1eSmxytFO+E7nfNmED6ZBFRSeONwT9wq9u0CM\nFldcXvmC87bsab3whbm8naYzsW1SJQcqagKun0UgRqcTKfgFNMyhly5VsFsA\nqQmimpFhjBcrGUGZVaWZq5uOGjwKb9RFNSiQJMq1QkypxLSGBKAp/717yJRM\nWX/bBOc0Gugzt8hB0S/lwkriWMtPwyBnipu75QsvlQ8j5DB4c1wn1/0mhXE2\nWILY\r\n=sn7I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e3b93b63d360805f2c67a35fc793396d737f1638","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.24_1623001123185_0.5920692821756561","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.25-renovate-major-external-major-51f8dd7d72d65cef3aaefe452e2b1a1baa2afbca":{"name":"@balena/jellyfish-client-sdk","version":"4.4.25-renovate-major-external-major-51f8dd7d72d65cef3aaefe452e2b1a1baa2afbca","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.25-renovate-major-external-major-51f8dd7d72d65cef3aaefe452e2b1a1baa2afbca","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"01749be63f35b9cdb9bff8172ec783d2bfdd553f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.25-renovate-major-external-major-51f8dd7d72d65cef3aaefe452e2b1a1baa2afbca.tgz","fileCount":39,"integrity":"sha512-Ng7K8ML12/u4uFzK9AiqTXRZyTuWnhlv4xGpcqFA7Plise54GXPah4H9qiLMR4MzNrCyB9V7kB80Orj2Q4xfjA==","signatures":[{"sig":"MEUCIDxlAubWSpWzoegJuy0eJ8sMIr2glGnQFCXny1Y38q1qAiEAsQJuQXCxLeshwMcXQPSS7Whox1n5I3Vjqc4W/pOBWtY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvQlZCRA9TVsSAnZWagAAou0P/2yeyAHa9T9na70A6aMX\ngahkUoBg3h367XKR+mIZN/hinxqcIoAPZf8y51VpZ2thSMVTfxuEUzmhTFpn\nWasfHaA1Z2ix4q66hHj5s/mWCmCXds7lONl/kw0Sl4jhErlquLggrIhlvcKa\na6Pr8zBeWD72RU+PxOuY+fVnHTuCmFJJ5U/Jyr0cEQ/FLU6vXriK93S5cCs2\n6UPFWB0IiGJSwJcjGlplVNo7sRgG/mje+a19OnPDO0A8VbT5nBFVYVmFCY1l\nXhgTITnaNavQ99mQDzcIyVnBTC6Kmy9z9FgEbsRZWoP79f8iKcPtYavanGan\nexlxIt4nCWEIBOJQhDoK4UDpJsvGvr3PQv3BmUXKxGhB20XxUFsJBcwd+Qfh\n45tXlLJYvUXw6oRMCCkkTbLS6GepkVA4LAHJCUvniU41SZ3cOidtAIg5xjeL\ngAGVbIu8UUaaPRS7cr3fv5Ev5Ijo7LfewdV1dsgX+Asv4lwJQMZ4ZmNXQ3BD\nQg7IV2uGcmMZ0rV/4TpCpHCwHphibrEGGrksC/zvtHn497LFl132nhLaOB0p\nujpvx16pYlSpXsC2YNlMbHU4DXFCEY+PXmGxkYs3WBL2++rGcRNkvvzIzjQH\nPoxL9c3RUOiSdsC2DA6adOKZQWCxdnonzrUdkyARtOfC18HBjnhqT3E5ZZ01\nOtgc\r\n=y0vj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"51f8dd7d72d65cef3aaefe452e2b1a1baa2afbca","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.25-renovate-major-external-major-51f8dd7d72d65cef3aaefe452e2b1a1baa2afbca_1623001433293_0.1066211269881967","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.25-renovate-internal-patch-ccd0b3f4730ba311156033cb2a9ac5e74acebf9b":{"name":"@balena/jellyfish-client-sdk","version":"4.4.25-renovate-internal-patch-ccd0b3f4730ba311156033cb2a9ac5e74acebf9b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.25-renovate-internal-patch-ccd0b3f4730ba311156033cb2a9ac5e74acebf9b","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f8eb08c4c3fc9d9723771ae4e3546672bd1d177b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.25-renovate-internal-patch-ccd0b3f4730ba311156033cb2a9ac5e74acebf9b.tgz","fileCount":39,"integrity":"sha512-o0x5le0D+E8TvthkAJqb1+r9xVht3Jn7XLK+huvndBUoElVWL8TpEHDjFvqibR7voQ6336O998sQ+D21DTucFw==","signatures":[{"sig":"MEQCIHl4VQrHbQBzJmUJyl6aBiwS7vhGz/bqhk2Wl+KgoSjFAiB5nkfw9wSg9HJrQMaYsDqyjFy46lg6HXdEwnI9x1EadA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvYfgCRA9TVsSAnZWagAAkK8P/i2+DcX4rTQtTXRG1MqO\ntlkC0BX3bigq/zwZkLh07o4biXRvFS5rfNqnGqoEMU8qya2hlazqSewRiWoi\nao9lY32a+YtRqk87NLAvDjmj1tV/IsObIi66dlfsefqIcgVUHSwNo9AmUu8t\neLlDhzE3w4U1XcyyP/bUixKfpdCsTmTu/MR6uL5tFlXoCcdKkGj26pvNj7Wb\nj8eb20rTcEoFI3lzI88cnoxY8hgS1JHJkgdR1AfwJkI7RT3T3cnB9dZatlp0\nckctTcxTyu56qPA4J1NfHU9rGRTSyaLkffE9cZOecQsF9GeH69ahZBFJYfAb\nyJKrmi+psL88aZvwIo1MM09eacZNZrPcM7tGhrwkpXL74G51F1vMnv45EzlO\nQQgBD0bwWKBzg+ubZ9dyaCkIYRbo2qCqmechf2ZXB4xIDjUcwTC32VpMiE7B\nUcS2HsbRu3p+rfERMLwMWeasu+YA4ODyYyopja0ORDH/MucYUigao24HJHR3\nA7kMwpp6ocQtsA+dTXO0F9nDqhRtefC28HjWiret534rtWRh0CwUg4g/8slg\nr/4s4plXpXBt3YOC/hjaq/KwWjpvcvGIX+Z+fExWwtQxLdkKKuz31BOnFbfz\ncEpFJ/HroCcHKvpRJVux/GMBgsc1HoRPZVfnGRhlEQoYQFo2tkICmNsHxCZV\nwaB1\r\n=flG7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ccd0b3f4730ba311156033cb2a9ac5e74acebf9b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.25-renovate-internal-patch-ccd0b3f4730ba311156033cb2a9ac5e74acebf9b_1623033824743_0.6720555517217841","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.25":{"name":"@balena/jellyfish-client-sdk","version":"4.4.25","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.25","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6591b8ecea313aa98a5810131b3c6b4e8e9023ae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.25.tgz","fileCount":39,"integrity":"sha512-vs/8UnsalmIG7t2Fs0fgIxMD3xiDq/YsV/UGhoe8tqzf7M0vd+nKVBDhRijL+IqZp93RNbWHSdN2FIVEoZwpFg==","signatures":[{"sig":"MEQCIH/hO0DPoq44jikzGWlwwbNa9/cG0G1gsSjqNzPeUTDWAiA5Cr8wI42Witgu6Sebqdy8GnVQjD4GIxb7emPmDGKF/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvYi2CRA9TVsSAnZWagAA/nsP/14CamfckC+JCKa2k3fL\nrijTPLP+qN7sPI2A/JKGuUpWQEay4uPJBhY3aPZZjMCSK3JRpdxBoIQ4Laz/\n/Hl49vyx/JHE3uXkXJ4/nfyU0zs3cWxZJ9v9IIwM13JDiIteZog9/OGAg+0/\naZPN/OjAaSp0Zqoa1R5yvzCUAqWBRoOpUxYLujvwKSDY7b0pDDU4MiaG+EKj\nHxGG8/Q5FSyuDW+b1/1S4UxIY7tNkYzcZBe2UQkplir9xv/+h9mNQAu0URJG\nJfYFAvrmUD9zf5Daqdb+8ow/lj3AOph7wTLJftVI7ZczN05QUkaFy17QtO4e\ng/3NrP3PMOEMXcMbPbAm4oGdXla/ZWIylruZP/RzvPGUQVkwMHE52mKCngAC\nnLPxuMOtGr/Od4EKr47YWJXsFCAuYNf6V4nTripdwMDpYiiRbIOkzqEk0KRd\n5cLIxUI+PbhaZ/S2aHSqtE+IlJCMf3+pbUsUTjDAPxMSkOJOakwHh86gkebh\nBOowSL3NRHzKeMLh3xKoSgnl7OUv9uCDsOd8C2cj9qrgE9QW13yA0pCclEej\nV/ILSDSMiEj1rHLLZxPfinLF9E0YsWAoCDW32CQRAYzUIyI98GXK0WPpuo0j\nE1G46Bd3kjURVxX0zYqEuclDYgLm0PGmvao5O3arXRtuLN8o3ZGCjOgaD17B\nqMFl\r\n=V5hU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0a0a869799c2416aa8d05cf2039582ddef09d1ed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.25_1623034038742_0.384483274633874","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.26-renovate-major-external-major-61dc059785e2035f0e73522c24114cb1ca8efe3c":{"name":"@balena/jellyfish-client-sdk","version":"4.4.26-renovate-major-external-major-61dc059785e2035f0e73522c24114cb1ca8efe3c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.26-renovate-major-external-major-61dc059785e2035f0e73522c24114cb1ca8efe3c","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8f74dc581bd31f3c08cd29a14f9bdb207956594d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.26-renovate-major-external-major-61dc059785e2035f0e73522c24114cb1ca8efe3c.tgz","fileCount":39,"integrity":"sha512-a/pMrEXR0X3oTyFlsjNOvRMUdARHVZC7J3iFyDlo0ouNaN7HlMVsdqJ0Bj46Exxdoqj9yYOtet1B+5t+ZPxVzQ==","signatures":[{"sig":"MEUCIQCrPkWcvgatgln2rbvqWa+FoVnN1RwV735pLly3HAt4ogIgUi9AYmisCAbDPeo+2kk0mtclXd68Hn05ZGRYtMlBuuw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvYnBCRA9TVsSAnZWagAAALUP+wYD2teaE7/aiVFEuW2H\na4JAAMUkJJHswLg21U5mbg2M/cbxXt0YTvGhNQ+5LkZbPMniWNgHR2dFPxcW\nQLYL+RinEgVL3JvpsjjVYuZPGizKIMXB4s+apxWy7i52T6Akv8Lob7uRe78p\n+6EED9Sc/1h0VEfOtGyn0o75UToeQjteZvWi3y9kQBNk7vbDjacED35dTvLj\nhDh89k/hr5+F2EQJZ4nDnuce8PYGI/0UH0Azknq1mPJVhn/KGaTLUSryzcs+\nIcMaB2irKE/tB6UCp4+dY4mwnEsFUlavwQDrt3yfOJwsLs5PTH1aJ6yZFzmr\nWeouNKRYuIYdx79UbJTdl6EzjTV62pv27GIYEzlh3ZEq6arIRAsNQkOoSLZx\n3fLP++sasMqLXd+gZq0opxStPPV8Hio3ng8D9QgOjHdHOltw1DgQw9LtzE02\n6MeLkD8qABY/fsBH4RdWWkp74VFD8INo5wMtbyTiM4PmDzQ8Si7ats5nLrBK\ntEnG9PDtDQ9JXMWLMUZbJKdjtZA9p6ZmMJ0OHinAEuot6UiB8fTyhHaetwI2\nnkz5XQqu4E4idfTiFq5xRUXAZQg+WLnLVXL7qk3U4gK19PIhIDoWb+sM1QhI\nrOGa8A2TB5XL3+04JwFBMEfmPE/2enwLFfx47aCiL7pTy5fRmsDB4no/9JXY\nOATo\r\n=fwS2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"61dc059785e2035f0e73522c24114cb1ca8efe3c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.26-renovate-major-external-major-61dc059785e2035f0e73522c24114cb1ca8efe3c_1623034305706_0.2702127220142989","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0-fixup-link-constraints-91f5c23b13aa6fe3ffe27034b996ba68c063398a":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0-fixup-link-constraints-91f5c23b13aa6fe3ffe27034b996ba68c063398a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0-fixup-link-constraints-91f5c23b13aa6fe3ffe27034b996ba68c063398a","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5283e593d229f3ee49a8018a34366755b8ed5e2c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0-fixup-link-constraints-91f5c23b13aa6fe3ffe27034b996ba68c063398a.tgz","fileCount":39,"integrity":"sha512-WyCjFMIV3c43ljEoE3j3Ff8EniO6wd5y6+vdige8DAX5o0bgxvkBWvyfCwvMqplajVlVRElm85Vi1SHID77v/A==","signatures":[{"sig":"MEQCIGpZei2hW+Svfm5CCoUonZtb25IlchPwHSKpSMer+s6jAiAFy4hrYoFdc9T3QegSMd+ASEFE0OiTe9GF/tthL9uQdg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvd52CRA9TVsSAnZWagAAZVYP/0Wwi/vY08vG8MAfz7A+\nPdmCQ8lC4zmjrqcEe6DPpgsyu3+gPsUBvQ72LL7lWKBsBZXlxbKdGPRj0zPk\ng87C7aVv32hiwQ0s30+TIgerW1o14sTzJajWqvBYX2j1G0vJm1iYZVs2aw0I\nhHIAEevtVayIqQlyxXKWqp0guHWfhffurtpa4ePA8/tPfmFGPpwtKSmxBTAz\nP23fWvwDo8i/lj4h3UjW9WKuJSsCOks2s0nZqbZQ9Ot0iwY5ml3t7YT11bnO\nGQHTkFzVxeMtuyogMIHusvQKqrnVp+02G4hSbjfIftTpksgDNuXFBwCiJH9I\nP8spYUqADUf36+XOzTcrsXGqThVKsYc3kZj+5J7KW3CPzukuo/4Dumxx47uc\nehLKBsgz3BDjLpbPbs72deYRodc7feodKflCr5DooyGsIiFd3DIFlNNNC6OR\n6jumWQEsC4BNqOMIerCW2jigG+v9xUdSy52J/UJsirguwLBdfjeE146vr+r3\nXTNxAUiTKDsbY0WpHcHmHeYY2shVTrFB/SemKkWKA6PDrWcUXm4GnuOcAQWr\nmP4hNOsEbf9zn65ujfOwLgpATfpbocNcldIBAnHoIwxY5uhCjz49DahglpJe\nVEqw7Ct8HNLJ2jNzp8vrsgsMx06+F/Y8f4CO5XIqRunjVHWPch8x5dpGBVv9\nBb/J\r\n=U2Zw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"91f5c23b13aa6fe3ffe27034b996ba68c063398a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0-fixup-link-constraints-91f5c23b13aa6fe3ffe27034b996ba68c063398a_1623055990299_0.35060744770390717","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0-fixup-link-constraints-d9f9fc92280e26ae8a0beb8797b2428985bc7d93":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0-fixup-link-constraints-d9f9fc92280e26ae8a0beb8797b2428985bc7d93","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0-fixup-link-constraints-d9f9fc92280e26ae8a0beb8797b2428985bc7d93","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d270046777b4eb065bfd4fbf348e3c226a4c86f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0-fixup-link-constraints-d9f9fc92280e26ae8a0beb8797b2428985bc7d93.tgz","fileCount":39,"integrity":"sha512-wLY6E7OAyk0xY8DvzwrWFKLgitAOCljl3z+odK+5+C+ToKFBp+qC3z4Mu9QHZOohpnf1S8q+NoZYgkHrqK6AWA==","signatures":[{"sig":"MEQCIF3yPsBdaWYEG3XMBagksmrMj/QtBcISFjpSPniJhjD3AiAeMFNNOaWql+tGNBPxsUs3gCtEj1/51i25EAI1X/Eegg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvd/rCRA9TVsSAnZWagAAcWIP/iQodqH9mzzLzYx1J2V/\nHCSmdqJzhS0SLtlAZDTkcy6PPNTMICrZ03yTNzkEIirDqWjwcyAHpEMMQuKh\nGnyQzIkNWaVfj+zmwezxWjvEo5SouaAmojEwUtNobSMVVh96EfxHokh0lh7+\nMnR88+2vxoos6oQ7D3Ew+MLAhdnt9+8Sx50L+0ycCsQbojuTPACwUXtMogCU\nX5o9L2RvPLCC3eRERht/h6xgfSQJ4cMAcZxdV9MpdZuZGNuZnM/OdjZoahBk\n5OMhImDKDlCIFubPNPZkGkDgY5g84x67G1yeYjW6RM3x/uZCWVxOU+kUpOdF\nfPTJKSZmLgyk3JV1TneNDORliHPYeUXXpV0c8lY1aeZMrWOm2c99uKcK1b2Y\nbbyzgq+/V7tT82Ax9zOdowcJ/jWzRXWo0YuWjpel6IIeLnAh9csALa+pp13J\ncUl5HerQq6rh8UtYmVeTn4wJmlKdnLkrNdz3CeMc5gdh42+sLtdCfwP3Gg3M\njsuRusuxrkngiW7RWprbKMhxWJLefe3ET0IXiBh+9Oz0Jw1VQK4bOoOlX4XZ\nlJ1UiEUJ7dijoib8Tzilhz09ORA1SeZMVq/eHU5SSpc3/KXg39L91A9pIVrU\nE1/j1X46fyRrK+PNq6gjOuANlMBwOWNtzHu3UNQ3EhQ+44jwgwcG4Zs1AJlm\noZtG\r\n=hXvY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d9f9fc92280e26ae8a0beb8797b2428985bc7d93","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0-fixup-link-constraints-d9f9fc92280e26ae8a0beb8797b2428985bc7d93_1623056363738_0.7925265338300227","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.26-renovate-internal-patch-6ebba6c8f9e59d1dd414cee6e79859e6c36b1086":{"name":"@balena/jellyfish-client-sdk","version":"4.4.26-renovate-internal-patch-6ebba6c8f9e59d1dd414cee6e79859e6c36b1086","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.26-renovate-internal-patch-6ebba6c8f9e59d1dd414cee6e79859e6c36b1086","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e8b804ef5bb3cfd0b90adee8655731cc2f3ab8d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.26-renovate-internal-patch-6ebba6c8f9e59d1dd414cee6e79859e6c36b1086.tgz","fileCount":39,"integrity":"sha512-Bxrvx2pJgOO/oCzzOi0hm7qrpr6GxCFvMJ3RiDJvzl+xEHPaN07Ht/TrmW9e6dqSbBNn7p+arkhonCOQFWJaBw==","signatures":[{"sig":"MEQCIHsPW+/ek82i3csE4xI68wPtyaHa4CsSfp7viiGJnjHwAiAVG1llpjmgq2mktpWdhVOEC3bP0vjS3qYui2UULp8e6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvufhCRA9TVsSAnZWagAAtFwP/in+shujEvarfXS7QzX9\nOmRxW6nD8kcTRMtf6TvTiQyC3vE1Merrxr9+fcU9gp0QbwpXSFWTTtncmiho\nb74+iY7EUegeXtLA4kSNotwqKyBREtorJWonOmKSrH5sgm+90jTnoirFc1sy\nrGflagpjx+vNoYtr2dbUsmR8QjUsBzZCJmC2aeBLLxMEg/5vi7svTzkqispL\n+rSR0oBuVwzp5jWRpgLdXF/wXA1FmFRsckdnqbp35g8pMvjKryAYT7eQmSE/\nSE7SRfgkoZ9B8QWEVF6Dce2ny219Th6HXnGSrLCSsudWEIduiF9AoP5fMkOA\nvGJiDTqFO65kdIZB8Gvsht9ogn+ByzBBmcVpRQYidDtNRMkywo+VDAO/ViYf\nAz89K/HgRSByEaWTeragWfQgEwFsj4ccRkFuABU8wWC/gNKQ1mhLEbTn58Py\npqleVEWwWJk0BtGBtFdSK6oJIy5ce+I9VEX+BGXMYm+r71PaDIT3ETYmZg7c\nVfT4O+yzNSUazbzWNXv8PNpXzI82BZnqv+RgBTSLuJpkmwr4LwG4v6CW6sHQ\nv5ye0Ze8dotdANqc5cIncoAhXpVnspln/H1mjoTr4Oj5rTVuDgETQrjDOGNM\nUcUYp2IRrA5UIejMALN9J9im58d4I2LbuoKX0fuuned1jypL6h70gPmLOCKT\ncoWM\r\n=EtmE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6ebba6c8f9e59d1dd414cee6e79859e6c36b1086","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.26-renovate-internal-patch-6ebba6c8f9e59d1dd414cee6e79859e6c36b1086_1623123937236_0.2247907167168537","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.26":{"name":"@balena/jellyfish-client-sdk","version":"4.4.26","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.26","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6791a29f77950901ccb9eb15c94840ca326d51a9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.26.tgz","fileCount":39,"integrity":"sha512-OWfAQY3zjQ/hT9YMj4KA79VzV84zSWd1LIrrp6cInkGPxA0TxSJZE/HEQczdLpjinhtXj2QCjMRk83kIoppShA==","signatures":[{"sig":"MEUCICFWsO/swxBNCdM1D0SFCMwtvfDR2OGTHyZpby/AiJpjAiEAtelblV1jEmgZPGJ84JzaguAMCHkNy8XIQDm6wVu8+5Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvuixCRA9TVsSAnZWagAAJe8P/AuCf0YPUQy2Zf+9Pemd\nJKYhNyZC3mPKTVSdVgf47DNfbqoOGQ238fkqXG5OaEdlNb85gj2bqR6/f0iF\n8+kDrAjUIwpjzgkvPec9tTzFALZpZ35RvF896TzOF1xb0MqwNsydPfslNMCT\ny/XNY1kCaTbVK9wUnA7K4D68i1e2reGbWvA0fWt+ER+wesHYiZ516cTR0NLG\n0MIZImcF5hcSYojMLoMFMf2XXJqnh620oWEouqD8+2PU5n8i7EgFFtcE4ZvT\nnyBSOTjwx6Y17txerxDGnNqx0bpf5Ex4JWKcE+nMD9zVIfH23zstl9hzrGiZ\ngRvVI5MAb4Yit9GICMvbsjHw8te8H/N5wRfFbq90ByLo3IwXFLA7ulWfRrF+\nbMWQHKEV9OlL5EkROBzofKawWF4G24XfckgaRAiG/s8ow1hPKg5Friptm3tU\njWIBN7oGsVO7qwXqqEwKsfnw+czQafxFwmO0BinHQyu6+9ki6GN2G1mjIOtd\nVXwcfAANdeZnHrz1wBMtBAEPeqOI5WdZ7l0EJdOfd/0g6niQg18hc7eaQUsk\n4BhaoUIMMKyWomfUl/bFctb5I8fS+MGDXB2OajcoZ/QzioUzZvr6hfJy1qbL\nsDKJU3dLbJlC4pzM5iUsAjwbNpcwSPx6G6IzqEvBajFL8wxXV/LZQejgkCv7\nKjbY\r\n=lJ9T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5c359eb8d151187738b8c22902e94520ec25a289","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.26_1623124144986_0.7578014785624572","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.27-renovate-internal-patch-413efc083c1c6878e5ee868aff848fa668ab9186":{"name":"@balena/jellyfish-client-sdk","version":"4.4.27-renovate-internal-patch-413efc083c1c6878e5ee868aff848fa668ab9186","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.27-renovate-internal-patch-413efc083c1c6878e5ee868aff848fa668ab9186","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d8875800da42d67834b8768c5468bc29b5499fef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.27-renovate-internal-patch-413efc083c1c6878e5ee868aff848fa668ab9186.tgz","fileCount":39,"integrity":"sha512-KyQ03h4rdazmz7DyUT7xCiHX1XqOomSiubCDFCXhka9ktynP+tnndq8IYLUNwPaj3lkvlyyyjMl8w3yULQzAsA==","signatures":[{"sig":"MEUCIQC+siCMLhTGsb1xJAhYc4hvlrQs0HOcPRGidYLo38xqWgIgT/x1cv2zOpgfzVt2eWSvOFsH8tB4xZpfxo+HlQGo/8k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvumJCRA9TVsSAnZWagAA3vIQAIMrCrthtYrSz+0mAiD6\ndvxtjnVJuQeCcFeiTqacFE44l0TDKfc1QPgYUyfpU2f/hjCAQ1wrRlLG0kuB\n6vixdOz9jpetp5ucCl6vqAjJb6Ub0p79YRWHnj2pSykh8aq4v2Ht6FvPQOZJ\n4pLVoa/zCVm4X4TSS/yFCj9TQX0nxnzUDAhi2BgQsUyF4qEHg5fG9bFo9hGa\na2JZlt3p2BqozUmuQejaa0kynbFP6uG1Oho5oWYHZWKrkbkQcG6Ko4YY0yHS\ne+lSk0j3NayrvHKBCz/OL4mwiRCU9N++4eerxbB1Jt0i9XqBm41EnXLqevQP\nKI/PqvdNE893F1lo+f6viNT0cv7oWyuvfkDj27NhvillO/iRX1FlcixKapNf\niYNEMjIj8eUDNNalqjm5Y5n95z4Z3TnhzkZCyYoGKoSnol1Fac7VUugPdqlu\nV3fXboTixZJNcjT8kcs5L6kybrGjQo+t1EV6slLCCJ5/OxCm49OFG/NIk+Jl\nj0EYg4QVVGXIti7PA4h6eA5NSHtxW0l9zulOgLj60iBilQw1qdBVTbrFyV6Q\nyQXH1WTrwb0qXMWenKeLd9D0+rqpP1vdVqVHLuxh4EW/Kng/u7ozGVQS6ZC+\nzHr1cfFxLVk2Cu65f9LA69y36SSvqdnZQtorPldUYXW66B3sHN/zPj64zAl3\nRj5M\r\n=F51U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"413efc083c1c6878e5ee868aff848fa668ab9186","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.27-renovate-internal-patch-413efc083c1c6878e5ee868aff848fa668ab9186_1623124361025_0.0705971687457847","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.27-renovate-major-external-major-d3faa881f70a05c0d0d127c8408fce3f21ef0107":{"name":"@balena/jellyfish-client-sdk","version":"4.4.27-renovate-major-external-major-d3faa881f70a05c0d0d127c8408fce3f21ef0107","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.27-renovate-major-external-major-d3faa881f70a05c0d0d127c8408fce3f21ef0107","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4952c20154d05dda98f5a0f1a0a1c6fd386ebf36","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.27-renovate-major-external-major-d3faa881f70a05c0d0d127c8408fce3f21ef0107.tgz","fileCount":39,"integrity":"sha512-THfC7XN/9hJ1df5joPB1ihM6xgNw8BqggUVs326OTvA8UfM38i3AaEWGZdbnu5IaPoW+vSz9uqjcOBH5gtgDHA==","signatures":[{"sig":"MEUCIQDkkcTb6S6h8PFOZjEMn1L8gn9HySguDKp4Wqnrb3SpRAIgMHl3DRxzKzAA1sfDr7OlBpsCmYsJyjzr98HrDut5RHQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvuqeCRA9TVsSAnZWagAAw3MP/3KiVwr+YsN+FoPEYkOF\nmHUrp5a3EU9SdIUNLDIexIOD3Yd0gbpc6il70ouHlRrJBa7+8PX/mL5u80th\n494beMyIwaNWT3k9zBcDWjdXiPOtk5xzbc30fPZRjHaHUu9VLnvD1rGYPDDo\n2ytW3VN1HRLgr2hvvq6xFruVnPpg4EVDMWtyeBMn2bsy+WAGW4754shpbT5/\nGBrBas0Nv1MeNTh4BJ7gUWtYS4QFCkbWIpXDasT894VUscECGiQT7RILPPLL\n71IY7WAujiDMR+UyUqsoVx4swSv0Zh8B+Pk/p8mhoRbnpSvFpOz7NoCu3sL4\nGE7bdYaDXL9axiuIWLSSDPCCmsT1yLPNdsQyomwVEy9+g/l0wGTwRfrHmTG1\nDgCfEy1SZTnY2Ow+o6ogiviWzQ9nkgK8SMn5A1TaUrSTvDxZclGRgmjhKyio\nyXDnROFBpeTj+f4wBPw4glL8CKWZ4F4fkEyrwe661weJPZZSSydPdvJ45cf/\ncQQWCv22FRAshw69vCRbNXJ+kFhMa9ZfI4bcjMRAEQW1cqrws06yIpGoPGz9\nwWVOtBCUlVP9I/7IxtzVLSANA1rbsmvDp5vN6TEkCFPpPdTf4jr3FI9Tnj2D\n0uHfIhWleYuouM3o/ZMjRcfy+kG4o4Ki7pLD8MfSqj99kuLz7FZKIs2RTLYq\n0f/X\r\n=g8ec\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d3faa881f70a05c0d0d127c8408fce3f21ef0107","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.27-renovate-major-external-major-d3faa881f70a05c0d0d127c8408fce3f21ef0107_1623124638809_0.5572212130256315","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.27":{"name":"@balena/jellyfish-client-sdk","version":"4.4.27","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.27","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1f3cb29802475088520010549492d62f0ec1f3cd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.27.tgz","fileCount":39,"integrity":"sha512-47cRtKVmWKkKevdg6tYp2ZkcHnDsnKq7SBGQk6Q7rtb4igZem9binF5LDWdIox0v96CjK2rlj/s9A8ssiiKuTQ==","signatures":[{"sig":"MEUCIQCuOKZkdvVGqB3l7anSFAnN7Yokql3A2H2Aulb8/TegIgIgRe1we5zyzEF0xmfhsxma9BaowaLzJ92HokIWUkFBRs4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvussCRA9TVsSAnZWagAAQHwP/j6Vs3gdSEHGLcY8NDMJ\n6XB5SfBCeXqZJHjFUz4gu+MdQRij28zuF5mBgLa9CCMmtwIVbAwFMZUfEEdL\nZ/x2WWzeZCoL4VC4sCgMiN6pFuqVRDww9i4yDj/nLADZrm/rwmc9oTWiDAJ3\n6IuPoXA1RRuA8tN0rm8aaNVFDE69CrsPzJFGdPtV4El0V9cqktpiYwprJi+e\nN7qWUs31uficVmH6VI0WQFJztnsvH5p2YT+CcKWfTJ6mRPwJDQGy0GK5sGC7\nZMpcVrgEpTLgiClVpRXgCPqH1/v9e50clhgKEXKhFC/3fbOOPMnOkKfreGOq\nKZ4naveZ2iO7rtEeibmATEtIh3o4CBQbKwt5AmtiBbxjTCdkb3ACVLeCT3Hw\nq/9cGvZnh6bR7DNDW/DpcCMUqGo9tBWlviGGOrp6/WZRMbEzuYbQIm4S0+fq\nUIFOnHhTc7/ATGepiueMkllVR4rK1ppAQSQ6I/vuuC41f5hvjUsugpyifcfG\n+OqxyqANbdgzgVDCAwMN9XniwsqHYlGwH17V/tSaRJq+Q41KpbeOJp9fWOFK\nXXoBkZ0bQ+aFX0H88Iydk8Gps+xzvdW1pMt1qwcEa689D9FkBYb3hyWz7eAu\ndDQPIv2DTQRS6a8WL6UEVe3pLjOm76QnCDUBlvYtr0etyJe9TB14j9CRs75z\nVTDA\r\n=BDqt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4ee592f9cce74bd5734cae445370abdc08c81c8a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.27_1623124780344_0.3963009157333284","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.28-renovate-major-external-major-eb3b49cd44305146b044eb8dbd48c3421debf916":{"name":"@balena/jellyfish-client-sdk","version":"4.4.28-renovate-major-external-major-eb3b49cd44305146b044eb8dbd48c3421debf916","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.28-renovate-major-external-major-eb3b49cd44305146b044eb8dbd48c3421debf916","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cfa10658b7b2827e64530b209b7e743cda97a497","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.28-renovate-major-external-major-eb3b49cd44305146b044eb8dbd48c3421debf916.tgz","fileCount":39,"integrity":"sha512-NpGd2xjd2IKDWKDlj59CmWwGmAbnGFR0hOIwdqMNAam3DKe3H1xGhVLtvjOsRj4x0MDZanmqyOijkVId82juVw==","signatures":[{"sig":"MEYCIQCTppvW9XmEdpG/XFVLpS4TwvbITEUypBbBB88GHWULQAIhAMWdtteEaTECR1L44/5fsj6wmd/6l0kxYPl9FeRX9dti","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvuw7CRA9TVsSAnZWagAAhFMQAIjXoFnncv8sMkC9swOo\n4x7No1T//ZfpUMnNznorV0stujJqlv1txbjRfXl3dXegiMNNxcYHUQn0e7Qe\nqjWaAW6i3TZRdWvg6gm09Lif95OF2YISMI7oTYDgsofFv82yCtqzLVx5bkFY\nXc1dlfb1PLpCcVh5jgU0dgyDChpJ1bGAxbL7GgTy8U3NjBH2OdQa6tkZKACu\nD/TXCWc8fbYEQyiECeeRALNkBKoYtxJ7eq8njzS92da/AqR5wyvc/QwMV/yY\nuOMtU76PnpnYgZf760jjE6XN9jO9/N2Ya/btUjMsfOXok/xO5DY7C1+7/LsG\n37bWVa7aJzRnXX5Fdr++JyjX5u89Xl2MVuUhAK9HRgdkixnc+MnqdR9K0JU3\nBYhO9PdDOm6ERscCHLJf4eCHseUTm5pvbxJIy737Lbp4fKUct8dbgt5LQMnO\n/fNOV+PebEBXi+Zm7PBd5NppNv9ID38EJqGQTHLz1sGd3d5Yv4n7eczbfx30\nmlpiWCchxQeU3M83BoCitWS9P+fMmBdTq5bhUNks+n+TEWyyuIWNjCAPD5D/\nMOzdvIaiJFZ7TEXk65YrPeijDEOcsefo1kxSt/Z20yxi1O0NRyNwgaUKZKva\nqHBexXP7Ak2U94qX20IIHQrv18XmPpNUEwbBcYzA2JZ5f/GGNjCwxDu1AfNU\nhMzH\r\n=cc27\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"eb3b49cd44305146b044eb8dbd48c3421debf916","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.28-renovate-major-external-major-eb3b49cd44305146b044eb8dbd48c3421debf916_1623125051381_0.03565387445085921","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0-globalMask-b2a5896a251fb76e0c74ae427979de5d430afe9c":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0-globalMask-b2a5896a251fb76e0c74ae427979de5d430afe9c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0-globalMask-b2a5896a251fb76e0c74ae427979de5d430afe9c","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b2a359a1e480a44eadb33c63f44d453b64ce1dde","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0-globalMask-b2a5896a251fb76e0c74ae427979de5d430afe9c.tgz","fileCount":39,"integrity":"sha512-H4TrSw7YuRkmdGzGw1NoQHSBWG2opWnXeV1fkobyXLuPyMSCYi6AlOLqcHq4Nxk490dRu8AyD1D/tYrLFRTCig==","signatures":[{"sig":"MEUCIEMrDNhUX7BWYmv8TXIrCcptOiN8juolWYSEcTJbiNgyAiEAvCCMkYQ3JTcM1Ip3V3Z6yUlHPI8N+CQQGW1tqWJOLdM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvu+JCRA9TVsSAnZWagAA6V4P+wV0H/Peyu3WQYTbG42o\nUtRrnWMsFmvhPgwTErlMxxJLxvaaJcceTa3M5wkRC8ufI80ptCSy+JFzAOMp\nblMKpJ8LvOTiYe8RRN7emvXN8AP0ArJh/+F5YnSCn6BbxRcgBbo9hCno7tvH\nt953/nfW4hpR8DAGX4jHMXhX/X095hNHE6ApcQHRtjj3mCiE/gCIAm531pqG\nr6NJWjVHh7dfuxPuKx4Pef3AI2ExQUZm7kveh3rt407J26z3g8xrnXQeyUuK\ngFJzAhWduwnvfOLfkmZcu0iYyc7P5M8yfgdwJ3minTOyUK7Kqy4EXD6upDz4\nHhIgnCQZiVEMGCALkeWrWk6wXMMREM4p6AYmk1d/RRxDwCp7vZ9xja0n60EH\nbtjg4/tIQRv9sJNMhEP7/7/zyAOoAxqHMpb/KHwQNf9q2fDPZTwFe4nC84zw\n4bxiiW4xYvFp1m3hSduvTdy1rWWZiu5VgKThAhQV9WmgHyTI0n6DEsOT/28x\niilrHjEK4xJbyfOSeewyJgGJRwni90YYxtv43i2fquZ3MTV/w4oWqQHJ1rRs\nNpy/gGI9caFoCE2xwRInB5lGjuoy+Gk16gWzHDqRFxc4z7TFW7rImCQtrqN9\nIvy7tE4kGX+oUMj/UuIjegbPwJk9SswLTjbJn1Zl/DfqBmYlVQfy55jmqM1L\nEQlv\r\n=yM1Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b2a5896a251fb76e0c74ae427979de5d430afe9c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0-globalMask-b2a5896a251fb76e0c74ae427979de5d430afe9c_1623125897055_0.583905666741114","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.28-renovate-internal-patch-7dffadb76f3ab61a75d6afcfd068ed5610691cfa":{"name":"@balena/jellyfish-client-sdk","version":"4.4.28-renovate-internal-patch-7dffadb76f3ab61a75d6afcfd068ed5610691cfa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.28-renovate-internal-patch-7dffadb76f3ab61a75d6afcfd068ed5610691cfa","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"224907cab51ce375d695ed0bbe9efffc2e321247","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.28-renovate-internal-patch-7dffadb76f3ab61a75d6afcfd068ed5610691cfa.tgz","fileCount":39,"integrity":"sha512-4laigkqmmnyTwDjFq90sozL/8keyyGbgUIQT4tH8lmXv9KHS9NMmEeoyGouj88CnWSfgeQRQUAs+NfNoGur6kg==","signatures":[{"sig":"MEUCIQCEIxBU8mSXHCxdfVU5nFbZ2lyE6YqvViQ9bw2Y23XxVwIgHGoenGGZ+r3e9iNJGE5K1TKXQ5mJAgx8XcO2xca8Ecc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvx02CRA9TVsSAnZWagAAB+IP/RtwpA7PzFURAQw+NjOi\nXGdV0dXmctjOZkfusi0I5T49tH2YzYTbUcedGKW8ov+eH7+vum689lLm6jt3\nnCg+7tYx2BEF66cLt3VUUGPy6a9sjpIREWElGgXBM9GPRJk7kTtZKS0nCZIQ\n06dQU6m0XEms3rxBEY7SE0YAEpPTu5Zv1LVySi1fbI6LnfctNCkGoNpNdLC8\nSpU9ubh4xvU35UTLc3BvXTHuqboKh8rOjFp35hgL2t2WT5jp0MKgBGBCuHkN\nKOrHf7vGVFTZDNwiLmGU7C4Hps9AB9AmvL71n9wVuwStEhwN1YdBG6B0LmzW\njfAP8yKUmuFHWqwOqJaYqEHy5CSl9mHMgJ2uRcMu3jJzMQlJVE4BRdVmbsIG\nZTrg3SCi6u5WwJ9jE+/C/PEx+RejbLDXF3JEffaXqHJ0teBbhsHx9Tz5j81m\n+GJniOe7qzAzGAM/rXy3vnpKlEw9PuLGa591tybx/O/C42Df5WqSkqPdvXnt\nEMtSdElNm6wzYULSNg88VbofAYlZVFrWxIJTE9IKtB5UJeDT2jm6QZw+Nzp5\n/um0TEyRrBlnBGCGclr5eiJKPNZHDwZfx6c5mCiGIq099NhZ5+OHZKkbLL/l\nhWiYN6gqxEesXKXc8AqRYzw7UII3Bi0A3/khNI0TqyhmAm/JPNrX/e7U0SRq\nRJ15\r\n=b3c6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7dffadb76f3ab61a75d6afcfd068ed5610691cfa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.28-renovate-internal-patch-7dffadb76f3ab61a75d6afcfd068ed5610691cfa_1623137590374_0.6794026064215883","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.28":{"name":"@balena/jellyfish-client-sdk","version":"4.4.28","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.28","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3a0794c84882e93b013faad7f68aa0e754588db6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.28.tgz","fileCount":39,"integrity":"sha512-UxMyxRhteOK+8lU6rxP8JFeFvx1DsHCmOGazZnfywdJ8l83xcq3FYAAfRYdccKWxXaTix1UaOZEc3NawG3wpIA==","signatures":[{"sig":"MEYCIQDrWHzO/F+FN/4TPH3miIdtEf28t49UccwP0rXmj9/IrgIhAK+lZsb49/X+fNtC2DWqM5uh85YiFuiWdmzh/NN7CNX3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvx5RCRA9TVsSAnZWagAATjQP/jxeP6PRnh0DUprLG9UK\nOhPhdxko8oUKfSp6O/uKMAxda1/NyWhnEUjhxU/V5gyQNmvMpmZgCcncNhIn\njYb7Rw44iqJQVaX9itsPDTb/SszseO7iThifEKtKbcB+rk8YT6QRe3BlkhML\n10/a6MNUrxaiDeqsnK+7MErlSEci7vzRG+pQEWgOt9pB825pkHFbvrCieQGt\nHHyUYjROcPQcaZy2uasA0EwGcggQ9LdDhsAZ66Rb2lf66jF4pExYESTkAaBq\nx0Y66q6ppxCX+RPaW6195toVsG4w9AvcFMu1bbKww5ln68axmAaucIt/LVdv\nvsUHeBu6okTqKILj7X3de7cGh/duwOR5uZimM9XGw8lryBoHP13+cQ9ltv7o\ndUxvGhD5I4z2mmUZWLPhUkOLIOPx1BIwJBRVRpUQhbjBMsbUEEuf2RZF5IEX\nKNZXP2bc3i7pRkKzXHmfzk3RLtjGcp/XevUNmK64yPbCh33rdneS16QluRsK\nGvx/RBPfyJLK/qJnj3Ht6iH5+79sJ7Z2gTNz8/IGvC5wGWu20bm0hQ60R7Qy\nqoUi+Drd7PGADxQTFLtgN73LJRMtrEAih/tfU3wuj5lNbeFJD9i07Ih1zEsg\nNMmTgAPmxjmg99szqkJvJLuCKMYR92NNIrNN+rFhBeGbJJUFTc85amXr4IFh\nVjE4\r\n=n2YJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fd296e14f78bfbe0f157a0f547f9946501710d3f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.28_1623137873616_0.2570687119114954","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.4.29-renovate-major-external-major-575602f7b0e64187029f580df68c2e11d242d236":{"name":"@balena/jellyfish-client-sdk","version":"4.4.29-renovate-major-external-major-575602f7b0e64187029f580df68c2e11d242d236","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.4.29-renovate-major-external-major-575602f7b0e64187029f580df68c2e11d242d236","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1fac5fadf6949078cac1239d98759ad791f96d12","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.4.29-renovate-major-external-major-575602f7b0e64187029f580df68c2e11d242d236.tgz","fileCount":39,"integrity":"sha512-JU2ct3gGxJBrjTY06qohy3/VTWZgTnCRuAAOwsh8lVfMPVLDT5DBMese+OQ7munSwDGWY+toRt7YmjIXliIymA==","signatures":[{"sig":"MEYCIQCTlCM9GyHYKBgVvhZ/+iPEmUjVe2DXqQFccltnWNzUfAIhAMp4rw0VBvGiDS81KHBZdIepaKDZmXM7gHYodvRzSXNR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvx8NCRA9TVsSAnZWagAAbocP/2+GnoO3DdSacxbQaoMF\n5V5oBsiCchCY9ZE4e3uMARG5f/OuQAl9uW0qU+lHtFGMUiu3DN9lSK6Jz6Lr\nmBD6hNovV/gJ/qdvxDlJ93g21DFqah86AFjrd2VXgocOUyhY6FGiuJf566De\noxka66c2ZPy2TST5dbre9z+zFp0Bk+HO0x663aWSD/zgfdjIr93bv9iM3LZw\njO0gYpub+t9W/iZZaQ/zlnEUMkOWL8l4hWAElGV/+DWtz1DyIdoPtTJGQ47G\n90ZSvtiNpCpCPPT035i39vES2ElQ/yzdkPLhyMN3BWPAF4KkWqBZ4iwhuGX3\n3OHUWzucIx2xyTvgtEEtfyfDRk6QqddiV8DxUY8rhFgPBXuFuUwQdfjTj/dB\nr5ZwawadIzHzKWmFuuZWYVFaSaR5mhisEJlYfiC7Aev9MJIiJw3YiTwAExTd\nhTTJrUnGVAm5sKC0tguXvgqNyL5ukggCksxLdQD41H996MKX9bh24bY6wYBy\nBXuvaCO6nnIfEcoxgupDnT0EXNR0zYJLqoXb6eqlJXjMqOBTYJRknkKXDwgI\nbiZy1H4UQxIOjvh+mjpD7sHia4IhHNTlEga5f9yj2KE5MvUYGbm3v/FfP4xz\nLssanUgyOo6fvV/prOYOSYHSwT82GATyw7jhRQ41tdESmDweDoG8T9l2Uk13\nlO7p\r\n=ltos\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"575602f7b0e64187029f580df68c2e11d242d236","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.4.29-renovate-major-external-major-575602f7b0e64187029f580df68c2e11d242d236_1623138061796_0.40626450376587897","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0-notify-b19e413c47993aba466a72bccbadd8e2c428c34b":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0-notify-b19e413c47993aba466a72bccbadd8e2c428c34b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0-notify-b19e413c47993aba466a72bccbadd8e2c428c34b","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"408df79d3d2a5a4a4c4ffc693ee6f1b74e7e30ce","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0-notify-b19e413c47993aba466a72bccbadd8e2c428c34b.tgz","fileCount":39,"integrity":"sha512-UkETujJVd0J5WGpbn9yWv8fequfID/yWKCp2wagw3UdfRiNX0UXYj2JMtpuBmZ28ZrwsNCuRWEP0Max5J6cHwQ==","signatures":[{"sig":"MEUCID+95KBhltJCnz1Fb0ALW0qnXzBWjmQJ/rFSb72XocujAiEAgxLVJtDAL8NbtNMPV+sGxgoBjzfg4S4sTtEx17buEsA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvzNgCRA9TVsSAnZWagAAKLQP/AohN9eZzRKZCWXjroe5\nwqlk3m/xEmmB/hIW/eaC6oicFds9WKIgU7LJFD+FWImvHbyECsQbSe3O/gxi\nCZ8ZdsATWrYbOI5PVz1ZfDyPoz7s3r0uNsqFrQ6apxiYiI9PKBgVxUOYXUcc\nDZl+o+GSCQOtTQNp+oAchE3snmRbvydyfxzrnYSOYqRWWuyWvWtQ34UoBYe+\n1VckS7BSVVqFkYFqxHlrBlQzGIZ58aeof8GR9+JDfxkQOaGXo24dGd/sGLAI\nZvDf4VTA6Wg+5DyPhN5hVwETYsLjEdvCl0FobgyfurXniTVnazy5MSSX4WM3\ntPd0uEDdoOlE88XuWuTC84XJBK9F4GSKVXH9Bck6G06fiMtOuADSRXtq0SHU\ntRC7TdprkBaOOlXHUsYMdCVLY4ropbaEV7SPk6gzpirbNfnwbYotIXVmqkL6\ng73P0Kep5s/4d0lfi+m8u9GWEJyFYVw/SPzhHZoaSPl7z7ySlQevXhlZ6Lvr\nK9UT6sTkvSY04JMiSd3iFGaNV5DElOIb4y1gP+TB/v40K9jdlsuC7veGBpPR\nqFugerj8kYXXqh48nn1Ip8CIZ12auulDaAFdNm8xPTW3jP0V0ijVsP6jLHBl\nr0AlK8NavtAw4vbZLT8CCr5AczKD2iC6INATxPk5tGpev+PE09OJ6wELlM+h\nybaE\r\n=FAKD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b19e413c47993aba466a72bccbadd8e2c428c34b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0-notify-b19e413c47993aba466a72bccbadd8e2c428c34b_1623143264098_0.4073244116260528","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0-globalMask-64ca96035d05bead47f15925021d93c626b34284":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0-globalMask-64ca96035d05bead47f15925021d93c626b34284","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0-globalMask-64ca96035d05bead47f15925021d93c626b34284","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5346f6c92ed7bfe4f190125b5810059a43d2175c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0-globalMask-64ca96035d05bead47f15925021d93c626b34284.tgz","fileCount":39,"integrity":"sha512-hou5shjqAFMpjj/wupwuIz8ihPWKdiljk+GrXABeMijmtSBBwm/ejIxypq1rbnpd6lunuwEca7w3pc7S0ZtWUQ==","signatures":[{"sig":"MEUCIQDfsWXzczlm192hCmdwwK9P06Fn6KlAZ3KGulC3CHDTUQIgdelsl66GGjolIdRgf1neY07m9K0Jyoor7/WAbMcpqB4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvzSpCRA9TVsSAnZWagAApH4P/R9K/fFjAafcJr1CJqEs\nRUx5zZ7QqBO56SlPiXNC5HYVagpJCy13+CArJmhCOw1YhVvk2esrypFQI6Y7\nqdf/XoYqlKqpzLHQuEvm4UUJiN7AZSCzQ2ouxMoEToloc48DGWzg+GOXmGiA\nmRbsuhsPWvZYai9m1RdweyovvzGXd6qyTx4Vtfna5fH3K1qd7AQKcvp8mNDh\n+eX7EYOv/s64rQ25oYh4GGstKnfN/hwF7ykOL2jNxPvhWzhUum4xGrlpt0DB\nybOPSu11Ebjp1eD3vlQqCfuiCx7KKA43iNxKmth1jvfUZWOAQaQXyFAoI0NR\n+Vurr2+TPGdDhPWvjANxeDMQi4VJtWbOkNSiNFb61aiYh0ZLLCGFMmZ33IEf\nkE1Ylr/FaiKj30+tSKufs66RtCoXtYJUd8V8fyOdFaeUrFFnIs06sMikpimS\nrWnywZlfIbsdwHCc8agM4bVM85Plj1aQMVzTplpul6Su4aXfTusrl/lVpNPJ\nipMdrv4cebVzmtmJIqPG6pZZACeUSjgrEy3uoGw5FyqUlvv8Iri0FAvltrdO\nkTgoTjAjUNmTDCsRoPaNStsqQxFajG2hhCrUhJWj7IuBAhhE0OpJfzncOSuV\n2KBWGQyteYxQ2n7FbkBPu4646x+gox4QOQ5ToOWbilodc7DTZuHfj52QaTLS\n1y4i\r\n=z0zd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"64ca96035d05bead47f15925021d93c626b34284","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0-globalMask-64ca96035d05bead47f15925021d93c626b34284_1623143593593_0.46761961354110504","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.0":{"name":"@balena/jellyfish-client-sdk","version":"4.5.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.0","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"076123d63161f6d1d27de6341648f0fb5a2069fc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.0.tgz","fileCount":39,"integrity":"sha512-lVmRKXNUs8OIMg30X4dwFjnun8AZ2nQqCoMbOsc9dYYFxlwPExtw5x4lL/jXETN79BIMYHt/yj/dlzEptzF96w==","signatures":[{"sig":"MEQCIDswM/3BUMLZMK8xfpN30BB+CctjnD9D7fzJ3SFXCLPcAiAdadEmZ6/04ulGQTHs1iMDMwYKXz0jYAeMT+Eov2T6FA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvzeNCRA9TVsSAnZWagAAttQP/3QkV7a8Qp8mFftKRI69\nvhjmGPKyIy2nwr5YJ+zt3WlHDAf08YhujYYuf0wB8eLJ8G7Smi56E59YPho1\nhKgAxfHxE16hKwc4OpykJ8RJCkdFe9HZkg0TqDJazyLvlFVwRURkFbFvIKkJ\n8x8PMmknNrlXHQBH+EDW7ZTmU2xjZvT8ZpU5+xRB71AKvsZhF8PWFtysXSqQ\nJzvZT2V4Y+TumGnX9LKBfBzB2O/TdpEabPWO0jJ6YN9CZzsk8DJKGYISweM8\no2hZTFle9rV6kLm7dnKW0SJCcLp0UhWPGq4UQzRVqm9M+Zae9RNgXZZx2Id6\ncV1/0Z3yP0a2QT+OWQ3duA1BYmmUyYA/gZa4H9IW91z7ekV49AA84dbob5CD\no2/8/jnNGIfoGdcJj5Jdoo+Mzt3bOgy1Lpem25RIk125pO2aFHHaa1PzVlhq\nrBstNisoV1m0ElZJEbW4360+fnyca+TDU2YFOH0zf4tyaowqhVLckJWmX1k6\nWoIo4fkq2PSz9R3zpvjTKSFhvKkSp6X6fCEloZdswWg8RNro80SMCEeaEhNx\nRBPTY+3oxXFiVmLjwy1ufCZNSWeS8eCuGDbxhnlst05dBckiQlyeHwVJex7W\n1WCt/A77DVM0UKaZ64hVMB9OIctjQ2/7uUkyaX7JAmwuNMcH9fbsAsHHW3mY\nwZl+\r\n=KZ4X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"137fb95d37b5cba961b9a0006b9af237d5ade4ad","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.0_1623144333270_0.7430556559916273","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.5.1-renovate-major-external-major-c7620d36e7468546feb22484095e3841995945b1":{"name":"@balena/jellyfish-client-sdk","version":"4.5.1-renovate-major-external-major-c7620d36e7468546feb22484095e3841995945b1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.5.1-renovate-major-external-major-c7620d36e7468546feb22484095e3841995945b1","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bcfd8286769b043bd1ba11518cb7ce132a6dff31","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.5.1-renovate-major-external-major-c7620d36e7468546feb22484095e3841995945b1.tgz","fileCount":39,"integrity":"sha512-vgrDmjiVSF0wlIqWOeRFnkHT4W+Q1CCu6ApARg/flsdRAx9ZiWWINrAgtQ07TAIJUV6ZQSaEsDPMhF9aN0nSdA==","signatures":[{"sig":"MEQCIHwz7bv3zxOKDtnNsJvtwaXQ7E5lgq0wEel3GEi6WnsRAiBiqfEoH4v+qvIaZfAWV5vL5SfsY+QHv88qCafUtjQjDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259049,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvzk9CRA9TVsSAnZWagAAvU0P/R+bTHsstUKMqWSUarIP\nd2MTuSBV44OX6iAOnMs3fcEx1qA5FuW/ztUuklO2CPsrCndG3QfdG/FGg1po\nevHWN7EoDLJ4MO6MW0EBORjcO/6Sx5lyo4shH6e/Hvmm7qZ2V3bPylrficD9\nCwyWTm5EAhy4iS7q13/8YC10X1rDmr7Y2wSmlHmKHU9qIeEbV70mRQ06XwQI\nhxLAXB+oeoO0Rj8qe/8LaAFEZycg/HR4ycAoz7Ocvlohzws+l1QArvvXzdYL\nxUz/m/c8+3WiZhkqxPMYvZgP7FiMD30zWpoyxkUW2ZZpOtqu8URmuNe2VYaM\nLzM18+XDHhFUyMAnGY3VWuFGkBzNORNLRSlbjVKGYFSczzyCsoQDA8htNGEv\nmFZBcrm/kyBND2ht4x7h66j7sNcDtHuGzgosr5s73XJVR6s0rM+3XwBaeSxZ\nzH2hN3/3irTba63cbt83aTvWoXa9Noq6p637YCTiLxYub85pB/B++yGJT+61\nI8OLDFJ3mnn5rYvNXWs4IC5v4Q/isgGny6sQBqcGKxLxydlgP1fnEU7+EdAN\njix1RGVW5iljSZBvqhgUJY38a4vTukbw4A7EeVWRuFSi9h6SkkBvx8pHiuhB\nZKD0ackS3KULpcNmBQC4h1dxlh8ZquYnXO/IyNFlO8V2Dhkv5nR0vi8fy3Kr\n9dIv\r\n=rvOO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c7620d36e7468546feb22484095e3841995945b1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.5.1-renovate-major-external-major-c7620d36e7468546feb22484095e3841995945b1_1623144765718_0.5151173190127507","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.6.0-notify-a1e48a4550ae33045a786e3194adcf6068d34629":{"name":"@balena/jellyfish-client-sdk","version":"4.6.0-notify-a1e48a4550ae33045a786e3194adcf6068d34629","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.6.0-notify-a1e48a4550ae33045a786e3194adcf6068d34629","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"821d6818a2c13243e16c7b9b366f780c372e7ec0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.6.0-notify-a1e48a4550ae33045a786e3194adcf6068d34629.tgz","fileCount":39,"integrity":"sha512-5ifhwQ4IqH6PPVOQNrWntxRJSxQokCyBwJ618Pu2Hp6aCbmbO1URkODZShmgiZge1ZEYa5gXgpohleH/ONFP3A==","signatures":[{"sig":"MEUCIDFNJHSBbDqCy5Vb6/GDBkIVH7om03QPOWdOCak/Jj9AAiEA4Qy/q4mhxErf9Ouwrn7bvrj4HOBOH7pPHNr41T0OU1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvz1NCRA9TVsSAnZWagAAz6IP/Rg6NZepWe/ypfkKv6UZ\nZE+I5Xrv9ZIjHAJNbU1ZJcNm9C9dNm/5szNItz/PVZBwjTxchYcf0pU4o+gP\nJkISKUWRAtJEJpN9+8bhvcYA61fFHALpJEqwWBUm4IgsRuOZ4C1cNu+lEYWj\nLpbY+O2NE2uB36+a7xcDDpBnv4lIEIuH/8dwhNgeosW8xFQUAsIO4N7tWKCq\nuVwsG3iROshNhZnd2goc5x53CMOxY8PfmsnQvVqfDgjMNBW+2xSLEGk6ADp3\nBfk8FlQsd9A4Q1GgFsxyz/XP1A7S8vUAVY0SCfyCz8NRBIN4J0aUnsZ9AbyE\n9y8PSkIilzOOwEyCDAc+C3xdvIaClmLfDVoSFcq/jV6CAJxXW0q7fsEXI+nk\nW4BWHbxPurUMeJM+T9ywG2ux9cfSnMqJsKv6xbiOlIfo63gtNObgP6C+LBgA\nVFTkg6UHDzxzj76HHbeBo924CHLmmPjUWFIIfZ52vy7Dhs143iEfckyaw4OY\n0ITnGPksO+9FIqHsN5jTlfPIISJIO1AytNGbzyq1feJRDVLBj/3RcaE5O/vP\nrvvskkXrbCxZTdXhH3U9g6peuQKluMagwi3dcFc6B2i5J3i/hFsCNpGUT5pz\nXY5k0Qmda5oauH6X2RvVp+9UMhr0gtNQDr9wX8NxOSBUSkJVT7twgAPOFRKI\nToQZ\r\n=vHRO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a1e48a4550ae33045a786e3194adcf6068d34629","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.6.0-notify-a1e48a4550ae33045a786e3194adcf6068d34629_1623145805019_0.44232999494654335","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.6.0":{"name":"@balena/jellyfish-client-sdk","version":"4.6.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.6.0","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"292d982378baf3a5d4d4976aeaa24f02bcfb3907","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.6.0.tgz","fileCount":39,"integrity":"sha512-9Ivqh2GLvfOiL+FlmZxIGELyBUguP5QWLeQh28z0zbFyuG2OI5h/7VLBP3z6ilBSIKUGeS+apyu4hAouXNy8uw==","signatures":[{"sig":"MEUCIQCRaoaAr4zO3XVIMNQHnOFBm9uO9JcWEz9DlefTCICFigIgX/0CV9wUBNcuyPn0kF+8haNbbmx4a7K8kKQM4/7Za3w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260667,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvz4jCRA9TVsSAnZWagAAmhwP/3Ou1sBYlPWu/JIm6G6j\nwl2DS1TwVjKLCXQzzg/vgbQ/XLUF/GKv9Ve0/j11/uCH8o3ibAqBMa+2yDCY\nZIIAWK3g+ZgCwkby3F4nFb5A/qcROEc+TUNoDpJMPXL+SEOxzf9Q2V1Knu+f\njcGMqqR0laW56RBzBHJP5B9GWt9l45XBT4LPg3+dAREiFTZCl9ZK0mbtOQF+\nVxRqiI/YL2IGuk61ohCkh1xAWvc2My4M6Vr91sz0ykd34cmE+dMPTlvLuiaj\nRTLNjI+RcQUTB4j9MPcyLKy8CKUp0blyH0MhdAXspmfjEAaNhwvGz6TL9+yA\nYYVQqV5J2GgkbqRXMVVj3pz9wDmKQywD+QRHwnx+LhITMgUNOp+5iARLqeD9\n4b64etOTJ1uerQy3M1PAWYzFK/4UA9iv8qDxysEw7RwYjEQT1EZdnC2gsUGM\nLuWCtC64Vw5Pw7Ize72SG+LP0Lj/Kdlu08K6PSQncJrUM4Qf8Fk3Vmto3GdX\nrwOKeldHNrWYLs2EQZQf8JOgXrl2kSrdGdI8c7Qf5SHZB/epSEqXNnYOqLey\n5VAO135vqsp4xLNBllEalR7BrVCHdm+WN6TlL0jH+o+L0h7QYDp0yE0uSVVn\nFmyM2lgPXioqbhAl/eJpS5kOCGpjAMJFw0TSs6fMXaixVw7rDW2ZUP3JGfHs\nOBZr\r\n=BkjW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"732a2d53669b10a82f582239c2fb3acf07f1faad","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.6.0_1623146019167_0.2883928273140295","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.6.1-renovate-major-external-major-fa23711c1a7edff35a7a78e8c494a9ca416c4206":{"name":"@balena/jellyfish-client-sdk","version":"4.6.1-renovate-major-external-major-fa23711c1a7edff35a7a78e8c494a9ca416c4206","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.6.1-renovate-major-external-major-fa23711c1a7edff35a7a78e8c494a9ca416c4206","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c57704467713f6ffd604b0e137de0d10b33321ce","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.6.1-renovate-major-external-major-fa23711c1a7edff35a7a78e8c494a9ca416c4206.tgz","fileCount":39,"integrity":"sha512-O3qyJYIZlTJVJVFbNMLmaEJRNVBW1O0lxUsKzCGltXS/4WHSC87v4rg5i9+Jj6IzQSnl0Zb6peM60HPzSxUMvw==","signatures":[{"sig":"MEUCIQCldBDX72UD8z5Zfo6npQ0xa1k/1lCUtCpFovjPfGaL4gIgBcHN+XyrkDSnNssma3Y9/mq5kW5pgqyysUascZw6OE8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvz+OCRA9TVsSAnZWagAAKqsP/RsGaHVOCtD4V56bPPlK\npaJRg4TZ5NEVIOecjneNuV7sK+SD/778VNhLCIkYtnhEoeQLn7iEdZtqoqf/\nJcVfdRN85TvvWEdnumC1ZGLzjQ60tC5r32BfXBxaPrQq9dau89yS3qzl5Qn7\nE4pBiWavDoRZ0VV05wthyhAvAuyK/ZH64lJtbDD+hLp6DHpKBFagmJ4wCRIa\nnf+NcXR12DUOa7+TT3xopPKFtXHSjZKxvdP/zcmv+kFlM4oQ5b6IICgag5Ec\nCdDUFqfrx99nupOn21/2EWu4niikJogVXK/MBwVJACzzJ/7es2IHVuebANOw\nyADb358cxtpGQuhABA5pKHolC1GqCTkwto6nNThk2uIoScPjbSsKnJ+5ytmJ\nVnzbClcT3fASU9m+oaJUBZ4R3TF+b9/GTl9jxe9Dyo+hZeZ6wWrHxc2PnqYa\nkdd2wduPmegAHHhyTmZ8L6K0p0AQvI/kEw8SqadpdNA2+vRFS6v2X6Y2eDQn\nFzInd/7n38SyHKUu3ZF35QfNVyxe+k4HWF/s74J9TGUGgHVd8u6L6JJkeVYP\nbIsUMJniP5vZA3L6so2pHZvTcWn13i8+aAYI8KfMzsLQN7GMu9tDhBgsMsAu\n5KhlumHuJbbDWG56GJIdrDcaK/xQo1XqKr2aJ5If8ZZgzJOhlmK0AjK1WO6e\nlU6k\r\n=0XJb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fa23711c1a7edff35a7a78e8c494a9ca416c4206","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.6.1-renovate-major-external-major-fa23711c1a7edff35a7a78e8c494a9ca416c4206_1623146382252_0.7103842168483587","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.7.0-fixup-link-constraints-fd95c4c9d53378bc233ca847075584f28652ae97":{"name":"@balena/jellyfish-client-sdk","version":"4.7.0-fixup-link-constraints-fd95c4c9d53378bc233ca847075584f28652ae97","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.7.0-fixup-link-constraints-fd95c4c9d53378bc233ca847075584f28652ae97","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"397973db19b563b389a3e344b897faa861796338","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.7.0-fixup-link-constraints-fd95c4c9d53378bc233ca847075584f28652ae97.tgz","fileCount":39,"integrity":"sha512-AavzL/ET30zmOqqrvK/6YmIwBAgiORCJTpi/utw3j/Dk7N2PLe5zZJ+ErCpUMxzuY444AJypoXxGsMFAELJPBg==","signatures":[{"sig":"MEYCIQCJ5ZUIXpneK4Qjkk0AtIcpQZVgSPAvGcsbGLaXfl/gawIhANgQhifQ7b34rMZMlD6ZobmolY6r6+hP0CA6q2xY+53Z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwKFSCRA9TVsSAnZWagAA7z0QAIyBhpqvQ3YPVjJUnDVt\nKLnKFsaMgWrxn7nyJ7tZhd/vfUc9X7U80LIOPHPUrr1D04MncNnFMVxQxsYR\nATn2SP+r1USjXuimVywF4Dy+N1TRXemGsgIme1R4gWUgrU+i10BIk/brgLsc\natMFUGu0ktPr5LRVrm95xL0jIeK9LIQqLe9gmj6kUGvxjjmbKlztJp9hV2Rx\nVVIcqtLfNdwaG3RLJIhdn+/MPu1G0bKkRgbVxze269xcss0BB2iP6AdV9d5L\nwIxdGQWoxquR5XaSZr4DTg9dPGaPUscqjxkGD5+/T4wq4i4OH9ytKRe7J1qK\najIbERGBz5yqIY9cKz3alfRihW/mOzioXA0YLx+SZxYYRqTUIgC9D2xJKVKn\njhOYYyLkL2+YY2U1X/ZeOFhA3XKjA4rjyJaGCleh8BBusCIcWVnpuV7Fydsy\nKG/hYT07yodS7rCDYrLuV/WPc5s6ourQqv6R4F7nDXdYCvCwWVL+Ykogb+8b\ndVtP4EDAfQd/elOLxqU1/57bs7dK4fUjN7Vmllwm7bdjy69Ukw/0bEAjPtGB\nWOY0Yw2McMWqXO3auXUK4InELQWSsserKaSDItkHilD8kmsBfM+owz1BjFUk\n5Y7xmhz1xFCKoW9DgLAJNoeeVtJq06tVFQ1AKBgkMD2hQzSrksGVG3spe7FJ\nFo5+\r\n=uku9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fd95c4c9d53378bc233ca847075584f28652ae97","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.7.0-fixup-link-constraints-fd95c4c9d53378bc233ca847075584f28652ae97_1623236946856_0.5597743929393868","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.7.0-fixup-link-constraints-7a27fe3ab8fb09eafba568cdca4a2ee4ab0f3df9":{"name":"@balena/jellyfish-client-sdk","version":"4.7.0-fixup-link-constraints-7a27fe3ab8fb09eafba568cdca4a2ee4ab0f3df9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.7.0-fixup-link-constraints-7a27fe3ab8fb09eafba568cdca4a2ee4ab0f3df9","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"38f8b7733077a02dc0d6679d0df21aadd9b2634d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.7.0-fixup-link-constraints-7a27fe3ab8fb09eafba568cdca4a2ee4ab0f3df9.tgz","fileCount":39,"integrity":"sha512-5/sOFIp052yAeEwYK8C5cOAobDJm6iudGwGri7ScjauqHMJVVmy5AdyPew7ReIQxGu8xlehTqNGRuEEItR4U1A==","signatures":[{"sig":"MEUCIEav3mGJ1EdCK/+2xR44nBw8q9WQdx6ree+gcM+slOsLAiEAvFgS4vYxH/30SZJy8o9aqi3/FRamuBZi9rilW0twEzk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwWstCRA9TVsSAnZWagAAR38P/0lQdFLFnj/3MdkZl93f\nRG/vopR3EiTPOv4iUusljLALf6zy/qXH1gP0xNaxyUgrpoC+SKb9pWXvKQlj\noRVE477Ort0Y+8Fblhnq4Eib9xQA2MHMdIL7ScfxoSZ5wFj9JQP96N6qYmiI\nD2EjtzxOFB78BeGb0SUadXf4VV0JcuRrLjkxjMLcmPHV05zjjWDaeVi7AcJv\nTI+up6K0pNevZcnLohoUBS9mB/CD2eeTP56ahJVe7xau11/N8bruIY/DdHRU\nR+UFgBsrKHaSgt3zWE2bGANtTcIta7qkYJ4BjIQzbJRUy4mhuka12m1x4gNj\n0stbN77vqY8FAayzzvApZMlc3Z4CK8shxA+ohc9/QJdqN8+cgDl/gYyIXERN\nhkn38JdfesWFRhqCyGdSdiYA5kGk5Ygb7/n7y7WJd6dmwFDrWGIjTBfsOIRe\nRBQbj5NH0AiqD/9DHWAiP+7SvoPWcS/H/NCelhGy1y1etMKhwyhTVtUt0C3R\nJqrcL0iIiECAkYFyxsN194ko/NUFaMWbHnLf+NbXmqmh1fFDx6vIMhMlVoiH\nhZbHZyjgK6xCc2yB/ryCePUsiyinvvA9fGeXulSRw3c3spt6RiKEq5gI8YuW\nZFUv1/I13CvMRq335O8FpLx/hyIK+8X7aLX6Ot1rqQXpcqfLmMAOgOOgCzTc\n25hz\r\n=kR3P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7a27fe3ab8fb09eafba568cdca4a2ee4ab0f3df9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.7.0-fixup-link-constraints-7a27fe3ab8fb09eafba568cdca4a2ee4ab0f3df9_1623288621272_0.07937622661726462","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.7.0":{"name":"@balena/jellyfish-client-sdk","version":"4.7.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.7.0","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ddbedf36fef52cbce816288a46a40b3e0f6d821f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.7.0.tgz","fileCount":39,"integrity":"sha512-To2cJeslOlcW9vsEOFdU+42MHUyYVqP6fTTK2+9ghgVWuqNUClZWfc63SYEYGgLLOcgk0xgj2xqiFHh9XL5rlQ==","signatures":[{"sig":"MEYCIQCtOeNnmgb+o4dcPA1JKpYEXPgeTe1p/FBGOe3k6vDUdgIhAPfRE68UWLBkXvrajIL1QOWEeLMDEJJWhZqtf08tDCfx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwZwTCRA9TVsSAnZWagAAHc0P/iUiDYzwqRyGNHfukH3+\nf4IJexHI0CMVqOmvywQzIwZN9o5M0dyu+96HDU4niTxiUnLQCvADDwZccagX\nJpZ4jDJVdz8x8zcbyjl5m8Ub6ML/2YLTZXH2ZFKsWnmhRODkdUn4VeMRVgCX\nuNW3MH4whJY/uvpLbOcH3ft8GsRKhExggD0G0U2Ei/ln9ocDFLGTJiZY5FLh\nii2+vN6S8qMVQK+T1KsnYhKkZ6pgmW/rT3r8T1ZiiF9lJsqSvi7gNlJq7X3i\n2G06i8vT2jpXZ/bBSLKxKH2K07Os+jE78URAxtCgO9P5aYxQoehG0BxG81IW\n2TtOgg65IwwujrUJE1JNlSuki35j22TP+z4SkikrtUKrsroc+ItBJoKtNtaa\nrAJ+nF6pRdH5MBRPP3l1UyyUGaNcWv0aDmHi+q3DnuLxlneLcB098lbIY68F\nEWk31mK0UlqEbZF6v4tXotA1rcfL3RZtKDzTRrX9G3XCx751r42pgzyYegr5\nodGSWLLxev39nGzXDxfSSIKRH9dSkT7C/ENJH5E+b843/cfCa0Kwad73Sf0K\nncA/y9yDJ61RC5WqAlbwysUWTjyk06vz3xoqPjVxllX0A507Xoj/Z77yhr23\ngpnOU9mdaXASRO26BLprl1kOfuEcv7efMX5vev0JmLnJ5PbM7f+mv9p3x7AD\nN4Eo\r\n=x4ph\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0413548f253681afc0eed32b27e347143786d0c9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.7.0_1623301138946_0.8742241859007007","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.7.1-renovate-major-external-major-2e6b78e0f063d110247ad5dadcac8bd06b6cb9df":{"name":"@balena/jellyfish-client-sdk","version":"4.7.1-renovate-major-external-major-2e6b78e0f063d110247ad5dadcac8bd06b6cb9df","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.7.1-renovate-major-external-major-2e6b78e0f063d110247ad5dadcac8bd06b6cb9df","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6c74ef583dd33eaca79d66ac0edfb882ee1bd9cb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.7.1-renovate-major-external-major-2e6b78e0f063d110247ad5dadcac8bd06b6cb9df.tgz","fileCount":39,"integrity":"sha512-PX/diKWYLoCmJOeP2WJsb/v5hicQgy9ppAnu2eQ2s9BM4g09ydIHrwKnXvyU4zL0Ow5ZeIBv9bl7UHwh2bfU6Q==","signatures":[{"sig":"MEQCIHyqh66y/nxwZ57oFfXE9zWU5pxlVV1kRouKOnIrnHfgAiBPT6p5dx/915InKH2blNW9X3lus44iu/XwyVf7ADprwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwZ2mCRA9TVsSAnZWagAAlNsP/2T5ANp0P32PV8bGW/zO\nzpsS0vwbvbJ/GqtnqQdy5rC3e8qG+aqFWVrgZClQMdmv2kXa6aCLwfx3ulh0\n6H1ejdhscjvH1RTy3HHn67X72hVBJIi92qIx6LAmgdMtHxbpl4RSktJWHFLG\ntCnLD0fBwCm1/YAhAkM+YP9pA3ToBAIycZqNNsabcvwoeA17tMb4bx1oUKUh\nVakXshL78iz+YeZyHPyi8otn8VCjcUUNYhfFjtnWZW0Om/Nm8//WtnjKCzf8\n+FSYwno7dUgOWhZBR5KoniDepxKDQYlDwwW6hGQZNt//SibVBYQvYywvhwJO\nXIRLpfAt2+RuRqivRCbo8rDi3OlWHqPd47+DhlxON8ct8TZL3cOR2kLS+hV0\nzM78btajCrZS+Q8PW5cDqZTnNJubL9XFya3m+JrW/ptGejBY5uBpzHvAd5tF\n2Bd4u5gec6IEAATcyR2zXQpxoTvd7blEeUv0N0pLDs4HoEdgB1O4UZFp+yR/\n2Ci2XdDk9msMaeVz1IrQMwIJXg4aNVnM/EYIMVIcRRfomIKKJ8VpNsD4Veqb\njUaQgMjfJgXr1OXHWpBcdcVCSfczzec6hfVOVXghVl6+vBikGDXi777MZwyg\npqFfVhYNcHOrjyVFUTO2Q476zZj5UoTDADL1e64QCjiKBcU7kNmqppMDcTDr\nXXCB\r\n=erdu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2e6b78e0f063d110247ad5dadcac8bd06b6cb9df","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.7.1-renovate-major-external-major-2e6b78e0f063d110247ad5dadcac8bd06b6cb9df_1623301542057_0.7454516848019319","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.7.1-repo-sync-jellyfish-config-default-91bbd25627b796ae4a079b96113ef74fabc9bf2a":{"name":"@balena/jellyfish-client-sdk","version":"4.7.1-repo-sync-jellyfish-config-default-91bbd25627b796ae4a079b96113ef74fabc9bf2a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.7.1-repo-sync-jellyfish-config-default-91bbd25627b796ae4a079b96113ef74fabc9bf2a","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"88264c846a2b1173bf35d99801a8cb6880b6af86","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.7.1-repo-sync-jellyfish-config-default-91bbd25627b796ae4a079b96113ef74fabc9bf2a.tgz","fileCount":39,"integrity":"sha512-KsBLkluvl+h2nzjMxGOmM+3kvrDcCYaakVY/uEmUzXTlIRgR/JpNgjvNpyqxcaLoESWnsajNvoPjYfovZoWujg==","signatures":[{"sig":"MEQCIB2lxRf3ni0F74g9c19ZkK/7uJROtqqE0YnWME6WE3viAiAYs/nNeHEUoARygM0RwKuww1dW65zZ49vaEhIJL858qQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwu8ZCRA9TVsSAnZWagAAiY8P/R3s/DcHFd4xe2Dv9zrw\ngVaKKHLvgH5dxHwM7mm0xdgAaiA59ZN2IQ8gcUTjM11OYr2efKJrCg9Dq5BB\nmZ2awwwRNcX4MLoU0j+4MY7nuqsSfa2HN0aZnaxm6nGPkgHCPsehnVeLwHN2\n2CPe9O9KWnYlkqRKOMgDLznIxYBPNC6K+zkICvoA98hZn/CtOHuFWBFe8yEg\nI5gd1ILnHJwfaw+KekTAQEOnlqdcDSOfbW4vSJ5xueC9nHREMxVak7XQ9ZWY\niTONjNJi6mbVC1Z9tBjRtbkzJQueDioxK2QEjF8QPQZlPoFq9USMDPjb1oLF\nrTcDnPgYQy8SaZxjZXDBQXWSG9rWZ0ATFpMdasBqRHlLHG1BEld3SjpECeWK\nemtmNlFm4xY9VPeZT7DVI5YObEo34ZqSWL9W/rPfQk9h8SOVjzp4wUNscAYw\nIchbR1cFFoNmYe+M7BZIIWb69laxp3VFcnD3zWXRDDvzbgwxpnVL2CI/2mdj\nJIMH1MxMB8bFipnuh/ki3xTADrJyCivyZMv/qAsWzkXDOhnD8L9j99czc2VV\nTs4elzYYi7xBmL03lxmLNIeOCNYncCOKgs5Ba9V4CAEWYprHlO6u22HykRIW\nqRf3sG0ZVej5qL02UuhZEdmLGc/ZkML/+2tVo9zPI32UtN4lZjlVh07uxcA2\n4dqM\r\n=zCJQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"91bbd25627b796ae4a079b96113ef74fabc9bf2a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.7.1-repo-sync-jellyfish-config-default-91bbd25627b796ae4a079b96113ef74fabc9bf2a_1623387929278_0.5164973326307514","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.7.1-renovate-internal-patch-e85e31f4e87af0f7eb86e29dfb6d69c19c0fb2fc":{"name":"@balena/jellyfish-client-sdk","version":"4.7.1-renovate-internal-patch-e85e31f4e87af0f7eb86e29dfb6d69c19c0fb2fc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.7.1-renovate-internal-patch-e85e31f4e87af0f7eb86e29dfb6d69c19c0fb2fc","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f24b62f6bc77a54677197914f5bd2c11ab9791b3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.7.1-renovate-internal-patch-e85e31f4e87af0f7eb86e29dfb6d69c19c0fb2fc.tgz","fileCount":39,"integrity":"sha512-2g1ZooQom/Et8xo+mCX1O7se97QuaFe8UydPtaxqcNeelgnIn11AVanYRbneHYkCWuvlvHHFyq2PCeqE7RYSgg==","signatures":[{"sig":"MEUCIQDEwQ1TSrJVPp7NncHdeDibO1JeCa2TlWiVsZZ/ukmItAIgYeYkqEskLbqge+ITnqtTvOBTRXcfzBltU8RLrVbWLBY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwxNtCRA9TVsSAnZWagAAAqIP/3VTg08mB/JDajOBR+OX\ne1ViuIX6SRsmt4rY6Huwgq1a0PYpC3kTGnbR20kHsoXkW0NfpzA2mU5/Z4O3\ngdV4wK+PFhNXwZpf5jWo5IHpkdUDfyOd4/6G+Rv6xFd9Xgq1JlstU9/B75du\nLz1eqWew0HLWCWaIH8NhZ441Yrzvm2yZMIlmO337zO0W2yLGhwYUHZ+Zkv8R\nIUEEUxXyOyTp+w0ymd/fqg03e7kunpLGc/e3+eUdaA6qiBv+BxKlZ/JcFteI\n/dssCMtLQRPIycTqTyrwxsnnPREHYh64NahmDoHvzGRxW0SUsa65U5u9yRTX\nEIxmxhzvkBH0Bp+oLsGSvSuCrvX6J9vY72C8yY7vwraLoQg6UlCIKGQ7lkrJ\nULKtArjwCll4IVPSmHbUgXG0kqRw5rRMFOIT38jyMsh0W9b0Zv238l1D++q6\nHlfh50nJtn7x8718ZpuJaZ4b43kF2rimQSk9hhjnrcp3WIa5lRrzdH+g0eYV\n92QzdoHAdLpRJOQA7+la36VkXdkNy2L6ncalDO/94IkthgGEZsEfh9bp8m9/\neRt69EtKFFHkeTWnN2zvb3JWotT1heM87EjHhFjE79cD7qVYFuzWOvV0vWGV\n+n2scq9vR1BX2PPpYw6d/mG0JaPqzkULcihaUMBSV5ISkBVFY0ABtB5/Xx4K\n9/k3\r\n=0DwN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e85e31f4e87af0f7eb86e29dfb6d69c19c0fb2fc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.7.1-renovate-internal-patch-e85e31f4e87af0f7eb86e29dfb6d69c19c0fb2fc_1623397228847_0.5401609796756006","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.7.1":{"name":"@balena/jellyfish-client-sdk","version":"4.7.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.7.1","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"50d963bb23abdd893be14d00a32617ad6c76d214","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.7.1.tgz","fileCount":39,"integrity":"sha512-KY6bTihbma9OuoowosDMN08as2+zIpm1iHX2Hk8Dn2wrLPT2I20mJLaDTP0oC8qUYFHMP4GvYuRBfe0eHt7TmA==","signatures":[{"sig":"MEQCIBHUHJ/kK5x4UATGo3NflNhG5i9kpzsrdJfpBYXEBE8AAiA9gQ4rbGc/ccvFmoAwwI/HsrJfwv5ZwvF9qmf5SdDCnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwxRDCRA9TVsSAnZWagAAPj0QAJZ+Cu5U0ohpO8fgRy5S\n3u0kVkBZYnRDCVqumMyZED4V9Dbs8SAzcFBMk8ruLxZXlX4Uj8lKiApjcVT3\nddrxV4g5gn4PWwmas9YO2geAwgy2b/jvaEkhld2wqQKHuuRDGhx1wYKDifj0\nqgnU6KfEjWJMIa4HEFyas6jugmNiNru1ZMhGgE2ptwrElqQOlwNDnH7Ppdn8\nyHuqx561hGy6HFsd+ktEd7lSv17syRYHVXmupbdVi7cmxn1H/JyfOodUOHFN\nTdHMIwxC3qxtm3vU90EDWfIvu62WeIzLM+kZmDLwceal6NpVd9dWAQdch0mm\n1TQ9/VF3LckrgWYNf6eCt/buLciygSfd29POoEBsedOSv25eKSgYwnD17Pm+\nKbPhkaedsVmbeoJQa1JbZ/tWLHgSCAmR7ZJuIaywz1aTkUzUHAtWRYIRd2Uc\nJs34I7THDjHx6Vc4ZNsCmufLCx7SeJ3CApt0rnjmsuHfTXtrYVtaw7is7fkV\nIxACqTa3udiIrtzp4xUjsSpDKc7w1QpaVKe6yYrZXzH7x1xBs3ZLlxcCmPSl\nwAxuElBykrDkdLoM5iHpjEFlploEg3W7dyHHEqOUsNEmpy8W3Dp/2d3sdBGv\n+3hKCrB6SiKUH3TvmxQpICj8LgVkB7e95I39D2qN0SKtAQd2J6zh8BThxhkG\nHFK8\r\n=k3EY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"309e9dd5b208cc5915cf553f42ac15bfe3e4e432","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.7.1_1623397443009_0.6457767051659289","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"4.7.2-renovate-major-external-major-cf89b7d5680b6efa4ff72d008fc1b00d4ee006b7":{"name":"@balena/jellyfish-client-sdk","version":"4.7.2-renovate-major-external-major-cf89b7d5680b6efa4ff72d008fc1b00d4ee006b7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@4.7.2-renovate-major-external-major-cf89b7d5680b6efa4ff72d008fc1b00d4ee006b7","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"88c3bffb6799d73d7ddb4c3357578eba69ddade9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-4.7.2-renovate-major-external-major-cf89b7d5680b6efa4ff72d008fc1b00d4ee006b7.tgz","fileCount":39,"integrity":"sha512-Yo28hGriMtY0cizfJPyqTxw1WWG975Dw3v4fijVCeEaHkK/hEV/Iu/EJR1yTVThMSiYFBXNGyl+KXTKlD6n1MA==","signatures":[{"sig":"MEQCICvQFWA+0iI6Yf5dC5Jx9JhHnwN6KuD4zYfgPemUXtS8AiB52x9XmnPW0b9FAuDCumc1atmf/joAVErOC4oR6XencQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwxW3CRA9TVsSAnZWagAA7ScP/2++FDg9ffO55WOYHA74\nqy3LQ8Uu8fmM7lRv0sHVyGo6C2ANe1skaKr4coBJ0fmbuELGFKjk2sdk9HcY\n2TFxHEIRhuiB9X+yk5/lNK9QXfsHTD12oZVk7O+/qa37TYOoU4EIk1MtWnyI\nZm7tJ3lW2IFphDLHAmopYz/3A0xAf2a5P6kSfZPwlbn3/9rnU48bYGgImVk5\nGKCqLfa/5SXMow72/znu1pI2v0m8MeNsfcxgN1wMJPv4TJ+CxKLxfoNURMG5\ny9uK+B5ewJ66RfTwT35RkFbV28zcFY7eF8RGPX5D67bZc/ktu/RyJAmnJCcb\nREVERzLxjpafdIrBaNXzHrjHE5zGpq7sYK/cBcGRnM9QOslr0NyD88V5Hr+z\nh/N8IUWyBfifN0hYkIpi5iI3d0PCQqeuxT7g55DxwrbjDVCuiY37p0SgK2a/\n/QCQRC4HnslBYkuAxnma2aLMXGkpXON8vyoa0nquB8mGP++rgCE/y5ZFPVVV\nNwwK5+pEJDA7A8rErkEEeGnFyC0tj3jU75y34ERuqbXhfQ6USiSbzW1/VlA6\nmJzYOjlG7g+wuZLpAIZyt6b3Orcs7FignV0L8f+wFmZ95psQI0bY0gVDwC0K\n/r4fAxFrCtxvcQ5N70BfO1eUgu9Zh73064pEryG+mJqkg5X2xQ/CDtJErNPD\nbAr2\r\n=7vT0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cf89b7d5680b6efa4ff72d008fc1b00d4ee006b7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_4.7.2-renovate-major-external-major-cf89b7d5680b6efa4ff72d008fc1b00d4ee006b7_1623397814918_0.7302375813526194","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.0-rename-product-improvement-5236a74fcf1df77f69dbe578ca69fb4e4d858cd6":{"name":"@balena/jellyfish-client-sdk","version":"5.0.0-rename-product-improvement-5236a74fcf1df77f69dbe578ca69fb4e4d858cd6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.0-rename-product-improvement-5236a74fcf1df77f69dbe578ca69fb4e4d858cd6","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b4f9ad9f22b519e5f13b7e2f4cf293caa42aed87","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.0-rename-product-improvement-5236a74fcf1df77f69dbe578ca69fb4e4d858cd6.tgz","fileCount":39,"integrity":"sha512-gp9Ys0Jc4M1DZ/oclgWsACgW+3ooLD44Ff5XoiKf890W7Zqd5BgpMVQS96DsTmZGEdd3CTdbQTkhdgpbeofpBQ==","signatures":[{"sig":"MEUCIFOB7y9mOo+mc3CKu8Tc79PEjO0JeUx3Arb8ZQ5Wd05RAiEAhVVYCbaw5GyGP7E9k8dAdARSyaorpshcY6vtuSMvfW0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxBWvCRA9TVsSAnZWagAAk/YP/jjAtPDBrqP3X6tPNbwP\nG61YJRCK2DBoq5kBK4vOltMPyE/mBjtc279nmGy1YNKpMhSQnjsTVz+xVTev\nKtSMsGcMBsb34vV0EoLAggIyCq8NHIwrqJHoIxuON0TNFaLAXcvwTy2i16yG\njJvA51YkkIvu+WOzPw27yr+Jm4p49QFBqCYVL0+xDIbNtA87wNrsk+MFvRVP\n1uV7jPNAtElmDdKEtchwcAFVjxWXgnmNmLXl5y5Phw5nUjpKEOyE+9qQfxA0\nBO+UV6fh5F4PMG42CJXfxSTupbfiYwGX4DVnuTz7rZs7NWO8Ab+IK07Jmu/a\nwsHZFyHTLUrBRtEQo5ebWPDDUfKz9VjEeQJynoQdqtnr9cEE/9Aq4IYAxxtj\nzpQWyg/ROyoVjuGTNcXmqmWdTmk9p5SKu7txRItXuqeENpD84SZYh58DwUgr\nqGia0V8Yq92B4k8+JfsQFNF3JZ4X82iTRV6kyNuVhul+yxY2JAQG62d//MXE\n8MqQt+oBkH441PH3982iktvs9H2qGBvvZcolIqugIAL0B5gTV04weY9C6i4w\nktoRJiAcoBH/XLvpbHgQfCD9XpjluRPOcIAA23Fy2mtCVzk0ZLPeYR7HTgJt\nXepKm2wzU/LEjE5RVfNhBqAsZIWsKLIlYv1b9lnCWheJqBQLITUeD0zhuZgN\nOar8\r\n=Rigq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5236a74fcf1df77f69dbe578ca69fb4e4d858cd6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.0-rename-product-improvement-5236a74fcf1df77f69dbe578ca69fb4e4d858cd6_1623463342914_0.7962922986752696","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.0":{"name":"@balena/jellyfish-client-sdk","version":"5.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.0","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6b625f6adef9a4ed4888e55878b4106540895b6c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.0.tgz","fileCount":39,"integrity":"sha512-Jhz9HYEKz4KehnBeEk/7zIzIQJielbb7BKbyPNSBJfZIKTdvclPbKD70oHvb72HnKHrmivIVr24+HnOHYvT3yA==","signatures":[{"sig":"MEUCIQDsF/LrKJW2k83dep158yjDM+VeP+MtwFRCl2JJFezRwwIgRqeQYngcSroPrEcaLQSlvGIwdyzodNVuQz7zTZRBoq8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxBd/CRA9TVsSAnZWagAAB2YQAJeqN79imNXjnzUqAbk/\n3E99um/6oGlNPO6+hZZ8H/W/kx6wjGo4YaIRV4DsXH+YO2yRIMZN+xzqV/DH\n6aAxH0dUTZruHBrwB0D5MSR88NSpT9Y/K/9Ab6k4jQ5lTjhZHZP3F1/ABzct\nVytTe4vU44WwMR3NbxXTuLmTbi4SedxiEnWcmmLZJUnjIqfWo4zAdkS/k6OV\ngzTSunRK+v6zmYgRb2gCYTUSpxO1y+iM+M5L0XXmaEctaE3NjvCkLSm5hMb4\ndgFxqvF7+6I+BWHKRBKRLOnM+rdf130dRFr6Av5LO3EuHk7HEjK1se+vxoNB\ndPaKIDZjItB9GfsPsJKuQOE72QJmJA3AgbvDoRYRWwU1muwmURkYdDKJURS9\ny8hXTPi5tqpkHFjna/DKouzGm15oTiXwTriMzgUbcRsn8ef3KLGcjPOH7o06\nOhCGdWm43cOq0YzRvTHQl78bqCgBjEjekT5riC8eBkkNTql9Ez/ikzgI3zqo\niFJJ4fLDnIoB7Bf41HZGIPS82B2IHqcjoGpNERuVn8rKPDx+fi5u09yQwH3i\nLS1EBNfaJZ+EF1nwbVipJnklU5moaG9m0jBfL13gkc1CpaYnbhinXRjjZ+Zu\nXtNXib1AfOulpHozVyDA4fUQU3u/+7AjYB59x1a2zAoR3+23jfddBld8fPxv\njkMH\r\n=Rbw4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"675d95ba9cba857588db67b53bbaab628b87b536","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.0_1623463806979_0.5859339383618005","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.1-renovate-major-external-major-5cb14da028fa6b6a03279298c5f74ff036ecd71f":{"name":"@balena/jellyfish-client-sdk","version":"5.0.1-renovate-major-external-major-5cb14da028fa6b6a03279298c5f74ff036ecd71f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.1-renovate-major-external-major-5cb14da028fa6b6a03279298c5f74ff036ecd71f","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2f6f1a2437700aa4233a606b4373ff659a5cecfb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.1-renovate-major-external-major-5cb14da028fa6b6a03279298c5f74ff036ecd71f.tgz","fileCount":39,"integrity":"sha512-xPWROC6F9304U2mRd5yC+bzNmrgs9/LEpxJCfj1hZ4IEUtur8LLxBipWaVE3RtneTSL3AV41d0iHC0hFaypyxA==","signatures":[{"sig":"MEQCID51h8+74IgQWHqfMgmShja0jlCkR9oNd2mOY1Do5Go5AiBCgfXAceP/vMXl1UCAtTygDr+IY/vVS9U9MEvOEQB4Lw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxBkICRA9TVsSAnZWagAA0S4QAJT5E776/MXQYYIIR+vP\nBtap4aN9GuqfWLxJYO40oyVDQeK4VxBsBCL6jbcyVUshtkCcTNA3a7GNw3Fy\naHodnCTzw0ywEkSjOOvWDwQLbIyj/BOPomlvmFZ7mOOLBtw5MAW/vMUK+dOR\niqUWdYDl05bVUr/wBK0bzD4soIH5fSSjMF4E16Q/ah8odd7IZt56ybZRA2tG\nKx+EnxHUKA2F5P0w5OaA0MAtyKiRF63NvQ9MzvMt4Knoym6odnxyD84Emu7D\nTkkM6TQAXnnBPAOY9DZ+4Wz472cX98jZJrdZlVA+SoQbsdGbuGC7d6U70TFL\niP0JGLxm9SjqPwC3gx6P1cmv48miDoAmq+7lCkZiyY0KSOA8Rm8978odLN8Y\nwtt2524kFghajiuDGoTtK14rNJgb/aMFj6PbrTrHwBTZGIuF86xqC7MiSi8Y\nfXs9wPnPNX02b3dHu0C6Wx2OfWUU+FN3nvimXyPMu8tT2B5IP7WCD970qrR+\n4ayYXe561Gk0NE2OI4Qrbm41ZCO43i6F1YNNAFhHlSCvBPm1gZMIShaS5gPt\nQ6CI5H8VZxBemKHd5Dc3MLHN7bDVNCJIxuJwGcX9mF5Evfg1KaHJzEshVefE\nPz0F1xizbe2rKM479P52N/cN3RgifMQAElD+aKwYhBOUzYeSO/k4X195VBqA\n+NZJ\r\n=nxjR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5cb14da028fa6b6a03279298c5f74ff036ecd71f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.7","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.1-renovate-major-external-major-5cb14da028fa6b6a03279298c5f74ff036ecd71f_1623464200660_0.3565465346989043","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.1-renovate-internal-patch-e92ed8c85d5d89b4eda71daff3ca68c27b5e366f":{"name":"@balena/jellyfish-client-sdk","version":"5.0.1-renovate-internal-patch-e92ed8c85d5d89b4eda71daff3ca68c27b5e366f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.1-renovate-internal-patch-e92ed8c85d5d89b4eda71daff3ca68c27b5e366f","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"552bd2477d512f7bbbc5f6b3497cd93c380b711a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.1-renovate-internal-patch-e92ed8c85d5d89b4eda71daff3ca68c27b5e366f.tgz","fileCount":39,"integrity":"sha512-ymqzVFScU9FhFTFA+ljD8GnUOc9CroRDaElp/Jw6AvhfcFCvW4W5Cz39JixWFaDZ+e89LtIWQEHvkWB2qK44yg==","signatures":[{"sig":"MEQCIDL1Eek0/q0jYHcXcIp+kQL8WxPM4YlG/jbcBT31D7k4AiAtO3n8oksg+X86wbhyp/jLtBC4148bQMcBleokzUN1Vw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxC5zCRA9TVsSAnZWagAAd1cP/iG9QPI36bxIh2yodP2a\n58Sk1dtGjOvkHe6hI2N/oDPqZtgLXYx7r1Ie7snHz32qAJtq31sjfvr5emuu\nycVJL8zHYHbhDLPR1bl1BPkl6IHquaSWCvNFHvBSilfUBhxxRfOP+3d69EHy\n/jB6lRhh/2lL3spjjgo0ZlOyma6nP5OwQGQ7aEeXds/HxdS6j7zkHv5FHojX\nYoZjqzDNBMAwePek5k+q4VWajhfczpxsIupZgcZG+/yFWJawzZRmxot2mOU9\nBBd37gDovcGVmVO4lJLYS89dflB42jaWEhViC8ptFzbLMBwmvN518YILCw56\nCMn26HcC1vHj4OIiLN/HSVzzhHa6Gpl7AIAV0fkL1OjeBuhn33UxKM3tNoA0\nqbcyKmMyjTrIF7BZ1XyInYOqo761GVjb0u0CXJjFiiwBMQiPlfAsM12Iksdp\nPcYx1OZEkwQWcRhLKSnQqUTOOb9zk63v+EvWVW71I+GCl2jk82UHv29r8LSV\n2NTUOHHrbS0G4Op/rTv7/hP0AmRMQywyGmEahaNFXEtFZA0KuFwR0rOixEOq\nmgWnRXWLsoqI6qWUvWXSdz2Q1KBfqjUlTVWhzTF+oxIODO2J284/W4/DPmGm\nTRFaUrzjLZjrz5jhvbwMRESKEBPBXQVPGKuWyuvSHDhO01Ttge18Yxc9UIKM\nicHo\r\n=Gzfo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e92ed8c85d5d89b4eda71daff3ca68c27b5e366f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.8","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.1-renovate-internal-patch-e92ed8c85d5d89b4eda71daff3ca68c27b5e366f_1623469683055_0.320615683793519","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.1":{"name":"@balena/jellyfish-client-sdk","version":"5.0.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.1","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f281cda2e0eff7ec0e9030e81096865d98a2cfc2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.1.tgz","fileCount":39,"integrity":"sha512-5OtTkaBx9q4VVVSsX2AjSjnhQuHA8XCvhr6oci0HMCqZfFt0GX459SDrombGJmKdaYu5mSSR7PGfqdrNVILglg==","signatures":[{"sig":"MEYCIQCAynYZp7L8SQ4YbAF2souuQKWV6OnrbJL7UtXlcS9ESgIhAJ8+jNFsVpOk+5Md4LaD/4EdzAywAo7K+jsJPvRb//9w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxC9VCRA9TVsSAnZWagAAizkP/2j6fw42iXYyp463apQR\n7cy3bdYwC1dUIf4kGWV1pTNYs9vKIDRNrkXMOm4j0kktmpVVrJKpgsx5rwWT\nI5sX9DtkvVavYdftSEa5arpzt/j/LvR3Aan2VkaxSU2trqo7N8CctvzT1RAJ\nN6eGpMVrZRAVRol0vUQf1skhsNQHrv/f6aVwsRnkjXv9zgrbp6hIHMkjAaFT\nzveCmVTIQ1Ks+rTkLxgiLOz0HeIuX7duZQhjyYGl2EaLa6ZGrHrrbZq59XOp\njnEkQl1j39ZcLWio2liPhCjHWdTyVA4DXq6cuI0jUxjix4dAZkS3b9JHPE7K\nsxMNSn588brBED/+yFtNktJTbY3J96m7RPbHoRg3porSJUN++odgOEtk8hR1\nfdhqCngc2HDw7ldu3l30h/wVzEXcAI3qlgvpint2VEz9iPXyTocIi+4ING7K\nUY74L6NDzu8iIvxxhbcOdjhgDtk8JprJi/jiYBsgabypN4FIrytwTOJBWYfz\nzd96vg/xsokOS74M5pNeauUoSFvw0DRRSAxSOK/wCO3h0gkP5zpv8osqFNak\nkoiVkV0754T1peKqIZqppiAwwBCuAohnmOaNpriaViSFzefGXNZZn5q0WdC/\nlJTIF77HQmv587Hn/smHX9E2oi6HcAOhHoUcLomuU3mbzHewT2izf0daRHWl\nqEss\r\n=tQaM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0df49a05a4c6577e03da046f138cf7fc3f8ec151","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.8","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.1_1623469909601_0.41674983686778067","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.2-renovate-major-external-major-439053f160aa80f2afad2a54c5f82a56a07b9ffd":{"name":"@balena/jellyfish-client-sdk","version":"5.0.2-renovate-major-external-major-439053f160aa80f2afad2a54c5f82a56a07b9ffd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.2-renovate-major-external-major-439053f160aa80f2afad2a54c5f82a56a07b9ffd","maintainers":[{"name":"nucleardreamer","email":"nucleardreamer@gmail.com"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"17083c78e2ed141193210609d573af95c4b16e2b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.2-renovate-major-external-major-439053f160aa80f2afad2a54c5f82a56a07b9ffd.tgz","fileCount":39,"integrity":"sha512-lh48MfB8ctpDZUPDbkdWu8ETJtrqjN3vvZBMP9si2Jul4sKWILOxQPN1dB2j2wsTK33feUsZl7DUBgIQudJ41Q==","signatures":[{"sig":"MEYCIQCB+t+mZ6k6xrrIT7oTyTuftKbpnlJcTOU6IF6ky4K4QAIhAJQXeHiA8Fax4UxAlEfRynveYPFNmGdW3BaWX0DoR+Ev","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgxDAhCRA9TVsSAnZWagAABlIP/1usKDNH/UDQ/VR1Gf0w\ndOah5RmCmunji+Ws4eyIcGBAc+2F9I9PK7OXV3PWFJExDI7l3K9yzNQQ/JeD\nXrBJpVMKf5iiEgGrmMdk1Rvl/BgcYlgprM8HkwYjj8tS86XQ7TQG9tmTHl66\n7LFXB8o64J5MQz10Fy+6RifmXbq+J6P+e71z5PLWtBb9BQBwh/HrYiLVSDPx\n3+CIxUOLQGc1dPFuw1kYTWBDwgg2qrwKlmMZZVDWDxsMZtHW1gK2SXGwY+zz\nc1wIu9OjDhsYnuBnGLowpMLM44WpV9OtyEIK6Hm1MWm45Gd2gJq+Bj+kyoVZ\nREptky6iQgtn+e9affd9tA4+2Wkn45/EItmAE41pax5t1qgXaJeBXdmzBdpJ\nGFYT2LtogKMucmQH1mVM1CmiWKS5pHRmWxN0y81nZ0wK8Qsa3iPNOe3WqkbM\nT+9rHWqX+Pm1mZx0izv8I7Z38L1sJMFPri0kQCXQFwV9yi0j7s9zQfvZ51Xy\n5V9xfFQx1WkKAqB4T69zEXR66fEwFslgVKZi8+FoNg3+wD6Vq8yxxEOZvXs+\nEY/2cOGInjGYLn8DdShSOhGyIbOvKBp+quBv/1yH08rC48ZElD8idLtN7q11\n2OgB0Yjj91rFcgGPCnpl4IQLDpp6T/cAqP37SD5G0wzA9sbbT1IenvHuSEwk\nYqjK\r\n=fSKf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"439053f160aa80f2afad2a54c5f82a56a07b9ffd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.8","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.2-renovate-major-external-major-439053f160aa80f2afad2a54c5f82a56a07b9ffd_1623470112970_0.8599561172587507","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.2-repo-sync-jellyfish-config-default-62f294a1b5ab2d77bc1bc2ccbc30033eea85bcff":{"name":"@balena/jellyfish-client-sdk","version":"5.0.2-repo-sync-jellyfish-config-default-62f294a1b5ab2d77bc1bc2ccbc30033eea85bcff","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.2-repo-sync-jellyfish-config-default-62f294a1b5ab2d77bc1bc2ccbc30033eea85bcff","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"13b11af1de1cc20cca28f55083ec3e21901d879e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.2-repo-sync-jellyfish-config-default-62f294a1b5ab2d77bc1bc2ccbc30033eea85bcff.tgz","fileCount":39,"integrity":"sha512-H7/miWZTV2R6nPMFfdj4cRztI2Ul5i7ggRykxNeV2IwKrYMTMVgcnXybcI0AG6lOokfM7CgvgIiChrcJqJTtoA==","signatures":[{"sig":"MEQCIEr+claQx2oqQfJ2uOdVrLri4lHXAuRCUHREJE+0KMGQAiBAUXqIIUkSz/24WxOih2AQA+FsCcbtwtUvU2LgLH6XDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyAMDCRA9TVsSAnZWagAAUowP/2L9m7yvYihq8ST5gzM6\nqu11CugL7OLX7N4xIMj/puaHBfmBnQuhfmKnuYFGZ/vJ0w+fZkyuBcp1X3gW\nS7CcCbeUJj/G5bVXNh3s1vfhbk28PXbLmRt1POvvk8FLUzqEBorzeNhs7ZvV\nO+28gez4iJU6Ob5Pcqf5NpRJRWGNuFwYEgzg5/tOhhkDmZmqec+ElbX737bL\nhhMO8+V2MuQbVh/Pug/S3Dzj2T4VOpjEQilvEFzwASRuQLD/a8YF0HsT/Aka\nIkTscj4fSZa8UKfnA2B3Lr/rxZ9ww3y3tL/EH4ZquAeGFN/92637dVMEQXRZ\nh/9h/UdsTsEnYhAA2b16t4ORnxl/uFYsM1/19+XMTLpHtC5TYv1QHkwvUGWO\nt1ccrG2HmnNQN9/oNbSp2EbyFZfWFyDtQ72NtYQBiBUuDO9h/G0zYGuDwJbr\nSo7uqBUFWDSN0Vo/6q+G0f5ny5B76YcxzOEeyENTwWIrCZ9aoqSSJVIi+7zp\n7UhK2AYtTcpN1UBGCTuOEgo6WyURywFO7by3/pKBgNB0O90K2dp8HlMFMSDg\nHpWPoPzkqlAr0a01WWK+TVclarjCIhkm4NF+K28bngvCmOKPs2uaMeNJ3s0u\naHd4BSTGDGHS8ReOZly3ZDSMfOHJ8EHrY0+h/aBssjLiR//73qkdrpV9evJf\njNxh\r\n=hKr3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"62f294a1b5ab2d77bc1bc2ccbc30033eea85bcff","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.8","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.2-repo-sync-jellyfish-config-default-62f294a1b5ab2d77bc1bc2ccbc30033eea85bcff_1623720707637_0.13966746958523601","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.2-renovate-internal-patch-f935db24a77cbcbf7126e14e6b4d042e3770c304":{"name":"@balena/jellyfish-client-sdk","version":"5.0.2-renovate-internal-patch-f935db24a77cbcbf7126e14e6b4d042e3770c304","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.2-renovate-internal-patch-f935db24a77cbcbf7126e14e6b4d042e3770c304","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c5ba80759a5b244651ba2d187902ff1184544adb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.2-renovate-internal-patch-f935db24a77cbcbf7126e14e6b4d042e3770c304.tgz","fileCount":39,"integrity":"sha512-Qrk58TSdrO1nM2aXJ/S8lYq16T6Quw5NSvOzOq61hLp3lW9fgavgUvQ1JyLC+Y9k3BF1iMhgq7xpxdWIaJnauQ==","signatures":[{"sig":"MEUCIAgOKp49yVqxrqCAtnmNkM6zgKY8wE4SIYIYtnIa3up3AiEA6T9Z5xAR6RCxv0daqkSpuOgSamlIBmphKegkGKArGYE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyBLrCRA9TVsSAnZWagAAwIUP/RpR3F4p3PpVc54RTPdZ\naWiCXD97eWVnc6s1P5ReKQegnOQ8XHHZX0GVfjG1M1WmcNfdlVqrwVzIP3Y+\ncH9qPybSd7FlmRYeP1QmAwC/YM0NJ8Ja9JHkOX2eatCxP61WH5/bnoXXMUPp\ns2Dg4kLdKM2uLbWRgtytbNFjjPk0YSbv3yilZO35IbjXgsxIzOuTvXSgsLo7\npnC/bWE9ugvOTYXOhfvjMDHb/irC+STZ0UPgiG1WYXD+xFy6ooD6muhfkrbf\noxgxk+Yk2hjp6VFThbA7/y243bZ/XS77Fn1St56XYBiESLA4k66OV0fl0xt/\nmUsZjRGZiJkTYJJYxv3Mnc4PlHfXZsSjQVN/bxU8OkSlgqypJmW7D8NllPkq\nDm6zjDqkRe4D5A63fLC64NuEEWcm4ar1ykuMcV6jAnGnujWVCYnPKH/9Pu0u\nacppSKkWRVFghPCPeWvnZaPDlBvZdf4kYFc8xyjcaZMZHuzlt3jJkbyHXJFP\n3V/GSqn+2r2PzYSKxdY5mrD0G48EQ/3HR8r6sHzQyBNjlcVOmtkMR6SERPIf\nVsJLMrKwNrYpZ1zwjAmzYdk/B1xFhwqHq5YSFuIx/IoMrrd8D01ZgtsdBDSJ\n93/vWEQhiN3WllH5ej8xtpWH04NoPLGDHqBZiUvDd4aWJJ+TdyilE3cQ8vTX\nhjzI\r\n=1w5+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f935db24a77cbcbf7126e14e6b4d042e3770c304","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.2-renovate-internal-patch-f935db24a77cbcbf7126e14e6b4d042e3770c304_1623724778864_0.6329244085177688","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.2":{"name":"@balena/jellyfish-client-sdk","version":"5.0.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ff5e03ca23ff78a1c9687b76b209af4c6d24bae6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.2.tgz","fileCount":39,"integrity":"sha512-5KRRQsZpWAIPymtOmiu5JLBzvIe6J1Ppbnfkv/5YkdkKTMk2ecMBEPlFuw2ZJEanJ981tAecu/4JT1hdWKxZxg==","signatures":[{"sig":"MEQCICE5J0RJg4Gmkq/gbmxUg/NYJ6WMEWwZeDV0gQtYGm76AiBMuo17FSiBC1ggQiAw4nPbsu7SSgyD4ElGjZtgZBn2Mw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyBPaCRA9TVsSAnZWagAA2gYQAJUo3wpnbskAUtxnD1s9\n9adUaEkz6xtB7dDYIXSogLQVZQWPe9GhoRXIz6552KJrBf4QfHYlUrgNbkvM\nWqJkNue0Ow4a93D7JDEZF97NtoFpKmykW4AvO6FxHoPS3Bf5QpTPkxYiSvMO\nUW8tMsjrSStOZx531nQwrsCKWce+7rPIfwDGZZblypodD1zvoTZXBrj9SO77\n9/rsZta9VeGyaO6Sy3GllAoQ8JY1Y0bjwgeBh7xlyYjarcJDx6R3B8sOnFW0\n987aS0pgRrBqc8TQtu8D94CCbWsiNLWT2akxWxYuOy1wBzchDpv2kMLY9feb\n9KjYDw0JEvnUmvrUi35S8hPp/vSM9k4LStVHrcfMArH8Fv27KYM9ROg3+XF3\nzopzE/x9LVBjjGrxyXT2Udp+SL21I3TvxpWPb5yOVhoszTMXRP3Ekj6y4HPx\n6alGl6W77kHJjb+ji4z4rPhPJGhJFZ7kr74K66jGF4xT4Va5/PrmWAjG2V5o\na4CO+QWSVbsqLNcYSmmESeD6kHe0UMIYd8u55l3aVQEeSIoX4qlKxfAtO2il\nbA1irwtCmTtKu6gnWZ5KEcepbVOo4Y7wfmgniYkx6xQ+uZeW5mvfKdF1HiN6\nlYV+H/PzYrgTKFM4Nej+jGloDVbGd/GY7xUyodQIBBhz/gf6g2ZJVY5NdSPM\nU04A\r\n=iKvG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7167e196f6b80f7375e5d098555b09b35ecf84d7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.2_1623725018391_0.9301284664267877","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.3-renovate-major-external-major-7f97ac12897ba5f3d6c565d08506881c8eaf2e22":{"name":"@balena/jellyfish-client-sdk","version":"5.0.3-renovate-major-external-major-7f97ac12897ba5f3d6c565d08506881c8eaf2e22","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.3-renovate-major-external-major-7f97ac12897ba5f3d6c565d08506881c8eaf2e22","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2860c1147ca4f501417d3c607fc6ad2fe72829d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.3-renovate-major-external-major-7f97ac12897ba5f3d6c565d08506881c8eaf2e22.tgz","fileCount":39,"integrity":"sha512-KPPdnbrpECn8o7yFt9KCIqDjSZi9S+uMtiuDgh93826mfG4Yc58c/oLLxJxxqHlw9iMWCcQLNPqqyd36Yh4WCw==","signatures":[{"sig":"MEQCIE5JfGsDdBBKVqUQAYmPRhH2UUJ/CCz303XipLMtlcJoAiBIM+amDuKQ7TPTtRW0FXt+QKwOKa7rHHAZjiGe0lkmZw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyBT1CRA9TVsSAnZWagAA6aYP/1N6Agw5eTDrD4ttayBu\n8mpT4m9o4Eqnx+23vIfTJZnJeWz4ZlwKueHH/uXQkYNd9MysK/bUFxnp6OLh\nxYWc9bc6rrGLKoOKtCNQoyJRdXsF1vvHHM+kD4UbeQaR6rGhAyRBhTLwLfSS\nzD/4ZB6/x/7Ybstuy9gt8JFlLNxb80C+cdN6WzkseWROfQrbQqxz6cu8s3PQ\ngh8TeFOu74SIdG3GUXz8MGHg8MddQJL5d/aR6ldxfm+oAW8Ifd++HDbhjIbx\nAq3jlmcyR9PjlzB0hQUfBN5YjoFlHCknFh+i5/OHRMKkJ/l7Rz7ihLhBpBek\nwIHEWgqceEFjyarlQMpYQghDISlL70gUQo7e0qA/XxN8uAml/BpmM8+pq1ca\nWYUdP1C/E6WBZEwbht4z4EONBCBJ5wk+mLplMv3bfPmPnuNpq7hMvv8SWu91\njEOzKQ+D0iFSgMtDOushCG5mj7oeobO2a9YPmQbGqETy6McFKwSwVLY0exrn\n6WIQ/VQjKb7YTs9d5nmo0kHxfDT3gBl5itBqsFE9OB2TBRmdK1EyVKeWcbYD\nrN20tu8u6WgS61YXBh1lNc1Kn9Nzio8/Bk67db3n8uUHetQyrY1ksW/6acpB\nFkjAYQjWLbDdulorwt+eitQbtJedyJrXCZ25sCT+FMUA93QpRhaP+oyAtXRF\nLzNJ\r\n=stmH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7f97ac12897ba5f3d6c565d08506881c8eaf2e22","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.3-renovate-major-external-major-7f97ac12897ba5f3d6c565d08506881c8eaf2e22_1623725301052_0.8594262629612706","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.3-repo-sync-jellyfish-config-default-fd634d817afdf4790314ac88dce4067f0363fc15":{"name":"@balena/jellyfish-client-sdk","version":"5.0.3-repo-sync-jellyfish-config-default-fd634d817afdf4790314ac88dce4067f0363fc15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.3-repo-sync-jellyfish-config-default-fd634d817afdf4790314ac88dce4067f0363fc15","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"159ff11749c8a9eebb7e2bc51cb240b54c3a815a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.3-repo-sync-jellyfish-config-default-fd634d817afdf4790314ac88dce4067f0363fc15.tgz","fileCount":39,"integrity":"sha512-kDMwl5laYjAJ760ypvx02sqEsUkr83DZMTkyTCRKyrVmfVmdgIQFAEGJd1qbZPbCiuEFa4s4K1LgX8pJoDE73Q==","signatures":[{"sig":"MEUCIEqDRasw/ZtQmQKBYh/HrspBe0X+/qPRoJWqvZNfUiKmAiEA8fG4ou4xHfWNDW6e2unlFQlqNe9guNGfcKpKoI4tfGo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyB22CRA9TVsSAnZWagAAoEcQAIIzsbnynrdvGVbdA32e\neGb+Q3JWpeLS9xo378iWb8wzLqNdmcB4o1gcBkEGtHxWr6zBrOTb7NoGDCLE\ndg3CwkjjYTwiapjHmS5qJg52xdrmX08YK77vulQwwhkxInNTPSRMUQXX6T6E\nkj7ZDm4hobkIdRrMDy7e2N/j6y6IAOWyButicGZUhqGOx6Q6P5RRtR5G2hgW\nRtIozfNhUwdblGKvUzNJ5SbdO8cbHud9VpA8UkOXB20OJ8Z1s3R2Pomh1q2e\n/8YNUDHSRZyjO3TLLmUpLO3SAvWrLXJ8SSoCxlsE1nc2kfBpz6/DVnDuwXFn\nEDzvr8Z17F2ymV91SiqPN5Fd1Y+f164U6M2sgrGyE3E6OhKTReQeHE11C4Sz\no9jww920vhjwfBnOmnDIS/XmjsZFmN7C5vjKpzCFqnB6WEFdFe7qu9hV2NQl\nMUcnzwFtWAYJ7pe9+yPzb4mE/BsrrUwtUNYoVmOVNOpkbqyUhy0clYWnmeYT\nCg8wvdTG2JE8VHNiEeoYI87/txGaGHyMthMplN2wh7k5WFe737qegEgR9t+V\nsAEcvG/Hp0gcxUlu/C+VYKV4LJPreokWwneP9sjxF1YnEdqUee4CntNHXiGn\nI8+pN/AdXPTI5cvVBn+QRBisZaoc+8VUevDBqu6rEmhekYl5obwyKv2k622+\nizG2\r\n=9cf3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fd634d817afdf4790314ac88dce4067f0363fc15","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.3-repo-sync-jellyfish-config-default-fd634d817afdf4790314ac88dce4067f0363fc15_1623727542470_0.7836249108036859","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.3":{"name":"@balena/jellyfish-client-sdk","version":"5.0.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3cbda34b9ff09eb548a4e524362ce51043d31174","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.3.tgz","fileCount":39,"integrity":"sha512-WSRH20HIxcd7tNQi1hut3T5p4S7wspKt0POx5p4HzuXjG88Xz7Fs+wNs85X2hrg0LIO6PKX4ohyyqPSfZRKJMw==","signatures":[{"sig":"MEQCIGMxdQZvRRXHVB7g4n451JFD1xxa57T/NfmjVFPTe9zxAiBVHsVKhjwdYx7C4teMP7uKQpguMln74kyTT3a6H9llWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyB8mCRA9TVsSAnZWagAAbpwP+gJtH+WJUoNea+3Qjn12\nqR7GUMx9kk4tORYb/amCt6tGG+Hl6kiMwo3gzGm4LgUKKz2Z85vuW3hFzPIm\nNBkyPqO4hAo/gzKZG8b5s1LuIFgUWCDnEMJe1wZpbrhvvBDefccdgzvIeTWk\nSUKrqn//2RznJT/V+sxb65bCR2dclirZ0XaQb0FB/4DEflxSWmUt6CPK5SR5\n/oOfE8bkxeCwVKdx+7OPi/OEnwCV7RCUtbsauoxfqiAtbQMq00bZb28l+l9a\n6WF3Nw//m+ta2qgHkw7TuRvzFg+8Z4vScBc8Zd+/aXCBt7BwfG5mgQF6TyRC\n3tUOAn7oH/BeB6YsDDrm9VtVDkLB1ae99wFxCHBjAk6BmKibANbucBECIahY\nFBAQTz2SdYWrVmbyzK4gwMQHfH7/BUF0ClKjxJc0EuA/9i/drZ36RArmn4aN\n5QhDzhG+H5Zt+HdRJK0rmwEhsaCxQbFznpNhoThsb7U67vEqRV7Np8SpSekP\nkdq8AhrE9TWKFzu0DhMhkghAvVVSLmW+uR4DDFa3d200KzJOa6LsHTSzLT8/\njwrPojnq3QUkT/ZlUnYSkau5rqwNTWThBZU5vFQYhbLfGbLjJh8+tzih5mBa\nk9w8mO10OsGMq6VNFJ7J8rgz8kHJz+mQTgutK4DM7YZdmoAwpYVd7qUg1FZd\n6MAt\r\n=HA+z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4eaf6601b90a9ff9f9caaf93e358e37b2fb0bb55","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.3_1623727910051_0.9023558302303438","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.4-renovate-major-external-major-b2990da63d1559d8464e269e3215338a902a9d04":{"name":"@balena/jellyfish-client-sdk","version":"5.0.4-renovate-major-external-major-b2990da63d1559d8464e269e3215338a902a9d04","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.4-renovate-major-external-major-b2990da63d1559d8464e269e3215338a902a9d04","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bcebdd5310288c015f5b9a1b8f0be334416d00a2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.4-renovate-major-external-major-b2990da63d1559d8464e269e3215338a902a9d04.tgz","fileCount":39,"integrity":"sha512-8TQ31Q1UZhejfvJur9z1Ddrs0JLNkAuXtzqfSvjf1ksnB4Lp1AboLIpAqjA808Bg491T4we/kUtv2URPU6MKkA==","signatures":[{"sig":"MEUCIQCbi0UEX+wQnKuRPDoH3t963ax9ByuRXrurQcenCPs/pQIgFDxauY0i4L4T/POyDZfY2GQQ+mdVk6pfTWhqqWOtgN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyCCTCRA9TVsSAnZWagAAXk4P/3atYxEt/F7FA60Fqdpl\njnn6djlErroMKZxV0Q7Kky/8BLr9K65EMebjY+Wg/u75NYfawD3r6ZRU136e\nlQRUs+pBZlhgvt3e/eSQlsTUviMqnufOsdJ5Qbvf2cuIXAQQnJW/hs8G0ubn\nCNUpEwfWrZF4s5Fu67HKpn0zRz/2kaitZp+75ohZUHGLfLZET8hNM88Gcjrw\nNHJNVQ2AzmmSEl7sDP1c4A3GTaM2z13MedmF//oRrEbf0OzDVvlYaCNyYpEi\nsldITsh3QT2/2bthmLtlC18FbQ/os3A1Ziv2bvgmDB1j/9Hr1+zz3sn7VzaQ\nJJk0hNA8q5z3JoIe1S58OL18IgOVYcmZBB3xVQubzkgUXYwL9KC9GoKv9wgq\n0R50EWYvZ99LhZ/o6YP+d4BtEQH7DmFTmp3O7bGM+VCblgcGCvZEF2fSU8zJ\nKZjxcSI//Gtc+D83JymH7DXxXeDnbPkzGfwtmRjihjdnxj4IrPopDYe2PJpM\nTz/jTD01696kiPG7JVnNJlwXcWamS+te/3iEqd00bglE+zG2B1VRAftvkRwi\nQAFACkekjhdGamPcAm1d0B5ieEYUx2GtZe+d+UQ7q4Ge11iuNOG5ocQkP18b\nuuxKx+zXmq8TgqmvgKez/C7WIzMwN3+kAffwMU9IQZPV6qOX13uZlPBpZeJv\nDZvw\r\n=VsRD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b2990da63d1559d8464e269e3215338a902a9d04","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.9","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.4-renovate-major-external-major-b2990da63d1559d8464e269e3215338a902a9d04_1623728275741_0.9736263465952657","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.4-renovate-internal-patch-78eaff1e960690a157f4e0ca696ba5857c8c9128":{"name":"@balena/jellyfish-client-sdk","version":"5.0.4-renovate-internal-patch-78eaff1e960690a157f4e0ca696ba5857c8c9128","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.4-renovate-internal-patch-78eaff1e960690a157f4e0ca696ba5857c8c9128","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4275eb7a13ab2be0e82653e7fa79295733831c6c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.4-renovate-internal-patch-78eaff1e960690a157f4e0ca696ba5857c8c9128.tgz","fileCount":39,"integrity":"sha512-cv/i8ug7FZuI91gk7HJbS/oDyT5nPwuk+v1/lMawO6qx9d7PVPj5hWATRWYFGX2acWG3tMyEZZ/Z5Js46pw0Dw==","signatures":[{"sig":"MEQCIH1K09gvCt+vWETD0Lvz9tXNe8aiPTbVF3zk/7szTKB6AiBa+o+6Ef+XLJ2jtTMhX+701vXExIytyi8SuOc4v0I7lQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzVreCRA9TVsSAnZWagAAU3wP/1++ZlDD7NspVt4H4SsC\nw9jhXVPWNvi6PuOVz0bHi/glL9b3JQjM58J0C41acsDewAQ5Q0xXmoA1fiyR\nbXfM10b7R+/OsZoxPbzOnGCharqbwc66+V+FEVNztZYrA3F39y0vYX0f/n8a\n0RI+d7RpSjEmsLlu9TF4uUj8wsz/dFJx/k6EXDOvG9K19M5bAp54+JzCT2+t\ngNL/HZbFpkR3Y735dUc/i8/u9Nqefnjy8jRB0DOqHZi+7jS6dgnorhpice4e\niTYqechT5yIIsvIOUCOgwd7/doayMLV2mfjmNxPaUNQVG5KIeaxtuN4TNQIg\nsRQD9cEOYePu7Gmr99IVhEpZuBlSyq2CIlTyro7DcuYHus4+94WPes57G3um\nX/mFXwpqZHsoFX6gBNFkzYRsXxO4rnOSZGRS5HCjqLyzLPy2GcaBrrrn7kl0\nUs2nTJXcOgZeGueuhZ8vAmvJ/wihaItLYb+z77HtQGzyttd9zGiVMi2txuAF\nzdHXXdFG9QkOJB57OxX4bARdmAi5IX+yvX08XlEqLDuUTNeScfgl7MkCzW6V\n3YfAFsFNyQO31yf6ZP7Yr3Mcj6KYvyGGhFy219twI1+IXY31oGX9z5bhjRnC\nFDukUPPicdFCU9rufGKz8cvteqjxIHG52lBMQPRZv3ZYSE++lNt5VcPbuWPj\nIwwV\r\n=Laa8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"78eaff1e960690a157f4e0ca696ba5857c8c9128","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.4-renovate-internal-patch-78eaff1e960690a157f4e0ca696ba5857c8c9128_1624070877474_0.02651569212533178","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.4":{"name":"@balena/jellyfish-client-sdk","version":"5.0.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"79539d9eb0d99a39da92d292d1c272f671d0b199","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.4.tgz","fileCount":39,"integrity":"sha512-2RrEi5jNu4P5KE89t54jXkHNqNoiUINnEMneqqQMOjUTwKuodAIQvZx/KUfzivOGwZ/G9bEjjPKkOpZJVK8Dig==","signatures":[{"sig":"MEUCIQC9NNONExxSZHfWkxDAf88KFm90AzyH2RtwL0ErSznoSAIgAvZ5xxMf+ZAsbWw8i0i2n6AXcabU6TSiQDSM5lqOBlE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzVuqCRA9TVsSAnZWagAAsncP/A+AHV7BaPYmUtnwXYOP\nf5LmwI+/DzVZZ2mpG31mqWR2Dh+gcfqByUWKK4v741iz6L+Qn+kdS1Dk8Gru\nfEtH6637g10+s0wDID2vXMNRs+iL4mUt1sQuAneBxKAWp5p2YLmcmPUsTOCZ\nlHS4341iLkZ8s9jda0nTBsu71dp/mWAYrpFIaSy2UHO85VOS0QKdJnqiZWBt\npb87hf/ldaoW/r3E7oiaNhFla96SI9EFWsgnj5XCRlcBRsKsSO+OIQT2X85/\nSbdiZYUGYfE2Eb1D29g1P1HNDwQXidc8rLpTsMJU7J//Q7To6jIU+E1eDsS1\nooCZ1Db6X0s/7f/D5MxfESWmv1+EBaA+zoO5ys9mkhmdAIpXMC7S10TLI6KP\n+2J7CZtsmzNzeBm9trHSQcUG0PJdzlyINpC0ZVYHDtk3H2S1sSEYJ1HXj/a7\n+KdeM4vGWQ9YNeZGQ6MoFKpYBqfIPPrL0C0lln+IViLeOBDrR1/EwJ2umXqb\nsl1ScmVkRUj6NS4yr6rC+VsCt8MAENJVM8xj9+Bz9/EYz1pjU4Z0z2E5ib2N\nepKJDGFe+nQUbIcK00bJhWISExvyI06TWOmLsc34K1szA2JBjF0bLV3f1J4H\nkvQ9w7hFVSR6zt/weSkCXbcojssjuMQUGExr6iI+0ira7qOgKiUf1MXYVEem\nvh3q\r\n=YWs5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c70aecb303945ef1a500902adefbbc1a864ecb1b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.4_1624071081463_0.8499154017759465","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.5-renovate-major-external-major-1f7abe18ca9ace47712e1b6932799186e40ead62":{"name":"@balena/jellyfish-client-sdk","version":"5.0.5-renovate-major-external-major-1f7abe18ca9ace47712e1b6932799186e40ead62","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.5-renovate-major-external-major-1f7abe18ca9ace47712e1b6932799186e40ead62","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1a1a467bf469f55fe80a085049773dbc2bbaa486","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.5-renovate-major-external-major-1f7abe18ca9ace47712e1b6932799186e40ead62.tgz","fileCount":39,"integrity":"sha512-sHpfDw5HGok47/cuZHlFy/VWwOA1p6sBpaotBi9faP0swY2tKKvIx/29C5vN6aDdHHdtp9YX4P651O7TcnFCow==","signatures":[{"sig":"MEUCIDqkiiOYPUG1qsEdK3N4ZNzv38ExtgkhJaZSrS0fsJCgAiEAvueDMiEui4Mo/ymMHFe68/kUSe6615SelfSNVKxEZEk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzV02CRA9TVsSAnZWagAAAs4P/AxMC0m1okDieeEcf/0z\npG2uQ4O9yob4mWVLOsJ9S7zPCHjvGmReGLel2KmX7NGQxmM8hmifSTgsDs/c\n9E04LwXtexyVJPwZx3angKZBrXRVIXpP+LrLHpFlw3BbMBHpbiDRzSGVS0Ti\ngpdxM6mfb4wNtjUb0mZWzDVbWZZZXxv1NQ9lnXbdvvGCSUfP3anerdxAhgch\nUYqsyd+zNJoU5w8cc361cQxtvg5uq3Fhl8Ute9ApGV4f5GmeaqsA/jRCriru\nPjWNxkMPzrGfLAA4cj+8AO13U59fhErlYseBW3EJnQR2CO31wScbTig0rimr\nECQL/JbnferPdNFE2RJ/8g+OEpo0RNcSAlBuEetwxI6LsCLZuJjK0+u1N8r+\nynvX9SIKx6lIky/E1cig8vlIPPGC3TKZBw6RfpcG1YHMWjtZ1Miw2ZE6SMEZ\nnfcfErkixaEJIQwA2eFp+F+jr+K0a7/pFvuEp0A8Qv3yxDQ3GIKqRvG+GV3X\nzZl+pV9s7Sfn9invScobfDmRBb3XLdtx3o0KcOwXuh7Dyjun1cX/Yua25MEj\nC8/8qZVTKdrNjijI0AugDJGRbTFNFgbN27OiFZegarBpBy3ckJ0qFI0jRy7s\nD6I9Ldl0RhfH9rr6iSYo72mrH+MAR607a5yu/wGXViCgk7OYPbwDmvCvYEuv\n8CgG\r\n=Kulx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1f7abe18ca9ace47712e1b6932799186e40ead62","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.2","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.5-renovate-major-external-major-1f7abe18ca9ace47712e1b6932799186e40ead62_1624071478186_0.43034784280566685","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.5-bump-typescript-410af9d7a7dff1531027dacb19ccdfe9b0d27b9a":{"name":"@balena/jellyfish-client-sdk","version":"5.0.5-bump-typescript-410af9d7a7dff1531027dacb19ccdfe9b0d27b9a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.5-bump-typescript-410af9d7a7dff1531027dacb19ccdfe9b0d27b9a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"30bd588b4fd2acb24688d37519e087466c72c8ea","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.5-bump-typescript-410af9d7a7dff1531027dacb19ccdfe9b0d27b9a.tgz","fileCount":39,"integrity":"sha512-eMWd2Bh5zDufIz7moVwe6rJDbXXDNOPyiWSBZKQii/xGNbbOEn7++e+FXRBdspfqZaDwexaLtml4UkxlM2svaw==","signatures":[{"sig":"MEUCIQDa7sfYlSyAf2UGJFe7L2nFoMS+L+qdqvU+hcPiTtFtJwIgI5BKNbQCAoVy1dCG4bWc5iZ7Jf/8IlYFCTgl0RHfhoc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260229,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgze4PCRA9TVsSAnZWagAAd+YQAIfY+8KfIBZw7Sj1iXv2\nKHAzuPrYYN/hmZhXK09o+W/pLgsnkf68WWpldOGwKMnIRdjdJTftzMrx/Vss\noQZI6zAxIOGVrjQ/mZAY3vWJC95Mw4rgsIJYgxIdNz1G07Qifk8F1h+2FpEj\nXo24mIif7oqNLgfLTy3vzCKtS2Dd4qRWrara2J8xgFDiq9Ga+zt7boO7RyU7\nCYoPJz91J73VslZslmOCpTU0p18yA90yNopYiPmWt82sCoBIPb1Sehh5hX1R\nmFgP3Wl4qO8ZwruGDmvj1tCyxEya0XO7YVV8cclrVBCv8LjLSmIhmtqq5VeF\nezQucYrw5g4EA6k0b0RKm7qoF1IadsSd57ydzcmrVvnDLdFo5ymdbi9v8upr\nNFHAZS68Me7bR2z8PCNHv+xBdlg2fqENxFMsursn2CJLvRikzpDl97ngmb1N\niHd+vtvrCDU7927G3HPC5lxupOhHbcogcjK5ydqecoPHfmugj16/Fs02iQMk\nI/qrRUUmlNdivSKIcoCOCcYhPcrdM01x5k36+vZscB1/7qcPDp7r7XCZ/LTc\nLJrwophp/Gt6gRDwaTBB/leilJNXJUbZt4uw7YRMasDKmtgsUtwq/euwmcfE\nBWrM8ZonQlxi6/MZ+70JBjsnvg1neTTuUGzLCz/4rB5rIgxoOhQ5ojzevMcX\nDz/G\r\n=GhSJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"410af9d7a7dff1531027dacb19ccdfe9b0d27b9a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.5-bump-typescript-410af9d7a7dff1531027dacb19ccdfe9b0d27b9a_1624108558864_0.5586179084769682","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.5":{"name":"@balena/jellyfish-client-sdk","version":"5.0.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7270ac2fbd7ae9126401909da193ced924a67e87","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.5.tgz","fileCount":39,"integrity":"sha512-3AGx8hv/ra/ym2Fg27UnUD4ejmh3jhunwdC3/5wTTptHczresQxBjvW3oSa9nCJBTVQCvczq+DbZbezgfFTqhw==","signatures":[{"sig":"MEUCIFb96fKI/mUb5sdg4/uOeN1BvzmzSPSPpOWCSq7cXnA4AiEA77zwEtfvr64ZFNK3jmhmcFd6u2wbMidWrqRMeR9TgaY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgze7iCRA9TVsSAnZWagAARLkP+wV9SWicjOY+nqrTuq7K\noaCgML2RKgsTDDTFGjZCgWLNVqdQsZW9K+aocD9q3GyMZJvVuM3qPHEfydg5\nVzBDAI3WgxARWhBrRcMgQJlEVvnva6B0/IPpggzq1T/K8ebtIOqOE3hyZpCn\nX/ECqqk904/lgYIn2PYb1hk8qNiZjXvTUdTqvz6Deiy3+9TG5ykD8ZbFJCHH\nnlBsJmhKN4DQ78bcrSq0wllaiTbavhV14FmqKcohSgBk6ZuCTJ16r3Ghg/Pf\nu/k5lIFgL84leddrBWciMNXbQs+W/esEs4yJvOU3qtU+eORrMPiVVO8bwcts\ni5mB4UefSIK5TxT7yCUEPlPrD03P72u4vzdKoAU0Rc7wNrHZdiYQcSY5pasP\nW829hdqBpfeyd3KaaKEp/pWDG77KNgJC+u5kzgPHwYf6zzfgY1jOF6b891Z9\nzM4qo3caTkSj0lk6VMbQMzy5pBt4R352wZeDtuswORPPyDj+0gpA7VeKGaWZ\n1/leiVr1lilCDcj0xkjejXE/yBdDmLEpdN0qI0RgOMz8LaxzkcVYPUS/2ogP\nl7/KPkQ6Qpqjf3j+flatU5vP1wivaNkQEQGsEfMETiYtHMXPkXDomVrmbpDq\nMqpF5ekzTDAYT6aQEYNI2KiOTq0aCHNU7sFukkteP9ouyPd2wkvRSnZE5LOP\noEaq\r\n=18SM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b3e05bd433d341b0f371ec2aa69dbac2459ba35b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.5_1624108769441_0.13859465452529696","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.6-renovate-major-external-major-32d5d8bc99184be31ce6cab48ed3e794a6271e89":{"name":"@balena/jellyfish-client-sdk","version":"5.0.6-renovate-major-external-major-32d5d8bc99184be31ce6cab48ed3e794a6271e89","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.6-renovate-major-external-major-32d5d8bc99184be31ce6cab48ed3e794a6271e89","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"950aaa0f0a599cc1fa352e340af73ef31d8cc10c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.6-renovate-major-external-major-32d5d8bc99184be31ce6cab48ed3e794a6271e89.tgz","fileCount":39,"integrity":"sha512-P63BK37bNsGsKqsV7jifpmUe3k9mn+xK6eGTVALkHm2+PLxeI5IsEBD4MnA2+L5keX4MTM2i2I2g81+VIBy8ZA==","signatures":[{"sig":"MEYCIQD2L1VjZGjMTVGsnunFbTwwIDLPCLYXhaWL6+xTfvEl2gIhAJQashjwozTsYuYBo5kLQXTuXQRMiMjQrEHDCXjGqXJz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgze+HCRA9TVsSAnZWagAAdQsP/25tp12QYXN/uKB5LoBD\nc2r6I7+tZ94bUTeLW7fXreTZlXLTcc730cUkVF2eNbsshDqqYyGD9dxXX2RI\n5fB0S07XzFAVWTm49nfXOzKZxYQycVrx82R271V08w6ddI/tMp89gKfQbROy\nxIwp9Dk1gw5NIuuyO6Ym6pleQdy+OY3dm7NJrbddveQhjtTrlpBXrLnFMJkt\nBuNxLjVx4lD7Wv16xQu2IaCFuktRE4UtsqzUNK2u2Uo2sCAPClNagHCQV1ED\n/PfU+Uv0IqysHEdCwopezMmjK/kp58slpAJJYXiAToLWWWxJD2Bt+c7lFVtE\n7h60xvYVbHLn/dgGu8iBORz/x5vueiNWdGRCJbRs8s7NiOsI/oSwElrzLAHD\neVisprA2rfqBIoZEICW0BBK3876VotJQwC2WA7uAurK/6YnirXEz81juMXEQ\nM3XbPe6AzYjqY6JZOzm9Hz2xM9pNpXrh6EDPUM1S3KcOYcIRogWBHJt/Tkmr\nSfkd9KLQIwDzlKBvax3UfnQ4IdD/s3uvjNR6fb0Wpj3hvUEh2aJTBmCdC78k\nRx0wnDj/ySTR87M6bBGeSUC9W/tay2TUzohpwZe5g2nIlfYDIqVCDdteKuy8\ncHpQz5TKtH+bwmXeYAWGowkqD3NuYB/+0GTHeUaZpcowAfq2tj0pwbIymW+d\nsrtf\r\n=91b8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"32d5d8bc99184be31ce6cab48ed3e794a6271e89","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.10","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.6-renovate-major-external-major-32d5d8bc99184be31ce6cab48ed3e794a6271e89_1624108935474_0.39476684072280155","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.6-renovate-internal-patch-b6a6fe12caae1b8d58aba27adb25f856de6fd099":{"name":"@balena/jellyfish-client-sdk","version":"5.0.6-renovate-internal-patch-b6a6fe12caae1b8d58aba27adb25f856de6fd099","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.6-renovate-internal-patch-b6a6fe12caae1b8d58aba27adb25f856de6fd099","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2689cc5e439712be7629983796078bc7432450b2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.6-renovate-internal-patch-b6a6fe12caae1b8d58aba27adb25f856de6fd099.tgz","fileCount":39,"integrity":"sha512-mQA2ImhO9/vVgimBthjjqYV8iZbRevoZC0BS8orjZTEoo74ZuzE5ce65BYcUrvgrG3jc3Oc2xPtLuvpnufrLmQ==","signatures":[{"sig":"MEYCIQDI68EJgC6i8jVQpHrt849y/rP+ZuRx7uCA74f8ORQjegIhAM5rIGdPDq+XOc1d+QWnFak+E6cX0Z60wiVJhGLF/vkP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0Z2KCRA9TVsSAnZWagAAnbMQAJTWjjrm1NJ+cP6uRQTa\nVfdp+H8sp7AJoQGw+pQ15Q3LHMUbRxIb1UWY2zjp66feB4KsioxHPsjH4dJd\n85nIpkXUfbJefqY2Hk+D1J4ojNJkpis/kxa28kNJvizV3nGg+l5igQip/1yY\n5sc9lht7GLPnEuLn4wNEdn3toIvZ77nSH25AokCV193a8Lu3zUZwscp3PPyb\nyUzbmHdpdHLxpl4nJc+pHno9x40Xf4+JMLktIXffO7juS0XIEhH6pqZ8K4WS\nW+RCEoigYoWNwhot1PkNKO4ZNOxV48RknFsHENflxYPZheMh/PffgshfvGc3\nOA0cwSnVGYxQPIFqtrjZH8lak7CGNc2xJjU+FdN72xnTJn3n0w+mbG2j+6FD\nRpX4yTT5toA99FtDe1Ru765nwD2GmGbMtNA1GUmEO4NUId4xOdXn7w0hlcIL\nluQ6pptPDLFdcjbj+S6LJNNcOPB1geABp+lF+t8vlySUVwaHjn0SCSbLh4ye\nhmL3pNHVt1/6U7/LQvqM1Cb/oTfQgzZuKveJOG6C20jie+7PJ4tsksh4TuWO\nGMfZHpsWI2UCIBdVbbRPn0pmb5AY/CcBzueJvEIlwund2g+BL9tmzqwt2xCR\n417ogcMbPOKZWu4JDdQXMknO0ApLaRsd77QCQQcbV8clfIxxlAPZi9hTPyH4\nCYjA\r\n=5VMX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b6a6fe12caae1b8d58aba27adb25f856de6fd099","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.6-renovate-internal-patch-b6a6fe12caae1b8d58aba27adb25f856de6fd099_1624350089696_0.41131757220723575","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.6":{"name":"@balena/jellyfish-client-sdk","version":"5.0.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"db209c7b790f61fa3d78ffc9193271f799e42848","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.6.tgz","fileCount":39,"integrity":"sha512-VivLWPzu0nMIltaDswIQdG1j7RohDeI6DXjXQ0Sgief3mf4/avW3YZg0OV0+/2IEqO8800nQFuvGFhngPAxNTg==","signatures":[{"sig":"MEYCIQD2zXBPY5Z5zxcj5Wji2nrbIEc1L2Q71E2tZVPgGXDBRgIhAITG5iuBZpC6jywDnTGzDH9S/0KFDIB5phgfwM2pmadL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0Z7tCRA9TVsSAnZWagAAciAQAJRn43HDLB2gtRGNtxM9\nm/nwYv7NwnPEEtd2hnopLPSymoyn010TXpVV7s6PCOZIxjl5NslS9yZ7kPFF\nc/9FxMQCvb+gTZE8x9XbC8pAX14oUGmOzdnS2NPdegYZ0oYOdW8JSJz35dPl\ns573GZsdCC+R62Y8FOIYDRdhwGIhFs/6nTUjEPtii2BtPQwtYe9xPy13FweG\nkuEgXc9RRABLztVW27Tfihe7jgKhlUg+TPqBaKgjzIUzVAsJ2FDAAAVcB9I0\nNiKQCl85KErXsOvOsTST0CbNhVcym+IEDhhIdrd/exdH7AVuA9mJDyeGP1rR\nDm0KtPYrYLSvWDjZUnO6D3WUdqo4vUjsOvUqWsTzbdEuhwXo0blDlRcO5lyR\n4G0ChEtMj5hNz14GM7mXHlbee+HBn//ghor9dkU8emc8+MIKvVEEjHsfFINe\nOPORjFXGmySQ59SgdSoxiA+FOvOg/U7BrvoTVWUg+DPjMkTVTnzNryZML2eY\nXYBcTDXWX2mAno93+dGB8FpE3OAk882VdPGnoBHpT6Np7tOQU6j5dNpxbND/\nsO7WdExNn9DVP95qgQLZHJA7m+QOwjutEYVyHrv1dHt1jhnuV3R8VkcI1nHT\njHMsj1g7gk3+3N62P0XY+Z9qgE+CBZprwtkjnhUz+tqgeVvBCBkea7VbFci3\ncV0/\r\n=teni\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e3af6f66eaf76465cdb8ff3299e3f36a76771ba1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.6_1624350445371_0.10091473345872237","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.7-renovate-major-external-major-81b92882d3e085b257a71fac0d599e9f3922f1a7":{"name":"@balena/jellyfish-client-sdk","version":"5.0.7-renovate-major-external-major-81b92882d3e085b257a71fac0d599e9f3922f1a7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.7-renovate-major-external-major-81b92882d3e085b257a71fac0d599e9f3922f1a7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1c5af825e0d36d3dc21fdf173bd6f23a94125a7f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.7-renovate-major-external-major-81b92882d3e085b257a71fac0d599e9f3922f1a7.tgz","fileCount":39,"integrity":"sha512-Y54Z+OzNYdaNhU1KWayIkB84+QkEKG+DSpUfNVjq/7D0QJMdEM5S5usoNaVw7pHJcQwZMMDqCStxMeiDn240zA==","signatures":[{"sig":"MEYCIQCwij/ldOmnZsW7qLH3JaRULlKTHS8TllM6kRjW/vcAcQIhAL7Qnh6wvin/LXUAupzpIF3MMYNJF0+zJ34Oxktxm4zB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0Z9lCRA9TVsSAnZWagAACvAQAJmya4UMpAGNCMDO6EQm\n5FFJLLLq8EMMSn93a0l5xXSWba1TCXJlpplxCIw0spCsOW6e8TJTwLutx8IY\ngGLjpR/xr7Cg4RtHnsV2xF/iQOe7cMs96B7rHdDIkFAIg9c1NCueZMyxP4GS\naOXCoPYvfN1NEL/14oKxgHe5DRMDapuE/oSxoqq7oR4iLo08dirQ4PKpzLB+\nq3WyBa/yayVQDvwVhzz5xEGtXr8Ncl4UgbVGBLphlr6QS8W0494GVrrtWlmY\n4qeFOGPnsqzFE2YKLNZfuMvKDo9Q+B3cJVzGSOkH/F3MiViTiP8uKBoK3Zuk\nbetHSjP9GCNt0rhvKhkCRoyMDK5QYuk3emHV5A0dO+BxYrkJKlgxx7TGTKJm\nV04szlRbAGMS59nJRKmXMWHK55FmV/P3ynmaYuwilGFWnGcGbKzHS7L4Z1NW\np6vpGGreeU7W/RuegMgXmji8O+wR2DjvM5aJbKw3WWHxJASADF7Ka/svv1Lt\nJF3nLs7hJjirUO2ZBIXuj6ouc9TPXt+kmTGRvQ98a1YgkxYrSOmwNtPTMgSY\nF0Etp8ZMNilRF3AvAe/pY9TRMlaFAV0t+X2XzXsKvWm3LQ9/XL35upMg8kU6\nGL48QoWK7g/AhiQHdXBfbmPtdWQfTzz1NXIphztyPq8UQ9fW2r0zh/AbT/FZ\ntZr8\r\n=dnQC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"81b92882d3e085b257a71fac0d599e9f3922f1a7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.6.11","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.7-renovate-major-external-major-81b92882d3e085b257a71fac0d599e9f3922f1a7_1624350564853_0.24391944849359026","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.7-renovate-balena-jellyfish-types-0-x-f42a9ff3e7adbd74d3de1af08361894222ff0577":{"name":"@balena/jellyfish-client-sdk","version":"5.0.7-renovate-balena-jellyfish-types-0-x-f42a9ff3e7adbd74d3de1af08361894222ff0577","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.7-renovate-balena-jellyfish-types-0-x-f42a9ff3e7adbd74d3de1af08361894222ff0577","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9c7df3707c720a3b7708dc0a7fcd4e16cd0cf181","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.7-renovate-balena-jellyfish-types-0-x-f42a9ff3e7adbd74d3de1af08361894222ff0577.tgz","fileCount":39,"integrity":"sha512-bF3yMedFjwkphmz8kzt7qP74G97/suXWkRz5NKgE2UMDTbB3JY4DGvDhjFhJeXY1Nit7FN5g6hqGQTNWclZP3g==","signatures":[{"sig":"MEUCIH4YMzTOc/0GVnk125mWUBT7CvcHUPdj0eRwMVsGKtF3AiEA/pjZcSHoGtl3cUzyKomoz9ffFry8iGb5ZSFjs5DagBI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0dGTCRA9TVsSAnZWagAAGLwP/0+ofh5B3hPuGER7Htk5\n+1y2XpZbWgWHl+Ds/Avz8tu1k09F+WwMuUhLORqmG+C1Q/wDAFaL8AADYS+z\ntE4vjEDM4OtSHvdgD0hDgIdztRlB4rAEQ0TETqqyokimU6lmIE4kGsV40Uer\naSIUIjjgHJKXDeWlrk3IJUU207GR3Ux5bDU8CbrUdv+cDMoeWIWPolbqAxcd\nDYLPiUZ15RHbBENdOZdVKl03MrGMNo48zAttLJoLwx8xzCiZtREqCO3bRyoo\nWzXjG9Yr4ausye8RbmV3QIw+th2+52czwW8vAFB81+qm0fNnNOWrtL09TRq8\n8doqGT9LeBLY82PQaczIlrv4n8kOdbmxpwAxQRClGZ354+n7CIWS4VH1u0Ib\naWduYa5P3mJKhK/6xPpxRj2PAJduzB/SYKqnTI+pi97aecgP2xS4f/c0y4Zk\nGL2iEDBWG5BNKpSk4POQGVLN1RuNSui00e0Xl03YGKdg/nGUlt7azmImF0hC\n13rfwf3hkmZhGXUW0Ir0IxmbjvWjHg5acsVAK2nrweu006NvEba2a3VTmbpE\nyDg06Dj3nGjWmpDqyYoY5MxZz4al6r3+yGzhMJlpFgXy3iROrk3ar3ZOgwOF\n5lMliJx0F1etKHg+CUyKpEqkiYh244+mqspI0OMMCqXfZ/H5iVZe5+H14ACX\nX+TT\r\n=eg6x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f42a9ff3e7adbd74d3de1af08361894222ff0577","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.7-renovate-balena-jellyfish-types-0-x-f42a9ff3e7adbd74d3de1af08361894222ff0577_1624363410743_0.13829330617715407","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.7":{"name":"@balena/jellyfish-client-sdk","version":"5.0.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f7996f286d2c2b77840a7ff659d48bb291a4b3f2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.7.tgz","fileCount":39,"integrity":"sha512-20902eDHfEMTakWyIOSkWu6mFxfXVkM/KCSGFHqcsEFQTSstG48C3t1xgtSq+kPQ0wVtJeJ0P3DhzbaZ6Al/ww==","signatures":[{"sig":"MEYCIQCenCDhUIDekfM3G9hjVj7vYwVig/IQsVfQHcr3EpVZgwIhAIpn9tPgKBFcRYyCDSQyNxXYafTBGye41IB3xaK8wgDS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0nJoCRA9TVsSAnZWagAASlkP/1dY5iQLS2k2xV9no/xi\nhpkwECiq1ok0f6hJLWp8W4nMhVpSAOTwQj9GnBwy75u3i3Zdw/Em8K+svas2\nSG42mzOl0AEVFYQaEa7CR3WDGoX5misOvlqEcMFTeG8L+ZEfpx6B5rsxNdW0\nX4Pu1M3Q5L8kfCR/gPzlc/KoshwLvTu8MeY12h8EsjjzZwgK6P5IVxsaXeMb\n7G8asttnNel4hDp3yNNXmjK1lKS/ur08wU8apRUUQqiH13AJlTIQP+cKZ7yB\nD9I0iS1T+GuNloUHn5lH2o4FLwKsmYkHmfl2J/fqOAFsI/4dxXKOFuGIhxL3\nIaivT8jjlgBbR+HvswwjUICm58M3SHFMr1FjAeCP5M6kjxj7wGFxlTcypyve\nP8lDkxf+hCIF9F5mHI1R4rFsATYg+4g+TAan4Mq343GM+8Fan0SEignxQRYw\n5aUBzUhxdabJU1e3svuw+05fpP7LYiO9ZO2PMpQyMo/Z11SzaQBJsbDfuzXe\ncjf7xjRCai2cgdGnt74okL53W7a5gtOmmSCIUTN8WzlOPk0HJsYtudNJrq+D\nTviFTeRYBnWe8XEJeAYo3hJZ8n3fdlaDkF4OBkGnJl5Zg+8T8UbQwMHyNVZc\nIc1Q7H42JmFd7SEl7Ocep+VV1efNK8Mt5NKYllVx+A4ebvI90xctpTvML/p9\n9r9J\r\n=Iko7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b487df6a4998fab6fe74f04716dd68a825632d03","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.7_1624404583913_0.7021473398649671","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.8-renovate-major-external-major-613df0fedcf1e39a5ee96eed8313db63ad9a8026":{"name":"@balena/jellyfish-client-sdk","version":"5.0.8-renovate-major-external-major-613df0fedcf1e39a5ee96eed8313db63ad9a8026","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.8-renovate-major-external-major-613df0fedcf1e39a5ee96eed8313db63ad9a8026","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1b68ddb5129cea3656a474e60138504f237ae2fd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.8-renovate-major-external-major-613df0fedcf1e39a5ee96eed8313db63ad9a8026.tgz","fileCount":39,"integrity":"sha512-Ml/380+LMRBbPKH5pFDANGKjB3yj1ACbTiBnqBUATfaxngNaphy+4ikMdMiNwl1y6zvoTIMIkgX9fmfPCJdIvw==","signatures":[{"sig":"MEUCIGo65IOShVdXCRAS75pe64WAHkqBhBXzUgPE51K9ErFOAiEAofNpIcBFo+nIeCjI0cKYOjAY0bPhz8oT5BcgTHPWq7c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0nPeCRA9TVsSAnZWagAASScQAIbGmEaAwzkJ6eU4Qaj5\nIg3g9tmvO7d0EOEosvcaMw1K6AJHHUoYL2Ym7VnYwpMCj0NMEHwrToC5pKb6\n+si25ZBz7A4rcvF9o7N2j5WO3SGwGUZ6x+hHz4H4xq1ql+D0cqRgr7OTj+ny\nMslb8JjvES8YhTYmN+vWTNexC30fWG5jFsHs507/sh2mgMQw18oaZgIzh/V8\ntAiyGuiJLTULBTthSC2CA0QS8YZLuYjSOBaLR6ITG4Sv1bih7a/Cg4uF5PfE\nseP8ytOTi+RWf5u5s0iqBYrXEq0s5VhcQc/eYdVLMFWWieVz/ubiVlGY2ZHL\nh03eDh/DDgZbacKW0clIKxo7qk+nk9GyMNv+BKGMJxbAq4PyC4hMwrJf7FSg\nBvpaNCrM+xWM6IPSDia4D7NSObZX2t5INAuQzZ2x8UONqWOAwUcnF8tve8pm\nBPWgrHkUHy0MGWRHge7LXEm9aALmZa61kfJ6DjwM2LFU/nYYDkkPHE+n3yZh\n1FOCcTf8HhGskKg8QBmgucFOsKTKw3IBIY8RclBKj1VsB4KURbssOIeM5EPs\n0p0Bz+UWPc+buAFhaO/VZn9vltNHgsxqao6wcZ2d1aAni67qiROmbJ0ESMnM\n4tKGSEsjvl3oRY1e7CQvO52ijAYPwPKdD5XbYKo3rkPzYkxSuphebMFgAwUJ\n5t6e\r\n=HU2j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"613df0fedcf1e39a5ee96eed8313db63ad9a8026","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.4","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.8-renovate-major-external-major-613df0fedcf1e39a5ee96eed8313db63ad9a8026_1624404957461_0.6324939403325673","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.8-bump-jest-2-ba66be5548e0f72adc6946dcd7ccb5109fa60f2d":{"name":"@balena/jellyfish-client-sdk","version":"5.0.8-bump-jest-2-ba66be5548e0f72adc6946dcd7ccb5109fa60f2d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.8-bump-jest-2-ba66be5548e0f72adc6946dcd7ccb5109fa60f2d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3b9b6927828d11dc08c92b62cde9300094772aa9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.8-bump-jest-2-ba66be5548e0f72adc6946dcd7ccb5109fa60f2d.tgz","fileCount":39,"integrity":"sha512-GHdmCE2J57VwELoo+Pva3KhKEznLATEVcHPGRomhowvLSvmQWHv8LCaAi0yrdS1y2Ka7F2mOYWA7a+7q73VbbQ==","signatures":[{"sig":"MEUCIQCK48FhYDU6RSwi88j33bEFqE/ZlOKENbmPkiC9t6htgwIgItc9LejE4ow+hPO2vWhJ0zlxMPh7vegiTwCYxcjtvwQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg08bpCRA9TVsSAnZWagAAOCkQAKT0+npg8g3t5o/oolcH\npbt4umnWPrb8FZcNaiE0WqZwwIBT6Z+fAXr4I7WAJ9B2ZHH+9+j/H8sSFADm\n7L6EWgxBGz6nKQyXzs9A6AcdWG5y1GAxyDPklKulMpNlVW+9gJuCjKHqWfS1\nVEOs7ni83i8T6Sis+VEJoNN7Zg4UVFqoE/m+GCr1Skjx3Evy9gR3ivmIvROw\nkiZUAHB/v2Eiyg23ExCgxVM2nyfuzra7mD9lPCStwKumjLFdPlh8gPDCYShx\nCLBPIbLUKW76yIqucRrDlXO9cpZ+OrtBg1KgDQ7qWset8+jlTFW9hRKnXglo\nJwUo8VVnWzwklTfnp9EW8FvdpYPwPM66tlr0lKLgZEzBMTzdoAxI2J9jBgNb\n1SGK5mMDL81MLOg3MhDf93UJnuZdB5D+9rQys+aDL30FcBX2blZox5mZUfD7\n4hmtaJhCzU2AMwFR0673o2ceDG9GV4BDVQvPaDB5qTKb6ItjX+CgtIx70wCR\nvjsV3vza2fWk96lvKnE+WK+eSzQbxQYz9BjjNKJ+EDbkta8AEI9nuMl1EaoH\ngtbw+iBYhPWrMriT5FT6Vnyz4IIcmq+TVJ7TmhMLZ/5KqJEHvVcZ+UIuvoy9\ngu4ua0ilUqUvVHeSlf6AlFEcBVpS+6yh5NJLYqh7Zmiv2zzebDH4w6CHTrIQ\nOqsq\r\n=JkqO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ba66be5548e0f72adc6946dcd7ccb5109fa60f2d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.8-bump-jest-2-ba66be5548e0f72adc6946dcd7ccb5109fa60f2d_1624491753409_0.6740987445259663","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.8":{"name":"@balena/jellyfish-client-sdk","version":"5.0.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"553db6421fd6c09ac7942c7052ce8dfcd71c2234","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.8.tgz","fileCount":39,"integrity":"sha512-1exqCfvrqqzAHttFaVtgCAL1d5jBKbnwbq/qmUWsVn9izExx5l8yQE4wmfrvoTCMfEWOKUAVz/Ue4ouDoc2N1w==","signatures":[{"sig":"MEQCIExO8jjz0qXkEQos/3iEWLQfNganB0COAz7NWyZsJzTrAiA6Els1t0B+56X7y4fHOKXBfFVN7sz/c3jz8D3nlxo4aA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg08fjCRA9TVsSAnZWagAAG98QAJKDLnH3vQF/t8fNTNOU\nqQYBg/5bqgYcIWgWdib8h1FHUJtbUw4ypuXv6SsHQhgx/fxO1aofVNX2ONk/\nwYKj7PqOHYe66k4NkQ8CNqVFFUDF30bdfOafg37Ng4+euNKGoIzdzRef7WIV\nYCnmgfi49/PLn9Db1xAdtYIXfcQn7Oz+HcrCzGNWFxfOjFbeP4KQOKKq8akE\nRC+8FI6dR4AtS/YHE48+CPJm16TwdoMWU/ipn9cqbvilmIkLH2fPRYlE+ve2\nzywZBpaFzJ85viRpSHMZesFEF7fStDOzmD6XdtPNDjAoSNfD52jQExc3EBF5\npk4P9mq+TUM1RD42mUbs1R4sBM4wgU3aTd7jwI2AEluVyDc1zq5mdaeorZyf\n07xzRs9EBOu4TfIskCRJPhip1CkXSv/Vasyx5fQQs69Qjg6d3B8rOWnBUIMr\nT73Wt9Ls4PHlFK86pz92xdZm7/n/mZNPc2TD2G7dHlIfXFPxmEcbhplP/ZAw\noX0ilZCE/BHebbTWDO1/p8cmi0yvrW9JRS4KW9w0rzvSeF8zUGI0jmGh3gdP\nTpCa1Dx7rcjY6Nn7sok+emmEAdJqPqdqV4KsLUr7ojrwXXadV1tdaPGp00rH\npn0gewsV6nfsjyo/TK2Dw6ItNoYh2YKSXaQScNEnMiv7H5jliasaEdkuJB2C\ngu39\r\n=aBZK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"284e94b45034b57187427fa1cf41531f85fb54ad","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.8_1624492002546_0.2599024766214417","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.9-renovate-major-external-major-3a669b30a10fc59bec455bb90ae67f4e20ca5615":{"name":"@balena/jellyfish-client-sdk","version":"5.0.9-renovate-major-external-major-3a669b30a10fc59bec455bb90ae67f4e20ca5615","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.9-renovate-major-external-major-3a669b30a10fc59bec455bb90ae67f4e20ca5615","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e47eed3dfad022fdd5b0951ac59ad4156cded86b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.9-renovate-major-external-major-3a669b30a10fc59bec455bb90ae67f4e20ca5615.tgz","fileCount":39,"integrity":"sha512-PfWocaG4StAbFDoutjbl4fzigcroUWZbLpH544DG2e3/iiNoPMmFJqeWgQ90gZbT9OKq2Rjb2PrH5DKe+GNKHg==","signatures":[{"sig":"MEUCIQD7f8LuG9UUVMhD+UWGS7tqkvyO3olMqI53YG6b4QYNbAIgX12ozvwcyzrfKicdyPmKIoQbFXjEgIcrHm4fztCQL08=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg08mYCRA9TVsSAnZWagAAZFEQAJcDZOztQqoIaoJypkI2\nRw+5S4ibRG3XBJxSFN8Azx+IeOxF8lYDdlPpL5OU0sCD672NAwCIr54E3vJP\naLnHWEBIF0IB214jfVkvra29vPeRhOvWaRL/eDpUs/jYJrKI+wxYKdYfyMUu\nuhj7f5tXpJRXcz5I/8Mt7tLOhe0NTX+KBJwL6rlhwdz+iZ2JTIo/VcnTVQxl\njc36dJCbDHMLo+5+CeMBJVa6e1btvYSnPqkbBffygBxA7hJO0QYjSC9q8n9M\nDJcWZT7hoYLbCCceTzUgrnTdELrMORkvugIUh88RxwYyFOSxFdDbLbR8M3hL\nYcT6Ga/e5U6OL1nUmV18ee6SM2aBjb1bpzaURbCBOVF3qcE39VLWnv4W96hF\n2bw8DdsfRCtzAeZ6wkulzs63Sf42QfoQicRPmrK8H9kGrJEdq0axsop62Dh/\nKQ15urn/V1yGdGw9z2NN986a5QgfBreaIgnoLIAkYJthGKrBFkUeCLC86ygm\nDQhqx9Q/vjxqyXg2G2U4ZwVkRHhR89EOmwbA+jOEvkpeMyNTyMZQizp7CGEz\n7M7lyUkL/2JUH4f66AAmWxgxmJrzfAcS+ac1PgqLYNF32sd8gGJqVgKPREYa\nAm3AtaZJX7qP8JAbx8d6CKD0zbtZeFEFhndkgF6eUpcBkRtwKe5c6rBIrQgs\nNpt7\r\n=ElWV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3a669b30a10fc59bec455bb90ae67f4e20ca5615","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.9-renovate-major-external-major-3a669b30a10fc59bec455bb90ae67f4e20ca5615_1624492439918_0.7671377883699304","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.9-notifications-v2-01a7e27ac3f6d844a18bd6952acc6253aabd97a0":{"name":"@balena/jellyfish-client-sdk","version":"5.0.9-notifications-v2-01a7e27ac3f6d844a18bd6952acc6253aabd97a0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.9-notifications-v2-01a7e27ac3f6d844a18bd6952acc6253aabd97a0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a2ef9171edf3c746ce8ab1edaf99a0c3b8cf410b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.9-notifications-v2-01a7e27ac3f6d844a18bd6952acc6253aabd97a0.tgz","fileCount":39,"integrity":"sha512-s7Jg+6Fi0I8UH67PfiB61e/Q8is3AiTLyGLRQS+9HMcTJcqQ5fg0BhxJ34lU/pv6wtNik+m1n9lGslCBEpUi8g==","signatures":[{"sig":"MEUCIQCStfD161ktdjpNMMCcjdH5KmRghnHpjMPQXp6Zn5zShwIgRYpHE2RfJzJ6I2cEk0auslZVKwbSCPXum7HYnq40oxI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1F30CRA9TVsSAnZWagAAGMUP/1albdMiB0tRvTZItNC9\nFEBf8lzECI/9LhNThGjRLoZxfLq/Sh9cNQ2xJOYdVzW7oT6CIAPv+3e7BDkf\nKtVv0jGKk7iqvcKN9MrddujQb8+x08Q2zLix7sBSZ7y2wg7Pf4Ni9soFatuk\nn+1PktiMYl+3uXc+HRG6aspMw4u5exXjWSzT2EcFNOFyb47JcfwwSVBesjoT\nsF36RXYiAmHetpVWkbY2jnDKrYkOOODEuCKPAEt4g5kMOo9Wpr9jTqZy9xtS\nL7Shvp+KG6zyUJNvF9LdR1Zx2Y0d6gVMkhCnP+MmwnWeesP5pMl+vnuul2fF\n8h4UtBldIiirPZBHymRYcvtyf4lwd2eXQRACTjuBIX5QuFBPNjy6gH5h5Yrt\n8AFcFtibkQK82E99TRcclAUJB19MPPaWkFxjw98cE7Nj1ocPojUOvVmuSyvY\n67lIKJ3v38pyhOHdlVj/OI6n5pn4WnnOPdIkB8eCzUJkI5YBLZA74hAQ/F1R\nftWNGW12s9kOj2CDi+kooemFN55kofZuO6PVS9s7EDwklo1ma3MWiXxBRDs8\n35kXf+cOevPcWK/y7plk9I9D/mxJpKecK1eWoS4PLSHXSNSe7vyPS1HJ9V5i\nbq79kwesnlSnDWEjoDvDAGHId+4iJQlkNsDuuWvARSigW6bhH3gw2cD3EY8e\na6RT\r\n=jy9f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"01a7e27ac3f6d844a18bd6952acc6253aabd97a0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.9-notifications-v2-01a7e27ac3f6d844a18bd6952acc6253aabd97a0_1624530420334_0.6649382000956121","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.9":{"name":"@balena/jellyfish-client-sdk","version":"5.0.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cd7f85e28f9da5e4313a194aefaa9e52759aa9ae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.9.tgz","fileCount":39,"integrity":"sha512-lzPEUAFj5DkQh6IdU3xHNK3Q8lJVd5T1uXqbHPQFG6o+JH6FOMldwa1kATvv5YEu7WNgEK2L9T8AjrI/SvJTNQ==","signatures":[{"sig":"MEUCIC5tyJj0PHZu/h7Yq3mZzhd1E89oGLSQQWVAMm5ftRqsAiEAggp1CLObnO6z5hPVg2WvZAJBjL6MEen7n7bolcEJDVs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":259995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1J7VCRA9TVsSAnZWagAAQWQP/iFr+cXcKAAL+ZwWu3bD\nw73comJkSftxaiG47g7g+zUYk1d4xMM9m2cpX5ujQElCLg/KSahj86bDqOOW\nZLHtzAQPIU3a/I3jQVLVh8NUEEtQ8SMKWbKYVHWAZ2wt3kIen1MRGA90cBrD\n9xP2nUu0dDibw7YC2KNyNBFjSrTDzENT9glVTl3sXODFgxs9pX67PaTlCM3I\npoP7EUgp4EoAyn/lp11LWkN3vMXZUBgNdCu7AxYA1K+0OkUhp4uI5jWUCWph\nNsNRZKKWoq93bII1ArujDyTNONS8n2C+y7c7x+amwOoEqiDBxkXKEcstGJJj\nr9eos935FsR8zPQo66n/8V9b9X5a8u8Ju8VdsGlWmqys+rUhvtVg4nckx/q0\nzqf5E+91bedLfNOBBBLfhkwchCnhoETVHqhqkrrAJYgDhkPobrne/sAHJXSI\ndFrckoQFmBpANUyBaS/z7aTRKNeybUykpXrSS7uPQKaJIk0dEtPhP6WwgQLh\npj8b/gk+mxGJ/DfmcP3yZXqSi512fkabtcYzbt0zNPExlotOaY9Aol2KT+3H\nEysytJdIOn6rBYPQ/5nHu8xPYYNjANT1M1Exwggni/HSXTRhHqdDWvOK7ypJ\n+jh/cMjvhj8rOYCPzxPUIvnt6JJnctjFQEij24+WRuqzJiu8CX3hxxAdXvrp\niOPb\r\n=dUau\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8ba2b2350c3d541f802d68f0120b23a8c1e0e693","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.9_1624547029167_0.8853453500519288","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.0.10-renovate-major-external-major-d9d31fdf84308e4cd13534a7bef48f4e3d59d99b":{"name":"@balena/jellyfish-client-sdk","version":"5.0.10-renovate-major-external-major-d9d31fdf84308e4cd13534a7bef48f4e3d59d99b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.0.10-renovate-major-external-major-d9d31fdf84308e4cd13534a7bef48f4e3d59d99b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a7ed0f7e15c8dbf113cb6be0a73a79026614bf1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.0.10-renovate-major-external-major-d9d31fdf84308e4cd13534a7bef48f4e3d59d99b.tgz","fileCount":39,"integrity":"sha512-H3D9KUGdU2rQH/9KNW9GbLiinq5SE7Dd3MXf0oQDzFbs5rIKSwJ3OKcaLwTPnaPsKzFeHZuD7rE34TYPoxef4Q==","signatures":[{"sig":"MEUCIFbg/tcSWcLJphlVI4+FKmx/r0Tcgz7h0rnSQNlyTbBvAiEA+m13Ys5XiJampSreE05+G4ba9DZZEVYSBhHLIr7EvUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1KBTCRA9TVsSAnZWagAAqasP/0hyraaZ8vi4t3YchsbQ\nhBayfQEQbbqKyQoevjskkjaPRW4rkO/f1XX/MFHMv1rxXib5HcD0Mg1meplZ\nmfATpl9C/1NPNTRxW89kOffmOhfPboWKAO62jzzbxEg3m5SodiLtw5I/PJYw\ncl5F5J1b6mSx0+WiZlzAHRBonQ0r5+OJHbR8Ae2Z6LjMoxavIJuz9hs3hxzN\nJtuEnyYvODdEXCZyUDZ8b9YjZXTl9HLbyZ7xVlsKXEaSAgo6Ym05Ea3WIDG8\nVBIfecg7HJfB4MilOPscihj247ewpAR791zfeHCB/j2ZNZ/fMvMwNKj4i67u\nGtIsbILv8yjufgLX4e3ExJpOu1zze6dX/AcwYs8DZ3vzNvZcStPH1ll/2jau\niTL1HeQjQSUg4t4f07Ur+cdv/cl6ZXhpntQLAW1ony5ntVWoLnyd0/HFAA9k\n4EH0l1zOD77XMWSOmMrYjemUuz21fWvRO0Atih0MTnNB4NrgnvnHM+Ngd+KD\nvCkMx9dnEU2hLxZxVTbj/yfwH5FpXlftO9LB6QT4914a9bac3VB5m46PUAK+\nXcJO6iraD6x8300AvH3wMZMdKsu3hA/BdrUiLjBKfpWytZTMFbwlvZ3ZNUMQ\n/6tOlOy916aFhoFS/aV5ztu3vp3z719Djj3WagCD3S9F76yshBguenZnWv4n\n8Onx\r\n=TmUy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d9d31fdf84308e4cd13534a7bef48f4e3d59d99b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.0.10-renovate-major-external-major-d9d31fdf84308e4cd13534a7bef48f4e3d59d99b_1624547410889_0.849343505155449","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.1.0-saga-relationships-f7699da63d55631283945a52d437bfbd4333ff85":{"name":"@balena/jellyfish-client-sdk","version":"5.1.0-saga-relationships-f7699da63d55631283945a52d437bfbd4333ff85","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.1.0-saga-relationships-f7699da63d55631283945a52d437bfbd4333ff85","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2339db5ad738cb4f9048b82ca96c3184e45a9bb7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.1.0-saga-relationships-f7699da63d55631283945a52d437bfbd4333ff85.tgz","fileCount":39,"integrity":"sha512-4skhiEl9G8JQGFuFAl4gxLRvKiz6lXrIUHKPYIJuceMT4fy08f0TGUXfmQPe8uTogkPinOZIO72Fl9RV5eVz2w==","signatures":[{"sig":"MEYCIQCx2DVJxGQ0tiaSicUs3zNe5ysV5A+VPxZQKwM3/VTytQIhAO2iVEHbCJNJgPm2f8/wNijooWtLaBZU6/KMt0WPWGiR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":261058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1VmlCRA9TVsSAnZWagAADUQP/i1y0N9Gj0sJ0UYVrhEm\ng4tbZiBSkYCONxsu/TThI7aA7qsLOcw4JbE+wkhlmvWSGMEE7dCP/J3FLBpR\nd611tKrrF79d8Z8WfD9LfBphC2q+p2q8/mICz7MKwcwO+zWPYQqIeJbdiqTh\ny+Qg9DGXcxGlUbpVa4ST6NIuzYJUroe4BwxF33pQbagj0drkGtMQIFRhJvMt\nT76qIa589A8Qf9KE7ja7HufT84wiHe1TsSz6oMIgHV3XhE24P9B4TBwf8qol\ndamXuz7cL87hZ/rq00B/n2Fo6gYET/eX1SvDnDLeOS9f+6YLcYAJW6pM+roX\nqiqyc32QnTHWyM7szTv7eXNgp+vOm8MDFxxRKOhDMvedMBcYPyjOMKepRy8a\nD+hrQdMFxld/E6NyVIrA5Tf0NWWpcNlyMBK9MTnM1l3giA+T5b9piAQqddga\nsLwlWKdWpxGLQtqBDorIwMxYwTlrgQCokLxKoRrB+pfuNpKW0SBA/HiGNzDL\nATnivzzHK3A9HhCFZQAptusGB4w2E8An7Th1nEr1kZ1ee4PzHCxKbS0MUzof\nZwjOuDKj5hwB3L5gne/t9IqOnnJ2Php1uXBIgMV7UDzf91C9xE+hSCbzhJU+\n/DP2CK1sBgB7TenHgGvvikBUZYCgDz4hFR5O9HMTLSIgFfLqWePVw+SDVxje\nSgHi\r\n=g92o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f7699da63d55631283945a52d437bfbd4333ff85","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.1.0-saga-relationships-f7699da63d55631283945a52d437bfbd4333ff85_1624594853194_0.0006197722388296967","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.1.0":{"name":"@balena/jellyfish-client-sdk","version":"5.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.1.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b2b5f1b75b6e6da75961c04e4a1a61e44747d3dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.1.0.tgz","fileCount":39,"integrity":"sha512-VBzWh4WQ0TvvU01AQS2ExEdZEgreMFpAChpKZh3sh29/VxUyDXn5BTORmKzTwJXlPUrsap/vlvpeEAsTVvReoA==","signatures":[{"sig":"MEUCIC4739lHzrNTrLHr2fTIyUobs0hyUBw6p1ijXIl9WUQwAiEAwCcW2ICFpJTBnlNo+mxxqdUwCYY0ujFXaVL/pmQ27AM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":260998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1VpkCRA9TVsSAnZWagAAtPAQAIjhKZMZbsV+uv9GdQYD\noBpryLLpOnt3nE+damgaBAF068nMDv+pTXq6X8e3Q+cFPWS0+YIvRshZZpuv\ndnn8ZLuKokc3lB3vX6YgEP84HJtDMeESLi+PxX+NNjvgqERIUTnfWRpmqzn1\nlu5ujKwoFAzTJsjs0QLuOT6Kft7av5lUFTuP3XUHk2/8ybW5mdPY6b8spSjt\nTpEkycT2j1U5KtbABiw4lKfIiT42/fmX/s6SOehbtl2h9ZdS7rhYG6Zmzyog\nfel5WdYhxklWmVjlMvpz+wxeZTHag+wH3KgTB6Dlo0eIJ6Vgf4mnlqtL9mzE\ntDQlKLWLhKfD2XfVDJxu7Rc9g4zJEt7iVMbraqZeVXlE3F4TNP3wkmV+c5ph\nFBvkPDrGXY6Vfw2GeTEruVdwXIVydaEl8hz+78LeO/MiFwTb02w1c8B64B00\n5R5aQaICxP/6yRHlVlYI4VuTJjWNiVi4JoCoPVfyxuMz8h002h0A48RB9D0J\naf/ifOBxwLayxHvE1tBxJO+MqnVpa1OlUkolJeStcfGIqEmMsqbCJVJYNAeo\ns1M5qIJGLPPlDkuj6KTG8/0rAfD9OqG8moGQoXaczQtgvKu7ILYmR6uPWUIU\nTbEtLKw6L5+KKRihKcv2psA7R8OyU8V1pW56jWpyU8cDlkrsnKZJCFaiDp/z\nIhsg\r\n=yhJ6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7bbc183c34c6d190d8ec3601bd765f81940fd3e7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.1.0_1624595044152_0.30289284267872363","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.1.1-renovate-major-external-major-6e0c04f03b0dd8197cdbe9cbd28463cb6d7a45e0":{"name":"@balena/jellyfish-client-sdk","version":"5.1.1-renovate-major-external-major-6e0c04f03b0dd8197cdbe9cbd28463cb6d7a45e0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.1.1-renovate-major-external-major-6e0c04f03b0dd8197cdbe9cbd28463cb6d7a45e0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bd8269f8ab21c9a93684a6572799a1594da13d75","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.1.1-renovate-major-external-major-6e0c04f03b0dd8197cdbe9cbd28463cb6d7a45e0.tgz","fileCount":39,"integrity":"sha512-UDtxrB79aeXP1Gt397KjB8SDvTRus/upT53kodjcnmqAS1ZcXp2/3ybAVjDXmVtgppe7Wfvg9thJgwlPZ/whaw==","signatures":[{"sig":"MEYCIQCTLgkdr7NWuILpFcsllRh0N6Pg63ozrMOzSjlNGckUXgIhAMhA+IwAdouF/1q1bxImYV+jEgcpU8kiNVGZ5B2W4sw9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":261158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1VwACRA9TVsSAnZWagAA2agP/j7U5OR4badaeHQOvnqg\nmVXWxp48uYU4W78Scsf2qM86iEN/1GxRRVWUscQY6SOQV21FznGcyg5R36h6\nTJ2vZb4f65PEBZCTGJNX2/IEfI0eEwEzTVL1w20a6SrRASEEbNb06NTr68aa\nIWQ2eLJZK/E9RzPLAkXTosy5k705ST+Fh5bYA2MSLF38MrmzI/G2QJyOdfxa\nPEk8UnQX/VM1zkIqGJLKClK3jFuVHEKCTErYqHbtYofXHxhuepp2oyaTtmr9\nI4keWrOqCPPY2iLJ0FeGkgz/lp0EwLzeV6amLmeI/xvVl91ZAAlmjsNIiZiM\nRJPdyw3gZC6dInbUnx/+z4on5okc4dJV8TKieNadWfw/WTIJSsI1OTcf8mzz\neObj7mpVuABYGK/W+Kv/Uzt5tNyWBOLUm4tXkgYpPrL8DRvJz+U+npw5/GNa\nquICkqpGckCcBB6fiQoN3QFEkzV6asGQ4PvlU48kq0ZA1pqLYwf/SlY/nRWl\nn488sR3SqOeoHaQGOcRVXgYY7ImlOrpP5GZQDrv+DQuVcc8OSsROFiiHW3D9\nFQAEVKMjy5vIURSfX9L6eW/HoMqjU0yt5FbYfqSGLAJRfY6++q3ZLJc+NlDY\nCR+XdX9u09v3tehJAj7wBX04JgHy2AzomKLlZvlUe/9+PjsM0RJLkSijLZKL\nakWD\r\n=E9RQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6e0c04f03b0dd8197cdbe9cbd28463cb6d7a45e0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.1","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.1.1-renovate-major-external-major-6e0c04f03b0dd8197cdbe9cbd28463cb6d7a45e0_1624595455773_0.7231843899271106","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.1.1-bump-depcheck-2911fa10f6fd4e13a0853f414e552a13e0263eea":{"name":"@balena/jellyfish-client-sdk","version":"5.1.1-bump-depcheck-2911fa10f6fd4e13a0853f414e552a13e0263eea","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.1.1-bump-depcheck-2911fa10f6fd4e13a0853f414e552a13e0263eea","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a9027b716ab752fe90cace401add5856bd7c0f93","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.1.1-bump-depcheck-2911fa10f6fd4e13a0853f414e552a13e0263eea.tgz","fileCount":39,"integrity":"sha512-+esETNnSCuTMM0+Zm3neYLFTzUjfSWRSJlu/ulZFRRW0Ncn5Oj773KLq7cPEiGxftiY5GTA9ctJBn7OfNL6BFQ==","signatures":[{"sig":"MEQCIDjXCl1KjefE8B0GsiIQJc88tJmbhoSe38WmFHnyDokKAiAwgHAQxt9wwSwsDdap/sKB2PaIFETDY/yR937yobnckA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":261118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1l2CCRA9TVsSAnZWagAANxsP/R6EYvnMacvlSb/pYIcv\nGJjWEZxBaGQ/bfM4LIA8oXj6kG9ZiAslFg+w7hNg1y0yB51928rqWC+KnUBM\n1yaRnRtfBGV4MeHGqtQXlOxVrPV7hZw7j9Mf/8dsqN8kL9YceVlB3HTXQZEG\n2O3ZVrxjrI/FrqbtCM5RxRv14RATgpWp7biFmiEBAwIz22hrO5CmHVCSvPUx\n9xjsvN65Q219eTzdoQWAi8YWMDApIFgd4gum/dL1VMVy1FNQL/OQLE7D6Oge\nFb9wkH7HsG3bSdUReTbGpdnJP+JwCR8+Ga1tsPj7lvtzRlqT3cUp3uh4IniA\nppvqHIl/whW/uPKJRNcgzXQUQsR+FtMFJtt/egkQJ5N0wc1HrHQUxTAkg7p3\ntnwbaTy9YqXoQN2nQb1zgxvYmX4MWhwz15m+JJwkP3JHx+icNnVeYRGh99OD\nAGka3WA4J6AyyBu8i2FMyWdhI1xDnZUxDzuHJlJyMbXPE1FKhXRtB018hMYq\nhH4WYHPI4LojDG/IivsmypLak/W0tFtxZQ58HR/pwHTc0muyi2JwvjbNFvcs\n9DgIyTx0dXYCJQWhme3BObGgVuLcett0ko889Q/4MJXM+7rnhGjNJBQnetuq\nH+6bZOI6Q12Nd8AN8rd+a/YzTERY+lV1+nVFc7yHmUWEEm1ZvsGBx/Ch3mz4\nR3G3\r\n=gbQc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2911fa10f6fd4e13a0853f414e552a13e0263eea","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.1.1-bump-depcheck-2911fa10f6fd4e13a0853f414e552a13e0263eea_1624661377777_0.2357274077149718","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.1.1":{"name":"@balena/jellyfish-client-sdk","version":"5.1.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.1.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fdf65e743b01ec1f5001a37a1801b46769c0bbbc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.1.1.tgz","fileCount":39,"integrity":"sha512-8ByP2dd7/hcboIwj9akbi6HY1I7pRh1HIt51fzub0mPmZ1QgXUQRWzVaj5jtEqIZVwHvkAkYwgQGPMxwN2kfIQ==","signatures":[{"sig":"MEYCIQCD3tAq4LKy89BUcPXrgeiZZBokottbIIMl0OMU+/1UNAIhAKuErY+GUtlqOiZ5LHaBXA+BNC0disygS3uzl98lxm1X","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":261063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1l6JCRA9TVsSAnZWagAAAQoP/3+uqX8RVTx6//hlYxeZ\nNMWj7daFsILeWJFnz9KLTGNP4gZMrFr5R0ikF6Dl8vcU06ARWb+tnpmfNKPM\nJ7Du/lb94BFvkbgjlvawszKXzr1i91uS2oNCeKYqRPnFygr3WQu+6GdaeShh\nyGoTIj7TU+TvcfXASyFd8a6bIOzjZxqjvGGSJEeVztL6Jw852yYItRHyHq8e\n7FrVuqOuzH1fu53EQMD6I+1d+46qmVnfkINjEmrWzUAEe3SygItunae57WXN\naXBg35VZiKZ3bY2wCHsPXTgpCVcksn3DpixVcY7cF9ncu25QMCRbS7bB+1dR\n5iWXOp7yaODQ4IXePjdJ4o7Nsf3cnpuqKBbJgParOkYCbYtWRJBBP9DTz0+D\nzPk0ZarSLh6UXWWCZBCnLXeth2SjNdBkTbY+inl9yyAexiTawj4PXMytnIFY\nkTmU2Z6kmewd+ejX8Fg4Wb7olaQI6w/MD/ISbyvQKYq6Vwil6lKFAHwDMRXt\n1Hu2jEoYsxYOrL8NosXrgDH49VU/wWIspsFQTRck6bBiQc4b6sI/ku4/omMS\n8e7dmW4D92/d3foz88QrPeqSgqcKWg2mkCbWSMNZNeN00ri1jXkUTGe5V+z0\nOdLGkwehqBxl1ng5kvp3RtT+xGEV/dJFm+2jm9NfB5TBd7fGq+6FsGw1YSuV\nsFqp\r\n=5BSE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ba8a96958d9ed7f5caed5838727ce23036d5592c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"12.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.1.1_1624661640899_0.7898595171362517","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.0-project-link-constraints-5a3942b6552207f29cb2110683f1d61091c8acb8":{"name":"@balena/jellyfish-client-sdk","version":"5.2.0-project-link-constraints-5a3942b6552207f29cb2110683f1d61091c8acb8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.0-project-link-constraints-5a3942b6552207f29cb2110683f1d61091c8acb8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4743a576172c65b9b83f073b9167a9ca0cb104d8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.0-project-link-constraints-5a3942b6552207f29cb2110683f1d61091c8acb8.tgz","fileCount":39,"integrity":"sha512-Ws4NLqzt69RUygH8kgQG9A9ELbxCtAXChlVx9ZDVE6aeThe88iVisKG9P2+jUFdVwOMhPgrboD/fCVdsCk/51Q==","signatures":[{"sig":"MEUCIHRcHbzkeMFZmoN9E6rJWvZP6UOevO2F3KaeqAedCXIQAiEAocOs3og2vcNYty3bSN96RPUocdavhx5TlBJGNXte0iU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2qVsCRA9TVsSAnZWagAA37IP/3j1RM4qvSFrQb6/gUv0\nOFN1AIFf5UxmRuKfWfMrY4TVTMtWf6G4tbxyzBswxsoDi2OkBHwZv4D2gOEv\np7qPvBiDU9z/w7DrDKLdngs9HRgs7t7OrOU5MzRsLiXh53ZYKijx3iHiL5Rw\nFlSjqLckkmV/A3d2OqNK79rOzPPrYAA+uO2SONUkSbWNjaUB1BpFhgxMDTTU\n2rLi/UMl2QTxugXoNZdychgKBJc2aHXZPM9i1n3eVYPtqDGqKK/jz90c8N2j\nzpUv8ympzG0lI+dQ9ewy5GXVMPzjUrkJWLUJgivprzPFXIf5wR0mRfz5Os/0\nyAefdKS4/qrYdZhRAb8jRePF+MPS2X+kyl+4jh+SPVRd/HlwjOyUIZWnAHet\nbhJzKrzYkEqwt8lClYH5mPXP4w1w1YeBDJpyD8mopW6qFnPkffEqVn/71hfl\nniBE0A+9/pFV5/q+aG1fPgQrWX7XKTg7HptlASMCjJ3ioG+Aw6+x7DiqLGra\ni08PJUYCMVxJ6lK2E+iJr5tVp3kuIIPTgv7EP+XC/T/cn1NsHTpwPre9iqzS\ndvsoNCHuc2F/ps/qmjmvTgBQQQ9G+SLqOZUv5WoD/BVo21sXB1v+wr2ASesY\nZffAOpq3NO7meCKwYOpFD3UyGHz8Z+1r9i37tWmyjjri3SJ7SvD77RopttTy\nLNBz\r\n=w1tU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5a3942b6552207f29cb2110683f1d61091c8acb8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.0-project-link-constraints-5a3942b6552207f29cb2110683f1d61091c8acb8_1624941932121_0.09727331300832964","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.0-renovate-external-non-major-77798a2cb375bd5c5809a216862354380fd87f09":{"name":"@balena/jellyfish-client-sdk","version":"5.2.0-renovate-external-non-major-77798a2cb375bd5c5809a216862354380fd87f09","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.0-renovate-external-non-major-77798a2cb375bd5c5809a216862354380fd87f09","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2cbb5e410fb2a5ad547e41e591dfaa751d680069","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.0-renovate-external-non-major-77798a2cb375bd5c5809a216862354380fd87f09.tgz","fileCount":39,"integrity":"sha512-q/zSwtb0ls06TAoDV0/zOGTPFIJmfKtyz6Wep9aPdjejciZv6qX81sPpaVN6uPDlVdJeAFSHVY4txRakREFgpw==","signatures":[{"sig":"MEUCIDrwfEoiUDnKT8lbvXMi6hi/j4mZH2JAlRNr03ArYyL+AiEAr/Ap/5Z6nZ5kP4cxVXivovZisaTCU/09v6cJsmlr7tQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2tTCCRA9TVsSAnZWagAAlGkP/iZ0I5fdfMwYuu6S9nns\nlYnEKmWgxOVzTUreGDNbAvtzSwwZM3H3ZI9sazIyW3qBmk+v46wLQ7Dl5lI4\nFQwKhPZtuuJG8fPEBFIataFzhgaeRO0iRCRLpNf8ymNzxWLa3cBzOcL8En82\nvY/LLIc6mvQ9FlAq+Gv5c+wOUJ64W4msLOQympJSZQhcutUFizzvYo2xMlA0\ns3uG2weYGENo3OjehTFBRXDwOV50dBx8sD51ogH09hPcSF++UdsWTB9owsdJ\nBVsSYYHjYI0+kuFH6yZ9CFXDx5tKDYyERsI4qgIdHAhsi/4aYRXlFnhh8C2e\nysZHsQFp4AikpsTgw4x+RxUtGM6lkArOy1u3EnzgjzPuiPUbBR4ApAJ1/7O9\nwfguhHpTS3KKvoQK4NTBbDsbgvVI+AhsNAo1TO/zL0Aodi6Kx/FvHMjqGdwl\n7sZGeMLg7/NkHi80T+eDA5rVpG9fF4W7lzhdwHi22mcZ/sdFHKqDXhuTIBXj\nPndWtZmATh960odk2isZ2BwbiV8j6qyVZB00bNfPriKl2DajWKTKGcZvIoaq\n9LGP+NN3vT3UywUBVx5fmVD23ukDJdwjh6sHSU/E3GAZNKXPAhAflZCVWUa/\nfSu0z+8uk99PbfB8fbH0UNDcJ+jd1jTLBv9oy4FZADcxAlCvJpon2Dkp1CXY\nBpo5\r\n=TrBp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"77798a2cb375bd5c5809a216862354380fd87f09","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.0-renovate-external-non-major-77798a2cb375bd5c5809a216862354380fd87f09_1624954049613_0.32164521269805446","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.1-renovate-major-external-major-3ac86ed97773b952ec86574fb1ba063efd2e25f5":{"name":"@balena/jellyfish-client-sdk","version":"5.2.1-renovate-major-external-major-3ac86ed97773b952ec86574fb1ba063efd2e25f5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.1-renovate-major-external-major-3ac86ed97773b952ec86574fb1ba063efd2e25f5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5cfa9a805a155ae76deb97c8386af140b6995aa4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.1-renovate-major-external-major-3ac86ed97773b952ec86574fb1ba063efd2e25f5.tgz","fileCount":39,"integrity":"sha512-gSVxQUIAi8TcMAibvvxmI1Ug28PJU4Zb84KQkVz8AfD3TYBaxKlDuxihByHPTd1U27BqhjG0YGGf0q8KKhQXRg==","signatures":[{"sig":"MEQCIBtjDKPUhuDARAyGB+R8PYyvkMAVrDS80g7gDIErlwhLAiBevOr5vsgz6lujUM+cHzL9eAheg5Y8M5UfAdrRs0so4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2tV7CRA9TVsSAnZWagAA4bgQAISbWPrnQCROB2+MWdwg\nN2Cr+ClKr86ZwSRvvPGz2TGHAKnYhHX7j34UrjWBUrUFwo7BpRGd620KOZ8g\n2ficI/reAoyPnraM/VCyCVQ9W1OtdGFmU36iBaf4Y8CPl8KhcfcNhfRL79J4\n0ouN87rDP2E9wbuoMT81iF5jWedQ7yz2E/PQ+OaqfPBqeYI0cdHsBcowOx4N\ntTBsRKfUwuFdTm207HhoXwsqvXaVX+b9/JydrFNLdhaa8ss5ulJhXsr3EiLk\nnMxBdvOjI1+mWH9O+agkmQ2397wMk8wBJ+t3IX4Q/La6FYtRvSnVkXdEme0e\n4RRBWaxNfMmDYcPDz31iNsBidPJ6WlhzWP66/I05KoniSBXCgd6bsFP150lc\nJp95tieAepdZse1lVVHhhAP9z3bPD2iNlLfiSnlzx4cnTDr/e2CSQDWwKJMi\nDFAL9Q4iXKb/LLPyBA28pV5SciW1cj+ENfjq3KDEZdQZM3yvVp2STOB11+jw\nFR4yI0EckbYk2HSsaQyBiptBMtP9Gz6sUcX8i/nyNyofW2ZTwQqPJwsjv1K9\ng6d97EC2Mg4H7r1CvAsf3CslOWXcdwYiQpTe7MDVGJXpTstusBjiHZ1xygE+\ngpy6crXnKQWoua+j1AATKLgy12XQj5EWGfHM1jVJJrtH0K2rZE1MjXKw5iNr\ntz4D\r\n=OKT1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3ac86ed97773b952ec86574fb1ba063efd2e25f5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.5","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.20.36","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.4.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.1-renovate-major-external-major-3ac86ed97773b952ec86574fb1ba063efd2e25f5_1624954234779_0.7951840620138444","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.1-renovate-external-non-major-a6b6dc3462b8a32b6999eb75da398eb97b43fe1e":{"name":"@balena/jellyfish-client-sdk","version":"5.2.1-renovate-external-non-major-a6b6dc3462b8a32b6999eb75da398eb97b43fe1e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.1-renovate-external-non-major-a6b6dc3462b8a32b6999eb75da398eb97b43fe1e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c7f3d227f3b0dd4867fb7781298bdca8051f3b04","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.1-renovate-external-non-major-a6b6dc3462b8a32b6999eb75da398eb97b43fe1e.tgz","fileCount":39,"integrity":"sha512-lNsQVJbM0mKEIad/krOR1QTKUNZTlohYhfRDy7zg+JToiNNQJqakTrT9Wkq+vfEID4MWNrtENfLXDjkQJ4kbxQ==","signatures":[{"sig":"MEUCICJhB/GBQVOLoUU56pCU0o2XJ72FdtCNS0Js8uRTXAR0AiEA5PSzvFN+1u+LE60VE5qPoSl1hAMo8Iy4Zi44JJOFFOM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2tWUCRA9TVsSAnZWagAAg0YP+gPL+HwQ/1LZltjg87k0\nAR6bXpRVQ8eFI5+dXapKAUfEB0dp0uyovqhWfsqvMloCqJL5Lj8YNxXH6F9N\nmMS3/vfqU2+2d8aj5Ne06LInoIqxEchAT7w1RiUZ8pP0H0J8wa3xsb0EcwQd\nLJ3+ZilSr+rIUcA1192cOHxbld2rn2NsvQbvLGeJ5PQmpGZhxsE09OhDgOHK\nFOsWQ6uYrijZTwxqk8yprGcYvCFSsVJxfbF4i/7fvRpHInOtLGLtx4/TLUD2\n8n348kL7M+14jC16YEPfEm4SCwBwlk6zWfIMVYLuFqWe+LPdmNAtPM0mMbT7\nFVxAS8JdlTbGjeeUkBksDZWCSGpuyWescXbhB+FsHpZZ8FMsGE/1FreOyVwE\nPN2bHQJqNephk+qo5qXjGJuR/oVm0HGXe/6C3pKNaXCLOF1n/YMBQysqkdsC\nHQPZi79g9eVcZ/GzzH95CNC+Q2vU+OYCv+Lpqghpekv5KKGL3KSvfHI3Ofym\nIP+h29BMehkGnmHSPiSdZouAUqUdq5pVfpUrJfrYDBmjzSTUE81RG/RcspVB\npvNyLWicZF+5c8nvlk8M2Qk+FW+1UhhVhc+vZ+0f9yUUnRFUjaouo6bQaSws\npY6JuIL3CDGNXkfiCQ4hgLBgc1D8N8f1R6/J8sMVqYjAxgJRwEN51l4mLlw9\nv5bN\r\n=XB+8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a6b6dc3462b8a32b6999eb75da398eb97b43fe1e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.1-renovate-external-non-major-a6b6dc3462b8a32b6999eb75da398eb97b43fe1e_1624954259652_0.40185844811754445","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.2-renovate-major-external-major-95b053a927067ee022cc3ee138e263d3f9d7dc24":{"name":"@balena/jellyfish-client-sdk","version":"5.2.2-renovate-major-external-major-95b053a927067ee022cc3ee138e263d3f9d7dc24","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.2-renovate-major-external-major-95b053a927067ee022cc3ee138e263d3f9d7dc24","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d4e921a85eab675d81fb86ca8a8e67afac1c5263","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.2-renovate-major-external-major-95b053a927067ee022cc3ee138e263d3f9d7dc24.tgz","fileCount":39,"integrity":"sha512-8EdHgHrvH2vcY2u4Lb3zlg40CGMVS5chLj5emYi1B4uVCziEoVVTQtw1F/OaT5zxMieFOIgbv9VEFRKG/AvqlA==","signatures":[{"sig":"MEUCIBTEPCYM8m6ikVJkVhAh4O429yqCy0N1QDv/B348HV08AiEAkV6aIdtqb7SsGnypw+hNJWXcUHAP3wAnGr4eo4lxi08=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2tckCRA9TVsSAnZWagAAm8AQAIzpIoApjYeS2APbExF0\nB8gVaNSUfDzpR6xGQsSstwAKzd0QkP3ddzJrZOQOZ9LX65khCEXYk2+3mNDe\nBptThM483963egNDvp8eeg+RD8tVzQvhIyKCOEM7TJX8fFrCbaKFLfFh4gQb\nZ22Sn3GBp/TrDjBob0tcMz+aBNB+leZHuJuJp+mn3Si7ZRoTywjvANtWODOA\nSJllp+A/U0N2Q20XlyZVPhq8NniMLe+BU8BqMxkr2oOtXo5h2poDkw5QTNmq\nTlMGbpiYtPtL1HaVhLkfB2W5x6budDjyE0UI3+zQVAAgvDU3kPsz0jGuc3+F\nGYoqRJ4cYEOMNauYdFlXnUPOZNTaZAGxiqARwj/Pqg9W8fE0K+1GsBbOeIOV\nr/gLz24D8nIotjiXsR7EHMfBDPb6wi48LAcodNOuTE8xL4fpV6ytng9v4AV0\nkKQqM7qAX25nha10nNk6ys6iJZfUDEySjN1IrjuOEJbg4fR1T8eBanu95qb9\nDH899OhAksh86UHmGMcVdotqriWL245i1ZcqU+whB16Kv8P+Xkt5FpvJAY+i\nbvje9xGQbvHW2xZV8DetwAqgvHiDywxamJ2hMT/KIvD7yo3DxzpmuiWQquwR\n0MXoSXS7jK+PCQIPec84Mz8CHI3TeVytlC0T1Ii6etVAdn2V+0gXFbGvGSkH\nKZ/4\r\n=aRoX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"95b053a927067ee022cc3ee138e263d3f9d7dc24","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.2-renovate-major-external-major-95b053a927067ee022cc3ee138e263d3f9d7dc24_1624954659956_0.44071772553406596","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.2-renovate-internal-patch-922f6de6481ed4ce5b7507d8a91f8dceeab18838":{"name":"@balena/jellyfish-client-sdk","version":"5.2.2-renovate-internal-patch-922f6de6481ed4ce5b7507d8a91f8dceeab18838","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.2-renovate-internal-patch-922f6de6481ed4ce5b7507d8a91f8dceeab18838","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fcc28cfc405e0fb9bc9155a64ac39691221294a4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.2-renovate-internal-patch-922f6de6481ed4ce5b7507d8a91f8dceeab18838.tgz","fileCount":39,"integrity":"sha512-LB1UH26trlT95c9rbScCjkHaLpFVVt9n/UbWJCNylX2HNdTBLShkkYq2uoA3syOH7mmcw+/SYraFCal5xxKvcQ==","signatures":[{"sig":"MEUCIEAlhyuviyH0MXRe6kHXsH7v6NISkYMpVsUj6Bdsqd3yAiEA5k5WtiwDKCWLfl/eUKSg8+/g3rB/iZug0I/52uHgSk8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2wp4CRA9TVsSAnZWagAA+lwP/isENLxc/Csh7RH8Jmb5\n90PSZ3Yv9Ag1VejCeliVBbwNq5LUgugayWT2ZnFTTLdRkp+zYkQEIIX2cfTi\nNE5qIMHKPCRRzB2V/GXnJamYlV756Vh8S5ZV6s76lLo/nmCDrMfZqjuoSSW7\nfAdb1/jzcpdlWRZAKtyCpnH+wSeDQSkhVg6kk8s/+BDrPlmAuy3q3G4rOOcR\nD4GbHciTArKq0bW/hH5ITqpP8ZUtAmwighj+vNHkYjkCwq1p7QA1njWyZNxz\nqaMcInhdN1nxKuFfYtPBDB3RCYSuaVMJ+hCff5fwv6zUXYIgPD7a7PVMXNBq\nplWQovPwUuSd7eCLAqOdmOEjzW+gwWdr9vZHNvvW+DzQ4r0eZ8QmiwuRQ22Y\nU5S8mbbGeV+0q73KCq4sN55KaXz4eGQ3p+SE9Ahb6T1OgIXqUz/ZBcF35G4U\nvxegJxdExUKr//ZO+Q4cWXIa0SuNJ1qXfzTGqIeMpsNknAlY24sXiBfYonWI\nAm3qjaBmmpGmKb9l32BQkbXiLPMOgMSE0JNmNXllAsxBGQwOG9o89Or2z/ih\nFnWjmb1uBTvBIq7K9kP6EOvHVLCRukgPmuav8o0IdVsHs2BVOrqfpmCLjwTA\nv+leg7DAsQgLYkjuSra+6XCFV/Ge7Zy6j/1dbwbYMBJpl2iu+o5w0ySCHMTV\nzH8q\r\n=yMYJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"922f6de6481ed4ce5b7507d8a91f8dceeab18838","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.2-renovate-internal-patch-922f6de6481ed4ce5b7507d8a91f8dceeab18838_1624967800245_0.13811788835682015","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.2":{"name":"@balena/jellyfish-client-sdk","version":"5.2.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"76ba8d91f8fc60360a1c2452c16fe7c737bfcff0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.2.tgz","fileCount":39,"integrity":"sha512-p/ZOEl+MIAmL9US8qU3w2v4tFVneRjihN1jO1frosN3DCx2EFEO7YQtx9fGCIGMj+/gt/YUuI+uKDapQKcEWBQ==","signatures":[{"sig":"MEQCIG/+QDAf9a9nsykZsbWP52nbj/afHtwpHV/e3v2w+agHAiA05KXnckNcdaU4/kV8qnestvlLZ/K0egMjCJzgBUxPqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2wtkCRA9TVsSAnZWagAA2nEP/1a+Wjl5NFaeIOwdOmrt\n7Cee3mvpWlZFTAInpC0C0nvJrKsPXIiTHeOzzIn0WEdAMSbMiYcE0DrunBwd\n89pFGrVwoWt9vikKYsQ9KUY2uVehArXIFDgjZ06wLu4wiSUfXr6/7UwRO32W\n0tsFIOQB4SbF/fr7qcU70MTsZbHtmt8dZq22o2SmSAF6oZawLz6i+F/4tb7N\n0C0CAgUnW5s52yO7ufW2++hH/x4YGRSTSGlSoyB/Xndkn4z68xxJouasjrGJ\n9R+egl0dg5sddhUWLvDHZfPV0nC5b2xDByFqI09X4TKjbOoICzxeuAb7JE5S\n0yeXVjSPxNR4kZr8kqGMMsoGV+aaK6e65JQhLIiQxyNh1NRmFBhV/XDzJubr\n4mmd/hcl+ncy3G/L9uLOeBz0QepP1CjjasXxLnOD3Ma8smtVDTYa/WMNYGeG\nA7EDp0Mf/mFTO8KnGerXRrspZVuaL5xofY5fSfcxXuxUdVtoElKklRsY8UXB\nvqBWzqfbfguxACDW56uaKCcm868MiQoYCM64FgUXOiBigAd5ff4mOsDvO41c\noJNoRdAslDKTLu4d4raHoMhRNZ/tQbQHeHWPN7HaiFcZsk7Z3Y5H5+0qtn9k\n6uBm5VRsZlivBkwsMbDR5FoA7B3n6JETyUNeRGHLHRqExk1PSQ2NZWsi1aI7\nS4dk\r\n=2Y0p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"357ff759b205e3edb32c46512c4d6675cbbaf1c0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.2_1624968036074_0.12057674399673046","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.3-renovate-major-external-major-dc4ba64290baab4bfe64d5a093dc7c72b8aa662e":{"name":"@balena/jellyfish-client-sdk","version":"5.2.3-renovate-major-external-major-dc4ba64290baab4bfe64d5a093dc7c72b8aa662e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.3-renovate-major-external-major-dc4ba64290baab4bfe64d5a093dc7c72b8aa662e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2a6df3608031e33406dbab8b2321979c5ea06eeb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.3-renovate-major-external-major-dc4ba64290baab4bfe64d5a093dc7c72b8aa662e.tgz","fileCount":39,"integrity":"sha512-w9Ck8FvUcH/X0wJ+TeTEcGdMoPHtbjI2dc7ozxWCH2LC+8CBH4HzmhH7kd5i3257JdDJ4IN8FFCeAxKDxflqIA==","signatures":[{"sig":"MEUCIEs0TYDw6u200sZ9R2JU4Exz4kicLBqJvElbYL/IC0hOAiEA5mkef//NstguRselElv+JLGLHpYHsDbM/dJ9rOKmxlc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2ww7CRA9TVsSAnZWagAACyIP/A8hmEoMOGPNIQYUvfgJ\nXujao7m2/5l09TOOp912aDvKh+VQTVrVmD9cm7gZibBWip6gVoT/HaQ1z+ub\nXfUwL8N8yG+6oitQ1eVVEKKpPbXqTICUY81AMjLf8k+PKXJeOmFqL+vm3Z9b\nYmQTb75gGCaHZtqozbG/fJqn2JcNbQRGHvfiloOTyoKxd9oUwT/wZX/G3jZ3\nTuMVcMOtEmeL+KPlftlrHqxCMLqz/IU1TMhQ/pD3H2TVRcHe3QnpjM0e4N/8\nVNwUdgYHq55Jdqt2x4HrMqptmyUiQSbvgOLWevjIfD4axjqIFHNyAKLo5P5H\nJRkDEXulkkgvcTVPfpRQdV9XDfIAIq1mbH2NPRVrjMPVQ7byHitI7TeJm+OL\nwkvpiPurQKCK9oNeNRVOxND3RK9zS3gplc9SxcvY6EWOXC5WVH4EKI7hSsJa\nShsU6V1CmrZoCfeTic4jBAniQJ2ZQBYR7zoJskOP8TY8VCUuCW4Pz7pguXSv\n6nGhiE23rwdTz3pD7j/0U1bnH4ePG6bqwmz3WXbQcjvb1j2DvkLgNq4mbieG\nXS6mvuDebdxdrg6gwgH6bUQIrMRYk5PUo95qOzKZLuae4UUfSzybxSFzAcG1\n/1W54kXyJwCM9qo1WpYJsE2UHbjR21BSD2VN3WPRabW1fDU9HPCdt4pUcpON\nhJdP\r\n=fNyh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dc4ba64290baab4bfe64d5a093dc7c72b8aa662e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.3-renovate-major-external-major-dc4ba64290baab4bfe64d5a093dc7c72b8aa662e_1624968251174_0.2833405363657606","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.3-repo-sync-jellyfish-config-default-1cccb61a7d5c0cf017a1cd4075e69e3e3d5b4366":{"name":"@balena/jellyfish-client-sdk","version":"5.2.3-repo-sync-jellyfish-config-default-1cccb61a7d5c0cf017a1cd4075e69e3e3d5b4366","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.3-repo-sync-jellyfish-config-default-1cccb61a7d5c0cf017a1cd4075e69e3e3d5b4366","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8e593cf3560c5050e2afb2cc7b8ac1d65e0bbe36","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.3-repo-sync-jellyfish-config-default-1cccb61a7d5c0cf017a1cd4075e69e3e3d5b4366.tgz","fileCount":39,"integrity":"sha512-CEI7f0CZ2mqcuQmo2YPi3/yURjyx+do/Qgsofp43NB3APHRJv/ouibEnQd46PJ4R9rBt15GRlS8VESKTco4/Cg==","signatures":[{"sig":"MEUCIFW3T+Rt2LfsNKx9a/9vhVTJfGY+t9nyp4QrIUMa5ZazAiEAkVOQp6Ybvb84w6cUcYHueeaNch63XPfMZKShxWyZDrw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg28osCRA9TVsSAnZWagAAqE8P/iZM1ElhSRwtRF0j0+PX\nWxcnbwk6mSY+ee94Ek9W1R8+P5A9n6OJ+bTqpAjoVgOal0TcG/agn7TBfgU2\ndEVCj3Q6a/8j7NUH4OD+gB/SOPZxd2NsRkPqhgUT+6tc/0lBKC1Ptt+QaIuO\n4u7FYnbjnL97mjpn6+CgTYytcAkYJIlqtVtz1iuon+beWFeI3C0pqFcEdXRw\nZIgLnyUcc7K0nSlnEQ3QsQ3iKFIrOE3Ny9BtttxFGZBwyehlW5WMFwKbzOHE\n4yFhuOBtW/DXBOrCodljplpEQZMMDsPRWYpWc5Q4UjKXwq+36tWJL+5NeXLR\nvI8e/ZUYtTzlKTt+f1DG9qPhxpnzAepO6bu5AivvECfU9f9usi3dzIonyESd\n6yN5PhMUz5A9Z+PFKfLa4v4XSZInqJV76upUPsBd8xp3kub3eFiRrDKJky8M\nLytFvjg/N1BXvSp6BBOOSoe4XtJt64hD8YaUxSdM0Ii/m+vF7IRbTcsyvl+y\nC86B1Ay5FWKimXAJMGOY/hvfwrO2NznvDDBUUDx+7fBBlAlAdCGfFR7P8TFX\nw8/DIG4pHtnIqrcC0n7Fn8JFVNHZFNwjAv0iW4oKf6M2sMgLL/HCyL0vGN0N\ngI5uot7QneDq8UGl1DgF1MLyVzM1Fzcl9tT1DDnl3GoVR+DhxG1poMJOfVKJ\nwbd3\r\n=ln8f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1cccb61a7d5c0cf017a1cd4075e69e3e3d5b4366","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.3-repo-sync-jellyfish-config-default-1cccb61a7d5c0cf017a1cd4075e69e3e3d5b4366_1625016876258_0.19661434651204135","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.3":{"name":"@balena/jellyfish-client-sdk","version":"5.2.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aa95f266b3d6f5451f313af5258a7dadc30ef8fa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.3.tgz","fileCount":39,"integrity":"sha512-uXo+pvpq9j4xht8A1Kn0hc2m3EvOTfIuqOqYryCNAVXMwVnJCXgKdTqVNmEYCHeBBcdI1qYxxnOjO0sxvbhs+Q==","signatures":[{"sig":"MEUCIQDEsY/GWp2z24JirnrpMUm0bNeF4zR/DLC6IkD3TlE/swIgBdWn3yE2sNlIKdWAiFe6yqFB7N8drCbEqU09CPvkMgU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg28sGCRA9TVsSAnZWagAAKoAP/Aorr1ySYckgh1xISkok\nKeZr2VdTCJApYifZqPVT64KhXGJ0RCaE6V5TrKYC9Ndv9ARr+5QMOQKixT49\np/L42b6o6OzDBdG7cHx0iEw0t548nt9giOrgTZ3yBzJ6DI1CUXbsnLPpcY9v\npizNlmFeLMK865ZcTZzWslglpHQRfqA/zK3DrVQ7/Cm/cyhDS+EuMqidAUM6\n0c1CAEAgnY+h0dQYFnzAjpILnwwD+eUNpPMuMxQLNxHY/o8C1V1gZ/I2LIC+\ny36pSyueXv6LmT5lXuCRR5/HmGW8F5Vt6Z7Q12Mk3W1s7n0T1Idm0ZwpLmra\n3cdgz6mhbxbL6lLHIYPY8yfSbvY7oHsxFH9zkTM/zqlqjYEJP30ufsm4F54A\nJWG4dHbiEvQP7C56YmpDaeTD9DwUx3elyOnNyqBhhNxOpWn+ff/40pgm0SNv\nqdLBxRCDUFQAuGmsryjr4MiQZoKzGsGWEXadfSWcRDv9tIQdu98cWhtD62hV\nwWTp6J/scbn18R+XdbsNLzeCsQ7TEqCKWmHpPCfGvx58HYfVvNLAQDAj2ihq\n2C99E2Lu11aqelpRN6BL/MQszB0E/glsyz4IzCY3YgyBtJ4s1r7SYZFPIcUY\nTJywwHaLwHr/BdfZeKpfmhZwWtGi48I4fHsALmWC8qskciKcUdQVieenIqei\nE/ek\r\n=tYco\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7d6a08c046247cba71a2014eee9225bc21c45453","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.7.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.3_1625017094108_0.42926629976653796","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.4-renovate-balena-jellyfish-types-0-x-26ebd395ce0f1343784584d5409221341a7cef2c":{"name":"@balena/jellyfish-client-sdk","version":"5.2.4-renovate-balena-jellyfish-types-0-x-26ebd395ce0f1343784584d5409221341a7cef2c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.4-renovate-balena-jellyfish-types-0-x-26ebd395ce0f1343784584d5409221341a7cef2c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bfd8c702617c894e92850eb48319eac6313867af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.4-renovate-balena-jellyfish-types-0-x-26ebd395ce0f1343784584d5409221341a7cef2c.tgz","fileCount":39,"integrity":"sha512-+Xx4QrRUPx+P3v7ASLcwnCdTMJrk1feUKD6/gEQ+Tph2Ss0bzthMzndjjqpvKKdWOSwF13Hhmj5Vqpxjk6qyIg==","signatures":[{"sig":"MEUCIQC027Ei3F+NbeF5y8wOjzxmthD48bNAgBv2wC5j6NFVQwIgX6K5ekzizq9ouUyAvb+ZfKNM+paZ2eIRbzebeyengts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3rBfCRA9TVsSAnZWagAA+KEP/2ZYla6b0cifkcmhhZHn\nI/8v8weW64q770IMnrJ9ylLhN8DntHqwmYXWShdtJO8lvzWW5O7yWO+CqeXh\nQi5kV4g74t3VVHo//q4dKM2sTBk1vjKAA7khwDLJEEMcYBoSiYk6f3ABb+Da\nHtaZIJ3lGPegBlrRoNgKNP/3Clz38FtwvytBcOdZIWfOyFExqYUEPgvCCV/b\nGAEVmELgZWBiF+KBB1v1e9DK/0ORpN1a5xOEZ6TyLvrtL/ILx+rf+QeQ8ALi\n3HU77NqiX+Yq9M0AAr+i2DPSEqV7Wq1Zt8oKsc2BZVdoESV8VA0PvssmFZ6q\ndrfEcy5BqvDotbA/TLl5KlE/JQK9oNMWi99v7RTEluAdWgB/1r9YY5DzOHl+\np+vitFQsvzmwYPbTwtpGaIQKLuWjyZA9hTvtCAryJ9AZb+3oT0zNkTkjJZjK\nqk+e7Wn5oadox7I2dKNIr7mOQxUZXs+b2WVws/u9uu4uO5l1Ji9yKuMIKeTB\nymxwHCPNXFAK3a6BW8ouriWR9mX9cV8Hg3NDETg0RZ1zlEP+9oAEMYIsYgWQ\nBz5MbzMUclTjLImJLZx/xMHSrTLFX77c+MJfPCpn4HKxmMdzZVIwz5JSfmr1\nKqmWdYHrE2CKiGN7hXrPOGXFacHh/n+NdENuowIYFksiHk1MtC2GUlBH3Cah\nA7Sh\r\n=Hxen\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"26ebd395ce0f1343784584d5409221341a7cef2c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.0","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.4-renovate-balena-jellyfish-types-0-x-26ebd395ce0f1343784584d5409221341a7cef2c_1625206879384_0.8896854175387803","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.4-renovate-balena-jellyfish-types-0-x-a2446595e3fc9808d9cea531ac0da43bbf1b8721":{"name":"@balena/jellyfish-client-sdk","version":"5.2.4-renovate-balena-jellyfish-types-0-x-a2446595e3fc9808d9cea531ac0da43bbf1b8721","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.4-renovate-balena-jellyfish-types-0-x-a2446595e3fc9808d9cea531ac0da43bbf1b8721","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"33f646646dab0def666b1a3d2cb18dd860ab451b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.4-renovate-balena-jellyfish-types-0-x-a2446595e3fc9808d9cea531ac0da43bbf1b8721.tgz","fileCount":39,"integrity":"sha512-fVNT5QKEZW2v5bCdnMxLRNLrwz4shwaBOg4BRKI0d83L6PAlAQh5vbESlMASDRY0UeRBTmtNiswAHTtRoDjoRA==","signatures":[{"sig":"MEQCICdyH7iKREUKOb01X+InTb3Z3vjVLm944zD/6DuAxY6kAiA9X2nuovGxtcIZqnJ8dYJIEHM1opTZ75Xn8RLLpAQp4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3sVHCRA9TVsSAnZWagAAoDIP/0aFBBMqb8WsBwRrfeBf\nMUaqUUI12ck56ZV0DZEC1FlMQgTqqq8nl71/14krxYYn3jWuN6VRp5ynrsLk\n2DpeyHUc6yHzzkcsSlKmOuXNnzR0t+AeLex4a8OoOW+ee+RSGZ/Z+FkLApfg\nDQxJc4cUs7Z3i8IiGh1sXrYzYPDgVUZ4Y0wlN9/5OpOGfJre/m45bFZ9qBW6\n0ArNEs0heCjY3qpgaQ82BqXVlorxibtyU2rch3TpIrYoHCo4FYEbzF/EPt85\n1loN144fVWe+MZMYrDOYT79t2sOs4+PO7ThnP6jiv5RZPlXhvkncIzy4kwU6\n/Gqh9lJ1yu3pRDXsDzDMIA/vbyzaTJDfJksMkZ04Ubq7WgN93Bl1eaaBdpYh\n57C8VJ/J9thQq+TTfPalI2BFKMEGzDo+XdMVhysPfD8p6z3DNrla+jGaAGvr\ncMV8f9Zi+Mmp84jchxD97j2ci1FYrPaliEuq0K396BBBQQ9f276AME3lzI3X\n6dO2wsLQ9n6x8KS0rqkgVQnLoG0vymURSBsA/9oQ+njU9vc581S3gr2DM4Q9\nEFC57HTybDpKUtX4EHLm8JTHy390cJqgUYwElOOUlfN2wBzJnOfAnVvHQMh9\n+/hQsn1hhbnjiwyl01yubi4gg3qoQeDOhNDMHdhPM855Wb4Wk2R9vYqJ+9uB\nN+1z\r\n=cx13\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a2446595e3fc9808d9cea531ac0da43bbf1b8721","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.1","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.4-renovate-balena-jellyfish-types-0-x-a2446595e3fc9808d9cea531ac0da43bbf1b8721_1625212230849_0.05664269678999423","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.4":{"name":"@balena/jellyfish-client-sdk","version":"5.2.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5c0cce2ce8cc183aa63333f9abc17389ba364df2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.4.tgz","fileCount":39,"integrity":"sha512-dJACV6KcsjufvB7uKzEec728QfWhhcP17yY5BhanV96fzIrKjSv32xVNd6RbD/BIwdFqDl+czvxLvTZazkdTXw==","signatures":[{"sig":"MEUCIGyoEu2zX/jtBsY9Iqwv/zDWc7v50Pw1QM7p5DlV6sYkAiEAvNTedXZfdITmjlQflxvr+wDuOu48PhPuM7Xdtft8ERQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg35MQCRA9TVsSAnZWagAA938P/1+exHEsEoiJZ2ZVCo9L\nljIKSRR5MDHF7FSWmuRqIafnCWzAcXeyVFRwaRxf/qPfvuKXwPENCAVqUBQ3\nw+DzZozPwzGF+68AZVhp/+LdKtHxGUP/Wt1e8B9rl3FCeWrDpiBQAEKxcyD/\nbwd1691+WQhlTvX+3hjOn7Cj5hdyOsGFRwzIMo3ScOvECne33PHd8DlJAnzE\nLgD1q61iigo18yqBFDq1zINPtJh4ox+C4kteN1CoEn1EzTpFwbQulUgDyhVZ\ngldM8bGWQW5HhQq/v2tgYhtXJrSsjyqpqQESR/sZSAtO9rf8Jxo3GVsX/T4v\n+7hNRElSKYCx+82kyMG1Mhk0uHWLn9nU5Cr0RUizMc45VddUdn/8FFAoClKN\nrbAit7vG2L74Iz9kvKGcp9rw0q6rtNKWo3XamfSJ8SYHJpiI27lpKCWaqlws\n+jXzKROsbs62lx7O1U4ixR6UAAiINmHszKf3bS7pmEq3zQAbzC90msLJrCoR\n6yxrnewyuOX8z4sn/4kDittF8J6POy2TMaTxROj6phhtwOaFt6G8khBlNa2c\nNILHdKe3JyBpS00gAmtMo/zVkm70MfQ5Hat44IkH1JWMBUzejLtIW6qX/4SE\n7qEDQfyIQUcDRwLSt8xSvelrQXPHrLp/eX2YQrao0jvJIYEXuhcp6nkbqU58\n1osZ\r\n=TdQj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"410e87e808e284eb85c116c5484cbf2ad75412b2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.1","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.4_1625264911316_0.07003134988080117","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.5-renovate-major-external-major-325b65774a8f1275c2ad5a9c2eb0312c06445956":{"name":"@balena/jellyfish-client-sdk","version":"5.2.5-renovate-major-external-major-325b65774a8f1275c2ad5a9c2eb0312c06445956","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.5-renovate-major-external-major-325b65774a8f1275c2ad5a9c2eb0312c06445956","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"30dee65a419e8e41b727c26622264458fd37e759","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.5-renovate-major-external-major-325b65774a8f1275c2ad5a9c2eb0312c06445956.tgz","fileCount":39,"integrity":"sha512-kKrTrp8Tjn95JIa2t9MTw+YJyVLhjv85VJGUz95m3PO18kbSCdj+rk8zAy+9krhi7PObu0pQbZDJDC80oGGzrA==","signatures":[{"sig":"MEYCIQDELoPaCQg7m9RKQFO8R20IGw7tHH7PAqEjBT38DHu6OQIhAJSWPyVAUMJ2JnVgha/ebVxqhMUlGTOdaymMuAL4vyUL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg35PxCRA9TVsSAnZWagAAhA0P/RWO0EuGqAHX9cApKZcc\nAz+/64pncQjyDlxqU3Gs6plN7NK7AOtTnUompG2VUPqX2gaaYqlnyMs+UPe1\nsQstDtDH4mR9bPzInJSi3HzFcunW8V9IiGabh4eOQzhcXjopDPfREq0MS6uS\nNV2ZGMVCvn4Sl6hzAhS3OOI38DyU+hiwFWgeF36kiLrx8752hR095scGff/c\nYo1KTt3jHHZCM+dguVxQTEg8uyt2yqIDKotEkVV/x8ZhZqc42hvB043rGA5/\nEeetB+rfEPLCn+gjbl1FFnME/evAR8J30Og9Qk86W+bnvB5geQ85AFcy1uVF\nMXrv24aMS15h0EJUL4Hu2RcLXzHljqVLhEdQafZCRNemp4zGBn50Hs0BWYOj\nEsbXRnBN4+dz7aaUVIzJt86YUBeLAORAuoII6aZvKBefTGmR38xFfrXvvgOb\nxCT51839pm+uF38+WTDSjJqYCwWhK01RHK+NAZ8LrFkhkBU0KK0BP8fSgFPz\n/mT+4Gysxd9Bm+ECNoDmNaypjuh1dRi/B4XBlQ/dbx6OgA3FsTgRmCqGH6Rc\njcA0/U+++eF1XsJuJq8VS5rRtHcAqK17+Ay2qrbaMFwGD90nUnDKGcR5Pg+W\nCXiKRlNhj3Av7VXC1OHg1js+Vf+JSYZr57eOPrhEbwv5lce3I+YoZExAMRty\ndxRd\r\n=b7oh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"325b65774a8f1275c2ad5a9c2eb0312c06445956","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.1","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.5-renovate-major-external-major-325b65774a8f1275c2ad5a9c2eb0312c06445956_1625265136611_0.046183433309563204","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.5-renovate-internal-patch-e9b026a9edcaec6a55b799fd9a643b3de6f06f8d":{"name":"@balena/jellyfish-client-sdk","version":"5.2.5-renovate-internal-patch-e9b026a9edcaec6a55b799fd9a643b3de6f06f8d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.5-renovate-internal-patch-e9b026a9edcaec6a55b799fd9a643b3de6f06f8d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"954db01ac0c08548488db8a8abd3a70cb9b05fd3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.5-renovate-internal-patch-e9b026a9edcaec6a55b799fd9a643b3de6f06f8d.tgz","fileCount":39,"integrity":"sha512-taja3NZQqXNqfL2Xjry0cRaXWdablOI1G1t68D+XgUqwswvh9D5clvpsC4elwYVPDYxUsGv7Z/EH4gJGb7JcDQ==","signatures":[{"sig":"MEUCIFvSZwwj6F3vATTFkHQ3hBArO09k2d7ERzMryvn2Q6ygAiEA7NezRiWF9pXe1THa0t4ObGtFm+/7iTfKSez/jPLorvo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg36Q5CRA9TVsSAnZWagAAIloP/0OI9WJOBKYWcfnG3oFK\nlWEqSdoawoDwXGoT4r+qOjyXMQlIim7OuozcBeEOYHYjeiBIkTUHJnefiNfU\nC1JvsedboKK26vWMDdcI0pTHdIZ4rNRs2PUuzGXLKmySRveu8xIhKprYf05H\nC/M/JfxT4X1RlfuI9GQY1WbvbLeg+iEis7xMgbLZeA+RT+irYAN5F4P++TPG\njqtzAmuh/A77G8QIlgmMdlEeXGFULRuaMi6Hs/713WEvIyX8IGnpu1ootRG4\nWBA9VhU9eL6xj6Z3qdqx0CXxteteVUIBiJfH49Uzt8aRG1+FGCnto9bsdhth\nk+23XfUjIFwIyXg+g+ZT431d0PL0KZ1oRnrlIDymAypO9j+mEVMo2slbjDIY\nxAX0jtwV7vCmYi20AV5jdaNwpvjYGlzY3/IIflu2iMKX3YRc/BEYwMkcN6DS\nUtNmHf99XIB84SHkyj9wFbw/BtqEd4YIzn/SxckATI3oB9ahCK34557/HdMh\nAs8VjngziX86gqyFfOdahMNuTbvsZO7f71iF2+udmq7K0gkxwmFCW1PwjLsE\nSCO9mR5dELoOKMHGf4L/vbBvgbdZ07PkGIuQD5NBzc95XbKZzZCOIuGWPiB5\n3NJqsZ6ed4W3Tn0Qqmg5RHVMC+W8VKmb5pWj799sefcGI/rm4zj0rljiZVz5\nwIKK\r\n=ithr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e9b026a9edcaec6a55b799fd9a643b3de6f06f8d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.5-renovate-internal-patch-e9b026a9edcaec6a55b799fd9a643b3de6f06f8d_1625269304792_0.09529075104648488","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.5":{"name":"@balena/jellyfish-client-sdk","version":"5.2.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8f40151400738da09e1637a35ff367184fed9464","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.5.tgz","fileCount":39,"integrity":"sha512-/IYNlzH2IWZJBIObkxT/CSlnMQHhnoN0CSAyYodTxvRfWIlXmf/wIx4YfzJkks4tATte1Uk8f0F7kKoGnRDbVg==","signatures":[{"sig":"MEQCIBaGiLFJeBar+fZ/eP0qpV9LqouXKaeKpXHspBMHAOqAAiBDlGSBZB9jCUUGJy6VngzJBBKTZczbsBtBnO5v+uMNzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg36UbCRA9TVsSAnZWagAAX6cP/RSWbFyR0BQmx/DahFAl\nflMuHhXwsrQn5WHjU3BYYDg6737VplKDh4YG52/qqD4mS/BwWkcWCu81Hu/c\nmRGueaJ0RLcr1P9dGdDrLSpBhpy/NYLboKHhMKdI1iePoFSgXbBCV0/P+5mn\njTO9bpY5+WaqKVBgmR0VBzJaHWHW/OO5vqFY3H31ebMnsC7C8OUR2x1nqFR+\nneNpDYAP9w8iTQzfdA4SKlHTMshiAJLMqHLYwDcvFdywObCsvYGognW9RPtc\nP4gim/hMbAps6U0FxkJDnnYa0kxrYbCNAd83cwqTUuWYm943eusFtHYIIz6J\nWKS+vSSwc84WdVI63F4DMQMnmFDKoxaKyMo/DTmEioeyPXgK7tOp38iL1IXp\njszYyOHzSVVJUQhCHujYy1egtRMJ95seOnQXYUpBCAJs6NUITVfqSs+driJx\nFLqLXXQVh21fZA2DR83oegYlpRwzJE5rwgHrcsf6J5fCVnDTH3gUpzpELMqT\nV2jNyxXoIv0cP/yBIk8mTWe0OPB+C+FfSuZEDNl2FmMrK2eOZr6Ak9GiLJBB\nEy0lOxdt9N3HrUe5TmdTqOWqHhx1eSdOzvkII4xqDQaaHn2mdl9smNL8MSIm\n6ETMyQGxGoUHr3hi4l0tWXaKmfT7bx+NXwvV13+khJjavfvXI9fgj5+/ohMF\nJsMI\r\n=SaZI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6ab0a27030ca54c42d708b22e10d6cd7a257dff7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.5_1625269530994_0.05962298366440022","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.6-renovate-major-external-major-71f87e141aa97f242354bbf975d3cd0af9b40c9c":{"name":"@balena/jellyfish-client-sdk","version":"5.2.6-renovate-major-external-major-71f87e141aa97f242354bbf975d3cd0af9b40c9c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.6-renovate-major-external-major-71f87e141aa97f242354bbf975d3cd0af9b40c9c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"78609c870953a01755e1985cacd2e57e91043e5a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.6-renovate-major-external-major-71f87e141aa97f242354bbf975d3cd0af9b40c9c.tgz","fileCount":39,"integrity":"sha512-IoV0N25gHVQAuDXw9+BYvq/K5FDinHEjPZaYR7HN+8MhZYFX0JdMJ7sOgndqqSbl84kTIJNLxw93ZMUPeOHy1Q==","signatures":[{"sig":"MEUCIQCvIC9hPDbfCJd3twxN13pTaSmDXzq7Ez0Byj+C7NlYOAIgZB7+tn9PRaH5inoXb7zUTGPTMGZg99lCBTDQhZJSQtg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg36X8CRA9TVsSAnZWagAA8EIP/i8hbrsMEc8OkniAm2wF\nsiQ3GMpYelGsIGWsJHCjrnvqYmxB/Xe/QyCH+IBlxBkLZV/JkId/n8+vfyHv\nXQZLWRNHkgPxSy/57ZbvUv3+RD/UCSG3dKugo8FXOl3IMglQY65ZQA6wSUIc\n/rxXjnJFaRDX+Jn7FsxOHtqFW1+l4YtOUq4FYs/AYkKtAUutICwtk9kOeYw5\nwwvtb3cQ34mT8v9SZrqABSsvHE8LcFxpmvdRJL8qTPwghYntgRefan/84hc5\nD9M8AkUN31L9l6inJZA2xUofBHaN9nrzIxd/sbn/eo0pqipwhKt8eytCrbRX\ny+gMMte40p3zOeml3CNce6QW97zU8LQ2CfXgFfB2uxcsJVn/th//B9ANSDtE\n6AO/VY4vKkk4gVnQJiccfnOUmrh3ojzFCzw6xTgnaiWetfK+UoQZfV7cIKYW\nXu13So0GwafRGkO/dSO4te7YuTB5sBQgf+2+BfmfJD8i76G1c8OQ/4zxU3TV\n5kqa3guvERIszsIS7/O59IfJGoSZE5yk3APQzJrIbtOqeQ62VZ7hS91znsuN\n0IWDGm52C7BwTf7EsJYO4oC7LDUSnxMtvzAJ6w1gThu5dOTTo8lTDsDL3myT\n9Nv8sCcScCQq7wIATTDb70z0anHIeDY6o7w5zqmoutsH0ZoBlPDnye3bDR7h\n+7re\r\n=BExp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"71f87e141aa97f242354bbf975d3cd0af9b40c9c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.2","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.6-renovate-major-external-major-71f87e141aa97f242354bbf975d3cd0af9b40c9c_1625269756273_0.09233847671497353","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.6-renovate-internal-patch-91001970889d47210f5f7f8a588b4ce2d8534a81":{"name":"@balena/jellyfish-client-sdk","version":"5.2.6-renovate-internal-patch-91001970889d47210f5f7f8a588b4ce2d8534a81","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.6-renovate-internal-patch-91001970889d47210f5f7f8a588b4ce2d8534a81","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3a8c64b1d2833494b6a67b4bf86ad13309376e57","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.6-renovate-internal-patch-91001970889d47210f5f7f8a588b4ce2d8534a81.tgz","fileCount":39,"integrity":"sha512-pEdTq2kDRH5VdyO49je9Mtq7rTiCyD/3U0ppQLN33J9SY743cDCpcWkJ3s4fuSCrvH9TxXagezwMOubukJTuLw==","signatures":[{"sig":"MEUCIQCzxcU+EmRQ+PVkJxDPxPGmHlmHl8AlpcC5hwqOmHqfYQIga7bsU3g0U/P3129DiZsRN8Ia/sAsh2s6iFLElPV7xgs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg37gyCRA9TVsSAnZWagAA5oUP/jUgSOF6Ez8cKDeN+q9K\n0T2nkl1GY7jj2/bX2jiynXNnNzcMm4i0y0XxK+DS23P/cffg4UEERw6O38nU\nFIqMDRSvIOKxj5Ns7TfndYbOzdfyyvkbyObQYBHaB7x9iuExRq0oZpbVEX0a\nuO7c1irWJQhbAQ8goNKsnT5KfImT82Vfk+BorJ4ukGNVEGMmpbMqo+dhoK1d\nPLuUFGisNb5oeV1EOjLcjbS3orM3OV/fl1w6mXNWVXOz8w/FaEU9AL6m4ZsD\ncMzNYkoiR/KQrnrY2V8jijOesLKIF9suvmKWW5SY42tZWLKhjAy+SRKY5iiN\nLuBgaUiBGjR4c+K971byzrgKoO9fxXK28R3eMufHjfKyFHqh/p44zv8A7Xct\nTagkk1oPbpCV9H7uLjKVAyR9Nhc7xjnC61+srHg5YH0SZcH1IuTT5b/MwTf5\ncvaBJidpTvXgBiWVICLOsSojMGDSGyS+dEXzZBKSXlRUiEPLtJoFX0XP/o3f\nV5h0PitYmjWgScrl0vZHmuikC+/Hxn19SJMbxPCk4/dbumUQKIcIvMaV9uJg\nxuZ2WTYv9bDwCmPSPXc7F8M7BUNkYv+UjfZT4w21PnzERMkNOt+hpcq2ms22\nQKmsOTzakspKYInqZ+Zcrdtjjqao3JrxE5FoVms7vB2H17PPDRcDhyllGA9A\n/6IF\r\n=AGSb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"91001970889d47210f5f7f8a588b4ce2d8534a81","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.6-renovate-internal-patch-91001970889d47210f5f7f8a588b4ce2d8534a81_1625274417957_0.035798050046053964","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.6":{"name":"@balena/jellyfish-client-sdk","version":"5.2.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"822a123a62752eb1ca9a23dec227559c1fce6ba3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.6.tgz","fileCount":39,"integrity":"sha512-3mvp77ZNTdMs8VhRGfhRjbKH2Aa94S0ctbwBm+W4lHa0gDjy4VjUdlRfuElbuhxw0MDwEYo1okRHV3AL1MRfug==","signatures":[{"sig":"MEUCIEqRwD3gxfi9Cv61ZMCZsyLOHN/GuarOluRdwejzkcOJAiEA/yM0doMwiy0WKNzwIRxHPCyt2K19gAcOQfmSfkseaEI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg37lTCRA9TVsSAnZWagAAh2QQAIlAO0StIp5Qh6Yt74rS\nH6xnkXsX/n+icuXjCX6I/35x2mrLMcM8hgEgOSGtzF8oMzGt+XvpDvl3wGDk\ntxi4l0iD4NuvZ4VlU5S3TmhsnNcciYPZZfE3qROR305QJF8GXiaxEtiksbjG\ndrl9+7ThTWNGmVjmrnLHot7lwfauBEIheaIrOjDVodeScmYT9P6ynkVye2dG\nlgVphsaT+uc1nurUBbJIxMWy/Bth4QIovwTeieDvOT4nKCs8mwFYGdqcNLJG\nev5AeB/ZdyczdCttTnTHZ4eW4CpPNvITg/nNdoLb8gPLwnIDcpVIphJ9H1Wg\nwAKLmM0GThm93Ya3O/IqgMszpBgh1pZTSojF0nQBCItBTU4VpqDxMBZmve7+\n9LBYQk6cUEnUpUClAO9ssWjHuj7tFzzwSqEkMkK/ixY/S1zUMgUj5Smfu49P\nu28w6TbQgyWhxM7W/lmFNKtwPQq/QUfCTgw32WMErJoTprM9caQLEEcGAZd8\nH+OPgwnMyfDIJ3Hj+pYC1almgk3Fa4fOJqnzDhDLcpuNf5+edJIBtLdDWe02\nJYzjaDRRgrr5alncsgsBnp+EzxF0NDILNPJ2zTTqyJGB3fUK5HQBT+aHc2GJ\n3rRUL+jW5Bg8BpiUHrM7TJgVGe/olqFO3S5WzbTTyNo33k0rsOGt5NXToiAn\nja8p\r\n=CBYa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7a604e84f1de0b9ecea79d17dabb0648763f90b5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.6_1625274707164_0.3511769545159602","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.7-renovate-external-non-major-acf7ea18189f20401430d591da7d6d6ebe929578":{"name":"@balena/jellyfish-client-sdk","version":"5.2.7-renovate-external-non-major-acf7ea18189f20401430d591da7d6d6ebe929578","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.7-renovate-external-non-major-acf7ea18189f20401430d591da7d6d6ebe929578","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"22265815aab8536936a6cc786002b4b982255165","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.7-renovate-external-non-major-acf7ea18189f20401430d591da7d6d6ebe929578.tgz","fileCount":39,"integrity":"sha512-TPgp0NxJwyizra6Oc/80bsWD2PR6UYZL4plU1dv1fgsjIxaSSyaLxQmx6fdGezhnhb1g1peP85UoZF3xs3CwwQ==","signatures":[{"sig":"MEYCIQCkL91RQGxyVk0zhY2CJkjEs9ClMJa0yNBj8GhDty6+zAIhAMuRHaU5o/DiAh2dn2OdLLvjzqSIuK9rynrNYSbYZYFA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg37pxCRA9TVsSAnZWagAATykP/1TJVUQEUhf/dWXbqK0p\nZpIc3lCqJMSH+WDxd0lbRCS4MeRNHueES+AtlJCNNxyvJ8QkwKQvXGEon9Fq\nurauipndnYdxjXnPY+OTUCUsSHVNMFb3PTP00vdBGos+iUSwMI6V3EMEUlyr\nLu7sbty1Fe2tI+1XEXUxsJvrE5Q5+gBIhquTUjHzWPE0p969PH4g9YH9Buwm\nq5cr/EbugKMj2x7tx/J1gkBlW2f3rRwaWsCAaYpG/G6q4xGgvjbd+TF0SKdm\nieRv41OBJZBqyyJK1OWHRlwTBhDsr2QaxQqsOQNiTZKzeuxPYo8J5lnQvLKU\nyNT6BOTi+haUY+i74IphK0PAVYgSCw7+YYC6gldgXcb/YhDoGpojOo9qRuIy\nCiJWhpsluLnSB/CoqKjae1R24Op+lUdJBuFzl3D60TD7MG3Ex9+EQjnLiOz6\nSn7maAggea9Dyn3FyrhWnvZJpcogr6TN+J2oe1W4o3yY+Fbv97Yi1ycg1jz8\nPHszsniddg5UyPfwXGBB4U9nr0/fWwGRtklHRQpbJ1x2W8jNGiCHgWXnZg0Q\nl3JqChOweMPpziPWUWrQ/wKEeeZ7myZ8xDU9bo6EgS5gsxUATqMEjXWM6V3n\ntN06C5JYaNBrmLnw8f6CfA07noEpOadtFXMQW7FQ8PE2mDss72lENNiAIASC\nh4iw\r\n=HYYX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"acf7ea18189f20401430d591da7d6d6ebe929578","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.7-renovate-external-non-major-acf7ea18189f20401430d591da7d6d6ebe929578_1625274992930_0.15055373365291147","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.7-renovate-major-external-major-a3006a0fec146b7ed8ba4e7aa12eb284925bd581":{"name":"@balena/jellyfish-client-sdk","version":"5.2.7-renovate-major-external-major-a3006a0fec146b7ed8ba4e7aa12eb284925bd581","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.7-renovate-major-external-major-a3006a0fec146b7ed8ba4e7aa12eb284925bd581","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2a6fde59bf8753c5fe563092771f14701745cd0a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.7-renovate-major-external-major-a3006a0fec146b7ed8ba4e7aa12eb284925bd581.tgz","fileCount":39,"integrity":"sha512-yypk7dqLdrMfsFyRWJNZXVvnCrjP6g8s8+n80x3E68b7lVioBObXL6iX9TkWZWitOGiwtKnM/70k2ktTJ2hlVw==","signatures":[{"sig":"MEUCICEEnZTy1ybOLGAfeTWrCt0FLmX2oeRQbt3G26zu+W9+AiEA2E7WHDCCivhctZ2n4cN2y2EEQ19a5B7E+4svh3WY9gM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg37qKCRA9TVsSAnZWagAAm34P+waLslPmwruuSix9LaMV\nPwZl0wUuwHE0w8twhvRjZqQynKVpOSGQTYZlhtl+aAP94wwGUPdrMP4YDpy2\nMF7GH4dAR9RXMI0lyFqjXtSt21AiGx0FjuLSgKwKZo8L4eL/ZxyFi+WXI31s\nb4pZtnCRbCBIk0y3NoWwguJzh11Jp78P1pviUh3VpQMNnyKZ1c+1GrYzDWe0\nw6kUs0GovUcDj8twjUr4ykCWjo+Itux8e/ng+9KI7h/0LqMP3u4201KEf+6e\n2HSSqqFYTu61UueJLdmNIOmz9HYVvNRpJLpYX93nJb7zA6Q+tCOdDOth4RXv\nFx2MZEk99XrHTTJHnwBORlUed6GpazvsOnA52T76+JBP3QT8EWGZrk1vf/VX\nlfo6NjJTO9+PNdswyYlKMYAqF+5gqbEAJYukx8bj7DPVBzHalXqClTqQGUkH\nK0qd8TxS2TLZX4uHhfXtWRr8vCghw2idyrQjSfX6CMUC37hAVAFcBMozHnUm\nun8UvMW23nBVdnz6M/3WyUHtOpltFfJ2eMpU1XuKphZxRLidbH5ShQIyElVn\nHqX16KrVDCRy74dZWan2fKkCR1YnEHZdXScHSlrP+cPBhRXLLR6khg26UwBM\nFxzbWfSqrBSf/w0Quved9Q4MG8nijF1gi9Zln03RGOFBhLKxjji5NTuB8J78\ntuLm\r\n=ttyf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a3006a0fec146b7ed8ba4e7aa12eb284925bd581","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.3","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.7-renovate-major-external-major-a3006a0fec146b7ed8ba4e7aa12eb284925bd581_1625275018414_0.1455985067747192","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.7-renovate-internal-patch-011bf94a41484cf3911704f93fe4ad49a8b9ddb0":{"name":"@balena/jellyfish-client-sdk","version":"5.2.7-renovate-internal-patch-011bf94a41484cf3911704f93fe4ad49a8b9ddb0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.7-renovate-internal-patch-011bf94a41484cf3911704f93fe4ad49a8b9ddb0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b14adb4cf2d67799efd32a001cd357163b91f139","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.7-renovate-internal-patch-011bf94a41484cf3911704f93fe4ad49a8b9ddb0.tgz","fileCount":39,"integrity":"sha512-qsAFca0sOJcGkQNq2sQ/GXMrhoRaN+liHJ+RyhDn5Vtpthhz7B39ni6Of9SGWy8fhJ2HoxbZVTEgFnJN9QhqIA==","signatures":[{"sig":"MEQCIC6jB4CuwvTZRYthBjcgU+66blPn4JCtoQMwUxuq4DxoAiAY3Oefo18j8xi2POQlGcyufGwzTzyv7uF/XRleDKseoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39N1CRA9TVsSAnZWagAAvAcQAJwNVvoSuDi2cGaYjgkC\nXqYFoTRV8z1AGcfViU6EpjEosDIatHfP0K9TIZ9MM/Aw6CO4RjZnIbwCeUkb\nYVEv+oMCPWu1ql05sSFoQuDhJNVJPmiBnHKrc8n+k6Q/flmxVKsGXREQ9Qyn\n2suWTGrQH+xTto4apFNsfUGr/4fQPN6mbOvVeK8y/JMOB6UtLw/v6oxvQ9wD\nSLLuQ3woDZryDi/3OTYW1XvdCAGIZh1W8f7TdSr8OMnOIKIVm1+5kN93SL1b\n8CBsFYN0mzbqceRz/y98aNsd1TEjkKP/UeUkv0GTWH2ExqRatcdv/9nxVNwk\neXLMAELcPHfvifZsSjfBDVkeWYkaZpOcTGAxNW2mXpK6+5ENqfDPbBJ/G/aC\naxvUvy70vSwCs0y8TtZXOtQm97rR1PcTrLdPWQ1qrkNOOuvqOaZwiF2kMzb5\n2yyrNbCyJvb6/5C6t0VxC6XiffCNid2YnTAp5xrozTs4c2/PMxL8Yp0RbgYW\ni94zH8yPLbMPsr+smjb8s6OAYehvFIKSPG6DMw6VAJuMNnDc7V99KszfPexi\nH88NB7X1lQ+CWO28W6hJlZw7WYombS6m3S95nBZ2XADHbMDUlxZxzDjLap3S\nGxhMhxunCb3w+YX0MfKq6HSRQZZJiIqob9Z41Ra69BOTl+ckpCexXXv+/HS3\nvJ5N\r\n=V4y0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"011bf94a41484cf3911704f93fe4ad49a8b9ddb0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.7-renovate-internal-patch-011bf94a41484cf3911704f93fe4ad49a8b9ddb0_1625281396800_0.9171853572111823","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.7":{"name":"@balena/jellyfish-client-sdk","version":"5.2.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"92043e7851c4434df124e3fa390bb725b9712eaf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.7.tgz","fileCount":39,"integrity":"sha512-KcW+8YH84Q/1zeXE47gJbvl+2ZU200za+76hrH5/XwZ9X3YM31gmcEL3ZAdkb6X8Pp0zfR3d9nivgFWtv9LdhA==","signatures":[{"sig":"MEYCIQD3NOuU/1kZe/3E4d3LGyypuFiVdokHt5IqWPoSR2ie8AIhALNejIAemQMRHo53ZKI3JXxK5C4LfDCDQFf1iLQJlKbq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39Q6CRA9TVsSAnZWagAAFWkP/RDtDyGqdfNmRgyMnrYA\nD03mlukscH8acCby84peUTlkEAm4u7d7zTMI1RitRaWQ24BDiEEm6uU6JwK5\nfROIhpMZd+OK4buargcIlTjn1EsC4KYD+DPbfQJT3VVLYFOyv6OrlXJ+HVhW\nD4RVZ07LKODxEn/L/IlAKmao7eROeyVjEAa4chENwzPK6en18nlI4L6NSk2G\nsFbt2usQDJFKMSPGEc4R/A9+CRy3Oe2T2Mn32cpew1TAJGr5OSx0ohLoYPr0\nmQfLf0xy5eN9RhCJJas4Ev8fWg4FSlC9/NiOAmYS3kJYl/4Uv84j2xfYLRT8\ndNkOKlB4W0Hpk+juwkE51tONRs8MoxNydpS+d5C4KbHwOIev8nGV+oA9NwG0\nTncqlHTH1o/csh7ZLQF3LH+a0k/hTVl0QA+RGJ6wA3YKk9D5/evg5eub4+5V\npFVyHff+bEvqgwUVeCOUL9j3IhEQcAkCGufakcKu2wQohaHQ1D/HP9M5M8fB\n2ia4Py/01cN0ufkFfEqO03zzstvG1eLSmw3eM87x6NH49tfnsemC3pojst2q\n5qH/imgn4ZvrqnX1HsLnjJN0nv/NyxYGbL4eZtLa72MGt+AdDwSeGiw1vTyc\nKpA3N5CGzS1QE6sIuly4fjhavuUukBKT80/JzMJosQPaHA7quarKCC5EVT0Y\nBdVq\r\n=LULY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1515f385ffcebd11fa81b6e9bc93da038b0357f8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.7_1625281593701_0.08938424023387759","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.8-renovate-external-non-major-9bf35f348acb46406dd77b167a0ce37a086c66b8":{"name":"@balena/jellyfish-client-sdk","version":"5.2.8-renovate-external-non-major-9bf35f348acb46406dd77b167a0ce37a086c66b8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.8-renovate-external-non-major-9bf35f348acb46406dd77b167a0ce37a086c66b8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cfcdc0465a427c5116ab101fd422e0198de3bd72","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.8-renovate-external-non-major-9bf35f348acb46406dd77b167a0ce37a086c66b8.tgz","fileCount":39,"integrity":"sha512-I1nM5aGKc9iczot7AReA0MtJGoWjHRe3PxGl1qmUW+eac15XsqD0j68NgwMDM9JsgCrbHYmjIlt4iZLbydzYHw==","signatures":[{"sig":"MEUCID+86j2Wj2qNti1lLL7kC4/GAFLqpDZ4t57XCXOZ7bUmAiEAo59kawww2bop5IMs5F99gBjY8z+x1VQFtRu5axtAqS4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39UGCRA9TVsSAnZWagAAiMUQAJ/yreXx4nis13Yb58vG\n0+VfAwOu12Rgyn9JkPTQeBV7OqvgxMbHySdojdZRpxJuEdCtATrNae1f/tok\nsUJP+ZUw9mEEGbHEsGanm6ow7MT5aZ6/DUPPEhk1y+Y1FljX3xokXQeI3ZwK\n1/KMjTqf3w3N9ilhie+FWzUYa/9sNQaJSL3c+Z7whu42FRi8aiXTCHLwp5PS\nNTCSvfU/z00IYeIF0nMfq9rbrKJgnzs0PXE2hd4jWtbhePMiOiyqce0TBsHT\n0vQEvMu0HhSROEQX3gODsqI3YYuaP9c9yncXR0IXwZ/HQ6bCGeLHXiI5FbWP\n1H4bqsh8OZoKKFQMwA01Y0/CO/bUhUtQmQz1BAkDkexY5mjn+CjfnWJ+JhjV\nKEAjVo9QDmt+EQiBcWJABDjtCjwhw1i2/PLFVnQMwZzs6e2EcltNk5ouhLKJ\nCzx8C8B/bEI6Prt4PMM0S0JegrdVqnUD2b0YjQwnOEMpVEJcOGxTy8qubfhv\nuU6w561NqP7Ln68Ca0E/6sgQGlbM9fMkEEBVCpLOramp1Q76LALYoZxCNgMN\nbJ90gbE1DgDYBd0gPS4cRi7FKxr21ODi98ZvVex2jd8BUP2uy/E6XYIWjrTN\nD0sarXY+tU2rVMmr1omn/19JwSjZTtpJHd1RytDyDEQnD82aLLneEeGmb03t\n/aB4\r\n=EF5e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9bf35f348acb46406dd77b167a0ce37a086c66b8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.8-renovate-external-non-major-9bf35f348acb46406dd77b167a0ce37a086c66b8_1625281797869_0.010333807324349076","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.8-renovate-major-external-major-a91ba8e473b0ec0dc76a5f22e3a571d67f260d16":{"name":"@balena/jellyfish-client-sdk","version":"5.2.8-renovate-major-external-major-a91ba8e473b0ec0dc76a5f22e3a571d67f260d16","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.8-renovate-major-external-major-a91ba8e473b0ec0dc76a5f22e3a571d67f260d16","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bda299cd63486cc100ec90ed142d442f646f704f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.8-renovate-major-external-major-a91ba8e473b0ec0dc76a5f22e3a571d67f260d16.tgz","fileCount":39,"integrity":"sha512-SKTFW3ALFuu/+IPl0W2BaPimSiuT/pTzTXZ8Ht3iSJzAcZ6Bwl1lInXLRjVf/EJkIyxM9+7IDZ7QtJxzDoQk9Q==","signatures":[{"sig":"MEUCIQCt21CqHYPHgtv0VSpmBkArWPNu0LD4j8PjfIq4iOoQ/gIgEfsOy/KH1J3kzj3prapjjp7NAZrY8fmGEx2KRtT+Jfk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263817,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39U5CRA9TVsSAnZWagAAm0YP+wcXZUX+wXa+ToIdzvOf\nvuzpxvuEf6HSyWEozSydco0zcO/g/zyz/dyxe8l/oFptv/j+FOe9sTicebXA\nxVkFBhCj12fhAQm8qrUQRo51VI0j4p5+k2SgzezzAtTyTrnkk8m84G+CEYyz\nEd5AzkkPtiBMGnCsumNwE0T8c+GvpkQ83qT3xu0V/FbDPI0piNjv2tkeH7PV\nHb4Z6mrCPSoFt5on2WX6eEzYv8AF1+12v/ycdyIfOTV3Rs8mek+yzrHL7jFs\nScgVBd7Lkl0msVDVD2A8244h+LFxBvVMjQg1TlVV0BEuqIyYFUsYAsHlatkQ\noEO1rHOmw8UVUBdQigs7sabN0P6LzmAM8y+CRkvQdb0occebeLtwQT3dOwyV\nS9On2vIc3YOBrNyeJ7BAwwyA9XgKzr2+vvdDCfB8efRK4JAC+Giv12p2ThbG\nZ2p2KxbRdrZLh5mOBGBy2FLzqOM4/ic9TTjE3Z5Fy7ZI62zc0rN3vh3VdScz\nn2F3UMjFJoIdceYx4Kk/DlGEltztya1RvKYJLf2ei//oIJzTJADmbxoVPBFP\nOthkon/12UCWIWJbZ2/0+IEZB/F/OD1UooFZ3cqnyRCE3i7Y4menQQE/9krt\nXsUGmgkY7zsQ2poMRfiiSmA1ZyFYdT9GhbMgOU3VUvwFfR/+ZQ7kZ/QlZswy\ngnFH\r\n=2Y79\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a91ba8e473b0ec0dc76a5f22e3a571d67f260d16","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.4","@types/jest":"^26.0.23","@types/uuid":"^8.3.0","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.8-renovate-major-external-major-a91ba8e473b0ec0dc76a5f22e3a571d67f260d16_1625281849459_0.23846345024286486","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.8":{"name":"@balena/jellyfish-client-sdk","version":"5.2.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fa951c385f44bea33342c086a948aa5802810a0b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.8.tgz","fileCount":39,"integrity":"sha512-XmafjN6Vow+I50hLEM6CJAHBE+auf0w1LeUn9+nxW/Tc3XeYJt80nFbOkCQlAfhwm0J1vBIFk7FENr7OhmQxfA==","signatures":[{"sig":"MEYCIQCIBAhPQ61idcuvtbEk1h7r6li5cvWhMNd3ZQ2ZBOb2vgIhAPlE/r9/bDuFzKGl9MJ7Tk3kidW7/FGDGEbtDjcnqJTQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39ZtCRA9TVsSAnZWagAA+aUP/0buaROlskDlRpC9p+xH\nhfdMoY1JQXu9pNpDQtrQa0ggMl2Wc2sfqkVdM+gIXUhuBgzQrMzRcXN7jb+a\nfiTNVUzD59RTDjI/Zt2iajJjUort4ePh8M5zgy7vPfoXEjnPgK1SeEMf00I1\n+5xht7NgYXxMXRsq15aR+3qrUNKmQiSECqszAHNn3GWj54N39rlqqPTfMWWV\nTQYKYZ2Rx0Ni9ElFvx5yjbXwgILctbOzubM80LXvt1le7lA4M8VC5MOR1DJK\n9kii5jtdaOXgO9P5l9uDeCkv7cgZTPRKQRVBsEHtAWHqfhfSKtdK7Z0OOibY\nIsfOHIN/+H/qjZBVeDhgIzEt1jZd5CxymlN1VAyyBzwJXIT0OPLn2/LmaB63\nIFJ6Nwdd0EKW13jDKzyUZ4O7Irpqof5KsdTymmD8gD+SGvdD1l4k8Nvgd1VH\nI1lSU0q2ZddHdMPIDSVlIHg9KhcoX0RZTkGqUy2+t1Jsac9/exj6ml1c6wha\n1msiqiyp5op4Q2yRLM8QLlViQOhf07Pf+sdPP4j8hzCu3bXdZhmav2gmt3ZC\nyo9kln0Hd8RNv+Wu3Px+7wqdByap8N8PAe/OSOtg1tTeLam0+LCW2JQDQAbP\nI/4Dk6ZhbrjbSUeSkCaFI6cD0bI/F5itEbHONiXzqWUITeaXsRiv8RrYEBlB\nyrIU\r\n=PDVr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"569da03e540ecdcc11453913c636cbb18d0a9d24","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.8_1625282157183_0.879984090691674","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.9-renovate-major-external-major-7be7c5a8e23bba5546947c9f001d87e5927e4c83":{"name":"@balena/jellyfish-client-sdk","version":"5.2.9-renovate-major-external-major-7be7c5a8e23bba5546947c9f001d87e5927e4c83","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.9-renovate-major-external-major-7be7c5a8e23bba5546947c9f001d87e5927e4c83","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"253f0babc266124429c4afd77e9e4843e8455f58","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.9-renovate-major-external-major-7be7c5a8e23bba5546947c9f001d87e5927e4c83.tgz","fileCount":39,"integrity":"sha512-KgKKAxj5EYtUM61gBmQ9nVot9lCSaKdNzuo5IhN2gR7lcDtjjqlSC6opjnJRi8fvjLNGlNxd1iqOm7AX1PXARw==","signatures":[{"sig":"MEUCIQCSbSHJ0DeXmDaTvEEnxPAxZ69gEaj9WqFPXZVsnoFbdAIgcxjEO5h3U5VyYRc6qBA75MMaprmbtklTbDXb0E/+/PA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg39c4CRA9TVsSAnZWagAAFYwP/3fNLV5GhKym7xg84S7/\nAEy8dhhu7NrzLHtCvLdR1GSByqhnnRDIOS65Kdv8EUI5rfrHPRs7mcoYmJcM\nHMMWvQyMHeXvYMSkJgBEA66c/Usju4bhfBL6mybc1pBpsyqDlLioyzMi0mjp\n+MauNGsiHhwuf8D9YV+cCLYCOU9booI32tiR5OnAzkP/tSreO+aoDAgrWPsT\nc4O4iVPvMVvJifI8HnnuHqH7HDngbRhSU3q8xJ8tYBTXfeGdLn5tfFa6Uqf5\nbV94yS3v5t3Mr2XdbDjf36E0VmpBBjX+nF4yQGf8ZQHNvejY83agwijfL7ne\ngnuBWz8H42FwkYOyTYgjv9ToihxqK6hA6bFXcY7jP+h4tJIbMIgGx0bLYnsj\nKh8LFl3pRhl7NKO2fUfoKgcp25jRaN1Efmy0tAisg8xVBhMftNgfEDe7tUaf\nTJxFcDWhUuiIBA/anEvYyjzJfFfnNz+BCJqAJHAn15gZZVgSbGg1AlLisiCA\nLQqqFmmcrt5PEJnzMgpM1hVnGKhJj73uQSYpPgcY57GtGBRN7Oxa3kO62nFM\nIPPQcQf03Iu/yfarSvGGMzPf7h64hi4N8TT9B7nNhyQkKwFdoauWyxWygbhb\nUnG1IbbpoZROT27Jjb5DqANZw+xWc31bFPryph2FFOXbZUk96/6J16ZVf13a\nF9LJ\r\n=+bbU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7be7c5a8e23bba5546947c9f001d87e5927e4c83","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.0","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.9-renovate-major-external-major-7be7c5a8e23bba5546947c9f001d87e5927e4c83_1625282360331_0.9799320465600287","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.9-renovate-external-non-major-db6ec9408448928054f4fe3d871a1c50eb3015d5":{"name":"@balena/jellyfish-client-sdk","version":"5.2.9-renovate-external-non-major-db6ec9408448928054f4fe3d871a1c50eb3015d5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.9-renovate-external-non-major-db6ec9408448928054f4fe3d871a1c50eb3015d5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"299ce16fba79d52ad68ed27934c6679647d4107c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.9-renovate-external-non-major-db6ec9408448928054f4fe3d871a1c50eb3015d5.tgz","fileCount":39,"integrity":"sha512-gdZKSuG7G7PGTq7h2B27HkwHyYBpfwXs4aXkejgJHXoEmHRdgz3BFUrG+vlvSkUUNb8TcATB6fHOGaCybTKh7A==","signatures":[{"sig":"MEYCIQCfaPEs8J7lgDpHeidy92q7D4ejBWzvuIoVFtAAAKGgBgIhAOsfXFK+/AC+ZI0+Ri/I6O05wHXgJrUm5F3c14m9WGKn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4hWECRA9TVsSAnZWagAAavwP/iKI9XrYbEMcpf2R9BjV\nP24ru9/O7HU34/5S7zhd1fEg4Pz2YsMC7VEcVUQbG4pQsF8IdIZQ670qfF22\nk77SHRMzhumvmYDScfehbiCigDBy7c4bOyGSvkgvxK0V37mJK0aGj2cNESjB\n745JVUbiAYjtqEzScg81FE5Q9vNbLSLO6O0dYYiIW8PswciptlzYdTh3IfGA\nUTo+hn5cDPBSBIp7ENUP2C8iDnc6LeyBnnlL5H0n9l7rgXCn3D95cSDHyeRi\n1vQBBlDCJKfd0vtNvFptMnHzgcu6/mY/euREMznwm6ZYJ3wRXhLTJBwHFuXg\ne893n9289Fl0OhljQGBUwMNDWHtKscSOFsmavsPp6FWbEA9/LHe8y5KVUvCH\nt2HLvClyOKO0wgKNT8HiiL/7FyGG6tPNNTIscK5TepD5YKENS23/oA+Ws0+N\nsOYYSSGUjfuD+moVR8fZVroBARYQ/CXWRfRV5Kj7pTV5VtAXXN1BHL56Kwuz\n0gABO3rMqiMX+5JQ1PCitTI7bkpo8SeFQWI5Xt2wJp2xo3FYaX812CrqbrrD\nh0YNAWdJ95drbbH8NRdvDEWv65IyIepfIhjyytOGIwLXrOx1kbeH9xm1lekF\nsIhrzpwe55/nww2eolIb67BdVpP4hMON3I0zeY6EdZOG8nmS+2OUh2ojOe2H\niQHR\r\n=Dbe7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"db6ec9408448928054f4fe3d871a1c50eb3015d5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.9-renovate-external-non-major-db6ec9408448928054f4fe3d871a1c50eb3015d5_1625429379411_0.8862483385453701","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.9":{"name":"@balena/jellyfish-client-sdk","version":"5.2.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9e1f0e522304fa8a055b9b888ac4525020fb07f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.9.tgz","fileCount":39,"integrity":"sha512-9GcJYmi22IhMTE7JpORV8I5fBBTnccwFRt3QgqQ/bvgOQ44BRrhT6MaVd5zJznpI21QlkVnfA+7oAohGiQP6wQ==","signatures":[{"sig":"MEYCIQDUjaEdXtMKoWGi3GSjjJdLg7V1W2kN94Zoi+ByUNXalwIhALQJLwdciOLTu/scLmVoA4pLf0gs1ybT2LB+v4qRS1Yu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4hZCCRA9TVsSAnZWagAA9oUP/iOCyP8+oi4DIafVUh2C\nQmGh7HDppeV+TlxP1UBM7PgS2cUiBw/z1XrR6w2IwHMmT+TqyBYy9xeQXe3+\nqFh+AwzB+89V9J2MlqvCddgYOkzfrkg9P+NbMHmo0cUd3PrMvGCoC/jdeHxU\nW7vMUVS7pK+53P40YaqEMdnfPFVlYcch9UH4RaYEp0YOtp8TerY+/fZMlb5g\n2kAnmevOUYNZQEPKNTB4MZimAuCILUCBPws2Gqjgc0uDPPONyIa5zUD0zicF\nmKm18TduA/xQbb3Ze6fEEOHBbC91wiE6owgM7/UYBMr47FNHJQxuzZTErhuX\nLwRjE857DNg66wQ/yLGus8BvCuhkv0n9C3Wg6JmOlDxdiGWriBjcOzakugZw\nSMLMlV+WzXsCIGB/D/oenWUVmZXIISa6O/q7vvQOqPI1Ox+b4l0OtuMYXZT2\nWpVU8+Ej3xHqkyj+PRZg0SBDi+HG2AGIVL/Qg1DaImjL70Ju/Jmq+Ipm26Fr\nXMBl0vIPPihWhMhALDtmN+MExSxtQVPmx/+8C5ImZoK9ktT0jf6MRqnajyhG\nstd6clszmH6Jbdp4sohpnnrFpRbS14VWZB5YQGhiKeiD/ZxmsMZ+hCFoNFkW\n9tyd4iGVm4eAxzGimrQwkYFxvAPS3AmjKducb/mcy+70MXBzkBy9NuYWfUUB\nVf5Q\r\n=OWEk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9d41b554c1af974b759be54443fa0bc84f7e7242","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.9_1625429570370_0.575035788899654","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.10-renovate-major-external-major-a1797988d927c91eabb0a814eee3bc832f28344c":{"name":"@balena/jellyfish-client-sdk","version":"5.2.10-renovate-major-external-major-a1797988d927c91eabb0a814eee3bc832f28344c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.10-renovate-major-external-major-a1797988d927c91eabb0a814eee3bc832f28344c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"82936dcb74896438871917b39be5411fa6037776","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.10-renovate-major-external-major-a1797988d927c91eabb0a814eee3bc832f28344c.tgz","fileCount":39,"integrity":"sha512-snzpF1lOw3glv6Sx5jc3dZ8MGgMdDLt7RU9Fjq9n6XPe3FVzBB6BYuIQBiYNohGuiaharjw4ua0u+tinL9VxGA==","signatures":[{"sig":"MEYCIQCNJhOv8Mj7k1YzywryCbLs5iOMAzx85uSg/QeQP8mWeQIhAJvPXxFsEiEwciSJVVWfg85QSVGPjiy+R0c4wgE9zTu1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4hb5CRA9TVsSAnZWagAAM/AP/3WmMBF2KSpxq1PqCaRG\nZM1gCYme5WGchBim1ojPnNHpD3z00Vas5OcFYG8ieo5BdY9dIcVw50mOugEC\nFrq/RXvR4Xw67tno/BfrBw+Orj0SFZrU4HQrNVPLi5Biv0A+g/TY35kVuNmk\neKteO/6AvReMumt7UmkjboJCw1sekVUplbVtlj4CAngd5686iVzVoefeX+Tp\n6sqVlY+9/RDbAjNjWfpv/agNgw4pLOQsYiaYo5cgIYY2FmqpiUBlJxq7993/\nTRmutru2+nrF0wz4iBvjzreKkYuXrm7T/2fy9mZGGQgWCKitKdyLR44Wymux\nmL+guHiN/97eTbVZgbi4h6w3phht0YoSGn9fM7p4sUNMBWgCbTxKc186wm8u\nZ2tPHjthCZB5Dm0lqJHQjBoDxq1YyeUZdqxdF0GcFxOUmo0Xc+dGEoWPjzk8\nVOkqPptV8ttVc4CWzybzpzwVrQGmPNwR9KKfuZDHrTQjcul1HJXYbY3aK7yD\nDZnLF4+M961g+a5WRH3eMS43zQqeHgc+v7UXqaIL04VuTN9LCmeWIJNskKjm\n8kod5kyPZBuyHV5ocscdJi6C4txp4xV4PXsL7TfnYFUK48tyBWw8MoqsI5sC\nAad3wpH4fjbHUDaDO+caIvwOf0QJGUhJd70PNQ0k1/i10u2Aj60GIUw0XRXl\nQs8Q\r\n=E9WQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a1797988d927c91eabb0a814eee3bc832f28344c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.4","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.10-renovate-major-external-major-a1797988d927c91eabb0a814eee3bc832f28344c_1625429753088_0.3147996684449921","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.10-renovate-internal-patch-efca3a3a7cd55301d3424948d2710b78c056c398":{"name":"@balena/jellyfish-client-sdk","version":"5.2.10-renovate-internal-patch-efca3a3a7cd55301d3424948d2710b78c056c398","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.10-renovate-internal-patch-efca3a3a7cd55301d3424948d2710b78c056c398","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e78c5d2cdde2d7e06cf2da5b3614424c9c6b27c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.10-renovate-internal-patch-efca3a3a7cd55301d3424948d2710b78c056c398.tgz","fileCount":39,"integrity":"sha512-Iwu/h+3JzugUgXNHrX1jf0cjUCzSrzC//3QdWGJ9WGDdFjUvxavyvYNXoSYrKKoWiU7ccQtN9RvYaJ9mF2U0KA==","signatures":[{"sig":"MEQCIHMcw6IPvTYd2GaRrCJwe6o9Z5Y4KoY9yTzEx9qn77tFAiA3f/D4j3AnNe72o1xEkeK8whV1Z70+VZMHXSe/poM0Cw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4m2aCRA9TVsSAnZWagAArTMQAJlD+AkqI98eZ2t3HL0l\nLq5fIEkiLhWS5C+bO/4y/6p5VvxBLyEfrBVV8kl4sSYhOl9FdP7O+kgdf195\nricPnDexSAF6aXpaxpj4Q7bobk0EziwRl1QmsnINqT8FaE3cOGwusm/G5/9g\naVLuE5kfjNFfQFr4w0oCgDfh5FZ2KhTo+5wUYjSHP4TehYYq5HZZxLOA7K9m\nQ2Nz4VpSNPRpXhYTrKghfbAZreMxMtPKFlbOWhZzxYngOvbBz/WWhMPZRzXR\nh9hligqqpKob6pFPtxA0ocsFsjAoqYMEDA4iwzeczOKIdzBT4rE7dOjud38T\nLsN+xxleQGfwmDqj6su5g7cY183As3qsDlO2Z4hfvRP3Q8IH2jdbvJvYx0wq\nkqQPnGHpKQdJhfeCsj6OOFx6Nn6Xk94to7i/Airgrt4wcAb1QBrouYl9a27P\nrt9h9p1uDSTC4W4RaGPtIraXwINYHPIya1dlGBEyU6VUHSu0epRaV4P4dx8S\nu8BBo1Yatv9sI1Wr3QrvVltCPPYGlW6ncoaKtQg9VJoXYtu0fc6LgO7sZiUD\np55SMtcSIAl2U+WtmEOgp/HVX7cT+Yhzc0yYUrgsW8p1uFCe73ALvIG5OhJP\nUMZQ3mw4IPJarJwBMrHkMYA9I0x+tuj/fIjZF+8PtT6Ni3DbFKl+FJtW91md\n1lRF\r\n=0Re8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"efca3a3a7cd55301d3424948d2710b78c056c398","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.10-renovate-internal-patch-efca3a3a7cd55301d3424948d2710b78c056c398_1625451930052_0.23685418938825853","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.10":{"name":"@balena/jellyfish-client-sdk","version":"5.2.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c8a20a0b754e0fdabb25e0504bd7b276c67a4e9d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.10.tgz","fileCount":39,"integrity":"sha512-1BTsGwM2IkNLmzx4evEORi2Y7jA3pLweFE91WdarjH+FMxsCoqzKDyWgaRBeZmGekSPsDlFIkiXQwfWf55I8sg==","signatures":[{"sig":"MEYCIQCEla8c/mtulBSWaUdI1dq/Ot+L1qPTUvZwTjN5huGSSQIhAMQm1GM1ZUSpD7L0chgXwWI6keR60PdVjxbm8e/+D2Ep","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":263915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4m66CRA9TVsSAnZWagAAC5wP+gLUGTqrJMVLy1C26BDq\nHaKuMW5RTsgXjIRUQUU+ZUO1wGrm/SQRuQCcjPJqVqPQWWKb7cYuTq0nijhn\nPApdDb4PTKCkiK7Pwt73w/zOsgdL5MNZCooVVVL9B4RICVPowB0UdGjBaWLd\ntz9MI9h9pHKQX9Vti6V68xP6HE+n9aFPoEk5vVN4f7rTQhVFlu0KD7M5/SO4\nmFTRNm7XZshsZEzTE9i3UJ9ustsAomszoi3XctOykI4Ufr+T7dcI5JRaUEMy\n0x+wjq90bENVKPZ368LigKw15O/HgdfMp+QgTMcPRQtd2mMx6j5MdLtvOhtA\n24cUzOmx/g7bdBiJvP9AUkRPZKRlPfCov+P0dXZIM9yPWj5MNoMd5//j1+Mv\ngNiZBlkFwNptkSFCb2xc8S3ToDpWMiVjIbrWMQ6OHsDei/ddIDNOSMbZ2GyN\nzHsuhmvWjaNh61VSANOswyNmox2l/GbgqfoE891W1xm21rPv3zv5sipspJ1G\nKy+4D+Ihv2FdOw8zADxwXiGMLbIOnTApMsGlk5mxgpZKkLAmFfWxXYJvg57O\nRtl1OiU3F33rCQROuEo3F4MwlL+E6wD6ayIA5L5VM0ToKfSogZAnX4BHS8DC\nhwTxyGTfH8p4wPs97QAI9mPy31RoCcO72vusB2aJow6obwME+H1jq8E1WMhD\n5WIE\r\n=35f5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cedc75c282e44917440ae166ed442226c0816fd1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.10_1625452217830_0.7205322633363489","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.2.11-renovate-major-external-major-82cfa9f10e9ace6c154b9c6761ea8f0af77133fc":{"name":"@balena/jellyfish-client-sdk","version":"5.2.11-renovate-major-external-major-82cfa9f10e9ace6c154b9c6761ea8f0af77133fc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.2.11-renovate-major-external-major-82cfa9f10e9ace6c154b9c6761ea8f0af77133fc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f9549ea75d7f8936160364620bd9084e9f2678a3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.2.11-renovate-major-external-major-82cfa9f10e9ace6c154b9c6761ea8f0af77133fc.tgz","fileCount":39,"integrity":"sha512-bKZfeoNELMSeE6iB6b0HNquea+AuLOA5mHbv0KElcFvO4lDa/Z8pfIQZlsFpE9vi5RpvJ5bpWg9L6VE+0AQtRA==","signatures":[{"sig":"MEYCIQDzS6wyb4XzH/hEpbEPAOHCdhkyLByN8/I2J3LWcu1crQIhAOrDNS2DaVp0n3rYI2C0p459xq0I7DbATFr+ouByT0nk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4m+6CRA9TVsSAnZWagAAiUgQAJUudOvSW30Ki7rSd6oy\nr/LP5hKMsK1tv3i535cxgqry24dzxqh/X7HcT9/VHMvTncKHdM3XL7JW/A8n\nuI2pjb2YaUdIAYRkNPqdfIH0uWRSIXq5Yv9iGEymW7UHPDgMRPyJGwNFAOKb\nvv1kkR+RdoHG+scWTchu0tzKI4/IwqkZUa2HIp+lK1pNKFsKmqSTZDlqjL3I\nPNdxL5akvAlmUeWnXNduMN1xPqSd2nk+gGIDHTCE1js/5Kf1wN2zGTrhZ0fB\nkcKqsqdTUZWLWadAmLwmcIiWyE2ElRkLpV/GYY8cmgpM0o+BulnXXVisqA+1\nx9j8GFoOtEZXeoLiJW3aEeUUjkC+zIfrJRC+mTgbKtyoqwG9buTAK03lAcUV\nzxvn/Sn3xzYdxYkq9cWPhsqGi85qRJeoBAQlD1NkFm50PAjusqX1adQorSca\nSh/4N7uYIfSI1tlNoxzeTn+8uTpLi82r9l0QlMxs8W2enDxGKPCkIMS87a4Z\n9Xev74mTXkgLUkpXkcE1XE577kfLBIRq0dUlNgx1zhyhEXKjKY5L76qHn9zb\n8h+/pGLvazRzv6afkoHWsxACc8WPUTeVU/7vw5Zgdfvz+rtNKqeux21++OG+\nsQ2wJu4QP7pEnxMT3R8rtT7qrs0xT/ijttGe9fj55NijQ4wcUev0FbgTxluG\nN2Fo\r\n=e43Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"82cfa9f10e9ace6c154b9c6761ea8f0af77133fc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.2.11-renovate-major-external-major-82cfa9f10e9ace6c154b9c6761ea8f0af77133fc_1625452473626_0.05771387054600585","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.0-notify-any-link-fd368388817d4d4fa79be2f5db18a31b0164e084":{"name":"@balena/jellyfish-client-sdk","version":"5.3.0-notify-any-link-fd368388817d4d4fa79be2f5db18a31b0164e084","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.0-notify-any-link-fd368388817d4d4fa79be2f5db18a31b0164e084","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cf6d8918f448a8dabf588b6eab1079c5c40c64f3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.0-notify-any-link-fd368388817d4d4fa79be2f5db18a31b0164e084.tgz","fileCount":39,"integrity":"sha512-02sQB6RMeMPr/toI+3t4oCn82RFC6S/IXBHL8OYNfenL8Wobqsj1lCbV9r6iYcarKBYZDpN8tcPQGy9H0Cgmdg==","signatures":[{"sig":"MEYCIQD0j2vzyBRFh4FudDzx6e27kfDxK8X2UGh6UNWrNdGc/gIhANB+2ZkRDFfsPcV+NF2d/kEQORe829MTAO1Ly236aRaB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5IMNCRA9TVsSAnZWagAAPmwP/2nXwkcVcGYoq9101xDv\nrk89ZKdLhfjzjPse78+QjTRzbVmBj3div4Z7G9x0IwcbWgHGYNS2xd35k6Md\nOfzRk/h0ctciaE7iSmCF60A8bx9bkC81+b8G0JNNtinWdtsrNpy9Jyd2isGm\ngm1Ar51Hn1p0fIg9xSZsPp6QJuPF4S1z4yam+n8ttA+58t721bbOxPRqI5so\nUiLMRVDJ3ubR6FOCHMebAOuqTSoRvUPheP7pYSVTPRmWwTKRBOotJIqmcZzX\ns2AXQwoSl+0u+1QmeQp5tiWDLjEvfEY5xzFE8EQ2JOpkDxBEhNgDyK9P5CKD\nZH3f1wtPYtNCLCUmNfBCQPa/GiuSlQMlZo61ZaB5jWMhA3YliyZuY6IjEMHq\nIsGvmmLFq6Ibu0rqdgCTNYs/r0FvHNslwrcesfTdYxt3rd6sjJjJh45JhlRg\n5zzQ79aNzztU6ZnejBNhk0AoHymPOs1rbbIIobTfhn3rPefylX9sBNpc1gPu\nTRWGwrZDPvhLi4tQBO/lnkQ1CajvoHHnYuYZYMIvMQfL3F3RZgtWRHrYIQoM\nz489SCT468AK+ymh+6RVAMukCKRo3wSxPkxbBW3KB1PEO6B3aNFK4OhZothg\n1Lxz5h4IMurFy3LHiuNd/GaPtkTTt7rE00ADqeWlEqifNghPQUv9/rd7PpH+\n2IOj\r\n=55tP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fd368388817d4d4fa79be2f5db18a31b0164e084","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-06T16:18:41.714Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.0-notify-any-link-fd368388817d4d4fa79be2f5db18a31b0164e084_1625588492982_0.5931168019912707","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.0":{"name":"@balena/jellyfish-client-sdk","version":"5.3.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6a034101743569acf6765ed7bce85ea8a76b7356","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.0.tgz","fileCount":39,"integrity":"sha512-wuM6/CqC78EzQeUAIS5uer8ecGlwauRahsIH97DcZ40dz+Dul2IPgyPh50Q1q+nw9Wr7gTJdEzS+pueCUUfCCw==","signatures":[{"sig":"MEUCIQD9fpXMk5+BQlyfvfOkaeBMOb56EfXONwrElnCj78EV6QIgfrWsddbygJ7V8TcS/3jsedSE3iJUId9HpdTBSZZ+SiE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":264957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5IPeCRA9TVsSAnZWagAAVwEP/j2HPRLCv3pux+OZr/1p\n2xgiWFTyd1tI1PW2EtWT20N1YG8NO5XTtTj4srSPVJ/tziddVEmB2yTBHZyy\nLvX7kORRTCCQorHqiJ5JGRFMnKTGdxUvToBY6A65ieThM7a/RtG5sLr/4Xyv\nlQMydSihbk00ZI/uan+98bHMLy6Qei7crmcBnix+VMoq5SXsOYXOY1H/ekqR\nbPOTMxvN0SH+ebS70mqgnPAlh/sxq9/3pwKN8QBjXdtgoMGdcZc2wsCo/YV/\nOUrZd2yVyUIJx1go42R45QYwytMlk5b/Kvv4vzb/2lH2uHK5aK7OOOjl6Bwg\nL8RjGp4E/ii5cMr7cecBD9zo0pkarhIDvloPXlwnB6LZsdbr646dDU8wFffU\nhaSC9TUtwHJav4y5/Vg6vxUUPkxBiFv1BiVOJl/3/AEafhVhuDH19jLa3k9J\nuTntUWNJagDn+m0vi/ys14rKzSZ7T+LzROp73vwrTXBoEtv0LI5s1Stf7z4N\nAziblBb1D9G/RgbHCXs5PQulH2EcHFiKG6AGOrPskxbYZhAqzG6NfLm96Xz1\nnan5xl+Htf5/1W5Nl7nQ+T4QXm0u4+qjU0xcuK3Rg1LkKqyVaaThzWQ0v1qj\n37CU90S5gJlO/4U6gnAfMA9Z1xNJnYLc+XMNkbTpt9Wr9f1YiKcIsbzSdny3\nU7RH\r\n=79/B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2c4635c297f7790821ebf8a452c88893ab7910d9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-06T16:23:20.581Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.0_1625588702462_0.8300085736544895","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.1-renovate-major-external-major-d66bb9e0e21819b46df42ec6a64e4fe182bbdf46":{"name":"@balena/jellyfish-client-sdk","version":"5.3.1-renovate-major-external-major-d66bb9e0e21819b46df42ec6a64e4fe182bbdf46","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.1-renovate-major-external-major-d66bb9e0e21819b46df42ec6a64e4fe182bbdf46","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c15d758a0578df9c671a6dd692cef8b2178c2988","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.1-renovate-major-external-major-d66bb9e0e21819b46df42ec6a64e4fe182bbdf46.tgz","fileCount":39,"integrity":"sha512-5+DYfg8tVfi1oaOhqPuj+rlYhywcWaIjG8i0SWQ69CpoCDq5dUPiOth9NCrE7ENxF217MHH207PplnCXtoXfEw==","signatures":[{"sig":"MEUCIQCatcG05NJXeiAqZYzJ04cXAQgh4N67XfIdO7Ich2A8XgIgFn8aOKdBJ98C0zNVPmrYRDbM5fVvgDJSLqIO0x3tqmk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5IUWCRA9TVsSAnZWagAAau4P/jTd8lHM+p5n79B5FydO\ne0XUiLyEwkQy6rXoV5EwuFPzgSzJYod0Tmb6MwPwS8uRZpJ9Gzj6Getud3Kw\nx9BXXIExBhzLT/OJmYP+JSwtGqXargyfv0Cm9sUCEwfP3au7QMQCA24BVU3v\nCMU1yYCzIDGnGwSABjdCMXMmYTFvJy6sHNZnfS+mxv6rx3IRBHXS0T4r5w3n\nOBb0Z6dvRskQ96KB5gR402anBrR1ma924VH1gBRuJPj4jLii9BwQKMha97Yk\ny/EidWg0zJiJ44El1CQc7xF4vbpRhVsw1FKz9ORCssbgbaTD62hx8PJm7AX5\nPDey4nv6Xkd83SALjmdUQcgHP1gzl09odqE7zJDWnpwAYLNWdkRGCytkGeru\n6QjT2b7sKkneAEa8Z7Y+b9hRX8R8MvknIvp+Zr2OS7gjEEo5Z6aeGGZtaiMZ\n1KTMPcUvu7uCICmHc6Ifw+kwtzsvNxmHHRpSOcU1+8pLDCBfL3aXR442KNhE\nutMCWECJ3eyKYL0a0NB6QaGDUg0ciDcX+WZp0UF9sCkcKGdlhTZttoBAVs+I\noo8QzVBa+GZK6E8IL/pxIYXbd5xubt099qUN6omsSnffgaU5T6RnTc/mh7Au\n1ti9jhHQ5V+Ixmmpru3HynZCq8QW1igu8XJ25K+J/sCUgrouIJg5S6dFbm7N\nVrbE\r\n=ZMB3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d66bb9e0e21819b46df42ec6a64e4fe182bbdf46","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-06T16:27:43.496Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.5","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.1-renovate-major-external-major-d66bb9e0e21819b46df42ec6a64e4fe182bbdf46_1625589013780_0.040314485593383464","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.1-renovate-internal-patch-527124b23c833c0bbe24a52344f859b949028adc":{"name":"@balena/jellyfish-client-sdk","version":"5.3.1-renovate-internal-patch-527124b23c833c0bbe24a52344f859b949028adc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.1-renovate-internal-patch-527124b23c833c0bbe24a52344f859b949028adc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"25e1f8e0427cee7809e7f4001803b506547f4e16","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.1-renovate-internal-patch-527124b23c833c0bbe24a52344f859b949028adc.tgz","fileCount":39,"integrity":"sha512-oTJSeRUv/ijQ/Qykd6OzffURjpjprgmjact/esG5AOCXIJLW6bBYHqLya3PPCvuQc19DjAWRFIxcDXMgIqBwQg==","signatures":[{"sig":"MEUCIQDBeg5DxgB3kWBiAn/j65S6Xb4cFDLR9jPdCbKrXw1smQIgUVY85IjzlU5vI+Q9cZU4cL/PHOSWzaYMA1Mpk8SNoYk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg568YCRA9TVsSAnZWagAAkMAP/2OqD0YqmkI/n3h8A2rd\ncwj+cBZRi98mIDIfeivKXA7H6wF13jks+eAJPzGLLnKNFBalHVCBpC3dup4i\nli6YmWG0Y7+HxQx8LqUQwhe7xDRdsA5q4DfUyRT8nfwibOtSGg7BlVkbweuS\nEjNFPxS7ZiUbMsOHAThUyHd4a1xPO7+Z4/Y3NAhGT0IMIpAULO/lZ9VikN98\nJ8AoSeEy3E41SaPdIZVyt6RsHR4BzIzCWYse3q1CF8Tzk7PHa18YIZ7rtfWI\n9p6ZJSMQZ+1yrIxZTZNEpthP2On4iDQEgxlOYhk44BcKBLBIcXwsYOrKXCuV\n/0MIKS/ZfGPGbOu6N7H5bWD3biVHiUEP4jxbfRHSTzRrY6DDiGCSo/TA9tKx\nPc/MUL8h6K4mFOcwe5Kh/2U4hkDiE0iFbHsT4Z4NDnzCe7TTwyanuYWjkwlJ\n0X3z9qMlQSvmq+ko8kyKXL7xPHysV6tT091iKRHYfRRDyjxi/qe2JYQqP2Cs\nKPUsuonK1PMfevHI75AZljXUKAdzNaxqCJ9z3gPsq7mGmrMTqOK59Jyjjxs/\nDe0Rbb2pEEh/KQD/Jl7AW0nWl3h3WeHzM3YmVxHrL1Sc2BzH4i2edtgqWBBz\noR4zTHU+lLqVouuyyWyrw5iWEHOKW/cXsVoM3RfScszDv+aOqsqytXYfU1bw\n5rnC\r\n=D2pU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"527124b23c833c0bbe24a52344f859b949028adc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-09T02:03:21.783Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.1-renovate-internal-patch-527124b23c833c0bbe24a52344f859b949028adc_1625796376274_0.4724055401436995","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.1":{"name":"@balena/jellyfish-client-sdk","version":"5.3.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d0343d6a95fa2a33b8e6e4e4b886e43aee2a734d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.1.tgz","fileCount":39,"integrity":"sha512-98hsgWF771J/e7jwNz3ue5OXY9h09b2lc6yXZgatxyWHJzmKiSQFTcm/en4GoMFaYnE0YnowoTbQVzbYDCdu+A==","signatures":[{"sig":"MEUCIQCp2w8N3rLRmgSNbL8yxyXy74OKvHBgJEL/6akV8QecCAIgSobDigABDloDLhC/+J11JXAJ4KfeSCNVERFatynIaXE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg57ARCRA9TVsSAnZWagAAgKUP+QHHag84YnviavBguV7Z\nKStwtW6lEIogHo3uwq1lG60ess7Qlrp0Vl/AWHUfUwSaS4YIMCtkdGXK1vmI\nR8omRUVOnaxXmLQzWNrF0NuaR1dj27Vuiq8DR5WXvhjRWXL5B9ITuj2lLGQK\nXENcnCgdk4Cy7Wb1+YrKcZXVvIArQS1Tz7kqFX6Ww2l2IAi70K60Y91bSm1C\niIzvxKYjo4sDZ4HF8tfroKdnNys55Ch299RfrkpNBkccEOjE+eqZtyl6wckl\nzJy2RLFwAtrsPMvmreZQLsk0xq8QJaQc7w2Bf7sEIQ5FEfgnxf7SvmHOSRLj\nJ0F43XMVaB2yXEgqrJusjdclGLBi8T04IPSnup0SX5nOB/3+PXJZolbkNbRj\n0HhHdk6HYxOYuLvBjqPLiBmS2NQTgBMlmrcLrHbw5Rph/psC5U+Z/B9BUkxX\nrxrSC1JiqScVyUKlmEXoQIu7SpqRShXNldvp97ek2gAfFhXwAH1XoVxfxHdH\nYJpNApYxFIGnbsruts26pVAWMcNgkLXyWe9gpITxzmspS49Ee72ei4s5Mg02\nTF1mUnYywjbshkiaQzRnfeSyuHnor607rm+vqqngjKJzN+LWx/mDxpGuIOCK\ncD4MJ5/oBCAjkRyrE72na1KbUJ41sJUpb9M+PMxz+0DVVn5Dos/SIsjJKLyU\nuNdf\r\n=7yQN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"59cd301fd0c7c8802cbc9391bdbad616b5e074d7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-09T02:08:02.045Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.1_1625796624674_0.5399921863934114","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.2-renovate-major-external-major-5bab93a2330a34a2441a91aa34d79572dfe7f024":{"name":"@balena/jellyfish-client-sdk","version":"5.3.2-renovate-major-external-major-5bab93a2330a34a2441a91aa34d79572dfe7f024","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.2-renovate-major-external-major-5bab93a2330a34a2441a91aa34d79572dfe7f024","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d2a7cc4acd0785c33331f1209b0c19bb4783b2c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.2-renovate-major-external-major-5bab93a2330a34a2441a91aa34d79572dfe7f024.tgz","fileCount":39,"integrity":"sha512-N0sjP6yfrtZx0PdYZJfoUmQSqZU/XvdAzyCM164pF8xOnr7E7E2Sd6qm/9ke4f+X1gTuCM08IQHQnLgxxEYbRg==","signatures":[{"sig":"MEUCIEpqDEk2P0VwS2rIw10VdRrS1/cwvQ0VkFiAKedv4RF3AiEAhnOb64v2VtvGEAVnRq14Sq4vKeG36pT6sw06imue3NI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg57FWCRA9TVsSAnZWagAA/TAQAJhOuhHTI7XM28Uln2k3\nNU5iHDz+cnOWgb+otaxRaj9KtFl5v1BdfddV+VUeT3bclQRYw5QiiAZV8API\nAkwLQdnB9rsp491tQAHwcWdPTV/EaAK/h9CEG78eI2a9onHqpR1CviqdGaXr\ngw8xaHvUk9e8OgOeM8g8rHSvxMr2NlvYEKgBzjp4poqOCb02XHGaunz4LNWh\ntVAYdQVbyTSKY5n5WYSo243crPvV8bzRtwsZxPwpcD956GriNX1NsQC+iNx4\nK5lCIGnvfjjvj+CLs97SD44z0csLeHqDoS12tngb8dJZLC0UclcK9+4GDFhg\n2+fPlG8cwFAwbHKZiiTFXznJCC8G/E0JD47TOHy42Sgm1+1bLyw2ksCSb45q\n8Fr3m+Ddm5PhQcfrOHoZz8Jh9CyTre29kLGy4qTgTSd5aYu8kSTu9clXapC5\noZ+XQXkU/KLlEVpT8qrjo1TMZ4bYiyydKJfUbmLbfJX/5ouu8j/cfMep849B\n2C5lyfifgzNSlw+RqmrhxnfPX91yFUqjnAth94Qkj//f4MT5njxt/0OhTHlX\nQXU3XjkY4BXlMJgPPD4aYGyvTscl3GIgWLFQEgUb0tTlNMQjWlRNKheE34Yn\n8Dyzlm1GrgOjzsDblrmAOe24xz0F3edMShblt0jNTLaGzHdwNUcM/uImXcf0\nU2Dy\r\n=0JnP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5bab93a2330a34a2441a91aa34d79572dfe7f024","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-09T02:13:23.066Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.23","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.170","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.35","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.0","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.2-renovate-major-external-major-5bab93a2330a34a2441a91aa34d79572dfe7f024_1625796950259_0.6725998018213877","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.2-renovate-external-non-major-c28237419f2d28df040d9ba24dcb75e731838b9b":{"name":"@balena/jellyfish-client-sdk","version":"5.3.2-renovate-external-non-major-c28237419f2d28df040d9ba24dcb75e731838b9b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.2-renovate-external-non-major-c28237419f2d28df040d9ba24dcb75e731838b9b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3d6ca68205262de51a3ef7958e4e3f70a9a57b89","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.2-renovate-external-non-major-c28237419f2d28df040d9ba24dcb75e731838b9b.tgz","fileCount":39,"integrity":"sha512-xhAgvAK2GDxKSJUof0lrMF4Qy5wjdqVYf2oyS2rooCDu6/1/BCiYTW0L7muDO+0nxYFuWaQHOLdRojIC1sDqYw==","signatures":[{"sig":"MEYCIQDsrHen9VGgKsr2GnFBslkyBMS3qo/nr4hlGFlyfb+Z6AIhAI7FmQMhw1waG42eOHdolPkkKIxtEXIxtoRBNMC7OHtR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6OnGCRA9TVsSAnZWagAA83kP/R68+Ld/M2dy7ydADR5I\n4n5i6Nb15TQ8OIvhRs+Qy/osiCs0y+KKDeJDSYQeg5is9goqR7HRbk+Tu2+B\n6uaPjqIzz/VtYfVb6No5fco7ndXD5uAmOvQ9DeIL8hFwV6++v/6skX6gz9zF\nkORjHT8dv7o5DujBLTX7IkhPYFTEow5jIvv+AEKwreJcBgy3TMw7eihzCYv2\n/cdSP9llWreSm04usgj/WbsHDp/A8Ov9SlwxM6KfmWxxwpGvaSbwzijo3ASz\nf8CPE6Xhj1Q3+M8MtzyHgwsGFgOhnopFuVrSMXAZALl8jKYVjOnHwlDEi990\ndfD53QgjVluLJAxruhMcApOdXtfOD31sIkab5bw/SGXiJONuLWUvHHPInqad\nbHLLjE+lxkfgU05aDwUn0eKEuHXVa0ZpexKU95uCV98FOwXQ/TWroCFtkczg\n/9YfNnE488v3nuHD0BItBFd0TKN+Vos6BvqJprofPFUc+u/2/zLJrynX+RBA\nfh5MLZSXPKVFDGkjQapRiPSMGV4ngZ+qFI3LR/pxw+esUzTAx7Le8v4vSqxK\n5Ra/zL/qOf3RPwSKyQiVGAl5f6BAAYXh+v+/wXFrsxDH6dqFQYtpyd0C2Vpk\nk04ahCYkFrPdml1iD/9Ya2nwwq5yaXdHr6i3GJPprPprZKnqjPpgKPtOjBY/\nV2IC\r\n=elhn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c28237419f2d28df040d9ba24dcb75e731838b9b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-10T00:26:01.511Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.2-renovate-external-non-major-c28237419f2d28df040d9ba24dcb75e731838b9b_1625876934380_0.6117994022271227","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.2":{"name":"@balena/jellyfish-client-sdk","version":"5.3.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"45c5b09e84e236ac11018f7a75d323074d8cecae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.2.tgz","fileCount":39,"integrity":"sha512-DqyjFennYo8DnsB6uOK+M99lQA2odK8XsnCifahhGn5XKSXqZiiv3aXdLby/yuTPzLMYZz6/dCGmcOfM5cezbA==","signatures":[{"sig":"MEUCIH/jAbFgpFVDh77zERirNGE4YdAeluhff5UyA966AYfeAiEAv9PLzffjeYs9myoYyY5I0OprQYButcdU9J0c3Wl30t0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6OsECRA9TVsSAnZWagAAGqEP/R+uxixxGi95J2ZIocfb\nBWQVWIZLt8C3gbHqyjZQX2ucSJrGvr924Fwp02euZ/datGc9lvC/3rxza7M4\n/O0sxbb+Xg8e+5w06dz2LGB0kNWbtUa2CqOgR6d/xkfkDKjULvTanekCh3kp\nSVDUKbQ4uNfZpjGuePdkEu/VaWz+Gz7q/RdxB8gZouL7rASBIHgDreylp9ME\nT+G+3WvlfCu7RiyF5zhXxZNz9bOxzFSJW3hNr7khpYy/BRLqoi5bbVA+VNfw\n0aM8n90S57VOHEKhlzZMQy/Bt60pGC7OMvS8Eh/g6LES30kcQpU6eieHt2tJ\n8AuKi8EITn1DjTAn1dwabm1nIQM/Dp7zuHhkW6LLj4rvBn5nS7xfpJ35pIYX\nLMhRgfFoHL6IGY9FoQv1whbt0V2DGzZSuMy6m2EEQpp0hsg9O/ZCmTHpSkXM\nGont5WNIqZVIxYitKuu0/OIHeiECjKWWqPvrcaSKWrFsiC0B33HyHrKPnEFO\nBCMtI5bO4GncBhgJS8plsvHJFYpwJOlhtvqZ/WtYY/Stbm/icOZY0QfcMvR7\n3fWXpbXsaLGXJGDgFx0xSrE93ohfCq+pPweB5OmZCRacQBPJP/j06xcmQCC1\neg0Sy3Zs9ctPRsHfCoAhyHM5QKo4+msOSL7SPp73Vq0CnwtGO116q5l8WPWZ\nrt1c\r\n=zMJD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5b1181409a5adee0be9a688a9179aee2ac9f9537","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-10T00:32:13.801Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.2_1625877252141_0.8309817950064151","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.3-renovate-major-external-major-860be4a7e2063b4f3645ba7f35edfd1f314256a8":{"name":"@balena/jellyfish-client-sdk","version":"5.3.3-renovate-major-external-major-860be4a7e2063b4f3645ba7f35edfd1f314256a8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.3-renovate-major-external-major-860be4a7e2063b4f3645ba7f35edfd1f314256a8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8a5328b5f07e19fc5aef50a64d7fc161f347a76e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.3-renovate-major-external-major-860be4a7e2063b4f3645ba7f35edfd1f314256a8.tgz","fileCount":39,"integrity":"sha512-SA767gTuOapF69jjENjXIpQd09dNDHqlZPqpHH8JdhnONIOBYrMcbL9SjdGTyGC1wIGmW/HhOp3dDaG4LdOFEw==","signatures":[{"sig":"MEQCIANka1bEYjDXRu5NHofR+H/J7J+s5uDARSP2f36NDR/yAiAOquVFs4siu3z2FOfyjZ/hIXKZEGzw0/jk80OtnSssKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6OyJCRA9TVsSAnZWagAA2/cP/2eCCajQmkLwDCw2wtgw\nrSnNuWvNVIrKhZNiAVV98f9C/VCUGKD63bzZ8cLkVGNNp+fUJtYL77K1jnEG\n7zBGyPpfob4VNz8ZvxYgVT6oGzY+09MpqQaiXI/s3JCGUhAU46WkhQAsMAl3\n+ujm6bbZr8IsRLfDf1WuUJuqUreTwG1GqWoh/ewQE4UrAyMgGHjY5jnC5D9h\nxzQosu4fuEinlltLoEb+2ncvOelbsm4uHkkKe1PVVLtrlI/q+pIDD3RNI8Kt\nRRl6TCVuPiZLVZQjp/5wDsuqtT8Z79uerudWQdCP2AGRl/6uWEESvJj1vkTE\nM81x8cTyI2qMK+FEL7Sp2sqMdk6h/peyyOKZbKK55I0bbkSHGsPDhpQ6mY0J\nSS0bxsko9/QjoAxdHqUkMAr/F5E5RZZ4l4Y33Ekfz5u9JLTU/+UI35CveofC\nxEKD9iNMZALUVsOmfEJIto2Ga2LKKBwuBh5MLWLB4hELb99zXrZx+UR4LDoD\nhXFfyrLQiIJOlx21lDl3MJRXTgXEYg20lEXvWCtGYcL7Wb0De6TI0x4wg8ju\nJLGZ8d5lquYm/Q9x4lSRaiiBeNE9bxNz/6NBjG39YkhyuL3mRKV3MZPpl/gb\nQo0fRTKTIGNyk6W4A88ARaaY6Zun523JT9/5EmmINn0G/Fl8FyR2YL8k/Ysr\naZpO\r\n=+7a4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"860be4a7e2063b4f3645ba7f35edfd1f314256a8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-10T00:36:12.210Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.3-renovate-major-external-major-860be4a7e2063b4f3645ba7f35edfd1f314256a8_1625877641319_0.9536305296073952","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.3-use-jellyfish-config-081dafa2d95e8117554aedbb0224f73c7c6d0087":{"name":"@balena/jellyfish-client-sdk","version":"5.3.3-use-jellyfish-config-081dafa2d95e8117554aedbb0224f73c7c6d0087","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.3-use-jellyfish-config-081dafa2d95e8117554aedbb0224f73c7c6d0087","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24ecd2b2772b201ad68737f1d0550c602afb4297","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.3-use-jellyfish-config-081dafa2d95e8117554aedbb0224f73c7c6d0087.tgz","fileCount":30,"integrity":"sha512-BSn+YH9RfaoWRTDLyCGbCOnNLD6qzTF6Mc2MHaffVHb3y/AJj0Sy/iUFyA4gGXr1DbpZY9bjkfychZZzL8Olag==","signatures":[{"sig":"MEUCIGZhY8UQojutpyelqjX0nkok1/rtDQEBObmlVRKl+EPoAiEAvnzPp6ut5qeeriNIcDq4HKuy9AehXG3oPqL8U+fJ2FI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7pVYCRA9TVsSAnZWagAAI5cQAJJsGZ3RiNouMhfhU7i1\n+eY4WytL91SMkM6rkkfuv0epLzwJ3S4OOcC8Ci9S8FgECpj0Qbwoswxc9816\nXhkGOsJHcF42nN+WcWijnIkJLhoII31Ul5InJkl56x2pISB6nNSK8ZOgPmuH\nI073xv8X06fyHynY0+maLKo75CpZydAkeH39Yzcc6ZKUEOx+pxm5eYBp42Ic\nUcc4y0Tek2uXnmyQfQaufb7aqG4sBnqRgANMf9wFSPmC6oQd0qsbND2jzxMN\nJIv3gGi645QN+grQT4gZ0TgfmvKUT7Da1a7Las9yd2+o1SHIOof/j30uDib9\n2HslRCgZTgku783ERn9+4y0eNCStB9Zak5xIsrR9AkaEcU1Xhzw7OBgyZaSv\nwyArBWihsSIJbxRheQ4Up3v3GetgscItb1tf+lQFa+W0qJwnZyoIEtA8Xvg4\nOfZGu+2PuVIrcRCiHWDj18gegTeAv2mY/i2RCPakShxpipk4au3cDJMt1chH\nX9Q+EIuPy4tdtsmBoy/6LXP0IMlX+/5c5O0ynUP8bNBEglbbJcQQYyBNAntG\nIiDIYf6sfurag4Qjx2Y6WE9PxETBraG3ngZnqR17tIh3SUV+8mCxFVpdOyjT\n7v27QlD3S+gKjzqrQSrRj963OO3a8KhANnMkqJfSv26/t82VtR2tFwn1oBlM\nohrV\r\n=DJ1t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"081dafa2d95e8117554aedbb0224f73c7c6d0087","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-14T07:35:43.898Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.3-use-jellyfish-config-081dafa2d95e8117554aedbb0224f73c7c6d0087_1626248535486_0.6462997443330978","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.3":{"name":"@balena/jellyfish-client-sdk","version":"5.3.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a1447dc265152bc0b7b71f26ca770eb4787aa80f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.3.tgz","fileCount":30,"integrity":"sha512-vUk+Fji+bZko1CmnNDxdtmv6k+09eyivLm5C52foQ0hekhXtPVwmJslHuDzVTZF+fEg5hKF5+tvMPSwUPMobTw==","signatures":[{"sig":"MEYCIQCYaYOiVqhbt7n0dGDrQaRb7S4AzMJwPQ/3gsjbCfovSQIhAK+RaJT+4P20f2dbnFrfAHbXC8YaROrg6uqEYckNlkoV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":245763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7pZLCRA9TVsSAnZWagAA/m4P/3qrTPlNUH7cU5CmAHGO\nqESUh/qDV6Hj6oOuedbTT+waGtIuV61VqkVK+g5YHWKEUL90CGmGQeYJdjPv\noMYkAN/Oec6cZC9H2e96YNVfoZloxnx61DCZ7TQr6ExNw0FaCTrPcaqL7ZRj\ndQwSCEgn2smRL7x/Qq0FtHibUrqF7tE1uDxF7pIwI1UN6b2C21FE0NVunnk+\njR5Lzmz4HNsA0RQvxqA+IL2xzafh7SHFD//Zhxk5dykTBIVLBHSfbWCY16+r\nkuFuUamCmMYwGgBZZ/KoVsT8iyp49fp49jfu2ELT9O+taV/MevjNPo6+HC22\nXLzvgB2AjWJuceTUFbav5TdkUAWT9xOsyPkJnuessizi/cmABh1IdTcETPIz\nRHPdEe93SyJg4H2QUZo/PLHIEGidML9uVuZ4C6NqeZi5yao77Vg3eh7g54YX\nJADf/9ycnpPW+X4KKkglHuZZffr6/ppdwWDHxh3/OVXHYt4404Uv6hmtJS4S\nd5ziLp2VB96PLqAC/gRkKVZr/SvnSAVfs9ZNGrEKlQ+/ssSFUCHr3zhiy3ED\nMDEwT97MT9nwZm/yk97wois5JU1euu5ClpNND+AWtVrVEfAgAtzNc14vZovC\nO4+IYJwnffebY9ZN/Oq0e0jcjMjdH2cF3PjNo5FhTOlHEz2oZfn3rAvAVVdd\nZ4W9\r\n=2YnW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8dd203fb16cc7d71e2756d5d983f6fb1d27eaa73","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-14T07:44:22.409Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.3_1626248779383_0.27922517743664543","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.4-ecmascript-downgrade-ea0b2e63930bb39f06e16377fbf8bd0de792fe56":{"name":"@balena/jellyfish-client-sdk","version":"5.3.4-ecmascript-downgrade-ea0b2e63930bb39f06e16377fbf8bd0de792fe56","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.4-ecmascript-downgrade-ea0b2e63930bb39f06e16377fbf8bd0de792fe56","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"580b9e4ae4e2f8ed20a14f826f0ac0dda0deffca","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.4-ecmascript-downgrade-ea0b2e63930bb39f06e16377fbf8bd0de792fe56.tgz","fileCount":30,"integrity":"sha512-ZCjro9KSvWC1uLKU+2DxCVM+vbsZsGX95pXKlPGFLxhbdtvL2vBI3S5uJ3+G1IQZ1o29/A7imIgA9aJWsW/H5w==","signatures":[{"sig":"MEUCIDFB4Cg0BoVTNm+ChvYZB9qDwQWZ1YxcJyFm9BQg9sqcAiEArXxOMozbua8MrxUuvA2ICoi42SmY4NfEh/pwOg8p36M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8FpeCRA9TVsSAnZWagAAF4AQAInH6bYMU6wlxTTd6Adh\n5NJS4/NIqQ9j68wF8mZjMw83NnBVDRkVYICEVJam2qSuIEXLdm+ujx4hYetO\nFhpchKGhvEGlQ5GYQVm0G0jNSiZo9p7BXbqjR/nQ3iIva8jjQ6RfHobhe9tY\nWpU0JC3bXSt8hW8qenLVMHy3s1i0gYU2n8jGq/7HCtGdR9+UJDDp5R9zhVKF\nCJxvC/df/caTKJrkZ4VSr6ZHtNA0BpmnYJndM82wg6BC/EXqV0+eeurDSkY2\n8U4q/US36+NK0LfUb6xTK5MWRmgdqTq4ht0VOEML4eAHkfvbAB5vi6itw/Xv\nfBAoMMPakmRA1XasD5xrsPr/zft2c08Ea9hnaVmSU2B0KTvnV01lTRqC8igT\nKLkLcDXyqhZBVUQhwR71PBE3BWLbMEbDKVDyrSdUb/z9MUkODdUbEjAswyPP\nVC0eKr7IG/jBG/PHcoEOe8IeTrFYWAky1RKGayoTQWtJQF3Ig32gWrhUaBOn\n54bf48qsX9v5j+LvieiI2mg0vJ+YLTOsgtYNmEdhDyZCswivcTJfiU/Y0ifU\nWNgbt7dqVFbOkBZi6fTVdYkhiUY7ZsaIR0lZRQgoYAUt556Nj44QNDigx+rK\nJ6gTxGG0YKBFjkOWeFJuLlr6k7yVJzVPZOmWswE5RIC6cPii1IQl+qwi/skC\nlQCV\r\n=6MAZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ea0b2e63930bb39f06e16377fbf8bd0de792fe56","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-15T15:44:57.303Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.4-ecmascript-downgrade-ea0b2e63930bb39f06e16377fbf8bd0de792fe56_1626364510801_0.8355248821874066","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.4":{"name":"@balena/jellyfish-client-sdk","version":"5.3.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e31e39dd2dec3a96485c0fcb740fd2dd166ac25e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.4.tgz","fileCount":30,"integrity":"sha512-3Tn0MCBObe5fQRaF+Wco7dfCPRaj61x148wq3v+p9zGNc1Co0EHJVgAObfy/wULPfmXVWohlxVCnTk2maGcqmw==","signatures":[{"sig":"MEYCIQCwStyb88FU69PhUA+vwphs4C4JwIi6ynmVfruchhuKUAIhAOgXCGZrrw+rS12bQdNs/R9p1C3PuQ/z1ES47H53iYsm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8Fs+CRA9TVsSAnZWagAAf2oP/09rBotuImQTv96spvQV\nrg7okUL8Zy8ksi15f+FnzY4+0Uox4K8UpOY5qEQ0PJroZL8Wk9fZtDRDlvB7\nyA/PCuNIaTGTBSxGm8k4hxPzhl0Wojraoz0Ot2zoN4vYhmT3ftuHylceddv4\neqqjwun4YvLP6VpRwozwbIWULQs+wkd68CMnFMP9XHXba3zqXvBrKSZOas/t\nO+PlDExZl97nSM+LWMFuTJeFFEAbrPHKS8NCo1zbinpKO4UXSl0SXeVzoiLG\nemjdHITsjbFS+bPlOVeWD5q8zxD6nztw5agKTJpMreNN+nMUrdoXu+w3T5Ux\n47njigDNYW2nr6juh12NEZCrRNk49aUvesUC/VrbgBu8eq/LoMqpVEjyT3NB\nD/fjx5HYzK6Srq/3LdgU6t1nvwrkMwIesFGHMF/+D4HDx6DIPAMzW7cu/+xH\nKSI/s07gtpIsSGNyCo+ZL83NVFbaTc/iCNyxSBZWWfDRdsmMdD5YL/zN65Sc\nB+NDG5XmPOFSMlu/3UL1HjMyWZBBOowX/XMcBstR4jtznkIENXvX80IEebs2\nVZJ2W3gSSzB8wtLvFIuhcyFG8MV6Y6NGQq/zCeoHjSJVY9B2/U42/JSbi0jX\nmISZfxqcGCih/QW01rIHtA+Nb55JfdnHzEEhhagSYPQPXnXSYgoPuMOcJKla\npSYB\r\n=9UxK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b1969c9dd65837e070dde72974730a1669b05ded","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-15T15:57:12.041Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.4_1626364733973_0.9677631632749721","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.5-remove-whitesource-0079f090867ef9c4b083a8290bf04e4b7956b6a6":{"name":"@balena/jellyfish-client-sdk","version":"5.3.5-remove-whitesource-0079f090867ef9c4b083a8290bf04e4b7956b6a6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.5-remove-whitesource-0079f090867ef9c4b083a8290bf04e4b7956b6a6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"715622fcb939190e6647b299501413f3dd5a45f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.5-remove-whitesource-0079f090867ef9c4b083a8290bf04e4b7956b6a6.tgz","fileCount":30,"integrity":"sha512-W2oJwUjd4kyvHdW58a4BG5zrYQgVBEC7Qh0I/eXf0NFYKi6LrBb6CJJlnlYF8pvnoyjYDaLsrgy7WI5efy0vGA==","signatures":[{"sig":"MEUCIGZHxY0M78ClqJRneRUYTITzCn7Vwos51zd9StvXZpdZAiEA6I5C9DiWJ4dXNv1msr5X4R9VbgX+0pHr+FykdteULQw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8iC5CRA9TVsSAnZWagAAAdgP/1kKUpCFmt6AT4NKjsEQ\nP8fndwxCLHcU5IHgpG5QFCxLB8wWQKXV4P2WhjhKyIWp5bZ6i+Ny/oeGKc+m\nQ+dStL67wwzTHdd63sAb1lXLXPvbi896LhF9gi8H4YUD0v+m7wBcEaAaf0wj\n4n0IBoeqCGHa5QpE+WysEL3I3rikIGVvmbuMC6Fkha/3P9y8Wh117CSAbmnq\nfmL+BxKQSyMoNzB+JXdWD1k/Oi+fJZYhD9JUGv8v8RaUiFkhM0u4rtJ4fNwt\nGJb3aYmhLOAGvdzSvRO+7UlAgvJXZ0zJtHYqGdvco7KWgBp9ubAv0Bh2Epht\nIgBqAaHIKE8ywbMcQ7bVRCjP59YaaZZ0ER+ESBySGcRMR4BNeleqJw3yfoDl\n9QIX9iwqCr2LuiXdfGXIkGT0dlBNkEjFf09iPSWPhEyx61a7tdfQl3WnB2Vm\npj2r8rnwOAY0S1UvmT8jHzQFHe759fY/Q6JN2vatSU0QY9wfrWgwCJHMJXP1\nAyxqNQkLPt6KtQfhfLXtFK9UmxOm2kPQkFA7YIHo9W3WvcNLDr/ZcnQ+KnpR\nZBvbRsqw5NtHATerLb/uCc3Y8wGUtt7IF5opRb4po68UVy5md/bzVIXdk7p/\ndS5cQHVkOcXs7Fg+sEgGFx0Sa+yAgbs0sya5ADLuNT4BCdx3nMZ5DS6ld0Aj\nFNbu\r\n=a3y9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0079f090867ef9c4b083a8290bf04e4b7956b6a6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-17T00:10:42.483Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.5-remove-whitesource-0079f090867ef9c4b083a8290bf04e4b7956b6a6_1626480825435_0.2261300862057798","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.3.5":{"name":"@balena/jellyfish-client-sdk","version":"5.3.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.3.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"524f1118ed75a6af1eecf31ea66325d12ca01438","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.3.5.tgz","fileCount":30,"integrity":"sha512-4caNL8RM6JKznGpqdU266e4GBjwq/DD2LjISxZJgmVBeYnFFR9Z4TlnPkO11rcOfrpSCI9ABqunFR4EhUlR0/Q==","signatures":[{"sig":"MEUCIDXBCtNXBIPVN2l4ds0MB57CPeEeqOg654fr0u1Squb6AiEA/s86OS794xTRErxD6hmRRqtbt7sxImJihGXlcO0pPJY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8iG3CRA9TVsSAnZWagAAOJYP/0gg0NiOGSecpFBTpk0+\nFJHE9Pfmokl8i6QwZRTyl71oi56T5w1UMIaNzSA69P20IetAl+Mgkx4KUjfq\nyUJ/82mVzlvwBLTeNIhtO483MnSk6khIdN3hhtkiW+ohhZO1MTu33cJgRxXb\nNna+4krlO4LZ7nxOq2dXZ3T2rdroqFrm7XbzZcS0IKU0m2bVlJoGU9hR112Z\nUKuyXK20vC7o68L3U5E7FhhnvyJt5/kztU5xvqqjLtRzoY4UZLRcW5EOReoS\n+gP3chGoA0rQBppNjYf/JIfzrzcn6tTbtOQRidYeXNeV/JUXQv+6L9qinE8f\nhXW7dU+yCXn7zJ+vyL2EnkgqKJbLX72T/vdBaNANixdJNR9D0iJq/YD2vJ8O\nMpLK/ijJCUqAhrzOorYs+dwQU8ddSAATv38YM/QAmcRk/QvdUwv849X4zUx3\nziIePBTGnqauW5QGaXA6Bmffc8NzkgL7nbkuwI4J2t9iigD6yNiYk+IRheOU\nrZ0CNFA6vZ8uNp9jGxInsgjlPWNpt3my7XxwxNHy+FPyan88++jRXHjU0nI7\nymqrRUiAphouzy5XzxsC4g2+PFJNYeoTJmroVQLZvztIJvugDmoRby0tzI5p\nC2EogCS2GkVVlHClV/rzv5tkkrTUsP1eeHbk6pqXhLL4QgHvaNvl+0IHh9te\nglrK\r\n=TnJH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"82eb5a5418ac4f475e540b4d411a54988c4630ba","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-17T00:16:11.891Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.3.5_1626481079560_0.9413723849413478","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.4.0-h32-pr-commit-cr-links-cccf7ee82b8f134736141f875060ff7d8d3ccc18":{"name":"@balena/jellyfish-client-sdk","version":"5.4.0-h32-pr-commit-cr-links-cccf7ee82b8f134736141f875060ff7d8d3ccc18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.4.0-h32-pr-commit-cr-links-cccf7ee82b8f134736141f875060ff7d8d3ccc18","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1bba99fe58d55c4b4a369aff2bd85a205a78de8d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.4.0-h32-pr-commit-cr-links-cccf7ee82b8f134736141f875060ff7d8d3ccc18.tgz","fileCount":30,"integrity":"sha512-Qon61WSUaoF12Qvm5WV+tj56cQCZ9oA6GIQgmIJd1qhb46qggOQRVq93V1uihMACX30ksAOcjZdTqw+m8HP0aA==","signatures":[{"sig":"MEUCIQCANr0qqCv639b4cha8pwUWMx1N1qltBjzpFzKIBkWunQIgFH1be6HjN8YHdxX8e/MbzOWqo4sVETHEFAyziRvOncs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9VLJCRA9TVsSAnZWagAAxxAP/2Zjx50Y80xOzkqfSu2Y\nIqdXcG8xDF43/aEOOcSoYB0KRk/vf0XwzGMebWAUSuDM6EkUn4QAFfOxv0lF\nBPAF2ICwO/IJzPf4oslX/ZiNnO2Mf3UWSH4BOYKgxZC0xjOqYpMs+QyegrB0\nUDCqX+RUsN++g4fSY6hZfD98bLlMsjc6nBozvMt7s7O5SyeA9PB5a7Hke/N9\nR2DXIeXTPdN+m8Dxp5CajtUebfmH6iSjw1cBMIDyaN9TdHduBQ/Vj68UIBOu\nCuS+eETwlud8a4wH9SpnH3SQSrFrX98IaBsv+TrMnYr8haDIiqR1MmJtFh5y\nLxf7hq4ZWg2LojQLZ5s/OCR8YUbkLFEgY6ZJH5l5zuuF8tlUCkUCiXIIF4s3\nzwY0RWhGr9PKphhoN4Gt1/kBfJKuiUA8PsNm3pbVYw1Uyo7N9zKgrU2S9+aN\nWhJA5SIl9AZMW6uoS2AhU8oFbexkz7L49Z26yq3dxPGMlP0s4Ak/QhzG6kG1\nsELjmuUoe9E2OaWdjc67tMxvmQ3Uo0Yv7jfdC8Mtp2nQEkoyy19b6drzJi9U\nJ3RRhUDQSz+EXkAou5O5WZM+YjF5+fldp7pDZWxKerjkuAXYLvDR/ZkJyQEh\nW3s9AOPjty1FZfV6UtIPHxdsf0F7BZubH9IlIMq0+z5JdQBX1Neu/vf6qGl4\nEFVQ\r\n=gbIi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cccf7ee82b8f134736141f875060ff7d8d3ccc18","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-19T10:20:50.787Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.4.0-h32-pr-commit-cr-links-cccf7ee82b8f134736141f875060ff7d8d3ccc18_1626690249270_0.04742282547705612","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.4.0":{"name":"@balena/jellyfish-client-sdk","version":"5.4.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.4.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f0bbc807d74c0ada38159c53164929d5dcae3146","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.4.0.tgz","fileCount":30,"integrity":"sha512-KCkOqUYwENq3oCK2TXtCJz57Qi8sURI4acVpGB+ySGvR5IjmcU4k4f1lqYoVu1G9y+S2oIOlKFGiRFlsUBhKRw==","signatures":[{"sig":"MEYCIQCFomp8UuTt4yrC0L7JcraaLS3JyEzDZLjwTyZy8O641AIhALjd/V9vh3g8110f7G8dubXT5WHWS6pe2aX2QsRcNwvs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257504,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9VOHCRA9TVsSAnZWagAAITQP/2xwVW+ContGSeji1/7e\n2psVnZXj0l3bWdb20xJoBBtv/ByIdnef4znxvUEaqPOWE5zbcjuUmjjYhc2t\nC7+W7CVRVtUIw/qem3VlfhfTu68ELn6HviN5HycuM1ouOleEwpyNstJA0g4I\n9IR0gmh2W33W6xRjjn13OeNjdGRg30bPJVo7yzRnrFrTuY7gqgIzOJuRI9ep\nu9AH76iA8KyocuTTFcysV4QMI70Vd0fDILDh9iyBlaUbP/yevpPIK+Ril3RB\nGTsW0oaFeKyzhx/mNlobK70ZVv3HJ3R4Bfua+H2GWtjIJVo9st5j5udt7bRo\nT0E/A0g0QopVzx5LspKYzoyY7VFTPG33vaOePNAfB3oTnU0KXze7F+7rtkzU\na5O15oQDVoJcwv1/PGD2GkhitagB3h5QlZktQmHYgYAw1+lOhEJM3URYi4Y3\n44vnOQj8QDemSvjaxcxolpD9MIGKZD1EhVH/UojeTV3ofOQwL+TJE9zgY2m0\nYitd1wh0cX5nU+kcjRGfb7ruDS6bCfCGXGu5DOhKSKus/TP/3xIf+I3waOWl\nZXUzqRbbX8jHDJ3vnIMgdBcTq+6LctaehMJ+LA4e3t/rBHLNExUe2Nh5QzET\nUH2J12r+ZupaL6268keXe2RPd8NI7FJFDIWDN7EJpEOT/sCIfEL4VCWOfUpG\n1/sV\r\n=fppz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6e798aec69e079afeafac6dda53504701b06ef41","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-19T10:25:40.859Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.4.0_1626690439337_0.6480663536050069","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.4.1-remove-contribution-score-refs-e0467542779dc71bb000a523fa20e9b967b76b5d":{"name":"@balena/jellyfish-client-sdk","version":"5.4.1-remove-contribution-score-refs-e0467542779dc71bb000a523fa20e9b967b76b5d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.4.1-remove-contribution-score-refs-e0467542779dc71bb000a523fa20e9b967b76b5d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ec58740852b8c665a6be8d5ef28c47b5942d2a71","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.4.1-remove-contribution-score-refs-e0467542779dc71bb000a523fa20e9b967b76b5d.tgz","fileCount":30,"integrity":"sha512-Gl1BDbQ46YGPLxY5Eu1f1TvkPx3pMkR19dwK1sFeWjNpITYvfDF8ewmxvCdMXqbMuuKZk+Cgsr7hPiqB/R2GyQ==","signatures":[{"sig":"MEQCIHNh1TsihgxtWo6xIgVV78RRyvQ3YIm4uLKaEW5zf6uVAiA/UpvH2ReIyvv4hCpPEM/9h27oYZ/OdBEv3HAo1Sblyw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256720,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+X9PCRA9TVsSAnZWagAABr4P/R1Ddzm2mWHoz04Bl9eT\nXSKKlHVgoPcGoJ4qJprRT2l25Axtkpn8in75asJsyYPigOmQ4nS6ECLzOM1Q\nGpCYE5vSuveaR/TaR+wwXCuyOHGUi8a2S6fpbNeqkc8WjSe9eO0N+IcN8rlZ\nKfbKDNuqGAaarlHS34cSaI94AdiIssS7zU+XJlKjE9xXF+8qrXwV34I7l26C\n4iscrotFzpDwyE0SC0K2ey88XfQoI1Hk7BFkniQVrVJxugKCmEXLeNxKzicY\nlSLlb5G+J4nH7Nw4gaFHJpA0FaclMLPxiZhbR7/UTFtSgVtvjOaK/N2+5c26\nO7Wv+AOPbs/UzETUS1b20vuqGFU+9q2GYl601QNWe9ayHJI9y2rmVaXkHVN0\nQl6xXJn+46SDq4+PAvAKl3JP2SnfCaLtYDk0QSxDHi7VJ6zZEl3Bk8Z/zKGB\nU0/wdpKvILSqVeuqz9qT7bYbRUoidKjzdXrsNGywbbDEK5cMQmBoRpQrR9ta\nqZRE2Y+i/z5upa6/d+QdAZ4ZQGiQDltDINSsYpfa3/z/NLetYv36hNWd23zS\nCUC3sczRHCY67U5qM0C7Puknjp2R8dc/p3IFElfk5Kt+5GEueaEM59snhLoA\nULvYjEC4+Uw0PhZh4EBgegxNYsFDp69wM2+G7FWdKPDjDLaLfTvljUBW6UG1\n3kpJ\r\n=pqHt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e0467542779dc71bb000a523fa20e9b967b76b5d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-22T14:19:42.522Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.4.1-remove-contribution-score-refs-e0467542779dc71bb000a523fa20e9b967b76b5d_1626963791532_0.8191975875959878","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.4.1":{"name":"@balena/jellyfish-client-sdk","version":"5.4.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.4.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e4124373a4a1e7d1c62231188216762a34a9980","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.4.1.tgz","fileCount":30,"integrity":"sha512-68mD4/rxrj89VcFcr0ffKezm57ImTHpna2mevHPc+js8vf/CWpHc5kGROa0kZ7eVjgUZy9lG8Yc9j1POnGkedQ==","signatures":[{"sig":"MEUCIE3oodkVq2GftxeosOmcqSIG3RUpE8DTUnpxFuv3S4AAAiEAkaut0A5l3fvpxSnzynkIkQV0Ia7Wi0OpdygbGWiHbYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+YAZCRA9TVsSAnZWagAA9GgP/1ZYxK9DajsW1ygyyE+S\n477KgyFGNeUwO3DJH/PiUa1JFK31jpllY8HtstTjFqxsCbSuM8RwqoxAQTlM\nqbrj8FM+fXZRzXxCDW6EVrR9G/V4BcIGgRzJhuOmAXIosQmV0sNd+vMUsHKx\nw6u9ddiUbskyqLpdyiAesQFEiPgna41MP9nOfvaA706t39S3IR1m5a0+1A0Y\nv0z9+A6fc+vTbgP5GvPcySYWpi26mjAjpio/kXjJzFJsztF0fgGgEbHLiGDJ\nFBGdt7lVsUsxlqRqJdxwGot/23nEd9nhvF6tuIpRhqa/h463wZQgBZTjjtqC\nfFu5zkaFrS5IX+l488KtmVONAxvgFn94I8FsR2+dXk8QQe+RUJjoHhoj2a2d\naphiFKTeVvM4uYJt9iJm47tEJAhzhHFhgeItGCCg9DFqVSX5l6E6pesuWNDV\nzT5aLuTrgHUugxLjqkiL/N55itx0oLH1splx9y2ificT6LuWQd/l9RwaedMS\ni2zuJxDjOdKp1SUVFCtj+0YjB8Lfcd2SWo+EQUcke+xZuEJw2DHVDIaRfjBf\nMfcNTwtdcYVUXT0mkhRCqD6khdcQrBRwT3hbSXz8rzXLxJwwzlsy/kaAnaDK\nlKRNFhobtSUyA7fYaER6oiTB9MH82zsl0PFuaSv2JZmfTqIWmU/aO4Wq74l9\n3EwY\r\n=XYnZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f85f790ae600455e35c2a3ab07779f6610dcb238","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-07-22T14:24:25.588Z"},"_npmVersion":"6.14.13","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.4.1_1626963992885_0.9467206156942978","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.4.2-renovate-major-external-major-58bb334190f2e09667edec0ada48cb91a3b88957":{"name":"@balena/jellyfish-client-sdk","version":"5.4.2-renovate-major-external-major-58bb334190f2e09667edec0ada48cb91a3b88957","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.4.2-renovate-major-external-major-58bb334190f2e09667edec0ada48cb91a3b88957","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cea460f52b3419b14cdee95c5e197f1fb228baa2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.4.2-renovate-major-external-major-58bb334190f2e09667edec0ada48cb91a3b88957.tgz","fileCount":30,"integrity":"sha512-8Bjua7SqCdPensRemvOJK2t9zKOWxO0GtODdjZqesoyAvOiUxl4BZ84T+G3yc8CoCgm51uck+0agrMQD94hXiA==","signatures":[{"sig":"MEQCIHYbTmgzk/SJjouKDlNTKRYl/48x7JZskmFGNYnWJlqHAiBNgEXLhulDsRSV8TfdL6oyeI6QsRhhACw6JfqhGWiLog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCI1pCRA9TVsSAnZWagAAfCkQAIP/Qb1zdzR78FXfH+jk\nR5wlBEDsPiV0oOUAGf8rs7QcnVYsTgj9mtwskiGFIsVXKt5kIbvBNRPLS+/Y\n9+nxQI3DAbTegCttF0CLuCfvOq1Cp78FpB29T6iquWsMIV52OXZGzjs3eXE4\nZGXGNMRGmaxjF5+5n42NV86KHB5GvrT9gKK0DCLJVDAIOd80ZkyX2SZD4Ifj\nIMC0nqpkfa/c9p9ptxI9zDB2QbdsfNGezPiupwePiv2mtz47Bo8TgNv/eHII\nihq8wTyxEvh74CrEuOjKjEQ3bvsAu4eps/xB+rSAcsJZFE4DjBu/O51SbbGj\ndNaRmkPzwb9hYRViEDAruX47KdcEfy4c0rdiRSJ3gHAMIUoQqGBfMUeVpKti\nOe555RIlOeKb8oOWLIhMisRzet4++ZrCDFtMPv52gPAStJvKkYEwE0XKlJ5v\nQ9jX34f35RuKwmlxZs5MC0rSLfBtktxr5dABu7rrmQYrI8EXKefYAyZMVF45\nsrEebmX7oZozfpVocok1Y1rfMoC20K/0jz6VoNzPnTypEHHdZyX3kwZRD07h\nPGTVA7jnDhH53hAkyI61qvyg0ifKSkSPIJvOKEV4U5wdolvH08C5V5RitOHd\nUDdBVtmUOzdfNqzb7fkQFHaXbEcdlzQdZVzhILVk1Wgd2iWQD0TydKYvWVDH\n+I8C\r\n=qNjJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"58bb334190f2e09667edec0ada48cb91a3b88957","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-03T00:24:41.746Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.4.2-renovate-major-external-major-58bb334190f2e09667edec0ada48cb91a3b88957_1627950441055_0.27092519110178803","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.4.2":{"name":"@balena/jellyfish-client-sdk","version":"5.4.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.4.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4322652725967927e2bc4a96a6ac16dce83d08c2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.4.2.tgz","fileCount":30,"integrity":"sha512-S1ZzW1mRUmUdNhepw5Mj6A4WQG5hXyLnMHchvC2viQwDJQgUb1tPuzobpNXsWhWbaZxpRde3j9vi7oKDqRyhCQ==","signatures":[{"sig":"MEUCIEqjoC+GsaesdEcumz4jeAVH4DzgBaeZ1x9fYXEb8qQJAiEAntOScYv/xr654NGA6m5N5nxNW1O/oRn1qrwP+3oOIaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCd/2CRA9TVsSAnZWagAA0Q0P+wQ42UOwDohsSGcodQlV\nED0T/EOazK/LQfuYNjEKFnUUF5ayoYaEIDPceFEnugDF5WuIFsfSnbD+GN7N\nAdYIJXhb7vzYVRpJ7w0WiLZtQQAdBzPv/ZTybOMWl6rER2TX4RaDlY9oG5WK\nSI7PQo2C2DmwUVsNTJO7VOkSupHDprLEwwq5eDIcG3a7wGrd7RWjmmBTOvwJ\nrcquI29/SyhgzRB9yPfoyp3hhMqNMPedF/yWtdXzs5pmE0+ZcLDNWEIZCdJe\nAZJD2pvB0VrWh86Wrt+q5nWHXAwByl+9n8ZssCrmG9T1w1nR3p5a/4KUAr5a\n66xxasf3IESRBPRf1kExG2sNbU+RXIpgcdkHKppS0XOQMGsxE9PHsu3EUnkh\nSmGifYpragA5Xvja2i13yBcx+kYmpd9+jkK5fzIdZnVBq4Wj0bCewjCUsutU\n2VjQEVPfDpwPw9slKSJcTeaO0Qw//4dqZr0t3v4MzIPUtsWBEcS5ZLQXE7Rr\nns9oyfcTBT2pupoNTFdFdWYJcl8PcmnnBWAIc1yoqxzqhDVg6VMguiGFKmWp\nLCCFIdrO6/YNFp6e34EHqOjX+/Rn/j/20XG5hjAi87gre2uVSHdwegPOg8tK\nYYZbyE/Rihtsn1OISHikTdqDAznQKFDOujG30G+MQ8ZAzowhIU2EUknThlpc\nP7Tz\r\n=Hw9w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bc82502f4a70ee400705def81c84d274bd760529","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run unit","unit":"jest","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint-fix":"balena-lint --fix lib test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-04T00:30:11.140Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.4.2_1628037110674_0.9066383247043226","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.4.3-h32-unify-script-names-f6f61f8595ae7fabc86b236825b9d61b862a8851":{"name":"@balena/jellyfish-client-sdk","version":"5.4.3-h32-unify-script-names-f6f61f8595ae7fabc86b236825b9d61b862a8851","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.4.3-h32-unify-script-names-f6f61f8595ae7fabc86b236825b9d61b862a8851","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9be8823ca5df758cebfc8c73ac0454e635b9dc32","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.4.3-h32-unify-script-names-f6f61f8595ae7fabc86b236825b9d61b862a8851.tgz","fileCount":30,"integrity":"sha512-+UKvJNwv+wAjyKufXzlxl8tmsyBvZ5nXb+Jc/F4uk+4Ks9zXlQ2FUu0mW74pJtECGlz9YJ1d5v6aM43X4FDD1Q==","signatures":[{"sig":"MEUCIE/VC/vJgNT86nQ6IwbqSPNvg1v8YdpNQcCShuns2R2AAiEAhmwY2noj8TsbD2UoiVARqHlmX0r22wOIryCa410Oz1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCyGxCRA9TVsSAnZWagAAeRoP/A/RywXPFl7jMjviFBJ5\nRKFqwtSQ+cLGYyRReUQTJoJKcnvgSyPMYqqL/QiP2L0mvOWWtIC5AXZNVB3w\nGMXR8kixWfr9VBUjT5eWKPAq2o8njIZ7ExZRJKOEJk9X4SC5k4uXMkVUFXlv\njjy8ZlVCqBDJRyTo2I11+DzaOhB1KsanR7oI5PbcehppqXt6ip85HIZ3FZ7a\ngv4a/ZnEjeBYC6OsbZ4p2XJFUl2T5UuUZM07Mft9cck/7+9maURnfBku4Zds\nVXCsXDxI47RmxXxC8yx6ONVdJU8IMBazMsXXyooxi6F1eTfkjn4aQxgL+QSa\npYu7euxBlknyZsR428lafwIUXvHod9sIKmx5RaeyrCX0bxC1QpNZXVLqZh2q\nRzyN2Kv2wdgz1SQYfrA85j8y9pgAOUypUtFdcI9T5XJJCIGaCqgfbQbJ/UPH\nZxVOXJVwW2+RzqFzGa1e3c9BfOE570j6DLnmMMC/bg9HPlzdIKl982lshFNJ\ntaFdiBolFj/UShIJ6rklWpHYrWp1npTyKxd/R9VZVLRqo85fNnH7gVBV1z/t\nWH2YtbbQlksjeGbG6qtj+mL+ZPL1lhbgJF6iGZgg/DdPKHhycAXHR5fCjbrV\n4EIxb6Iz2Y64zhB58d+qcoTR6Rr7Y/gdbmg2tq8LGeZSI1zDJ+y0chi29i1Y\nAEp/\r\n=QVwm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f6f61f8595ae7fabc86b236825b9d61b862a8851","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-04T23:21:02.731Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.4.3-h32-unify-script-names-f6f61f8595ae7fabc86b236825b9d61b862a8851_1628119473225_0.026698473639075848","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.4.3":{"name":"@balena/jellyfish-client-sdk","version":"5.4.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.4.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f10b2b6593f9f709bbd0317610f7c26cd1dcc8e6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.4.3.tgz","fileCount":30,"integrity":"sha512-zRDt0BFmKjtoZ0vKlbKso81DjUNo2Zab1Nzm5+WuztlV/8Ln6zHtZLb+FkAD/G/Xt7EuMNY06Jdm4Qe3d+J0pQ==","signatures":[{"sig":"MEUCIF7ILI/lizS5GmK2VONwijxMKe99bsedHi/MEC6Xs3hNAiEAosOP2KCyKLlfuSIS5Xeec7voKr5Gd1Alwhb6a0ZBu3E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCyKLCRA9TVsSAnZWagAAR20P/3gHHMwargfKLb15iZDW\nvH9LnNFhKjpitDt8a5zKlsuKFHQmj1q4oafiTLv+vR/RxmCqrIqR5+vba8IS\nt5pn8rxPyvFytwKLtwvXPFhuYmUfhHYkrI5WQp+csXNgdGisv3eoFViUlwgz\nflOXRxs6heQPPi1Bhx1L8EhygNVnZXbtWdlrtWhbd4n9ASA+ycIw3bdOzQ2b\nGj9w3M7uVu9rEvHG2MrxKiK4rzFObPLSEUgTdgHcTvANgRGFbVLoKMB9jXBx\n+YVPP+6CUsOM5sL3qMzWPnQU+svpfVh8Jtm0SgZ0dScrpaTxkF7axP8fRLt7\nOo9tYN+E7wv4dMvK9LQ/+JQYcUzFoYN4q8PTQqI5zEjWIB+SXrvQTuBvMOz3\nMymGuID6+aGybbPa2LDHkCNWUUdeKttZC3VgAV6Z3fmA6OGNngAafFIh/1tm\nLFBVqnclQLd/NAwj6t7iCmwLCriHCfVSYA8RTBHGdv9hmtaGsskfRgiVRA0D\nxV3W7VoSQlkt7SGFMGlJMC3wx5oraHXIxdMJCA0cl7IXiPmNEuSlFw+pbHdd\npJx+vPy2jzGFyz2hCIGfQEJg9CPE6XneWzZBKB3sYycpOKboFBNLF9e8LbI/\nIGaD9kMTXW1l90BAwNUFAmGdHURytforJR1lVfQjQ9weqt5Ve659TrAykv9k\n20zc\r\n=q6Pb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d76c9a78f8f03c97bcde1f72980901ba6f813b8b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-04T23:25:37.293Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.4.3_1628119691036_0.2575576908362891","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.5.0-add-bookmarked-constraint-9effe005981db7571681d7c9e40f66bc03877558":{"name":"@balena/jellyfish-client-sdk","version":"5.5.0-add-bookmarked-constraint-9effe005981db7571681d7c9e40f66bc03877558","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.5.0-add-bookmarked-constraint-9effe005981db7571681d7c9e40f66bc03877558","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"63006dd365583630aec204b56b57ed8a379cc2d7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.5.0-add-bookmarked-constraint-9effe005981db7571681d7c9e40f66bc03877558.tgz","fileCount":30,"integrity":"sha512-hfI3RKouX3X58VOUt2u36Adu4YIc7vmWfZOMjzPBMWJFdrbI4dzBuk/a2ew9vVOHjvsvACaqKEGp2nKQM6UU9w==","signatures":[{"sig":"MEUCIHlgVOtxSitZkxRC6tNn/SSdzzToEKhuRyUUe7hsA3IYAiEApWZKG9HCHWU50dQQVVuDUFd2/cd6PT2O3bSed9fgwlg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhC4i4CRA9TVsSAnZWagAAA5cP/2QibVJmfcHickhsOLtA\nTLquk55Tt55HgG7m3h5v6dAUKYRdVvKoQG+KOK5A7LKDV2orkn8DKSs4t9gN\nOqYZp+MDm9x6Abn7hUguaY32FEoIGiVdE+GcQXWf6hSeQaLnrz5iSe4jCwiZ\nbUyWlgzIi/SpG7Fo2GwNaEpv8QCvAkNG2W5HfcY4wao64M4l9hC8yqRw/dXT\n2p24A/2cpszShp+M3nt6kFuQfQSgc+U85vOSbvi9K47eUrQzFDB0EgZ5KkJf\nnW1XDieip1ryLoYL43CrSj3JjbwXRlankXFPMKFcczfvouMKVKrnVix0lntG\n/AlCsPhMAXjqIgSuT2VicxWul8VGZN2OMejCzY6CiUsRlhe7XbA1lcqAW6D+\nEeQJMtHRm/LZuO/tfApYvl9fWtuQ+kMXY9NzOBbGbg66oWuaZ2Mav9GQg62H\nRdG9BT1aYSNnw6i7XXg6r22EfvUHaOHq0N14juguhGT2fMlqbpXenGRwoQps\n94en/Ut/Oxj8k4y2PccdioH9wcKKAlFvn6WsHy+wtpaR748iwX//pq1Qz24/\ncfZKjQ9Lx4iHXAsKXHdisr+4gFNM8q7yJWSdeR8/tRMYuj14i/i7egKV1V4B\nJVszVr2rca0mg/ztT1M3I9i7Vo0lU1xaGP5GuX5UBaMBbSarvEfzAU0GySfR\nyzU6\r\n=Eyvi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9effe005981db7571681d7c9e40f66bc03877558","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-05T06:40:07.756Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.5.0-add-bookmarked-constraint-9effe005981db7571681d7c9e40f66bc03877558_1628145848729_0.8455795471323577","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.5.0":{"name":"@balena/jellyfish-client-sdk","version":"5.5.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.5.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a1eb2e0dc5578effea291d647f11c71b9979f350","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.5.0.tgz","fileCount":30,"integrity":"sha512-BW7T4aXuNmU0700qTrl7iee7XyUGq7E5rbxRlXk+V+OrYgcp7g3vF98hK6EzqI8f/AufdRfoCFKw1PsC8ErnTw==","signatures":[{"sig":"MEUCIQDBD+fUI1/TS1aj8gDwIcZirTdfX/FoVGGS1H1w+d9hmwIgDJ7wicwdNilQDF/SYJ3hSIrdZvY+K5Guq+10ybahebg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhC7a0CRA9TVsSAnZWagAAOb4QAJaEGmgKJed45SDuFXtc\n8p3xs/fP7eT/BvTyNRcapo3XzCwOHxSqZfDxGcfEWnij0Z4ErWj5Ib3CA6iS\nteCfc+Rf1EZwQTpB+N1e9FPc2IDkJCCeO1tPD27R3h146ETn/mNGbi8tZf2b\nLrlb4njKfk5qZ1ZQ9k0alqgqUWj2q/ozvCWshiyvI6pnTDqnCV0VpJ2YzXUV\npsIm8Hs+FIQKE3uYVxnWnjmwd61b7uw83WxtVletGzsA2ho2Mdm+fi9A9z1E\nKZ+1UEtAQmKtCMwvK2+4VEgPaX4BastgDtws4sASf6bMOMql34ak4fWjFENG\nPclKIDBl8GsiSWs/Ng/urhjH1R9QrBKiOd46IQ2TE39MkvtEwtA4dat0r79U\neXLIWQgCBy3jBH+DUftKtVbuDhIKtKqb10KibjNxVhQvn00Qr5bR9OdCsEI0\nMH/5yiJvCn62t4bOAz3We2iUfhVqPZCjY0nS9fdMaLF3Lfk5/+yNd3Cb9hk1\nV9351iu7KLg6gjUy0DqRhyeWD7owXbEngB4aNudGrswS/75HThPT+fKxjAAH\nCO8TUQg+TNJVHPft3Y6IaMopPpGokUbjLVQW5URcltaIvX5R2FbBBkS0I0A7\nHKuEneJoLzOb8SVxwYFCZQ8emPPjVcmcppViZ0oFLGnWQskMbW7WlTHWk3r/\n5zK+\r\n=Xeue\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1c8743f7c3039ce2306c058cfe4e02bbe248d0fb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-05T09:58:41.684Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.5.0_1628157619913_0.7124174805925514","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.6.0-was-created-by-6f733a0c0b1eb4be287da920321be8d3aa5fc1ed":{"name":"@balena/jellyfish-client-sdk","version":"5.6.0-was-created-by-6f733a0c0b1eb4be287da920321be8d3aa5fc1ed","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.6.0-was-created-by-6f733a0c0b1eb4be287da920321be8d3aa5fc1ed","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"752096bd3aac4ebed5265bb465fa3ff1fa610880","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.6.0-was-created-by-6f733a0c0b1eb4be287da920321be8d3aa5fc1ed.tgz","fileCount":30,"integrity":"sha512-KxStiRSpqGRVu7eXkKDxxOJWHbfJR+bDLKC2U2uQ+ZZSxmwHeGAtBQZ8m9AlOfbaQySKiU1d/MzM22kzXwGkPw==","signatures":[{"sig":"MEUCIFz4Fs9IKBvFONw/IQGJo3zDExV537ORUoArchs2PkLeAiEAwqeg40IMLkvky8d5AVaD173X+22XSUBrfTnWmuuzZ4k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDLitCRA9TVsSAnZWagAAGFcP/i9YAJQ390A0exH8Ds5k\nDx/B3qkDOzQjOpTpQNWOpqjdgPGC+dAynXUBkny+j8d0FzH5hWusymRy9nqj\npQ6NXl8a2ekeUpgTxw6EMeVgWe0Uv2pbwnjQlWUr3GaojGMwLJCTd4jOtLHE\nY7nAjkz5UBFxBmCzI39B4BZnb8Nnwj/XL82fg/ieQOEeaKGwKIkZD6hLJOoz\ni3xHFTY3nRJxlpVkq2YJKkFX8vTpe8KXqYesDgyPqEtPBuSFTSOHOlnUgnGr\nPjyrbRVoifDzMyDxJ6wnrKmzAQd9It3hQ9LvkbxdSMsd3GBDk9wXqrFNg+xm\nRaBqEkOUf2e4oDAB0oUTVIVEA8ESHLV7RR1wUyzEFyWBcZoZBU1C1TvAtJCr\nkx0fDeZXuS93WdpiWmCGflWbQvlQmiXxZdKRJROxqbQi+uXwY8mVOmj9+orO\nELIiM5te+VXs3Iw/Fu/qoql4tslaOU0Q/NSUQHjPk1xh58NSV8UcELfS1v84\nWcxjfHIjMA88N18rjN3M3aWmqUQODxgOtMOEtRdr3uz4qHweQO+OhTJRomr/\naNPJ6kCr3v52eKjeRlrxDWew0c11Ku+BidsjlDjclLoyHi6NH/yaulilIRve\nHCczcdVMTxfyCQmgzE5NdjTOCqAIYMxZdqMoTnQGGWFkr84eAWyd/cTbbipm\nmBIK\r\n=tuS6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6f733a0c0b1eb4be287da920321be8d3aa5fc1ed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-06T04:18:09.555Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.6.0-was-created-by-6f733a0c0b1eb4be287da920321be8d3aa5fc1ed_1628223661776_0.9309333616475011","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.5.1-h32-merged-links-da36a7ec9ace18298a63738d169af2190ebfe8c9":{"name":"@balena/jellyfish-client-sdk","version":"5.5.1-h32-merged-links-da36a7ec9ace18298a63738d169af2190ebfe8c9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.5.1-h32-merged-links-da36a7ec9ace18298a63738d169af2190ebfe8c9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a75f9b855f37febee33b2b2233901b87b7a1baf4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.5.1-h32-merged-links-da36a7ec9ace18298a63738d169af2190ebfe8c9.tgz","fileCount":30,"integrity":"sha512-508PhNEsNYAidubNq+DeilX9rYXOGCYCNEbWWkVBaQZO1hLFjWLDVRtuml0EtIH8aHQx8nOwSjX/BTEhVScQCA==","signatures":[{"sig":"MEUCIQDRpUldeTOQ2DodpIf6mWJlUAsRfQbiRQjEV2c6onJCPAIgILSv05hlJEp1lW0SX/ozy/wVSSw4nVrgnl9h0D7yR2U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDWH9CRA9TVsSAnZWagAAwIsP/3UrVB2Pswe5+YN0X4/J\nYatsFBoBThwv4myNEbABT7DS3heqhGkPpNuj1P7Xt2oPppBaUiIU3vZXc2q7\nQqIXZFesGJ4PY4zUw88hAAjYm60rQKXobe1gAToL0iAynBneBJuiMiA+iuLD\n1xgfxSpKiMU+IC/8r5rXYqII76r9oq6oXexzCcnP9lr1EH1gdjYa3yMtZ8sT\n+pXo4U/KETPdlAaXKQWMLokOw4aMCwEkRCNha4O8JBeEiNGQcBxQ8j+FzaAf\nELfU4V4/pKGFL0e/1mnP6t6EjQAwsx0RHo+gYq4P5rmLz0Jt3JkSy2+uLhJA\nEtiXDX18R1VhUiIFsZ7fuw5TZEh3R0nz85LR2JsVUg3PftmBzAP/QTjo20uD\n/2MGcLhlxvmP+Yp2BWQl0y7hWpKgTn6jmohuGKXBQPST0zSVwK1moRSfeUsO\n8UYhClFSdUvieBQwWT22BkO+yn+yNQxQ4/xuBjDh216XQ9Dnzb4I6AxoJZAI\n+ZDvSj087DkyI/TF8PejDZoFUFcD1x1WSKLpSAFnPOoRhSZI/1xfrmU/mzJt\nJHxUsQi7XXhVZQSQ6eSOA4UVowYsHp84zilMYyflJiQrHmOfRnjCkzUUMxU0\n4AoXtWf6y9AGaEVOyqboyDKwCGQNdSLCUI+WD5nKXJdenPgYpjGuc5uanGzA\n8jc5\r\n=FA0g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"da36a7ec9ace18298a63738d169af2190ebfe8c9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-06T16:20:40.327Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.5.1-h32-merged-links-da36a7ec9ace18298a63738d169af2190ebfe8c9_1628267005852_0.2675157596902027","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.5.1":{"name":"@balena/jellyfish-client-sdk","version":"5.5.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.5.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8ca314a08491468ac8d4896abccb4ba6a71f6425","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.5.1.tgz","fileCount":30,"integrity":"sha512-NjX/2MjIgjlw1ouWLfPOlRduIsKfDvof23Mqyqr9zcqU4xMKrIhm1/foUV4IvsFxs1ScwGOQQD+xiSIyFVsJog==","signatures":[{"sig":"MEUCIFagsdtPgSpqhZnkNsO9qDgLdhk6eqvHOP83V4CAUvNIAiEAlkxB5/vxx18zXs/shnDxdW4YMkb0zvbt0uPOe4Wy5jE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDWLACRA9TVsSAnZWagAAr7oP/2ZyRQHQ1BHR7WVSfuEb\nASe87eFJzr2NxjwdQA4xRXfFYZ+9QA+JUBXRB7Nr9cNmxBvsPZsE6ZL/t8qo\n1xeEGIDViapIkNv7o8ji2y7tCEFM+acIMG7TWepIF3oTfA8NPrJ7rNNH2xIU\nBcM8+56/0CKNXZ4XbMr6RvWYzkrKnSMlDQVRF6MRh7BfxRmZmJFKLXuZLhVD\nSwc9Xf5a1rw2C2OMlbeTfOuYoEW/3/iFAAoVgn0dUVdPyJkeXPGTgbRyQEq6\n+33n/kFHdrDFvd0NC1ml9FNPFb+4pJuzaySl0JjdWW0D4nWoHQCHmudBEl+2\nJLs3QTj0EvNBO+bk8MS8GzLHxOKGa8L3hbhpeC0rmuZi7T526zCHL+/QoMC2\njR3voZXO08PEr52KWuuScm29ppuN4OBv+M/rHLxATQv6t67AjPEDXVNIqIs1\nrj71Q57hsx8sfXUsUBJcd6v44dM9mK3W7xF776SyIf47MrObtK+QL7pQVeJs\nP+La77GjXKWISafube9+f1sOJKYTKbdPvEPnV8LJJHPijzQM4/92wTt3S9Rc\nXDDNW9+Dy8rhJVEqjrRc0io8+brY9Y2yNkzX9pl/kbzM+hVai8NDxrgTjQTy\nxt9LCZMqwdc0u7WnCc7uSvG2Izdbz9nWlnxbajgK5KC2/vMDtzuuvUjZ2E2n\nWl0N\r\n=Pi7K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1d066d91f786f1f4324aad7bac8c532a71a665e9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-06T16:25:01.296Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.5.1_1628267200599_0.09115584404213384","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.5.2-h32-contract-repo-names-5c30113feb2dc5f4202456042df2b01795a81f33":{"name":"@balena/jellyfish-client-sdk","version":"5.5.2-h32-contract-repo-names-5c30113feb2dc5f4202456042df2b01795a81f33","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.5.2-h32-contract-repo-names-5c30113feb2dc5f4202456042df2b01795a81f33","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c43da1fbf80fd97210d216b35833d634b171e03e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.5.2-h32-contract-repo-names-5c30113feb2dc5f4202456042df2b01795a81f33.tgz","fileCount":30,"integrity":"sha512-N1ccIPb59hdCsS/MVETHD9F5HT68qfd4SXcWn6xKi0Zetf/NlRfz4km5gVn2LTdDI7TJ9KtRFa89gpbCNAm8zQ==","signatures":[{"sig":"MEQCIH2ojeRHHwQ2ZW20vetKiY75AD2GYfuEChM8OemnNu2+AiAuT8XQ9vn7yY/DxC9sg7XoNel3f060QMdrk9sWuFNZ0w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGny6CRA9TVsSAnZWagAAccYP/1LPCkUF8cbFb05x50Zi\nN2TuS0y+WD0qdulLgPL7bTTYv4NqFTjg9j8Wlgvax9jmMkWHuShV1oY+BmUR\niHfjaV9gDGU6vS3FIQhH35L9xBhm8ROqm3Mp5/8X+ei4ZRxGeWWuBTYNTl2L\nNsYSTI8sM0kk7Mz+S7A0Yadl+0/Uu3AML6TmYzpmy/nh51ux7SQqNsTKmbIH\nU9XxRoQj6KViQBz7gINpZ4QmvIEgBCvHyeCRTKCqbSmLBe4CV7U0cLcRJS+t\n2qPP9c+epU3b1KK+2uMwlQQvvlD1MKR9VHrTwF3X0W7QFzRoz6W25z5Drc5u\nFWqmrC5ijJDPpNeeBj0w9VivXxU71+JCDaabDTTuVF6jiXKMlT5ROb7G9/AW\n4/E+Ih9JuHZbMS8JeeY3THrvoIUzDNRAvucZiyIZr8wVkoHxYuto5tjEOWZz\ntQEsvknE6sp5xcE7xqQieLv5EEeKharFBYw/murQgJBxs7tPiazS9FnvpLpy\nYrWJP4gDMiYLlujAos9O93s4w0AFMVasQVYE2uCu8CXjuLuEWyY4LKQPqWcX\n55/cpDzhldKVuFb/bBSqd9pRYd8ZoaS0rE/0q1lrslTgxqP6HR5SYTZ8mUkM\nrUD4o4RiZPOTF7DEurpCvxK3PXc8AyGeIX6SgpPesYpKM92oIffNMTWyk6Vf\nv/Fr\r\n=2mn4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5c30113feb2dc5f4202456042df2b01795a81f33","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-16T14:53:50.300Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.5.2-h32-contract-repo-names-5c30113feb2dc5f4202456042df2b01795a81f33_1629125818709_0.6231705112594272","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"5.5.2":{"name":"@balena/jellyfish-client-sdk","version":"5.5.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@5.5.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"44d3e93f5955a875d06b7158b01e08fd7282b403","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-5.5.2.tgz","fileCount":30,"integrity":"sha512-+E2IxJ7Ptrsorw9pBHQ4NFRisJ+sIkGUs5uDQ6E+zR6OpmM1T6facFAA2WGWfVtU74KiIkyJm5IRCvdT2IgY5A==","signatures":[{"sig":"MEUCIQCXGo9zWeFWxh8tHmF1jc0/m1HYQkPnNPPIqG8ZA79TrwIgFgtTMEUnoqCsIDzB1YcqlrBDmWmeqTc7a0bT+blqtzk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGn2OCRA9TVsSAnZWagAAcr0P/1d0zYFnbUZpRHzjQy5y\nIqoYadk/m2sg0z9IXg+7/MMkp3FBu5qiMHVCpUPGG7IYZVEdYI/aWtZmNLBk\nHl+qx0slHSLWOdWGK/6URDysd48BIuyYFFjyO8cI+e10DUIC7fiJIPjeW+m7\nX19+g+HTmLPBmeBKOzvbBwJkZNzFUHw2W5MhHFTpnVemq0xGG0gjhRlseWh3\nn4ZJSBWz40L1noEIQ7U/t1uiEklQkaSAvIUMZOeHziBl12H8oYXzfRd21H+P\n33QMuAxEf/bOh/b3WSUAm5OH8BsfDmNt2W6h4H4qNQdONFjqJKDF3ATt3Peq\nJQA3gZUqajU0tfUKrh+2lvVhqCkhBT6qzOo6vrBO7tOpBtbkcE+X99A2fC3J\nJl2VFOG+UINSfnASP7ozrBvJ4BKuf0HGz9JRtwxm1Wf00LRl4UzNKGehPTYi\nOExxfCXYTFRggLFrS60tTZ+6r+kCAAiFkjJfaMeQ6cee4Xx+bHew4b2mj+If\njJtVHAjmCwAGutXqUEjMbQrdSe0/l3uGGklDeBp6HqaeY/ZTQNRYHYvcolug\n63m5HOcHN3syQ+wQ3n3jI39+jKnI011ZjTaplLlJEEyxSSHR8M1L8U8mPRer\nNgCbzWk0uK/SmsQFz0f8vXwlWswwH2xyS4bhMVb+rNtsCQ3gQzFIydtADTbe\n2PLn\r\n=AyIY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ec14ff2414f02adc4a0574c9c543ba797e7df5b4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-16T14:58:51.161Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_5.5.2_1629126030785_0.5189390886734373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"6.0.0-remove-support-issue-26680ba81ccca59590087802d032c88053fe4105":{"name":"@balena/jellyfish-client-sdk","version":"6.0.0-remove-support-issue-26680ba81ccca59590087802d032c88053fe4105","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@6.0.0-remove-support-issue-26680ba81ccca59590087802d032c88053fe4105","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dcf7de04fa82c7bafdab1e3ba509ce09703deedb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-6.0.0-remove-support-issue-26680ba81ccca59590087802d032c88053fe4105.tgz","fileCount":30,"integrity":"sha512-8W5rF35OPnYff7R/9AWvsS13qVOM/OmJojXDrEb8Nif4kYko+fVnlZGms05GXr/1B1fIkMV9RD9dxWwcb9HQxQ==","signatures":[{"sig":"MEUCIQCP+sbg1XE3LuKWxoUAbs1uMoZreVTc8xzHa3mOc6VGcQIgDlNw0y7AnMi7UjF2r8Nbb2mP9q9jbtk6FLzKEoPOQAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJKdVCRA9TVsSAnZWagAAjuEP/jKghp79/yxXHna69fWw\nw3NUYKk4j1azfmpBKseswWirlD+NsStI4VizU0NAiOp5q6Zi1EjFCDwGu7sB\nbngHOPUvpxN/jzotBd9nXo0LnenNeU0zwOfib4i97qa9qljjNr02Yo7B9F5i\nxHzbrEgFDOFNAD2k6r7hf83C5CpYOoqlfa4KcUG7HmuDmoOo7EUvrIu3bCV5\nNz9QBHaSxY2cJgZbDABhy4Ok6QzkmvsfyVvuMf0VmU1mVtSzvm/R550cMNVj\n5OezDNDzS/1oBcvYy6W5eWYvbrABKg9QjVxbZPt0KHxq4VNgiOVlujSQ40NJ\nvXlADq2QpBRk6cTMAI3qPFxKtm0sSkEfN/EFADhqXgSY7JW4udZoqig9iYy2\nydce085u4AYAE+VaTFU4oQmiIt1dXPZL1drCC6AFiTgjzxi85bFmYzQ7CdqJ\nF6uxnCqFihZ+OjzK9xMyiEEviY1VLGeihS/wNCfyHADtBuIHFAbqKgzTow9N\nqCg3it+j/idP2Kkusiyip8c2W88PvSXwP730vWW5kCyT4IaRCLPMbd6Dxxlq\nleLe/YUO8xYlMfU1TUm+kn7meYuKrRuIpb9z+ylihKlQEi+N7oLuy1hPXcYI\ne0zTlEoAe2gNkub9JYUfXMaSWmp+gKpnEpLGLjUnf4rvU7QVdExIe1ftXDVh\n8udb\r\n=YEsC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"26680ba81ccca59590087802d032c88053fe4105","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-24T07:58:06.609Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_6.0.0-remove-support-issue-26680ba81ccca59590087802d032c88053fe4105_1629792085350_0.4946274504319077","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"6.0.0":{"name":"@balena/jellyfish-client-sdk","version":"6.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@6.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"794aca1adb960428e90dd6940c771914c9099b63","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-6.0.0.tgz","fileCount":30,"integrity":"sha512-n7bMMsCXmCJmS1gY27GQjq2d9Qv9WAmKo1Ycs08P0UklpmjYlOx40sN/oZw+qyz4ZsmQsTXL5Uvs/L7aLYc5tg==","signatures":[{"sig":"MEUCIQDye6Z3JyJhATcUuRJ9y5F8jUwtQ4cAQGck6d5KqqzXqgIgHfDShJxufSCpE+8mP77L7fS4q9AlQ/Oaynp/srXBJVI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256843,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJNhYCRA9TVsSAnZWagAAnMwP/10WCuIhco7AoOJDiRAu\n4CgJ24qdkb7Hy+qd+d5lssXVBiWj/+O15EP4yjFkr4ZU/9yb4oEJ/Z8QKeZP\nNR/HHOhSE53WBm+L1tUqmoz6N4rDr9LqbB3xTxE63xzYqFVgCMglKCHzBKgC\nnb7qYvdedU4e7QjwYJynCWNsgKKMdH3xaY9gT5U02ycC+CF8hPSgiSN4pLju\nxDpF9k0Kv/D78dX19HfKdlRGEfbkexjEuHsiYT+w/nLiHz8I00VhIkX1Nbi2\nLW0bcNIgDZ7bOHfbVmMIaT9KXwja8bx+9D6lyIVumEBTKjMh4rqfLwMP6nDx\nfjjMNNZ+vdvkJEMVUAQzzaBwTzvwA/ARc3Uicz+HDRBvJGTAc+00YvoVoLOg\nY0lUYghODidS45aBo6Cf10xG7cP05Nd5D44QNwiVyh+BjPeBdcGrNp/v9BeE\ngWGwmJ307IVFBviMXvO3qf4WY35bvPgccJIZTTypBvN81jz5tytYGXuQo4PT\nzcQOSh0sRW7q92uIbbFqeGgXArVvDhSHBrLZRf4Xxn54XH9JOLdUx/35wuh7\nu1bz9xqQfmYOGypMe8/TIOaJgZN/4FWL0zt1ugQOHfGUwAqxoGbuElc6R2nF\nQs3uAZ3NZSQW/AbzxjA+doW3XpW4l6NNNHYQAMEl4E6vAXl6+Pj156Ukh3it\n26hz\r\n=tLf2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d227223f017f8ba0f48cc35989f4c3cf049161e8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-08-24T11:21:15.481Z"},"_npmVersion":"6.14.14","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_6.0.0_1629804632572_0.49934142343427834","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"6.0.1-repo-sync-jellyfish-config-default-6a604d2086908c1971541b46340c10bf265aacc5":{"name":"@balena/jellyfish-client-sdk","version":"6.0.1-repo-sync-jellyfish-config-default-6a604d2086908c1971541b46340c10bf265aacc5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@6.0.1-repo-sync-jellyfish-config-default-6a604d2086908c1971541b46340c10bf265aacc5","maintainers":[{"name":"iayanpahwa","email":"ayan@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c0759fd859bf3738fd7b571e75ed52d8b21bf50b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-6.0.1-repo-sync-jellyfish-config-default-6a604d2086908c1971541b46340c10bf265aacc5.tgz","fileCount":30,"integrity":"sha512-FuXVFlsX7brXKWEojxyHU2d/U9NwkDjZ2XEuWzrXmjlDPFO+6no7X7kLmQH6WfwxyaQ587CPX3K+9RQBnyvMUQ==","signatures":[{"sig":"MEUCIQCJbR9u+MgcheixzqVrrFdU6nDhDLWNviZCXggpEKWO9AIgNq/Pi9zfH7poU85yOiUaOYsqCzUI1xN4NwgQAQjn5tE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257640},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6a604d2086908c1971541b46340c10bf265aacc5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-04T03:29:49.890Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_6.0.1-repo-sync-jellyfish-config-default-6a604d2086908c1971541b46340c10bf265aacc5_1633318385974_0.7723381593397818","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"6.0.1-repo-sync-jellyfish-config-default-20f56c0bd0ffcd947391049717b4c2597fa4b880":{"name":"@balena/jellyfish-client-sdk","version":"6.0.1-repo-sync-jellyfish-config-default-20f56c0bd0ffcd947391049717b4c2597fa4b880","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@6.0.1-repo-sync-jellyfish-config-default-20f56c0bd0ffcd947391049717b4c2597fa4b880","maintainers":[{"name":"iayanpahwa","email":"ayan@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cef542579608eb59eedca36586c2de94f7c366d1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-6.0.1-repo-sync-jellyfish-config-default-20f56c0bd0ffcd947391049717b4c2597fa4b880.tgz","fileCount":30,"integrity":"sha512-l2RYmshbgh4DVFbOf76alJed83phPsuEwfIAI/HkYs7n0aKoOpFX8byum1wJm8Sepu+xG0H7hDACzUEM7n2ZyA==","signatures":[{"sig":"MEQCIA3+NVq3WhntEtnRQbzbXUbgGd0l1FzcSqa7BwQxDAJJAiA34Ysrz0oRWRvglRlGz29moATQG3yKgvheSZM0t1yRlA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257640},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe sdk is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"20f56c0bd0ffcd947391049717b4c2597fa4b880","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-04T05:12:39.907Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_6.0.1-repo-sync-jellyfish-config-default-20f56c0bd0ffcd947391049717b4c2597fa4b880_1633324587216_0.9565991883203622","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"6.0.1":{"name":"@balena/jellyfish-client-sdk","version":"6.0.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@6.0.1","maintainers":[{"name":"iayanpahwa","email":"ayan@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"nazrhom","email":"nazrhom@gmail.com"},{"name":"page","email":"page@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dfcd674142b8f11eec63a0d64117f213adfdaf03","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-6.0.1.tgz","fileCount":30,"integrity":"sha512-Ji9ZVCLsq/zLmEVkC7DPtp/kFNn8g30NmByzryhEIX6F9uXd28CM/V0LmJnYSH8CoXnECfajipPsG+i1/RXY8Q==","signatures":[{"sig":"MEYCIQC7WDiLfZXoj2gI+GT7l7P6N3hsxmUSD1RC3bIlibWJxQIhAMP4Y3byOLADtPvyCL1dnZR0wVoEGQShxMOFCSz96VxQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257564},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"72f6ed585837e7c7a5530c67e30f7b0327fb2c17","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-05T00:00:40.040Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_6.0.1_1633392143593_0.908506949287788","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"6.0.2":{"name":"@balena/jellyfish-client-sdk","version":"6.0.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@6.0.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"078ac1c43670a231d6dfc67a221805b821b83558","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-6.0.2.tgz","fileCount":30,"integrity":"sha512-aBN7HiJ165q257U8QAJFVtlIjyondkOF4kGc6qEAVO2+3AiyH6Ta2LpTSzqV+bkaznt9E605hzeR7cbQwJONcw==","signatures":[{"sig":"MEUCIQD3ROWrgD2yLf+/B5e7MCl5RMhP4aTkdPjHwaRDKJUiYgIgAz1a+LotVr7ugb0iSGuUT7BXSCHSK2yxSFjLCllw1pI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257625},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5c8de4ef8ede6565809cc23d49c3b42c587e7841","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-28T08:44:08.108Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_6.0.2_1635410756843_0.4576559126757227","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"6.0.3-lucianbuzzo-simplify-login-with-token-7cdb2d7e212a7d17b4d4dc998bb20b6aab3ec5ed":{"name":"@balena/jellyfish-client-sdk","version":"6.0.3-lucianbuzzo-simplify-login-with-token-7cdb2d7e212a7d17b4d4dc998bb20b6aab3ec5ed","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@6.0.3-lucianbuzzo-simplify-login-with-token-7cdb2d7e212a7d17b4d4dc998bb20b6aab3ec5ed","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6557716dc351fa88b5afe1c7530525ae3f17ccfd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-6.0.3-lucianbuzzo-simplify-login-with-token-7cdb2d7e212a7d17b4d4dc998bb20b6aab3ec5ed.tgz","fileCount":30,"integrity":"sha512-f9kuDOu95d2PafSnHjwjYzA167UEQTOetq6BG9Ad/9B+Jbdq/f+e0NANyR/lQGoj6167DsyBUEh/QaKK5afT7Q==","signatures":[{"sig":"MEQCIAkTwIRO9xJlrQ1Kt5CutelXEkKRNavYNQVc1xJ2DYG1AiAjAdlJkm13LsvRGJ91FR+YMb11DiyyPkj1a60RP3q03Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258415},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7cdb2d7e212a7d17b4d4dc998bb20b6aab3ec5ed","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-29T14:07:27.364Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_6.0.3-lucianbuzzo-simplify-login-with-token-7cdb2d7e212a7d17b4d4dc998bb20b6aab3ec5ed_1635516643082_0.01937302584109779","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"6.0.3":{"name":"@balena/jellyfish-client-sdk","version":"6.0.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@6.0.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"23b4a99fbd6a0f8f1c77fc3e87f8387781187561","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-6.0.3.tgz","fileCount":30,"integrity":"sha512-3hYjqWcXYtXVhYTqT03DS5rtjfTmZfQIdgu3CtxT3mPOCaj1JdGINSVSom2oiiVilKP9IqYOCVsK/SLzSPsf9A==","signatures":[{"sig":"MEUCIQDZcl6qMwM0sSAxd/joVIl1tjE1wxynI1vzpyYxxuUUWgIgQ+rz8dpOJYApOUK1mxV5Gfat2AJvA8mDBCUxUW7vlVI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":258336},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1f940a5f93becc9a52b358b20211ec0cc9fc6d2f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-29T14:15:07.844Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_6.0.3_1635517014010_0.6159614165900422","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.0-sync-stream-4a9ad308d855448c3de9be66e659b9600a99096b":{"name":"@balena/jellyfish-client-sdk","version":"7.0.0-sync-stream-4a9ad308d855448c3de9be66e659b9600a99096b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@7.0.0-sync-stream-4a9ad308d855448c3de9be66e659b9600a99096b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9975c4f5fef8cb2375634d0eaf735841b07e50c3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.0-sync-stream-4a9ad308d855448c3de9be66e659b9600a99096b.tgz","fileCount":30,"integrity":"sha512-8+2FRIUWwH/Oy8SX6Zrz2/O+x4CjUZ/KY2Ph43eY676jmLn6LEly0/B/Q6K2pF6cwg3/yaLiWv1VxIZEewid3A==","signatures":[{"sig":"MEQCIGNA32OUxbTMLEn6p3oyBJFkgtdVA+m4NgDCjPtU4kmyAiAbV4Xc1gk3+xXXzAX4PL43bAoZ4kbnSZqt3L4Em3ZeRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257015},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4a9ad308d855448c3de9be66e659b9600a99096b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-30T13:37:08.406Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.0-sync-stream-4a9ad308d855448c3de9be66e659b9600a99096b_1635601228584_0.2640536085110776","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.0-sync-stream-c74ece642fbc2ba0779f79255c97bcd048a93f40":{"name":"@balena/jellyfish-client-sdk","version":"7.0.0-sync-stream-c74ece642fbc2ba0779f79255c97bcd048a93f40","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@7.0.0-sync-stream-c74ece642fbc2ba0779f79255c97bcd048a93f40","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6f6e0df307a5f518324f98a444b620943099a8de","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.0-sync-stream-c74ece642fbc2ba0779f79255c97bcd048a93f40.tgz","fileCount":30,"integrity":"sha512-MdK7UCGqSV6dHCcTMSOQpIGWaXiBVzCP5esCyo6YnMUW6x0ytpFB1mm+m//PQkpgLzS0W9FH+RF/z2Kib0zMUQ==","signatures":[{"sig":"MEUCIQDXvli3RVd9D6jEO1qCW4c2gyi5+wcSM3quT7qYGWbwGQIgcPxesz+8/dyQaNU+VW+TI4MY386RjxvjQ1MEU6GV1FQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257012},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c74ece642fbc2ba0779f79255c97bcd048a93f40","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-30T20:16:07.398Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^1.4.36","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.0-sync-stream-c74ece642fbc2ba0779f79255c97bcd048a93f40_1635625178887_0.015766440817501115","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.0-sync-stream-180bc7dd3cf431deb0937fe18a4b620dd0e52aac":{"name":"@balena/jellyfish-client-sdk","version":"7.0.0-sync-stream-180bc7dd3cf431deb0937fe18a4b620dd0e52aac","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@7.0.0-sync-stream-180bc7dd3cf431deb0937fe18a4b620dd0e52aac","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7ce3599fe07757f11afb3266c41a2b479f371537","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.0-sync-stream-180bc7dd3cf431deb0937fe18a4b620dd0e52aac.tgz","fileCount":30,"integrity":"sha512-KWU4VTGUv+fgHjLqbWmH2JCO9MOK2wNEMRhTjrR+bSZmxWcMbepy8TAP5xcI4Kv/8hxrPDBqA5Qt6nZkTOHf0A==","signatures":[{"sig":"MEUCIQCnbwNvuq3sgdaAAc5xtZfF9wFlp2mQ10oTbf4NteCcugIgHrKD92VNzqG1618pLkX2U4Gobzo/lKdNpzD5gevouh8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":257004},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"180bc7dd3cf431deb0937fe18a4b620dd0e52aac","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-30T20:38:37.320Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.0-sync-stream-180bc7dd3cf431deb0937fe18a4b620dd0e52aac_1635626496897_0.7819749684283517","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.0":{"name":"@balena/jellyfish-client-sdk","version":"7.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"UNLICENSED","_id":"@balena/jellyfish-client-sdk@7.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"41a4c7dce0beb85f10cdb1eb7fec4fe3e15bb6f3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.0.tgz","fileCount":30,"integrity":"sha512-vTrMYMHFtZcgTlzaBILgUPJ22MoIaqeE2CD5QUI1KRGwke+g48GpQ/s3MT60surNYOFOSRlM9aTpYCZI9TKh8Q==","signatures":[{"sig":"MEUCIBhSlF/VxAcG9Mh0J5kwc9j39hblQaOKBvEjYVUf6z/AAiEAug4xwF/1mkMw+j+FvtpWtJJwPFRHd20TDAqsX3xKvk0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":256951},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"38143de1303c41b6a4f19e02518141e3f751a419","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-10-31T13:28:18.086Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.0_1635687003336_0.5899531184299494","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.1-joshbwlng-set-license-45bd20987afb7ab83ae7e8d676ff3bc116dea772":{"name":"@balena/jellyfish-client-sdk","version":"7.0.1-joshbwlng-set-license-45bd20987afb7ab83ae7e8d676ff3bc116dea772","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.1-joshbwlng-set-license-45bd20987afb7ab83ae7e8d676ff3bc116dea772","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c9884ddb376964d13c914eaf9bbe8fb71a34c30","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.1-joshbwlng-set-license-45bd20987afb7ab83ae7e8d676ff3bc116dea772.tgz","fileCount":31,"integrity":"sha512-RgoXN+HUzMAkqYT4XycXrtMWzWui8mr/++UP/9WptVNPmg2oL6Lrv48Zh0oPWaH4rmQ6d5hWKdabSq0KAtFVwA==","signatures":[{"sig":"MEUCIQDeFOjI4HB3U0uioWiEr374ZwTLv95dk2qmxzvweZMOewIgEuyXvDdAjwiSNcU/iv65P1PGtKixnXArnhk+GPObSRQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268403},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"45bd20987afb7ab83ae7e8d676ff3bc116dea772","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-15T03:50:13.416Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.1-joshbwlng-set-license-45bd20987afb7ab83ae7e8d676ff3bc116dea772_1636948383435_0.8137498764371736","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.1":{"name":"@balena/jellyfish-client-sdk","version":"7.0.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1b13fcdd1e936edfddfc4212bdb864a88a1d506a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.1.tgz","fileCount":31,"integrity":"sha512-8cPS0PBBLF7DlzmKR1Gr7Rltc5cFKgGsoTmYfXdNYMjElFq9JzwdUmxB3f1XuC4E0rHg+eTdAl8SnHxkA2yvJQ==","signatures":[{"sig":"MEUCIHunGPUCcRCZ2WBVhIcQg/Tmv8T81qtSWNGPAql8VduqAiEAuguTUcZm+g4XfTe4CzqAQWOzzu3cMb0U1aoGrsf5Swk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268340},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3d325cab557602f4e18fabb04350f257b0c60030","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-15T03:54:56.043Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^26.0.24","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.1_1636948601864_0.40836503626085907","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.2-joshbwlng-bump-jest-types-f38a525730c782153e9a393ead71c1ec80cf561a":{"name":"@balena/jellyfish-client-sdk","version":"7.0.2-joshbwlng-bump-jest-types-f38a525730c782153e9a393ead71c1ec80cf561a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.2-joshbwlng-bump-jest-types-f38a525730c782153e9a393ead71c1ec80cf561a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bb826112c43f1c76f244d4bbd54cfa8cf46f0e1f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.2-joshbwlng-bump-jest-types-f38a525730c782153e9a393ead71c1ec80cf561a.tgz","fileCount":31,"integrity":"sha512-PrxiFRcJsPqSMZ7TBKceCZQFG1NVtlryd8AZ2FeXTddkfBPYZ+1z7rXTgQOFmvChcLEf/Xs1U7MDkVvUeedWcA==","signatures":[{"sig":"MEQCICH6lSR+b0uaGrpRY9IxE/2k1FnxEaZ+Luv1Lqw6jkZsAiBZB89VAiKb1zITiQ9VZ7kURy8AwH2kyNPj9j30MyMJxw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268471},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f38a525730c782153e9a393ead71c1ec80cf561a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-15T07:13:09.879Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.2-joshbwlng-bump-jest-types-f38a525730c782153e9a393ead71c1ec80cf561a_1636960532036_0.8262643745029505","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.2":{"name":"@balena/jellyfish-client-sdk","version":"7.0.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2d1bd54c093a0996a78d5ba0483260369c93ac4b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.2.tgz","fileCount":31,"integrity":"sha512-1F99pzCBGeOL8c3wr440oqVDxn6KSCnCbkO9f5mlyz325Y7bFgv+w5G0fH2r9e+Sn/yy5swvdCIcJWhEIlmnWw==","signatures":[{"sig":"MEYCIQD7+f1iGk9VZpwZ9eaia8gd3z0HjEaulNj/a5wSaTZTiwIhAM76h5KMLyuaiIpV9aMygJt4XJt032+FqbwiEsBxmTOJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268404},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f13455949e901faeadea9fe2808e09c833c2a327","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-15T07:17:10.645Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.2_1636960720495_0.36940631571778937","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.3-repo-sync-jellyfish-config-default-b450718a63376fb63825d51bffe6e3199662f54e":{"name":"@balena/jellyfish-client-sdk","version":"7.0.3-repo-sync-jellyfish-config-default-b450718a63376fb63825d51bffe6e3199662f54e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.3-repo-sync-jellyfish-config-default-b450718a63376fb63825d51bffe6e3199662f54e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4e5c4dc3aa398fb163ffd94f027c8b187a00180a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.3-repo-sync-jellyfish-config-default-b450718a63376fb63825d51bffe6e3199662f54e.tgz","fileCount":31,"integrity":"sha512-RQO8tSqe5hGd8hbhJ4FWGDYp5nEbyJ1OXZd1RFovdBKtoVMeocDLVkJhrjZEEwBM4/Fe68NnCSlUKofF7dDKAw==","signatures":[{"sig":"MEQCIDNAScLgFXd06j/Sd0AFBc9Yv6uNaj4XKWi0uMZPEkikAiAkfDiNW1RFbAqi528vnxI5y8kUG8Zdil2c4ZxJ9Qz+hg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhkxDZCRA9TVsSAnZWagAAzCMP/2fBCBh7W7EAX6NKQb6a\n3srEXh/7cWlc0N+jXwOVsVBW3spXnyhlxwT9WarGoY+MBstTIIveZG3XTr02\nHBRGf1RfKLAdIOqIPIP/mz1NI3arggwezZNIAGP9QBXLxNnPyc+ZjZoSoGU+\n0CPUCV2CuvxyFTfERJga2y2M9x8KGcILtswOM8uK1EAbsBVJYxA/JZnrV3YD\nsqYXu5d5pAeyA0xZpghXw9IFXmsLEkr41YDZeYKWrupdrfqTvqxEOaFTg8nI\nI/Z3dSLVOJeAZwOVgCdBXiyMBLN8VeHFZ2UUIiKf+RAXN3Rw9SSKlhzXOri8\n8856zTwEA3NtwrmZ4x4wiVNGbBw1sl6h2qYGc/DZUbIIde3Z307XEEljCEK6\nGXhJbfrwSRYdvQEwHCleFoU2/oINxlMrWiReKRxqHK3Ov94GZ1dRsKKEMkBn\nkBKOXkKNrz2THzN8fhRI+F7Dv7JtaDaeTxRtTp7LPgnWatciAcOB6PsW52Cr\nXjDHRjNvXPB2sqHPc6dCgn3SLmpB5RBJwCWJpHn/TEse7krvf24o1S6Rlu2m\nCJF6jotQM96rwd58voPdX60VyxbIZtOOjHJsYRirGNcPzNYCNfgDFEcqfolH\njmOKPeHoe5NtldJV2pJcGgqIeWXJ/o5b2Y4m2oNhJdp/AIHlVMhqQeiZo7X3\nzZP/\r\n=aLCC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b450718a63376fb63825d51bffe6e3199662f54e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-16T01:56:59.424Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.3-repo-sync-jellyfish-config-default-b450718a63376fb63825d51bffe6e3199662f54e_1637028057790_0.8956764135266362","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.3":{"name":"@balena/jellyfish-client-sdk","version":"7.0.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8132af90a48d1444d1e6fd25d2f19b5b70c2c5fb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.3.tgz","fileCount":31,"integrity":"sha512-4pPjw+uxm0aCSzpsHCYzgXpTCr1XR1GCNNtscS59nq+kwkuhUMVri/27ijyJ5Wfht877bUcKrEP/nErKVV2JuQ==","signatures":[{"sig":"MEQCIAXdOvspNcW34EvT6A2d/O8bzsQT2iA4l3FYbuF+IbKtAiA1rY09xK3oeF6lC3i9hblLQewCEqTqxZkeN3Q4diZX3Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268495},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ef3717dbb5ab7dfa137f019af95393df14bfc3d6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-16T03:58:10.903Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.3_1637035195015_0.15181394507845392","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.4-joshbwlng-renovate-config-92cff2821fdf130fc196a02e1d0c6a3cbbe3cd0e":{"name":"@balena/jellyfish-client-sdk","version":"7.0.4-joshbwlng-renovate-config-92cff2821fdf130fc196a02e1d0c6a3cbbe3cd0e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.4-joshbwlng-renovate-config-92cff2821fdf130fc196a02e1d0c6a3cbbe3cd0e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e8697b7d06574036000f1b7b2aa0676682093f95","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.4-joshbwlng-renovate-config-92cff2821fdf130fc196a02e1d0c6a3cbbe3cd0e.tgz","fileCount":31,"integrity":"sha512-MU19jBEHva4vGLrUJ5mqBb43klBrJbN0jKMz6Iw0bmlAil/LxuoxOns2xUihws3/poZBDrtPprxHeooRIWYKUg==","signatures":[{"sig":"MEUCIQDZZDyMLzKD0jHKcmmCKEzdWpShCawRdymInr5bNRDV3AIgfjgxyMmfI8E+qrv54kAJU66sjzcPMrQJAgzRGxks/SU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268630,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmI4JCRA9TVsSAnZWagAA4psQAIOtilwzZQbnQivUQr2v\njQMrNvVp9P0bmWMFdpDzZazZPbV6qSrAr3VYZhsSWmUc6Q2UtCmabvZ/Cy2u\nYeQISN19SFWfTS3+rAFMtw8yNCvjH2nbeZf4ZHA7chdLd6HpmEeG5zl+V+gr\nGXOaMHn13ybC7ObWd40jX0A8yxSrddjNLzuOSSFh5Fssydg+tIJFogPipXk7\nJM2cgnNhl0vnIcMgUu7ukFdGFQba1MbIfuWNSCBT7ru0pTZ2ZhHZcNFqI47N\n0nExj5uVlmQgLgAz6xz9U2wXaoyVTMAAkDGLdTUz+TfhFbPBoV2Qf1iGCPyk\nC6GGJNeIi3EOC2rt/p51muZcX+ygBpXYdOKBXSVXX24nMaetyuVno8bcfw3R\nWvOT5U8pBT05MWd7guwE78muCuWk1IOlYR5ZRf78uHl7WIyDuVD/50Oec7DV\nJPTdx4djfMEEcQPGs9FPQ3aA9pOCnKHY0qjZ+G8ArDNxoEZc3H/i5zJrjiWD\nDaZbmRzokgW/e629gvwtACe9yRJsQIU5Oi6CyOBmg6AdNn9wUvF814DEE99Z\n073Zh5+p4p7lrR99whxqUKC+hZn84B1XUuJPxXCFRkQ4XXmY8F+ExLZi7r1M\n7nj2A1IkygAMsm260o1MgY0zq/kuN+1XuIPzDPleBnmuGbkTdL4rvkhCJ/lE\nE+bU\r\n=rrnu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"92cff2821fdf130fc196a02e1d0c6a3cbbe3cd0e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T05:54:06.765Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.8.6","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.4-joshbwlng-renovate-config-92cff2821fdf130fc196a02e1d0c6a3cbbe3cd0e_1637387784837_0.8272334108634289","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.4-renovate-balena-jellyfish-types-0-x-dc49d0570060478c30441152ea37792111263958":{"name":"@balena/jellyfish-client-sdk","version":"7.0.4-renovate-balena-jellyfish-types-0-x-dc49d0570060478c30441152ea37792111263958","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.4-renovate-balena-jellyfish-types-0-x-dc49d0570060478c30441152ea37792111263958","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e1497a1884728deba715a6aa1d5a809cc6378c0d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.4-renovate-balena-jellyfish-types-0-x-dc49d0570060478c30441152ea37792111263958.tgz","fileCount":31,"integrity":"sha512-opkSuaJKcBjIV4Fg9lemmkTFYJ4+U1nq+y4dYSLXLCgayiTA6P5/x/fKeNiSToccAbznoW04V/sO4Eqrv0At4w==","signatures":[{"sig":"MEUCIDVPbXrQC1S99nKg0s/suDnwJQD8fAyd13qNg85JSaGxAiEA75nGCZq0PjefkmYsgJkL/Sz/ESIyBkt3dkycQMl3UaY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmI+TCRA9TVsSAnZWagAAvgIP/jIf2WmYCyY5UO7m1uXn\n3cSUEA57ARXOMI84KluCVVXwx3vpgyns+nUZHOYUij3E6jnvAC+OEJ6nlxpX\nbbAt0IyvMsgCLSWOjSLjDG6OwOz48JDQ+Xoo8PUsnNSspPpXOCysYmPEQnFH\ne1LYooEh/C41nR45DMrcJzJv3wD22ejQPlPMPIqjoG5BOVymO0cT5zXUbhmi\n1ICAe8bl/XpgDW4MVGQ6CHtKFcAUisgcMAr9nYXfSJWT9iEU8PQD1sH6k0xY\nkxo+3rn4orI1l8F2FEnn/XAOE9md71J0dw6X1BuMJriKAMoBuGNg+Qzku7z8\nQTUjACR2obQnwYbZ+RLhKwgIoIH5+79BANR4xgE9yiAyWTRETp0cyS8kx+WN\nLg7Z7Y9lzihCVq0KGYKPMfSQGbokh1saYK/n9+vM0qlFjtqvvQG7AzxGOe6x\naLCYtZ7a8Ld+gRO0L6Kkss66SDC3jFPfV7fzmiP1iNOzebvSoI2U1kq3ItHM\nvNxLnsUcmJwaLbgdp+EGVdhYuPEbR4YNT0ZB7KPS06QpCKLfH8uzZ60jRc0q\nykPKFxrvOxKm9j2nxV9mUY59gHvro2Vz8jtenQpv3a6kD/whO4vmGCfWzyfS\nmuwJ2T/F6wDg6efxcGCUt2/K97rdZ0cxM/dh+0+3B5YEjGCjrGQ/9EQZDAfi\nXgSm\r\n=U0iu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dc49d0570060478c30441152ea37792111263958","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T05:59:57.568Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.9.9","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.4-renovate-balena-jellyfish-types-0-x-dc49d0570060478c30441152ea37792111263958_1637388179466_0.5286536506833479","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.4":{"name":"@balena/jellyfish-client-sdk","version":"7.0.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"667170a475a542068a612dc904136d559732453a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.4.tgz","fileCount":31,"integrity":"sha512-qOqkaudT4QyUQkJNUL3xsfOZg8flnxq68W80xKC6O8GWTcOAE0AH1TdGaLsL5+1ObZEKN740P+uYEWp8FZUYmg==","signatures":[{"sig":"MEUCIQCEJ19/6cMrlbTdhEXUC/gvHNyNgescnsS+Fr6PTcinSgIgIHRtSaeQGTUz3qjN8lsTNtkwdOfjQPtK55FRNftN2fM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmJApCRA9TVsSAnZWagAAW2sP/j6eMI5x5+BKFh8dcBqa\n8qZdu6UYk7nziLWWJzmADdhQaEgVT4ubOVA8OTDcA6dwXAIK1vdFm7/yxL2w\nF0bbm358e7WbYOd+DG6BlNoFY7l1vU2CgBkJ5V1YluZ0VXLRoNJOVeNz+i8a\npAppH9sBlK9FcE6OQLW2Ypvq9ABcYFUubqL+g2W7x0n0UUdCmdnhC0EyxEVz\n4fBYJUn/kRUvpFhaS0qgua7WX231SQbCVPCbicE4shZ/ogWsFVAvDwWq3iOZ\nuMnNZuQOhQGl2M68tkSl0o1c43TU/v+WvxQyPR9WnU+AstOf5bH+58KZyhhF\nIj3tft+gVGOMOo5Cl1Ric1rvg6lvhN3wZ02gxdgcc3vzKzyLicQSvJVEDPys\nxshWBiDTq7UbVF9GgeFxK9hTzhq7QtucyZ8f2vRBcDQ6RtzzCrDHd1/kTALD\n1NtGJQxjtT7CmehS6Uo1xEtQjSRaxj1raji/Atufs+pkY2ukO6gLTsKgKJsU\norQLHE9vdneGVyk4jwZGsuOph38pXa3nBpGsUOeVaKLnbHQGwu9YqN0uUIMw\nZdhKqb1IndxuppuiBW5trgC8zhFgZiGb17iwvc0jDR9AnPa8iudnjjdYnAHu\nMQkbpluGgi4ZV93/eyn0q6z4IklOv1Ua4iqJp0sR22uD1CEOEtWuttVfOD96\nWC0t\r\n=UAjC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"459accf5c9bfaac984fb0224c750ad21dbe20f9f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T06:03:39.939Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.9.9","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.4_1637388329394_0.1871901157593059","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.5-renovate-balena-jellyfish-config-1-x-9fbe0a8d50ce11dffa9d43254a732a29a3f0e37f":{"name":"@balena/jellyfish-client-sdk","version":"7.0.5-renovate-balena-jellyfish-config-1-x-9fbe0a8d50ce11dffa9d43254a732a29a3f0e37f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.5-renovate-balena-jellyfish-config-1-x-9fbe0a8d50ce11dffa9d43254a732a29a3f0e37f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1074ac496abbbf6c2d2abcc3ca7eb8158d559056","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.5-renovate-balena-jellyfish-config-1-x-9fbe0a8d50ce11dffa9d43254a732a29a3f0e37f.tgz","fileCount":31,"integrity":"sha512-qkxhX/EN50vSa3KV+LvLN/gnlyBoFm2iLaPfLCyQ9HPbytTk8By/iLKSNFrefiGA9S3zXE93lUondR/3SnnCTA==","signatures":[{"sig":"MEYCIQC4rDDBuBCivFPVWObXnxaHeaZVcHk8A+ytCqTvvR01ewIhAM3is6P9FmwVSYdHMY4812nTAE7IG5sPyOx7v1/NP79e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmJFDCRA9TVsSAnZWagAA710P/jzqUvZRyJAcilSeLm4x\nNA/Rs3s7ZYEAXcYpaFOtQwt9vaPkdeRSu2/k63Imz+OAraesrlKmjpaITYmz\nifrDsUfcF0lgLAWvKlDyhQ41iYa+2grxrbObIttESxIlxiyNy55Q+KwNkov3\nbIZwTBJSpiAZhMKf9m1AASIE7Uy5aKeeQ2uUc8U2XRCq+PCsmN8qWsGqwU+t\ndHxlqXhBgWeFV4PGjaOKObgamhU8nhH1RwUjVzcFs9I2cTVJo+RZO/e8WL22\nfAajfxyQAK2GLyEDshDmoqd+fZEJQEP7OjjYrOwEfXOzQ1snL4oXmyv95gDn\nmi2EWCiwtWuHV2pCZaeZkvtqqeuxqQ3CgEHdFPE0y6cts+2U/lG2M9fs0QzN\nrpHvCIOo1S9vZEOuZneIQVZhfamS6/mBhc/V0x2o8stLsUf7xcqbG7SG4Y+h\ndJDwRPhI+0EDcfreTAzS+9SQfIOipePJ7XVr969GsLGnBwdiZCsPASHUSRDh\ni0eaaAPJMoFX54dNgXHOUFrgX/fqm+gFGsTBGmVmrOtrixLeD2iadP5PMtWf\ntSJE6SiPC4SE/wJcUmi0UY8ca/OWqrLkXgy8MLCM+vIYvlIlysFQ0yjdbnHH\n9ACWds8XT67iaq4x20jz1RNnG4x+rb7H344uLEGuxODrGArNtBJ+vYUdQsmW\nCxs3\r\n=zbp+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9fbe0a8d50ce11dffa9d43254a732a29a3f0e37f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T06:07:27.565Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.9.9","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.5-renovate-balena-jellyfish-config-1-x-9fbe0a8d50ce11dffa9d43254a732a29a3f0e37f_1637388611133_0.7218062765908613","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.5-renovate-major-external-major-5cf44f9183fb4e3989ac185d23162b058eb89cff":{"name":"@balena/jellyfish-client-sdk","version":"7.0.5-renovate-major-external-major-5cf44f9183fb4e3989ac185d23162b058eb89cff","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.5-renovate-major-external-major-5cf44f9183fb4e3989ac185d23162b058eb89cff","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ee257231e96e69ef0a0498243d09dd0c20a57a7b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.5-renovate-major-external-major-5cf44f9183fb4e3989ac185d23162b058eb89cff.tgz","fileCount":31,"integrity":"sha512-+Z6rNvL1XA1DXxdG56L+SXhkHYGVZ8t17QGP4meu8YLlOX2UGeXRzbIpXu2OHsOzYK2oK0EiwOiOY3eIG8AzAg==","signatures":[{"sig":"MEUCIQDV6Fgl+8Sbdg0Q+NI85WHDgEg81EXsf6W2q+LkRcloNQIgPJjvOpQcecn4zJgecTvbxRpx7ZrWbmlEFZBgk2A/Ti0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268780,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmJGICRA9TVsSAnZWagAAVDoP/0OROnSCv537N5ShGEaN\nHX7u8E4Gz0hEXLNnn4TGHiwDJlEWp5Lv9YsvkL/2KLnJeiNMd8lKAasj7yuK\ns8pQ2zmZa615WB3gxFcAfVHMt78zxU0vPgu5oDCfwt/TrKn6kZanSaoqeZzR\nfvAZ74UKfxuS5GStKMVMRvj2Nd6tLl+ATIe7khHet+WEHdidc87ReKJQx5ZK\nP9ZyTNLJaPDR7EwJteGmSr4PoT/tvV/yjuchsINqIJ5he1HZtbpniofsrwp0\nMWNFRJrpMfm9OMD/PLNkdJF5Mw15AF32BfMjxhOe50M/wQ1B4EJTXoUsyWDu\nsAhkcJK4S6xCGSmpQEi61l/yaMAOM0zt3TNhDeCCMLzZQDXvDiLmsBn4vk+p\nxsyzl9eaxpgY6PFBTiBbIIiaYqQfh7TgtEqgty8nkckbpehVjQ/vZoBFq0kg\nhBr0T9h1/m1hqyLAeZoauEo4svRrANKJ06vvc6Z7OL6SZHHBsBdwtikgR1Ay\n34hwibnxhQYSRTsJ3YVeWWS+cKXunyHb2N3yrbzptj7N4D01GWjCmzeJ31Jf\nDobcFop67w97IU37zw0q0VQX1nSssugNBwGNgeDDQiTekptu0ZXymqdpDP9N\nFL0xru1wosabm4KNEFXrs/t+CbKcddr51U/BLlin1SVAVpaXcxofg0mnQgSf\n5W0F\r\n=xc3I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5cf44f9183fb4e3989ac185d23162b058eb89cff","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T06:08:37.564Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.9.9","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.4.5"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.5-renovate-major-external-major-5cf44f9183fb4e3989ac185d23162b058eb89cff_1637388680193_0.6639192564442931","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.5":{"name":"@balena/jellyfish-client-sdk","version":"7.0.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dfe3e39d261219415f9d5bbfcb66a4c9dbd38596","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.5.tgz","fileCount":31,"integrity":"sha512-ny9Bo3LLDBWp4rEmIUSM0D3FAvgph9PgKEQjGjVtULB1TdKBTsuDtIHar4uVKbiLgr+vlKjPeCOWT0lek80KYg==","signatures":[{"sig":"MEUCIQCGUN7tEvPsCXTeqRWW9ErP3oQ9izXhVtA3z5+mOcHkSQIgdrSymRUQmFbyQ7FhfpkKeS++DUd5bfz7wVgv37/zlOU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268742,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmJHhCRA9TVsSAnZWagAAXhIP/26oyo+Hn2qpBDHo3RHI\nV4xnbSpXGJyaP0MwKolY85f5Ac0rZ/tzAxEl5YDZF4RKDfXB+B/YJlJH9RAa\nqCteJcngyiEFZT2muFtOo1Pu8ofJaMRpp0VJGWSWmhzhgZuABz918hfpVT81\nsiT7yOA8IFrKy013kJbGmQpjB2HqJiTLyzpiJGCeUQjmmXdbhe1+thLH91Y4\nMXlgC3bf/SbbuLwLPiz43mE43Jro4V1qwzLfppfH3j+u0lnuWAuaWgHEHigo\nud3RiUT7aSvcsfKvhWC0TOtd3iex5hJymwEUpUfGuJ4MskIVHrXexrvE39NF\na6kMVknchPx8ZBWfjW7Tj8VCMz3oGMK5Air73TECJ2jJtoPCpw79UQzE6Sqs\n1lxjYY4yIszsuvdczAP3ld396pDftJEnP89LtVtd3ix31tKX5f3y5UlIC2ES\n0PGJ+kim99V2TmPbPGvz36eNZad2yPuLBqwh5rOCMoYgk/ksqKsYRWcH5Lzv\nrtu48lAFMrV3U66y4F4u2FOnmDNNkPs+xT8DNVRAgj9SMUmwfQltn4vzb8qf\nV3rEj8hJAlJKmLCN/3X80FpamatDGI8SHfTAUz38B2ewekz+aspUJzpai/ER\ncfTrbI6N1rfU5FyVOLDptNO3og7hOuSXJ7cxUpHP3c/WwJZTdXRFrvAUI1+2\nQqWH\r\n=y5dV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"affd159675112ad014270902cc7ba9e171b4d54a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T06:11:01.458Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^11.1.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^11.0.0","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.9.9","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.5_1637388768920_0.050660170893632284","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.6-renovate-major-external-major-f39c28692b05f6881e942d137df2f3e7ba84d0b4":{"name":"@balena/jellyfish-client-sdk","version":"7.0.6-renovate-major-external-major-f39c28692b05f6881e942d137df2f3e7ba84d0b4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.6-renovate-major-external-major-f39c28692b05f6881e942d137df2f3e7ba84d0b4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d6e057035dbebf3db579ab96a0e2ad3e3ff8d61c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.6-renovate-major-external-major-f39c28692b05f6881e942d137df2f3e7ba84d0b4.tgz","fileCount":31,"integrity":"sha512-Z13ZQk4orKbBjDauKOpjil3IFAHpTa+1P1kngynzcwVp7QpDBKeTif9DtmROLD8tsmk2K38RRdpE1wjy+66SOg==","signatures":[{"sig":"MEUCIQDcUFyUknAe0GgbqrK2E6MnOfpIP4Fk01k24ll3sTuisAIgSOxlkYquXoF+kXAWIz/OZyfhGH79or7kAqCodjLDSmg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmJKWCRA9TVsSAnZWagAAf/4QAJ+igUqBjn1RzG5vT9F3\nMeJgprI6ZL7zk83k0mz4ZGN15JKZX6DmCJLS5QZTNkS2lg5MJ5PBbluyVHKL\nLZ9YWeGGxw/5NB0LHwVb/bVtQV3b1bghNHkKblUBMM4qPDaSUXexDCluzs01\nXZU95fi2nhco4E+FuS+TRFVnErLx7eM+zSmII03jr3sjMoeAlijQMqD/HY41\nl46yuClLhbtIKSVQbipaBiYxV4dkyURgT/YHxUCiMzfxiNPLuDV9RNLoUWRL\nZ0h6I1y1euzAAvLE8L/+bguAD8si1agtWb1dcHS2TaXW3JFAD3qfyLduip6h\n8ygm7LgawmXGE0+ZKOMnuwc7e/Y8FM7fK//metZaJwmfDapo8ymuV+HX9AC9\nE/+67fbM7iQeyvUU6vtFlX5zIWnVn8/QO73/t/z2borQV8LQ2iSpIxOzbjcf\nBH5a8njVsN80X8sVGc2fUxDgpAbRtw9g0h+mgU588Sw7LlQFUWjW/TAro/ED\nU2Fh9ZWumF3UWhJuGTCbd7ShwHeYoNMbT/WIzUq2WPClHJ4yD6MUzq6h6RPx\nKgX7n4sBSbfH25oyi3B1c1Vw2AwHISlL+22ZpVVf7On7VM1D0V5wAfjyEkR2\nxRocclxYWvc0bkN1gno7jDYEpQHeWRvxILZFU4yLLwn1CgOE3l9FnS8V2M+I\n81Sy\r\n=ae6W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f39c28692b05f6881e942d137df2f3e7ba84d0b4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T06:13:03.518Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.9.9","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.6-renovate-major-external-major-f39c28692b05f6881e942d137df2f3e7ba84d0b4_1637388950357_0.7503170989576748","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.6-renovate-external-non-major-23ea00bd1bc5b9ec0527d6edcc9d94c25f8c62d0":{"name":"@balena/jellyfish-client-sdk","version":"7.0.6-renovate-external-non-major-23ea00bd1bc5b9ec0527d6edcc9d94c25f8c62d0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.6-renovate-external-non-major-23ea00bd1bc5b9ec0527d6edcc9d94c25f8c62d0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a7a9ef864cc571bb030ada67443391a66e260312","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.6-renovate-external-non-major-23ea00bd1bc5b9ec0527d6edcc9d94c25f8c62d0.tgz","fileCount":31,"integrity":"sha512-sGc12hQ9sPTJW0SVKrv3s4IFAZB8vIYmqmKxTlAzC7b7oOyMqA+Z7oFtiinGT0GvxgpeGUTM82KSDOA7xChXwQ==","signatures":[{"sig":"MEYCIQCvm0dY5ZVg4Vj4+hxrArhhf0rRSZEsL7ZSWQW7dHl6sgIhAJO/3QEoJiM7Ahegi4ACgEOgOU//tJsn7F9YvXuU1Jj/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmJLLCRA9TVsSAnZWagAAFQoP/ApMzNJ/zKvYLGUGY4NV\nNzP8lrN8qpUAIx+2F1c6Si3fg0CLEK8azntxliy1byYSLhyBM3adPjwW63f1\nR+7DyXld0hwCxw7sSa9xYc1Bg0uLiequUFR6c2k4EhvluIhN3HJxli5KAVhu\nxOQ6iTNp6UduPhYPB1eOh8gshKC+qMCFgiqsptV4MZSWJ/jFAWDzLMsn4jzm\n+LfNzFfHhRBNH4LigNL2MEspYAJIfVRzkGtd/c4lnGMLIt98pyiGx3aRNWRc\n6w6ik5CfYY6vQoX3ze3YcwlWyYU2nemCFLASJYVjwS+vborHClBa+rwMHkzg\nRZcmy1F72GNGPg6sl0dp+BouIm/QRDAV/G7vmtAtsgQwi6t2X5JGbFQ7ysug\n+Y7NGILeXhqZ6+nh21Tg22tEW7dsInsGSx6Xoxt9TbmmWh9xAPuBIAcfbaSb\n8gFj+S//QWIwX5LNehhCedxtDrM63OFVCtc9rUVJwhiZTHya4/keXaAieHOC\n+m8QkLCMApoUqqmgM5J6ACKNQwLk0VVrOlyBAQsz5+T3E68A/fAzVnmdl3GM\n70kJ5x3R+K19ud1ps2mWua+qAii0+IhytefSmxKfHAW3BlGM3IsASosquoj9\nEMLF/w7XVtIIJRaKGJnaeAH7gFL5lkpaGMouj8iOGARHzMcAZcYssOmGNeWl\nDYZr\r\n=sj2k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"23ea00bd1bc5b9ec0527d6edcc9d94c25f8c62d0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T06:14:16.927Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^11.1.2","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^11.2.6","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^0.9.9","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.6-renovate-external-non-major-23ea00bd1bc5b9ec0527d6edcc9d94c25f8c62d0_1637389003417_0.32406358644395006","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.6-renovate-balena-jellyfish-types-1-x-be64c9cb8e1407bc3de189c798331c0258bf1416":{"name":"@balena/jellyfish-client-sdk","version":"7.0.6-renovate-balena-jellyfish-types-1-x-be64c9cb8e1407bc3de189c798331c0258bf1416","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.6-renovate-balena-jellyfish-types-1-x-be64c9cb8e1407bc3de189c798331c0258bf1416","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f51651bc6dc80813d228778a5a8b6291a770c6f6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.6-renovate-balena-jellyfish-types-1-x-be64c9cb8e1407bc3de189c798331c0258bf1416.tgz","fileCount":31,"integrity":"sha512-lIj+5nU/YMy3x7qF+oTnekqmx3k0qRkA+jPfknnXAIt8TzSkHV6ZQJw+nD6HSa0u3bfYWO0VJEbh4ZTgS9pbRQ==","signatures":[{"sig":"MEQCIBkaR7LtKAipYlCSJpAfzrLqk3sWk2iciwECWkx5+o4mAiAiT9C9ADmDIfGd5/3xfwuJqphvwEv+CTYu0UzXWx8XRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmMbtCRA9TVsSAnZWagAAkqMQAJ0/uAijZ36VulUaIS6w\nGYrscakPcCFjtvwg3Mpu9uS+MFJ8GD0iL/zyIN6sDyfDKTR6RyHYhbPNWiB4\nfdZN3xZ/wOYdEAmF6DqgxZezvuJ7NiKkUH1O8WH6F2DIihLbW+C0/B/er3uj\neWxEfBIXwC8V7VZWOc1qlaQvrkCWHQa0ZhiR629bM6IPvEIWv0mvQ4uBVRoM\nsvDC9cjxx/r+rNxeTk8aTlGMazKHsM5Frafjo7x0vWu53IivL8pndP88Hc7O\nvxcnXAlwEdX281dnwndpP9dh1VElSvm9QjFJ0x9f02gmpnI537wIbYAvCmW7\nGpQsQftT5O9gbz3Qee+aPSwMb2RiWqA96zt4GmmTeOcGYZkKesIU5DvWhv0N\nMl7Ek6xZhSg11QUOJDvlHegv9jEUWZ+YMRUaS0TEjJVnS9SRQ9C/7qHjWtJ+\ntmPiez9RYvPE7kcHebPQLjXpyC9nw4bTLvFSzn6xK62yFwWcmNVnmIS3Le/x\n8RVnN7VP2WGlnHyGYkwzWGm0aBRhrZO26zNCx0hwjeGzIPyMLRXbcOsVJInI\ni3wQpXZAQkmpojRUwNtDFtip06jMbSaoPImvFrplZY+9hwOSteezDihib+uV\nTdwItOF5CBGtgOPdng9rrEFkPyP/rGsBV+uKoP85VtorMkLDsMwGPNE1d6nI\nqGCU\r\n=TCSH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"be64c9cb8e1407bc3de189c798331c0258bf1416","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T09:56:50.053Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.6-renovate-balena-jellyfish-types-1-x-be64c9cb8e1407bc3de189c798331c0258bf1416_1637402349309_0.2860788393702418","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.6":{"name":"@balena/jellyfish-client-sdk","version":"7.0.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7e12d64dc2a2bf25f8e72f2c3ca94e11e93c23cd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.6.tgz","fileCount":31,"integrity":"sha512-6zxNKllovXcgkjwviogWsp/LcJjZR0RqLXHuEv9obXf5vC7Qv6+MHYNBuQeLkk96pm6qQK4iPnbi/GJSgPWY7A==","signatures":[{"sig":"MEUCIGUoBchLR0cTByF1qgKFgqSU42EHK3t+WxswmRzYQuHXAiEAojAkIbMxjtEuxjuQuFlDkItIqm8dCuykzGZzvt8MYCg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmYu9CRA9TVsSAnZWagAAyMsP/i3CaOkCX/d+XCOCgF8L\n0NKMuvirQBt2mKt7wKrwcwDoAZkQeUmdHVia7SuzgUhBiHRsKFOFJO8xfGNq\nDW6xn1ABMgNuHBsSxYgizUnZGzSeFXIUQygkyLx0ojbGuu8mkNXUgzeUXh9y\n4AuQfao4qcL99jZOuojYtUd5L1oXwV5dHMEg338Xwd90yGFAM6iZ18quogeW\n0BlMzNAzcYwZ9wAER2ayhxtsybJsl+qkleboc/2zszO6/5LdrAsDcrtzwDDC\ntt/8rl2H7EEC1NuDcXJtp6uzUK6bqUE5IoufGKcRgj+AHkDJ7m5dtwpiJJey\nzr9ZLVbe04NcjJl8NHVsYs6CP2cfvqj1VHcbvrBimNDQ6z44Um7kFOHMy7/H\nVnQSZrJUsG4XmxUJ88z1mUV+nN8Hb11aZyKWnT674RARSaS+vqB4GGBzAPqU\naMlRtldvT2XJzxSHbee5mu1KCce1e6F1GVODe0WuvIOsMbEqs3D0Jd6xJLJa\nIgVFIF87iTtOeSXGFS1nCKJU8nTg50yYHigfICkD8fcuovTfgpgkf+bovuoo\n6zk2nseT4lvZNxeK7aYOQXvqGSpSqyy5Pa/707g5WP6Fqm9XV0oNp/4/YPhS\nqPAc5nr4mNxsWhKtZjOHKXD2P9sV6JQIU4Wt6jMo2sU1PXLV+7pJQjSiinHO\nEPh9\r\n=vquI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"31e14bb370eb0d6006a1037953eed4505f1b7618","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-20T23:57:05.297Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.6_1637452733328_0.3748265764253953","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.7-joshbwlng-remove-license-headers-5f2f5e517ccb8bc16e4f8bb7c9c218c9eb9d8599":{"name":"@balena/jellyfish-client-sdk","version":"7.0.7-joshbwlng-remove-license-headers-5f2f5e517ccb8bc16e4f8bb7c9c218c9eb9d8599","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.7-joshbwlng-remove-license-headers-5f2f5e517ccb8bc16e4f8bb7c9c218c9eb9d8599","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0cdafa431ba928fc40d571c1fcdf0a7855e600b2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.7-joshbwlng-remove-license-headers-5f2f5e517ccb8bc16e4f8bb7c9c218c9eb9d8599.tgz","fileCount":31,"integrity":"sha512-r1w3gmLGCNf66AiX3YME8nruZm+JwqiPLtpQnKVnHE/RzGsexvBltGed0WbWOrWQ0Iv20ABxjdDc58xVxeoftQ==","signatures":[{"sig":"MEYCIQD3wz5jBrgYYPcvFFb3kzvf5x4mn9GfsZ85H0Lj/tmO5wIhAP+wFs97bCnyliZIcbQYlucKynQ4rWExbenAuqv9ZpE7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmaGoCRA9TVsSAnZWagAAnfMP/ifvr/OWEDUj0YFcJYk5\n4YW4qGbrJSS4qVV/uPes6OwHbLAvh0YKPRQ7ziPweEXTJhCu5ZocuYOQmJPe\n/iU+lMWVxTmojyADVZU4TZZ2DL2ighMs3PnDszqVES2YZ7fG5BeaVPXEg79M\nbDjI9O2ph+dLYUWrrr857k8tvCXap5bWUgWRDN1/e3xMaLX+W5hnS4BcbOZr\nm8T+IsbMJkitBmrqBav0ipllYEPZKEKaQzXX6VcEN8D5qlHJ4+9U+1tOjUFj\ne7Ay1gATl/fyCoHEBU1sVET1ulx//S3EkiWEGH7pLX3eH/hS2LFv2mPHZPoC\nmR8/z2SgRqAnZWWTEcm1gLjaOda+yoWuJiedVMKVHPyhO3wPHlm9pEpS7Olm\njsngrEwagdjW0UhuSmA1wNPwxZOUC2YhMNoz6MYYgJvmQin65IlwRX8i92zA\n0PT8faFE1bdtsTIiMZ9dJfrUdOsXBENgZoZ+pqbjLzfNXvRDyyygBiLI1Tco\ntQ2+ZPlJEvnwRFsilxlQ5SyeU2Y2kZ0zBejxyE7J27lfuE/e9GXQZh61+mEA\nZI6An1qHMwjh9HF8sirNbA+l1sQcMmOxQ2sYsnlvurl/n85bLZkSUrXgalEv\nYETBUq8eThHUX1wHe4nE+kdxeDyyT2JnCM0pNB4rRVFmVo3AlarVQW/pIwdg\n1QPl\r\n=aAab\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5f2f5e517ccb8bc16e4f8bb7c9c218c9eb9d8599","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T01:29:28.572Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.7-joshbwlng-remove-license-headers-5f2f5e517ccb8bc16e4f8bb7c9c218c9eb9d8599_1637458344634_0.8139853261037988","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.7-renovate-balena-jellycheck-1-x-5f19229f4b2b59d1fc902ecc665bfaf9f3089adb":{"name":"@balena/jellyfish-client-sdk","version":"7.0.7-renovate-balena-jellycheck-1-x-5f19229f4b2b59d1fc902ecc665bfaf9f3089adb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.7-renovate-balena-jellycheck-1-x-5f19229f4b2b59d1fc902ecc665bfaf9f3089adb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ff28c336b4739bc44b02efc6a5ce616035b85767","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.7-renovate-balena-jellycheck-1-x-5f19229f4b2b59d1fc902ecc665bfaf9f3089adb.tgz","fileCount":31,"integrity":"sha512-gUy7cYXIl8zpqGD8sBAFHC0hhe3ThfdGd5l+9gcpDmnlgdMTizKl1l+Gamia/prHO7sTsLtcLUbj8LRKXTBrrQ==","signatures":[{"sig":"MEYCIQCaUpHVi61M3w8GyLPpUn/jQONIntk7XFIyG4sm9CqJhQIhAMGyY/XzT7qz12dQ6/YMJNwWZ0UsfW1dj4VVGs/Pcpm1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269048},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5f19229f4b2b59d1fc902ecc665bfaf9f3089adb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T04:27:38.836Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.7-renovate-balena-jellycheck-1-x-5f19229f4b2b59d1fc902ecc665bfaf9f3089adb_1637469022849_0.3493348867539825","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.7-renovate-external-non-major-7f7c242eabb0c8be57ba379b50c59de8d3bcd028":{"name":"@balena/jellyfish-client-sdk","version":"7.0.7-renovate-external-non-major-7f7c242eabb0c8be57ba379b50c59de8d3bcd028","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.7-renovate-external-non-major-7f7c242eabb0c8be57ba379b50c59de8d3bcd028","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"574e3028646972518647dd1a76048a1b78d7bf9f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.7-renovate-external-non-major-7f7c242eabb0c8be57ba379b50c59de8d3bcd028.tgz","fileCount":31,"integrity":"sha512-X31Bh8rjVPXTWJLYfmGch9m53PTRzdEmb/FgFZ8zgACbDsbKFIJnFLmepT3wpHNFeEMiG9ag20qTpsZ7Q2i9Mw==","signatures":[{"sig":"MEUCIGH4N6FYtpQ9JwLv7+BMwTbU6AY9wD/ll9voYCn0VPAsAiEA/7GaHOIFoo4lsK2wwGke3SshmSdv+o2JR01aw05OHok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmdloCRA9TVsSAnZWagAAqnsP/1DGH5Fua/J1ccDpzOtJ\nIQfyvrvq7dFidEkPatAQrsDYyM9rZNd0g8d8cXeP4rmG4oFAjKxsnHDHhxCt\nhM/fQmKm/VAfDTP/+EpnOI7ZO7GPJaCAfruhEJvTIkdstDIaa52/LV6sQp6P\nC+WC4p1YdYL8wL/DsSYnx4a79x9NBNKfxXig84uzYKF+WkeCOxCYSGa/TSzz\nvd71c3Fri8mnv6pLn+1p4fCPqc7Km+HgqijLLq8Qloq5ciGW0lLGr3k/Jvkf\nN3su6L1ElQ3JzGBDyOEv7n5ckUBDrkA1vDHgjcwEbseqikpJRZ6lPsqV7Pia\nTDeyceAFfr46G+modkVbzNPd4+lB/gIymDNEMMzNpNutlCGe4rgJ4u3q8Vea\n1siW0d1TXYCobdqhebGzSOfPYc+NzPDAuu/QVZJAMPHkIrqgMW+uIyo+Ey4D\nI53jOhZzlmRzbryn0gcY1jJCAunXHWuenRzzoa2ST8i7UgbIAl+2AnYxWLnM\nw/VgUanAZlVS4/TctEhmaLyOohE0MeAVLg8mKSKm7MLXqnCWAOs/bYnDC3WN\nb6LWsTnmWcgHQsaV8ufRCX4xjmJ3IUMSHXm85AIZisgfv+Xpl3IOhR7V05Tv\nJMhDf4/fs6IHPo93Pz2OJ0I7w6Itzb87sna63rED58J6CGvlhAw6dEq7Xt+2\nqX+q\r\n=afQ5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7f7c242eabb0c8be57ba379b50c59de8d3bcd028","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T05:27:50.858Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^0.1.1","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.7-renovate-external-non-major-7f7c242eabb0c8be57ba379b50c59de8d3bcd028_1637472616372_0.8038736124322265","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.7-renovate-external-non-major-20b7677d2a170fa72e066ccbf819923e91d2b6db":{"name":"@balena/jellyfish-client-sdk","version":"7.0.7-renovate-external-non-major-20b7677d2a170fa72e066ccbf819923e91d2b6db","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.7-renovate-external-non-major-20b7677d2a170fa72e066ccbf819923e91d2b6db","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bb912028345f1a0569fba28535f9eda0892ae35f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.7-renovate-external-non-major-20b7677d2a170fa72e066ccbf819923e91d2b6db.tgz","fileCount":31,"integrity":"sha512-bNDLkwgfO+26Gey8zsUE4wHFq5TieDsOWSn+ua8W70wwDD4Bp1UYn7+dd4IIqTXs3LK4msyvOdwSSKy5+wdtNg==","signatures":[{"sig":"MEUCIQDAQqxb0tOISG/hYtvVOX/STe+qoNUco/bJDb0A2LjzXAIgeZUdGIGO3E7K0XLtpWXs/lfYVSXSkGQJ4BgisPNH90w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmfRfCRA9TVsSAnZWagAAE6cP/is9Z/PRz3e2rSoVmEGV\ng0HVRttj2K8T7WRIOq7sNQ53ABbNCkV/ligauscTCPct8neTpz8SkFiQH0Lw\nfJ3uyw5xq6LljasR+HWitCLsBQN1HY/C66E8useOT8y6T43PWlWMgLg7zp7d\nQh7MMHUZkDCfmTWAS0bvYAaN7JTauhx2smEJBEC6PMqiC7WnIdwQn51p8eKL\nDnVjcRO7swm+Eo+E0AUmF9Sut7jIkJBw/xzEpqeB/vksonpKuyTx5I1qxtu/\nWUucafTs/KboDVtNnbGEam6P7w1DuCoeFT0FxW+1Qshx1VDv0xHzjXkY9Hco\nagAyWn4tYnFmavkV3cRQNt3kPo56uBBlophZqYR0tku7e0Gc5MlcUCdFoPrg\n3E8ph7pjg2OUTJ1lrAmiDmOZVrwBoMgKbxHLxNG3QVtX9Qez5YWU4jvNMCLB\noaCgYx602jzjuTiWgnKL7VU5TwQDj04MBTKA4fVyplIy8M9kvwqmsj4tblP3\nxIift5P6bAj2myPkfxs6OD60kRapY+TDe3Eyvyi+z6jJHo1+tDBXPxvsfPrp\nK+MNXmt4BTvti07D1/2Q3L1a4WLdiPmbguI/yL9iy3BKP5wHVRRW86ZvSM5P\nTQu4fl1CR2bXXu6I9Yza83v5bJVjmNGpnSBXOTP2wU2bjHrxlO42oPkbwcMz\nftht\r\n=KDoE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"20b7677d2a170fa72e066ccbf819923e91d2b6db","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T07:22:55.473Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.7-renovate-external-non-major-20b7677d2a170fa72e066ccbf819923e91d2b6db_1637479519419_0.06055743792484569","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.7":{"name":"@balena/jellyfish-client-sdk","version":"7.0.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6d59af1d6e1941967a3785c887ce3e4281a1869a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.7.tgz","fileCount":31,"integrity":"sha512-QgXsj0hKWylpeBd1O7cOkFHWXc+8ahcuu72RVrG/IOwSUW9+6xDh4tzB7ei0lHVl3drCJyx0tz6/o15dtSwDQw==","signatures":[{"sig":"MEYCIQCelrU6pyhcE/MwQsxEyr5k2yd484qA6Ac5+2b9/w7QFwIhAJJj14b0fciF4ss3u4OnimhPAajkVvLTSAEHhRZX2nk/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmliICRA9TVsSAnZWagAADT0P/22l99m0E7aESBCR6mqb\nOOrQFRl4lKlFaiOawf7ng14CxmduecnRUfXTCOd78fEWRemRvHpYBN/O9d9Z\nUDqRngqRwZZ7Plxlzh4CS/xrrl7GPyA6XlWF8SEGAJujjszJt3dryB1Yj4QO\nvYDT7MovC+hZXPMEVUzxbf6JB5qWQfBkVdaDesusEkqhA72wNRjWaPM8p7gG\nKGlTaeyBR6H/9vyot3QlAnS/fLbcKG2isRZQCxWP6WpA/4XMBEsl3NpSzLh+\nN1RVLoMwzHF22DaNXXd1BlB5ZzINDnC3cwBLQ64ZJTnWzyCeJteJsc56zkpO\nSh42mjEky3DrpRcUV7bosgKbnuxvzDWv3otw5m0oM3RXpBpzbYdaUt28Ggf+\nQb82uhxtt+IFap+4T+6HatsCVI4zdXnwD55gmYmUc8eFjBipROnEjC8ps+VD\nXAQlCLNZN3a4FYoPdfb9udfaqDG6eBFsABWgE9J1zhyn6AO6sVFffq5SzAdu\ngH/4HmoMBZnf37UNYSBckHpZU8WBk4vw2LuWXj2vdcyIIC7Rdafe2dr2eBN6\nQk/mrptMiZuq0T9glost/nVre55vTaoNecX4vc57jSBxQXs/kI+0cXkE3LPQ\nhaf+afXN+Qcapq3b+R+SmhlDYLfWfBD93IgAiBrIG2g1YQq09QihxoYpAevO\n8iFb\r\n=vSvu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6611686980a37a9d54a55209166e3d26283b38a8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T14:30:55.287Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.7_1637505159923_0.7135569363209895","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.8-renovate-external-non-major-be735b5ead65fd47f5a229dbb88b3d27a45f61d4":{"name":"@balena/jellyfish-client-sdk","version":"7.0.8-renovate-external-non-major-be735b5ead65fd47f5a229dbb88b3d27a45f61d4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.8-renovate-external-non-major-be735b5ead65fd47f5a229dbb88b3d27a45f61d4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"178933ec0bdb1cb798157e60917bb21209e7c350","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.8-renovate-external-non-major-be735b5ead65fd47f5a229dbb88b3d27a45f61d4.tgz","fileCount":31,"integrity":"sha512-r98O5nKfBp/PoHz2S3ibMUQIP9Y/jakPmFGNV5z7v4yucmrBLn5o5iTWW3pDrYpyWRQn2tqzKdkZrKmr8zzfyQ==","signatures":[{"sig":"MEUCIQCXWXqKwXNFnbUCPh/SE0Y2ULbd/9ru8/aifYUDQQ+NJwIgN7ZO6Fwb//Y0vNkukZSMFi3U3AwOdmqvdCx+E9Iirhc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269117},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"be735b5ead65fd47f5a229dbb88b3d27a45f61d4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T14:34:15.289Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.8-renovate-external-non-major-be735b5ead65fd47f5a229dbb88b3d27a45f61d4_1637505397615_0.6380862696046077","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.8-joshbwlng-remove-license-headers-b6107e77c7ad2f3bb37164bbb590ac6dadd33d84":{"name":"@balena/jellyfish-client-sdk","version":"7.0.8-joshbwlng-remove-license-headers-b6107e77c7ad2f3bb37164bbb590ac6dadd33d84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.8-joshbwlng-remove-license-headers-b6107e77c7ad2f3bb37164bbb590ac6dadd33d84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"74b1e35883e9c786b8c632d55459b13397f40d3e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.8-joshbwlng-remove-license-headers-b6107e77c7ad2f3bb37164bbb590ac6dadd33d84.tgz","fileCount":31,"integrity":"sha512-3dvk8EQnAOF8lkMTNohcw8nqdbbk4Q4AhtZvXapvTvVBjRt3S/tBhY5ugICufOivS/bts5DTwCmJKSKrgUk59w==","signatures":[{"sig":"MEQCIHlQ1nzs0Pl6ET5Ndf+Ui/Vf4vFTyYOaJ/OpIL/jtFCXAiAqjdLTD1G0o+/HWpHCQh1q8vHmMzbR81wqdSmgZtqVKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmmR/CRA9TVsSAnZWagAAWVsP/2Jo3aivnx62qxEMhbTS\nphXweOcjHcADWjEhrw0Jr85RM9kqYebRTLj3uTruT2+6spbZezoe7BJjOU/h\nnJkFaPVUqrVTii2BvvU+wQvJPtNIZe/Zii9V/YDDs/v2DETVMBHSdmIV1cSx\nyE+7DIof6r1Hhta/5F2/sGQMoQOVrwXs1xLyo8opzwMBENhn9wylhD0O62ER\nF1NOT25Y2H+PdwGxu61+tDOI5uUdMMt5obm/FNq1vJ2MT33FDV8mo/JyNAxN\nKGN0w2Fyii/V0W64wyyZ0eKoguKWFT2IeJT0KyQ7kMxwWhHEdQ8dlACe8ZVT\nJFHonjC8K1e3QIJcAJXBlcOUJMR82RPXRIJDesvub7xBh48PoXgwvpVIa+wf\niJTxD90c1tdiaRwWH0gPVRlOb892Xf8uOMbntGlh64FwCSEwqEEUu2dRYHjN\noHiEuWwV3fQY6886qnuOjj6BDwFFVPLw2fy1rO+IhiSE+s2kqkin/flR6Z5r\nrFwjgj+8NcGi+2Wz9wUpGMLVaf1r/87Vb7gjsDeishwnbxLVQPafo2IcBJ5X\nQZIPDWZs81phtTOQzEgpa1khV0oSeLOJRzuaVi9i5u3i6bXlPHIVagbIrf/7\nClYkMgELQwSoo0IIWnrZ+siaLgN0Zmna6+gh/pWQtkz4Mv5zUOPRfg3jI0gZ\nnCWR\r\n=M4fc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b6107e77c7ad2f3bb37164bbb590ac6dadd33d84","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T15:20:52.570Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.8-joshbwlng-remove-license-headers-b6107e77c7ad2f3bb37164bbb590ac6dadd33d84_1637508223442_0.04337143369640706","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.8-renovate-external-non-major-587f8613f4db8a91558213368079cf51e328d12e":{"name":"@balena/jellyfish-client-sdk","version":"7.0.8-renovate-external-non-major-587f8613f4db8a91558213368079cf51e328d12e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.8-renovate-external-non-major-587f8613f4db8a91558213368079cf51e328d12e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e1f137a9f6fbdab5875629a2be253ae54865c04c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.8-renovate-external-non-major-587f8613f4db8a91558213368079cf51e328d12e.tgz","fileCount":31,"integrity":"sha512-XUFiovwSxrCInTSq6cl/Q1vojej5uyITqnPMgCE4jHZEHaJK3021EbmZZf2c08bulIWGyjhEFlZXZPKSG3ry9w==","signatures":[{"sig":"MEUCIQCXy1K7uLWyEePIclHMc8rMMeeVXArrjZAOt7KYz8ZfKAIgZq+UrMKJ2CT+Frr7FZhjuF/KzJxksr4iRYUH+Rj0USk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmoFsCRA9TVsSAnZWagAAKL4P/ipoIC3w8ni4yYut1C3u\nnelCmJX3OkmI7RHMA94Qe+bwz7ngg4kaAgIt2YbzS6oiO0rA4LmufwOXfb3X\n3qwYweRWImOkKqIANgo1ouNiC9YFn/22fnu6KLwSW9aZQyT+T8T7ov05N1+S\n/YA/8QM5k4V+FpSt5sSJqRGkHRD7aJ0TZNlalWzVbclgctDgJk8Mj0qzL2uR\nAllWPaGnFdvNIZahQHnzl61yKx9xwn7VnMda2AIrtmMMExHQQVn8L54qwIy8\nSWs1ebjh1Tm2BOPxtwThERyKKN6ba3E9K6DdQ4BK3kTTvs61drdIZ32uMG+d\nXPwhKJZZ9ei8lLgAQr4adVTj7f+B9AiqilDfvjAPwMdX0QItE/OLRqAiY6DI\nIGtwVf2mU9RgGepGogNwPzQ/8ejiHrsYqT2TueTjMHX4kdrHSVmP5fUUh1nm\ndTaPaMCZ6uiLS+9wG8feIYBCCfHECJqYiUsBm29D2vv8qES7WNngtDoquQ8j\nVUIKuYeqljbY/PV7moRyDrRWh+I8ZQJ9CQXNETRlxDs22+IrsY0/NFD6AFPD\nHlAxbD3qyrAg00V4wsVAskhydRkDIiWZNfgXVSrmfUnNwxE7h/p8C+DMD5i8\n+zWd+nQiLTKhnJIyKcDjBRgbnF3oyMUQ1ivSY+uY/5Si86auV/9IczLS21Z+\nMuTa\r\n=sMhG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"587f8613f4db8a91558213368079cf51e328d12e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T17:24:29.964Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.8-renovate-external-non-major-587f8613f4db8a91558213368079cf51e328d12e_1637515628039_0.40801128846224244","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.8":{"name":"@balena/jellyfish-client-sdk","version":"7.0.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"76a8fc91ee75c8bd2200f7bb16bd6537782319d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.8.tgz","fileCount":31,"integrity":"sha512-lv4ON92fiu0tanzFfKtk5d/lIkGXqDYtZhtrKqJbhCFA5HdnrPTzIMtU08XtJIJ/J++DPOLBzxArn33VLlUrFw==","signatures":[{"sig":"MEYCIQDChbXGFJJ/TxJ0zXNS+Qetg+7nADxGGfdTyEfB1MSz6wIhAKhM/YZeN33+p1CO6bNB29pcakjpeirRadGV6jFzYSQO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhms3CCRA9TVsSAnZWagAATOcP/jnThoJh9w7IjnPGov2p\nTiVcvDDdmysYfroKZyQRheRRyi+P4U5/D2IJDfSQW3rZa/eNKyVlOb9Yah/Y\nR+aNUwTaefsum8MUdO6Ose3LfS/35ypURljxUGPTHh1JiivZ6XOFklcsbY5K\nknZ5G2TiPL1Nilwa3u8DDFj1tMs83reEWrRlhuixPX7eV+VaQLH3alOFkXiM\n17yqWdrJcwVHApWZjrlnhBTA7oSH3JkV23nWo7KMwvaVxzlu+ZQkRBKTNKGy\nf5M0caON9w2uY6/wbH7V8CBjXO0Rgt0B89larpistZb0vSE4GVmALtrufvMk\njRAAmgmJYdlRIXU7PGk/jCOueb53br6neacJdlQvwNuDa7UVfM7ataQSPMAV\n9+l62DAV/YzPmnzXXkUQpTHgJg+ji+KNRKFRMQm5vCqvAVOkCK1VmJSZa3RE\n6tGpWBoQyrLQ8AWr6CjoxL8gcKsUjgixZOK66oXGZszitGGc6ELp/EFfJHeo\nCEYkFoaNn6Zi1yGHw+cHohK5jhPnxYaa2++SuiIzc879A6wO+wyYsnFJ/Hsc\nIufpZM/9EUZIgFkUs1WADf/0UqikbQl/GD0OHkUpNvU0qcPfrge71KxzmJzI\nPIhACK9KznR2776INLngXl35GVu2n56gwvrTvfWn6rYxD2LEsIDDgO3RzUMT\nLqbA\r\n=dx8k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9e29c7de48a5088bd6261c373fdd4338350e3964","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T22:51:04.487Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.0","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.2","@types/uuid":"^8.3.1","lint-staged":"^12.0.3","@balena/lint":"^6.1.1","@types/sinon":"^10.0.2","@types/lodash":"^4.14.171","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.8_1637535170632_0.9593557227529206","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.9-renovate-external-non-major-c45a17bb392309daeb13ca0cefec03f91426092e":{"name":"@balena/jellyfish-client-sdk","version":"7.0.9-renovate-external-non-major-c45a17bb392309daeb13ca0cefec03f91426092e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.9-renovate-external-non-major-c45a17bb392309daeb13ca0cefec03f91426092e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c31a555ccd90aeb0d3faf1330d04ce80d912ae0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.9-renovate-external-non-major-c45a17bb392309daeb13ca0cefec03f91426092e.tgz","fileCount":31,"integrity":"sha512-OuWsRiAdIy50AtpcPxnx/alPAKZJnTOA5pOmxHdBe+sV6uHcPzW0ocT7JD9MX/ce7I2zeBuTVggVMMWSqxy30g==","signatures":[{"sig":"MEYCIQDrkUJ6xdzSiNxcxohIRbkbnHPHNJot7WaRCuIpypHGwwIhAMeBJFNQb0fT3N0vd57TpIZqvGAv6oU1wfFZ3++zV3sT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhms66CRA9TVsSAnZWagAAz1kP/RydqOavwnAGXaTMceI0\nYtM7e9n4IInCe58Eoo5Od8pBg3qCajDda9r937qVIrfHKy5j4JVwYG5w0uvl\nMisxqhyEzQVc1XjZPSIqYV5q7RCimU9hRiYZWje24ek2Kf7H99ZCsALejT2q\nbCf2DzMxaBvGinxS814/u4GD45nMKFknFS8FSd+hlAV9Pe6YUb7ATgbMK8WX\nMYqXXcRQ6C0dE0KsHAcYlIV/qozVhbx0QfF2kf00p9XQfkcZ2tzTdNJQWr0/\nR0c26HY4VwhDOVoVoFO/ZeUM1R0Umm2dilqDOyLZ4gMAB9Rg2v7xo/vOOsZb\nXkE9OdEUZNbiNfzH+/aQudzx8qhiWgRDBlF94zXSyKi4nJUevJ3L+jXYxmn7\ntFIdhlrixerAuVbvukxKyZnjjWeMTWvtPrtrSKX3+Gcpii6I1rEbB6vCkxvM\n5f1YD7QVRey5oVN+o7TLAzE7BmkqerYeMBppZnW1wuMOG4uGefzdQbf5Nh9a\nZC+DIozfME2uiNYHBgJvMxSjgbq9w7ck6VIR5IIruZxVnw0ceu/8Jkm5n4b6\n5a3a6zibQzb1jLYwMZPolz49+H7kkHsTnyHXOkyJvZ/Ze1/bN7fuUwhPpLjr\nvaMyKb+0tlWeFgQtHOJBr31LIxydJIo8VC1nOP+VTHP3FhX2ItMGOOtAClFb\nnAhc\r\n=cJk4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c45a17bb392309daeb13ca0cefec03f91426092e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-21T22:54:13.907Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.9-renovate-external-non-major-c45a17bb392309daeb13ca0cefec03f91426092e_1637535418103_0.726720926461975","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.9-joshbwlng-bump-deps-1-8fb51521032afc40ab29acb45348b41c390aeb72":{"name":"@balena/jellyfish-client-sdk","version":"7.0.9-joshbwlng-bump-deps-1-8fb51521032afc40ab29acb45348b41c390aeb72","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.9-joshbwlng-bump-deps-1-8fb51521032afc40ab29acb45348b41c390aeb72","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"63d31610a27f3e9cad24686ad9cc1d6143bed2d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.9-joshbwlng-bump-deps-1-8fb51521032afc40ab29acb45348b41c390aeb72.tgz","fileCount":31,"integrity":"sha512-qXO5r4FwTQ/zUsFkooMv+fxNHtUve/rUV8ngikkKl6Z8fzt6AgYKJjodhJGww5MzhEiq5UUl9rMcYOYK2UTCKw==","signatures":[{"sig":"MEQCIF5VqbS6zaOJn0rDZ0YEvAHqXPM3CwUSJlsVhmWyMJeAAiBQ9PNSsUCw+5hZgg05zseietpfaCBE8fltQ05wP0WMog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267910},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8fb51521032afc40ab29acb45348b41c390aeb72","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:14:40.249Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.9-joshbwlng-bump-deps-1-8fb51521032afc40ab29acb45348b41c390aeb72_1637554652840_0.8031053764878793","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.9":{"name":"@balena/jellyfish-client-sdk","version":"7.0.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6ef45654977ad4539f434cca9ba6377f3efa72dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.9.tgz","fileCount":31,"integrity":"sha512-LTIZ3ka2BXGLgBLjNt90ktuqvx8Ba0gNKWQB2DDHa6OAN+KAnNlIthSb7fnbISItAWemlTW+HprqQYUHCfr04w==","signatures":[{"sig":"MEQCICbTKK7FO/I+e1y2UQTXtjlmJhyaFNcCncpGWfqwcPhxAiB+JlLYrVwYXM/9JRbhpJ39E5CPcKT/q8ZJxE8RGk9vLg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmxq/CRA9TVsSAnZWagAAicQQAJwtQqOgnEGEl6JgTxCt\n3wTWke1uQ8s71sOMcz4fC/EWwmyK68mvDFKLSduOzzRidqMzu91aYvP+zlXa\nYDTHUV+DGF5EWtiW7RUv0v+6Ez9tW/+AXKQQpInQpvi71saLNjrfQPaPto8u\nmlUZgfrL5n2QNLbYsvsz51M21slBKAZsxpiLrS+1qWo4ooKWJYJdJwitwWS/\ney/emCIkAuqDrhSaMugn7OowGG3mCEe0KHUIhyajEW/nEuh4h1tKWM4YvYfe\njf1w43CaLC6Aep8F+o6hzr3ajPVxZH6IZLhCkJJ6dqrGhUhvZWT4wfLuEGgk\n/EOUnn2VhDpVgBMP/EmoC9TdiKaZuYIK4cLQO4eD3VX7woqM1N1EZs9nZIz1\nvRBtgJ+L3Ui8CSnRRCCC/Dv2XuukJFDsYYKvbWeY23hKQ8+t4onD2K+zo83m\nIpw/3TDAsteg0OmYe5RLUDAByZydG5VK3aZZzSMmrYjbyCGVzJzISse/dFGV\nmuxGn0M4qdbg7PFKR862RJDThoFyRcpCxC3B3YZa86W2iHgElOnxtk2VKW5I\n+uXzM5/SnFzkgqBrPrdKIyyxmmFhXQ6t5Kkz9YAbjdfQ4P/vGaBALBHaz5bw\npgWaLk/THOdv3UcFidP54c8wwiEYm+ELlUfmhpfVPN2zmosZgl6wX9/ZxP3R\ns3Ui\r\n=5y1a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"64c1ab02f5e1fec27fdbc5be8635baa433a6e0c1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:19:22.656Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.21.1","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.9_1637554879404_0.9251959781839609","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.10-renovate-external-non-major-73f7cef9811665d6906fdf54297cbf00e154d88f":{"name":"@balena/jellyfish-client-sdk","version":"7.0.10-renovate-external-non-major-73f7cef9811665d6906fdf54297cbf00e154d88f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.10-renovate-external-non-major-73f7cef9811665d6906fdf54297cbf00e154d88f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e6aa4e059463fc54d2b7218f2a5c179afa448b66","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.10-renovate-external-non-major-73f7cef9811665d6906fdf54297cbf00e154d88f.tgz","fileCount":31,"integrity":"sha512-mTkmil158uTF7TwU+65YouVj8JURfwPXlJSPWRWC2KfOFe9VtWqIpPR+/HOOak7FcO72eZFWxkqlYmvpRF89XA==","signatures":[{"sig":"MEUCIQDfYm6ngTGcJ/StXDGsy5phR+fOLMSphCtviqkhL+zkpwIgae5Pj4PngRwJDJGWM0y3wmqmp+xMIT2FC586Umy0SkM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmxu7CRA9TVsSAnZWagAABwMP/A3quKFpy86SCntbBRrq\nQtFclBgk2izMj9n3M+kttcXltPqfE378Fn/WIFGqwHa2gdoeWuGJSck4fRwD\nUIltPGWmA50ZLdX+PkD+Y4O/znv8TYVRLuznRmg/lmajODnjq9oMQpmrQTsc\nLjjoaInrxMo5ejurlzMSh04hvxtuecYiqUFdQ3+tq29Ws2l7F+ZNvc92rCrU\n+pbSfgNcS0fKHMpFOHt1guqs+qDfPN2vOfnOQwq/nrHcb852ThtYxzeIPjL8\ncXvR78cwaKG/lifx/yFDTletHv5b9PU8Pl78zu0PFhm/Bl+8e6ycQla2Ozea\nCl0zn9ENaa0vfFfazzZJr8chutkJX8+kEL8bb4gBZInItw2LwTRqHf62YxEM\nNZRqtIUbnWZavOqz5suDCnObI432ZN+ySVJNZBAEFbPJvl/maNXh/aATYgkm\nNoh9V2L9+2TIMOeOdlf0b/FRpyEUYl4XPECOF8LN9EZ+lTea2ubK4u9isRYQ\nIgM6dRQG4RPwm3wrxicA0dv4rE0paB+TxwTHq1zOgNYwE4jHgvpfob5F3MuW\nIGpVvjcen8y/5KsVK477C8x3uM46kQUGVng2HwerwMGYj2KroNugUd52dKHN\nfncE6JRon3jL/grTzRaWzHaTNo15M50He3yYFZh1/01PsoyUYQ0iUONtzWQX\nLAMA\r\n=Tvkv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"73f7cef9811665d6906fdf54297cbf00e154d88f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:22:44.719Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.10-renovate-external-non-major-73f7cef9811665d6906fdf54297cbf00e154d88f_1637555131379_0.3432625248091572","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.10-joshbwlng-bump-axios-ea7250591ce3186bcc8e664d5c27904b4a319b96":{"name":"@balena/jellyfish-client-sdk","version":"7.0.10-joshbwlng-bump-axios-ea7250591ce3186bcc8e664d5c27904b4a319b96","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.10-joshbwlng-bump-axios-ea7250591ce3186bcc8e664d5c27904b4a319b96","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c9bfdcb8a809decfc18b30dda63a4380ce276949","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.10-joshbwlng-bump-axios-ea7250591ce3186bcc8e664d5c27904b4a319b96.tgz","fileCount":31,"integrity":"sha512-KThfndNmTjTkXncM0cWaK6oorqCLvVlQN5t5nA2sVDk6rikxaFWnZ/qad9pU/9pfrRTNKH0D/KQ+ek2w9m20Fw==","signatures":[{"sig":"MEYCIQCJhimW9hDHxlWsixamg459xrbpjW5ROfjFOXCqu3tdYgIhAMOYZ/tqkfKLiNfwfFvpFS78MCBdruXd2C/RuhEp0+A7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmx+4CRA9TVsSAnZWagAA0jQP/05K1Uw6aKf1DtwzdhIP\nIf5wZw8Evyl0bmzTW0SR0Vw0tcSl8cUqj//JgP9Z0jI4CWB/KXJz/fi8i/Tg\ndiKFJvLM1WgEzjrIp1lSDlzxIAuKm1zN67MuQpTWP5oga2Y4dDJCg9U+mq5N\nBORoj7s+zhMDgDfFG37a+2XwGOZRygWh1vBAE76pHBNFwlrM5YhXgFpt5NdM\nZjylYA1slTG0RLPvZjD2fa5h4VZtg55dLR9+kmXFnwys7qvyavbzbeOyUEAQ\nmZQcyW0siMbhOOcwfMS11xOlUC6OhwhgH/Sv5yd0EXFhW0RI690AjxFnRNba\nLQJa6jtFO96xouoRNj8PlzIP15hKHhL+X/JXB+PmpZNb0+IilE0j6kW60p6g\nRwh38WRxnhgNnvVnjWN7iCp8b/LUNklBJx8zGtzGONOHFgrNlAbETVE6HhQx\n3ULe3+ooSRdsEyqFwPzw4uVmBQ6i7EMekUXiyPn/du6VXBxWgUrmLKv8ai5Y\n1cL5NlOzrtQrKxjvGF1TS9h/nNLXjEMbjtnfDCvaV2CPIrsZ7ianteZNF2i0\n1Rl1lwAdG4/JBu9DG0VKNc8P8tq3G6NQEzD42lx5cl3yKRr5+RD3J6JSr6nM\nVfUyysXh52Zr19Dfq8uRXfUQs0rQQJnn6hE2bh4sOSE18/2hjMJkV9dUdGRJ\nmqS7\r\n=zPu4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ea7250591ce3186bcc8e664d5c27904b4a319b96","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:39:51.829Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.10-joshbwlng-bump-axios-ea7250591ce3186bcc8e664d5c27904b4a319b96_1637556152241_0.9023473913831159","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.10":{"name":"@balena/jellyfish-client-sdk","version":"7.0.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"66be7b6d8d758420f82336ac82bdb0a9cc609350","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.10.tgz","fileCount":31,"integrity":"sha512-X3I4v4DC17XZO6CViGM0gQ8HnJPuAuvajx0cF5YmX8lirZXMIFEzB0jyjpIqV+4kkgBgrOgW4FZoXrxJf1oxjA==","signatures":[{"sig":"MEUCIFnJxI/nWdsWEMebrm5mLmQxEM7XUqc/ABQmte4lrdKFAiEAoqAEuvtZHEwjjrtRHbe9KvCcoYPw6KXANU4Caw6DxAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmyCBCRA9TVsSAnZWagAA1NsP/iz+llxYRu6cIjmwuXow\n3MyZxc9TCIkunT5mkS8NjXTYcfO9gLFw+QieHdNjmcUyYpXU/2YRM3A2qRmN\nfmGe0ASCzh/WFMuZVv9G4zV0mW+HPnNpcdphkW77/NgblypD9GZkP3QoeSem\nCG/ZXrfOuqOpJ5PyCHz7BBQePeLO5xzXm1gxILZTPGJht5lHanXI8/x0SKRI\nXZ1gofXJzJqzyEz1yI923+eG+S93OiXpRbLXEsYIA3M6xCC81NHEzBFWgYty\nkhLxZRn/jHmzuMR9BwcmmtI1gi4oiZOsjB2UWtZoN+U/bT6LcStY1Ur6WvSg\nwM9Tah7FStjKv4VHK509OprID66QWnP9359Y7JMkvs2ItYORn0NaYYb8GKzb\nHkVGOLQeZV1FMnKiIaJjkHBo0Upss918G+zItu0aH61A2Cerm5WxhjUX92/g\nDO+knDrYF8IjioKJpffA8NJK79kbL1dTsB7jGy4bNkEplyYF5zZENCFWdzuU\nO9xIn6eo98Z9Yo+NX828ueReTQCgpd3WrdpJ50SitnJofkg1YOum+owsc5CJ\nJscADmz1NyJEI2ljJgOcEp0ntFjjP6XxwemzUpDI8ODRGYAzg7ZpEX1FrmUn\nndUA7hOmEEnT5ZXZmo0SWNumrC0/DVqPAdBkywMDbvqo0+odrwu/6KA7seuy\n3VWG\r\n=0glf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e3c9f9ce95fad6e0bea789e41e4be309253f29f4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:44:02.681Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.1.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.10_1637556353626_0.04826968571026602","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.11-renovate-external-non-major-ec0b3e906dd98ca2ca6e789bb7594c764900880a":{"name":"@balena/jellyfish-client-sdk","version":"7.0.11-renovate-external-non-major-ec0b3e906dd98ca2ca6e789bb7594c764900880a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.11-renovate-external-non-major-ec0b3e906dd98ca2ca6e789bb7594c764900880a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75e0fabec73c4e95bcf0d08dfff1dfae57803c06","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.11-renovate-external-non-major-ec0b3e906dd98ca2ca6e789bb7594c764900880a.tgz","fileCount":31,"integrity":"sha512-bPg6ZzkdyzwgNVZEECb4It6aD7NQ7I7RYZBeXnFuEQmjYSBx1Yxg3/MZZXHoHiou8YpSWIYXAPuTAtZGy5ntQQ==","signatures":[{"sig":"MEUCIQDzN/iH6n2+QsoGDon8+VHjxfA+PyMRrruV8cJOLdEHNwIgfxUL+7gEu8jP5GcD4dGu5nhHXfXaSVziWmnlwMjjlNA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmyGsCRA9TVsSAnZWagAAOqsP/0iFpl7kknccGsa68M1S\nbrd/8RH+OmDuX2KFr/2bw+7+CjYodAtmpAq1AmnqCBqzRkmGVIw07v3LYPYv\nGaBu0uUGvDdeMeQKob8R28czUWUWFyU+BEVHKnLIh6gqlUeclZcN553fFg8Q\nd/I9ayeGLMMHNJbezCAkl8VZ6vRCnf6fUMEFiMzwE7cyyc302yuixZCR0MCW\n1j5KVoGNfEWyNL+XAw+B/omv2WvYR7zpnM3PD+ngaemTDeZGb+O9UN3gWKNX\nAd+735OtfRFycWc3JpIYJMxx1i/0XyJDYWQhkrWrAY6mOzZMJl5WztTdIBMY\njCPyorpAgZ81R/Q8CxPLC0L2XBJd0kAHQi6msRE2NE23oei1kLds5urQm+LZ\nEvckmkBKm1rj7ApXFo3hDDj+yJs2jgLgOHRRq8wfBOR9QYPMKT3ihBbb2ihi\nA+U5m8gs2C2XuHF922gleUVIaymfUC3u4NnY7dzaxAGCuAS6gEuAcnaQxfk5\nukZ3VfYkkwy3rWwnX1KwVsiOR98JVhsfAEr2a3u7/lXqgOTXVpp3PaBl5wqw\nkS0bsgCozWFDZ3e47izoa2+OsXhottUHC0Qbx5PryCFbG594KOWvf//wM5Km\nFyiok35D5Nib0D0eV5/BhRRIL/j1Bjq0svykn619bsyg6HMaMfnDhj+hOjZY\nv8rs\r\n=Da5P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ec0b3e906dd98ca2ca6e789bb7594c764900880a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:48:10.827Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.11-renovate-external-non-major-ec0b3e906dd98ca2ca6e789bb7594c764900880a_1637556652315_0.6718706889236181","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.11-joshbwlng-bump-nock-051684f83e9d674103c260bbbf433cdac893cc0d":{"name":"@balena/jellyfish-client-sdk","version":"7.0.11-joshbwlng-bump-nock-051684f83e9d674103c260bbbf433cdac893cc0d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.11-joshbwlng-bump-nock-051684f83e9d674103c260bbbf433cdac893cc0d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ed7ecb827f7cf59ff1edc2ede152f28489dfedf0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.11-joshbwlng-bump-nock-051684f83e9d674103c260bbbf433cdac893cc0d.tgz","fileCount":31,"integrity":"sha512-NBuPc0FIRQl1CBkxSZGR7X/XV96/F0QSEQICOiOMFEKdsuSapg/XfNXY1BcXzJ1uTU9Kbx9670TrL/pEbDY/6g==","signatures":[{"sig":"MEYCIQCUCWDU7VK2xhbnakwBKHIgZUVoZI1yjxo7y2exosfBIwIhAJWVcHN7MmitxJT4wSOtUNsLe0qIRg7mMqfjtmhtLBi5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmyH8CRA9TVsSAnZWagAAQZ0P/2PXXTCD7ZQxkQpIXC5l\ngaBSgjHPY0bjQF+LbAAGsyZJFKJ8Fb1V5/sj/vuf/LHnG8Xpo2KuHSCVKFHN\nZCI/mILX2XePCzkET4dcwYz9G47gau/YHs6TzKF54Jds44uucRilFJoPnQBb\nk5CLwJ0XPLZhqBpjgo/Vj4D+dxvgk8viFxA8aFcV57avh7Qs7wyjydg5aXLT\nXRRTxzx3JcdN9aaiM3avLq2w9XMu/GZFz85ofWkg1I7KNy2zo+/9HGf9MsCg\nnuoH0Gqf9dQ4esYzIJMJwmOJcBtzaxUVGhmu2Ee08YS8tPZ38FAPfGYoK3Ei\nBQrzbIBKqpROTH4FtlTyu+5ET6JcDFDyVeKRPr1/l0QXvSTLmGdea1S+8j4V\n/FNdrH6W7THfFX/xCmPuVNFFbGNQkEVI3Y+KlnMt3yc6YYjMv6d2T76vV+8L\nDQdR8HlrZ62flg2se1dOdYT2yhbP1JZJgMmV+nOSL+9A8JeBTosTlmjO/3bH\n+AXxlxtQDzfFH2p9cE8BYBW6jWGHdkUuM1/o7vqTkBH6fQqOUqP+9iMHzg4p\nq8GlmEKtsuvUCNpv/ke57h74piFdG259PPFAHrS+cqkBHXKHKiremM3Igi09\nq/JSxavGUQ642v0a9jbdhKutFUJxyQQivXEbt7B5gvWrcv9Y+DVmuiDGrQsL\nDWbY\r\n=iz+f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"051684f83e9d674103c260bbbf433cdac893cc0d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:48:53.137Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.11-joshbwlng-bump-nock-051684f83e9d674103c260bbbf433cdac893cc0d_1637556732323_0.5967381995233412","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.11":{"name":"@balena/jellyfish-client-sdk","version":"7.0.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c948c47c7567666a0d6308e4435f02fb0662e8da","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.11.tgz","fileCount":31,"integrity":"sha512-7Z2xAkVH1J+mPX+DJ1/0jGyANG20zOk3cFoO+lp9JCAc2NxYpqzy4ClQRPzKOORzbHorVY+6i17LS/toepyi9A==","signatures":[{"sig":"MEUCIFLDIF27W17qgquxtkNV56VqMPtmKO+hOzjDlgN8EThGAiEA5io3ymuBbgA7hMIOv3mR9ykKz9Qd0Y8bvjhNWLEy2l4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmyLUCRA9TVsSAnZWagAAglIQAKGChIY3GEdmDmANFYCX\nrQH2ORr6otosRAr5x6urVAmTCKyP4HDKKWOEs6g1K7fA9dk7WuQB9HB83oO4\niGF/DVa9n7i9AZ5yB1nsB/vcQsz5yHDJCcF9vWWZJdutVugvs8sWjb2k/RVm\nIN0IFRSFsbv3t/eiB4M0iu+RZ4IGHsvslg4zagsn3wH1Mj/aXqhsNS3u8D8H\nNvhQhZjKV2JUK4LZ0db6r5BU1o0ngGuWXNTylpK93qy+vBFQX5J00QVAtUfI\ndDOfESC3xja9teCMKSHstwYPWeRN7si8fXJsqLo68C09bMahJMMqtVh/iYNd\nWRrg84r9ptgX5JLaq28x7zhsmCxB3a/6U43lzUF8d7CCBSn7FMEQIq0UufFT\ngY9IwHicqgyJ880/3/32pe+DmAoY7RaebatjQazl9C5wJV7+SO8UZ1H9jFm2\nzXXuNyHsuhezpEFCarwUWyDS9CU1drPQRZhxbnKqyTMr6SAJgo9J8+cR6b/u\n502/Bkxctgk1ivPLq5xBo08A73IOUoYIM8ANWbdbmYngtm6A4QqcL3k5KkFk\n9LV16xcVoZXcw/+EYr4KU6y9gntwZ6Q+Er+xjD4WQ/vppQuZR8ER0fqXLmtq\ncy3GrWKa/IxyOmLSNjaTEvBmR1CfiWftsLm4gm+CHFkwqoIH4hs/xhRxEVXx\npi/i\r\n=gou1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8b89b9ea6d6740e00cda605b3ba63a18847b697d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:53:43.297Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.0.0-1","socket.io-client":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.21.2","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.5.1","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.11_1637556948193_0.3230321508296854","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.12-renovate-external-non-major-c07301d1593fd7e58f492453eb3c90f2184a5d0f":{"name":"@balena/jellyfish-client-sdk","version":"7.0.12-renovate-external-non-major-c07301d1593fd7e58f492453eb3c90f2184a5d0f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.12-renovate-external-non-major-c07301d1593fd7e58f492453eb3c90f2184a5d0f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7651b55a07b4b8be48e3168b3acfc5fa027caf3b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.12-renovate-external-non-major-c07301d1593fd7e58f492453eb3c90f2184a5d0f.tgz","fileCount":31,"integrity":"sha512-N77jAl4D8zA1KA/NKMlidF9V1Iu43Wo82bWJX8bn+2vTM9GfFJTj+rvLWcuckoEURBK87lQVhGE+670qpf/+xw==","signatures":[{"sig":"MEYCIQCMc+FnY0FWtectL7dc1EvLHeiO+zZ6cFeb6TXoHLDaOAIhAJ7jmKo0TjcxNTIWGmHV/1j7e4j6enNNYGnye65niuF8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmyPiCRA9TVsSAnZWagAA0kcP/iBZmjr6Wc0q4L5FgwUA\nb31Il/ACZFnCP3briBz+vJ2fDJJVvoBl9aXrjc6pp/9UIl4KTgsbKVuX/bdr\n38SOinubpMaaewOKtKrIjKvTuDCDu5dZhggnvpArrK69ufllGRp/HIgOikou\nrXYEpgXjA1v31SSWNt635yhtPKBw/bYFsRng3X35EN1mYmsqjLP3wTMWNM1u\n+JOCg+2icLXQkw4pzeTyA4v69o1eBHQSI42HAVyGWvOZd5SEPtuI1PQ3kPSV\nlp4tWhjWtjjjeK8JPhJ4aZePq6uxFb4hGUTp+9+EwS8qkr2xwtf4jU4cSLDL\nvAaj9+UPt5tYFY3n5nAHbhYfYiQ1c0j7K2m5vxIqjetWi0uY71bdAemNkHST\nmuTRn9TLl1cNXe/Hja0BGDfrfXJdP6Sk89drqvtgkLX9tNVpiviLYYbbqfcA\njYxPIeV8q3LmBwr+zV+tdFCeJwYbGLAU9gjrekv4fAQK+GLHwx9fLiBuMwlE\nrJctVgHVR1Mgh/j/EQAdLbpry61siK9oGOTQRxi7rUazEsDnGrRsW42It0HV\nefBzuduvpOmtLqYEnPWzT9P/t+kzCO+Q2JeHWH8i6OfVKk0BdE3Gx3lvi3Z6\nVJvbw6b0B4iNqM5ymSluBcxDrzcW7Hw9SYoDCYLqQ7hba0zU56u3uKrnlHpl\nch8A\r\n=ZrVT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c07301d1593fd7e58f492453eb3c90f2184a5d0f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T04:57:29.822Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.12-renovate-external-non-major-c07301d1593fd7e58f492453eb3c90f2184a5d0f_1637557218616_0.3969686124602545","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.12-joshbwlng-bump-deps-2-f02c92908047a05f6addc2a32ae8b0f149104c9e":{"name":"@balena/jellyfish-client-sdk","version":"7.0.12-joshbwlng-bump-deps-2-f02c92908047a05f6addc2a32ae8b0f149104c9e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.12-joshbwlng-bump-deps-2-f02c92908047a05f6addc2a32ae8b0f149104c9e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6ad70893fbb643caaa8b42348063b85cbbcd737e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.12-joshbwlng-bump-deps-2-f02c92908047a05f6addc2a32ae8b0f149104c9e.tgz","fileCount":31,"integrity":"sha512-U/BfvRvC3hz0Dns01TkkHEgrLprdc01NpfJrLN/KKOCAdaKQtnx2jQw8oICTX6dSXuuP5LggnPlMsnUEC3otSA==","signatures":[{"sig":"MEQCIC1jLHuP1+9gXBS3TP4zWBPd+e+UkRbjjEIIRlBJUyppAiBX2TL3sN/gddfuWUIP46L3vMPWKtPX8oc1R4fz2JoIIQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268097,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmySsCRA9TVsSAnZWagAArQkP/0I8N82K89ggelYGovzI\nxmpZ4onKRa9I5XGESQPehReum3a113riyeOGWgrArOkRf1gLephFWyh2YOGk\nFA9EWllyT4mXnhJ/J6mvh0vLzjG7PMQvdGsyeU0Tmw+YtwZZHztSTtzNN/9Z\nmDNy4EfvzQ7BiqkNRiYWhwDMmv8qodYbr70puKtFPfXpOPa0pdDDrWlV4JJJ\nvwdPWMzyvpz2RsjlDxDXkbTnMZL2pl1aR5KJgo/IoYPdlah+9BOMn03DswbW\njD38FQpCRfACMO9BQQUqfDBH5Yrm5gePE7WzQWjhtOVEf+PiIGdSE2vLu4R+\nEuPfhheHwOfmUGk/y8fp6bvveaY/GN7OUs9Ggq+oeU2xGbze1XUQ8QkWzlLf\nt8TUMQdwpz3UxDdxzTC5UQLBLDyLVUuzY0glB3Wr0gfxFFXCJHzfERXt7hlM\nZMeCs5dbZr2xnLaEhLahjAK6c2kyBZgZ2+VyMB8FR3vig5YcUjSoZShulrqX\nBlP+vkNtbgQBlgCZsYWlX1QoyYEleCnNnNpF0ksiT+dJPhTTVSvehxiT84eQ\na5/7ubjvXoLflLGIgQZP4aBJ7Zmf7lkJ/IF+T6Yetxp7bBjWS4Z663vMEpeM\nKWIvGzAS1dKLGoGuHTX3h2urf9Qaon2NRvRRxkcmbdOuR1+KRoEy2zCcDP9E\n/aUO\r\n=zzJF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f02c92908047a05f6addc2a32ae8b0f149104c9e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T05:00:35.330Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.12-joshbwlng-bump-deps-2-f02c92908047a05f6addc2a32ae8b0f149104c9e_1637557420700_0.7258838959924228","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.12-joshbwlng-bump-deps-2-6d98d8d5f12dba753727eaa2afcb79668b4e9799":{"name":"@balena/jellyfish-client-sdk","version":"7.0.12-joshbwlng-bump-deps-2-6d98d8d5f12dba753727eaa2afcb79668b4e9799","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.12-joshbwlng-bump-deps-2-6d98d8d5f12dba753727eaa2afcb79668b4e9799","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b4085f240c3952a6c17044447d14ad308ba84233","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.12-joshbwlng-bump-deps-2-6d98d8d5f12dba753727eaa2afcb79668b4e9799.tgz","fileCount":31,"integrity":"sha512-K/H92i4fneIE2Wd6mYQ6MXSz9/jW6IUW4t86NUq3HPzHqSO3kamw0ReG3hqCtJrFSNY+ZHMrCJsAe2mWxvBDTw==","signatures":[{"sig":"MEYCIQDY3Rn6bKLNPrwbRH3J4lnLKPFdd+aJtSJtHOhHZE16BwIhANddqV078XEb6vlmOUYvTCC3UbdfgBiLAz0+WzyqvbTM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmyX9CRA9TVsSAnZWagAASZgQAInoUGByv2l6RpCcUh14\n24oJf5aRx1pqiMS0Wkwkc6ScUrheQCk914BgagE7ywL9ghWtFwUQcy6OvX+x\nGyl9cWmScRgNWbbKCNOjLkdRgP9TKIhALOfGf8INKgTLnb1VXF5biRW/TMaz\nDvbrvT4xZHLyDD6clpuQ51kSpo6MXDgsbjcIdA2u6/5N18uMUoduVmsDOsOv\nvKex9hcz+dZXnqjCh89Xf4leO9iqNyIUGU+AK6QBKvtB01QWLntgYHPWo/i4\nHrR/2NAvZOEV/uCXV9SPKV8khAdUvJXxv06Rvk+jHfhwDHGFvkYbHktdLwVG\nq5ZL9wCc/+tMj+nszSgNajjuLK2YQScCQ72zULeVG/zyzlBlTIWS3E23+AR6\niO9CZu4uWW1zxR7AlojBSTayliAgwCgpZs2ARMRt4zuIOYo4uNb2JGthIOzG\n/we9W7l4f5dotYjIPSxCUIt5MHSciRJuhJwYzZMXVo/nS/mK6bYMAvoR1dXA\nfH/Ztbs3wwXfOh12DMjbNnaKAAgbfhAVYJ55CpByCi4w3cCIZD5fQIKRK6kA\nIXCnDA05Z1FWjUHNt0ILDq1jSG0lmIfvX61RBkpeznSsno6NNZJYoTx/9xqy\nfBlkaJr4tKgm/6KQGYJYw/9UiI4RGI4NyvTHY+DTU9CbG9kzzrLGfp8Pqzn0\nvy6v\r\n=AyJV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6d98d8d5f12dba753727eaa2afcb79668b4e9799","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T05:06:12.945Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.12-joshbwlng-bump-deps-2-6d98d8d5f12dba753727eaa2afcb79668b4e9799_1637557756958_0.3976497740452778","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.12-renovate-external-non-major-06d4a6af88e9293395c2de6a2287392abfb54a9f":{"name":"@balena/jellyfish-client-sdk","version":"7.0.12-renovate-external-non-major-06d4a6af88e9293395c2de6a2287392abfb54a9f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.12-renovate-external-non-major-06d4a6af88e9293395c2de6a2287392abfb54a9f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"45b75d01e65e0e6daecfc6ad790b5847dc5c0fb0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.12-renovate-external-non-major-06d4a6af88e9293395c2de6a2287392abfb54a9f.tgz","fileCount":31,"integrity":"sha512-L2n1JpN2zHcH73AvJo5Xp6g+thWPkx8N6oTjgnBnyw1Jfa9cNPU7C8JuoFw4rs1Ncb7Gt8akW2piu/BnIpho/g==","signatures":[{"sig":"MEYCIQCzLSIKg2oFM3jL9WcehCrpR062ibCNh9a11DsMqu9qqwIhAMVwIpXLyiQgJaA0epRIxozGLxx1YA7XFcOj06AVUOEt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmyeaCRA9TVsSAnZWagAAjRkQAIkkX/NpbAWrDpmtPa2A\n6PJ381EXkiB1JIk6//sq7jxJTjNWYjeRnKS33fBDAQZQdhefUS5g9k8rMzvv\ngzORkGVgTR5v177f+s5WNE80qCPIbilBTOijEvy032GQCwcdYme0sdM8lvCz\nD3oTzAF4ltiI/sKkqodE0TtqODMro4aZinG2yjbZ2uIofjjBrwU6irEL+6Jd\nfdXhtMTM5ZmYTGKQC5krB67ozoalm0+8sVk4XUhcWo/DfEuWDyw9Jzri6gSG\nPxlHvSN0dQGZfCAx4fPTg91KxGjYd3XPvhkUEOV6MChny+f02lmMvsOa4aOu\nvtE/FUFAvpmX2AO9HQx2o6hfVEyeA+K9J9I9Cyysez2ym8CHZ1lAbNmKSyfi\nXFlP915IoWwPwlZNowuAQIGrMwQWhGISXfz0lvvE9SHM9vKrpwdo57DjDMhq\nZ94o3r5S4i0Tp34TCLVg+hVWcaJbdhp+xG4KoTBrVkLR+08nADJwg9RVF/Pz\nDOsQAglepCPZ2OwZtbZSE33Woy/mYxTpQpcrVBk93Ey8NwMKANWeBbbd+NUN\nMKPmdUDEvjU55/4n/nCnndtbwcbsAm02xUwuKGE8K+xcqyz1fA4DF2xn5OVq\n4na2iEj8z9jhMflxpgJsyYPh81h7Do2nWOu/nyeiqEFz8+MRWmwg7n5QNSOU\nVFv5\r\n=jXqx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"06d4a6af88e9293395c2de6a2287392abfb54a9f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T05:12:56.098Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.12-renovate-external-non-major-06d4a6af88e9293395c2de6a2287392abfb54a9f_1637558169589_0.495237567967558","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.12-renovate-external-non-major-079955a27f8def4f74c3627aec5adb5b820343ff":{"name":"@balena/jellyfish-client-sdk","version":"7.0.12-renovate-external-non-major-079955a27f8def4f74c3627aec5adb5b820343ff","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.12-renovate-external-non-major-079955a27f8def4f74c3627aec5adb5b820343ff","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"484d57f7040d5d4ab43619acbb31c7056aee6d15","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.12-renovate-external-non-major-079955a27f8def4f74c3627aec5adb5b820343ff.tgz","fileCount":31,"integrity":"sha512-qBZq+kCVqeZY4n01IsXtE3lFdqb54uyn3broCluoluj0Ctvjcv95Q6NHO5dg5sIfoLBfaZJaSZzHeVK+cyoRoQ==","signatures":[{"sig":"MEUCIQDuB0dF7FCnfHZ/2nJd4qCyGj8VnXq324vJZFff8cLlfgIgNpUB4i05ox4qnVlKzw0JOxIzu3WXN5Ibuk3zOTFT6jE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm2yNCRA9TVsSAnZWagAALIgP/13nqOgT1m4Mi8HHa3FU\nnySqPAj7sd2Ch9GpAL75yeN/SCKQSi6fdk4zGkOJnQOWoplajlOFdpS+80ZE\ng6LOtw3bbvRlIAxQQBSC/NM3xQMGW8NNm67p467YAdRns3WihObZzXf2ZI92\nEkNplJHB/LY+H0QDx9ldJEO1i/EE0N4nF59XQSG3n2pTg+NV9Od5lnRjFTay\nnVdgrMgRnzk/RVOiTmlN41cqqbGzinf+R1QQ/9Wr29i2UAUPED52+d+nHdmN\n2s6ok7krMaQNeGmYgPetTkP8Xq5h8onKvvRiCZVrao60ofUPki4ne7qdObw1\nPdl4SoTxYCtIu+EuJghMnvQzQknZHE7lNyTQfCAfkUUBAFaau4iisCj2+Cde\naCxjwIH2XfNSqIprn96QmD/JyZ5fwy7PEVpRKdF43HKywlbqYW4XQX8hxbXB\n0B1v/GaUKW0TW0+DnBtopiSv3GMzui2mkxGgTkFpZPQ8qVSApmdLT/nFF/BH\nh6HMfldCMCfsq/YfwWsht/ph7utU3VoXekArJhIaSb2Gvi4cEtuxijmZ8Bsj\ngu9kseF3MLeUEhdxhwywf8pldhKZLf6ia7QUNbAj7c+gfAO6IEajuTC9Qaqe\nXBeoAgmysK72wObvKRnka4WT1ZgHCy0QF/utvPUFYkPspYNKbbPmw2ZnqtN3\nwsVN\r\n=ktxW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"079955a27f8def4f74c3627aec5adb5b820343ff","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-22T10:08:01.912Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.12-renovate-external-non-major-079955a27f8def4f74c3627aec5adb5b820343ff_1637575821595_0.714664266807036","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.12":{"name":"@balena/jellyfish-client-sdk","version":"7.0.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.12","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"08bad3cc48bcd0ed90b1061152843286775aacc1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.12.tgz","fileCount":31,"integrity":"sha512-VBDtHpsGxBAO2Pu0m5Z0YhWOV40Y/dC91IumIF2saFk+ve/s9c1fL8Ym5549WdcU1PC4VkeF+eKFEETcjVFyBw==","signatures":[{"sig":"MEYCIQDHGskt/ZSbwiAxm5axAZyC4R5qM598B29c/PwU/3vazwIhAJYJ/Db71fLrd+HQXqSoxEuv6d++9+tKOA4/ewUndO5+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnEuhCRA9TVsSAnZWagAA+yMQAJ8ZVqjrXe6tIrv36eny\n+gzU55kXJ+xioHgpQcTfF807K0503v4WJSpcvLWAHbEBJMsRW/sD3BODEGZR\nXzRFu8UkwVcAV2vhUMv70Jg/sZFN0hJ94XhqAR3Q11NKNTh3bsZ6GF5WzXc9\nmVqALPnUVBem1+0BTdiPlY55JHl8BGp9eRke17+luVT3oieBvGBajLFDnUJ6\nacUPdOzloF4bzp6dVbMQ9yVVOEoaBIKLjqG+WyAxf950A5tS8/1XQpC81va7\n0P6RkNGUBKw/qbMzJkLBk/+DNOGnW0NNQQR78KTeV3T4i8Deu8CSMToNNw57\nnXclFiVEfcf6kYoS8pjNGUAIOmvdmYx/U0X9rlJm+pCRMn+86ImdLXYZLAKG\nQ+uha/e0GK7P8KcQVv9DjB5kKeS/ovPt6y49OFobd0bfo9OL5TO6Ao5RkwIy\n4MhTUbu3iLrVBkPTxBPSStS0vSF94L6iVQTc+APPeVgSjf5BDju1Lb4T7tlE\nOiagSQjCwRW7A7Q7NM6j9pupXn/NTeTgMJnhvtoHm26MNnZUw2xZLh6x/zxl\ngRoJwGTfnO2W1bwlHE3GOZ2WhafmpX0emrBXdxHu6aCDvouNmDxsQbgHBVeH\n05Z9fjhB4gpfVt4fDvHEreiV3065uH47QtzG/gqtjBD6AYOMDSX+CDIQ1NS2\n8vOl\r\n=DYGt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"75a11085b149d9a7851efbe576798ee2c6a110e1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T01:59:54.702Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.12_1637632929621_0.23576959680889353","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.13-renovate-typescript-4-x-085c43b34df8e75fe9bfabffad18cab25085db56":{"name":"@balena/jellyfish-client-sdk","version":"7.0.13-renovate-typescript-4-x-085c43b34df8e75fe9bfabffad18cab25085db56","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.13-renovate-typescript-4-x-085c43b34df8e75fe9bfabffad18cab25085db56","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"51e46693c45024d17aa16f0df768ba7932a8a7b4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.13-renovate-typescript-4-x-085c43b34df8e75fe9bfabffad18cab25085db56.tgz","fileCount":31,"integrity":"sha512-pV/C4Xr2x5BYMWEmX9x21jOEDXRgkhFzknlYV7/Ewa4ceRx2Pe0HHEZM7MNzGHMyJ5lecz6F1Jb2eVeUc4XxTg==","signatures":[{"sig":"MEUCIQCVcfzCFuXy0MFagFczGA5hdGazSsSWMFEh0SKm8DX3ngIgNjN9wn9xfajoxhnAqWvsFoKPYh8MkXhViN7RgjbRcPI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnEzgCRA9TVsSAnZWagAAoWMP/3GJlCJiI+WOGPCSij2o\noe+g5IAfU4/Uvqzhpz3KHNejwTJPTvNrwgOhnr1szoCNINL1Pjt20c1so8kt\n4HvQiohbVvG5PkVhFMKJhNSnSX3tH80GMhdk9V2cv1nX7d7J5vcnWfxkRrqw\neK7vn9xdOwipzSX8Tq5ysICk3bqy3/MNtqVnYqLhlSKk+d0inWPUEg1U0k7t\n5IgZeR7Yqa1R4opEHRQpnimNPftakJR28KtKB6PdzO692ZH/N5jjAnfc3oAg\nbBVWB9c652ynhv4AviUrWZGzaUMdzFhuvtndXQQqcw/dOJLLRzQcsQnAR2Ed\njbUwMsa9tPODD64jm0mnWSVK57/xP7QbjFdBlzy5zAI2LmL0UOtWO2uO5FGt\nChosMPz2ol6UfHMhwFjQMqP/QPOnnl4Z4AICys9NE2OsnZxD9uPTlx5cj24X\nPO9WyRlnvsJm3r+VFguFAYt3EhqUu/Q/dut7UjW15j77dGccgA2ZobT+Z9l9\nLp38Obs1tPrBq4ZJ9rajBtfeUEI3r2pGDBoI8l1hNLMRRQGilzf1rUcu07Ae\n94reflLIbyaC79n+MQ7dypOSt4fs2swK63HOZ0rbuFBssmqnZQS79wP3/Gcr\nnjZ0Rv0UqMqWpsiG9XBEEpWzx0IGLrFT1+jsfm1FhuvDNZ6ZVKQ6m3W4GaoL\n0Teg\r\n=8WbN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"085c43b34df8e75fe9bfabffad18cab25085db56","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:04:47.140Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.1","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.13-renovate-typescript-4-x-085c43b34df8e75fe9bfabffad18cab25085db56_1637633248237_0.18176232833724892","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.13-joshbwlng-bump-lint-staged-7341be06beef993f818f3488d5af148917faf51b":{"name":"@balena/jellyfish-client-sdk","version":"7.0.13-joshbwlng-bump-lint-staged-7341be06beef993f818f3488d5af148917faf51b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.13-joshbwlng-bump-lint-staged-7341be06beef993f818f3488d5af148917faf51b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"106614e846ab06d81abb4e90a23a3edd30ef7c2b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.13-joshbwlng-bump-lint-staged-7341be06beef993f818f3488d5af148917faf51b.tgz","fileCount":31,"integrity":"sha512-tHi/zfZCnYfJ0pxIxNufG4rwXJgwPncHtAVp19ME2LM1swFHF8rv6QCrqLwXCqrLd9lhj050pWRHRo17E9a26Q==","signatures":[{"sig":"MEUCIHHkerrdm4cyT4XZbdliR9pqs9MY68N8e5SqD3az5zijAiEAgB1pU0aI1nP+sKAnq6wcmITj3+ybQUntOmYDjT6AvG0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnE1UCRA9TVsSAnZWagAA4fIQAIhaRVPrvzWqxpplo+O1\nwl0u4j3HrQ2q9obhXDDp0FBv31RB1WTAe3xKjfG4Cyc7k4NyZX8WF75fTk70\nQwMLJe7BuPD3q6/a+jecUlnmVzxFrif036XppA4Y+1aJRT1uHcClUEN+WWWg\nZb8Lssf+HUT6w5ni7Ivb4bTR6yhWw4hVox8l4THmrgGaIztIZZdv1yAhfKXA\nvJz18d998HocprSMsSP0NTTqCymnOAs/X9V7xcpVBVbHYXacjjaVzJf/2vn/\n9o2TCFwTprs5kDgxcADjZk5W1Z2uZ4VMX07P8CcvuzDwRJtzL/Yi7SP918z5\n2zzQb3/jc0koGvj8KVIbwK7rugEezpJU6hUQAW0fzH3zyyC6wP1zfXsthysw\n+ZmYN5xfo/a8nzGqU4/XKH8a5aAanXqs7erP0N/IWMGmEJHWQx8uKeHoDtGE\nZliuvWpjDoMGTSFgFqzZtlIS5Un9Nc8dWqkHNGVSqiVfngmvOyAmC+w8OOhA\nfV38m/2eVNBjxZqAowTCY3tASrLDR4AOizjAvhtxRYzM+Tm9VXSpovaqwlqh\nvSi+SdRR7Ma1eZHZoY/s2JtshZOEdG72JtSK8STMvw4mPilqOmxgZptqDW+9\nahTO2kTNxGkvp6CnaZgAMXHjAY0McguvL+AMNILQ2JXmbipIl7iZ+pNBeh/r\nY7Kl\r\n=6BsW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7341be06beef993f818f3488d5af148917faf51b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:06:55.448Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.13-joshbwlng-bump-lint-staged-7341be06beef993f818f3488d5af148917faf51b_1637633364119_0.7333559437682278","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.13":{"name":"@balena/jellyfish-client-sdk","version":"7.0.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.13","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4db320515dfc1e1985e3b57cb8090e402a208f43","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.13.tgz","fileCount":31,"integrity":"sha512-wPMXyXG5Pvf+2ic4YzeMkQtPEtXosh3/1EsSA4DlU2MvyrJpqLdm1AXkRPxi1HUlS3Lo1UsInBtcVg+yMt198Q==","signatures":[{"sig":"MEQCIAV7V+UnusIe7+N1YKJ/CgBr0LBLMiHO4hblPVt/XOTcAiBcSMrgeZk6Bkb2DaeLb6J6rBLftof8IJ2A5TYELeoU1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnE4KCRA9TVsSAnZWagAAgeYP/0zLek0+FrdmHZO1HFj6\nYugX884BHDSfmUtSW/Fa0h/TQbW0eWVCUhOJvXfyc37RivJKSdvCN4Lwv6ps\nCB4fGmL8QY/GydAeNJ+fJOFyI4UNrb7yihE9zREbT0ZmDPXOR7rfoLGakbrj\niV5XvsON9RTbFZz1nld43eKw048v7hL9yQFgq/FWhEe1Xprvjew8dvBTI8DP\nJH4+4Acp9YRGsu4NQFlogh6LX0DaSM+Aexm4CyTTKZViE/4XIOZaWykmXE7G\nd9VRCgI+OT7k+x5Eu2sLHy7U3NlRtFLhEwW0brRghwqOseJnYHNXuHHG92HA\nQx0mmYyLuv6JBaWCJBeUqqZU7se9UDMVYejeJaSWZ4LxtDulpIXLfbTiO1Zs\nWA5juHUfOWw0zy3TG7flYBWNgm61bdB9H2m5SjjZabG2bIk+sx6mDKq1+ZNb\nlfzLzn0uPqNJhiO/tMmE0WSoTXKTFVbcTJ/1sdRPMPRgV5eDqnstCPuD3hIt\ngPnS0HehEWEUwl4flIDYylxtNRsFwPkWPCa/DVgaVaMGM7xqPiEkxo0lvcuW\nl49HEm3NhCNeBMOvCicpUrYrfzph8kF09k3UkgbKgjd28uBDxSllzdmkYHkJ\nep0gDFiXXpJuUCzol75L51mzqrmi+K/7BLoG6rN3QL+Gczz4sLIv8DWEoSzb\nNHlE\r\n=VV8r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c9689a7bbe9d3093be1bd52c2de1b668a1338048","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:10:29.477Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.3","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.13_1637633546438_0.2963323447996673","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.14-renovate-external-non-major-40a4f47cb75412726240c05de29cf7a20f324ea9":{"name":"@balena/jellyfish-client-sdk","version":"7.0.14-renovate-external-non-major-40a4f47cb75412726240c05de29cf7a20f324ea9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.14-renovate-external-non-major-40a4f47cb75412726240c05de29cf7a20f324ea9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f3bd4324c8fe6097d4401711714a5e4907d067b5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.14-renovate-external-non-major-40a4f47cb75412726240c05de29cf7a20f324ea9.tgz","fileCount":31,"integrity":"sha512-lYSrZfjghT1ZXDKiF7ldGEP3+BJpqIJZx0nMqsPC6DSnAgecY1KrbnDk9oMeQww8w3SmFTVzNkXTOCHatOOK/g==","signatures":[{"sig":"MEUCIQDbCdBFJRxvF7G6dC7GDSUmkLVx2QU4OU6DuZZzH8pWJAIgE1KQNQVgrfbt4Cd+xbrssRUOiatfOx2o5ZGIrFIEPEU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnE+LCRA9TVsSAnZWagAAHJgP/3Nac/or4ktbIhRhGSmU\nI5xjWbPVw17lz+0xkfGi+82WgAauFpTyogDURTTuA1jJA1AhYdyCV4EbxS4I\n3MGEirPgYmVuy2QvykNv4rqtGS5VU1K4Hlq3swKzV8NDrF1xhNfMLmniepHF\nHuit/X0IyhSJuBX2rsk/6DnMne3rG8TZ76UflZJs+exd8FbkSbdSODEaxOsY\nN/ypulrBUGWBDbp5FohnOV19mdP8etodY7dgQWLyT18kEmMKCtbK6qxxILcS\naqQ8u93BwQ4YSvUihxdQF3OZxCMT6iY8BEWyAY/s3VHsM1NQp2c3oFFgSZWD\nIKPB7jI8HzjIIQBn1Jygf6qXkHmqVEbJmIWrOp9VLl/9ZNSJXy/aCJS+N8W1\nWrTeBJGw/eQw+fA1ueF2p57KAuZp2JXr7+tdwi+1b/vgrvgpVtH7rcbXrFkc\ny/E/2m/pzI97OBMU/NE4R/eTGOLgvUkzo4U1mGiQhw9U0rwKmdzzELQwTpv9\noUufZQ7SiWj8fQDmWTjxVlzh5ViaIzKaMYPZzbixbJLpAyNF5Ho3LL/jSPPB\nMod495JxAZkXQ4byg0JVlBXCVmIftpxu1p5tLQ3dHcdOXDwzklwGTo/NG2p6\nAi8EPGpw0mHd0YtRX/WXLlHK6YSdpWoI6JBnotFPvWSZpqV5nxJRuJYAZbew\nlvOE\r\n=MyWH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"40a4f47cb75412726240c05de29cf7a20f324ea9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:14:47.801Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.14-renovate-external-non-major-40a4f47cb75412726240c05de29cf7a20f324ea9_1637633931413_0.9983071154305763","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.14-joshbwlng-bump-ts-jest-0d78665d66f7ca25f6c907a9caef3628064342e2":{"name":"@balena/jellyfish-client-sdk","version":"7.0.14-joshbwlng-bump-ts-jest-0d78665d66f7ca25f6c907a9caef3628064342e2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.14-joshbwlng-bump-ts-jest-0d78665d66f7ca25f6c907a9caef3628064342e2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3377ab69c5140b11af88ae4e28428631e61762c9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.14-joshbwlng-bump-ts-jest-0d78665d66f7ca25f6c907a9caef3628064342e2.tgz","fileCount":31,"integrity":"sha512-o1YN36ed0j1unqEJsJG1eJVriNDyYPlLcCHoOAkrXzX/MZwihemMHZdsUobZSzLgOWXqfyiCZwass4SZdQvQAQ==","signatures":[{"sig":"MEQCICAOrx06amWrjd956D0JI1U9z+bMUa48iAZFXLLFauVpAiAPzr4WGVjGkd1SnLMVdrjwKYTfgGSw+m/1A4dLkTKyWg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnE/oCRA9TVsSAnZWagAATA8P/j2oonM0pmW4MlMhFVYf\nweZlVX1l6PnZz6q/KZXGx7UOf9NbBG4yA07SDCVHrA++zuYCRUpEXfybsGV8\nw6mkwSLtysQIq9E2lNpeRI8YrDJ7+6/EumaOhorKskFYxmWtX3NC5sQ4YgaZ\nnlA86uXApp0p/DN/MJq3UwTTGMwf1nBqA2NeZCtu/QV6M48ZMnNju9WvBqXn\nSmr2f9dvYgl95+GGVbjUxK1wncfIm2RQ/7NUd5nl3N8BRBCwLlerhwlIuEzc\n+YN92U/uTKITRH3uuIOqNvY5RWuuB+Q+/HGjt3Qlg12Rux3V12f5Tpm9yush\nDH1p6aGsyBL7Y/zBkDl9DGZboH7XxljWvKHgzLgtoIMRawLf7qxQSqhdKhql\n+j0nPAtwkpw1jFAaOJSi2zSusiLe+nzEtmdW6FmKcKKpSendejnWTjaU4xE+\n9Yg0itBhZTARIYKyZXkdtPdRacDFn6kmHaMsUSYb3hiyZ4JEb0ukyJusYXXx\nNtfDjl8S5PbHrQlUkNggQpAbuSLBYV3hSOlxOFy/QC133nNia7H1XzlmQHFc\n2DHad2nOKnOoj6+3yuI+HW4mGxs0haWFOnZGwaG+X4EuoTbYRHiaNZ1veR84\nsBZnkQoPF13RV7UJm80JwhxSa3iu3pqim4pJGqHwAt5kf9VFJWt//SK+DfPr\nc3kt\r\n=6HE+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0d78665d66f7ca25f6c907a9caef3628064342e2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:16:55.895Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.0.6","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.14-joshbwlng-bump-ts-jest-0d78665d66f7ca25f6c907a9caef3628064342e2_1637634023884_0.27137599695502157","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.14":{"name":"@balena/jellyfish-client-sdk","version":"7.0.14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4e765e17c1b3a0a032cd280797542be0ea1dc81f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.14.tgz","fileCount":31,"integrity":"sha512-nBh61/ALMqEoVgS/MvRr/5R988laR2o8YwcCLo2VKjiD9tyQCzoOSsIJARxEt+XWXjw8CQsPuUsxqKG0HF+O+A==","signatures":[{"sig":"MEQCIGFFYUSBjb1bzjzIHc2Snt7yD3ECd4d+XFKwO7/yBy/gAiAo/lnzDK9c0wZV1/CyM3FfxLIfdx8idFvor43Kwa1dEg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnFBqCRA9TVsSAnZWagAAOZQP/ixPlgW2Y1L1cDp4hJ+2\nlN3+9poOpMLPL6qAOndugSXQI+u3huDIj+WAOhAdovXv94034YtScTUHrpvz\nrEk38skJUZxwzs2WyiOgExDe/vLateYBTf9fM/CyTnmXvbVJnT9QbAF6rhs5\nKTfqNZegg6k5LxcA9PBmG3hdpNVe/lH0I3vMSZgDwdCOkMlmxTtSsoRbEAc7\nIjoMr6Q4KQ/lDb0GS5JSgskRudG+WO/4dqTt8P7+i4wNHi4oPfuW9d8Maehu\n+lmuAW1AmmI8lpl3f5/6Njas9xuRBe5KE+8Ty+gLB+GAb/zbK5eLemHUWd3q\n88Ec/4m5eerwqa9YDmRLECdzGmyupUleyJMd/nYw5w91tkOcwazGcmC/Sv/p\nLGkl0es4u0KQxTWnscJrwFdGCJPSos0p+UnYm2JxWDhMcPSr0X+cZTCP34dD\nIIhjtEoSCVj7bugVtn6cKwQRvpK117aLuXtn8GCXAAIhx/xaAPtZ8quAt059\nFL/Zm+PH++2lo+5y4/HFmclc+oHL+iHS7Sb5r9tl1u0HiL2tIQOx7Zgk/a70\n2HBCf25H8MM9E9OnjGkGCmRkTivgjvjPO82e68VGq2uM+9RpBq7hhjcpNtIo\nTsRYAfZZezDmcTIaCfmOkRpVVx44uT+t0e+fTxoVyyddOcp+06ifdc1CJLb3\nlygy\r\n=4Ght\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d6e58f57ad30416226fbe1e83c53d47036f1bdee","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:20:26.290Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.14_1637634154058_0.973403983353115","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.15-renovate-typescript-4-x-03493716bbc7d45cec44899f9e867323f19bcf58":{"name":"@balena/jellyfish-client-sdk","version":"7.0.15-renovate-typescript-4-x-03493716bbc7d45cec44899f9e867323f19bcf58","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.15-renovate-typescript-4-x-03493716bbc7d45cec44899f9e867323f19bcf58","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2ef4a10679d8cd933a9b277ce0e3ca09657921f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.15-renovate-typescript-4-x-03493716bbc7d45cec44899f9e867323f19bcf58.tgz","fileCount":31,"integrity":"sha512-KL1cFs31YA+qtUOoGnqtCFJqBO0W6sYphc8PVVZmacqzl6KyeC9LFVTcQOxs+JMGFvA6FyI/LGY5L+JND6wQig==","signatures":[{"sig":"MEYCIQD/zvT8o9QAe+SzYkq3JuYotntEEzDfDKvCims6waoBdgIhANn1gOOWpZ8viKxDpf4nzhhy+PkdBot0zkOzQ7jWKCGf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnFDPCRA9TVsSAnZWagAAcCQP/3nL5itWWN30EPNWK7F5\nYcxxR1N6Y0XVgn+7JzWFf82j+WX15aSB13i38jDc5GtkpcjPSBn+e7HjH0d3\nGUfLPrUgez/u58l4MNyAdonMN4oVfPLOe65c2xPe8Zbm/uBqkHsu7n33NVvM\nVHgKOD48lF0BjUd3D8STXwBStt2l9ZSrtSbkruFhP+MTStGw4GXHujbX9Sg9\nbfwSzAUZT27VWOMMQkBl0QRkkJygT5ZA20od5r/P4TghBQ+TNBUA9VeK0pzc\n14aWbmu+51xAk5DvQMk+A0x6giZloF83ZHBLaCIERnlNHKCX9n5m/O6KwMMY\n9wLpQuTBDAld4wlxpMUobAHjcuo8fwof+qu2UYnxbVNlFA9DZZDpROh8vhUV\n/XnnrctlNpTbx4K7rT5lFY+Gkr5BAbvb/ZFeuOug2zfIrKy0kPsTzAkfJHVN\nxY+qXC5sKaY3a/cMEpVwdwlQd+GcpKtqhyT/kXRI3rieTtST9ylnVhKL8bzs\n+Dr8jyfeDszJiTul3lpQv/qjvGdsLYH043Ch0gnYY0XPhmq13r1CkcIxv5J3\npG+kSDUFinYxFIvp0iPWRwQT/ytQs7PY2eLCHq2qW0jJ50xdNHXRNLjUzx2E\ne93thJHbTscCTKDfHWuzGndNJmW630qcPPIk4CCgZMyc9wAP9lMJdfc/Mgv6\nXObp\r\n=lj5j\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"03493716bbc7d45cec44899f9e867323f19bcf58","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:21:46.215Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.15-renovate-typescript-4-x-03493716bbc7d45cec44899f9e867323f19bcf58_1637634255252_0.8987698937833961","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.15-joshbwlng-bump-ts-jest-4bf9d8d14271b2567dad8ca722465338934318e2":{"name":"@balena/jellyfish-client-sdk","version":"7.0.15-joshbwlng-bump-ts-jest-4bf9d8d14271b2567dad8ca722465338934318e2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.15-joshbwlng-bump-ts-jest-4bf9d8d14271b2567dad8ca722465338934318e2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f068cdf9d15b791426a3fcf4877f6914a0fccca7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.15-joshbwlng-bump-ts-jest-4bf9d8d14271b2567dad8ca722465338934318e2.tgz","fileCount":31,"integrity":"sha512-HryTzjik5WUzuP//YayizNe12dn0oRJc/eM4YlEUqk1H+DXsR+N0DQv/Pe2f3+lc6xQxW1z08ht+UenOE1bzgA==","signatures":[{"sig":"MEYCIQDKvedyHJk+/NxIrip35IpngZ3stQP6AWVL2A4wJBNsqAIhANn6sMgy5f1PC9tsLu/zRfP5e+FqwdrNRcQJxm6YfnHa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnFHCCRA9TVsSAnZWagAAbEwP/1GtWlmNVqleA+E1xJaC\njbdc5htnHXMjp74IpWVgB0lE5GOizmlXszETN/i7cinU3Pg4JA6BlmjLhLlU\njsJHnZD7hbCT3/EFCtVyuHI9N9zVjMyXHowe4Otb6lwL1nvzYmxtSGytX3FQ\ny2E5oJHfCdMkrfDPYlATokXNP4TeJKmXpeARkXcxD8kBUVXKIKRh9xni75/H\nBTRnQkmlGlK9IKBfAcH00NvVqQqnMcpfoPcAG5vfvSG6vuuwV/mpjQks0Xmw\n6qz6P9Zw/8AhRdAPD31uLrwDK9oFBAWTGNc3db805oHtTtrMErdqFD34/oQi\nCFUQjzSfDHUdPFo8eVRVCaFVHd9dfXpoL83BIp13SPw9xAZ1C5wRb82AsYWQ\n6lZIi+DxYq3z9kpmBQF3POmRGj/p2+eqaiHe1VQPkPVYR6cHXZIJRGMx6Z4y\nwzwtRFiQpFbilhpwyMAUd4iKw1EfBFQ1ohe0ZaDf82S93CnKpwxHrfyyqpn5\nZvvq0o5Ouqi6JlIE4vrR5Cpe2WfsGy1vYD70KdtdAPBS9OieBRgJPvg1sKFP\nht5UBO1+QnR9VKzWJVd9tv7yFbojTz/QmpnUPaxp3zmg2snkhp644cDUkeKW\nwm+YhjFE7AdOo1giOJQ4VhblL2pdUZPoqfOMl9hhdzKLf6Dk74K0qXTdfTTP\njK57\r\n=pxAH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4bf9d8d14271b2567dad8ca722465338934318e2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:25:18.009Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.15-joshbwlng-bump-ts-jest-4bf9d8d14271b2567dad8ca722465338934318e2_1637634498524_0.26436492771068987","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.15":{"name":"@balena/jellyfish-client-sdk","version":"7.0.15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.15","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dadb320e9e1e3075dd73d6cbad26c127e050c5af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.15.tgz","fileCount":31,"integrity":"sha512-3XQ5etRmWvUROy0J+j54+PbLQ4Q0w3cWwTv7kwGw8LGWwWdl/ojzEPfmN8NmP88Y0DwvWF5UnYqZM5Nl2M5gJg==","signatures":[{"sig":"MEUCIET+R/51WUcGddg1lHYOlnYwl7jI7FjYGuZFTtleNYWNAiEA41k6LMM7+JDr+n8ftgknMbhM/KWtipsZWUlrItoM12Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnFKdCRA9TVsSAnZWagAAkkYQAIT1aYthyBHXC7PLyRjs\nurTEeOmIm7QNjIPcg96Cf0dHeOHo+JZr2DwcVk3tH1Hv7TH7T0RRptnbGHwD\nWlEwX5cMiP23CrRQcpk2KOwqGJgii9sBan2RL6i+jO4B++wZD2bu7L/+o+n3\nC0339e8ZUbJ/V+z7N8gYKrekXR+yrAr98DIU61762Ss5espyoAVR1xWr3Jt+\njIGW/dJo3529wgbWUBg5a0nDyanBi0pd/bGHi581c2W16Cxpt8soVMjO1NOf\nqaStBd9zJ65Uw2zGKj2Iq4g/pn0yb+NgzklR6Kpr4dgScjLhrF+HdVRX4zq2\nwjUWB1ajl34YxQSs57KZ/kq65aXY9YeO0X/AcWYI3jv9MrGe70xgmV527kY/\nVzDqZLI7CQ3tps9CfHCLoI7ZuebZMATe+7n4JNW/tGS7EhHhoK77UZF/Co3G\nTiHQ9wDZ+jGquMQWvhVDD2th7NM1kt5HnrloIzGBslUu8T/KGXYN8px4UwYv\necF0t5Znn0Ykbs1m+4o8MmB8yjM4gKcRlYwLFloV+AVpNKT/tZYWix4uEfqa\nLGhpeZMJaVhsYAplqhQg0RQbUQxIBlhHCBv309TBAdQlLLrc8iR0/wYoAjc4\nESHP0Z1anSBy8JIIOvwdzFspSBlhNh7sqj6He+cY6dCBpra0C+XV0xuysL4c\nGBc6\r\n=ZVM3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8bb0f967daaeca7f8c3415f9703c3c44e7c69072","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:30:00.686Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.15_1637634717130_0.21647940486277029","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.16-renovate-typescript-4-x-3e6401aeeff845c85dabaee086727bac9edc556e":{"name":"@balena/jellyfish-client-sdk","version":"7.0.16-renovate-typescript-4-x-3e6401aeeff845c85dabaee086727bac9edc556e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.16-renovate-typescript-4-x-3e6401aeeff845c85dabaee086727bac9edc556e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"eb2ecae08abf15b8b3e147070540344ccf5de24e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.16-renovate-typescript-4-x-3e6401aeeff845c85dabaee086727bac9edc556e.tgz","fileCount":31,"integrity":"sha512-x88Q9Yva4QBocOU9oFApni33QGCfqjuzhqptSO73p01hhh9KW2CaEP5updPgSWAluhMGlYTuu4x0q+bV+l7vRA==","signatures":[{"sig":"MEUCIQCA2wX+N+4YX2OIqUDeHKwVj0oGflxlnQJAg7XeCD4WYQIgAhooBtps0wmaT3iJJrJHooTKcMZWuGPXMCXnS/PkZ0M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnFO8CRA9TVsSAnZWagAAaLQP/1UKK33x36wdIqkRvTsw\nFTwZVhoFQVugmy6R4v1yU6sIQouCbVmedZvDAyHVRetnqvvnmGeT5aFB5JKn\n8X0PWntaA3UUmm1RchMzI/g711h8WUaFj1Z5nXNFzWzStcK7HvzyWoSbsg00\nc+MaoOJ4+JjDWXE74ePrmuZDJM3zaCuk+igqf2nF4Pdydw6cMStvdBb8Iwkp\naM1mjRcz1llOKafK9fa+6yglxKcxvqpK2trw8K4QZVOv5CV169wYsfX1R8dv\n2DAYNsOxFXOuavuTx8PSMADHj+K9323EebBOjgLVhzfFFiTEeHArtC4DtCIQ\ndosWHFWwO/SkAV7/vfJY+oIWmmzpFEtCG+RQqVrfXf9Q4KMdVwPQUGsDWgnA\noamQ1YbnMrot6+C1aZ7UrmB3OGzIp6xSV/Ga7iw0hdmbtGNZ5drMe7YMN3c6\nAposqM9ryFFc28BBvbLa1bvfvE9G1Uy4Fg466KscG7gdEDroXm8iOhu3NUkX\ncr3u8IpbZb8MfjsivzdpRtvXTK8aDVMacIDSDMk3So4S/y5tuEmEED6MN0kV\nkcR7Yxz3TgfH+3coo2T+n8ryHBR1CIOgQNcCDvOO8EWrInckpvdr+3EsJCtL\ntsp0WNzXX4To7UDCLfxIhuKlB1mui4qOxFGM0M1QqeCXPsrbgFthTqF39iBR\npZCg\r\n=BbXt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3e6401aeeff845c85dabaee086727bac9edc556e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-23T02:33:57.640Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.16-renovate-typescript-4-x-3e6401aeeff845c85dabaee086727bac9edc556e_1637635004783_0.04283554970750525","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.16-repo-sync-jellyfish-config-default-2e2b3826637dfd44ba462e03bf4e8e46a4381d90":{"name":"@balena/jellyfish-client-sdk","version":"7.0.16-repo-sync-jellyfish-config-default-2e2b3826637dfd44ba462e03bf4e8e46a4381d90","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.16-repo-sync-jellyfish-config-default-2e2b3826637dfd44ba462e03bf4e8e46a4381d90","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a784d6e00be6022f132e82d5198ba92136c6a07d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.16-repo-sync-jellyfish-config-default-2e2b3826637dfd44ba462e03bf4e8e46a4381d90.tgz","fileCount":31,"integrity":"sha512-4P4a85+gIRrgnr2k2e1s6/vyyuDIw6YapnpwlnpRcmjkRsCubf669ORaNn/rxzUuE+/5y3SpB0rtNzb5wSA8pA==","signatures":[{"sig":"MEUCIQCBV1lM7kRRnxI45P5PxHhtVUPN/c8/2QB7pFaj/7bttQIgbqrSDITkQJUIAEUXT7dbkKWawIyxCvk69dk6MKufrAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhneAlCRA9TVsSAnZWagAATpoP/iN1+p/njhavRwDmK0xs\np6momdBzdfM9lqznA6x20rwo7MjlSGWjXN7owueRoDZrf1FhpFWho6hU5fn8\neQXAyPqc/G2+xxk1rsFruVz5W+QfVFCufJ7uuVj3yt2iVPBUl4MwNdZ3f5J4\n6OJ4bXEnKaW2NsdPjbbmuuVYzTMpWw+2S80Gbkmf3gTa1OGKzLp+/IMdPqnK\n203Mk9I9+rXdk+tHVt4P7SUTY0Yh7IcljpBDPijlJ+saLItiY8rfZUmihckG\nCFz5qRI8GmVtxa8E5j6WpGuJKoVRGKn2eMAx40W2xftwPd8cxICXaq46huZw\nkYrSXQjrVS/LPmpSvc5/Vj5+N4VG+j4D2TRvZCEwUSGrT4Q4qqm8UgeRlm2d\nKQPzXwkpZwvu2+huY/AvSwxDnEYe88qfRjLOQjCzcbImYTb9bLaJpNtmres7\nR1iksYwfrSeKS+jFjB6ZphKgfDtfI5XMfQBXoPH6AK6Oax5bqSPGJj3O8IC/\nddcUBjevp8AxN0IIM1VBu30tIj/JGMOJGOO3XMgZSM9vZKr/3EIivf5BMdNk\nB+ker0CBjTfBFj8ZvO+gwUryF44M/ngmr44p8wYq7QNJ/AT3iM++uB7X3tPi\nQUb4eFQ7F2p2Mrfa7dHhxzBvwTzcl988K6kORGJLc4F+6NDz/svuUaTKXykq\npXzt\r\n=0Pb8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2e2b3826637dfd44ba462e03bf4e8e46a4381d90","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-24T06:45:30.252Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.16-repo-sync-jellyfish-config-default-2e2b3826637dfd44ba462e03bf4e8e46a4381d90_1637736485202_0.30544427623677506","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.16":{"name":"@balena/jellyfish-client-sdk","version":"7.0.16","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.16","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7a7dd93a387022651afcb77be426ebc68109c9ed","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.16.tgz","fileCount":31,"integrity":"sha512-YnZBH501hR/PSiK8wCEl2haxtzzvgeEHtWbR21P8GZmeemb9yFqYCSk6P8fP3VDigYuXUp/KUjKhTr6BVA0Wvg==","signatures":[{"sig":"MEQCIDmwzkCrJaosMSlQx0isA9/Qh7KBJcxBDbakekh2dvxFAiASm82PpHXWaRyNuUNW4Pg76lCPzoTjP44agglCfEz5Ww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnjZhCRA9TVsSAnZWagAAiawP/19kjdzKwNldwuhXAJNu\nxKA0Eb22yfgc8ok7nE1Fh+ra0qGxTPpa5k+fOImHqdhcoqo0WCX5MC7fkGjN\nI0nfXtwf/GvkPbV7P/Ytg52ADdSLhqVFtemZVLMK7ofBPStArfkc6/6O477P\nWnU1b4uWFZ9pRT4wVNXW3ahfN+QqM45d6vdupR+yeIasISguoLeLmbvWnyBJ\nIL9eV/HQ/tIPqMIiyoGKxWSIz2gT0CIiyeQMxxdKF5t12lKOQ8cSBMzXUckx\nY5nEj9G1GNfbpAafI3sxciVNlnjjmHcGTU8cFmQT8H8bF/HUiSrVu7LqZ0pv\nRTUfi/hEZqTMTevEoZ8VjWhEKBkPu36yj1eejJFi2bM3+pApS0AQYeJ5C4XB\n69cVINUzyhw3gSXwh6WuiSl/ikV6LPHFjsD4QvyuO/aaD/JP8BjEIwbF4FR9\nc0X1pE5nqtnrferoeWtFwqEoLFbLmZRmjK/F/QZbvqTu1yfvdcjYhy6tghHe\nAyf+4KJ7llYdqzoG3RDOtZjaL2RFGk4ozsnGjHcW1+cjPoohnknVJrSmPWIU\nTZ/p2X8i9jsXi7nuXXhS8THS1X/W+/NRn5xuQYwNLA8Z6CLNL0adB6hpvTRl\nQsLDIQ1nLAYbX6dDW8HYYXilp+Q4w+UGpTJWZPFKOeixxK6ZoiBi0TRCQsPl\n2i+g\r\n=mNA/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d9f59d00410884a3f5c18dac8e94c55227878a18","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-24T12:54:01.857Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.16_1637758561595_0.24002121706754243","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.17-renovate-typescript-4-x-35173c9224ba65f496f550c52c8eb07201a5c756":{"name":"@balena/jellyfish-client-sdk","version":"7.0.17-renovate-typescript-4-x-35173c9224ba65f496f550c52c8eb07201a5c756","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.17-renovate-typescript-4-x-35173c9224ba65f496f550c52c8eb07201a5c756","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0cde125737e5b97f2b69674b7013efe36fe74d82","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.17-renovate-typescript-4-x-35173c9224ba65f496f550c52c8eb07201a5c756.tgz","fileCount":31,"integrity":"sha512-9NUDX1jl2jHyJSshAkHBIcdyRFCAlVcdMiLhjFhRERnJTGhkPtbhyO4QQzC2zzDT7X4TQVK1oHmyWoEBvAfkEA==","signatures":[{"sig":"MEYCIQCfEjP646834NI8saTQi7i2LyZNBtxikPReSk0LYxDLQAIhAN7DY9XZQX/v1RG2UKAmm9J1TEPFSBcLBGFJNylOUCrd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnje5CRA9TVsSAnZWagAADAEQAIEQ6Chs27+7eyzx2bOd\nVU+4Sg1t+KsyFv/U43CtXPUC7n9xOTsDEa4gV1KwkOKeuvrAP+hPDm93kSTT\nkYo8fsY/BnXnctyGqVABf5M8gMn0MUtFJp4PA4bF/mUIlbLnKCFTxs3GLtq/\nQdSCWu6nOy9q/z/cesuid/tc9AsDLLK6zu6YS88XvYXacUTwc9cSC2k9t6/C\nfRNOyP+ZShrYKk+KL5+bBXE4OWoyr4FtFtyQOasmGwKA8q8WRDDOrBD/OYQP\ngQGEimUqSl+V0l1MfUtJ2dl7jtH1M2NOFxFfv7s27qFb2UucllwYgSrAhHBF\nYh6+BxENGhJaxcPrtsGVzj/apB3pf4DYzj1RUVFXlGeVG74GDBp7i+Xj6Eyp\n7JxnzoxlpfHXDh3Hua21LOU7tl7f3RIbOL1jggYX0SJ220MwV5KLheroXEbq\nP0AoNmTeIc0v5U7vkOPPWlWKTpyKqvoJnjzGy/J61vALPNAUvHyH+3Yu59Yn\nt1gqMIMFB998tTeOSP/5ELzcsrpRCmq9gvH+xANFho1HNvR7qWtaHTKBLdJ3\nhmTSoeaCOSMjpnntv8heuKo+8FYDMEVHT94X5V1fgW99GV5Wsk3qTegsz5sE\n+mb5PNOKpgQ6Hl8W44TmLcNcZ3Qp0rkL0b72VJ+1vXlrX1WYt2lpcGweqg3D\nUSmO\r\n=n8ft\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"35173c9224ba65f496f550c52c8eb07201a5c756","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && npm run check && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","check":"jellycheck","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-24T12:58:40.141Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@balena/jellycheck":"^1.0.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.17-renovate-typescript-4-x-35173c9224ba65f496f550c52c8eb07201a5c756_1637758905160_0.7395933765073421","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.17-joshbwlng-remove-jellycheck-42eed20ae61e8e123a6963afba31f8ee21f5ae39":{"name":"@balena/jellyfish-client-sdk","version":"7.0.17-joshbwlng-remove-jellycheck-42eed20ae61e8e123a6963afba31f8ee21f5ae39","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.17-joshbwlng-remove-jellycheck-42eed20ae61e8e123a6963afba31f8ee21f5ae39","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ab49798acd42c9fcf85d960438efa97421d28894","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.17-joshbwlng-remove-jellycheck-42eed20ae61e8e123a6963afba31f8ee21f5ae39.tgz","fileCount":31,"integrity":"sha512-pjHJjIlVakZfFS/PGvI4c20sfDLs22C58dcY8hov0jIG71Cx07GHZa7AKxOR8GNgx9rEeTDh4YuKYHJIlNe2AQ==","signatures":[{"sig":"MEYCIQDd2nLa4c1taCiz46knv8RXTv1SNoha7miMs40WbD4UZgIhAJQfR7CmHqMa6UO00wCNdDvCnN+j+rRS+UsSIjARMlJp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnvFFCRA9TVsSAnZWagAADg0P/1ntvBSrFHbXsq956aAX\nAAAq+VEjUfzYRs7ZjnDRdehMEzwIjDzvICtnNc4uwtlsaVi3wjcFbUnMAeVA\n5Jp3Ro39fe25b8Am/iYo/tGau/B5iuIwe7RwPsWuyh/RN1fK7ZfV3TYUgoPy\nRupLds/2g91Fzv2QDWecB9Mee/MuXiQ8WeOLAU69vGfIqVOJO1xLVNSV8W1a\nqthOgi+s1gk1QdpW6Ohj+Dat8PdKTd7elR8HYoEsJRPS3ZcOYXMNEHtxIt5/\nP7/jwYLOvo6PwZkds3pnWKpvWOMunMtU+SR+9Y/StmVBUg5mMOSvn3sroHGT\nb7gP2uM0fE6ccEU7DV2hJfQSDjadkFwpiUz7l4AyN4lnuISGAuhoYN35VrCj\nilP4oBUkXXprruDJFpLmS2/KcPJQIsFKe8O+QeQO/Oqg8rNjs4cd7OvG1l6i\nqmS/SRhoH6mhAhB/Vr4tlGE5wchu20ayHQj+owIePfSC1qRoOsI3NqdNPP1R\nO9Ijho+fgJ1pNYuFjV0cH1sH+BbpUv4G1fa9R5YeJt5n/5q4cq76dxlSuUgx\nxOe1i4gWhaOzyqPbsfjn92M0XO2la/yXbIluXdvttoio4JiEfmDzcSZLUqcy\nSGkD5gsiuiuqjYqRmOJNITpR+r4XfyN220wM1JE1l4fphrbKHkPZS1S3zlfs\nqtAq\r\n=2DMi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"42eed20ae61e8e123a6963afba31f8ee21f5ae39","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-25T02:10:34.144Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.17-joshbwlng-remove-jellycheck-42eed20ae61e8e123a6963afba31f8ee21f5ae39_1637806405371_0.6978872979265185","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.17":{"name":"@balena/jellyfish-client-sdk","version":"7.0.17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.17","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c58ffa2931c37133d76c7105dda2d9203ccc548","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.17.tgz","fileCount":31,"integrity":"sha512-i2OaWl5cRmMWKRJp+yo5WLI4yJ5BS5xn0aULk1kUvg1e3PsFUOk0X2T+MnNcdgZfYDhJvFKa0E75TsRuRXDV1w==","signatures":[{"sig":"MEUCIGPEQcHvTKHPzDZhBHC08h3vt5u4crp8wOZES0a7OJh2AiEAj8kImbSCJrjsrGqj5VEjwPgsqT6oS4zOSUZDFiMrgXk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268378,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnvIjCRA9TVsSAnZWagAAXLYP/1FgWt2Y/KK/NKUDiekv\nQIDDwdsYwi4fpPsf1BZFriNWDCCKjVqSWLqYVHALbTjam5BlYTF02GnpmIHo\nBpFcQKe3tBovf7awo4UrRqOL+MSGPrqHKU0bINyzv02tUh7IUTSO+KBC9rpE\nYTeaEbDXAho6j97LW1UJpLjlMzynMqgVneLqNWZqVcDwqeYJzMCNdxPrlARX\n+VsdCNR2QLon8zeE1o0HrPpaUQeeJS3WLglZcnqTWDHAvDcKrMd6FZfPNHxT\nIliiDpj5OXMLEp8ONvf6W+QpKRVyB3Qm90gmEcowr5czphth8t01qr6XM357\nE2ZXHMvvhAs5iLPpZW0GoW+OypyZXcJlWx02bH7YVQyn2OiZsOGV2Dgh3Six\ni6dasSM5FIzRTj2Ec+nakBxMJn+OKOgTE09DCa3GLAQ09MgBUTnMtx/3yZ9l\nIIlw+FX1yDqGu250pQe9u0ZHoEXjQq/1reVod7DNJxLZeQUXK0ZgYmEWgd2h\n6UCUr9vphFXbruZlwKFgnYrPXe/6C0IG5gQE/tNp5rKO6oXAoD/QAyLqpU+0\nb0PHme8GPHvlIf11gw2vwGFCyJpAhWkzC886Sh9tJVCDXXA5a7LhmZniuGoW\nrB/sela6PHbrXUCF9cwmfJR8CiKZkrX3Mtdi9RCsilAF0TwZ1yPTujODlRNP\n75oK\r\n=MIqT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c3ffc923ee876c81bfab229ff1b86ea00a0de300","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-25T02:15:07.031Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.3.5","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.17_1637806626833_0.9876576341250252","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.18-renovate-typescript-4-x-0bedd14c9cdb4360c011298395b83e67c376e1da":{"name":"@balena/jellyfish-client-sdk","version":"7.0.18-renovate-typescript-4-x-0bedd14c9cdb4360c011298395b83e67c376e1da","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.18-renovate-typescript-4-x-0bedd14c9cdb4360c011298395b83e67c376e1da","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a1a2e9ae881a9c5b1cb6d2464a271cd68e994bb7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.18-renovate-typescript-4-x-0bedd14c9cdb4360c011298395b83e67c376e1da.tgz","fileCount":31,"integrity":"sha512-du4kftlSecHob3eMsCko+VPyoO4s9ocl8E64QkA/LMEMBTuSBdzoKldrlhD4P5HnzBxVspBYxs9uWF6qZ4vjng==","signatures":[{"sig":"MEUCIFr835/WMZkzt0nRIVGh1/qudjU2wl6G+14brkMPN2lwAiEA36CYEwbn1+Vwb2+ETMiJn8wPOMbATMquudj/CfRDITg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhn0eNCRA9TVsSAnZWagAAtvUQAKLeg15p0c6YK25X8AvX\nhj2YOQuWPNqJzpYSHSUH5+sEg4vgLb4yqM/pVAdWP8/y1IQMqSneTC+sUqEE\nI5E6dr4dF+egK3ZsTwVH+gi/oUeKixlymrUAaI4AS8s9u2u+b6fKdOzkcXzT\nJpU5cDfQbVKpnAnbDU/tcRX+lNSgoRQaF6hCr0aD0nUlu8vShKzmT4L/GW90\ngkVO2U/3vOzagJILtJ1Kg3pHP50NwC8AWM+JXM720tXWYXDPcFO5Wks3k6NE\noEVxNRBDsQ9IHe+BwnAEA1L4Ph2lbXZvXabeg0soiKYQ5PO4P7TKqkPqiFKW\nkw5c3qDSjCXqR3kW1rct4jktUZUllpWuJQznjYTHlLJ5wWDFicFv+tL9593Z\nVrc8NVG0QfMLy9NJykDTNvLFF4Bw2BBi7/tDeBDybmYowQyUkumgBJRJszKT\n+5gc/RtaTD4xO5kprENIm5Vmkgq0pcxkYuOM3+I40pW/7yvSrqd/HHWmbcrG\ndqS0Vqal3fiO6Q0CZYIYlrDWi5Uco/+R0AlXp0qbzsiE7Wwc5/1duuA/BY07\nOegSDGVEr9ghIP/UDIaDXi5IEC4KywsxiKxUprKP/2WZV0HNtlOh4qEDbMcr\nni9pHvz3AtFadRPATaFeZ9AXZS6Xwqhy+0QZKcM8C/jne74C/at1mxFodYlM\nHxl9\r\n=guuq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0bedd14c9cdb4360c011298395b83e67c376e1da","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-25T08:19:10.901Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.18-renovate-typescript-4-x-0bedd14c9cdb4360c011298395b83e67c376e1da_1637828492949_0.3696027496899874","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.18":{"name":"@balena/jellyfish-client-sdk","version":"7.0.18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.18","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4d697cb0e92f572ab39bbc48844448e2de5c2703","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.18.tgz","fileCount":31,"integrity":"sha512-v5yQIrXUpW85U3/uVgiVPlATHutggVP5xbkBxSa5rYy4iBN30QsWR2fK2MU7jXUhbll33a16kqN3TM7QkNU8+w==","signatures":[{"sig":"MEYCIQCjzhrkAUFfy7K4YzeStJ30LRGffBbAKjK2GGPlDcI6YwIhAMeaiTHkOg4yBMMLzsAFGFi4EOvzOwa476Ntdx/tV3q9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoDQ5CRA9TVsSAnZWagAAwGYP/0q4F9dQuO9xMFz/tHE6\nAeU6go9AeQr5247JQUWzef759Ewfu94oNTLfoE6dfF59QCIAGlWR1U+wMb6C\nlDn24EHQGDlIIHYDsDw67bZw7nmvgkOQ+MH5t4eXMcb4Z4iyNR57dHSFsEOx\nI+gtNzeHyMVxMTI2A7tqqUTiiJpF2BnUc14Vdw+QzAKsyBhZ6CViRyPKMtJW\nIw/2N+GeegtaCXeffOVlqYCTSLjai1zYeMhqQ24rPG+ni9oN4uJRnkITHvue\n21j3sB8w6wt1M8r7K1wF0ttrxZwtbboKpnFE9r7gRQcOJiX47TX0RchtxKGm\nNPH+iPewMQInLJEdSalYm1h8ZU/BIAR5BbqlGj279sVZuE+OjPjRcIyTpugB\nW6vq5uua8kn5MzIl1xQYbUsIvsriOMVqtPWQO7HlwUQQJXfgQOIlxW4T4U61\nsprceHvvCJB3qAQVwDF6GgOv0VQabuYmgmfcgPnHvVdzmizGGDlqbdyt+2KV\nN9EIsyHXJ3l13yqKQS+GwV+zOSXIREXdtqaz06lNTs8uuMKEue29Ob0eBUA4\n9uAGSZY+3K6HZTeQr6bp2MV2PerYlp6rLFnq4+Qcszpx31mTVRRj0/pp9PYd\nLgNYzRsvcKX5LsgGAIl6Bxlkgj1p/IakyhKiz5hRP4wTQh5wxM0zUqvPN8RC\nmKGx\r\n=hlnY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b7be01b90fb5ad8f5a961a7a0e981d405389cff2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-26T01:08:33.016Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.18_1637889081195_0.8228644810820462","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.19-joshbwlng-use-renovate-config-a1eaba76a0c2e5750be103b6267379c5c8c7eb89":{"name":"@balena/jellyfish-client-sdk","version":"7.0.19-joshbwlng-use-renovate-config-a1eaba76a0c2e5750be103b6267379c5c8c7eb89","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.19-joshbwlng-use-renovate-config-a1eaba76a0c2e5750be103b6267379c5c8c7eb89","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ee44ef5886562610742b16f82714373bf94330c9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.19-joshbwlng-use-renovate-config-a1eaba76a0c2e5750be103b6267379c5c8c7eb89.tgz","fileCount":31,"integrity":"sha512-Ev0ASk5UuEBEHjO396FJyp9TkyxFWlsouBsLAa3xQN/gX40WZSI/ITpFT3H7fhWVWy1bjEoxDkjl+nH+8uD27Q==","signatures":[{"sig":"MEUCIQD2Vf6V5tXSYv0S0fUGVRtwfS6+ucu8wwSK6iW916IwOwIgfh0OqTcfCMH6pY0GDS1n6jp0l0Isg48X01q0NKg4RIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoGg7CRA9TVsSAnZWagAA2XwP/jLop0J8V6i44sK3BS0H\nnkfOYh2eCuqm6NQZkoXZ120iWOrbDvkfBUZbNYhxM89kGB4AIq/XM5D1E/Ez\nKbV8iiPC6n42s3pxOBJA9BHBgF/Ir6aLHMot2hn5B1CoWNet7hnjEljt4Xkq\nZL7goVgDlUeo8JGiAYDJxQA+GA2SohXT9rHXxoistH+G5KAY3oPeuR3dfFfu\ntWm4KG1XY1G0MYXkG3USWwUNTd2R5hEXPa0YY1v04xwghLBXY1UTpkL0Pb6y\ntcwVCWAJVSl6F3jqSpjXFk+kKTQaHvojZ5q5T7lvwGa7uJ2LfwzYxa2GkpjV\nKkc1zMmyD4BQSL/hgnlC1hs1BdaiHjSKy/cp8cdqNAcwmZZTtAJ1xHaLX8MU\npr7nSStdMeFpNMXAdgvwqDoIVleeVJXcD0kXtO6Et2dLmLgI7jdjAgX6jSIl\n+YWyWPmmR6jCQAFnImr55bDiyZ3rUCGZU06p0bbcWNnMu+nKByesSy7tX3eR\nuuwIOdWPALmOU9R97D2KloaFAZwWzRe4n/OOvP6Ho6zx++JJlGnCZeKI62Un\njMitQjDMOI3nTDxTd7+z0hBBgTGnQQ9IPGVMZbzNtpsUNtl6Hxve5Y/d9agK\nvvD9QMxD/KQdtI76+YW11fm+aj0uWqAW2R9FUKQhcXB64X4sIbzg3OObOwkn\nNwIf\r\n=RO+8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a1eaba76a0c2e5750be103b6267379c5c8c7eb89","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-26T04:50:42.061Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.19-joshbwlng-use-renovate-config-a1eaba76a0c2e5750be103b6267379c5c8c7eb89_1637902395505_0.3665011501690716","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.19":{"name":"@balena/jellyfish-client-sdk","version":"7.0.19","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.19","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bee1367f3a98f4b87c2b7c4c5d183e7d9596ca64","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.19.tgz","fileCount":31,"integrity":"sha512-XiO/KpgeLaDRf/yr3ZQwscL74A1PB749dcoFEtWad4kOO8gw2pKItYDn6hYcm5Pfiu3EBPhIL4YgcSExM2JTHw==","signatures":[{"sig":"MEUCIAtYjQoeBVW4uxUOTJ1T7KQAFs9mEmXM+qhJpMiOOOfIAiEA4cKCwL3lCD3FUnvVFuR1cRDLpY8usPt13PShHbpi1P0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268539,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoGjyCRA9TVsSAnZWagAAyZ0P/Ag9T4LL6ddUqrOjOJN/\nO5D05kzVN4NTk+BMtbPyJIy2V3N1MlKvOZQctayjZQfInN9dh+2wr8aOgGqB\n4nTyJCJI//hnFj0nneugMFIY1/1626Pm4ooa7/T4o1vWXxxzdfRquKyYgK3o\nTD55ASp0EN5OFWAf0KfecqMhZKBv2Z1HOP6Liyj07Nlv36H20dArUEAeigy1\nOxSF6LY9LsDxmhCsUJtDe/Y1hYyJ7pl+FUF9RB4M2nod3zHRGKZ/L5sZHzRW\nrpLn/WrfCwqO/r9uu1tleThkvGsvC+QWOW0scvl3JcQJC16ecJyO63apw0bU\n4yVRGbk7LQRb7P+2zJdqNCjXNRxxFz9TyZI4RQSu2zLcUOW1LAwpn1gWVrwG\n6QkCmdb2yr+kodS32Ey5Qbtsin0IAyRoOYVEj2kUbREHWJp1bOHnzHKLV+9d\nclSkj3VSYg9cZOyY5P2uv0rSsfRcGfQWgN+HhV20zql29eKJky1w48bwyFnL\ncdmRCqGV/91aWe/BLITUIXVXew8zJssdiboPvEU+c7L/2XpUVSEaBM+TBgEH\n0s35uebqa3lbJiKUs/VJ3DkkOm2x88CJalHv0GJL0/RGi4KOMzkggR+N2TMX\nY52XnZgzjvb7+O6PYUzgifycqK41JSHH31tovfPl2mb9c63T1uNCbrZY09uS\nq55i\r\n=RGPf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1b7e8aea9f1d497913836a6856a3cff000fb2dbd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-26T04:54:31.237Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.19_1637902578203_0.6266250914004705","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.20-renovate-balena-jellyfish-config-2-x-eab4089b6aa97c87467b650ef6c96bdf003cea07":{"name":"@balena/jellyfish-client-sdk","version":"7.0.20-renovate-balena-jellyfish-config-2-x-eab4089b6aa97c87467b650ef6c96bdf003cea07","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.20-renovate-balena-jellyfish-config-2-x-eab4089b6aa97c87467b650ef6c96bdf003cea07","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bfdea901c91e75f33fef1035a2271e638f040a10","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.20-renovate-balena-jellyfish-config-2-x-eab4089b6aa97c87467b650ef6c96bdf003cea07.tgz","fileCount":31,"integrity":"sha512-d7KoPHAQNKu7/4h4HLhx+ZiX9JAYgzCjKCw26nSQO7l9kfKJj6GYqcboajPmiv1ME02AqRBWPvMPeaetJiqQig==","signatures":[{"sig":"MEQCIEcxvgQyM7OZxeS2hbFGmYUu/0uCEOu6UwXNHo2+rD0+AiA8+1bP8bPxsn6y8Mphkpqod7cPdp6pq0zWgAVF59ImBw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoMEDCRA9TVsSAnZWagAAonkQAJ4Ch3cc22T8jDswT7cG\nkkQqoYnBHS/1GH4kCdOYGTopAhaOoMDILdL9uqR+TsATEWeUGLsh4yhOZZkG\ngMNwLlT9k2pyOrH6MwXpYB58g5z4Az3RE6wKDNX+HGRM5KaNzs+HMnhtmEXG\nzUX1E5Pt4hxELDlnleBneaNL+bl338tLrlaiGD06F46paWcapieluJKi5k0Y\nGVGwoS1Y2+zDCJ42AOwoA+hxBOL4oNUUxAqTX+4Ko/DbNTje/v5ADxG8347O\nE/VBG8TO9agO+eYmZa/XlSRuWex2d+YABnrIIhYpTNhLdceTVQTiphZEyNtT\n6DVBgyMZW2KXu0b8jIAtEEOi/tkQmgBiSgPtzjQt+oZrIdDp2jok+06dZLBb\nfKpM0f8gPf/MYdhSNFEp+q3mqXWe1WfIkaTtwHqlR4GpxKw9e52Z+2Ihz8Fy\nPZfY+bqqrM9RKZZbkMcuUbubqKrhgTS9bRmuL8OSkAz9LjWt5WqATPYbsTwP\nwEEgffftwcueENcbZ4nJRvWgHKQt2SdgwNKXqkckX8IiBKAoxXhFIndY7wCC\nkdGrFLIFr8/q3nRZoFRvhoXdDoPxBJuqBm3F5gIw+U14zHze+SE7Ji4cfLGK\npuAewQEfBtKUJVBRBGB+vYMzJQUoWzcTkCvv10i2umlWZ1EcSlp0QvONk9qt\nF7Pj\r\n=xdKi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"eab4089b6aa97c87467b650ef6c96bdf003cea07","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-26T11:09:01.244Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.1.1","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.0"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.20-renovate-balena-jellyfish-config-2-x-eab4089b6aa97c87467b650ef6c96bdf003cea07_1637925123367_0.10209430067624892","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.20-renovate-balena-lint-6-x-2ef6f04056b6a123cf7e878c3e8863b1a7efeda8":{"name":"@balena/jellyfish-client-sdk","version":"7.0.20-renovate-balena-lint-6-x-2ef6f04056b6a123cf7e878c3e8863b1a7efeda8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.20-renovate-balena-lint-6-x-2ef6f04056b6a123cf7e878c3e8863b1a7efeda8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6bd13f4f6d634e4d40cde05c26bcaf67aa905fc2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.20-renovate-balena-lint-6-x-2ef6f04056b6a123cf7e878c3e8863b1a7efeda8.tgz","fileCount":31,"integrity":"sha512-yWEmY2KZIOsVKvsZOM4h9gLom3zrH+wV8/cFEqZinEWVnbDW9UMX5/lYfM/2S9Vl8KSAv0Il4dhcx/jjbb6Hgw==","signatures":[{"sig":"MEYCIQClkb4+DhT68MqRIafmmHLxhPcy/jeizfy9MmFxhsx9BgIhALYIaan6J1qrvc3F6hjvUwvuBZb2r4SBDewIoWxIIjc/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoSPJCRA9TVsSAnZWagAA+WAP+QG+co0w9V+qBWgay+LE\niaEZeVfkNHdjDridVAGWPBC5eiSlrnM84Db2iZrcYSN6vuGu1Hi4jiLJBqH9\nPGZcKwp7xhf7I9q5neB8J4tgCfr80zjo9iJOnqQcr/9WpWWoslKMy5yiceNq\nTHkl7Qw/RyTMK5q6TKzJB7+GZkP6QPqlEkYunSArFoQp55XfvQDBPNfUzRUL\nOe+JOge6FXAUz7u8GF74tLetGIknrNwgfEs2fPp9+7OYGrf4U4xq0LvRyvh/\nTJlSUQlpb7N9Sd+XxfMzzqOaXapFw4TXk2gOTigArsY7VGctijlYpYT79cLD\npeUd8R4IfbOg8RfFR8Rjrca+eGArRUrThLhbdNqVUDFWGaS7v+D9u8GHQV9d\nLsnuW6TAo7lBRvn6EatDNdf7GRyK0947/z/NRcMzhzjQ+FB8Tw1PCUx5wQ02\nkLGTz3Ner2ZQ2+zSvTfcF5VlEPdvdGMIAzhQXM62GxnQgDg5QaSpGRZYpaak\n50aoEiJ2bbgmAJxqjTJn/buwAPvUSd9mmf1Ypizzfhgx0tcBR9CwzQRglE5N\nN7d+3ZNkbPlvQwqRTNsEkogd1FUu1qw+rrgwxHfFb+ypmFPxMAyZAHx7TkUv\nxhlqmHbsSmtLEOU69s5R4iKzBbwvK3xssZZJe3sX4CtofNsWEsMFYFwvUo85\nXpya\r\n=gFq5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2ef6f04056b6a123cf7e878c3e8863b1a7efeda8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-26T18:08:49.984Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.20-renovate-balena-lint-6-x-2ef6f04056b6a123cf7e878c3e8863b1a7efeda8_1637950409154_0.23418246387558916","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.20":{"name":"@balena/jellyfish-client-sdk","version":"7.0.20","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.20","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d5b13822b85e2aaab167e7e571d715e091fca419","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.20.tgz","fileCount":31,"integrity":"sha512-pNfUkDnBtv9uKUVYMtpY5DQzcTzEnc2DeNudwEQ27ICZ95ew/eoC6d5vRoYyvCld6RqQeAG/FZAdZpqglKPdTw==","signatures":[{"sig":"MEQCIBkV9xJkR3Uk4FiQYGQ+NQoWE6pSesSgzmp1JLzdl2tYAiAl4DvRvtVY0mo+7+/vPeC1fRK01TlvZHoxLko7j+9IVw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoSS0CRA9TVsSAnZWagAAFT8P/0Go71BUVFbucfWJD8FS\nhJ9aXOIglbcDt7F4h5aKzn+2EoQCMz4ZGP6if5MYr35/fiuOKtr95TovTxYO\nDfGRkb1Ce1a2T24Dup351NTUlbtFzdxRjw6kUvAx5Znrzf2xeGKVuJ9iFx7j\naPaiAF+Jun3rXs4rQqbVsZI8FSvU5Ygcf6CKBcd7D93l1BjqB40g1/Ply4Gh\nX/WtbHbi35F8plMNgsepgJJhOCDTGBr3bnxD0IIjvKaNkW76AKlq+LBg9ACi\nEjHU0ig67/Qxbjx1esRVZzKsT+eb/lXKogyDPCZSCy02yaN8BJjadEy7A9WJ\nJRsyYbqHF5iyvvxFjxuAheCrP67f+U1dCh+dwEwVK4zwY48dLoshEF52TmxE\nLzE48VgN6XDC+ceMsCK48YktUdcrpCbpRZUBYucFrut+gZThINwOQYrKlA2M\neVqs6Cncn/90wThUlm14j32KiGY8QncFuVDoFW8xobky07R1wd1nhq6M0Y4G\n39V4r+8GCLjGG7GfQ3WW7sNQNdTZXeV5I7lKdjuaJZIsot6wMOus5yLAI9Kt\nkxitwxwBnF6nipLf+W5bm8qpcYreuCCsfqiih9RaOKn7WZ9sSV4a0KpJNOoj\nn3qPZ89ZSHqvcDeo529fLhnM9Je7zLzYAPYs0d6sH2oqM2D/9M3fkTgs7uij\nxkwL\r\n=73hw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e13823b6892a0901c6d713e4a3b51bf36cb727ba","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-26T18:14:53.076Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^1.5.10"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.20_1637950644394_0.7358085302398585","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.21-renovate-balena-jellyfish-config-2-x-02e1ca88e56859350e56e18bc29d580f3822fb87":{"name":"@balena/jellyfish-client-sdk","version":"7.0.21-renovate-balena-jellyfish-config-2-x-02e1ca88e56859350e56e18bc29d580f3822fb87","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.21-renovate-balena-jellyfish-config-2-x-02e1ca88e56859350e56e18bc29d580f3822fb87","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"334ae01b335766786e328749efc7a3969b4fa2e4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.21-renovate-balena-jellyfish-config-2-x-02e1ca88e56859350e56e18bc29d580f3822fb87.tgz","fileCount":31,"integrity":"sha512-fah7jVYZPhFehCb+8ixI4cShRWEJNb/bozmCoR0vFKIpwPZwYDf0J8JwC2DpD9MkUtPymvsK/tEuCzsHxXsS3g==","signatures":[{"sig":"MEQCIGZHRBA8whnBGciymYlof7z+huMT61pmpCvfhLQCzsa0AiAz9tr2cGkpmFPmh0bz1+zXFc/fomyUw4bWjqn3ouYk0g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoSX1CRA9TVsSAnZWagAAOHQP/jVO8DFvy6VmmWAjkyuM\nGqvHFiAjA42uVDs8gdbDtR7BfrUZeJdNp3tTjmN/GMM5aaNsFwkr3BKA72+2\nnVK2ieWFUzgeMUk5L6K7ns6R0ey3ZG3cWgsRrUvjZMSGJNEfmSq3YIIVtxqI\nWjIaMYhzbCzUEA9Cd9e4rdkdnoCP5CWfwSexNHa8j8aayZjs3Z4GGJNzsPD3\nFMeM3PpjFGHAiszso/YbHvQRRLfREjgf0iCzPganyY6VoBoyokffrmjiah7b\nzLUb/BP4CDu0Yfn+Jj0Du5S5Lk22NurOj0QqZkAiinp9yucb0sK08LgeJQ4i\nZpcpVuLlpP4GypwvNEOcZcNrcVa3r+g0px19++QpTtDfpY9BDehRKqSlYEEV\nLRBjkICWmji7RFuhNxWivzEN836YXY5hpZntISRsv4n6u1e87Jbc1GGZhaga\nBhg4WKgkGvwTS81Bx46PfZzapvyRVSZbq2lhkwkHV3Iz1s8JIyGF8/mENguk\nN1VX5fifR2T8y0+EOvASf7EYA6FDOlX2paOevL3hGUZ9AEE+e6Olup35AyCf\n3GDxsXf1CCKvIyGWLqmdkAs3rraTbRLk4sWmx2KjvU6OseFYx9zB2iNSlCiE\n7hmGhNL7NVU7nnuuRlTDR0d0xqKyJVz/Zqu42D1kmDR88qveM7yK1OfM3hqu\nA3Pq\r\n=a4gY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"02e1ca88e56859350e56e18bc29d580f3822fb87","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-26T18:19:11.376Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.0"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.21-renovate-balena-jellyfish-config-2-x-02e1ca88e56859350e56e18bc29d580f3822fb87_1637950965133_0.9765478052743513","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.21-renovate-balena-jellyfish-config-2-x-9474a06f41972a5c4a701347b1f2e3743974924e":{"name":"@balena/jellyfish-client-sdk","version":"7.0.21-renovate-balena-jellyfish-config-2-x-9474a06f41972a5c4a701347b1f2e3743974924e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.21-renovate-balena-jellyfish-config-2-x-9474a06f41972a5c4a701347b1f2e3743974924e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"104e0325035fbe1c20b8e85b03fd25e88ad0e64a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.21-renovate-balena-jellyfish-config-2-x-9474a06f41972a5c4a701347b1f2e3743974924e.tgz","fileCount":31,"integrity":"sha512-Cpfx7MplxPge7hHROv8II/IG1yJDgdy92lGiA5gjH6pp+EJA2GVcAIL5XCltQcvYt1Xv/S7Fdc/zT2jPAw/W3Q==","signatures":[{"sig":"MEUCIFXrgSQvqxJL4Qov8XgcY1Bp01o1Tv7zbrCa648GGgsAAiEAj5CtuOdB51kcpkhc6WyHyQzFYmUdhgg2bBGQkqJsPO4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoX55CRA9TVsSAnZWagAAS/gP/05DS71DHO89BHHWeNxm\n+kzUfocEYkmEu7ycOemxG2edvWbp3YqCUD/V4C8JlM8xOFVAtHvq7D2Z3d+y\nQGIMoPEUh+dthoxrLEvthieSiITb53Kl++eStL53fFkUM4fG9jcjU7cQ+U+6\nIiibZdSvc6KXmWPIhTr+YLBCx2ujJn37BAf1JOUqPYXPLWvg05/hhYMo1cVQ\nZbQVphYQLm/Mc0lAmj9vPsPVwUhj3AiLDJwDlIbd1tkLJnLNbbrU7U1JBl66\nsPN/Zuqypw3ByRxU8xkTf4xzxZ4J1U+ONScdMsv0iQyuGElMPG6moDA1YuXL\nqLUfmIJJleo59vwedvfwBZK4EYAC8cuTMWQms8S/m3dFF+L9mgs1LCTQsd80\ncCx9OTZM7VPNpq8V3zQcMyevKPhbt2F7ciqEQ/4qAwgbOJISrM6MaSZXPixO\n3yUhG5G1zvT9ELx94BtvDLKHZuQs7It3PacHVY75yHLtf1HnRIbxvf82GRjE\nk1+l3YQdz11FCkrItd/VNVohmIh93qdb4FQMRJvICDHjwOkMFNtegPVT8XdM\nbYl/Qk6QtB1ey7fjDVOFsYWDP+9EG9QqOZsGZOn83jo9qrJsqJAHC7iJ63FZ\nKaeicUo/n7T+hGFoku0/OaXl/UyHxDra+uXoQEPdMheRrvz9S87PJqMWQ/bb\n90BH\r\n=ISkw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9474a06f41972a5c4a701347b1f2e3743974924e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-27T00:36:53.292Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.9","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.21-renovate-balena-jellyfish-config-2-x-9474a06f41972a5c4a701347b1f2e3743974924e_1637973625765_0.5068360805737766","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.21-renovate-external-non-major-5cd252b2fc5e33b8b78f776808a798d6c70b76f3":{"name":"@balena/jellyfish-client-sdk","version":"7.0.21-renovate-external-non-major-5cd252b2fc5e33b8b78f776808a798d6c70b76f3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.21-renovate-external-non-major-5cd252b2fc5e33b8b78f776808a798d6c70b76f3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9d2e45d000d8eeea1a56bee4eaa4db4cbb5978d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.21-renovate-external-non-major-5cd252b2fc5e33b8b78f776808a798d6c70b76f3.tgz","fileCount":31,"integrity":"sha512-vDRlRwPhNcfb7HMGyu7jmvlUYf5lUOQDiNs8/d380sYaJsigW6XecJExzQ9UZsoHApx9Wyq6Fq4GdN38CWb2nQ==","signatures":[{"sig":"MEUCIQD+1+n4khuzWYry8abzkrxXCecmft9ycXK8s/tVe0Nl9gIgBQMOGmF0QkMboY4L29AD0iJCzEiCukjbHJQk3CEsfho=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJho4NrCRA9TVsSAnZWagAABQwP/i56W5xjlTamHV9XUE2Z\nf5CTk1QtGlSDgObLrdo06/2XYT8FB/fu30pZBLgse0vNQHcQ6Chcg5NBLWsX\nP4iUsr8NAO+h8riPh54t/6uDQumrnjbsEnmZtR2crY3gS9jtAMBuH8EgpVIZ\noSC57b7GBbhmjHuFLzXblXRGQ7hRWAPDTJU2XFV+YeTnPGqXYj8yXegujQAI\nMj4qcQoon0JNndUd++hK/DlRkPlt3bb0aNjHea22pyLamvTyRVvy+m9FLyTa\nl4q8j60OUc/hUDkl0I6d0kVY8C7nifO9O//59igjXSAJIaGvsEXXYtQfGda9\nuIBpeQJM0j/3e1z8CrmevzB/sYSmy+IZnvRVS/81r4L2CvNKpDa6D1wSyhOd\neQX0i7BGmPXMoyNfVt+6MVcp902EwoVSSoCLTwxSYOsDUxmZ1OvFCj8jWCuD\nQ4SBJc9+UcI2gNh5q5U458yqN8ofVtIMY9y9t0h3fl9jWJlt/IkUKkKt/Bz1\nKJT/k1IGYDy2wzKVa6dVQHmpDenwL128ArtTpZhg4XC+HUzn7v3n8jB3xj81\nkgVvhoeISjlP9EGrW94tVgw52dkDlJxdFgSdpvQd09xIshy3xqJYT+7nhOZe\n3ykeg1W+4afhIZCqKq13SGxeuV+yR1nlT/yhJvu74zmal0jB6j6uMmc1uaXl\nbeZc\r\n=hF4P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5cd252b2fc5e33b8b78f776808a798d6c70b76f3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-28T13:22:50.233Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.21-renovate-external-non-major-5cd252b2fc5e33b8b78f776808a798d6c70b76f3_1638105962880_0.5955756554715161","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.21":{"name":"@balena/jellyfish-client-sdk","version":"7.0.21","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.21","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"379df056c71d779e01d088581669963fdb650ac4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.21.tgz","fileCount":31,"integrity":"sha512-dGBJATobwUYlT8l7OGvvARqTwa3+MwGiVAPVM5Kfl2LovlAp959qoGqumDc43+rlbkVWzIO/xktnOd7qe1Cgiw==","signatures":[{"sig":"MEUCIGRwYDgwdIQ7ofc6cqwLZn7oj7KH9CxMC0fkV9VJlmkqAiEAxbMRMU76TmZ93v2lomhXI9myQe8RoiHqzp9u96OwX6k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJho4QUCRA9TVsSAnZWagAAZ1gQAInGMFsGctvy11ssbBJB\niluI74JtZxOgVGX7V4eyl3RoFBQnLqeTqZOmtPRWTjEXsK9MknZATVvNFFaW\n6kBfkD0q/iJ2f5WLxTUbnXV7faN20CQ1uf2e4jwEwyMOnehVC7I0fPNUeI6c\n+F8RvYxzsePD7ZSQG8nO9pCtj9Ms0JnRyKZ4Vgi7IllaPjwMkgJYIJ25e2J+\nEbmbK9eYfsN9DEqAzsz2JlIvLh+Y3eluTPPP9FoY9/fWOW2k7/nHzp5F3Jho\nbnkuDAkqz2IXXc2lUpNzG/EmVR+shsnm71T8+285VC2LXTDMh8+WWwIw0C04\nAaXKZ72CyhPG+fpbUXlzTPMCQ0xIi5pxwbu0BpbQR9AYSzgRlG1kDOZmDzmG\ng+uBWmYumCyQ75wRJx/HuizBifxWtm0V33cYtrwpDGGeblLR7KZ/3p4I4vPH\n1FmNP1+2aC0xur8kJgZbBXQF/a30C2sKcmqCiowqIfxlUvLLAuf8NTwgba8N\ntWS621oGSAiSmVl2Xn+Bx7CHN3msRe2c2exjAptFbGLbGn3MeaiISNr9Ra2Z\nQFA0yxJX/ckR/5dUoqP3IF910VyT5AfNt7GE0l4DnodzqK2NSQPlEZvF8UX6\nAgtPO2TXEte8/O2754+hCa2TijrSnmW1SnWObSX+q2ewWBOq0UsAL0nfxw0Z\nql1f\r\n=Y3/f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dc0168ad633cc659c55c558fa4fcd558ec64775d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-11-28T13:26:50.293Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.3.1","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.21_1638106132176_0.7853811061302454","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.22-renovate-external-non-major-af533ebdb98f4b8743b4f6887cde5223a77db174":{"name":"@balena/jellyfish-client-sdk","version":"7.0.22-renovate-external-non-major-af533ebdb98f4b8743b4f6887cde5223a77db174","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.22-renovate-external-non-major-af533ebdb98f4b8743b4f6887cde5223a77db174","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d5607d42c22e662aedd92ef35e110c38708a3fb1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.22-renovate-external-non-major-af533ebdb98f4b8743b4f6887cde5223a77db174.tgz","fileCount":31,"integrity":"sha512-aWfqevdoS+i3MaXtsxywmP56CETy5jM/Ci+c9MGZQiwnrqYCOxE+NbwokJaFCAjk5BmUpTJWWXkb6JZOQU773w==","signatures":[{"sig":"MEUCIQCOQtlEEAE4jvtsMH2Y8HemO4ls5D/4n8jP0BdBiu9tOwIgcuYJ4Jehh1+xnY0RrYS0CmMu6bp4IiPlcP0OinGtTtg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqrIzCRA9TVsSAnZWagAAWGcP/03KPj154hYB53Tx+f4q\nG03Q2IkFA8Kilqa6vK1WnlJQH69q9gu5jGTjhGJIOBWunm9Il+4T2KbX8GWC\nXM+V/8UJArIQSM9W4BZp2sKAJD1o057Vvs1809kMb2LyEyD8ihDyuWwJJ6Qy\nKNojfuOLk1bGGfQfgavuoHXKBtT46dR0ZyJkgkTlRL/mav9ScY2KzkvX075a\nxmAFS5J8AkyuJYvDfdzTBzy47GaiYEx/OFDmSg2z06XnKa0TUuddzuVDKNCI\nZTJ9GOBZGnlsCEi9vfV5CXPjkiP4ycSAGlrUQr7tld7ZUd+/JWF8wp0J465i\nJphTJX4i8IsR0yFDQbJj2qwjsRea1b3fiJOUQPp4wO0MzpfmopkN1053bKnQ\ndou8kJG00Zin+PCXK4EOJS/eB4Jjib5SShkg76DT+WOkO5UcgcnBFxrID/3M\nFnybLTEX+3lqyvLdgPOaRiZDuykI8gddX/k9MjrjNGP4t3RkXyJY2F4oef/9\nSo3zF5XtYoaz7b3FapPENsX+1CdHPiXMLMvyGDOcsz3gHPVprlUtUJa6ZJji\n3gnDprOicPAUq69wrmAA0k/kNsrfkOF/hQ+WI8hR3XUYRkZJMF+YGZyl1IIc\nJN/c6uNfQgNI2vmdLLI4JGQwmbSNqtC/IWAUyAWTPpHnQ8VRZXiTbls4pzUu\nHSZW\r\n=7j0S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"af533ebdb98f4b8743b4f6887cde5223a77db174","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-04T00:08:59.629Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.3","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.22-renovate-external-non-major-af533ebdb98f4b8743b4f6887cde5223a77db174_1638576691222_0.47966898874444364","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.22":{"name":"@balena/jellyfish-client-sdk","version":"7.0.22","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.22","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"784d5a21922e78b7d2dfe42bf9a10bcdc45865ad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.22.tgz","fileCount":31,"integrity":"sha512-MXiUtGOm3nO1PaBMuh7vqSQoTm/S6iOHbFjV0gNry4CWIEr3BPvyFtAlKYRWa0gwYji9josKa/Ujm/Md/FSQ5w==","signatures":[{"sig":"MEUCIQC77HNuOFN7QBAIDFsgLWG2CCUj2Tb31a1w5/jcv4uC0AIgGGGJ2NdFCnlAFIDipR2GkT2A+RnrEigdTXU+4eqzH4M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqrNFCRA9TVsSAnZWagAAlH0QAI3CXZ/Ckf3gO0DlNwS9\neCeEizrAJCMQ/3vulstsMFHbgwBb41hi02/xodj0FppYFsOTm7GsfJOx96SM\n/hrIGC/X1MCP9xWICUx0arvsC7TkTVU7fsq7WKq2A746R13IfVxlMK/wsdHq\n1K7v0sw5U2fwaBXPbFC3ivicflVc63yEzXvm8wjGXkGTB6vbYDJ1PR3bvvwf\nartobzGJlmHAAn+kn6aW0e9oyarQ8KmkQHgr2eY2LLmqs7chDdtHUEtN5b/1\n6jNdmCMuv4SgO5w7MJi/mNdaYC7HabyCIt02xHmts4BMZpkjjOQmrJV/T0y4\nEldD2QPUsFCtPp1EPHws5041jaX5+/L4jr+HX/8x8NcJmcpKrAW8NmT4r+j5\nFGmQerDnsqPcf7Haqj985hMg7Rzp1InJykpuRh3OGelHMUgVgeNkBAo7whMU\nv2mQzLiMoozF+Mi+X7gkDMa++gys5ovyviPwBoiRV9ZtyHPlggUzPeoj4kvx\nIA7RWQbp0qEjI6TlGE0qQyHoIKgeJuDWQf3AzDbz1OOh3kxD9eEcQJfN/um5\nT0AjYI23zN6c/91/teows+rmtoLaClyBiX8tmd4tjpIMwtIoJhl4M90UNIT7\nSn33U12VRPYhBxiSjqWMnGHdChVNpz8dKhoXXtcWL4BcwiVNKXOw/pa4gtcw\n65ES\r\n=HXT8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6e30bce8856667aed537bff20fdc94c5b7856a2a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-04T00:13:26.929Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.3","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.0.7","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.22_1638576965467_0.01719749800312176","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.23-renovate-external-non-major-898a5f55b788614a83ba11215bd056108ae15513":{"name":"@balena/jellyfish-client-sdk","version":"7.0.23-renovate-external-non-major-898a5f55b788614a83ba11215bd056108ae15513","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.23-renovate-external-non-major-898a5f55b788614a83ba11215bd056108ae15513","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"72b36ae6f8e845c8188b0e891c98afb69b10744f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.23-renovate-external-non-major-898a5f55b788614a83ba11215bd056108ae15513.tgz","fileCount":31,"integrity":"sha512-Jj9g3TGO9NvwayRRtmhZ/8Iafrc0hMwHANTG68mUq7NKUPEyC4niifLiQgpjDI48Molc7RpaL08C3KEMKW1EcA==","signatures":[{"sig":"MEUCIFLN4BXhUvauBRglnxLQNr66QuT/CxerYGGEaVWLla5IAiEAnw5GGezfSshL4vzAidk/yTOWymS+EH3ks8ZBJZ4JQ0Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrJeNCRA9TVsSAnZWagAAd/gP/0O2MP1Qt7remdbfjYPh\n0VRtiHZwp1cOsSajFnl8DXY3Xtz0Xd56k4js/OrHGjkOfvmc49WaiPG0uJ/B\n5u88sOOpePIfnwPgYd1o3v/zHWUM15EcD1H9rgIElp11TfmOp23yJ282wirB\n6DAetf/Uxj8nG8Vr56SQKTpNzf1C3w8kR8MTUBD0OcWdOEsP7S4xVb/AWb4H\nnQ++eht/a7sEMiOCNdAgH2TMH3b0ba4ReHDz3bm9QAENTeMNvquhupkXmX7i\nIoOw+aZO/MDzUbogKbIqFrRa956yshnfEc/q4G3UrWbxghwyUWHZrFLtd+Nz\neCSeMfzjpjeSG39+ajW2wCYp4U+nvjMK9qiSlJCiPqvZc7TAKOe++njTsCIP\nH71saPBDp2rj9wJizlq9/8vPMWGsBsumdhgN4BUUA/ZNBudXOTaqz80EUIVI\n/mWCLtypl6SmTG0oTHUZvqjlL0A2vuF+lhEVpsPCN36Icr/ky6GTeWs4QSGV\neHhhq1UDsBqONEcLg8x+H5JSvVNekurlz2SHhVVQ9Umt+GabmfT0m5s5AxUc\ngat0hKuSJo7N43/0U2f0q5J/R2gOJ+4K2eKKvHPUaBoz++SLHcyf/uxwOgzQ\n+dJYOpjLoF3fg67lFTiGrPlC/ltF18wcOPmxDB/P5bbdmpB0+2EnlubU9IkL\n9Mf3\r\n=n5ic\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"898a5f55b788614a83ba11215bd056108ae15513","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-05T10:37:27.447Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.3","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.0","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.23-renovate-external-non-major-898a5f55b788614a83ba11215bd056108ae15513_1638700940901_0.9836472413977333","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.23":{"name":"@balena/jellyfish-client-sdk","version":"7.0.23","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.23","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b4b677834fdf72fb00c6c2288fd5dd7229e679e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.23.tgz","fileCount":31,"integrity":"sha512-IcZJ5dFah1aEQbytMAWFnuI5iYAP7QPMkcUOl48X5HdH8VccbiZvTL7vkyR6Um6AVUFJdsvOJsD/sz3RQXWEMA==","signatures":[{"sig":"MEUCICck+wDNYy+P1ymyezJzr6xVjLcSOtWoMGBvU/EI4YBEAiEAwWnoQR017z4d8c8stAVfeu8KNF8oiWiAb+tWhr9YUGA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrJh+CRA9TVsSAnZWagAA598P/RSHg05JixFu9f+Q5syE\nCM9QyweeCKjEx/hdjx8cEf2Bl4E10/HNII0jQGhD7Oszli9u4J6mAP0l4D2e\nj4S2DtwC8NihyJmh+Fv3rNOIxwN7k5k9oGhWyWCeGdoj87gJmPRCKdA5z+av\nA1YyCLuns4SSLtlfH8YUJNPwKi2OUSk0cHcS6zPw6DCat8euUswXlIVkYrmN\n2jT48ckV7GZjW6QGmiebEQGVUVm/G5cV9F8IG21uChJLtmGctWM1NzuzcwvI\nwnxh+kcWK7YjcoCJ1b/UJ5tfErPngFIyEYJR0Dss59SZ1Pf7zx5+n5mEZiyM\n49gzGAqRrdxkZsirWlsrXrQtAIhc0l9ucbrEeqm+LsSMLr6lWB7vuvpir7kh\nf8gAm5rExN54gZB/m3Pm9rW/0y58kpDQakK233dV70iI3OS61BwhOlxZelL+\nf8UJJr+y4cxTYKufLsR0Q/5MmW6Gwx6YrH540e3LJ7IyLlibHMap7QFsLZeT\nENHeFOYvlYdHWSVFXcR6o8zA2nVNziIbxbxFGheEvpSuIQEstqeruKtLDHe4\nMfyPmBkuR8zdlLqVTVXoh0QesXzlclIIjJu1PJYZrHeSX/kymwlvHX2Tg6yD\n6GfhWUYmbuDeRPZxJKCjgJ6WMHh4Y6RUQXEkYnjJFuYcrhJxbGJL508668Yv\ni9Yi\r\n=sMkp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6ebf51d7b5a6f662d8b77d2d0cea235bab3b71af","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-05T10:44:20.259Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.3","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.0","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.23_1638701182630_0.9642042961092598","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.0-edufschmidt-authentication-tokens-fe5956dd45cc013f385c882fc19731634b4b31ad":{"name":"@balena/jellyfish-client-sdk","version":"8.0.0-edufschmidt-authentication-tokens-fe5956dd45cc013f385c882fc19731634b4b31ad","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.0-edufschmidt-authentication-tokens-fe5956dd45cc013f385c882fc19731634b4b31ad","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"15d2d00ae0d8f43c2243c7a28af0dd1c6fc96a61","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.0-edufschmidt-authentication-tokens-fe5956dd45cc013f385c882fc19731634b4b31ad.tgz","fileCount":31,"integrity":"sha512-ZEugpzOZW3GM/rkhmXADWvC2dFvulztRq3Y3EmtzdW8lO/9Mt+HuKFRz5z84p/4qfvRI7RU5hrb8dMD1sTo0yA==","signatures":[{"sig":"MEUCICrgMi+/QBHQfVSsmENusamuiYjoX1Ql8N+HAtNJbiaoAiEAgV1rQoRqicuIsog2/fQ6510EdKj8O3TOHnmUdtCQys0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":274478,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhr7QGCRA9TVsSAnZWagAACFcP/0Wyd2p1DHMU2sJoqo/j\n58DsVQ5Z3ZrTuY+33PpHtGSWmF44qgnPlu4g+gl1D9RHi/8PoCSL7J10QDiC\n8bSgoKhtTCedM/eywLBjD4AFIFziKenuMl2TRvlC+SLaiRp6ZUqY6Ke8WIML\n362fo511afsZpXU/nz+xDhPktqQr0jN0HTx1R7mpVvwGCYcWi8gKA8Ne8R24\nSbnIR3ELKY13y0VxVo4FuA5jwCDDXhVW2u6lyoBWR8M1cnLtwFMm4N1Z2D3T\ntChNXpj43abwlKHzkHn5tTXVUFE6rhoXnfVDtlpIpfwgw+ZEO78PHFtqKshc\nJkafyw6HOwzDIczqRm+xCISaFav7yHiTfxI71aRTg/rBylk2wHu4bKJuCdkV\nmpR8YODa56h8AaglV8D9ZHLSqp5jDvJ2LkXUSZaSc+iL851x0alizPH/uTzk\n2dG1C1X3fAR5OKS0xvRnZV2ZMKBhjudRhFG+7jX2xLjtk5hLyWSSwokWwdna\nj+hn49hQgrcvz4ZllSvSyegB0EtfHvFeE0JRRBIOa7NZJ4y9F7DWwccVlJQe\nh/0ImIQtKcxN7BZPTvc4JCewfWv/f/1fldqLcpf3Oc5So121wcCXLgbvnvNf\nnMApFyVBz8g+wiltkSDvQUtb2fuIDTpkAZ6YGi1a3eauUsy2DUmMNvhv3NTs\n3Vqa\r\n=auiD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fe5956dd45cc013f385c882fc19731634b4b31ad","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-07T19:18:01.588Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.3","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.0","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.0-edufschmidt-authentication-tokens-fe5956dd45cc013f385c882fc19731634b4b31ad_1638904838257_0.6117767942409473","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.24-renovate-typescript-4-x-bd6d77da04f091557658e0895361cb19711fbdb1":{"name":"@balena/jellyfish-client-sdk","version":"7.0.24-renovate-typescript-4-x-bd6d77da04f091557658e0895361cb19711fbdb1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.24-renovate-typescript-4-x-bd6d77da04f091557658e0895361cb19711fbdb1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1ee945f56303da4190375a7212505f411082683","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.24-renovate-typescript-4-x-bd6d77da04f091557658e0895361cb19711fbdb1.tgz","fileCount":31,"integrity":"sha512-5L1acO2j7Peto/rfxE9M4Rimw2ugKr/q87kpohMOP3ROMSG3dsDw0Yd56Rszm9bmm/845LfXFPt0FDEkuk8iww==","signatures":[{"sig":"MEYCIQDw6QlMNrrX7d3GX11QFtxE/xZjpeO58721gHnpnv3y6AIhAIriKSHBAWyCpWHEEXXnRJxDP7Q6fvJWm2z+czHmL0up","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsop+CRA9TVsSAnZWagAA+8kP/2Pp3ZCF7WFQwfVWxcHU\nVQe7tpTCIwmW5HzM1td9f5xLIpLfozTBylraQKeVAE+fCUAnOek+KUHnssrA\ny9KqmrjfKndBoBgcAvDhbv8bsztmrNXoyFMduyQ7HEOimL9zVgM2roRIgkQH\nELmYp1HCsRppPpFeoe1P4hISeP4ddvZ/IOvhUduNEqxl2iaH2GmSoHgPRafW\nfZmZNRBvwBQChBNdLTg6Vg6tVHeKhaQKwkOSvlhQTHpbyTQJir2l+axd8peH\nR4SuCFS9MGWWQ+6yjEsxIIGL42lqOGDVLfT44dego9lr9A3WqFBbLLZc2EK9\nd+t6qhKHnwJ2QBJMmC58JIaG2kBGQXXsmZ3gVz6PB8J/0sjw7QF3xmXTr+02\nf1Iwys/mxsSEb9eUrjIjEZ8TLkKDPAAoFQhTJ7te8LXCNaP/yaa+SRmWgph7\n3aiY6kzqv2q0R4z+VPocoMJDtUOJYqv22IKWPjopykQQs5Y/5hlKWGGVaML/\nyH5Y0wFk1f9EPMK/1s2CZmkV844PjwcasK+OS3Va0bzL0yc9QL6Ky7v6+6wk\nXMqnw8JiUdLm+FNTqhe8LCuqMLnhlN+H6ivT2cNFBjCUgr5Lf6YxnA/RFH6t\n974ap555Iyj733aK2TGSp8iKS/9dEiBr54D9TCiSqwif7Hduw1ORwTEHPWKS\nY1al\r\n=tuVM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bd6d77da04f091557658e0895361cb19711fbdb1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-09T22:57:33.597Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.3","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.0","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.3","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.24-renovate-typescript-4-x-bd6d77da04f091557658e0895361cb19711fbdb1_1639090813908_0.5842534066643743","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.24":{"name":"@balena/jellyfish-client-sdk","version":"7.0.24","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.24","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"51fedf59370aa711ddd82a1bc1f9ea9934e71b56","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.24.tgz","fileCount":31,"integrity":"sha512-3LhoPGLIwMy9Cl9f4t9HQ8d3FggRWfslPl9vw2K9f2eqQr/2wCeveJmljB82rLC5IkbWcgrBZB+8p1GuqPXPoA==","signatures":[{"sig":"MEYCIQDS1auBgLoD/MKJlFHeekUJYPHucTHB/ebORJJYQWzr0QIhAK9rR/1Muw3SpgryOvOM8xMo9WW3b9QlPkgTsGk6wk1a","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtCrqCRA9TVsSAnZWagAA0rwP/RlJSCTGfJhRpZW6yJkd\nwWZdSW6Z28o7asxUMIjZf19EfUNtH5mg3uEJxqmaz2cVyWJ5sJVtOCyhHfoF\n2UO42JzPTdPTkdgChToM9Dxtti9Tn/62xpQddZkUqkLpXzm+hx3hiT+knb5U\nzFgb7eUWyUNGjDI02NK7z71LFJGoGui6OFZaWletxWamlz5DkPgY16wYLRyb\nPcbt5Jnt4FsYEu0TpdXOdlXWIJ7kH+8AAWv+/W0/eyku/hrhq+IifYsI1Bjx\nFDNliGHRJwTBSCvv78LdLS3rL3BUe9Xw37u79BZdGlxIX2Ban++gArItB+gs\nDruqnmzva9ZcgDKFMSIcjtyTjyj3AoOHiP/L9x/kmHWjIXqkca2aPd1X56Av\nXkeCBCgm5loFQjKO8W03uoo6r2zNPV9QC4D0+negqmxyP+2/auKmCeG2urC0\nUEltsfR63V4TMAEeplXhqnW2SakWwuDzMX2whdw0necIWVx0WPn/pPkfqz5Q\nE5ztVzlzl09Rtq2kA+wUlv328QR9f7XZH1eJU9XEbmor9A47jJ/Gv/Q+SRCG\nTEhfRHekNZwzdozHx+MVXXg18xMjYoaVnFVfsWP7r1biO+aoNVRO8+XKG+Oo\n1oTe23pdkIxatDSfWe5MXkt4oiJjQdVy/KZ9hTi7oD1JSIldSqTfLefWDWej\nCN0x\r\n=Isou\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"444347b6ebb6d392b8fd5b6938c85095a9abc702","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-11T04:35:01.422Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.3","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.0","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.3","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.24_1639197418605_0.03417747755553191","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.25-renovate-external-non-major-77988e21e7c21af93bb88ccc4710beb1cb22c542":{"name":"@balena/jellyfish-client-sdk","version":"7.0.25-renovate-external-non-major-77988e21e7c21af93bb88ccc4710beb1cb22c542","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.25-renovate-external-non-major-77988e21e7c21af93bb88ccc4710beb1cb22c542","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5c10d186df86bb8ea3d324756ccef7194ee713de","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.25-renovate-external-non-major-77988e21e7c21af93bb88ccc4710beb1cb22c542.tgz","fileCount":31,"integrity":"sha512-22Ss5MvYs6IsFLQ2RkeDB3w3XYAUdq0sMOocn7KocITCZw+pUcSZPad7ECbj7jRdvuCl1bZwMrbzvIgVpXWMbw==","signatures":[{"sig":"MEYCIQDRgbSxXXgHBBHQHZkSPw/4o7EfFGT5M46sngCuQPM9kQIhANU2bO50/zH5gTWUZq8L709xZP4cZ0ZoNp7Ojh3+B0T/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtHBTCRA9TVsSAnZWagAApVoP/320nVlDi2yU7lSdFOkj\njluRGqHbjOCzGksvgZdO6nQmml1nfSE/pXyqNrcNjozgO/efdEixkQXva8U3\nq3nZpWgooziwBzBby3/15DkwIRMhBX3JocepPBiJIQcLJm+jTc7IGeFucCF0\now7oEW+5P69ZjFMgp3EqopU2IVJguribpvhp3mpsLY5hXAf2f+a2AVIHXH0p\ntcr3AVa2J/NidJFQG+GW81JXyPL0s2LO3MoizubSaYxyOo2hYO/ep9INfFxa\nuJ8ErzDkaY/hky74hFIyu76/ze9AzJ6mo5nM1IxGKmigra+fedCZvumu55Vd\nZsbOXQbuIP9vo3XIWK9rFU2Nm1Rthtxn90dEpMSrx+N+2OxxbIKkuDQGHz56\nbxuZSOcjP5texkuFz8OtgWvDEOxJWI7Hk+/ARVecL+ck3zeEd8osbD5ABY2i\nhFgq1Xeq5knVVG2/w87BDx60R0PdIyECys1Zi9SsReearbgC2UpEs0Y4SEaa\nr5JKrR/9w5Qfq0RuSb8+IYAMNMFNhPZYEC1S7csDwdzeszjgR7nBWEiwH3+O\nK+WczBudmFNWcuWx3lCtynrjvYPsDBM0f2DbtgG34pUpt4JdIFkP1nsVfx7J\nR7m6OPk295Nd/RCxeC7hkHsPew+TPIhAyVjkF2FYkJxogBhIfGFlSre+UFTl\nznZw\r\n=+Md8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"77988e21e7c21af93bb88ccc4710beb1cb22c542","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-11T09:28:36.584Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.4","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.1","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.3","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.25-renovate-external-non-major-77988e21e7c21af93bb88ccc4710beb1cb22c542_1639215187228_0.7535701534025416","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.25":{"name":"@balena/jellyfish-client-sdk","version":"7.0.25","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.25","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e1f302b4ac998f1b1cce02b4b0e60d1edbc637a3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.25.tgz","fileCount":31,"integrity":"sha512-0ZgH/z5Vb+rKsx5K+MDHqxJjOBV8m/tA0r/tW+aHu8WYewxbvtshPA0KUeX/tY57QY11hCDpwDwg1oADkzfqBg==","signatures":[{"sig":"MEYCIQD4bQc0D2In7oTkgHzHg2yyR47avglcBUELK7g6MPa8XQIhAKGnnSLEJmYluj//QGUk2Y32zq6l6ZOkJ8FPrPJMvGPf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269121,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtHFOCRA9TVsSAnZWagAAD9EP/2Pre2c9rik8IGQ5Iy/a\nhTL7CmST3waFxsxEa8JVZX1cO7Y0t5/z9yVPZZHEVAFTSaLZAQJWo4/ccm+X\n2uoDikVH0p4IKqaT1NjkCNeLhhafy8YcIF0yrqD1rrOlLJQw+l9u9y+YlzK+\nCghWLLLGZgX5oeRev7WlRYWcKa0pMgzdeLc3XABTHRHFYSAkGkvNnbPXok45\n3gzj4cF1QHvW0V6l5DYMGeQdDcKkZn3YPDTOi5q5oVr1imPHvlktw0FJ7GTZ\nXkGdSlHsSXnOdWPtmftMtfFERqeRUl3ea5uo1HwX87SPwA/VgXk1UEo7LHA7\nIjODihca91qI9rquNN3/uFAXBGTBOP4VUZHw3s9forHvaPDgD4dYjT2quiLC\ngnqwSJK6/UU1CP6XnVOS9IEHFJfaV41ZF6W6NoYBUhVNXPEg6fCqN122YBMC\nOk3po2bGC/midLsKRgmp4IpbtiEONkPSs3jdsTLfcve3vSvyFx3xbUY+ABdF\nwCYJFbBK+f5kmSBrCPxb0DFuIV0vD/14U2lxLGyTuDnd1AhWSsyAX7gjQXHf\nLjs0ZMMESRw5KNxTLNYQCZY6wcbcEOK4aItBKX8r37t4ve/F6FhnNjdphnBO\n3jQyqGGWqMrsWgTl61YLXmRKKVeKK7Ag7Qo3DExMfh5HaCdsXroIXub70aHD\n7FVc\r\n=XdO6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a461e07277cd54e0959d6839be6159fe615f66be","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-11T09:35:05.378Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.4","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.1","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.3","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.25_1639215438516_0.0384025675749049","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.26-joshbwlng-drop-depcheck-a2333d99c138c7d2ee243718cc4380d723dc03e3":{"name":"@balena/jellyfish-client-sdk","version":"7.0.26-joshbwlng-drop-depcheck-a2333d99c138c7d2ee243718cc4380d723dc03e3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.26-joshbwlng-drop-depcheck-a2333d99c138c7d2ee243718cc4380d723dc03e3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f90fa6dc19db2adccb21bdb0bd851e9089a7458a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.26-joshbwlng-drop-depcheck-a2333d99c138c7d2ee243718cc4380d723dc03e3.tgz","fileCount":31,"integrity":"sha512-lXN58AFKNw0wxkTgyJJrj1sIiHrlraFGJj7c0l66PnO2j7xKyf6rgC5rGJPN3hzTW2gZAQTnkHU+kxlvnXR4Kg==","signatures":[{"sig":"MEUCIQD4JJtfOu5MtrBpDZk2Jr/Co9/LYJl8AVWjVeVCWheIUgIgJN+d2sdY8tbqAbC+y4m0ACfhM+CWKBL8ktz8228zmxc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269170,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuAUhCRA9TVsSAnZWagAAefYP/0+4kRavWxR8IXw1lCWh\n1AeUJH0wNw38UHhlBGRHFS6Fhrcd8oT8Z9tCPy02/tP5pAvAAX7c5yx6d69f\n7S9bLF8b3o/KORkxFhswguC0cKki6eRyS3ttnPykRi/N+FOekSHZDY9heC3/\noqIkwNMnbj2uGW7LmX5QUYS5As6e1ppBj7w+OIbKm7bpCPIxCR2xfahVSoeI\nAbOPEhUzzqnrX1eTatbyfTpqWR7EB6EcbBpbAtE0HfFk8XYojyio8am9pfrG\ngAn4QvSMae35hziMQ6NJQ2h/XY2A8bP49sK5Afcxjb4VFfd+yQj6J5fvELP+\nkd4GO+/HFM+dDOV0LYIspH/QZbc1lfo/eOP3EroVV2k2H9zlL0iAew55FGNF\nxhIWQcBl0IqBK9GYpTA61hwqctD2AQP+eIgH9BIRkr9hrebYGh5k3wwiTl5L\nefFpk20EaqNiJdipoJmPOOZUFvtjBMqM/tr4Z0xxh6N9Z/MRNtmxWYKOqD/5\nTmJ9E29Vallvm2y77LdTeJvwojbAlSBhXitx2ueFIti0GPOnT88VE+oi7uDf\nXWC4ClbcILURrVSGhUTk/8E9a0PG9XMAjBYYiHwjnvQ9DmBu/ePH6ssHg43E\nPwI6rSEe9pRi4/OEpaDki0sAIC2m82XR/OSk6pUp+4mqz4uQ8EFvJRWxnEpy\nttyB\r\n=Pvuq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a2333d99c138c7d2ee243718cc4380d723dc03e3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-14T02:42:19.958Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.4","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.1","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.26-joshbwlng-drop-depcheck-a2333d99c138c7d2ee243718cc4380d723dc03e3_1639449889022_0.3002324250553392","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.26":{"name":"@balena/jellyfish-client-sdk","version":"7.0.26","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.26","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"77b8fe20fd11f44a9b0fc102fa5ba1c9ae5eb68c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.26.tgz","fileCount":31,"integrity":"sha512-2ufx2aASWSl71V+CnDUQWtA9gOT33FrbLDMKB7lf5JSpDkbPwX2BhMPTIiqXXMiOYDJccgJJyr5urYuz4yqTJA==","signatures":[{"sig":"MEUCIDR1zSe/5ty6O8jbcjhXPabCIGu8Pvd7wftLQdA1vcsjAiEAkI5Cm7lS7DBHfvC0rtw2FmdtZj27K7Gs4iJKlhgOa+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuAXlCRA9TVsSAnZWagAAdI0P/0k6YhbfWPYuhe936xnW\nD7yFQ2OhLDNHOFlKo4Di9AfkYrzDSePrtY1ZQRSEajUeLhNpX+pbtoqcaiMU\nCaNUjHQcWHataQiooCbZ6whcvuzkvbzSBL0xMtVaetrlL+JhBoJKlrfalI29\ncVtP/3vwIWrDG98uKMUeo76xGfLzu/2bP9lPPcHmTh5/nr6ClaRf4KYj0SLY\nOZNrETLnfgdflzKjeuZXepWxZPWuBEKCkmF3F9dlvdX6g3Zqm2g+sM9KWNXO\nhhG9vbL/GwVmchzuNgJ+8HVmFoh/aSTl+IlBNi6WsyYPuzXMkooYWKN9O2rf\nKQm/aNZmjbbfsgP0Wi7aHu3bt2S10Nf6EBebR0ORXaDl+53rydUX+1P0q9IW\nYzL6saL41VFPp6UW+GGWmgW+WWFhJfwTotVaiJ8emAybadV7YGAYAWlpXmlk\nGOAMTMnRZbky/pUxl9XEkI7RDSte6DfrXLdLlLqYRlNggPHB+RHPgvMDxdru\n4wD/l6qoKnY9LrkoNEZIaffLmoUAB66xS4m3TU03fYhykqC+KzKesZnE8mJt\n5x/AOG7wcgXqqRFHpFO2O4TYLpz/Rr4Zdzm1X/3oo7NmVQ3PYzBgo7YfWuEP\nmq+Ao1pMW5fCY9SSxqTXJJqbo4/dNyOohniIjANmIQUAlaFgTw0GzDGoSYZi\n7JHR\r\n=q+0y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8deea82c054185a88862e2935187ad81c255df0d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-14T02:46:05.042Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.4","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.1","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.26_1639450085025_0.36493583862883794","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.0-edufschmidt-authentication-tokens-883f3120c508bbc1d7a1e32fcfaf43fd663b4c18":{"name":"@balena/jellyfish-client-sdk","version":"8.0.0-edufschmidt-authentication-tokens-883f3120c508bbc1d7a1e32fcfaf43fd663b4c18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.0-edufschmidt-authentication-tokens-883f3120c508bbc1d7a1e32fcfaf43fd663b4c18","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5d15ca21f362523cc9b1dbb61f768f2a582374a1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.0-edufschmidt-authentication-tokens-883f3120c508bbc1d7a1e32fcfaf43fd663b4c18.tgz","fileCount":31,"integrity":"sha512-OuqmLBzydPImqxF86ymRLgqDdeJ+zEA2hIgHSHO1VhTF0kCgxpOm3w9KIzmQZW9zl5SsPuxYpYG09aHfpDzIPQ==","signatures":[{"sig":"MEYCIQCwfUk1p8vlCANLbtfAaCYfVouS/+tlCluey/wHSUiEiwIhAKmc6IDpgbK4jRNzcmEfgEw+YoRMauAXYTVA/Uz8YLm6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":275497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuJqcCRA9TVsSAnZWagAA0YEP+gNQWwhyheJee+3IqumE\neSXUV97zPIi47t+4Xn+AkFxqUfe5bWWirDdOY+8YTFg0FlbElTzlys1HJVXY\nsfdvbZR5BbNrHfleqaSu2WXWp9kaYFtot499ABi91kJ7YdXdYALTFK8xS3eW\ngycw+XxLpmZd72MHjrf3WMFzwFqvnDe0sIQ4D38sS4LyVv/jG1rqTbDSID+P\nGA2xy5D660x6Zx8056UTB9bLn96QZqfHt2lCWJ0v+xdrJzNmMj7tLKbQs3X+\nRs95V/+KajQNEhl7kwcO1C2pkTWLLDHMx/JRiQM2uUISknnTahhSnMSZ3oyK\na/rMma40VQj9cWWrP+8mbq9OrTvSDXW+QoZqukyKszOO7GYT0vJqa9leAQXs\nKMPL627vbI63OJ46y4Gl0Sk4X39LTMZfoKLlqGXtjDtqO7tJNOewFqU10ald\nfVP5wA57ZX3dxsvYX6Fr8t8UQYQEYOx14qCdtfdP7XzcXEAB7mMMcUGpJcBE\nwK9LiYa6OyvRWP24/1fx7YrWBgqgMV9ecmVOQS7e93oUOD3GpNQVr3CGdKsm\ntlz6nEspa7aUmGU146cIoI3o9lhd67O3TusXsGOWAdZwW+I64L0Rpa1sTaDl\nvCZw0UsJOus6ZMk1UzDoC1sUayNwwahz8xugjwsFxJ4eN7HFEt5K8Vc6l3In\nziaf\r\n=AzFG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"883f3120c508bbc1d7a1e32fcfaf43fd663b4c18","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && depcheck --ignore-bin-package --ignores=@types/jest,typedoc","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-14T13:18:34.878Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.3","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.0","typedoc":"^0.22.10","depcheck":"^1.4.2","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.177","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.0-edufschmidt-authentication-tokens-883f3120c508bbc1d7a1e32fcfaf43fd663b4c18_1639488156738_0.025862067823080093","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.27-renovate-external-non-major-013d5b38ccd4f24c36198a889d04622c476eb79a":{"name":"@balena/jellyfish-client-sdk","version":"7.0.27-renovate-external-non-major-013d5b38ccd4f24c36198a889d04622c476eb79a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.27-renovate-external-non-major-013d5b38ccd4f24c36198a889d04622c476eb79a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"446c02db9f6e59864e9e31ff28e75f8936bdd070","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.27-renovate-external-non-major-013d5b38ccd4f24c36198a889d04622c476eb79a.tgz","fileCount":31,"integrity":"sha512-k911pimGJ6hgkK43wyYztVYkbGfoZ2tarT7owFyILKu1kaoZvlV114RGPgG8if8g7RQQls7N3C4X4FwGe5f+dA==","signatures":[{"sig":"MEUCIQDF+v7y5UyFIKGtKIebHOmX8zKSL4AfzYiLaLLzvPk9JwIgDF/kyOn0Nt9dcqJqTZHiRIvC2mXe8xhaPjbjeowIrZA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvS/vCRA9TVsSAnZWagAAdMcP/jOebIrRTrn5+dlNTA+z\nUz0ndhFvr3P4KNyLkcCLX1skton6a/389FlTbbcPVMRWiplG1vzzR6xcdKvC\n1lWv9m4Z0Xv9La/f2r1UUbyPUczBs2A+TkwTW4lzKpGYNagZN6e4IcN0pF1+\nUuyCok/soWvhJKDo8xI3iOokzbADJnTVSwxEjBKbWrP2JFJLaQVTlV323wtq\n9JsjMl+/7uvr3cC3cOCS+PeWGnFWmLJJiK818lHwBHltCxqF0WHcWqHwuS77\nLdeIOYMyVmIPEJw9poGnDPp+Qy9pVDyeGiAAhoDnG1cXcl0Th3kN5WN7Y+nC\np3ofgjjOnFoy7J9uxRNuQe4m6cy/Ne0BxhJ9ESIq9QBmGREzfOkUv8oVwxvg\np+QfAdVbSWpZ1ZIzwt7ycJPaKXPGzqvJO5jNRyEzmsPDF9GbHnSrf5uPU5KI\n+NbyHTLBholLj5VL0bu8KspzLtXwuvC7zuShtNnx8k5hMoL7sBEW5POpMrgn\nt9KWsakoqm36n/SjIwDvoIl0CeoT6pXkKzYMIw6ZEFaY3DxXJu80c5Q6Wm3b\nr902hZ1bdm4SiXw3yQK4FIjBUWF1YT/vFC9IX0ZO1iJWi4Yq553x0izNtE/X\njZeoMA0MhIMEWV421eE7Pjd4qlGD7kIsG0+yJ3MB8ub0H3YQW898gl7Ro1ui\nrTa4\r\n=sx48\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"013d5b38ccd4f24c36198a889d04622c476eb79a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-18T00:45:56.214Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.27-renovate-external-non-major-013d5b38ccd4f24c36198a889d04622c476eb79a_1639788526919_0.11082728968194488","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.27":{"name":"@balena/jellyfish-client-sdk","version":"7.0.27","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.27","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a2dffb18e4bff334f033c7fab519e0e24c3bc405","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.27.tgz","fileCount":31,"integrity":"sha512-8Px2nExCAmXJicnJiRj8QbMmT+tl/0zT1/4onz6PrZ7HAsEKFILmzo6wdxMnZLhFnWaGEFQuASqyJ1YPoio/Ew==","signatures":[{"sig":"MEYCIQCbnWMQemE/wdgre7x1I0OGlVcfqSRkwHxKeEgy+8jpTQIhAI6K8oW7TWoyFB1WVJ5RSwm7sLbieli83Ju8rVzq6cRk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvTDnCRA9TVsSAnZWagAAhscP/iL2ke1Hx/GhkUQ9z42o\nzt6wPzPAp32cBVKcNml91fL75d+d2WLlaaj/dOSZf6Hu9bEv9SKxY/e+w3Q3\nTpD05SlQqbgPUW5qbGkeouOufyP7nqh3htKCwlqAlSgY8SCkYZCdwx4Xpwpt\njBCwe4jqe/BVNI1CIdnJqFAUXfsdVmPLQE03bL22uJkf/Q17twZX3G3nVhFn\n8C4zmgJCOkbh1oQAeLFMkZLOe2xb1Pt4Om7gPeLJmtneu2lDQ/N2JPxzHGVB\nB4Tmu18rnrvkPlcxgYDBbfeF8QWrFefgaIxBozn+DV8hxQV7MLC81vHogqwH\nQh4neSIe/Wq0faEJ/wPafxVZSTr8vLumGKzMrifbEgrjrYWA8XZclW4Awyqd\nGrmdoyYDc63Oyh2e7nv1GKzUDOPaZsMppZJzBK706MFMaapev/5WyCZogF5Y\n3YPdRaLE26j17QDU3iPd5+O3j+AEP5SmC3r38L37MGHyaEfiTAWb2ZNXhmQ3\n79NTB8z8vC7vcMZuOJdrrZAhzixCl3AR1Zfmp8bpLxkRo+QRS0ibXk7d5mW6\nnyWUtaypbDUTBFO11k8m9duJDKAl7aCNDwGtbqGgfOePGV7LwPjM8eP7NUs5\nJqN4jPjrWGPNocB2wF0CA2QNaoVhObZq1uehysv3jyWQTJ1hSpQ1VvTCt64t\ntyS/\r\n=C3IY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"38ec44be5dd81e7e93c85c22d761279b72c38992","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-18T00:51:01.701Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.27_1639788775422_0.38423010142939784","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.28-renovate-external-non-major-ee48ad571189fe8156080bdf297225f5f9351fae":{"name":"@balena/jellyfish-client-sdk","version":"7.0.28-renovate-external-non-major-ee48ad571189fe8156080bdf297225f5f9351fae","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.28-renovate-external-non-major-ee48ad571189fe8156080bdf297225f5f9351fae","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9748c09bfd493d7c5c126be3ac57a5a8392aca21","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.28-renovate-external-non-major-ee48ad571189fe8156080bdf297225f5f9351fae.tgz","fileCount":31,"integrity":"sha512-L4GN+6DlLO9aWiAcA6nHdXRijtpWc/ADmDhzHAeZZyNyjzot48cc5aUdkz72k2y1CLPtAwTEF2kMA2QmgD3vCw==","signatures":[{"sig":"MEUCIE5nXZCY0IUlFYX2PhCvRhMbclxNtSMCSljvLIK/OdSuAiEAjW3IiDnfl5M7h9z+tBxXEICDX211ooV+LwH226M1/vk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvpTCCRA9TVsSAnZWagAA6RcP/iyK/cMR5n4Ms9k2qHHt\n4E8AM2oPHkuvWj5dnos7DvP8UWmDilmrrR0tvKODDewRXfoDa22urLBp2gmX\nJ/k6ikOcpnpxbp+IDdbjPVZO3KNgqRAfE3x+7xjibTzs+2tUKi70ujhZpfqs\nn0MWlxhD7Nbpatlgt6z7hcl9IxKjcPWfJHlUMTh2b2BKrEYAcO+IiGOeTKTg\nf57EaqBpMl6KlSAQ2xrUUl2ncNWdfhW+uJAFrnqTsExEiS9Ou16IGFk0yNlJ\nRTIyd3/50Br4vjg3Sb6OojZ7/d7glK25nuzx3Id7sGDjQs7KQuTmoS0mKYW0\n55x8whGvImH2B3h+2CaKz7LIdCvRzWSX8iOa3VGd9y0ziwmtFT4C8dbxXXYT\nxRlPUZcR6fnJSEMTKK2ihChYode6CKZtbqguNNhVI5RuOiGvIRVCJYVRew2Q\nbNmJk20QtM7wKZM9nE4X0rYOeNNJlrqEFdgCoi6/zi5gMdoVMr2QAdEsRHvl\nbtEJp2I1AVFR1lj18B7MEZj7nYdOpK95xiSKyuufm+R6RuxeWu7wjegFb3mc\nMR85zylNKYJs/CbmUEkA3AjzNNln9BE/jPwScU90J6XCqIn4QxKgqZbI96+J\nh19Zx5fTXjmtbafVu76L03iv6yoIZB9tKHtYN43N7QEGxMrwTgtOv5fEY1NS\ngyp3\r\n=Panl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ee48ad571189fe8156080bdf297225f5f9351fae","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-19T02:07:56.845Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.28-renovate-external-non-major-ee48ad571189fe8156080bdf297225f5f9351fae_1639879874114_0.7557452668366942","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.28":{"name":"@balena/jellyfish-client-sdk","version":"7.0.28","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.28","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5da8bcef38365cbaa200df5567fcdf83ecb705ec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.28.tgz","fileCount":31,"integrity":"sha512-aeBLflzxvGyhjy9jm+XKDuXn1ex8hcn8nAXg+mVa4OFwiLJ6w7PohBiH4Ox7S7W2dcHvslxE9Izn+KbdXTrjjQ==","signatures":[{"sig":"MEUCIDPYQGGw3gSNzrbpIHyJmk7V2e6OzwhdLqtEdno1efHyAiEA86wxutRENR5sbsvN6TVj2OOvkQm0xspP8FJPpHbTSSE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":269270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvpW2CRA9TVsSAnZWagAATjcQAKLpe/985IXGcWn2AMs4\n01ht9TSBMZl29xeTL3O1hnqY5Dj+mgeESYAl0S7qUITsS8m49YVznPzRe75J\nrHkFOfgxdMWl76iqT2drdsIWgsbUzij6Y6UTKqka2J7It6RD8tsrmBBo4DPn\nZfo3Aw7FQ2yPsGJBDlj+gwes3FLu8eHOP4Q8kB97x1t3JhyjvQypeZCnMYQL\nOU5bg0mJibOSZcg9e+PP+pwcsG9+1gesvE+G1oPOdQQbbTMt17xdUytChcXV\nZdxCQhqzt8RjYoAlrf3l1XX2GL3dZs6pt6kne+qjhlDOU816pAzG5co873qA\ndrDLk6Q+P5vZ+MZsU6rZN3FSN49OYiXnroCZ5nLvnAIBLwnGqJ9bYNGUVigb\nzpOC8WEETp+itNbldR74NcAUqyCR8kCAVfJhRIaH/QMnZJXNuLnhE+1aQDlQ\nfcaTLArZWPFRfISybWRWwa52U5qDTUTGB0ppl8VdQefBLkIK6LHA6sDm015U\nrQB7qZVfEpFUyMrT+SPwvfbtKEjbJExehTC9t/KrOWaZyXiusWHAjEAEHBe5\nCny3rKzT8S6xiWy1jnAvvaFBn2+rl5Mx6ceY056dvB25DxB1KZEF31T7oK1L\nZJ1oH78X3/CmerNiunG5z/QgTqDBvId/eUgXnlJFx6DDOmE4UIXVmSiWDszk\nWok5\r\n=XOFV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9b1370884da64a2259804aaa8a834ec889b40e7b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-19T02:13:17.138Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.28_1639880118499_0.35559464253574036","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.0-setGlobalQuerySchema-bc665ba6b853052f53902fb5fd896a7c2b244883":{"name":"@balena/jellyfish-client-sdk","version":"8.0.0-setGlobalQuerySchema-bc665ba6b853052f53902fb5fd896a7c2b244883","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.0-setGlobalQuerySchema-bc665ba6b853052f53902fb5fd896a7c2b244883","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5444956b3214122b3c2f145283e5539109b62fc9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.0-setGlobalQuerySchema-bc665ba6b853052f53902fb5fd896a7c2b244883.tgz","fileCount":34,"integrity":"sha512-Efvt4Lp4pBHOLZEk1Q03suJDEPeKAWYkGlA/2W8nWb1/aiIie8wm2whPk6WblqaOst4JMRaSV1QFtzePNhg/Tg==","signatures":[{"sig":"MEYCIQDbSNLcf6goxUBJ+juERs+7s3CCCdEBRaFdCmvkbyULNwIhALMop5Q23ATYZKrF4k8TbUORFrM2ei6gkFlT2IxwsR1O","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":278271,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwwpACRA9TVsSAnZWagAASNUP+gMAQA6WhIf8swdkMt0T\n2pyvbRmA8DPHh1oUSLVg0F1SdsFtXt126BrqOgHjy1QXVKO5DPEej6x5+4ps\nluSWU0muwLuMnluytPThrIr1elB2FZRd+o1Zq/+ZcbCLTGgmklF7lXtE8PgA\nXIt6+jZ1PPtKCZIV7HuJLXj9khYIMnHxTM12ixB1TcunbnekqCLbpR3Tbf+M\n3rfarOc/MP45C+96XAs77T9nQmE1e/R+7XyxQt42jFlA+lppeUnjKJf12yyW\nR3wP9VJ+Ll/ngZG1/5zeV9F4MXfVJJnLvHdPW5HXPO9Wbx57kpIB7tHGucgW\n0HapoLsW9VvVyibWalSnDWXflZ51z3uF0M66VuUgl+1Whpr52q/XovITgStR\npDNwRnJrj6/Pe+O6q65c/ichlx75dhZmAu6jqK4wHgBZmZXdz8P3ftZt8J72\n7X6xSQ6loR9hoPm/XGn3l4AV39HzBExkCmU8si3sGBPvP2IAxyKPWY5+a8IV\nywe/mMMFc98Agf6F4ZXZe3XwIj4yG04HOcbGbNV9PtgZy7RDE0y5/PWyHprG\nrwTOf316UmS5saaK8OxP0jcDL1uE4BHDdUr3sDsl3L4yiXX+9JP47qPR5UBv\n2PofVYON2gjA553AWzM1PMdxs9UgXN64r60/QuICLe8Eezow9lPC8dw2vL3E\nzuI7\r\n=+UG3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bc665ba6b853052f53902fb5fd896a7c2b244883","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-22T11:18:53.941Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.0-setGlobalQuerySchema-bc665ba6b853052f53902fb5fd896a7c2b244883_1640172096460_0.5876402179587383","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.0-setGlobalQuerySchema-9ed62a47f36b64e56731b951c59d9315dc7ad0e7":{"name":"@balena/jellyfish-client-sdk","version":"8.0.0-setGlobalQuerySchema-9ed62a47f36b64e56731b951c59d9315dc7ad0e7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.0-setGlobalQuerySchema-9ed62a47f36b64e56731b951c59d9315dc7ad0e7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f5c1e4d79aa541eaad22c1a950917238a518a402","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.0-setGlobalQuerySchema-9ed62a47f36b64e56731b951c59d9315dc7ad0e7.tgz","fileCount":34,"integrity":"sha512-r3l535zZUBTFzwzXQlFY9U9jYAtjlxFm/5DBcW1SXL72T8ffi21z7ZqazlYc/lRirctwSe+//pBSLGz4e2r15g==","signatures":[{"sig":"MEQCIFz+5oJc92iYnn/bI+BYElrnOuzRmhxWt1gtxK9aKlbYAiAKmzFiR6Jhjj7Hm9GRQ/aHP9ElM/VyUSXqIHMTYF142Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":279020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwxfACRA9TVsSAnZWagAA9rkP/1fKc3pNdQfGmbpJWthV\n04m4ib+MTLbGkMdfGxeWKxLup6g5Ffy/xanbZj/OYd4c3bUvLd/Nq8sLvwZi\n/bbGaPo9ixR19SkNIJ+l1ca0qlqjeXcwj6aa91l3UAsa1ZyIxdfL+M2rwzFR\nXmXOLwvo2OT9eFGP9lsOhzkJjOM1Roh4hRpDPp30/XZawcH713MkcR3oUYX+\nofn/kwJ075y3Dm4vJeb+E8Y8EESuh3f9S9S6d7cBL5kbiN6XhFnMwG1RyhFQ\nXDy3GjM9g5SVAF/86FCuiAB0KruKf8f42paurlNBSd4GTb7w0dEGIrhRyDIR\nOXO0nmzD6ImygXC91WmY8sCxk1pP8RljOGvJ0PacCcEhu9XzIohHO0Bp6111\nMOqvHNHY/rRcR2Hq3N7M6+KT2FLO9ogV0Ct7gLSsKI7Eo8gGoc+yW9ImkGab\njffOjfoRG5gjS8Wl9yfPWNIEI7Juw8oeiG14uFQRpUiwbBBVXf2W6POVMEU7\ntORQW5bodhaA0YmmBpg0jADFzx5/48kSWPv2VaSgKEvBaSeUzOf2TI6cSj2s\nVqxlCVAX91/3S9HNwqvCsjAVumMO2phQoMtwQDbqhBLRqVuEPn9tsQmGmLLz\nVGnjSQIYALYCRRwJgxfOoNYXVHEsiw7yuFKnSmkphWquToJx9io6ngoezNc7\nS9yx\r\n=sa2T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9ed62a47f36b64e56731b951c59d9315dc7ad0e7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-22T12:15:52.958Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.0-setGlobalQuerySchema-9ed62a47f36b64e56731b951c59d9315dc7ad0e7_1640175552228_0.8161104306566662","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.29-edufschmidt-replace-deep-imports-1f0234d4b8b6ef7294430b8721540191d59a9601":{"name":"@balena/jellyfish-client-sdk","version":"7.0.29-edufschmidt-replace-deep-imports-1f0234d4b8b6ef7294430b8721540191d59a9601","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.29-edufschmidt-replace-deep-imports-1f0234d4b8b6ef7294430b8721540191d59a9601","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9888fbb486080ea2c7df75a377f0dd553e711154","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.29-edufschmidt-replace-deep-imports-1f0234d4b8b6ef7294430b8721540191d59a9601.tgz","fileCount":31,"integrity":"sha512-+MIr/6/UFcxtWxKMMRb/zbOf78iE3SHj8WRRIwC7soscoYMPyGg48nzeNb/2MqcaaMlzt0Q05FWyAxEZfGCXNQ==","signatures":[{"sig":"MEUCIALDJHmznKtGEI/RD3uImESg5o1bzmO7lTjy0KD8jCBaAiEA2C7cVcl5ZRMnjaQRA6LmIh9PxbLmmDnm/u7DmbnJlAk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxfY8CRA9TVsSAnZWagAApGEP/2AqdifEgeD3gK5/iR2G\nh1VnQ1gBZMrN/cvj+yiMyUj3dliOziqseOHOXzNAI0TQvTjhT8AcnqM2uQZG\nySOtrhbACV3B3KpQj0n86aHFCoz3Ab8JOIQAkfG/GjO8sf6brTbIR5yfBB5q\n2+hqx+n/cGIpNNWzhHz2SsE3NxpjGzDvS3HFJLQyE6ycCgYfEuHwT6Xcrq5X\neX/W6Yzrl23j8d8sRCJM9GZ1mqYMlLBgedylZOWNiu7aOl5aSx2NPOsmQn3N\nAg+fazoMM6HInX2SqY4VPc+cnL6RUzS9xmvfDi1QPNZ13N19QCOa99M2b5Yd\nB6a+JdiLcMQdJ2c79ZidSOL1o7XuGRg6k/KkMxILeziG7CzobHyHwx73qkty\n8W2U0VsbhGRB4XCIzQEp+QlM48ymsb73NFYsuY9VIwDOek68U574I3Yy2sAf\njZ9rGLebLAGzNoFPD88CyblI0gsER5vVN68OK1sOZsUdDMRIuVp9KcS8JTVT\n5MCriYnxVBm7tVHkffa2PUnH3+x/L/7bKxMIaq3G4OYbuHDFnh6XDhGnAR4c\nKXLOrQtKOIUOaHpth/Gfjfr8bRds9SjbJanEAgNWrjakzDQwsYwrsCL71ULA\n2OfYKukcNyvZbOahlH1S9wlP5/T1AZYMCO+ueTTdxeQyY02K8E7Dr8+I6YgH\nZsVO\r\n=qvi5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1f0234d4b8b6ef7294430b8721540191d59a9601","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-24T16:30:31.419Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.29-edufschmidt-replace-deep-imports-1f0234d4b8b6ef7294430b8721540191d59a9601_1640363580379_0.9591151698892277","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.29":{"name":"@balena/jellyfish-client-sdk","version":"7.0.29","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.29","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a6e618fbc5c80fe83f9b20a77fc029ed64a4a801","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.29.tgz","fileCount":31,"integrity":"sha512-S5V6gk+RvaK09iEPyFzFTWPm8emwmwwTt78lIKqC4aROOxrU/3Amm8pU+jBguWFTk+8w4CePW1EFi2ibqe3ZVQ==","signatures":[{"sig":"MEYCIQC1y3+/wWdq4FYHmNyghog54PZinj+/RO38leR48yh0ygIhAL+V7BF5FyNt8MaaXhKopvwl0d1YExjkJIRP0vJsP/Bx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxfb+CRA9TVsSAnZWagAAXUQP/1ZZhrd8ZQWIaDvfDDDI\n1xXUb8oRHdbQc2DI9M+7vAbdfcTxLNUobGJv+RW3qEQDtTD1j09bwuxfHNOt\nv1VYhCcPIpQaBP3GjggpK88sNk1Wk0coggnlKZYfRl0hFpkSVkO+n5DKSU90\niTUalQrnn5P6EhlM/nb2ZNZpvZq+OenxIHF6DZXz/IF0kputmMtbVp7qtIu8\nZfnVr9qrlKueCme480YW4NXcO7UKO/GqW7DV5pah+9a8sCG2s78lnSgtoZSi\nWc0jhYKh4hNBLHP6vwwmMaHzIS+rNoHvzscYN5uAw+TLkIFDGBrTr09gLsl8\nl3XakwYU1x7rOEfsAtvYZZz00iaqCiC5WpyFTw6carxUfo36jr1tFNtanvYR\n691ZozEJpl3JAQCMeeNDgkUyqK5DJVGFwnWH7qlIzykKNc46G7uQ//MUKj/k\ntJ8S0ApnLYGdpiuyn83DAaT8bnGj/W0GmjCGdHMdotNCbJ+ha+qEPJ9V1CFR\nuDuVy9LClrDIjxyT6pFb22GkpeVwVnmzmb1ONqXgYI4EAufI7Gquc+BXKtXM\n+qUvSDOn4MVbTKB0NJYrBsV2rd640d4j7Cy5p9/k0avzAkW4vgT0qpXT0/lC\nRM3+LWu0CkQHNo12mp4zqqQgK5PZQ9g6EZWaMj/AFVN0EDd3zb1WLXzs+bDN\nQlRm\r\n=Z16D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7b44d5369df859ca3057232e8a09a4215773ae3a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-24T16:34:16.487Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.29_1640363774144_0.2233117265686997","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.30-renovate-external-non-major-26e17b9e8d484a166621e49220dd7405ae615858":{"name":"@balena/jellyfish-client-sdk","version":"7.0.30-renovate-external-non-major-26e17b9e8d484a166621e49220dd7405ae615858","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.30-renovate-external-non-major-26e17b9e8d484a166621e49220dd7405ae615858","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a81b954f4ae839e2ddf8784172f1344eb4dab5d0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.30-renovate-external-non-major-26e17b9e8d484a166621e49220dd7405ae615858.tgz","fileCount":31,"integrity":"sha512-g+8pyNBic3iCFoU4E9x8TUNSXoXogco70ypxYNggpz5qLl+3A7SK5DU4xYM/R1+0YhT/Hu5JrjkHGdBVCeHkJw==","signatures":[{"sig":"MEUCIQDeBoKQinujKXtXU67DUAmseVkTe74lzpsiwVQtlXztSwIgZrO7JmU3KTLGR/yieO6BpGIu9Y99MoyJitMzGPCtRKg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxnQ5CRA9TVsSAnZWagAA124P/2SUTs+dzc3ekmBDjqEY\nVBtEpJSPIs3rhLIE+4zLU0ZL2A1Rj7Isz4EkjulDvpWYKp8fLOcmIP0dgxbO\nO5V1Whn8o8D58U9nubJHv4GcqTy8AAafRuMscf00qYT/qNiBs9wRiM/RBbWL\nol4TaToc5OlypqIPlcFrC8s7KUfQveFpe3JsMCzvkEFUqfLZv9+powfH70uQ\nn+HuwtaP4vIHsJX4RBOpFZ+PhzLQKfZ7Q4mb7HKV1qMGR/DZsofXmNBthTMm\nJkSRy7ZNQ+mUcTIqULz2Rbn5y5LboWlHDHq7xh8GdmkumIwooqQRjiEnd0yx\nuEUUonjsFqd836XeWxg/Vof/s8lHG9sd8rMcY+0aNp8cIPqPSyUC2jO/UVW9\nwGQYEy4b1UuaDCFYh4SSls4QVlUFI2r0fpXbWKB802ce/iSyIcDA181UErae\nT65fksGE3Ze22EODMlbzlcGsj6X/S3M2gvwJ+PITLxrlrgWW2iAt8lB326LR\ntcob+zLeH+9pdrmqH5LqfUxcLn4Pm6kjabOab8YmsnYag7UxeogaAzvygGZi\nj+JRupn25ylrvlLlBK7blCT0mDMPKV3sjb7seS6z8+Kndst++cscXTWJbl1N\nxgUKCccAsMk+vaP9/FUufmW+lsWE4vxS6lbzVSosYc3OHoU8oxB8gim+xpyx\ngdq6\r\n=zPsd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"26e17b9e8d484a166621e49220dd7405ae615858","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-25T01:25:06.904Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.30-renovate-external-non-major-26e17b9e8d484a166621e49220dd7405ae615858_1640395833409_0.8489328419787476","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.30":{"name":"@balena/jellyfish-client-sdk","version":"7.0.30","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.30","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3202a81d31446eea086732b6318f1f7b79bd6957","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.30.tgz","fileCount":31,"integrity":"sha512-uJNWNtatbheP76aiaFxbzJiGmcPpCtiuZy9KD21NNDo1o3wfYxMqRwSbgy50Mv4dEpZe6VpFhqqzlJDxz+VeNA==","signatures":[{"sig":"MEUCIQCfpPilfaF9PNudrW93bMUmHpUgtq8O3HPMsGtk9CrRtQIgBMTZKk6rPAf8CAL5MFZeLri/P5l2DcbaunHGOj6UWTQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxnVFCRA9TVsSAnZWagAAmoYP/1foQeyGoBSQiDf2jcxr\nKpORs2eHunZAIZeyP16YJ/5wa3Gd+XkB8/kNsbN5LZfwwDlACyxhHmDytRID\npw3IrZwwT4cMBNnK/hnSWwuyw7wsMJbmRH55Ml+kTKni/XBKSsJVBC+ZUAYO\nbQVDI7V5OQg8NtAXekEtZkG8mK74pjKFzsWAdHTjupOU5W4QBmb+g5aXrlCQ\nkCdMUIFb8lZzyzY+rnBOeUFVcxkvlYl1GQAb4mHIV2eo7JkhzMjPJQOI/u86\naI4DuXYXLgTUk+wHRJ5mUfVXDTMVlgGQwxQkh2RYmZAYgZUMdlwNfS00si3Y\nq8jpffHcz9wN9sLos+HXx3q+OzHtQx3CTU3attXN3RLqv3lkYuV6phlGrAI4\nZZae1WVERmAipDqzqYCLAXU9HBtEyQfMgeKH+g9E7yvX9uceLaiWtkoSJT4u\nPJVTKMOV03fGg4gRBEqifiXbCtgMc4tP5lzzVEhsh/qDHnQKL0PP325xN1Eg\nypgWCfArpPTxn51T3EpqmHF2g23pvNUUlZmBUCEr62on+lUDMKyarDXPmPQ6\n/9G0tZXa7oJzMcSl7nQeRmd/DK1Wl3SJCNLTGQ56RoRqsvbtc+KUkQI/mR97\nfT8NR3S7S2vY8Vu3K7wIFGCidew77Bax1xHwX95KcnsyaEs9NyQxQTmq8pYq\nRmho\r\n=wCFe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e905052daab78ff429ec48b3aa12e8f9b18f7cdd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2021-12-25T01:32:34.344Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.0.3","@types/uuid":"^8.3.3","lint-staged":"^12.1.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.30_1640396100965_0.8264050250427895","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.31-renovate-external-non-major-ba80607b2fbc87dd7b4745548bdb6e116a69631f":{"name":"@balena/jellyfish-client-sdk","version":"7.0.31-renovate-external-non-major-ba80607b2fbc87dd7b4745548bdb6e116a69631f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.31-renovate-external-non-major-ba80607b2fbc87dd7b4745548bdb6e116a69631f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9b9cefb49fcf93374ac0235bc51ac1dc4466f4e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.31-renovate-external-non-major-ba80607b2fbc87dd7b4745548bdb6e116a69631f.tgz","fileCount":31,"integrity":"sha512-+dnyl0gyQzaZycmqlhpDwinlm12nXq7WU84O1+OkaP+vo56gkQy8hMhvrXJOZiiuykTAWOd+VfN8Ru/adKP27A==","signatures":[{"sig":"MEUCIQChnMTQdpo1R9gfvEf4V1G6fol4+sdmaeTsx90CUJZR9gIgB7mGPZiZd+7IdWHKN5QepnsYcr0pHAlrkgPkxO0R678=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhz6h2CRA9TVsSAnZWagAALI0QAIabK6yJ6Piw03uCIhhx\nurNSHotKnIWJcSoMw7FQNBIBADnvgscz2+C4O1i7Cw0KdpRg8ALz7vNvYV8A\nZl5AhYhR1a7RnUNnL+D/B3v312JZIlpuP9kg5+8tEVhT+CGxWLfON78cvjyj\npaLYudSQ6JZ0msgp0LSF+kzkwuzOX/Hn+O7cJgLxBs4GMdmaz0Gs12QPtwee\nr1j2Z084UXfTyUD/2ojwLrSPHxvogL7rHF/bgcXPmX59crjZF+aNAcp3WCOj\nfPCdT9V5DtQXcRdp8YWBFbCwj7yworzBEof5LX3i93rg+sVvadfMp4DiTflQ\n0OFrZYnK+Lo13CRBUM/565Ltzi7/E1VosqdwfimZq2Ab6naQbtA87WM70kdV\nLSJwy/aOpmUUPyQt78f0ZR+samLp+AnBL6kFj9Y8ZA4SbKXHn8Rz8aFJpN2+\n9PQGa63LtSMHyJ776S/Q6FU3pRw9ulFpQ2DHbj0uUxLrourpuTGupoU+1ZKp\n1HRCORVlWz3eWtPJL8F5VA4TjBAAVT0ZQrf3qeHlMotZ+RvqUa+lfs4Zf2rS\nDv8ABne3QYs11tlahYetB8A0QppyZgXXLwYR4dIZeW6o1j0J1jpInV6q7Zax\nftj1p2rMpjy4SXfZKHSQBjJHrB6Pg5grXrlaZJ79KE/ntp27iOJb4pQpAaUO\nQpWH\r\n=Uepb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ba80607b2fbc87dd7b4745548bdb6e116a69631f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-01T01:00:51.200Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.31-renovate-external-non-major-ba80607b2fbc87dd7b4745548bdb6e116a69631f_1640999030301_0.34428420186548014","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.31":{"name":"@balena/jellyfish-client-sdk","version":"7.0.31","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.31","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"29b74ca9ee4557d37dc07fe3ec5e4d4469a585c3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.31.tgz","fileCount":31,"integrity":"sha512-UbtSzQpqsYikxXZN5bPnChiXtTadb/c4At+291jIJjVzSyg4cLrtyCNMEPicye7N5DNWBvtoxw2Si+sn2bFBsg==","signatures":[{"sig":"MEUCIQDTrtmixCOdNUvSNEnx2T9sxK7o8Qru51OeMD3STcAetAIgJCa4RrHW7kVLR3cavN+lHwTWeqfsPBJSkLwxHXPe1SE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267363,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhz6l+CRA9TVsSAnZWagAAi0AP/1Oi3lBsOeg+obyvdGru\n0fTJK72/SAOblu5RmJBhiaGmDmrOtWxQT2t8pO6ICXkZvuQRrv6kOQG+gDZj\natG+VAFxXQISnrWpmdSoLHsLk6pmJy3mwlaURVYJ6ZyZ+g6jOrdw314hbsJU\nVejwZA8HeOmp8MJ3UCi6fW+VCvQwPhDnQH3JvNC5zBa3bkitAX+zWmDEwNV+\nBJTA4z3gDhoVT/TB11pU5TDjKG66TvcZC2bLsliZF3UI2EXIgQPifIYqSAQF\nNIIGtRkdbGCwrH9WidB5JaOcXN6XnMqBSx01DTv6QGvPuYL6cO5MVWV+WD5L\n2eqMXlcgwZ3in8YUemASPvQNDBWmCGjUTYkFOBhgWNnZ2RmlPrav5SVANAqp\nSJgWEPjgkYBu3x4sdUCuuxYlHw5jak+Ald2eOcZOF7CGt9NX3+2nsTUws4Yn\n0wX1JZoh6+FxibOnRNH9iE0GB59+wmpUW9P+tDB3NvgGsu0sPXMoykVq8Zu6\nFNkxP7orCtVW5qIsEPqQrUUwRSRFBblJp3cwczBL+jCMH04XDH28Hy0coWUm\nTbe+3xJKBV4BWmlTFcwulpzRr2JVTof477oA+PrGlkxv2gXYCmMeobrMsswR\nY5t6zvkm//en3O42GEpPYWEkZ9Xf+hK9pu+wM+Aok5VIn9RS61egBJCdp4J5\nJ51C\r\n=fHc2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b3a498785b001fcec248a60a5f20405b6c20014c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-01T01:05:57.953Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.31_1640999294787_0.38554086354070294","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.32-renovate-external-non-major-6fc4a6ac7e3988606792af8f10867577027c40b1":{"name":"@balena/jellyfish-client-sdk","version":"7.0.32-renovate-external-non-major-6fc4a6ac7e3988606792af8f10867577027c40b1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.32-renovate-external-non-major-6fc4a6ac7e3988606792af8f10867577027c40b1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"84d6b6ed23e5e8f97d2c0388e002b94cdf766cdd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.32-renovate-external-non-major-6fc4a6ac7e3988606792af8f10867577027c40b1.tgz","fileCount":31,"integrity":"sha512-ROKgi2x0sf8bkBRi0PeoyaM39iasLamXYqWRVvS4dxHQS6BE3vORHNawBBRzBvxZH1eTYEK4Tn47Ds78df6fYw==","signatures":[{"sig":"MEQCIBgEUvwfd0tYFtHIsXcd76P/P6ozhvzSr+D5DSzDGRDJAiATb7M24NIkV5yCSRIxBci/YY19Vqwgn2DvTTgz/5tcRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267522,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0idUCRA9TVsSAnZWagAAklcP/RitOM9ORb7gpHeXm5ei\nD2s0M7bzzssrVr2c05gpX3vH4OIhyee/fFAVa/tfYFbQnMBjsLA6tQJ5pfEg\nXgotgVAYUeEH9BDyRTSymAepA6DvDahwLQmhFPAyywtTgZ0lASuZkMf/vucr\nr+YByJArmfXgoo4g5DVaGceMmruX+/2T2RCs9q7taFAq133TH3Niejx6R8cu\neES8w+fuy5BsLunJ1QJJwTn0Yhsjx709hn2pTr3vI68Jpu5oGgo4y0VGayd8\nZKqsU9QOZg88oZgX7gHhOlJxL9yBfKSfS0R18hDwfDI+Lj00WPoOYcd8gw7q\nnXe8Q1096RZpWS1tjvngt7rMFQbtaGnFV63acpmuZf66qpWsNd8DTcm8TVjI\nqi0Qluxjy7s34sElrgG0C4J1Hi7HA2QtbnuXk3acED36EV/3sExfFmKjRICc\neJzsCFasTaJfhpFiXAYloPnVhC+vWIk3yXlgPNmKM5hyefzbYiTEytkOVPlr\nN6kVAirDVQM5dOWDVrQ1DbkcWzmylPnH7amh8JRkb9fB8LfYQ6qbapEbWFvx\nIY+xiRS+ETcAcnUj1MurxOsBjdm3CoyhycfP+fUcDIKr1dKMtcm9LtOeZbHq\nGBg3QvzkmIfeHhz1cEEQioR8Ft/nvKLTOMNjrp7/PNaLDJboDepaxLhlUfxr\nJWXK\r\n=RMPJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6fc4a6ac7e3988606792af8f10867577027c40b1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-02T22:26:35.489Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.32-renovate-external-non-major-6fc4a6ac7e3988606792af8f10867577027c40b1_1641162579878_0.3540431105958284","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.32":{"name":"@balena/jellyfish-client-sdk","version":"7.0.32","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.32","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"91d3b98c8b603461c0a5b5c7b2a2431495821c1a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.32.tgz","fileCount":31,"integrity":"sha512-/24EoxIKMpSywoYai+7td/Jhk2WX9cQlvfNLtG3alSNwGfum9lfNepNK2XzN2zrl5l0FnpiDkbdiYPWCVushsQ==","signatures":[{"sig":"MEUCIQDU6Q8yAXqKHvWR1oiOCX/xjH0b6iHgEtb66qqnnKQ9qwIgd8ea6/aq/0HqkcMGD4uNdedPjcswx1Y2sgIDUm82h4A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0ihyCRA9TVsSAnZWagAAQMwP+wY2tiBQxKJKl+BRFePL\nh5oY9E013NjHEm4ygEwo1XGmfjn5al9RLy+98R1pyj8ztTULvpAQSuBx5lS8\n/kyJHT/0Ouazd01/DB3dzABDDO6J7mZ4eAIpw0vK3flA2F6gSeUSEnzEHh+c\nvSTFgqG9Sn12rIpcy2MAX7ZOqrDNX7SSchdcgXZeCyGumJdZI1ikHgEypAY0\nsdoBHFj+BE+CBwYygzvSRFcHG3DK583oPsEwrsN0Bk4qlkDk1nxdsAcolsgK\nrxH7B+zGg8vQLlCsXlnGO8SLeVLNQmb+HAuJ6bkesLReitaGvTXyDjzhcvp6\nNMmIxO+Q407ihKvunpzm3s5sSZTMmkryFKomDiewjMyYCgEWSb+MA9eZZSoi\nWJLyeIpjdGOdenYQ2JZwxRdiL5sH5kHZJeE3lhso6tE6WMiv/N1dviSCidPN\nggUf3GTfnmgMH3ZrV7wrHV5xPuODHYR9Cxc6bEUdsIaDewIk8MoSDW7uaxhI\nq4a1B7tv1g5LVYa1LI1kobeAiAtImPLrN21Em82B5zhDkyj5z1vP504rhrlm\n2pDPXHgfJFbjg60Q5Xx8tOQWmKXK/vBbamhmsg52rj/V5ZibuEY7bFtyQI4X\nGZz+gbdp83sEpS2YhFCK+PoaC5upM9MJZDZa4QmnyPudvib7mqdR8gssi4VI\nd8uJ\r\n=0f07\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"935d890f1b0c4b4a24ea5e0f76de5c7f54215f70","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-02T22:31:21.660Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.32_1641162866791_0.4993126776613608","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.1.0-edufschmidt-authentication-tokens-2ccf33450464e08334386ac63b4103776d9c0125":{"name":"@balena/jellyfish-client-sdk","version":"7.1.0-edufschmidt-authentication-tokens-2ccf33450464e08334386ac63b4103776d9c0125","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.1.0-edufschmidt-authentication-tokens-2ccf33450464e08334386ac63b4103776d9c0125","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"891132539a52ec11e86f1297eb0a3def2d51ce22","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.1.0-edufschmidt-authentication-tokens-2ccf33450464e08334386ac63b4103776d9c0125.tgz","fileCount":31,"integrity":"sha512-bbqUWTuhDiaD0SbyiZVk7zqfGhg7l/8C3+7KozpW/0v5poY7cMzQxc9Xk1dABGqUvc95PxsstoeNaR3tUeQKUg==","signatures":[{"sig":"MEYCIQCtfGo8K9BRySWb3xTvgmByZZZnWZWlsTXIkz3JQ4+U9AIhAMy3kuRUuY5dmJMEO2ihVwY2Mi8FYuOc1tNIDD5KoxKr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1d8eCRA9TVsSAnZWagAAyiEQAIDR496SU4CWf+iN4Akw\neM6uJ1DIOcOtjB+HAPXp3vTELzVilrKYjmgwpt7GU6PciPl3WIiRnpnEKrgY\n5B2CVMxl7/hNXGvb1rH30w+PPLzXvIJgAx30Ziofw/9llxOJoCk7N1pW9m91\nXplQn/cHkTmjJuZQBSS8Mp7RNAxryExkoLFg/npf1q0EzWzI+ZnYW9qktlgl\nDewzYFuY+XAmDnyCGMOwJGtAmHv0Kk+Ss54HrutobEzNAKCR6Q58/pSPxsVA\nDI1Aa9WrV183QL7IJhqWN1fQOKnQTJnQNCAHTU3JPF5qNeBxKkGhu7Wh1jnf\nAyKChcGW/EKnI2CAvSx4zvyeix4Z/H8GKpubD2I+4yk+SoyilVJTDkKWF7IB\nNIvUOWULOtJgl9nYfCsukShU+ujLtPGpK4qJ1bW9lzw/vazktV9ehYbOPH61\noWuH7mEYksXTeplMusSfg94IOSO/osvhAYPJxnTsHcuwZGjgOR6TSih+0T5Z\noNjiNJt89e1YjIsLT9P6sR1x3+GUVz6EtkPofeKh4WmP+JbG3QI4+qGMmLNG\nRwmUwbhvZfRsk3reUATEZT6nCW4Xd4gdORNE6qbxfsQkEm4eI8MA+inFPgiV\ni9C8B4vqeN2GPkM6j5DpnH9+99cbB3nHlcw8btYk47KWz8SDXoG/qT98C8TN\nBRpL\r\n=GUef\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2ccf33450464e08334386ac63b4103776d9c0125","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-05T18:07:39.200Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.1.0-edufschmidt-authentication-tokens-2ccf33450464e08334386ac63b4103776d9c0125_1641406238376_0.23582020261308023","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.1.0-edufschmidt-authentication-tokens-69a0d49b333c288c08e6157658a8780c1e13102d":{"name":"@balena/jellyfish-client-sdk","version":"7.1.0-edufschmidt-authentication-tokens-69a0d49b333c288c08e6157658a8780c1e13102d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.1.0-edufschmidt-authentication-tokens-69a0d49b333c288c08e6157658a8780c1e13102d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ed5a4f6310d9c98c4bc77821fde21ff92488954d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.1.0-edufschmidt-authentication-tokens-69a0d49b333c288c08e6157658a8780c1e13102d.tgz","fileCount":31,"integrity":"sha512-zivcXprVb2ifcflH4Ntq1OnJaVZu63bPlt8UMNddHUF50Zpg+i/1donbkEl/AcnTB/ahUeW2qLcyhJ+cEOo5kQ==","signatures":[{"sig":"MEQCIBRiYOBP8uy5V9/2ASAcrGiC8pmBQvpjiMwMSWVhuWzxAiB247GTI1vAI+Ucm+cJvuGBwQxmxcrE2pMaOuly92TuvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1e/qCRA9TVsSAnZWagAAVBUP/R2KJera9YHBvwdE6XK+\nmKa/EDQzo/w52ExfLFX34Pv0b+GntVzNvQSHvxPghnEeni3DKF9wmFSMnNJs\ni9mwrtuRFmyPNq9kh8cePp4e4+n1n2iJxej3a1JaTk3umAGRzB4kXgJVGio/\nCRclur6hhCa7u7HJwygZIg9/ixZdK4+Wk3+wePjWlf+3JWCXfaTLoXkHqILG\nBeaOzYsiQYC3mRkw3ooFrwNSGClczIMan4hV0s+JOU0DBlhl7B72RUxmrmZ3\np2kmilLyvhElTd9zpsoNlqvqbOBYrjaywJuS0BKXz2Dy1znhRKFn8rw2Vhp3\nTUZjCCZHarD/PLMYlhTqKbbZ2VhPRVQiJ2gOWn+RjE8GpdR3CJA0B30szyT+\nxC/kjwJThcH8baALzPGOdVEotVzhV8jp1RPdTonNJh+V4Rk+zA2C/WEgV29+\nv5TlsFCPfbxkHXYKWac3aZ4PVkiN6pktDXlIPNIS0yhkjB7ODOiA3ea+cSfU\nn7v5ExLWL/G2Wfq6M2xH4ID+RxsnAPj6PERdrBGVNSa4lIM7UX6NyPP8Jksg\nB9PlsVdDJ/tHsxQHjWWS2bn7zLPZiv4Ulpi/ByDKynfY8oU2caW4pdTFDlyx\n1ZbB5Ix2xCjfuUvSPvVPavhjGKHpEqtoxLPAw+Jk+6dSrxDPiG8IY2slKZtt\nBJsO\r\n=oFE3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"69a0d49b333c288c08e6157658a8780c1e13102d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-05T19:18:45.958Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.1.0-edufschmidt-authentication-tokens-69a0d49b333c288c08e6157658a8780c1e13102d_1641410538104_0.9876188437858562","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.33-h32-axios-retry-76dba9a7d8bd34be42560e5dff3f7ce6dd2239d0":{"name":"@balena/jellyfish-client-sdk","version":"7.0.33-h32-axios-retry-76dba9a7d8bd34be42560e5dff3f7ce6dd2239d0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.33-h32-axios-retry-76dba9a7d8bd34be42560e5dff3f7ce6dd2239d0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2b3ec44031c3c3a5745ebc5b572770fe67d4130f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.33-h32-axios-retry-76dba9a7d8bd34be42560e5dff3f7ce6dd2239d0.tgz","fileCount":31,"integrity":"sha512-+3Sy8EoU4W3lXKoobtuUuY1QqcKwJ4+4TSbA7Y1qYtzvSOz6VEtxKFWOpNVByQqrdQ6c8nDSmw7Xa3/j7sLcjw==","signatures":[{"sig":"MEUCIQDTZ1IQy7dVSttOWbNRNNDMzM3fvM8Lyuf6hXGvd1UhuAIgZLgtgmN1k03RFJ1q8Qa7F8XonpKSm4MyuOLuFzgsFjc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2DRLCRA9TVsSAnZWagAA9UIP/1QN0m66edyIhVFsGjYo\ncAU7D3ePY1P+4I2KxHCMOewn8MI8FCl/6Nm7easRixjvOJm5AQuzb3OkdAUa\nxz2mPweIbkHpbxArlV1PxdynrGYu/TGJc5pcP39oFdOugHzFrADePArMC3qU\nj9Dli6t8vaurY9BBAtmGv+hKkNd442JY4qpgpnLj3IOufAzPYgKWdfMzgpEB\nWTYdHIYHu2bIsEFZ2fT8anHO8RRfeC2vapka4VerIS8CifrZKYkOT3sNk2hu\njFqcKg/VbBOyBi3rk4V18E3g1Xxdg4osEd0gDBebwL0OCxEwXARMLl1bqoai\nNo1j8o93D8QzUXEtny2EaHibGwiQvOl3utdbKSYuF91tH4TzaeD5HCY4tC6o\nVA4GHhUg3NE7KTn/ZHX1lbTnDxt6QSppHKouYi4zVenUSqUI8NaHi8J1KXas\nR2Gg9Ht5hpZu5tilEBEKGMiEm8nZWxw/BcspH1mU6hfHhUm3iXHFEga6xWy4\n2jqa4muEG5LHEtQ57HHk7yEUjVXsvf6o4Kc+QdEbv9sBVkFOMiuKqSXkmU1W\nc/byxTZWRa/tgTpE3AjZkCdYy8j8kZPIC+mK9afbMW3c6/XqSBY+TPt5N5Kt\nb27Entrqf+jRrtXNT2nSsomWSFccYCpyh+45x7Z64y+BKm/Mf+22krkYbtGM\nQMcV\r\n=SS0X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"76dba9a7d8bd34be42560e5dff3f7ce6dd2239d0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-07T12:35:47.404Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.33-h32-axios-retry-76dba9a7d8bd34be42560e5dff3f7ce6dd2239d0_1641559115157_0.20568838514291432","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.33-h32-blue-7d7535df95595c990b2716402f9d6ef55bfaba2b":{"name":"@balena/jellyfish-client-sdk","version":"7.0.33-h32-blue-7d7535df95595c990b2716402f9d6ef55bfaba2b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.33-h32-blue-7d7535df95595c990b2716402f9d6ef55bfaba2b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b5f6520a09c3027c94908bad183cba44f47a79f5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.33-h32-blue-7d7535df95595c990b2716402f9d6ef55bfaba2b.tgz","fileCount":31,"integrity":"sha512-z6/IVZausXgoYri0c/m0aK14b+9h6+JF4OlVNc8P7GTQrhuLzqukYpLD45T3PM4WJZFh06XeA1SW9VL3qHM1Bg==","signatures":[{"sig":"MEYCIQC8Gi/b+jKmqoh0FO9jrS/gRNlTKSuiLF0sf/8GNS5bhAIhANt16CSZtoA1/6o//W5Yk9lovVqVBzxMzk2Mo5sQEnhT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2DShCRA9TVsSAnZWagAA13wP/0KP/ppJ+Llo+N16nkhe\nUXMlsjZq/Le145eIUrv6xC7hclzJqO1XSuX6Hzj06+MwIFTpotuEcN643S9A\nltJe3lcCcHRIXiMznXDalvIJ3rYFq+M8AZInKl3NOml8I0HrxSHjodQtGmWI\n7cjDuaDZXDnNKVDwXABl1x19Ij1c1jjz44zMh5MzwVfnL8o++O9h9w/VaVIP\npSmG/aaSoYIhUI2K/Itb3fKqWecUYLfi+mMDsSodjOsq5eGhyG8nbObBcPx3\nhQDG/sLVKP1VwACZRq25doT1OozFDixA5ZLSd0aIKuD8ziKGy6JGHpnL4D/n\n9sPj9kugm+WsAJxSXKmMa00v3Ajg2wvC0vJJ2Ul3SL+P3oqZgCnOcPnEP5nX\nV1zRqXy+TRTBaB7ZSRZtUMbyJrOhwcG1GihoYt7JHJjr/K1NHybN9krE23rk\n9vDs3HdXxLVh+2vDsP+lRATgEvrJgRAK+f5eJ+/c+qk70I0w9ef8VseJdddS\nNAdedJHqrjVFuhyTDOHFPng/HyLAvwEl+n68pbwcYGxeUiSaLeQfOSB+OHxR\neyBog5qrLq9fXbH+Xl24/U1cq9OtC1z3+3mcqsCuDo+KU/ZVmLz3zuEgwUFm\nNiy702pwy3X3HhMrVUI15R5x0eNzF11TwuuBnVYDnrDaIfMOC8QEGbZkwxWK\naBW+\r\n=vEWM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7d7535df95595c990b2716402f9d6ef55bfaba2b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-07T12:36:59.680Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.33-h32-blue-7d7535df95595c990b2716402f9d6ef55bfaba2b_1641559201115_0.0634924952235345","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.33-h32-blue-e60fffc8802d8223f0a40098692209fc25028c30":{"name":"@balena/jellyfish-client-sdk","version":"7.0.33-h32-blue-e60fffc8802d8223f0a40098692209fc25028c30","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.33-h32-blue-e60fffc8802d8223f0a40098692209fc25028c30","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"283da4d30fa25139911793af58b7b59b63250d46","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.33-h32-blue-e60fffc8802d8223f0a40098692209fc25028c30.tgz","fileCount":31,"integrity":"sha512-0IvPUAXE9SM2q5ymsfNhQpnqzmMB1XFI3Yoj9zWNK58nSItBTQ/HjTrhHWdWOYAOwIJ5jZQDeYei4ON9NCfOGQ==","signatures":[{"sig":"MEQCIEGXA5sg5sJz+b+IuFzyrjwo/rNZScAVmRJjsVBigDBVAiBmN/oicc4fQBdP19b4iTcmAgsfMPL350WKO5R6Jfpf7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2DjUCRA9TVsSAnZWagAA1K0P/RKrw9Evwbo9UwhPjVdx\n27ycEWaF7tpZW5vd1laa5ZUyuO6kk5ueQ8j7jk2+O1vseheWesGUGrUA3pb7\ncanCXS5mjedwZX5UJA2BusZiw88r9ySn4iDUYLFwJwen0Xl2slf6cZMc7Mo1\n4UvXAiLU8f+B7ljhEWM2Pup8gMPLkuaKcgMFKKssz7dBZaA3/MhAFz9ln9lB\nVsyFB90Y7S0ymR8IQlmDNSpbhIQAmxEshGExelOjcV3NoY5i5axDg+5A8LpE\nVNQ8J7fA6pdDwOeFbWiV9vJskW7DKMhsjV4M44aUNjmsCm8EmU1eY5nPcfbM\nW2p4EB8FH1ORFBNlrpshzNFYOJWKmIlboWxe0HHW2UhoaBh1JUvO4jGcIAX7\nBMbW8gM1sKS0uv9c56cbRkPCiDF54rbTNrxzkfhDip0ObImDDHWQLk7nnQRU\nzFB/r6b5Fth49J82RNFhUwtxLSC8zPYdjO9YOtXoEVjVaFsf8UNbIonm0MGq\n7plE6Q/3vR+x8LXu7Fi4lQtzcaWqUeGEBMrEZpc/shkh/H9U5lIiMnad1z4F\nx+ATTrDq/181z21837Fz1AjinOvvgis4YXwr4jIiDtCTD+j5XJDjIIX83Xe9\n1NN24zE2720QG/vTus+LiajfZ+e6dXGOazcxPJIiKK4XJTffpUDty+xV2yDb\nWpMS\r\n=khTj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e60fffc8802d8223f0a40098692209fc25028c30","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-07T12:55:47.099Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.33-h32-blue-e60fffc8802d8223f0a40098692209fc25028c30_1641560276532_0.7100916561671389","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.33-renovate-external-non-major-0d6639ea859f50a322ea39ab7a708722911952cd":{"name":"@balena/jellyfish-client-sdk","version":"7.0.33-renovate-external-non-major-0d6639ea859f50a322ea39ab7a708722911952cd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.33-renovate-external-non-major-0d6639ea859f50a322ea39ab7a708722911952cd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"da6564a8449e681df14d003696b92d156a373c3c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.33-renovate-external-non-major-0d6639ea859f50a322ea39ab7a708722911952cd.tgz","fileCount":31,"integrity":"sha512-ZriLlfqn8SSkckyy/HiHxDa7tqZWbL4N9Xfrf8lmiYn8GWLpsCoZZxgN+hn0l1Nl/pslbMqr1IDYrU9x4mFElQ==","signatures":[{"sig":"MEUCIQCr5bgg6j7T3HhGpBm0sSwam9r8Y0mk+WKRSSpKPxlJGQIgLjs2YvzX8sA3FidRGn8ipuHrtWiQ0EE8k5vGO2wuJnY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2O4hCRA9TVsSAnZWagAAQzYQAIo3lwfBOKjfDOW/D1jj\nFiGoSVQN2xnDqknYASCyqPP/hdRQiXYzrfrQq64kO4zgIwmKVE0LikMXZwSg\n3yrSUimzZL+RXPtqlyG25nUdgK4TyZdkDrwLuLAvGyxzhPusDpCuKyaB05CI\nk/fmbeoKO/MKalH6IeSkofUYceYb/iaOHvUdTpoX2rGBeil/dgpotOS+dI3K\nzYWXlaSh4UXagQsoAeAYAFxm95RxLcO1j2H+y1yPIOCYCghpQz2gbPPOJjJb\nuMc0ZlivsjYLPd5t12tC/DEgmw/0Ms1Eq1o/5W6MudaPvKk4HFjwSKzcjfAc\nNnL50YOXOiA1gp4fF/iwOxGdiUmvKmHhwbdCR55MrW1yPIyPc61TfWLsEcov\nPCK3dt41KPInAX3fDkg3ASUDrNTx/3/MRHwSW0C+mGbX2dbaHFvPc/QlPkRv\nGjOoUf9qEI6pYCFmZ7PzhFHTVmM71KE7lRZ8RrDw7JkKFsuh1uJMjzerTrbF\nc+EfqKR0zq4oM/XLTW5Tw3byJCRTkP2eg5AbjawryHGSFozI1+o4Tf224WgK\nqoYArdwVDZavPAb6EckQcBZt2loV5jruGg9y6uwCNsMADQRmBhL2VSuqpPHu\nLsU7MVAhs7+b7wasofem63zJBvPPxLOF2pwnzajUafIFtQCrYwuXIVr7fHD5\ny4Gc\r\n=B1JM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0d6639ea859f50a322ea39ab7a708722911952cd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-08T01:48:03.548Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.33-renovate-external-non-major-0d6639ea859f50a322ea39ab7a708722911952cd_1641606689685_0.6137510928752592","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.33":{"name":"@balena/jellyfish-client-sdk","version":"7.0.33","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.33","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e8368859a3a60a4c96b0ce7d5532dd658171b675","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.33.tgz","fileCount":31,"integrity":"sha512-rqXbPJs54udMlPxA0LiRZYL8PSgIfa2DI25ssYxgbuRHm9UPMttJZF4shaTSZo0FiB56W6PChUFcABXZgfNHvw==","signatures":[{"sig":"MEYCIQDGH1/6LfsdrSNl+DuyToYS4O329/SAf0uoBGAF6hJWvgIhAO0kSBsAlSdpm+M3KSoi78os+gb9BaAMS2JbAorFgbt4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2O8tCRA9TVsSAnZWagAAsgEP/264kmFXG71HYFjiwfzm\nX9MZSaupY0Lq4cDa4d/NMw+12c3uVIyZg57bJMEjM92fUiXqkK2iyJzdH9kC\nougAAw9WLq5KU0sEjp5CR5OuUyCqqUQKKomtwJqAk1QQy+HRTJgk0JJp/Vy3\nODd7AaSNhxMG+n80oUpknw28Q7bj/uYuzVErwLXBZD7v5vrOR5JIwzsd417c\nme8jNo98rHEOhj4V8QnPbXTHG0p96L2m83M7LGu5pX226Ruhstrhn0jMWtHJ\nyUItPRvotkBcfCgdzhK8IuR/Ww3BHFrkYP1DnUN4+i++XiqVJK2T/JRzfXRc\nv17V+A4TbWy79yra21tC+ZtedvEaoINHOkH8GmDXak2yqKptEwG7v7pT1juH\nfW0YHwJq5tHqQ8Jt0opnmolGwlYcC8BSjeqS3+Bvshue3OHUXTyomfF0MGPp\nEwqiv5YT1PBD2yyo2gZl9dnMkEz/skdrPqXXgKht7Ol66B4BrTXWMdbwJ3qD\nod5VWkNoPhc79OoZwyYVWC5/WkFEQwEBY6EkvyywmEMxBCCFE4EI41zJG29J\nE4MD22yjQ4QS1jkQWObv8hFO96EJmMMxhLUmHTcGhiQ35Dy1vIQLEg8OJvG3\nM5Nc2ugeRfxZZwjenPyorIe27l0ygJfc/LehYQobZgIRDgbHBhlS+VdKSy3H\nUqmR\r\n=1tNf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"067bf98ef17d6b9faeea343c7812d975f683d772","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-08T01:53:39.753Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.33_1641606957687_0.6004134395754483","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.34-h32-blue-bd22eaf089acbb73083f1d431c23e297c7874fac":{"name":"@balena/jellyfish-client-sdk","version":"7.0.34-h32-blue-bd22eaf089acbb73083f1d431c23e297c7874fac","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.34-h32-blue-bd22eaf089acbb73083f1d431c23e297c7874fac","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"17d43bdd8c3e30ba8cb74ad97dcc87cc8cc85dfe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.34-h32-blue-bd22eaf089acbb73083f1d431c23e297c7874fac.tgz","fileCount":31,"integrity":"sha512-LRrOROGUcaaGJOnRyWrOxPALY+2n/ZOaa/Y/sCpex10vlfoPjSYkJm2M9O4GxNojNIKc5+YYL1ngkdKpeYYzrw==","signatures":[{"sig":"MEYCIQCS3m2YAs8lSge5AUj7K0wkuYyQie5zVCT38rSJPOpgcwIhAPVs4L2TYWNo2R5fyk9Ax+5i1XJXIgjt5D60Wc6JLTov","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2XKTCRA9TVsSAnZWagAANQ8P/0BlWpdOuHtt8sVNyrX0\navKbgSwpzkkNS9cA8w1WKEh3p8qNSLtkY1dKTbqmpck0ZZIXWqoVjcS3//70\nUjNlVz40/whEc86Lhnixl7fQbIHT424XPFHGMhiVDFfYupiRNMRfgMNnnlAW\n5eCqEMjNmIicciP+PWqwlTc5YC0jLCLFMD0D5j9Mg4UsPvmSrCm02vDKMp3a\nev6Qd7s9ll+yMcPQut7yKzbldrbGOedbE+4cbTqKNr0KP27R9HbUZ3yMi1du\nCNtqqG8JF4PAQqaZIqe7Uqu/RLue5r6cmjt7DsLiiPShELU/NGZHbfOxZZyH\n3brJ9QRz2hEWEi4fx3dJtU4WKF+LIFzp+AHRhwpfLue0/t3QDWHpTdYy65bv\nOW89+B0QzDk0tzzh5yw+p0xs5y9pl87v8brdjJA0dkcmUn8SYZE4VrU+4bOq\ngWAKVT4JpfE/84/toNG4bniKMRMI1P5Kj7n4KZ8b29N4wIU9xwMCt9X6tvbB\n89Rrg2khJFvzBwAZkCM0tR4SHeSLc+lhk7mTulyQEsMpv1G23CegwsleAk5Y\nK8RFO2IsyIdgrbJ3TI0KVaHozZ60ptoJf9Qls4FzwSbOEMlj/kT/ssYEErY/\nx6ZU4TkcfqkUn7bjNpvdQLa2L5CM6T/JO3mIVhM36sJ/lYVgysfvJUucPGRr\nlk9O\r\n=NN7k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bd22eaf089acbb73083f1d431c23e297c7874fac","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-08T11:13:21.242Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.34-h32-blue-bd22eaf089acbb73083f1d431c23e297c7874fac_1641640595452_0.5099628463131689","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.34":{"name":"@balena/jellyfish-client-sdk","version":"7.0.34","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.34","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b6861a29903eb2e2df38431a351635e2d3d00a3d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.34.tgz","fileCount":31,"integrity":"sha512-QEfhood0ci350+Ev1MJo9O910RyOZzplAPqiVzhXb0WwWXSyR8mlWpGBTNBfHH+jfhoY2ou7OqWcPbzLs6a6dw==","signatures":[{"sig":"MEQCIBWMqud+pvZrG6AVrPjQYf3HONf4AvGSrrZAiobuQEjFAiA0zOYtmNU67bIbLFvQ8r8M69Wj4psLpS0qqUUpfyKf8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":265715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3FXFCRA9TVsSAnZWagAAoagP/j3MKY3QJfbG1hBhwuAn\ny2zezBPX27ko+oSQEmfBKKfdGQ0Z68hLhE8MnAHcXoNFojOX+sdU6Rm/061D\nMIFkwA3jHuwbPY+U4VE1V3jC6IcajW/L7m3svQsJ5lwlXrmtjCCJx61twKFy\ne7Nns4acCSzmBlOZTgNcTcbu9vpKrNvRD8VsOeyz9c7pVYbDsbCwv2B27IiV\n3+h3xdF+Nwn1s6Z9xGI3f9LzZXjI29Ap33XcQE1OLYn9X42zz2TfGBNY1WHl\nb+xCB0OyGsPP2JoK5As/EzOKqzS9XosKfQlbRscqIMz2rP8L9wpftIocXy3O\nP5p42DCUyfbP3ZJyI5RAPDuU/QcCCzKsv9U8/DqtSvwxvjDQpGl3fMQC/Po2\n8oHVQBbdCr7OwTSzrd9E2Dnb9tOaEpRJ56bLrVEG5xnT+VhCFEjpaDnYLTy2\nieFr0LIFimdraAUfGR6y8GWdhmYusJNkO8CuGvAFWDPjgqyySmDXRSKwyRue\nWXBsISpViUEp+Uv6v/On2DXQh6G272vHvkOtFwI6K+RTH/3l6fxm61mKDKDz\nS1O+27U+CYgEIpV9/5Tn/YlQOJ2Wqt1jiYbpoqr0JG/Fm54yUwvOD9a1HjkL\nt9XZpCGzh/MMu5Fmp2tWNFGsUYC8H/Xvq4ntwAecH8r67Oa/+B08AFeFrgzi\nd9Mm\r\n=qf6c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ecd2267c321c25515c16003cbffd49c50b50ec1a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-10T15:48:22.088Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.34_1641829829520_0.4853174490430052","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.35-h32-axios-retry-548794fce836c2f6e471019ecd7488dcd8da12c4":{"name":"@balena/jellyfish-client-sdk","version":"7.0.35-h32-axios-retry-548794fce836c2f6e471019ecd7488dcd8da12c4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.35-h32-axios-retry-548794fce836c2f6e471019ecd7488dcd8da12c4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c23708154581f0a871c2ba598204cd178ee38b17","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.35-h32-axios-retry-548794fce836c2f6e471019ecd7488dcd8da12c4.tgz","fileCount":31,"integrity":"sha512-4jRPwbjKzAY6xXYkLJbQvpwid8xhFpyuClmv9VItYg+0NkN2I1t7YGKuss7IoSFP99usx7jYhvFIRFv61xc5tg==","signatures":[{"sig":"MEUCIQDawb4eA9MQkIMh8aRgo2JqqRg6wP7cMpmLPdmo2k///gIgFjPCVVOKRo5jVcByMcygGXn5V4umsdZCKW3QR2kc9cA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3FeGCRA9TVsSAnZWagAAS2kP/j53LPTJQfvIRFfx6/3L\nqHb7+HRtgqJ/RjBNR0rlawFsN54AViURWsTwPllL6hlrj7sZgWE+DadpbJJk\nz+4IcY6AkbRrwvTigz3rE4Ak8XSRmbj91cpWK9XaM4GUho9ny6QTmwbWNgEB\nuNh1s1+aDsqK5V6I9670eb4D6oCYrvUDddvUSCFEQTZBb6SSn29iXMtUE+g3\noXJhUgBqDyov6CZWha0WQZSQxmwazKJcHzK30IWnNHjxuoQj69RpILv+mmXw\nWWeSeo8vAZg8jYqQLI3eQ7fWJ8CDeTa4XAf3RSNxNGxVPmifhmS7DpKXV7io\nAVPYC0Tvyauuv1qoUa7lINj786sTRFzrq8K4dDq2TqR9ZeozxrerqEmbsOT/\nIfnX8S1xYrIiGwdtQTWkIwhl+QsG7AvbbT+ZP7uuz+68Gl4FCYByDChXhBmU\ns0HeqhJ8YMoLpQyDFS4A4vTeu77S2qvj9zj2t5a6sLQv/QchDHwg6G+8Se4S\nSR656wV7fsWj+gbEKIUDCRKYiaBfx0lrvRsfjaUI94tVhxUpA+ND9sSp71CE\nzmbugO0WDKSUZZriE6QSBJloc3HfiVbgobtSno5aOo3Og4Y78Dbo+YuC+8+O\nJy5olm79MZnPOlGjqSrlAYtqP7jiZSeT+kJAQNwb3zXirCJZ4+vplJLbWrpj\nNLi+\r\n=Lu13\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"548794fce836c2f6e471019ecd7488dcd8da12c4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-10T15:55:12.747Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.35-h32-axios-retry-548794fce836c2f6e471019ecd7488dcd8da12c4_1641830278337_0.5994774044673481","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.35":{"name":"@balena/jellyfish-client-sdk","version":"7.0.35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.35","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75b574a81bf2b5a2240c36c6935440b3925e6975","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.35.tgz","fileCount":31,"integrity":"sha512-mhs6KTqysRgU+PmNJl3O91xceZOAF2SoUvs6qBsDqeTaIjlzVEsVaj0G8xVzMMaykhjz3y830UEt111tg0348A==","signatures":[{"sig":"MEUCIQC1YaMb+EvJX42wKEV9oUXnkjQIxwwY3ub9+WpG6cM+gAIgOiMX+aEsKxuJpO7wWL7QY84XCd1FypaH1C1TEUZ6PTA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":266441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3rixCRA9TVsSAnZWagAAjMYQAJrAy2eDD9IeUT8J2Whb\nt9Jer8goF3seHhS/faBjU+VtR3sTbt2RE3jIugJyuJ+6lD4QrfSOavfKgHFU\nq9fldRN+vc7Xxz/NBLBJ8+N+YXdSKBz0O7zY+dh63LXazdW6TxU5EaoE4BG8\niFExQOVPBSos9UON2ILbq5Mh2/gkUbVlOnkRJbtORtqW96+yxXMiPXaHS4QR\nmv4rWduFzfC2M+H5Cji8wKXd1ZUNdNXPt93kTIpw+ydcjvrA33fYuGt5qODD\n296E2z5R3jjVG7IGIi6eJhXOIzTS6okZMJDanrhNzjEtbTpKKorCXdkORwRI\nxCPaU07X3dgzQ/OLZZqib5YR0wKbAl0KfanoNFEuv0x04JZxRXNyeEhHbKRc\nDYfU/sbx8t4Pfh8U+WRXkDPKnf/eUBelMOXC82GudFuYryQzGoZsvbt3+Ou8\n9JPaBaiu0W6gg9rIcfOZxEGDZdSCPut82V6GcgvqWuIRf1SMFryQpG9EB0op\n6NDzjtOgg3qYNAQbzu+OPr8FK045o0gFqWbKemwQT+MUXdBlJhxSkAeF26NE\nNKD3lG1svzYohpLjXfC3NO/DQ+EZSSD2Wk073XSfpcPKaKljRr9Ho8+VIFXJ\nCYA6/E+Azt8oG9QSlfZFqXHlbU2nXt3PJt/Trf7t+cEOVzTLNyjBo1i0QYEh\n2ahA\r\n=Sj9I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b861c3b263a40e21fc38fd044f23b547305d5afd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-12T11:15:12.049Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.35_1641986225275_0.6806784708332776","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.34-client-sdk-example-get-contracts-bbb769a57f50f4daafaba4dc62000d72ef0e2ed1":{"name":"@balena/jellyfish-client-sdk","version":"7.0.34-client-sdk-example-get-contracts-bbb769a57f50f4daafaba4dc62000d72ef0e2ed1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.34-client-sdk-example-get-contracts-bbb769a57f50f4daafaba4dc62000d72ef0e2ed1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bde83d2d598e8b8b5d437c87faae34a0b746d948","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.34-client-sdk-example-get-contracts-bbb769a57f50f4daafaba4dc62000d72ef0e2ed1.tgz","fileCount":31,"integrity":"sha512-oASjcmXaQXeLyiyl5FTDu9dbJziSc/Vp79ezPmvjY3Y3rnbkYKYnxbdMzyS0WYKEpMK5DQa3mTPDED4TI3MTRQ==","signatures":[{"sig":"MEUCIQD9CkQHfrFUndXGTAioGCgxKVGsJ0pUY/97UhVphDJuAwIgBZ3w0Ibdoc1kXpJmYXhzrEq10utDJngRDqgx+hVGmfA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4Es6CRA9TVsSAnZWagAA5HwP/1eNUtBAq4SxSfyjHRyG\nMBB69vPeQtAJmRdPTi6oAxfgMSfQqOSbMsI6JPJVEzPSWUavPNlXlk1aL1/a\n8bxkuYnN6PlOe+wmEVWrPUTZQk5U23b7YgbHuPekNF7YnDpBChC73NV1wAN3\nzAiJTVqjta8F9cq8E+d5pzvXcbQmAPFMa9YnH0QaB0cbbTV+ehnMpeosA486\nwcuZjOj+1L0HXanXqFE4XEuihXQmtYJkqlxsb7Nu3+GvBKKGfHbdblZZgdGn\nwLlxJOqJY3dHF4WiapkXyugXiivxEtGmY5/m2M1BE5+VUXjUlMZd2fNCfqEM\nxIGkKKaWar2Zr/Py3lkHQDqY0l0ofORh45kKzpzkxtCIIRPjQEFM9Q3fVoPd\n5Z1s0Cbs1bKzG/ZefDCx7hvoZjVwYB4UxM9Q+cN4foiIJ8hzG844NaOeQNXU\ny6tz0UBvxq1s1+dpXOpQ0vVBSEGWDDcQGgzpkY5jAK7yf+5i/yVOx13zmpks\nlJYXnds6173GnUouveABuJguqpLk8D/Klj51Dv1dgwSiplRP3NGGlIIlGpf/\n9QiVablvH+t4I/31TWIKUDjf56Sw8Nah2X4jk7a+Nl8Vlbz6NFfDS+9BazdI\n5DVnji2fvvWX5P+RcBBhco6TMMNcMbW96m8AsMbjf0cPGqxpzOWcLOtbhwVm\nWc0b\r\n=RWcC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bbb769a57f50f4daafaba4dc62000d72ef0e2ed1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-13T15:51:44.052Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.34-client-sdk-example-get-contracts-bbb769a57f50f4daafaba4dc62000d72ef0e2ed1_1642089274394_0.20694079365034845","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.36-client-sdk-example-get-contracts-f2709073c48bdca567ce5f53fa98bff5a1c90bfe":{"name":"@balena/jellyfish-client-sdk","version":"7.0.36-client-sdk-example-get-contracts-f2709073c48bdca567ce5f53fa98bff5a1c90bfe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.36-client-sdk-example-get-contracts-f2709073c48bdca567ce5f53fa98bff5a1c90bfe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a2dfc5b5bf0a03af3c7d05ead72067beed1ddc1c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.36-client-sdk-example-get-contracts-f2709073c48bdca567ce5f53fa98bff5a1c90bfe.tgz","fileCount":31,"integrity":"sha512-xaoysWhIKC2ZsgqRqnqJ7NtG16QaLPeF/RcvOTSP78OLoist+mBOAeBoxTVNlxIlVeGJDBVX+zInoc4iJgzz8Q==","signatures":[{"sig":"MEYCIQC5We/zgaN/+mG2GFfz6NwIiaVyUBOO9MFSj/9pZz2L0gIhAKecfcxH/7siewBaZDTgVWgIGNAZ7l4JhgfdCXFPpSJh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4EwhCRA9TVsSAnZWagAA0p8P/i4FL4ZA8h+cz9YZkXAc\no5hLs2h7wXumjzst3FVzdAPN5YUOkIqFGgXTZh1buSdx9Qb5mQMVab3f7Xai\nioQl+CeL47KvmMmoCu6vIWGZbZJxxPNSQi9+II72bkqULZpSfehm4zAXsq7N\nIDtdVsmZfsGQVMiPl7NanPqw4PeI58b6/6AyT0PcHcn0e8tCvFzInB/uLlL7\nYB8MOxtxmO8TIUKAMbTW17xMWhUEe9pBKh7YBJpjh+X25KFRvb6FZlj0r4Mh\nvuyw51FVtCa23rdvf7GxUKBRtzRLu1QFCfBmUK/IFcl+hujaLxW+Wq2p4xOy\nbpIegx80CDYBrMRrdzVE8Ta9VyEiqKeVn5hlpJ3dz4uL227MxtPASXvQ9A8G\nowjbTPtLYoFlpXXCmTI46ZgSgnwKX/Ntl3DdjmtbGkv44Smt8/nAL05D2wc0\neqZPpDmk2Q5dyHJIBMMMVZ8nFd9KttKSCTkKRtOS2SMb9kFiPKHr9M9DQWU5\nMjrgBY51AMkVb2kP5jfV++ctPZxtiZAdZ6HEL3AJZaeP5Kpxtq7E20O0hIRb\n93TlCf2EmyJcUR4rYcqqDDwaAKMn57Rsik8mcNAkjhUeubVl+70oJfNgOfpY\nBE0jlTBDNkXxsll8dpdzNrSCSlrlfvjMhfRIbPvlrLd0VaFpO7xUAOp/SIAw\nFdYT\r\n=2/WU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f2709073c48bdca567ce5f53fa98bff5a1c90bfe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-13T15:55:44.896Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.36-client-sdk-example-get-contracts-f2709073c48bdca567ce5f53fa98bff5a1c90bfe_1642089505341_0.29609846404366613","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.36":{"name":"@balena/jellyfish-client-sdk","version":"7.0.36","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.36","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"00a9ab44e13c6b838e3481db970a141521ea31a4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.36.tgz","fileCount":31,"integrity":"sha512-qZKSBYxP81vnl4P09pxqVUbC8jCzZ61h7X6t0jewEAsDdDzTEA3bkzbVvM2IHtWGJ/vZHVMXftLQdiNCzfdklQ==","signatures":[{"sig":"MEUCIQDICs8HBpdc31D9O5ZrPDAw1G0bfYPNB4hupnIxbQb9wgIgSxBMY/1a7aFli6pL3Qn0bSESe/hssRwXd4AxZcxmUuo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4EzkCRA9TVsSAnZWagAAblgP/03p88yR/jLatNsmaPug\nepX0q6DLKvfN41m4GJDtUnS8y4LWmTbxyQDMsxhBnow8WImnVdQQKvJI94uI\nNOfK+4Wjbb048DByBENHMZq19pw48gArjJ7Xy0DY4WMcRfHZ4HNEsiodx40H\nCIEJbgsOqJHEvVIc3+rTTtJQPwNDY8Mo0L4K2bI1oZJyhaPvOey166su2lWY\nTib0uxNSf+MQ1TgrLTssf3nO0MPhBCfobWbMdX5C7gnzlg4LMHAYRfJzkC+L\nPNDrpSoOgwg+c2Mo9ePFOXcU3S5iQx0o4VZmsDyb2NAqQfJyEtfFgLcj2lCj\nCOTU1p+ob3kYVqG+gGEaoIIB+RGs7VWEEN+meDhX2UXrC8Kgg4Io7k9vL3hw\nuK428jf9wehXswCchEOA3Dns8aUjwt0JXqAElMZd6KTc1L5QpdLsNqmQi8Iv\nTvkvVaUYD2a2E3JCTy9B13ka9qWn2UtvUvgFzXtztZcy+ypeiDDQWHtaRAmm\nwSBTZxQgeOsLgncEkn4en6m7kbiQV6GLEjwK0HDN4ex4FpV00EJTpyn7+R2E\nPbxf1UN3JxnbR3jJ7ZvvDHID9sVSMXJpSx4pIpsQI/XGZee0NBURLDedO0BY\n2zWcGKnTl5C/+pbzCM4hs2ueMP7Fi6fwThfYx/diNj55gUs9o93J2mrHztsC\n+Xgi\r\n=XAw9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e082617985fbc1170d4ba2da049b539bf5802ce1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-13T15:59:30.981Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.36_1642089699892_0.0041969602077687185","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.37-renovate-external-non-major-1eafa1839087ddd8e83aff5c32e5bddcfdb359a2":{"name":"@balena/jellyfish-client-sdk","version":"7.0.37-renovate-external-non-major-1eafa1839087ddd8e83aff5c32e5bddcfdb359a2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.37-renovate-external-non-major-1eafa1839087ddd8e83aff5c32e5bddcfdb359a2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c53a13fac6c178f780025dce8526b33a099e3053","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.37-renovate-external-non-major-1eafa1839087ddd8e83aff5c32e5bddcfdb359a2.tgz","fileCount":31,"integrity":"sha512-as2bB36oSVO6aZoJgBbyz6rIdNqwRzu+P76bcTp0Tn1aPbCcexOT5PUZW7ONVjBT/b0HpynmWFrXqnZS5JyMnA==","signatures":[{"sig":"MEUCIGFObL/YOEPxJ9a9gnQmkBN5cy2oiiVCfL6qaZ9Wl1MyAiEAsB7p86SdKsBkjVewdLAAn7B6BpSUvKpcQ8PL5VLr3Ec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4iAvCRA9TVsSAnZWagAAerkQAITWnN8/kfHw/ZkKKgL6\n1nIkCJppdIphhrjswBWwdUG7aP1GZnl78MlRn6myXEGBUXe9/XNaqVjzBih3\n0I5Y4V8I4mrrwc0ANni9Dmz5aG7+SOrS9yMjSYvLrU8ALwBA78b37+Kv5SS8\nlMF/quoDZJnipVm0uEt+0sTbW9Cy6QbhQdohsTzPgi19ZHFjiButmHjpYi0R\nHHoffNtQjBFP1qbOIPUfnrFxJmQ6jjZ5rKvC8iEAO2MnttLyL2x3TUcg2bok\ntxfS1Rrc55mBFYKRQfT1EN6x9Yztqg+Vup5I4tc+2h1FYRR9PgqRFMjK27OT\nGCeU4uvNIfuhVn54iNP9xAasYyBFtHqPGh7O6SX5wJinygrp50eJRtQq70Xo\nsFPSrqVHwhzzzWg+wuTfXp/vXDzbrcdy6LvFrLtRUC43hJGwYQ4D7o6JvnPy\ny8ldPJNYwYZvga4x16YEA8EDp8vnamqS6ptkDxwBSEmRfjGtM1eoVZx0zgZN\n3mgK/0zs2yJmVsocEO8uTEC4GHwFkSfRX3OFA5/W1llXOgzO8niWW/2lPmUk\n2BqSN9hB2olxOcwnpabenk1RHtsVcn5SjwpXRc8gfcOkTa1jPtFI4wwG5j+n\ndRJmCYl66VG/ZvLB4WGYMIbRMZLGsSM9CssXfvysQnHajnVN0c0PHYiVm/Ik\nIsjy\r\n=od/n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1eafa1839087ddd8e83aff5c32e5bddcfdb359a2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-15T01:11:05.534Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.37-renovate-external-non-major-1eafa1839087ddd8e83aff5c32e5bddcfdb359a2_1642209327459_0.5015902084266992","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.37":{"name":"@balena/jellyfish-client-sdk","version":"7.0.37","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.37","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9fd155021467295e035d94de262993a2f5f56ab4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.37.tgz","fileCount":31,"integrity":"sha512-xkKPAtl097C1xZ1xaM8H3Tgt/vw+U/S1KZE5or2oeIs5Lq7iYfpMh3fWq16qVHuOTbPAdpF3CePjKtGQvKmqnA==","signatures":[{"sig":"MEQCIBYITc9faWYOswNMg8khkrOHe2iN35npONYU8TGfFK/MAiASA811bu9Co4WqEz9E7nO0OKYDQlx7SzJ0T3jpZnfaYw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4iE6CRA9TVsSAnZWagAA3cgP/ir7K0W3UV6smsMHQ2Sr\nKyP2QoFsbYqbnm1jfRJPpBNESc2ChdGc8/GmQyI6JYTDXc+he9qZRJlzS9tR\nkSv/mfXRXzo3LmyFvrJ8gKVx36JQTGHOeqrJn6xPG32So2qaWxeTcoU+UBTR\n96wf0txr7eST4Ma9JCf2TIhLOr/Wa5IKDPGKQ4coIs362SQOhpdboC1/JykF\nJQ9QYXIpaHy2prJdnnUmaF3rhWllg9+IHC7WozHgTuQ/g6ZwAzpygwmZy0e4\nwuk0W/Pj0t2EW/sF855/nEIZS467kQdm0hOZLIxApkhOf+pTDz93Vv17Mau1\nxfFP1zgS70g43lsmuXM9E4pctaFGNMkGwX/GDwlqiJRLZ+iljMPxngpp6nGG\nb8XPoYFoqlms2UJOETzTrSHgxoDIbvC3ympjyuBfLZ8WbMJLU3LkFNgtcLIu\noH4SppvcZN5aZTBAOZx2dHlIIyFPVNDbLVTsRxdzt4R3hexUlHS57TS81f0w\n9pv04T7KxiyGY4fn53Eij1T1Lm+1kjQktmrnYaVaf47A0kpiTvePoDBQLw+0\nHFX1JhJSCSFnGLx0/+JLW3IenCjc9bjwS5IQ0QXEhkHDk2xZmZcSzkOHfWYd\nmCdy8WM8P63ExCTT/3JH6laY0eJhU48467byoChaep/neFX5LSP6ousVq/me\nGCNq\r\n=odTh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"88468dfe7295cb711cae33e889ca8860483f2bc1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-15T01:17:13.864Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.37_1642209594135_0.9283462338167152","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.38-lucianbuzzo-new-login-endpoint-09d08c433f201cf1b25518baf7ca0ccce1e1e243":{"name":"@balena/jellyfish-client-sdk","version":"7.0.38-lucianbuzzo-new-login-endpoint-09d08c433f201cf1b25518baf7ca0ccce1e1e243","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.38-lucianbuzzo-new-login-endpoint-09d08c433f201cf1b25518baf7ca0ccce1e1e243","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"17bc9477a1e9801015a479c570388ff07d5873c2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.38-lucianbuzzo-new-login-endpoint-09d08c433f201cf1b25518baf7ca0ccce1e1e243.tgz","fileCount":31,"integrity":"sha512-OJKD5Q6b2ljQlxYRBxN96+s8cWQprJyEdjK6xNfuPCj3kGdE6RY3eR6Wq9tIW2JUGlPkfqCD4vAp0QMLDkd/kg==","signatures":[{"sig":"MEYCIQCI6n3JKlt4Artvj6eTtDaUiJOl3I35HgCqBxcb7eN2BQIhAPgUwtb/zIzxfHwc5ObjQaflyqA97QdDifZqME/DbdOD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267690,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5WVRCRA9TVsSAnZWagAABo0P/2YVCi7ADGu6MlKzsQ7d\nK0FPtWWLuqKgFNLLEzN7uKfPpEiukHkII8o5TckPu+eNCThPl/BRTua5en+l\nw7k2jMuNUF64+9xhep43hncRlCzpNetAucTDZzdd3Cbcdu54puDslkbIqEiC\n2ag2BitjolhU86hT7oFgslL++2fazIC5Rv44e/x24zMrJ+LCbpytDICDahfr\nKu8S5IOWwL9QGdYT+4rctTSPifacML7cdGORqkcV4espw5/zRGx8zFRcUdes\nARCRchKPuqNBbLfISvm/372pVQv/xhY7m4SWDEx3FPeng+KJ+KUdj2mxg3u6\nZyHdFpQI0tipdCi7niePpT8dA6LP5hZ9HM1c+mYVg56DfGkXrBhcEF/ppE6r\nFaSaK7nIC0J6VDKR0fWMzGN/iDjqeZ9dN/nxEWOXmLkm1O6ZtSim/Q0QTgN7\n6X3dRj3RmWyv9aDeo+QcPa0epj3ojEe4R2MEV/DtvJsdx/01v+gwT/4mFbWw\nR47DMoGqg6wc2TlJ0d3+Gi9pNAS9bXyi/Kothd0GHWhK2uP5F9KJBXj8oP0N\nATlEj5Rh+zi9mjzzDQpQJLkIeTBBlXCmany8mxbL+XqHbPwvDgut1GJHTnKP\n6T9WPjObVTBmXXLOZ0T7G/8LcDCesd+ifiTrcEEDcAqg8WXHXPj5oSyqc2TY\nudag\r\n=TAcW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"09d08c433f201cf1b25518baf7ca0ccce1e1e243","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-17T12:45:07.805Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.38-lucianbuzzo-new-login-endpoint-09d08c433f201cf1b25518baf7ca0ccce1e1e243_1642423633447_0.42525487191525624","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.1.0-lucianbuzzo-new-login-endpoint-2b334b3d41bece203ecacacc0a2f4c7b51d1c60c":{"name":"@balena/jellyfish-client-sdk","version":"7.1.0-lucianbuzzo-new-login-endpoint-2b334b3d41bece203ecacacc0a2f4c7b51d1c60c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.1.0-lucianbuzzo-new-login-endpoint-2b334b3d41bece203ecacacc0a2f4c7b51d1c60c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bf18cb3509404215f4c8f01337a5bc0cea66c04b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.1.0-lucianbuzzo-new-login-endpoint-2b334b3d41bece203ecacacc0a2f4c7b51d1c60c.tgz","fileCount":31,"integrity":"sha512-VpbtGSrbCRcxFxKaPaY9ZRNHKV6XyeVtX/lJZ6Vj+/WdhT0+5dtEb0PmKmXD14I8U3zWPqBgPc7/zYq97do0ZA==","signatures":[{"sig":"MEYCIQCJeEvaCYPsN2sL7oxGQYXDXIqezf+HSxv9QpwNdDxnkAIhAK4Lg530gOwtSzWiv/SPpjDgN6FT9Cl335lkCjSpvKUk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5ZEBCRA9TVsSAnZWagAA/2AQAJq1isuADNZIGvHvMNCD\n1V6vjnOGyl+TgurC8HaXSGcXN10pzisR4nSOhelcp/D51djMYKxqBXfaUaB4\n390NO+VrJ5USifF/IGmZp/1tyDrEkCYBmU+S/LWsxAeOaUVTcfjr4IrNBZYw\nvRr/kd6Lg/qAIAxtq4m+TWBPQKrnk0yfXI4sYyTphlty7TH4GUjzEqWmEpHN\n8sbYGnZVLanAEdmzfZXGRRiNCl9VfiS10NwYz7zwNKaJpF1WSfrJcI/KvyAW\nOttBUzC1j3c/qXWWdzd1ai4WeU5UjRbpekWpFgxVzdiu0EwI/n0XCEbfdpzw\n2TGZuow5I97GcBEu7klk9yW3vfN7BhTZMpyl4LS1hqPtqSXAtCD9MtBn8UH5\nJ7uy5Wd2oyTektbwWfEZuqWST3P658YIuJ1QVVTBbqj40k/HY49tyM5cmEb9\nlE6YFvyfnB/GFGzcQOet4nD06b37VVDUn0SpzgSzDeDa+E8I3DOKQqM9Qbsc\naca3yikjkJDtrxj+p5R7zUFAYa/Z/bWrpy71zwsJR6NLwxRViEpRWwK87BBA\n0S0pPlp4vjp6f34rRqsOgMqKVva6bpeoeIEHjQITVEL3WBWbzEdK4UxGSzJg\ndX7so0rGnsEfEcLUWnt77ho6Q1uDAQ65wdTpzTcHJtzC3FlXeeX5hZZgCJKf\nmxCS\r\n=x+i5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2b334b3d41bece203ecacacc0a2f4c7b51d1c60c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-17T15:50:46.898Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.1.0-lucianbuzzo-new-login-endpoint-2b334b3d41bece203ecacacc0a2f4c7b51d1c60c_1642434817791_0.5519913147603925","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.38-renovate-axios-0-x-fe817873df2bb40c65721210e00fa638a83b81ca":{"name":"@balena/jellyfish-client-sdk","version":"7.0.38-renovate-axios-0-x-fe817873df2bb40c65721210e00fa638a83b81ca","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.38-renovate-axios-0-x-fe817873df2bb40c65721210e00fa638a83b81ca","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7b0796911399dcdf42729592867b9c48c12353bc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.38-renovate-axios-0-x-fe817873df2bb40c65721210e00fa638a83b81ca.tgz","fileCount":31,"integrity":"sha512-V+Vc+paSLmJYR6/easZ5n58jufb0esR/TOHWQkOiYZWwXgEzbT98bJXGGS7jUafka0Z9I1lbSYMEcT/gGfT7wA==","signatures":[{"sig":"MEUCIFcSS3sIZJHRJbxeRGjEvcSAKd5R6wNd+ZCzbgFl6stBAiEAgQcjsP7mabCk/vfyXS+UJOVniFg/4tbcgtNsXjTahTI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5pE6CRA9TVsSAnZWagAAaDQP+QGbwPOHj0YB80QWNb5V\n4ZuGQG/IFpcRyLa5MFDFDFF1kZh42hcpGBf8wRWekPPcUXFTBgnXM0aVRIMH\nr98ZLL54wgBS52NlwfNmtgYvyIQZvOMoG1thFLuFHh8nFpm1fxvRm+c/90mk\nTeBr0tohPj99MNmGEJNx/ajaMDx3up4gZ2V9ebM0D4FsfcY/GjBh9ag8i2qN\nDHGw7KPut7VGNSQpV6T1IqmRsEDbY3D8vkssTyDYJhaFXTdVcq2vkoF/m9AP\nGr2nUg1u6heULKhPOtI10HvM2Up7Uz64mTCUIApa6u6EsXBAhFvK/hps/Z5c\njYBz8JOqvhMq5H6l6QKSdB8nMsL1BuI2mU5cOGlcbMPeFWW6l+UrLckCWQsE\nE8xdfplc+wzxRfa5pAvZmzC7btBLbAYvjvvZAN+6DV3BH/2GicvOKUbo1jND\ndhSEpwhhcfOvLRpefg944gyRvO5kYPrtIhEUokpbY+3UisqRj1vS9IO8v/m9\nd5bMTvqaSoMv+XarglVMs6l7xjePmi1dYtEIqbJj1+4DlCXslPaIqdXxhMC+\nhN0tMHzC5yeNTlduEZP7wKwDK/USkdBDxmTcB3nykxMBb06xWRl96E8p3bhe\nlK5HhQeLg2R3/y4sw8oa6F4KoiTOmv772cZp6rVJmzclCIE7/7fKF+IDhCFI\nsjYE\r\n=bbOC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fe817873df2bb40c65721210e00fa638a83b81ca","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-18T10:02:51.901Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.38-renovate-axios-0-x-fe817873df2bb40c65721210e00fa638a83b81ca_1642500409937_0.3076845037763223","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.38":{"name":"@balena/jellyfish-client-sdk","version":"7.0.38","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.38","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"075fac8f41d3af18fb94661d04067f6609d3afa7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.38.tgz","fileCount":31,"integrity":"sha512-W5V2bTVSdAniBlChyJrf+35uoSVf5gpezkItlhCyMlWMA+ptLa0S8AxEpgHYFjVgU3PecDW0EM2/foM7Erl/RQ==","signatures":[{"sig":"MEYCIQDgYWHJek3yVWhT5rfYTt1CwBCGbiav5AsCsAQDf+04BgIhAJzonamYKvUkqjUmj+pGUA4W3sxO+gtw0eCmMzvynqyQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh56PqCRA9TVsSAnZWagAAr5EP+wV+CZNmj+SCHmA+f9B0\nXnMAm/zCN083Um4JHr8CoMqewmigL4wPNj5XCLErapOm5/RC/8pQTBZIpaLJ\ns8uHc+KIZblLskEe2RgMGuVyGL05qPvRRiJu9q5H1IeP42eDTwLnrP48RPVJ\nue56sWBGjesVlHRZ0oGDJqJzXE4Y/zQoTYgKjK8xrjTIKln0fLJ8h+w6RJkt\ngCjxw0yLCTxxFnq/Sr/nA69xfdLnKvVxu2BiHPrxwFJS5oaaguh7nTKopiFd\n6Kg5OTOWbt39t4iy1z5vLM3nsEOEq5t3TYQ0Vfsz/VIBwSRTbMXrpCwOil50\nm4eZk7a1/Tc3w/bikschvBFrx/FpEVFDIuIo823hrodj26+212R82joWaKWa\nBjv8qyZ01PCLj3jagq113VUxaH732socvuQjSJs7dFWbzvYC0F82lAjXQApg\nLYBDPWb3xbNwy7Dg/NL+ZAeCoOhFRe5lA36K/zorYzbybpYgItqURRzJjDdR\n1w4roDAEPNWJ07VYafbMy/sKv8h64CLeoTA8VU7zdEP8135SCVfNOIOX67QW\nydImC0olDhBp1eTnPXVhztn9tgIKsSAO/fRT+bbBPAE1JY7rg7+DYMsKhwMA\nbt9GUD9UNMYyBD86XtMdalAsmsvOq3exi4E3Tz+O5E+ioHd8x3xbjPUTmtvm\nxfvi\r\n=DVJ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f85e6cad9500ca789cf3b74ade7acf102ee0d494","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-19T05:37:04.505Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.38_1642570730213_0.9785088787125409","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.39-renovate-typedoc-0-x-f2f58f8c3135e14c28ca9b6eed557a0ccee8be07":{"name":"@balena/jellyfish-client-sdk","version":"7.0.39-renovate-typedoc-0-x-f2f58f8c3135e14c28ca9b6eed557a0ccee8be07","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.39-renovate-typedoc-0-x-f2f58f8c3135e14c28ca9b6eed557a0ccee8be07","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ee5b60d1dc654d427e224ad4ddce36db32177680","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.39-renovate-typedoc-0-x-f2f58f8c3135e14c28ca9b6eed557a0ccee8be07.tgz","fileCount":31,"integrity":"sha512-lq2MEGq8XfS75pc/yU3Nzv/Hl71H+M0ySnLEbGRZBTl4jWgQFOutgRCwwUbl9qyQJBB/uQVo3x3qrGvMeSkXiw==","signatures":[{"sig":"MEUCIH+pD3zJqRPztRy5cNACbqM1r4F/RsX1WCwV+yE7FA7vAiEA3tnmoYvJKdbUavbNHnJMqdf8KNGothjYfgnFvKySwUY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":268060,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh56VWCRA9TVsSAnZWagAAiVAQAI0w1cTpzVoKE1iRfZf7\nK+hFUWUIUEJqJHAiMywjCQccAJzA1IQ+vmFC6GwbG2mHuuVGv4l++rhF0KIP\nweShPFMSxExcayb0+3YWZyN7cL9LIjqxusEX7TWI4kVM+Sjm9JwIxdAteoUZ\n6LpfR/0rCfa7oUmpkuJR17HhMznlnefppGe6AFsnWC+e9kDBLkQlaHBfFm+K\nAmEZPUtw23WF1kd0ymCq+Yq4n2nrxYbXC2xzQuhZC9IEaVYKy0iQDga30HBC\nvrz4y3Wer8NofAm3DMBoJOWq68/sMa5t+AVcIiFvzUxcqayKhme70KdV3z5P\nlPAIg7zJZ7p8XbMKNSX54gY5pMDbuOCAGmERHol0+wc9e5roByjm3smbET8Q\nG7v1zYkGK5LGECJe3PPqZvqONCCNQKsDQJmx3e/p2wUgOLzPCqub5LevrEms\nmMZ3XMOMiyekljjYTV2JCAdiD2x2Rgam4otPb2J/SWDbxu2UX2qyHtErUJ8n\noQEyqymNXJHK5+KIhu5cxVBDocEkMpY7im9YKsSzHBMfBNeWdjDHwfPvhidb\nkWHLjObbm0vpwYC6S2lQscEzrM6I8+F5NLHrrWSkgVKwPWSdIdgM5iezqdvr\nw5RavvsYrfpxk71ng8Ybg+8OpM6ZI25TZ6TqQbx+iitJB/a4XEw+bBYYMo05\nURbw\r\n=bvS0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f2f58f8c3135e14c28ca9b6eed557a0ccee8be07","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-19T05:41:56.485Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.39-renovate-typedoc-0-x-f2f58f8c3135e14c28ca9b6eed557a0ccee8be07_1642571094199_0.5736454174556775","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.0.39":{"name":"@balena/jellyfish-client-sdk","version":"7.0.39","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.0.39","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7a4aa17837dc7d8b26f16a288330349b29548dc8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.0.39.tgz","fileCount":31,"integrity":"sha512-CqVUjVv5YfemHBcrKZgCffj6WLoP5f5vmpSmAuldSgvawtdRxoRDHUeW1mecV8UWU1iGWkU1vKQmiOYrPfKMfg==","signatures":[{"sig":"MEQCIAxlEfs4YV7/5P6A+8C806o3/p3mM9ymuEtkcSR1eDskAiBmY+qT8893jotH56KgSZPThKkymEd7XO3UkvPXT4KGDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":267998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh57BzCRA9TVsSAnZWagAAOY8P/jrzqAF8e0ULkgxFZpZT\nKQ5OOkCWhOan9NmcOxBjTRR/PDe0CjvgJA5Nl4Y5s+g5tsReN+YbBO5Wc2YV\nI6Ghvcj073k2w73ksb22UK7dgKuTJfvEBlSKkWPaPMpQiXrQuhgiEur6lfWB\n7rPZlz92P0wggSYatZVqjnLsU0QCJkFtUNeL4YeAAAUTyxce9vk637leYWmV\nhbsm6h8YWQAXUZcONeuqU2ggY27QYapBWFxk1X9VUWqq7GKiKn7gX9fEsCb7\nhdm3lxE6hfNJTevwoZPBdkjbCrUryoW2Now9vGmzutsQlFrUfbjB4+iIKzJa\nVX1rPbZtMiPaTD8Z3wOk04Zd5aU2vF7tLSBHYiNFtkJsVZed5jzuongBBi5Q\n3CGleehh8GmW50j1wXeyPUEnGlu+wyhXOohJpSuvOE6ERnFut0/wMdC9IcK/\ngr+3u0la6gf9F5pe+SVbQdAwDfYIrGB/gEu9An8Qm4dEq9tqgTlovmvDidoq\nY0LL+9WJXIcj5Q07/0Pl1ntDjwLGQ555SfFgeizXHYdyDsiB+eTENwGZAdZ6\nGAJFcmhc9rqLpp8wuniVxV/Q188D7QfhSIUjPmf/m/JcYmC0L1Fts6wmFCKs\nfMN2hbN5BA9oGl8Ew33vq5CkuwyKQlmPgduGgfYVahKv6eEDOzyAba7gVfux\n+en5\r\n=D/Av\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e46c90061733aea921d1dc16425791d9e0315389","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-19T06:30:17.838Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.0.39_1642573939310_0.00952000221006899","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.0-lucianbuzzo-new-login-endpoint-fa51fe694663a74d823de3f814272cb93360a326":{"name":"@balena/jellyfish-client-sdk","version":"8.0.0-lucianbuzzo-new-login-endpoint-fa51fe694663a74d823de3f814272cb93360a326","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.0-lucianbuzzo-new-login-endpoint-fa51fe694663a74d823de3f814272cb93360a326","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d6fc88598ce7629b2b412e5afcde70350566a5c0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.0-lucianbuzzo-new-login-endpoint-fa51fe694663a74d823de3f814272cb93360a326.tgz","fileCount":31,"integrity":"sha512-OLB7GfxUIVaiUu1jCbctfYF9avsTyChtPp5uLnZyi3D52bNOODiQk+yo9CCtVut7rcUYaArPgWG0QPt7AZlOeA==","signatures":[{"sig":"MEYCIQDtlR6Cza10fLIEOYRzjHV6caCbwoFCwg7FXzVidshrNAIhAKfSq7PJjXRiOxI45liqZJAYuQXcElSbC4ksYXs3uebZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271681,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6AMZCRA9TVsSAnZWagAAuXkP/RRNCR77CzlmnqeXqWzF\n4o/gguZunokYP1OTkpb6sibkuBSF7Eg4wS+HpM+aVp1J/Wu3v0h5BixCrmOn\n+ndtF7eGz0BoXb/i6qU2t2YlRyee3PesgawZEcUamW6C6NHWKPfg2JbJ51r+\n7Mw5qMFKGz5XYJavZX0R3TqOn9GXM1mWyZ9MeLLrNKj9G+ZBQrwBEP6CgE4M\njkPP4e66jxq5cFgAvBPoBtc1PieQqus11iEMpzv6e6ua49eylcU36BrUwj1E\nnjrdqcETmcxWb8AyuHcHwzYk5kd7bXVIQDb1JiwYP00V3qBt52jNqUjIg8J3\nzen/quEioCaS6GpSB257ANQW6OnlMUce/boyspogAl+zYIrpY+LXhq6py7Kx\nmrExR7n3IUnG1/tn7Nr4ln8Hz3A30Chpemq/vFoRnzpF8gh4tNdtiXyVN0p3\nC1qrHkbIChmIWAeWKH/xSzgtM+cGhiW1+UkJyDaLdvroUXZFFnPNf3WkpiLm\nKCNUiNxz298lzHyeq4+gbM8FYxoI7iHzP2R/FCkYT/0KE7kHIH8YW6uLWBNe\n5F/gY4DXMX/xj8R72zAnv9WLelXJs3WTdJQ6IehAS2ujEj4JFrLtT8QEeZdx\nXNCE8pA20B6m7EnEBjU/66ljuHSWWK0EyKz/gW7OprxsdattQUf0lfHJutTw\nZeM4\r\n=eWMe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fa51fe694663a74d823de3f814272cb93360a326","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-19T12:22:08.979Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.0-lucianbuzzo-new-login-endpoint-fa51fe694663a74d823de3f814272cb93360a326_1642595097499_0.7703838563005396","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.0":{"name":"@balena/jellyfish-client-sdk","version":"8.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ec8564af5a3cb8a8c7d39174fc117b108fb48dbe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.0.tgz","fileCount":31,"integrity":"sha512-CZ3UBuDYjIVAw1u0zLWpjaUPRwBXdBQrux+a9bfx6b9np+stgXSK3l4zFOW9y2I8cc2n3UNee1EN6+xurC8F8g==","signatures":[{"sig":"MEYCIQDmKZu5fq0LeHd/IPYKOkymspVGx2rhNLABTP5xxmlQgQIhAKBwM8Opx91xSvdWn0oGEaWCvSxTF8qEN228yaeyIQaL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6u2xCRA9TVsSAnZWagAAehwP/R/pcdD5iIrq40dSxicK\nGSutjr56kHOsfBy40uJTvb/hURsPavhUfjJz/JgnVUH0mXCssfUDZY2lGsHi\nDaDrd/Y/iO8XhgL/CiGHpW23VrgdBC+/BeoV9Ne3ohoQ1GlPI8btrRGmTc5P\na4uPspscnRZnGtyvZjcni/Jr98N8/wSj5bGuEz7Rswde9lwSaOhccg2/a3p5\niMOY3zX9gE5zyXPbBaetZyMX1xClcTxG2Y4/98olRisvW85U45pzyCfTLBfB\nkuGOkUmyU8Yq5k3jmK6XM/zdNekmqdid/xh53ZFMdMFeRjcqPoeZcq9qeVEP\nGODOmSFBL4TrYpTta9OjkJ0xqIWVrE/3xxSIzO5w95ve6KC8e9ZoJQNfed8n\noqYtA3PE1NJHISyw8phTL5vFUgftgUbi/qwaA6UuVG/rQmM0wVrIwEFI2GcZ\n3IfqR2q/VaawuW+RHhs1nSD2myYA2iIPUv6MDesZrI84tnFbsXCxtCrES8mD\nRzUPjLScUegW5nfMRyjn5N343xqJCDjH26hlQh/9nG0T59h9GDMIie9Y4aAo\nn7JXE2k7I7epv3P8ZwxWtzCXObfv/BxDkVkHH9RCVSukUaQ6gzw4sucIhAG+\nTsYZ3HMZPmaEoDDWhQl1Eu7DwCIEfpaJXi/CO+jMaL/hXtqzHtqyfPDm/91l\nvZAn\r\n=gJkT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"23125c5b12920469c3d83518e9127c4f369aceba","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-21T17:28:23.155Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.1.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.0_1642786225452_0.48014027229933975","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.1-renovate-external-non-major-5f7b944cc4d220e6ff782bdb0435028d9007a257":{"name":"@balena/jellyfish-client-sdk","version":"8.0.1-renovate-external-non-major-5f7b944cc4d220e6ff782bdb0435028d9007a257","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.1-renovate-external-non-major-5f7b944cc4d220e6ff782bdb0435028d9007a257","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0286aedb96aba8e82da982afb69a8ef9d3891ff6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.1-renovate-external-non-major-5f7b944cc4d220e6ff782bdb0435028d9007a257.tgz","fileCount":31,"integrity":"sha512-0PUcHnojlabN87c8C7TUKnJ1rhCKinC9qShiBR8fpxo0wTrg/tnbSiHGWN8b5KrqehlcQpPMn961ilj11CmX9A==","signatures":[{"sig":"MEYCIQCfPfRLxLOhcVGViLLZXXppssDXjBiIP0rLvEIh8siFqAIhAKnR1P/U29/8vzH/xq6sOntE/tfjlvYkTjMGguxe2SeI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh62XOCRA9TVsSAnZWagAAA4gP/RYwsQi7RDfEPxpbmh6X\ngESLxeRxXTSxiUtyEMVg18xGm2DVIQ+b49KLR6O5Ntd+3ZqdrZNF5D7eFt3j\nU6pmPCt6Vrmq7q7mdb0T+TAOLDc+Gjuy2ePmw5XJF8VRFGRUOeN9wAR3EkqX\nGZDdY6U9dy2sVELlYMS+dYjTwNWXs6eGQsYMSazldsE+HS4JfPMCDvcMGuPO\ni5UI31bFq3ebDK4pOSsIj+/DmUUEON0F/F1y8Q9I8EhUcrYLEn+S1fqIxOvj\nDJXD606oD8mwbIqW0EQ4lEFoGymZ5yC5zUnKnk7egFzAgo/qGGAwZE1syHGt\npFaRMD27o1U8qgnSn6ckQGXLEhslFET/S+C5JX9rcJzYNRwTjlRjfGKpm8ya\nzaRWXhlcc2j+OMPy7DMxxhR2tY+Y4mvSfCZETSPL7/vu4DPM051VZFILmVBN\nkmlLnoLxKIxejjDIC2fmae3p89IKig9PAl3P5om/cuDSKQCmq51jU4Lw/OAs\nq/b8ygKVjVoDmZwlcEJZWLryGOhMBQidClNEBCwRydqCuKju//f5wUjDeanB\nuoQ17/VF2FhmV8AjudKyw2Ubnfa7Gt4Kkc0AQD5UiiOqNvy19m2nYAvh+/x+\ngVmbgTVyCD5CIzhOuEKb22sZuGa3Kzl1eIgFMkWFLseW6xv+yeqQEONVkWDR\nc8SP\r\n=zpM6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5f7b944cc4d220e6ff782bdb0435028d9007a257","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-22T02:00:05.777Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.2.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.1-renovate-external-non-major-5f7b944cc4d220e6ff782bdb0435028d9007a257_1642816974369_0.7956145959857925","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.1":{"name":"@balena/jellyfish-client-sdk","version":"8.0.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"59862e537f2d3e535d0b6afa0a7a4e316a8b7401","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.1.tgz","fileCount":31,"integrity":"sha512-xtpvNP7mxUUBdRrLl0QYPEpUTBAh7v3sEm8PjIE/Cltp8GGeoJQ7EKzWZb5Ax+4fXdc2vn+eo3Dg8vI2ffnf+Q==","signatures":[{"sig":"MEQCIF6oRRgh6kJWbQjkeirutLNHUkN6oM3+/Bd0iaOiroGbAiAzcytF/EW5uUW2zGpHCFn+xQAhlWqLafczorM6w6urog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh62ayCRA9TVsSAnZWagAA2fIP/juFqc3GjUQfmZBCZ6mR\nwYToqzaSJxhhAuks1NoMbm8RTrza3zAFR+oVZZ1990O66eEgkpMQ1FRnuPHy\n+3iP4jvDZCvl6Wqk15vdoggoNu16ucBPyX4zoRZKTwcjptB/hp+aWXSuayS7\nsdGRs2awLlA9L9YCJc9JWsfqsnpzy0oLTUG5vJ98uedBDuji9kUKyQEK1q6+\nVpizskI0cIoy/h4aJrvRlnGYslNvNVvAuv7/N1Z4mnXnbXff04+FtPDVNsVu\n92DfcwTxtDo7wWiX0Zbu2tIrMN4lOpJ0w3Qv0mMi1dTDqiEI0IX0tWKtDkZP\n5GD3TucZQ+A77n9EECTjZ92esjBHTBOK/sJdJlalZrvB06ONUmZ6yQGf4Yq+\ng9LtGjx8yvz5RlMIvdBD/hvvRgIc1hN7v4MfdKSVERNfAHW+w0h6xsLpvUGu\ncZ2YMvVjoO5vyqXVswLDXY6AMloHnGDJLDrWCokE16k1MHMAYPdJTuu15/dj\nWDjaKpHvES1BmRtvf4rfl2djIAGOhfuWX9PKfqM13b3DXtbLopFjIsIXAjX8\ne3lM012ksfxnLvPBNjQL8znH+m8rPyP1ECiIJ55Sv+i+gy3eXOAWo3EI71hL\n+QWKFqotD4O9dh7rAT9D2H62fVE/D9DEt1eluTi+ewZY5L+jn1+FnFjEX5cs\nmH2J\r\n=/v9P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e1a57cce2ae37ad13f402612b6f538448f34eedf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-22T02:04:54.162Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.2.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.1_1642817201909_0.025222157320966998","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.2-renovate-external-non-major-ca6d364201913279f04faf23d064be9f5600308e":{"name":"@balena/jellyfish-client-sdk","version":"8.0.2-renovate-external-non-major-ca6d364201913279f04faf23d064be9f5600308e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.2-renovate-external-non-major-ca6d364201913279f04faf23d064be9f5600308e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fb9d06fdbda5164deaa66c2c6697712e1ab75f27","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.2-renovate-external-non-major-ca6d364201913279f04faf23d064be9f5600308e.tgz","fileCount":31,"integrity":"sha512-hy8hVWy0nbogwtP9JWv4Tn86e+dlhCD1Ue7n5q6TSboQomYBSBwT+7jrPDwtVjana+ngNMVY2vNeRO4UmXRZ+A==","signatures":[{"sig":"MEQCIDnDD5rexclsHsZ2M1bfYOK76SDoP02++6dVR/k3ZIywAiAcm6npZCBRqmBQ9jj4+NNJyxj0o3FdpTP5YCmc3RQLrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7UDDCRA9TVsSAnZWagAA+acP/A4HIfchTiLvUX6vsvq5\n1SHgLs/pGv8wQSsUMDnuGXYNVfUIsZMenp3jcgade8MmcSjjgq9sAMQHeK+q\nfFG5HdJRL8PONYAyiUSGdVEpBNwlNypgYhJ58GZgyqUjxZC4Xi2Q7wVCydO/\nMhQzG2DjsE8ttFU+AzQvEFyoHiM6Js3npIowt7++AQ0WzeDYHXrlCUuy2wdV\nEl4HkKfdcIVtRmjRgbKyH3Q7bezhBDBm3PzDPJvXCVgF5WFzxzcjQZ/RfyBm\nbrNI83gJ01QIS3+8ltPeDGjaUk/KGLTPc2fsD41RpIt6rZbPKAIQ17vIxYLo\nfWOE2zVQezxxNOLvDW+mqEAVhpyuudCXI/hxwpQFnvZVDypPmgjbBkK5wAko\nXS3xoP732jqT7TcQV55AKiKUYrBO1wh4pnxxlnoGhGeBB0UoT7M61AMKLpFA\nCuJX3Il997F3Fd5ohyvBpMPYntrs7OFZx5DLL006EDNDFKwXBo5UchAPbMJf\nyw79FUwPwsGydabTmSizTVm6L23a9ncxgN15XzGXdOEC37fW6cVYt/2A3Wk/\nKHrAjMxGPftu1LpeG89KxFjgMPzvW267InHMLmVhZP93pV7iesiuay6QU+wM\nEj+ETHQmua6Mw9otdsD7+Aeh+hxspYx+kKSQC7AkBrxy9KA4crNlg3/ShgrM\nMhgj\r\n=/5bR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ca6d364201913279f04faf23d064be9f5600308e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-23T11:47:04.838Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.2-renovate-external-non-major-ca6d364201913279f04faf23d064be9f5600308e_1642938563674_0.6212327544327336","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.2":{"name":"@balena/jellyfish-client-sdk","version":"8.0.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"09bb8a7f848dc1d8b4beebf075a4733ad427c294","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.2.tgz","fileCount":31,"integrity":"sha512-dfPm3QX6g6V31wgx7HZknYtM2V/7ATHcFqOm60yn1wQQ4g+qAfMZTc1MtpwNAYYxi0JJci0OPp2ovjjEXHKrtQ==","signatures":[{"sig":"MEYCIQDEfW+ENHOPpZ4rmk41u7WI/adA1M+YvMb9HNnNXs/MpQIhAMoTE82jFrKSqALpRjqTXD90njV/c8Ytu26hP4mHnAsm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7UGCCRA9TVsSAnZWagAAXK8QAIXJ5SCnm5SfHfAeMSLV\npW4I9hrDEbEnJJmKHJAL4ZfqTXT4Q4kZEcnGWkJKxRvaHgCKKrzBF5Qcc7pW\n0UYQhKFn7NHWt55eB0GQ/rtu6Jp3il7TaqILmGHqaszVXgcGvYmuxswDaVCm\nhBHePhgCXtNkcPNbauaAeKXbF9R3UYL/CSrimphuRqFjOVvF0shzS3QK+wFx\nidCU8yXM+CdbIomQ2Q1ZZalb41NLzLdqDJ+TmQRH9s6X+b6ZuGBaVHQXnwtS\nd0YxxdKPnLn16iEr0hX/Yv2R5CEFUMwrl2KUHej9i4um/MAlZMVbiWalzAAx\nxWvXoYQeUE6/S4FdZtKfZHPiynpP4d65T218k3v+Uu6H1KbJ0As3iEH9yUqc\nKzcYvF4q0Ji3bPs9Fon3WD7HDtISRnBWq7XKcbmT75TYCCwykXN2HvKRu5GO\nr8tf5/H+DpXAh189H427qKYJZeLwAxGWCvB/oD3s/lktoi9+0OTTpjmR/8yC\nYgejOPseEhFvswJeRTja5BTcqSBcchtMTrlay+1/JJO4CCRxZB5m8HjYyxKg\nv6ik+PHkJ9/bi3CsxmeRwvjE5cYSLmoilE1PdekV7kzvv82ZI4JDXF5YNZTy\nglaRXlfh5MjTNyRLZhTzKH8aQWJrFRPBxNnTN2Qj9UPcrOKMAsxMINuwJHFp\npQdE\r\n=uP7q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dd0c1dd7c2c8cb18ac4ff5bfa0045f07b507678d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-23T11:50:42.932Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.2_1642938754294_0.8689455790265412","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.3-renovate-external-non-major-e52c8dda52ded322c7a3886ebdbc99c32ea8e960":{"name":"@balena/jellyfish-client-sdk","version":"8.0.3-renovate-external-non-major-e52c8dda52ded322c7a3886ebdbc99c32ea8e960","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.3-renovate-external-non-major-e52c8dda52ded322c7a3886ebdbc99c32ea8e960","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"850b40c39b9ad51ed294dab9f553c8b19a68f0c0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.3-renovate-external-non-major-e52c8dda52ded322c7a3886ebdbc99c32ea8e960.tgz","fileCount":31,"integrity":"sha512-3kHerd2CBZDPEAfjYBZUgNynWmaK9aJhXCU6woZjbbFQ+HZSVp1gtxC3EvgtjuYcw3Tx+/yyrRWNcSwRlgrPIQ==","signatures":[{"sig":"MEYCIQDd1HpJNl7xymhud3ONXGBZjhCr6P2LroiZVvZQWw2FwgIhAMLnWTXWuP+QGVpEqtWixZUTWu0Iv61MeVTulGpMUZtf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7XKyCRA9TVsSAnZWagAAhZUP/jiYWoSVQQrcaopCnP5b\nBezw2O0mUwOTeiofGNMfl9cyWFPA16xKBEbpvhLytpNIXzCR7g1yIILXuZ3k\naMrsADb2IaGFcyBE4EmvWLWHPGv2xPBSVhkiCQqmW9dNv0uibBRrWYuL2BRi\nOHoBtRrK5wRjOv+M0bAiwvZ69bAjguqPsEDVsO0vUtin4WjjxjvPKaBJIrNj\nwhfbbHBwqhKtoINdtEBHf9wvZnJKbYu+1Fu3SGXa8wEA/qneKG7pD2v5ZVcA\n/eu/5i+LsfXsnExeeaHy3wJR59tbL3Lsbuy7r35ONLUUVArHyAygBHryVyOZ\nUWqtg6GeminBR7heD7/11Rk1Kibb6teWrAHYIdnyjh9AEqefFxeYvxThumrG\ndMonzc7Xoz7bl8/bBPMSdI28CbaIttcDtUPozJvRp8UdBMxDr59HS2UhFjYs\nPt4+/gUlKx3K+q4CP6DsZhjtarn75TNM9E3amPZY2gBdMxB1Wn6S9/T+IhKI\nzVxq4Itx/DgyifpXvZU9A9NO3u+dMINovmzARAUYh+VN7HXu4f+V4ehQUFZ1\n47WGx/VPTBmZytq04Yw/OieKKe1SBz2uYcFm5BahHlbR6/ivmgUJDxvnCbD8\nAutzsXkCiI2enDTeNF0nnAZfbstNZvc2yIK9pRkJvfBQKVTcG3agHYAeuPDh\nPeWl\r\n=IhUv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e52c8dda52ded322c7a3886ebdbc99c32ea8e960","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-23T15:19:45.218Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.3-renovate-external-non-major-e52c8dda52ded322c7a3886ebdbc99c32ea8e960_1642951346498_0.6000208123223039","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.0.3":{"name":"@balena/jellyfish-client-sdk","version":"8.0.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.0.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"58ad726003d1c5bb1f1178aaba951270f3cad992","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.0.3.tgz","fileCount":31,"integrity":"sha512-dHsKEVxZ/Xs2b9c4/4N/zd2fBvqV79kWlpbU9Pk0JiQDbFLSUgcChX/FibzStqEXUEKLUesuTiItV9nrYKeW0Q==","signatures":[{"sig":"MEYCIQC+4A4UuQ9t7Cl+4TSDB7140D/gTYPgdkHEKC4C68PA/gIhAKCVBiNHmAOqZDmbLAYDpTGU1ToSjpd4lqx1tMR7gczR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":271861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7XOKCRA9TVsSAnZWagAAglsP/1tnvhSXrhNewY9Plkaw\nekznlRWh+tO0KdrFZLwx3ihIvfN5mOnfow60ipTeri/tAAxM+6F1zGgDca3w\nTRyvzWNJ9+LyafFirTXCVkrfm9L6TNdRAQdvfomm7zo7nGOTfqQR1QMUutRX\niU2NLsNEOyW8EjPYWaCs4kGClz2G7Exg4ClhYAJRLdZQ1+GqwPd5jAYmNVwu\n6Cx8gC/XnZofdU9mqEoHdzIIXCpyWVJhle3YMoO5AHVlOMPOrhhUpkXWEBeC\ndc4lDvE3t0HpvNkS5bPcpUaAriqSKrdJO02dBrdXw8AyYx45nyITr4WJSDpR\n7m7Qczq74u7Qj1+pyvcy9tXkI4NYRbclxUkk+/wtaUzmxcZTSxP9Pn6L6w7H\nSGxwUBghy9ECOGupTIViIzQxOucBiAu9wVaifvuWmMiSMokEv3Y7dk2IWul4\nHmNQYhGz97NjFYeqBSHzvgjCq/TLP0xCVBLO7g8NUfSIkN6FuxcJmmyrBeHI\nyyRPWCxlhnrpbuJ+uTUIB/yF40Nq/xvqficmvUdkel20nJA/7VYO0q6vXwjB\noshSsqF1geZAz4MIEY8WjH1BXyUDhHlKW2uW2TOASojkSuEfIaGDNDRLMaoG\n/HKO+AAvUZib6o23Tnx7RQLP2itLgUJQF+bmvJ8CId9CK+npIPmlVPM3OOO+\n2Rhg\r\n=a+eS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dd6c53c5eae2c55b6dc350118e0a4187f6df60cc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-23T15:24:06.072Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.0.3_1642951562537_0.3874046990021447","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.0-cursors-9c3c80262dd877b06c4f4fc29890249944ba7f84":{"name":"@balena/jellyfish-client-sdk","version":"8.1.0-cursors-9c3c80262dd877b06c4f4fc29890249944ba7f84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.0-cursors-9c3c80262dd877b06c4f4fc29890249944ba7f84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"000cc1bae94cbde5c358275a29537a39b1195ffe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.0-cursors-9c3c80262dd877b06c4f4fc29890249944ba7f84.tgz","fileCount":34,"integrity":"sha512-o+qLn7OPsCZOwNCjsNvoBoS+tbBRgaN+SMnbXb+uMIOvXHAzuWO9+ncx+jZHioDyoNjwo65h+GK6aAQYvrMiRQ==","signatures":[{"sig":"MEUCIQDGfD4zVDOhWQ4WS2c3Fbg2OAigvUlksegzFyKQK1BsCgIgAPuNGAxDcsqaRCgdregN2P3L24zuoaH0GV7q58wlDVk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7tEiCRA9TVsSAnZWagAA+DsP/RmjxpQgggFn/xQ8mYwu\nYwiU8HnaJ0diTPhcdfWkudkNCRIvk6Yf3aB379woBPgWSRSwpzwUu6fd2DHZ\n4TKCkwCboig80DvWcOplquJ4hOjJJUNH0HB2Cd8g6tRO3pd8N2XAn18DT5xC\noILUF9mk7wwhQjnrL/nCh8TLtIlpFngQ3iMsLZOLvcHyz2kqwVQKEywPEtFP\nqLtO1FXuAh+Gcd0AJ29cvsl0IVayM1WKpKhtH3ewzCCTui+aatc+oHsBcYXg\n50bPYacW7gyc2JDzpdUlRlzoqsdXgoLkpvkItx6mcppaE/ZREANj09QDGxGV\nn6pCi0aOlNOxlR2Rdy9//xkd5BRQrEsIzHdMQmGzgQG+ixXitwVaFrqswu7s\n05Xvn2E5CLY8Og8dWzEdxI5Zcz4R0Gb48vHoihoTfuaWK6jqAODeaYODV+64\n4YiZy9nCT46iEqbFmnZifoD037kSHbS0hwt8l++u1ZOGA5avC0A1fZmVxgxF\n+IgKS3CUpYw3VirED46yZStICIl5qfVcwcguBKkSt+0h3QeQw/3vnP//db5x\nK3PA83QIFOLrrEvkEHgk3j/i6q6+EWMzMz7l8oIY9n3OCjSawGAKsZDUdT4Z\n8wK3e0F5fEBdkW2LAI68fhkQZZHLdWSGV4D6wWIU8zE4uwMM6L2VQYo4YR9O\nOuMb\r\n=4Gqc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9c3c80262dd877b06c4f4fc29890249944ba7f84","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-24T16:14:24.224Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.0-cursors-9c3c80262dd877b06c4f4fc29890249944ba7f84_1643041058120_0.7871455665897251","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.0-cursors-869ded43e74ea9289adc5d8b8d39012f4aa3f4ff":{"name":"@balena/jellyfish-client-sdk","version":"8.1.0-cursors-869ded43e74ea9289adc5d8b8d39012f4aa3f4ff","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.0-cursors-869ded43e74ea9289adc5d8b8d39012f4aa3f4ff","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b6cc0c0716c688329e77e5c0177ded8156655fd5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.0-cursors-869ded43e74ea9289adc5d8b8d39012f4aa3f4ff.tgz","fileCount":34,"integrity":"sha512-pHAe23JQ9ST4aPtgJMP5032mbV2CXxdRowkkEHvRgaHg8nfg/DVL5hL9udyXlPnpmm8p5n9kgzD/GEAla7k+XA==","signatures":[{"sig":"MEQCIGqEKE0rarHcpTRV7rEpD5+/7KY5fLZhj+lGg3AqSv6eAiA+BNT+t0bqls+5H71IT9T7TAdSd2JQHpCZTi9pEJ92BQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7tHHCRA9TVsSAnZWagAATIIP/jBL3IL/BZ2TwNjVO7iy\n4qLnzEAwoo+uE/eJN965RozRgXedyL7UJTlh8TNpbW+fcTeHvK4K7Bzk3kN1\nYeTOsQpbvzIHOKMPAyPWcNyOe2H6mMPU1B9ljy4lRHfkziVgJWM45S8jn1Wo\nSXTuymZybN0CXL9O6Nr0LmcfKfseggKMIdZVSCfJ/k3bukONh94so0Qlk+RY\nNIWeWexUU+xJ42MsbGY7tlYW88w42F4DcfkOLIP14ks224NDda2zhaaTNNb1\njtqFJvcCI03lc4vaU7MgxiGeTzzlSwg3quQtVZI4JIxmkLLa6yvJxaVyDPUV\nuNRxCdknltZJR0FImG68OMnhxqALuqDoLQWV9pxMnf45aoxStUlJb6UqGH8s\nMQQJ0UDUFz9lNAJ0p4HEumqPY/L1uTXRHtnKjBO1KJINwhynYPnMZifiS9ay\nwLAMRwkRhuECKg7lAlGX6ZJwHnpxjR65vPurxtjbrMJaL8r7zUYPKNE3rHgO\n/UN3LEnk+knfCBE2WfMlImA1i2SRXgoyCHGgxQa6Ubz4IjkswGNVNnZ5E8t7\ntuKAxg9iX0e8D7OoSoMu7OJ7SRnUcGzx2qySUH1qgMs7+SQkRUUkLduZJBPk\nU974+T4AKdXMfM3pxVaN+44GcXSxcdWl9y4qP8O5iqxMVzoIzfrWF1QUrpWh\nrQKK\r\n=tbLI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"869ded43e74ea9289adc5d8b8d39012f4aa3f4ff","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-24T16:17:29.178Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.0-cursors-869ded43e74ea9289adc5d8b8d39012f4aa3f4ff_1643041223496_0.2859102147337318","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.0-cursors-d4450f1b44cee0e5e0ceb765b82d3d9c16a55430":{"name":"@balena/jellyfish-client-sdk","version":"8.1.0-cursors-d4450f1b44cee0e5e0ceb765b82d3d9c16a55430","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.0-cursors-d4450f1b44cee0e5e0ceb765b82d3d9c16a55430","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e2f382962d7c0988369c3c9101856cf3922680dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.0-cursors-d4450f1b44cee0e5e0ceb765b82d3d9c16a55430.tgz","fileCount":34,"integrity":"sha512-XMJupxx/CMyENIZMuaVvung2k2b7i8jWV6ZapESnJgcFvZ0jvNXOq8aEUcO8Gd24qlVTs3sE+o4iU/VT9y9H5g==","signatures":[{"sig":"MEQCIEVcF80OhnL/TI3ZKcOsfhT+E+Obl70MBFSTG0aie61VAiBBeihiNazIBK1Jv5rmAIr+FO1RDoQRBWDEV5+CQoCEvg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh79BKCRA9TVsSAnZWagAAZP4P/jUaX07NcPwbGijur+LC\ngISS1H8cHu0HUwKXyS+WD6UDiV0rSK27i1tKQ1SQWkPQxMiMTs7fTRtklMRR\nqhQBcixSibarKKXa9MOzP7SpYEI6ktrx+bF6n84XrG4XQ8kqqhgH77ZK6mzA\nJwsz8YW2bcWx2A7sDEsZ1sblQqDDwJLqESsiwIrs6iSpKxw0ckl2pDOdgB1m\nu/BVlE/7yfvcsOHNc8HWGc7eG5bvNcWtLP4KHPwMI4TSxgnb47TEhXIZFCy2\n08W41RWJDGh1pbzcPulX7Vms0pGyd7ggxxDP3oj44PRIuKIY4kkYNlQbIJgH\nD3RS3mCAk8zyu4sLsPdwrKMAQ+WQk1dtrf1epHbU7VeNGLtHMgFXv9YlgS+B\n/4OEDKqceL1/pN6bXx7aksiwkXr1il0vxy4vljxhGuFAIFeMuyvMbL4E0bIi\n2aCzmCuynkpjC0/Sl0IB90BR8ARckW4DOxZUtdmZ73IQd5LgQxnkqt6FLK40\nN6oyLtzROsG1HO0dcGWfPRxPxCHs73YN6MOTKKIZr5xHXrbqXo8Dr5w0Lh14\nd56iKbyDZ1eawpSRNrIH7Wy7xh8fflaMbP/ukhq95r31evqk0cImgFeAyigs\nON2w2ksmI2kaGYFobI1UNs5I7AyptmKxxdm2suPEOm8RYfRRpLHXTfoz+U/b\n/5Yh\r\n=Wq4w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d4450f1b44cee0e5e0ceb765b82d3d9c16a55430","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-25T10:23:38.410Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.0-cursors-d4450f1b44cee0e5e0ceb765b82d3d9c16a55430_1643106378326_0.8621738460293011","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.0":{"name":"@balena/jellyfish-client-sdk","version":"8.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5377336e26a955c1d5575a4f7139ef8a531a3f39","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.0.tgz","fileCount":34,"integrity":"sha512-zmeicTJjJfWZ+ckERkRXE3LdGul+XpTPb0IA0ny4aFY3EVUh6vz8kvcL7leMxqAU7bAi8FL89FENvhduyTGkWg==","signatures":[{"sig":"MEYCIQDEz4f3oL7iwsl54GK9hSINwHYaAccSTAP96lfdSC3+/gIhANnHTk7/SJq8c4C/3ViUi11S9qXk/7ZncZ5I0IGBMf+J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh79LCCRA9TVsSAnZWagAA1GgP/jD9UfpLZfvpv1mGu3R+\nt4Kj2sZT+Fz06Fr6fOweX/WzDzfEXUVZRdm+Fav/7N44592Y7VtMLF+oXGjy\n4qRBwjvZk0tqPACgAJxOOzj5rjk0uZ7LLFu28249aeni0Hpjr2r1xlxTr144\niyIJr9bqBz5fZew2yVuwfRyCT+iTj+4tMA+YQmOE+20zxGgLh6Wql/C/bBaf\ntnPU9vV52c2RQw8plt92zpTwPoUiN7SRLkpv5CSNOrhWAhQ48uvbseBJm1eJ\nYGyGO8t36ARax+Fqy8IPs0q/5nC5ENmdJrxzx9j8s8G4hcRHZ/WlVvf08zqf\nmNaTltfNzhUUC+lhJpiGN1Hp0y9q+3RrlZVvkVXYO19vC6+2eUk7vaeRJc2r\n2ogfFjeZU4N7npcHCIl5RELtUmLSqEjvn+PGy4EKjWRQwApBkd3/eZJQ3u/g\n18gv+NkdYEDrk04dtinQl5JZnwcYS+5X3Xvxw9nLT+8PgJbkiTsJLh729R7s\nR3BjejiK+iyUA+Us86pOeGR/efS/gJGo/6qp+bNB93du2IMJf0CqK9Xf8R6K\nEeKCx+VbBQSHFdfOZVOJrqCPRFHkk3H7XoJSvVnIv1kvYQn4CVhE3IlUdI8V\neysco8tVBTJyIqjf/Q8eMJP0H2flvf+Kc6EG8TAUt6HgEq1rKvVsI7TGS8Uk\ni+mj\r\n=xFUC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6588039889de1a5ac3bc1a78cbb6e94b8b5724df","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-25T10:35:04.292Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.0_1643107010127_0.29749631477603766","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"7.1.0-edufschmidt-authentication-tokens-c4cb250250c5dcc2e9cd32b47d24184d4ae44ab8":{"name":"@balena/jellyfish-client-sdk","version":"7.1.0-edufschmidt-authentication-tokens-c4cb250250c5dcc2e9cd32b47d24184d4ae44ab8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@7.1.0-edufschmidt-authentication-tokens-c4cb250250c5dcc2e9cd32b47d24184d4ae44ab8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e769d025731384889f5c9ac0a08789ad4c37f967","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-7.1.0-edufschmidt-authentication-tokens-c4cb250250c5dcc2e9cd32b47d24184d4ae44ab8.tgz","fileCount":31,"integrity":"sha512-Tuw9ThG/r5d1IUufsxz68cXWmunWkunyw7ibxC9qNezelnxKFBIohONND4mtu5gAoLZJE78cP59Pw1k6jSnfGw==","signatures":[{"sig":"MEQCIHIAKmDRUEGrnrIBLanpHr4JMuCWS+KOf8OevvggxhUJAiB784CZjUewqi6YFr/nHUF24YmSTvCMJqcngnpupQd54Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":273372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8+7CCRA9TVsSAnZWagAAjkkP/2FQaTI9utztO4gXFM20\nT93hKD8aGkRtu2zqoDPF9JdSzs5+2dFKaHjRaHh7nrlP6QOBrUa1AVSllURl\nFa0ReVIf2cNDd1lSxx2Xlj/JL73BKL040ISb6srA/YB779HcNqxBhEoJPHTB\n+yVF542hJQkDESpMSi1cnJYSnyh/iBIU7L1Hzl8WkeDt+FxXAfAHIci126gu\nJm3KLU+OKyOF9rgUhbiBK08/jU+fIxeIKhYMthOWyHio5kbAIcrOshJMRslA\nduTnKH48qXrmqE0faszyNuwcn/u8f6m5QqveDdRrTzXmR6T4PSSIkQ504KIM\n+eTRnlATUxcGUz9jKPVVOyIs0QPkjKfyoEZ6guJQJBmduxQv25JouBWGeE5a\nWM/QdabW7KY2nss3LAaBFGC8sIc/8Eid0ip76UfnnGcGpO6Kc9dwRzofj58t\nc5hswEMcbPe3U7qjFMJkg1E1zAtIPfuyeSe+M4KGWv0zPVMEwVs0HZsLP9OK\ne5vR8dcxxdOT/RWRkrjGWTIhfLLiFJ/iGI8eDAqywQvIMqzi2nl3FI2414qZ\n6eZ0nDATaMmRlvyFVRMlA9mkKvIYSNYzTxNlAymDZuXpjGFZMPW7aE7zAWp2\nZewA1ygsbURU3TFGGcZnp3r+z26Lp5lKHgLPG7mLrXr5zJBcsPkqPAps4vHj\na30j\r\n=0WRu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport {\n\tgetSdk\n} from '@balena/jellyfish-client-sdk'\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: 'https://api.ly.fish',\n\tapiPrefix: 'api/v2/',\n})\n\n// Authorise the SDK using an auth token\nsdk.setAuthToken('MY-AUTH-TOKEN')\n\n// Retrieve a card by id\nconst card = await sdk.card.get('b1d31eca-6182-4c34-8a74-f89f1c3e4e26')\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c4cb250250c5dcc2e9cd32b47d24184d4ae44ab8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-28T13:22:51.203Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.24.0","lodash":"^4.17.21","is-uuid":"^1.0.2","bluebird":"^3.7.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.5","nock":"^13.2.1","sinon":"^12.0.1","deplint":"^1.1.3","ts-jest":"^27.1.2","typedoc":"^0.22.10","typescript":"^4.5.4","@types/jest":"^27.4.0","@types/uuid":"^8.3.3","lint-staged":"^12.1.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.6","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","@types/bluebird":"^3.5.36","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@types/socket.io-client":"^3.0.0","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_7.1.0-edufschmidt-authentication-tokens-c4cb250250c5dcc2e9cd32b47d24184d4ae44ab8_1643376322559_0.29795805528039865","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.1-renovate-major-external-major-14c1967fc2f95a37f7ac5e226d42b60a305077bc":{"name":"@balena/jellyfish-client-sdk","version":"8.1.1-renovate-major-external-major-14c1967fc2f95a37f7ac5e226d42b60a305077bc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.1-renovate-major-external-major-14c1967fc2f95a37f7ac5e226d42b60a305077bc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c4e34378d8ad3e5746627dfc8684d9ee531851c1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.1-renovate-major-external-major-14c1967fc2f95a37f7ac5e226d42b60a305077bc.tgz","fileCount":34,"integrity":"sha512-BnnQIbRG8x4lszq4H4BsS5YEsYB3z53PrdWitif2AIeFEi144bsp03ew4ePd6thvg1jmEzUUTGcN+2BSo66/MQ==","signatures":[{"sig":"MEYCIQCLA1ycJlF/cZuBqAYh18E2ncXsF8hcsSg0LqSHuBd+SwIhAIF1z+rSS5YaN45SfarmlbtrUet2Tu+Lddd4VkOEkIvy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9JzNCRA9TVsSAnZWagAAiQkP/3uvKqTcrKUDT2BC87Ob\nwrK3WRzodCNrC8c5mJn5s3qxy4FGsg9alL6WtlMrB/kxjx0WODvLDqd2Vy5k\nyKXSkNXzycEnfs4fdX5LRcHGSibcK5ACFpm76vgeBG+F+Zmt1yXKwue8TwUN\nSm+IYejX4RvueSupzJF0AocLOSFHBA9r6ihsmocT+6HuTybZkRMHDJdXk8JI\ndgt8eS0hHPLbl86wSUMcZ/X2/SbInqmn/7d44wuBBtiYpbn1YJQTJDggroGL\nxd9ONgFpJ3NYLAfNP8Bl/AOzzGng/jGkD7/aXgjg07hNfOAC3UsWtGzakgGI\n8uwQt/nEph9GKrVzpcYTwN3bsmZIHNMHuThPKLcUPcKpklSQn60k+IJvT6QP\nBmog3yvJFBpxguNH6hx0GY+EJmvNw/rdP0BUuIk+QMSdhnz7eNBnCxQUH6t3\nsP+RNBqphMtJ5jS4uykQkRmq5pQlw4LTek/Vj43bZjbXgvridxqUugaTsmGs\nfjz2nyAJ6adoVDIlGEpe+jteNfHNxPYUJtpPqd128HlXeFDjF3QXOdATHW7s\n3UByepMdW9WzWsn013hQnRbeHoYNZqaG6YrOtkf9DMuVNo835eYpILfaZ98B\nMY43LjFpN0ogQFli/1xaTGUpBjn3tcPtitE/jOXyll2+w3rja1bx8Kx77WVr\nIzqc\r\n=rozp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"14c1967fc2f95a37f7ac5e226d42b60a305077bc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-29T01:44:39.226Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.1-renovate-major-external-major-14c1967fc2f95a37f7ac5e226d42b60a305077bc_1643420877300_0.4373974027982408","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.1":{"name":"@balena/jellyfish-client-sdk","version":"8.1.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8e906f571884bb210fe1b8f425cfed40b4df29da","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.1.tgz","fileCount":34,"integrity":"sha512-HNBaLhaZX838arawEhZ3NclguI/Tm/rMxXv9BkCTnlIOsn26D978TB4XJ58iJBXzkcW6btZD7g8jgF7iXndaTg==","signatures":[{"sig":"MEUCIAKXUdsxtT6aSeBanC539sN5P3+AIXD9mjcL1yYHbW3bAiEAulW58SWp8mDHHhc64zyVm7MpJBIOThHkumP/9/JBhaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281420,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9NUeCRA9TVsSAnZWagAAME0P/04HlmnpTB+0HffdUDPB\nduHQLNUGQXXrIz733io7iQAMffmWH0y2b+8U4BvREDHwDfKP3k7KE4+nrGWp\n2mjez6GRI9/YnH4sg/WUBV5zTr9j4ocYoErR3/OcsJQpNiV5t9pUbKP20Ae7\nW+TRBe4BMuSsZ0DR8wUCmdRbYzFjejFmJh17/URkmCJXKLK2ZwT0SG7kVfbZ\nyAZv2BuAAWQ/C4a1/2G+KXxcmiIgjFFB2uwbOdX9kqffZsjNKQMZdjLVbG17\nLuZ1ITQo4+o9Ko9i4dz6cznJBzQamWQwjrSUyaQNs0Z+ktHnpOL2r40JmZWE\nJ8+G65/KFB/hoSiBE8JV0W9LfCbrPHVoajb67PtaFl6cm1fFDp8WgPllj2rp\nFkZnVuH9bUQN/MPqNpV24uvLXTlLSRNuV7uR4HeKdoqGSFafDjzM72PgaoXR\nQeN+6D931OO0N93CY2AEQtN72gHgb3/SiFwpwvIseKmFBHAKgwmjT0bw6e6V\noWWiUywteQTGtGR/xozOau0BMQ+higfFgjNDgEOERfD9JEPSkXQ0mKBWaYnK\nBktL1PAgLdNOupHvLSvP5gID2N4L1qGwm8OX6toWiDGC3sMRcsZ6l0txK9ME\nLbplqk3TgY9g2s3oT1mMCPzfR7P8AbqV+5t2Z4pDTsPlDbucE2lURsX5CCAi\n3E+O\r\n=2kGT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d00013dde2f95740b28d5c0e818b0fbfe8cae1a5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-29T05:45:46.513Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.8","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.1_1643435294027_0.30377728297508155","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.2-renovate-external-non-major-7772f7fb1893c12392856db93330c7049f5037eb":{"name":"@balena/jellyfish-client-sdk","version":"8.1.2-renovate-external-non-major-7772f7fb1893c12392856db93330c7049f5037eb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.2-renovate-external-non-major-7772f7fb1893c12392856db93330c7049f5037eb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"186a83b63c1e93b6a94d495eb3d50e8190bdc0c0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.2-renovate-external-non-major-7772f7fb1893c12392856db93330c7049f5037eb.tgz","fileCount":34,"integrity":"sha512-baOr5duoOY3PwEYm1fVYKKqCQSDdDAoJpd7S+BUcRUUJIHEoGR7Clz5jqJ9z8wi3vcPPt0nLwmC85OXAY/vaVQ==","signatures":[{"sig":"MEUCIQCOY4vl3MXcZ48f4yB1y7zUjT48K8TjCK6HtxKdPZ0YHgIgDF9K0YslqdZf8INwB8/gcnmB6Gn3skkbPmgNViPCMeg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9NZECRA9TVsSAnZWagAANT0QAJFdv4bTDi3isL+eZ0Ox\n3smJEQyg7nZsd5q1Tqt4PKbFOfi9oIj/8mTDp/PEaAphjkMqcQa4hkI08fWv\nY7T/3BTdlNcq0OtCfzrFtc/rc89peU0UoDzYMc3rV647hyNMpMGkRyVloNHc\nj6OBkWLVmd7Dka8y+mtVk9W6pPWI2cm+ATc92fOIFb7oyf20WJ6tCyS6Ecvy\nDy4V991iDv0o9iNSTb/u7bPAtAhwKjCXl1skIADXbdh+Dg4+9Dr5+gOXUT8B\ngCmUnPnSnUu5bhopOy1ih8Xau2WtlShOKehFY2dnv7pOZhCv269Q7WRm/BlR\n29Rv0xd/KwJGT8dj195aEnI+BLac1zEbD+GFjBL+X5cKhR67ReXuV++u/eNS\nglk+WPefdNJgsrxdQ0sF6uuGXr4pFHNGGiiyNZTrj75O6hqyrR5F3XV+LD1N\nRDm793w3bQnRb3djdJcE5Ij4FitGioi96xW8EzV91fnBUMhb+xr15pidTaJ2\nKd6y34qcMCC3cgc1jgW6ILDSnyCof/DzD7XE2JNrLky/oDHj/auiiixdMu4W\nhQnNFUZwBBCmVojDjFPszDD4guU1+GpsDpmRSbXyE96vlcBel4OKoVjy83TL\nR592mCWN80IufLgYovKN8spJM9pPO+4xTusOV2Sdrih2GJQwxDzx9Z651CfU\nJNLo\r\n=2b1L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7772f7fb1893c12392856db93330c7049f5037eb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-29T05:47:28.764Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.2-renovate-external-non-major-7772f7fb1893c12392856db93330c7049f5037eb_1643435588208_0.7897644734392284","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.2":{"name":"@balena/jellyfish-client-sdk","version":"8.1.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"911433f8c850e7f8d9db1cbdc089af7b39603181","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.2.tgz","fileCount":34,"integrity":"sha512-tGHnWkHejSaqOyGKOGIPLrkqKCJfBRl42LnVbJIs+XCppGNQzqwM9YnzoPszFU4MMArienzZLhky0C3V1T6UOA==","signatures":[{"sig":"MEYCIQCaOrYKzc222Fs0fOuor6R6Soj8mZXM2dUjW+onPs0eiAIhAPsoWVo1J7jlXeHk+ryT659Mha0R3utHjYMw30G8sZZF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9ihQCRA9TVsSAnZWagAAKWQQAKTWsSQFz40pN5+35btJ\nytJnEOJ1t1IAStDcWkxx0ouJ93gzVCo8as4uJaCnpRCfgnlhM85/QcpTCCog\nn5A3Uj2gk43KKzwtvOK8z4vaVQDC9khI47DKxz+ZEMdZwriPzcqs2LVkIREs\n68fDoO0y8lbIbsyIfnQkfzHahThrkCYAAZ7gPCB6tUhqkXa44a6CIGj4ZRWw\nyWgGv438lQTd2p6eW0lq4RhRCu3YqYSABpQQQy9FPydEwgHQI+4JZkWA3d4t\nArdWE2Qw/V4X6BTNrehH8CVRQ3ny4XHVfrG3fC23VUW4Ihqj1U0Qyi6OklhQ\nba+690APn6lv4eJHYOpLdY4l10To9Fh1HyzElSjEBSE0h6VMTilHdajtCztx\n6X4G/c1vKmbDO/FcWVtTOpqu5QnpH0ds4cSA/E4WUVSrR71DQIKZmR/eqB0T\nClf69PNvyW8boShFFXrNPbFCvkW9u1lNjnkaFuwB9q/HgEBgZNL6r8Cdy1yP\nLDVFWREgZqozu2ITTcblcAltVUxkzY50uOjIfcotLtevIPahKifAM4S5kz1l\npcT4kV+rzGXI2X6KIsxm0ezjWbvo1+W38MjN4lIGrClYe1ov/eh71vioFzep\naSGb0m29iBdeunKLN2WBH474W8Jv1CdCThzmBlZz9cqW49otmoXzE3ADIfPR\nvOQc\r\n=qBg9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c773e99ea807e4db2493a8d39bde1f8f13c2743c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-01-30T05:52:24.126Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.2_1643522128018_0.10539829503431708","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.1.3-update-deps-a78608971de02ffb72599fe7dcb64eb8c1208f58":{"name":"@balena/jellyfish-client-sdk","version":"8.1.3-update-deps-a78608971de02ffb72599fe7dcb64eb8c1208f58","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.1.3-update-deps-a78608971de02ffb72599fe7dcb64eb8c1208f58","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7eea789a832e2e28c739a8187da881e35f507456","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.1.3-update-deps-a78608971de02ffb72599fe7dcb64eb8c1208f58.tgz","fileCount":34,"integrity":"sha512-jqjS8UMYW67PcSQyheuVwSABwdYhsg5+uPLWddiIQwt+dUyY8QjQC0rMT6i2lS1l6GDzKqEYBXB1+Jkz5ClLIQ==","signatures":[{"sig":"MEUCIQDWTxx6jG8kmv4r2bnUUsKXuHfmRMIOsYb+SPKl3ewKhwIgJvLGJrVZVzR6X/Twu5qStF6dLPVTsJ31Gg+Dy22r3GU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+ntfCRA9TVsSAnZWagAAXjwP/R8mCnkErY6h5PfvaAXI\nT+KXxQ9NIvC+rNgfuMqw3O9sb5KBo9P021BNyfILYOcxYb9BfN8EzN2uiRQV\nFjBwBxF4IyApsHqI3vAqfIoyY3HyF1qnp+zoCTK9zR3bDH8CMduFd0PbOTAf\nnXLc7pRRfLZ9dDir78prbE0TAyIe2mOIyGC2pLfI35G5mLPvewC2825P19F1\nPHK0IPsSFUDGNQEm5lrCl0KuSDSnWMi3c7+ApPDc7rgRZheQeyIX3zSYXr4k\n4T5fGwFd/RVqFIc1RqiD5ULkq/xxY9b6ncVO5KvCWFSG+IeZDBi9jIIwlpjk\nQLC5JImK/rDcI3y74c4/CEavfGYcRIDSBRC83KUYQcIgzA39+4UPU2III53T\nmoVT5eVF0Ao9HPt1OGlKovErHsIoylc2wpwxd1ZflX53ua9kzqdsteudm6Qm\nymXB2OCabb3qDskydFUojwaZKo+opDp807HiHSFq2Dn7rHTKhKc7UO1cSLTN\nyg3MsaCgNfxeMQ50NyFh8KZIBhhYjHee8UYwdKGE2Guiw9mI2fjx5aa3QObw\n0mcR0I+zwYlbd+JfkvMA6SeezyL2/Gp6ut+S/cBh5K3XLKZMplTYsPS2IOlx\nSxN2W02UmXJYaGZWefkO/vRftfCwnKdnDwyYXEeja+/BJ7EHEzxtyfctNOzo\ne8/Q\r\n=K5VD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a78608971de02ffb72599fe7dcb64eb8c1208f58","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-02T12:35:30.222Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.1.3-update-deps-a78608971de02ffb72599fe7dcb64eb8c1208f58_1643805534967_0.004084172134570574","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.2.0-lucianbuzzo-add-issue-ownership-7354752a3cb8c2475ae02d0f880ea44da27d3619":{"name":"@balena/jellyfish-client-sdk","version":"8.2.0-lucianbuzzo-add-issue-ownership-7354752a3cb8c2475ae02d0f880ea44da27d3619","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.2.0-lucianbuzzo-add-issue-ownership-7354752a3cb8c2475ae02d0f880ea44da27d3619","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"73ea2d99bf23581034667ddf3c10193ae8936d58","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.2.0-lucianbuzzo-add-issue-ownership-7354752a3cb8c2475ae02d0f880ea44da27d3619.tgz","fileCount":34,"integrity":"sha512-EHkeeoGXpbgc0li4+EG5EC1qVtHGWptg/w2Ip7WKnNHwwjC2Wk3Ul191ywAFic6OPSzzukQH8iOSxlHjh4v5ZQ==","signatures":[{"sig":"MEQCIGAgNobQZ31A+sejtLpUroMLxj6tjZd05w2ag0CfVqGZAiB1S2Qu7ihnPLaLO8LxYaRgFRAEh0sng17pSvJyVgZhVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/AqaCRA9TVsSAnZWagAAeMQP/ia/Dw3Hid/f1wAHHjZk\ntJt0imqMEr1K1tex2EBvb70tyUOkF6zR7mo288TxRGI1zIpqSIFf2RgHvkEP\nzms0aeCUa15PdUudVxbvb61P2BA388fAWcp/Qer1rzfrtIO9HC8oyi+rt2yb\npkTaoGQ55NTcq8mLqib13XSAvgjJ6x8qSclY3C151eaGAlb37F9Ng1G6tKMA\nBacVWwdM7elXzJECnUeoERBNOKJYk4Ei/6XwbeNnFqtgNIy7t9PBP4MRWfe4\n87/SlGmT3pFS9IMaGJ6QN+e5sGSDBPf7Oq+c2c3wA4AglbECIzI+nRK7bORU\nRx3KM40fD4miFtrBcLojfJAifgjWAJ+xrsvqy/aT9X+2g/+Mc1F1XISUOAux\neWQpEzMnM1aR+pcNnAeVy0mrQMNyPj/XErC5xv+oCFNAiev6ewN0xr1Z2Bt1\nYtVnMC9gTJmRMDTzUMq/s5DLo2EmrddAH3EWtF0QisCMl7GV5rpbXbRVxQgi\n1RB/ur7gFK4F3yK6L/B2vB4sNbTKN/kkJuT8R4wOpSyK3ltsXY0UOZZHI3GH\nuogaXeZvF1G3o7SgKsqDjZxkBGKVg+GP4s+MFaL5BGGh573ZcZc1lT8hABNL\nFzySc4BSMf7ogU6HkyM0uWpF8+OcKxGpxQ69ssvGSqxVsuM6Ig5Lw6DC6TCY\nAKCT\r\n=JFLG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7354752a3cb8c2475ae02d0f880ea44da27d3619","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-03T16:59:10.732Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.2.0-lucianbuzzo-add-issue-ownership-7354752a3cb8c2475ae02d0f880ea44da27d3619_1643907738322_0.9688148902790052","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.2.0-lucianbuzzo-add-issue-ownership-2031d70e026df2e8b45a4009ddb212991fe2ea86":{"name":"@balena/jellyfish-client-sdk","version":"8.2.0-lucianbuzzo-add-issue-ownership-2031d70e026df2e8b45a4009ddb212991fe2ea86","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.2.0-lucianbuzzo-add-issue-ownership-2031d70e026df2e8b45a4009ddb212991fe2ea86","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9dbe7ff4a58c315674752ed415d31df8a7ca6bb2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.2.0-lucianbuzzo-add-issue-ownership-2031d70e026df2e8b45a4009ddb212991fe2ea86.tgz","fileCount":34,"integrity":"sha512-U/SCk7Fua4pRY5EetMZu3vZeT7xbr2CV3xyha04gvPLI+f2GuDyCY6eDdYB+1COvvluuIGfKCLvII7klNfX/3Q==","signatures":[{"sig":"MEUCIQD4zNEAyN7ncpY5hnhzLnbVnJt8ouihAizSMO14z2lRiQIgY1kMB7U8kVJuOR5Q3WD/5m3pYzITRAZmc0lu3kkhXeQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/Av9CRA9TVsSAnZWagAAq5MQAJNyWH1MkwxMdqvSwtEK\nEZV3bEWHyx7V8STTjKxQDRCcRlxRbN8cewkqkZjVwI7ZYUvNpG7o8YT43hQ8\nBFzXrXBdFQBmIfqvCBt+yiisi6/+gjWwLQz3lCbD41u1ndotzYTd6QKZu6H0\n+r1FgeVYd2jLtIrPkbbV/4myYayKS7qfGo66m0LPkV+J2bv//+A9SDk/uGH9\n0D/mf6ohX9N7t6jdnE5tCe3k7XV1cmk1aSbX0Ty0lhGD6RCzhpTEZDlyb+pU\nEZbFKKZOP7NPBHmLImqX4wRb+6pb9WKcGuqnqbH/nw3U3iSilz+wYJ2bfPD7\nueX3Wm0Ju9JwsBr/HJnXTLa2chTzORCiICRy7FhycB3Xcjg2yIPgQUZNyyZr\nlm67TGYycAfyZ/eC3l6dniFl5jHYj2wLX2+sw/8hLqdJjuBBsFM7lpp51dkz\nuvA/QBfEx7Rf3kvez/hd5lics1m34QzUpNz8yjvUdatoQK8yKQYmjETV4PJ+\nhnHTQL+cQG3R1edY++I1f+YWPkymFmoMJDaMm5Ai/MVcYb82P0hLxqFBtrHl\npjNsodP/V8ccXcrjVTzu54iX+AyRKPgDhqCgfk9JTxG/bDeJr1wCgi5nag6b\nWvK6W+XQLHQSkd/4XN0uIi9JugGiZs+4nNtQ4s1OLjL8wyawPQH5rj8rIncV\nonxV\r\n=krBh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2031d70e026df2e8b45a4009ddb212991fe2ea86","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-03T17:05:21.782Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.2.0-lucianbuzzo-add-issue-ownership-2031d70e026df2e8b45a4009ddb212991fe2ea86_1643908093273_0.7180220659722762","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.2.0":{"name":"@balena/jellyfish-client-sdk","version":"8.2.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.2.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"78d33dcf7be0bf95c796f2104690926dccb9f7fb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.2.0.tgz","fileCount":34,"integrity":"sha512-WjjvDZ5qwX93GTFlrkw48zELICem5DOVd9aUzh+VhCdkUVunI5bEP9mqRB7Nsfe6+kl3E8XbVxAfKEigkTSUSA==","signatures":[{"sig":"MEYCIQDq0YrP/q3bjP3qIQo9r0QuNybS9WwfQLPw1mHaIv2x5wIhALXUlB3HnDH1x0iInsIaMmF9oNKvTnI97vCIi+IusgEM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282411,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/A+TCRA9TVsSAnZWagAAmH4P/0LHqHLQCpfWLbaTIV9r\nb7IWseFuBlghOb9m4A9sfVrKlezRCtkWPi4GaA0jE2iVo6SJ5HrBfNTjarI0\nXb6cd9ZsuyBAjkZG/nizut9fbiaFRvxKkB2oWthneNryToPiDve8zX3NuhEH\n2YQNgqCE3KYQprdSBt8VbHpVoXMsDPVsUdxIK3wH+waH7ks3mWU97besVaer\nHqv2gqS/GpRS/li5qiS2H9fcQvPDwazqKoOMqSvQDZhzpSBGDpic/yRMhVvy\nps2AROipHwmv5Mt4PBY0CJBr87cKLy0tyAmQuBqdmWjoQKraTer7K1CRoOGL\nkwjv7asmaj5RYLafDxLW4jucLyBQpc6yxJqjXUABArDsK+fbuLF13lcpoNnj\n49oomwZO+d4Bew3zJ3YtgRIfeAeHOsexB09nwHP4YJpcOCG2PGRU1DRONKs3\n6mAPNJTEWAvtC99L7q1s2pAo5/3+HwA6Zmc9cPVatT2O0ZklGLrOVePe+zJK\nA6pwAVd5a5ICxmyur8qnEJxmvSZl2uNixpbTkvOHfxlDDjyz0AnkBecHuhFd\nsHR53IJGsOTmdtMQp3g9rwy6WVIsuyX2+TG2VFHrMBn/+nvniDAd9KKQ0Lzh\nEiyyiKyL2KDJ8e8N7l924PDqVkjSPvzcoPZHIBJLMdV6EaEkRebtmvr3CABv\n3N/A\r\n=yQEA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dceb1a761b74571cfebfb38fec4aa8366f3d33f0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-03T17:21:46.336Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.2.0_1643909011235_0.2688907290613636","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.2.1-update-deps-4a5d9843234381e618d484109fd2de8620d5f312":{"name":"@balena/jellyfish-client-sdk","version":"8.2.1-update-deps-4a5d9843234381e618d484109fd2de8620d5f312","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.2.1-update-deps-4a5d9843234381e618d484109fd2de8620d5f312","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"34a7c31182a5ea30f3f185ad09f1d79882f1612d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.2.1-update-deps-4a5d9843234381e618d484109fd2de8620d5f312.tgz","fileCount":34,"integrity":"sha512-KucUJuofB0PaQ6qPxdSHi5W6KKzHtcu3sSvF3eV2LEOsmlEvu9K0bH5HMGd2EiLzsfEL5zjq7avwcJKBmMYS8w==","signatures":[{"sig":"MEQCIHQKSUSjbtOdRzk3f4wjlxk6t9MxzWyR/qRmwJxv67rjAiB+t+byaiPCcuhdIB5n1LKD8k4SoXzlO78IPA/1H09Ueg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/DM+CRA9TVsSAnZWagAAZ/EQAIpBvcdKLSN6h61r587z\n0/LoqG6QR+2eF03sip5ZsArmaBmCf6m0JZRfIjkGk17IHT/ZV9PlY8D1sDF2\n/BlDF/P2K9kYJDbiIA6Yl/M57d4tpjo3f+yvGb9ZLfBEZO7tB7kTuQI0NGzj\n3PB3hIBSIJnqrT1twXnQf6GROwqsW0/JhA2uGc+XyIJ34xSNSYF+J71GrBQX\n23ydg4tSeg18awD4UHo6lqiRUtAGUfP7Vk/D8Tx2bO9aX4UNWozSBo4kSqqK\nvkjg3Llxtxga1iVVv54ZIqNmlIM6s+Pe+TBfj+vhXzhDkQLFQ5r4PSroBfRa\nQWDAb4rWjV5bL615+EO0vPd2HoQrZ8SVW4btQAiXj8kWIiyQOIzBXxB3P4FL\nYgOrT46EF2yAFDd5Dc6tTQXh9tGfGvlCnNAuiqk/wCrDmVEXYqz046pg0wt8\njo6EoXWDekmY1cB4EclgKFqKkgGYNecyV2rIpTw9cUZ/QZdYlcxFaV1wRD4P\nVx6w1MDX+VkxOwMmDm/RAeXimRyOP0QhmQOBAWRV9FClIEnbnRWapYP6WBfu\njWMbhvk7E2Ujen0ymetU5V4JM59+5eNwVtGjhZFS5th7FTB5k4fblsaIOjnA\n7BDluGTtWDuNso6yDqpxfCoIcgut91Uy6996Iv5kKvDNafQGfPcb+76M5/JV\nDiwU\r\n=hsh2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4a5d9843234381e618d484109fd2de8620d5f312","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-03T19:53:12.003Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.2.1-update-deps-4a5d9843234381e618d484109fd2de8620d5f312_1643918142538_0.4971342332867996","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.0-export-linkconstraint-e9a1332dc9524d6ac169828de2d436e538569632":{"name":"@balena/jellyfish-client-sdk","version":"8.3.0-export-linkconstraint-e9a1332dc9524d6ac169828de2d436e538569632","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.0-export-linkconstraint-e9a1332dc9524d6ac169828de2d436e538569632","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d0ed1b5ac7080a975fb13d9e738c9ccb3d73b43e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.0-export-linkconstraint-e9a1332dc9524d6ac169828de2d436e538569632.tgz","fileCount":34,"integrity":"sha512-swEGDRI6VmIg2ZuHAzs+YgyOcxo9XEByHj1NDtJujM2zhiNxOIDNR3zdJHDo0h88gWsFMTvFPO2RcTV9Hhharw==","signatures":[{"sig":"MEQCIG/eCQwBq/gYpbVyBpsPWPePKHoKHx1x8cfK5e1KUYX8AiAHjOc0b15fJktlMCUzKlP6IzD/Q3uLLRYeyxlx47MqdA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/DSmCRA9TVsSAnZWagAAeeMP/A2PkxTS6uEVU4N/nEVx\ndKPbCEvtVgpZp78Q+HcitTpofSJBhqy/8F2dQOqTXoVhe4yFIkwx0ttB3YlI\nGLZBA7PCBLy84xvGBfrcHFz6aelATw0FAiX5sOFxaqAtogHawWVZEAo65l+r\nvVfG8yUjKLzEnXnDzA/FHZcl1NrbRVBO6pwpgsLVRjcS36LxLFi13neOn0Js\nXRmXA4VrrL1cRr0oXxnI5UL1P8QDdtQG0NBzBqgGCTwFLwvClTdLh9QT8gLF\nlVSFWn7DA8vO9nxEECd6lhvcgM307CueUYtxz+5bjMK6LTpZljMhSnX2g+Cs\n5xVzi6nUkTNw8Tdo5BK942+OmqJJGI3y/EsdvawrwS346xNWKxtI8OF2tx9W\nxOuwHDkUBRbQTsQBBvMrvzO+9HMnLVQvHU2g521tGrG5tgx5gPESIy2cG2ms\nvNtXWh5yX6/UQj9aACY+D0ZB5QKnDNkzbdY6RUuCkU9mRjjfdkPbqzfx0NZ5\nlYvQuD1g/ao96HO21SS/6GXI+FYGvAWYutVScB+ky6rrfydwpO6XPi4ZXaQ9\nS/IDi3RrzCj5hkdsT8TGKv/SyIgnDKZYfyRIS9Zex/JLDxFha+Put/bGIwvn\nx4hHgSAI+oVp/HFKPaZypky9uEgStXdLrjkhf9CexyIlu78Gpuq8H6JiAvCK\nATZO\r\n=VjZB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e9a1332dc9524d6ac169828de2d436e538569632","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-03T19:59:12.668Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.0-export-linkconstraint-e9a1332dc9524d6ac169828de2d436e538569632_1643918502310_0.8634161236718856","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.0":{"name":"@balena/jellyfish-client-sdk","version":"8.3.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7aba4a6803b6d4ee1e3bbbba526ca201e9abacdf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.0.tgz","fileCount":34,"integrity":"sha512-xu/biSRVLvCJUBQu4KLxK90W7hdzve2Oj9Iqi6qpfG8ZgH2q1vQqKn/FhxrQa/FtePXGwRC5F64Gzauo2n0sKw==","signatures":[{"sig":"MEUCIQDltQ7f1/qO303hAPzUuGY1lMHDTu8Ly5eHlml/lsHlkwIgKoue2ZjgnHWZATMtozPLhvUhgKSAjCngC+y0WaM0Yso=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282503,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/DVkCRA9TVsSAnZWagAAPT8P/jsQmq1FyCj57lc4DEzR\nGnVdefBGCR2zczeqCERHwAHofwQ4vYtV63yzuErpnnB7pFYYSdlTMFOBwwXc\nUdSSUcOMLgOFlFFMpZntnkDfJd6/LMpgNg99/mTI/zhj5f+3DdoNF51Myovg\ni8CXZ9KMGdJrPPFxVYTWgdoys9Tsxfdlmd8dPWUz1ktiVLJKRVq+bZoXc4Rl\nehll7QPce16royERb3c3JG0tSXCiydUrXOb5XTjMaY8sMg5sEuT7sx84UTYG\nq7okXqzPbKDAWzwTEFnkN5vdeBvsAIHyNT70af2Olne0iN7cq7IiKAQMWxHW\nt5hNnnKVp4wCTmtv+gyEBCjjDsV7nOkS1PP+yqi32dCClmkyAAFNnNgyr2/5\ni0Qm+e0VzTStDDEH127hx17kOS8VWNM2c1ePFCq1aOMWJnQ2gO1f1lxTlmIn\nrYe5VUCCVjcD6XmnZ4uaxAUQbwLUReCB1tbFV/h0QHxlgZ6hpu5gWPaadZjV\nk1TIAJnjdqxs6VbQs3Qr/qX3Y87GNvW6rMHD+c2J/QEhPzbH3hXRwph6Zg7k\n7Lii82PBfjxG59M3wD8R5UOMDDFUFS3Di/bgAp1D7w3argvAkHfAg9MybjYd\nlgNueg4mLFb8e789iKQkG2NE8JNAym0iS4LUvczeqYdoE2NULA/rGoGJpBLh\nGek1\r\n=2aQO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7d50f90507848dc681433f4de6457b4cf9c97d55","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-03T20:03:03.921Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^1.2.21","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.0_1643918691860_0.09262925436308556","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.1-update-deps-ab9a551511fd333db51e247086d60d18803592e8":{"name":"@balena/jellyfish-client-sdk","version":"8.3.1-update-deps-ab9a551511fd333db51e247086d60d18803592e8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.1-update-deps-ab9a551511fd333db51e247086d60d18803592e8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"94af12dbde48799d0c0c26a9e13055c4760cf94d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.1-update-deps-ab9a551511fd333db51e247086d60d18803592e8.tgz","fileCount":34,"integrity":"sha512-FJGMv07hhv7+NlAYgy4PcDuNZ0txPJ/NYbyJppGKx1/fJibHR1OcoN/fIlGz8kgJXxC+MRZKgk0ZZgRWwEv+sA==","signatures":[{"sig":"MEQCICZ/lG0PJoGbPRs9l++S68xc60VG161lVQeudpAJRXSBAiBurHOLrBKzAIJoq0vl9daaNfHWhVsLv/fu0+o1xOSVlw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/Wy/CRA9TVsSAnZWagAAO9gQAKLXlehBvXG8ZeTyVbHt\nTa9Fgxy/pLT3uKnc2AyKX5BipAd93892yGpG+WH7nU6+U5etfZZDvmZSNDHr\npkff8WoKWphTT/yCq1t+mesAJko1WQVPKRHKXdm7dASWs9aBwwDiW+A7vOcF\nRiQwlhyo0i+wS073J/3Byjw2pz26bywPPJc1ZY8Wquf+hunEzzbdNU0b295N\nUhyO/swmdfA/+5zDj55BGvcbbze5gjxrd5d+oITp4oiZjoCPCNh5gILJ5o95\nqgLLWob+CJK13zyDNeUk7nWvspjCxAKpI+ZY7/Pr2BCUBKjbq22/IjW8FQX2\nvovVfhGOQnYKCisHB/6G7DM0ZAYvP3gkx2bTVxzIBzrAO/o6ODfnlSS3SVxh\nVCcfcZCfYKvPBaDkqH3oPbUudAcVZZXPPKo08QiJefxyZgqOURqUS+l9XktJ\n0jGGTIO6m5tB9L/cFoJfrriKRDnVIXFW5xyYHDHkRFcM9SEk+N+8bwnmgEcE\nrg9SkbpUTqafc3oXmFZVy+blYq7DhaHANUkZS3ThIkAK8sA2CrqTmNab32V3\nPBc1Bdgeuh4iV0mDmDHi8OtINeD7g9aqB5ZrnUzD5vdFLsgI3bAh4LP7LX8/\nDtkAYA+IVVntX/OIzdDKzT7y8YGCq15ARgWlslekZJyvWvwWk1ln4XVxh4N7\nu1Et\r\n=lngg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ab9a551511fd333db51e247086d60d18803592e8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-04T18:10:38.453Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.1-update-deps-ab9a551511fd333db51e247086d60d18803592e8_1643998399390_0.5395368483097185","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.1":{"name":"@balena/jellyfish-client-sdk","version":"8.3.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d95701e847bda38ff45307b815b308658d4e1ae3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.1.tgz","fileCount":34,"integrity":"sha512-l9g32+vSw7RPdgCRp/DO4ietxyA3Mu4O4Aq0/hM6xuZsLjMK3tv/gtKQAabZ1cnIg8hOZcX7KN/xb7O+ekV3Tw==","signatures":[{"sig":"MEUCID1CmjyO14NO7OFVCNtjB/kHHzFAU/ae00GVE2Vab83lAiEA8R/weVPQvmiWltKS/UMfHnBKWJyOfYyAtqvaLBKmC5Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/W2JCRA9TVsSAnZWagAAwkIP/RFANL0e65gEqQAAyEnP\nYF/SZIAOvwzUQHhsbTCd3WbVE/NtqDHplMhMG6roVUZ/ZjPhi7++93WEn3rB\nuh8JloRg2MmAiUe7E6x3+x1noyTdI0W6o/dj1SdCYDUJ+rd6mwRHDK6oiKXk\nkGcYGGjhfb8arqMWE09wiswJRB7n2XNFmBOWBg4lixcbOJzvYE2VD9he7RmG\nshVveofBclgR8h6Frco/yGyPin1ysz8hQhYphcpt6GKvjhf80pN6L9nQncG/\nzi8VMJmAqhj/1jNVw9M0BKbn1FT38SfDUx9CifFgQQbWcZ5Zlc7XvvQszIgc\nhcF0AYUbHoX4a4w/s1JWeWZP4Eb8JJMqu5+bWlY4FC+dCW8oSJ9U9OMgnT1O\n3cbqTQWUCiQvm4dKNuQqdTPHzxw8mtgPIMlAXsxG3RhEJN4jIUT5fczAIGIe\nPmz9T1G+0dy3DaN7C1VPW2OVuhLuj0lILnAoGjg1c1j8tCsZ2lt0i78jPFqq\nH7A71ts8rh9kz/D6KU9zeYq5HlEbjnYyh2OJLg4CE3wK7ObT6ZJ11MRakdjO\nhPrves9yy80pg9MLuTAKZ9k+4khPk8RbTeMcPiYwWQ9fqIYPoQW2DB3sTNUM\n3+ZEaEiKuwSfbib6Sen+cX31BNEDstzLqDC1GKBqEgsOL/JulGwqe5WhZ0zT\nYCFz\r\n=F5jT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0b596eb6811ee7d78b0edcddf612557d24925f6a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-04T18:14:48.911Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.2","sinon":"^13.0.0","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.9","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.1_1643998601134_0.38007630813984394","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.2-renovate-external-non-major-d0f073ba6649f0d422560887e32f9368e7d215ba":{"name":"@balena/jellyfish-client-sdk","version":"8.3.2-renovate-external-non-major-d0f073ba6649f0d422560887e32f9368e7d215ba","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.2-renovate-external-non-major-d0f073ba6649f0d422560887e32f9368e7d215ba","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d3706d1e2fe52bbedb322041e2e4f5993f9a70f0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.2-renovate-external-non-major-d0f073ba6649f0d422560887e32f9368e7d215ba.tgz","fileCount":34,"integrity":"sha512-RShUKogAWjM3Rkd0ykUEtAVMsHfZPbGl9szFaHtE8+mq2+4ybZUwVzQpykBLf4mPzWL0Vqq8XzxEkuXtpVodYg==","signatures":[{"sig":"MEUCIQCAqWFSrSCiQ3JnsYsLBupH8v/dsJWydlGkwmerU65qPQIgPdh/4ImJpG0t8lnT+D3+SGOaQ/BSy5szBa7heO5dbjQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/cJICRA9TVsSAnZWagAAPqkP/26QM1OpBjulsffb7dWH\n+IbICUjeWJTr2ikma11AHwQM3WCUJCIasc3mSQiTI34ON8zwXq9kPgKpQqgr\ngJxyFK0GWvuD+B/cn2dkEcDLJYIkGJZse9srRVtikDCPkUQkoFmnLmpPC6XE\nxvc84HI5gjRvGSuzrmOVRoaqtQ7EXlpBt2caheGA8XQh8+vg10h3moDflvR2\nAzL3YZ36t0/2Sac4kAxOKBf8C1eysyoxuvWd8Nk6DS9Pdvg6vbMbvVOKySjf\n6Bt6DJqiTsC56Z7r83KH6DyNnW651xWIed+ZSPLjpLzz/PuDxyBBaNH/K6cB\nNN+5I8L7xtq24VGfJEQkeoTgMVR9hV2cD2BhqNiIV+n/PBHc1ycxJ6C6JNIO\nWw04Mo5bWa6nm2QWM1q8bod4HHqTKnJ7VqNgss0pGGqLb5FaBl7xcuwb+U5M\n5zwDlrR4vI1RIDQVFSVji05Mg9mWLkOHN1X+rGwOoq7o5fB4rmhBbDhiph2X\nU9KVl7fhCvz9XwAJHRxV0AlIpokh1BFZn77elaVXB6n2YFqi00MW+xK5ne3Y\nlYXIGUeZYLBo/+oaDfsgLoYR+DpY5/DXly6IsoGy1UrrCPTqsSwPF6m4rPHA\nr2d5cZDwY1sfd4kIUUihyv54nm1IPrSMVEGAcrFurBSvSoZiI4CJ1V++HwzB\n6Slg\r\n=j3d3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d0f073ba6649f0d422560887e32f9368e7d215ba","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-05T00:15:05.784Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.2-renovate-external-non-major-d0f073ba6649f0d422560887e32f9368e7d215ba_1644020296407_0.9961117936642132","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.2":{"name":"@balena/jellyfish-client-sdk","version":"8.3.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6d05305393db73d54818d9e182c048f25fc027cc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.2.tgz","fileCount":34,"integrity":"sha512-LyXPwbR/8xLItwhZQeyWVd0Vr17InFIqFaUblBRTlUUbW2inrPzCu+4GF28lq2CfJZ0+9Am9XiG+M/8FF6qTvg==","signatures":[{"sig":"MEQCIFHMuefOBN9fBclzdCXiN65Q/N6rxC0PvSQCpJ549C09AiBcyGZ33Ld6K7DYxuOegTFDk1bOGOnozOQokxvw+Gb8xQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/cMBCRA9TVsSAnZWagAAvXMP/0X99MyWcZE6gP33dASW\nwTV2RX5dAonMS5DZmuV8SRb16dGyjAJX0LOP5ZG0Ckm0amRQbFuk0vMZt0BH\nPLGoLRskMoy/CRl1uPtVaGrH7TLKH4fSHSVJMQjUoh7uqk9fIyHeBJ8AUxgF\nokFTxn6oZoyjHnuFxIESyVBCGSkgKsOQYwkHT4XaPHjHiWor5ElxLJHtrx/U\nQTM7kujLzxCfp75AHG3cgYCnntD9eRtlNfBoSutS8dGcKyeM+b0BCll6tyqE\n6xeJygbXdDOy5Vvt5MKx0SQ1wF/s6se3JpKPNREO2RfGydctRzMsO4FQQsYV\n6pUbHWQSpebmP9XCPVu8fPwpOxklHiYYaWvxLBvDO6ehpk2ArpocDIcgVQJG\ny4E2iuagRaZT/QWkA+ULQFVnqYcF/yAGnNgWz3Jm6/GnMZfa7Nnkh6FpDWrm\n3ghOyV/SykT6WDu7AszaId7/OW6ywcR66HAYXy4QzNlYPsmtEv/49hwO3FeK\norITvJkBv/rnBave0nL60IOgzbBMbEaA2aXC8NtdWjYmK4ekZUP2Qn0lPEaY\n9R58nYZ2a1+0P1aUiRU0UHXt3G7G9VBE3sESwn0/vmyAwSrd17NWQOUQTa5U\nZ8Eirs8tnIDcDDX4yaGAaB8yQ+tnnfMC7G/neH9Gfl+Ix9nTEZi5xKvw7O0G\n8OgH\r\n=lrir\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cf5dc9ba4f4b59e69b12023145f5b8164d016741","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-05T00:19:29.072Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.2_1644020481030_0.5114940859235768","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.3-renovate-external-non-major-dd3243baf3ee4f470820a264d8344ce3a4c2d165":{"name":"@balena/jellyfish-client-sdk","version":"8.3.3-renovate-external-non-major-dd3243baf3ee4f470820a264d8344ce3a4c2d165","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.3-renovate-external-non-major-dd3243baf3ee4f470820a264d8344ce3a4c2d165","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"21b84086b8bff3dbc26e1bcf16bb8075907e14f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.3-renovate-external-non-major-dd3243baf3ee4f470820a264d8344ce3a4c2d165.tgz","fileCount":34,"integrity":"sha512-EE6WrTNhpZd3umSy6Ru/8+jhtPDjg8mneSXjPuQ10bhbS9R6X2vnixEAYtHc5IX6IW4udBb+3ya9eX0D1C+0xw==","signatures":[{"sig":"MEQCIFvvBN12vzh8ftMAGHtHu5myX/iz/3dXQl8COV3njTQgAiADRvsSm1tLCy8nQemxrVgsd8ExenOJZkBvQEoY32oXyg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/mI2CRA9TVsSAnZWagAAl2UP/iZlOR6Q79TEZjNZGTwA\nUdLPD5Rw6qWrtQLvj0KvZjzkNjcPlXrUZ8f3klRjp1YznF6LDGNzuXHeIyko\nJ7iyiC+6JWdJ1Wm9OJmw1PR0c8t4iNhLVR9DdNu13/ah7J2c5L7iljXPCpl+\n38KrI6CVDK9J+UZHDwPITBG6Qg68vEi0kGVXKrBNVk5MnBYGXS/U0rJO/kxH\ndtsdVfau/HLBisX/7N0bXAZ83eKkVeG4sgvJjm4JtApIuIrqqAr9MOZSoh2Y\nUxLK4RqgSpOGm6vOPiEfLVyDR+6xNITlIzFGEn+RlwwDX96ecJN+iWoz8H8f\nAsF+xQopryNkFHoYo7vcYEcWgwbaTEEZEt0LdBFCHka1zeGGWz6AJNPdQPxe\ncbRn/6kNhVrqnMpaUl4iv7JCtAKJqXi1rSzlEhN4BoywU+a0To8heGOBQAix\nX1SWnCL3ShA03OtWxbHf2BO3j4RO26z2BLBbQc68i24IniMasrz81RsDwTLo\n4YocZyOiAaYkw4pcAG+6iJWCq7PSN6XbkVbkGzepVKxzX5obEKE25VNUoEpO\nb1a02l2hwBccAZcy494AnHuw2zu4HMQhIlhkWbH345+qubV0cHT9G8spL/76\nljKnz/dUq1v+csodevj3PnZ5Qd91HaMBOtwA/Zf7vXDWHdFNFQ7go5518z66\neyhC\r\n=I7k9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dd3243baf3ee4f470820a264d8344ce3a4c2d165","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-05T11:38:12.496Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.0","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.3-renovate-external-non-major-dd3243baf3ee4f470820a264d8344ce3a4c2d165_1644061238795_0.3485844262241078","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.3":{"name":"@balena/jellyfish-client-sdk","version":"8.3.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"922f091f051d4edb4cc4a870e60053552caf41fb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.3.tgz","fileCount":34,"integrity":"sha512-BJxMVPm5UdCHYmT3L1aCfwtD8lipMfAYl4lYRtamxA76gPYugRxWrDZRrpGTY1ULKhgS2feNOYUeccaaiaPG6g==","signatures":[{"sig":"MEUCIQC7lrmci2GguHeGCB/0iGjFpQBod+gFYnBhYMTtuA9zvQIgcIRbrML2LB61Vp5lXS9ba1aPqCtF9DGT4ybbfEP8F+k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/mMiCRA9TVsSAnZWagAAE10P/2ahBrQhDvIQteV9QzKb\nyCMQbOgIreU3GBANHYqCwyMBbTPAWWRUGojN46eZP72OcbUp4GNw8Pz0h28v\nLzEer4Zp20z0IP2YA88FJtYPTIhafp9zncJo00Coj0xnqLCe40NlPQj9nOQv\naKqnm1/eughSX+93W0F9KK4KDPfUgco+aAJe5v7vKM0/NVu9VRGcay82ILgC\n6uuEKgvV4NAg9gcj54+fII0ccU5N+Civ/WXjgNOKN2ByBgHR5gZJQ5lXCQr9\nEnhr/2Pue/hCQmjpCqDOeQaywIIpHqty2G0kZJgeZ9AzLZL8OhVo/AvF015G\nvO342heigKBYywWHJ0Cb0sIityGawKdrIY4iSW01+BfLWVOuZ55EO1o6GYVc\nlR2zuBCRE/GtILo4ITFJhD46ebhK/4lihK/HsuYrDmSNcx2wBZJpr/59FVJm\nnEII0MW5z4DcIqFdoooB2cf8rn2dKiB1S3KW9hpQVo0v45gihpx2PGdp+V85\nLS6QjMIKRW8wVGBdV4LmiH73yhYyo+LZoFSt58xNKKZ4gQLBomROyaItIZTB\nNQ7tykBsWbygQREGVeHDBknKJ+wikIhdDtQBpvnPdSsbln+EBSYeNHh3l9/6\n+upq+AnorYeZ+Z/zSnkSwHEqt+dXe06U607PHRUNJSMXsuuXWQKHPZGjVHpR\nYXK3\r\n=PeHX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e6cac3dc367c0c8a9d6a2da00c598601be210431","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-05T11:42:36.382Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.0","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.3_1644061474202_0.1398749567021691","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.4-lucianbuzzo-fix-streams-bug-b044456c2e6716af463681d5ca060cfc4326f981":{"name":"@balena/jellyfish-client-sdk","version":"8.3.4-lucianbuzzo-fix-streams-bug-b044456c2e6716af463681d5ca060cfc4326f981","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.4-lucianbuzzo-fix-streams-bug-b044456c2e6716af463681d5ca060cfc4326f981","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e1e3af28e7cd95311e403b0607a7f88eafe95b28","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.4-lucianbuzzo-fix-streams-bug-b044456c2e6716af463681d5ca060cfc4326f981.tgz","fileCount":34,"integrity":"sha512-frPf+ilOK/6Kh//J8Zsz91Re6hBfVfcnqpIH2jHhswmbBZv4C6RjvhCa/rmHDTcgCopdjUW3Mp/NWx6/82UFZg==","signatures":[{"sig":"MEUCIQC61R7QDpQu4JeBHpBmOdcvdKu+gjXrZ3ij68YdRgID1wIgMqWpJYp+oRDrt3p5n8ICvvatl5vC1s9E16YGhU3pAXA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282983,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAS+/CRA9TVsSAnZWagAA5PQP/jJZvDOMGXKw5QRhUP76\n2NuIXe+eLd1O8DS+SbcfnCO4XOMgaBzezscOQ/4Iae42LboFWujqfqWcDEgz\nXd4XuxwQT4ScH3Xqhq/+uPTtC/iHR/2MLXPCVjNGs9wf1rHFpkO9vxwcXeoP\nMXqXiDah21YYcEHV8jk99kcNsMhA89dJLPbk2bWMGIsOyNO7G+ZQwIlG4syM\nFCO8HB0pM5RtgUZoW2JTrsl1rjabovSF66YHqZf0yFPMHLNmbowuZgslQXGF\nTsMR148kZS+OO5JNJWrOMUxuLIkz81lQjcWRfaLyfXwD6B0Kdu8aIz7Aiu1t\n2sEXHB6l8jnxrbTvaHNmwMZ3j19cU9hD76a81MVkxpzH92R7pO6850yuCwue\nhbO/hsZbF5IcvzfbWVZxFTaihx1ZRFi9HIREOhpDvHOcRdtXMJkvNoh3Z6VD\nKEvfEUIkWVoMCoJZbSjJKayZaw16bONNNGc9TSueleBszSXCAIBYc6Rj/IoJ\nOSaXIBFuD66p6h+y1LBhndxduy7OOQsd3RxZStM6ZUcl/TJx6deQjHF080xs\nrCCzGaB8VJB2mjFOddfTS2St1vK7oPM9I7MravOiGjq7hYuSjFwKbrpEecMV\nVuNXP8tm777Q7fE37Jz4n7HywpqgSB2GTgK0NaC5HTS4UlG7RKLa+1yqvClc\nzGlc\r\n=+UWd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b044456c2e6716af463681d5ca060cfc4326f981","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-07T14:39:37.136Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.0","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.4-lucianbuzzo-fix-streams-bug-b044456c2e6716af463681d5ca060cfc4326f981_1644244926884_0.7347359252871675","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.4":{"name":"@balena/jellyfish-client-sdk","version":"8.3.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2b2a08d6027aca467794196411a1a1e131d945ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.4.tgz","fileCount":34,"integrity":"sha512-FFPD/nLSrjnOZXXBcroQBkcMzUKvnjsa9Pr69odO1ll71vdHJYmmUyR+j4H0W4JMc+EVIfqK2bVa8YtkRcPdUw==","signatures":[{"sig":"MEUCICNNaKV2DMSWhjNn1ic8LhXq/E3jEDxfSW7CNlHYnncCAiEAyenhrQGEcfa1IXf3gksfdNUAj+Z2frsnrBAW7eKD8CA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiATHxCRA9TVsSAnZWagAA1KEQAJB1243GITJWm8Hk4lc8\nRibD/Pww1PeIBYnp28Eg5S+p+jzPmIkXlbqd0+klcW1Ir87SF2/hK+/SZd72\njIgVslsGptOxsuRpMcWZpY/IT9N17zme/XwTSRV4dkoTCl8eALM/J3dTPUEU\nrddJUdcoBEeAACSzpZ7/XeCC78zmC8b2YVjsF6EKp+bgBpYqIlLzUXhRwjDk\n/o+C7eCXu2dUqeC2B8zbBQfqYiBHqx6YjA8fdczyZ9o7J2cX+wc082wTp4lV\n+DIeSoqHzoJkqoxoMQrqsMfeF+wgqVPs/aZpBmuhDCypIYRXWcg6YqFRa9Me\ns37YhwMYPq8LwXN9DJFksMiA5JSrkW9l53t4aaafUMUn/dHRmEpnnKoGypYY\nOVU636vPbGzU+E4w9lEHJzO1KLvAwKsKK+soGz+8I2GUOulszm8d8ISzcUy5\nyLe/ChwEyYwktNDfQ3aZ5OvaMSBA+5YdL5Vq6IKVGCEKE7lrN2e15IEMd9I+\n8Zsy8GXjfN5Uf+WYjRWDgBoFtEhuRgHs+L/8hKD0hStu3wy1pR3b3m5DMKIT\n7CaTFx99yF8cVBdQq+2/J/1MwgaCNl4KUxX2nu2T7aTgP2SHXhmLIWzVJGaN\nCKnkI3euuRHS6kP6PBwINnVcRQqCSl/Jzw/+m3Un2XU2ZjszozZ2vGZ+I75h\nFYA6\r\n=uz8U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ad822df90e51112efbfc90d2af42dacea929fa7f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-07T14:49:22.843Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.0","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.4_1644245489840_0.8604684577272619","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.4.0-edufschmidt-authentication-tokens-67bd52cf01f157c916a623568dcf287b65cf8c09":{"name":"@balena/jellyfish-client-sdk","version":"8.4.0-edufschmidt-authentication-tokens-67bd52cf01f157c916a623568dcf287b65cf8c09","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.4.0-edufschmidt-authentication-tokens-67bd52cf01f157c916a623568dcf287b65cf8c09","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6583248869761afa0e0922159f4706aa5b44780d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.4.0-edufschmidt-authentication-tokens-67bd52cf01f157c916a623568dcf287b65cf8c09.tgz","fileCount":34,"integrity":"sha512-oL/DX5eVJNSAsM744O7Pdy7BjAOFr9AGMGSxdnrgxkMZHjufhh7I9UgqZ1deLnarxWYlLHGxzTYvZ2I952o2IQ==","signatures":[{"sig":"MEUCIEdPjcXwgty45y8V/jVoTR+8Q5D4veNHkkAY+in3mzLiAiEA+N7Z2IseexrGtZeJt5+ZsF0iInE6u8iGQKXtjAFsFB8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAuxsCRA9TVsSAnZWagAA6y8P/1nSypFN2ZFhBfcQmWQB\nqz1RzN5Ew0Meoqkwh4bgl2dl+fhHrY/uTAnUPtJ/KxBbivqTBOzLBSO3gmZB\nJvWRR8sDzUzJUkI+RzfcZGIv0JmDf0w21qnKGramab5sRTIFrFao9UycHfEB\nkDzEJIKz6tvgfKSmxe6s1tuPWIcVYcwsc0tzmjUKYuo2Bt8xSvmRlrlEFSLt\nvwGzgC4p2XY8Kkkvr9eVaULvScsePvqy7WKDsuPImMb/zgl7LFlkgZGEye5+\nOO2o794oJk3ODfBg1EcyPmhuq20D6/fPdq57Ph7v2tym5dt0mdpjMsvXbO0v\nRSy6bw1OzxWAiYJtPa8iuLEfUKrsf1KuDidiqk3KNIW6Skp9mpYsPq/TCMBH\n3Td5P4fjkwKS71Vai7wGkDcnCWrvTbODNznfM+Y4p/E5Fz1U78BY1zAKAENo\ngdshEAnYxXSJSt7eM5fa5YUvEbKV4wyRv9dfhGCI73PREFFgrEEmTubJkDsF\nb3LE+sVmFVXuJAkMuuN0ZJHThWD4ISzt0jsCXSP1OxVix0NfZcmdklf4gB8J\n2ZZxYa9bblioEv0D9jdSvtO/W468UCblhid7YP0lCDhBdrep60CPMpHqzgIV\nALH8ibmgsqmugBBPELCDdXJEQGC1fz3Tz6QBQaiM6Wsas+m+I0oM8rZG8IXu\nyU1k\r\n=itht\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"67bd52cf01f157c916a623568dcf287b65cf8c09","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-08T22:16:11.203Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.0","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.2.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.4.0-edufschmidt-authentication-tokens-67bd52cf01f157c916a623568dcf287b65cf8c09_1644358764311_0.8590172245646062","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.5-renovate-balena-jellyfish-core-14-x-2e0aaa79be13f5bdbf6c22bff13ef6b32fe49dfe":{"name":"@balena/jellyfish-client-sdk","version":"8.3.5-renovate-balena-jellyfish-core-14-x-2e0aaa79be13f5bdbf6c22bff13ef6b32fe49dfe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.5-renovate-balena-jellyfish-core-14-x-2e0aaa79be13f5bdbf6c22bff13ef6b32fe49dfe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6ceb2ea3d99ed6f3d01b1c9f5bb94631415ce10b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.5-renovate-balena-jellyfish-core-14-x-2e0aaa79be13f5bdbf6c22bff13ef6b32fe49dfe.tgz","fileCount":34,"integrity":"sha512-jj0yHWVVUzRnrc7VWv4DthcWiWva2q112FO+JFTqqfS5ZhuWS8Z1T6jM7pjH7th8GrZTKFnFE6qFWvtsuM65HQ==","signatures":[{"sig":"MEUCIGAnkIUnIaN6IH8/+m1r/ldA+nIrznb4kDg1kJB1ZeHnAiEA0OSNwRLttaIb1tn615nHKV3DUPYDrGMUhndZwkro2dE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283084,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiA58iCRA9TVsSAnZWagAAYhUP/iY90aJj1bfVroOmvtK4\nyfBOHWThb0bdcRchS+ms4gtbabuONxItukKMIgDSQBaT0T+mDWonYO39XdSj\nw/gAdKLQBOiYe0OtdHMFqF1KY+hpx31PYialKUgwZao1uLcmkOEq2ML+XLZF\n50Xhtspai56+EXga4LvzBGy1zshW8d8ICwLhUOPjseJO0qh+9Eso9JjOOmCL\nrgymisZ9VfXeQN1tX294vGB7yafgCYuemsvS7iqJxMaQyuhe9A3I5LNeW5SF\nARTjhYpEhRJsUc/oYkbX9dhB18my9EUnTg85xZ609hduQf3TeXpK+jUGDV1U\nEowCKjbBtYiiuJrYKuONb1a5AOymFU9hzNxWzlHE5l/5kG2YpHEBQ704d4hs\nss3ioXlBgNVIFViX8X+5JK0sd5MMWSr8bMlyIyNTe52gZm8OOzDfQto1fxY4\nu7xwlT6CAuARePs92/oKpL+as+Ana+ktGHK7msHLlOR1N2yVDR2oFMnjUX6G\n8C8dhVadY15OFNltyrhnUiCnvVrQa0aBvM5KHqlGIfHFHEoWqyASEax3DplI\nKKmHnmhlvxfP58ld20+GGrunavV7Nfia5iggYYf7pbqAcfIuSlfTz6k8IlTU\no6lwANollgb6qkyj3/EKHGODcxmDRZ+VnhSmX7pJIuEfQEbMjvToGilf4caz\nyYmZ\r\n=rZFw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2e0aaa79be13f5bdbf6c22bff13ef6b32fe49dfe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-09T10:59:00.953Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.0","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.5-renovate-balena-jellyfish-core-14-x-2e0aaa79be13f5bdbf6c22bff13ef6b32fe49dfe_1644404514141_0.251912516427508","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.5":{"name":"@balena/jellyfish-client-sdk","version":"8.3.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e9fdadd55d9ccc8c8761171c60ad44c5977615dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.5.tgz","fileCount":34,"integrity":"sha512-xgB/N8NXeZuqNd+bHhFdukEi3be0zqgO0s+M/IKV29CdN2ZzJ0ljVfD7XFgxMpof3aPHnjHtmoZuVV28I/Yf8A==","signatures":[{"sig":"MEQCIAbQQf/WMQ37yKuORpU0QelHgbFRMoFbMZakZsnKDN26AiAvmqBCFuZrutgmQy8KJ9SHk8G6Vbv8WGvIAUrmNjo3wg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiA6FLCRA9TVsSAnZWagAA56sP/1btuvxXP7xywWQaHjpM\nFxX1xSnUCkmh4WKa2FZJltDvRl8gTBtcLw+JpXDN8WIuV5Thhwk5/0Xe+YUv\nGvXDHDbTk2GtkON3A0x92SPLW12RmMeTTgDz1ru6rRQX4TfjxZRd1kN/zD8O\nZ1DPwcKbWSUarHjdBjRRTy4DLn18+6C5RiLQBmT+NsDoYgVyFHGRX9IhW7nN\n4C8T3M5AGXzGRZ9gMUGNh70dzH0cboYrhhP0Y8zzCGgR2pTeDN//k5qU83Er\n76JY0a5f3h/hsFuaJmYGenXqQvJ/zvzw6dGh1lQ6c9kaGL04XDEj0A/hQWHv\nNznHF03eCjM2loSweInxcUqaziCiqcFq4PF6AUzD8o3HCmvTSoBP03RfRBP9\nFsAsDHITPJy0emOsiSRr/ci5+K/dXEvx5iMT3TPtrCg1+WvDMFV4a/CayNU/\nWWNsSB21XJch7EJ7qeyt0ws3RKgUMLWAicKOP58LYK9oO2++2+Vb6L9Rt3Ly\nQQK1J10cZKNHZFw9+PTLy3B0xEC6Qxe4tlk77wdMutcZDw2eYNVMoFqHCRQD\nE0srK3K57cW4gInxXkbuyJyMNpaDx80TETe5wIVfAqKjoox0kyEbzvYzDLHZ\nKH3x6lD7y7Tnjq1G7s/diWmxl0F86ORoDx/ByOArZXNGKIfoHNzO6Yt0e9yK\nMNdB\r\n=nZkc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3a9b529f610eb4bd2692b02375c518473b5ff743","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-09T11:08:59.257Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.0","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.10","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.5_1644405067257_0.8133711130041388","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.6-renovate-external-non-major-4ce93124cb39ccb109a54b333371640f5b5bd157":{"name":"@balena/jellyfish-client-sdk","version":"8.3.6-renovate-external-non-major-4ce93124cb39ccb109a54b333371640f5b5bd157","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.6-renovate-external-non-major-4ce93124cb39ccb109a54b333371640f5b5bd157","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7cbb486fff119cb3d644e28b46816c3bc8e9498e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.6-renovate-external-non-major-4ce93124cb39ccb109a54b333371640f5b5bd157.tgz","fileCount":34,"integrity":"sha512-F7D2ax8UyTYcj1/nBKV5gDIwRl2N9e/bckYIrg6eVVE3GcMA9almlEzPeRTK9dt6U/NYXmujcPEKHyYWAEZQkg==","signatures":[{"sig":"MEQCIBG8d/5bN8j/B6nubmMdUJtGW/GaReiPewuVmRgmJ/aUAiB80es5vU4VC3GTpLfdd30g3bOVh7nmed1EBD633N8zjg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBxN6CRA9TVsSAnZWagAA6LUP/0CiYN6Izv4JenQwyk3N\njKzDBRyrVIwE+7hM4HIllARiofhXo5wqP6tGvQH6loanrkC8j0zErMCuMM7c\n/pkvXXf2S2kbJZIPXxqeT00dhPRREj2GGBDXtVIupmttDwu0M+dWxxF+EfNm\nG283N9jjjDEPpr4MrIZkIvGA6oDHr/5jcAvVspzEojRbj4UswQ2Cd7095CHi\n8o8+bn3OhnwlefIPeqhnm0XxBNxiVhUNbTYHlPQNH9mQ/NtHVidDuqyv0T4c\nRdG/f848c4adbuLkoH+y0/RmM73OrZ8qqx3G2YMWATRxj61UJpGbAjxI5Bmj\nhZDWRbfg60etTTtajO/o/fVLyvqNDXrqH2+Aoi85T/GEg4i5PVLAjiyD2Vyz\nTjFsH+gBiughQhy5DqGhECPRLUI5NhO8BV0u5lcamnouaShdvT4Ylv+ULlUh\noMhdlamOEHu207ns7P/O48QR3sNGrOMxnHmZ33sB9y6aTA14yg2HmLASDF7g\nWTKHYatuqAhPinF//dyKEJ8Gtw2ta7PXb//atBNYMpBhuHwmSLcJY3ijq9J4\nH/nue73iqOouwISuUwV+I9B4qOftE6N28zg4GmdWmR7+V9fh3bR3lq++ax/T\n8FIfMSDaWZAJxf+dLPi0lMiU7cxmOzivn7BGdagfxHHbs5Cr4wjUCImjQL5i\nByc5\r\n=Qkcm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4ce93124cb39ccb109a54b333371640f5b5bd157","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-12T01:52:21.387Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.6-renovate-external-non-major-4ce93124cb39ccb109a54b333371640f5b5bd157_1644630906698_0.6014997354532514","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.6":{"name":"@balena/jellyfish-client-sdk","version":"8.3.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a19cbf2f58441beb7991ccc151ae0d6ec78042d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.6.tgz","fileCount":34,"integrity":"sha512-9EdRl00u+YO8fQbrR1sPiC8unoAYOCrM1Eg+y16Pu2HvdjZP4sMVQ7FqckmPmHQ4+yzpgONEBKdmavqmijNxjA==","signatures":[{"sig":"MEUCIFNzxe1DIcY1Da61Kb/2YcqhGAtGFLtp3QUqHZCG0zSEAiEAjKcUTMZOJXCRZWs9rUzckzHBHp0QIBvzqWlCIAViWc8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBxRACRA9TVsSAnZWagAA7cEP/10LQcTZF6ACXTyt4usp\nqUm7Juw9RPj5kKZF7x/H8ifnLQUSaqD8gjqReeT31qS/hHoLoAaNhCbtyqUa\nOZDdB4ezN/8FZ5/hpoO/ftnoVbpvpHAfVorEAKe5fE9WhBSkcm5N7UpxOCJv\nDfEz2IWm7GojOQgNInFBoI974OaUO3QyLJR2OqOD7+YROrk18icRQlNEQjPs\nZB/CbP7qBjkjV7dmZrmQXV9WhJg4FUX+FNsz4d9lQxamWLUD6Fk/KudYKvhg\nTUu7H6EEYecsuzVGa0iFyLweu9ov39YbF+C2Mw5gS4LCHGohoz7LSX3xg+qp\nXPFRLGTNVD2Snj5aolAf2mNTyR9BK04lrZvcgjUhPCeJDQfDDh7iDuhpAk2/\nAnjlmM3LuWbkcCaeG95uLlJkI5RuSI5s6k1/WmD2OhKDrNyQcg0wQR9XyZDM\nVoOBrS1hq///7g3J4VWS44eCCmjpB08L0j8bpOT14Iilgtg8A335Pm0u7pgU\nrI1liCR5/X/SbysByR9U3AHy7pWcuNbCL/cfsMoPU37tfiR4Q3TcNxpC1mMu\nzbGQRy8Ea+Zzg8JW2f0YDoGVseCF5dE33USOFZ5d25T5O7VFvkqVw5PV8gr2\nOTTMv/avNkCV9KkEZa9ZursC8YYSwhkD/gqf9/Of8RoiXwYYWkHKtalKGIBp\nCnrY\r\n=zxBh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0efd0c5aeef5d1ac1deff00d137e69cd2b7f7fa3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-12T01:56:18.370Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.25.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.6_1644631104150_0.058457436402990615","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.7-renovate-external-zero-minor-b66a69582342b61ae23557197a7faf2bb2ed9803":{"name":"@balena/jellyfish-client-sdk","version":"8.3.7-renovate-external-zero-minor-b66a69582342b61ae23557197a7faf2bb2ed9803","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.7-renovate-external-zero-minor-b66a69582342b61ae23557197a7faf2bb2ed9803","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"247d231459c6f48622c378cfb79933a4ed682cef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.7-renovate-external-zero-minor-b66a69582342b61ae23557197a7faf2bb2ed9803.tgz","fileCount":34,"integrity":"sha512-4aJwdsC90Ow/xgYO7yfeU9kgtFv3gKJmRge3e5wU9Lg9HCATujrA3KngyNFTyxtjAPLnucXshAKx95QALGpvCw==","signatures":[{"sig":"MEUCIEQQO6SlfwrsljU2WCY9NYxpRs5bZM7MzeeRG3GYCbOTAiEApPORUxDSNmkTD/0JdFoiQlmlogyl3CjQzXpYh9RF6KI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCRzmCRA9TVsSAnZWagAAdxMP/iNMvgSrOpj3Du4MrEWN\nzsxo8XrQk7Th3MHwczk0fzViihgdxeHqrCIN9Df+nZElsxFouO2L+GrBbINZ\nuF411yLE4jZB2MbJtWIo2LK4zhh4tLZmHCcdsuRuh3mfw1cnVReIgnCxXwaE\nB1i4BeYIdYCq6pqrEj7pPHWaYIWDQnyq+3cngR8KEmk2qyhG4HZcyYmrFDqj\n6+RhOk1ro0UxEoHzyxqRSqZUGejXrTwhMLTPW2wRwGgQ3m7rgbOqFQRVWK82\nCj/4zMu0Jbxu3EYXjE5dPCqUiNPqVgZ08iJDyEf3o1BkFx2p594z5SdDglNX\nV7fqrL3/nwDYUz3yBuFxSXtxhYlt5nauPnllckq4ppXJty5bBS2DlhvTRrag\ngWVu12Mu01i7CCXAtq0R4lYIFPXhEsAa5HIlzPq8SFrYi4F4e4zDoPMJPMKc\nq5cWTyvq8IZibru9lDq4grbHjRZYnof2SB7Wb6TFYf8dk003lXxpTzaQadLK\nFU4w2j2GNVZ2KkG31H9PAeeq/i2Rju1ORryQJxgvLmXLzqdDktScbT7dIpq6\nbsEnfdCukpD6YU/0vFrI9XZlWn0eVJbXLwJLDB0l9xTzxms2urOl9uY8198b\neAYuYHRlWxaE/XQwU6BIGvt4ACoOS3lpN9IIajg5GEXXOilub9RY10lhmlXp\n8Jv0\r\n=rp+l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b66a69582342b61ae23557197a7faf2bb2ed9803","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-13T14:56:50.152Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.7-renovate-external-zero-minor-b66a69582342b61ae23557197a7faf2bb2ed9803_1644764390197_0.08735256255773405","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.7":{"name":"@balena/jellyfish-client-sdk","version":"8.3.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bf5709362d885d6bf1c524c35c8a234a838c341a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.7.tgz","fileCount":34,"integrity":"sha512-mmnVWSgHYRMHuAPUN59FUy9jPSSSBYHKgQLlVLyOzf6x56T9s4sJtuEMnfWKCFsyGkJebGp/U5esVKvrXDJDSQ==","signatures":[{"sig":"MEUCIQC6FRXMn73wpVmMCJECxHRdjIOOws8GVuwV3yYBy5dYAQIgEPxVqBki903+W+MW1PVopE1V2z5VoL69feEhigEi8pc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCvutCRA9TVsSAnZWagAAKXcP/jI5hwDBg0caNWHLbnSR\nQKXdL4gLvaHTmg5nk6u22nbFXCSLkLfZ7rXN33w4X0wvnM4nPE5hHQkCs0mA\nInxI3xwTnGPkq/eS1BcNk7pob0QRiQoLtaPSIe5GZ4PgvBseUx5GoTM2qzFJ\nNJZPlWEAmKccdcHSjskcIByY7BFHYtxqC5hReQGeA3H/t3YJzz/pMqzSGgdR\ncKWbQBBgJEisLKsTl8GYtM25MYJw+32dJBW9ukDMHh+cz35y62CuKdHxCj9Z\nYOLHUJoFg57MhPC+Yx7pbMigLr3djaD5m/MNWrTBZpq6coku5dU1E0YSzo88\ns+hYaNIiCB8IKZbV9ZAcyEJ1rAX8TMonL1gITDi98iOQOqy/ETv+MzJuaS/D\nl+I+vPgS7GDy1JVHxZEJtHAEjreNgXb8ZCG9szF4zi5LfPWcMD32GRWxqeeG\ntIUwMY4hfx6g2MtCftcCw+WP7p9Rcc11XpSqw1n+Bu3p+xvDoNDovTmDPBT0\nqk+liyD8Xdda7DcmXDjKO5TAJcqOHW7gTTtHEybGrEjj3J6ph1e8DrFbNtRz\nzkxOSS39IW2KcvB0DPzoiwEMDRoXXDP30GIpWT35phqP9bmyAJa7WttUaSs1\ncmB9ziPdXBTx06GYAly8euwhBGS4weCCtdAAeRu7ld4gAi+/JkGEJBDrUz4+\nUAqv\r\n=Z217\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"83ac09726d276e0bbb1a67df82aa4ef8a6708932","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-15T01:00:30.750Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.7_1644886957270_0.6206590965201473","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.8-lucianbuzzo-trim-cursor-excess-8a6f39b710b2e7e70ff0a023527576d23218543a":{"name":"@balena/jellyfish-client-sdk","version":"8.3.8-lucianbuzzo-trim-cursor-excess-8a6f39b710b2e7e70ff0a023527576d23218543a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.8-lucianbuzzo-trim-cursor-excess-8a6f39b710b2e7e70ff0a023527576d23218543a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e41f4d10a24049862b435397a1b970d8bc94dec8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.8-lucianbuzzo-trim-cursor-excess-8a6f39b710b2e7e70ff0a023527576d23218543a.tgz","fileCount":34,"integrity":"sha512-Bj7hT/B/Ui0M8pQOcBoax+FjAOc1mwI2Opr7TXOKB7nk/4O9f7ZgLQwEwgwEHm2oH2Fed7DZgg3orAYTRx3lnA==","signatures":[{"sig":"MEQCIBA+SvNC9OWGThpz6IBa4OYZc6TfBI4hgDsqNrWnNOWcAiBVSO5XsGKcfhkpTFIRgDlJ4cTgrUTgd3MYFDjLMzeoLQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC9C0CRA9TVsSAnZWagAAbi4P/ij0+iea3WpN1kkD3yYB\nqPAoIBt3UQPJCYbB7VEWEYq2cPPBnGjHcaaQBKBrI7XG+fuGQ2UZFoeJwb4B\nUObdgW322nXmZy7DTIQVbN4qOKy2vb+BLCdhsvdHQzR25IR/417XEX5fuMec\n/zmtmnRn+0hktx2vg1TSiyrh92y0vsi0AU2LihYRz+RW27cPFBOTjGwlYLyH\nyNn6E+uXttexuEnmF3VIQ+mt//+Ys1GXONf2hutOIqFct32FxIipnqTpE99u\n1lPL6gn/MEycv+1Iv618m12Cg76hT5KnCzUfW8OwTpqcz2stRkfT9WUAqfmG\namu7CuGmabzWMYoxkEereQC/b4X2mdn7kG0L54tqQNqQhG7VBqhIxBSzxm1N\nR+sZl7ybeTKiVoQ65O6+YLCq5yp3t3nYkN+h6L5hP0Mh+FsGmM+Sfs52/+AC\nGJ71iOtQQcZX1JaDy2yxC7ck8q4W+USSgDQ2HRrBCsoCUstl9uDQ1CCfdh0l\nAnq9wzKjX6XvnWkfo1AuLsu0B1xrVlKG61+5jTBJWt/RklaUSop2UGhYjSSe\neolv94TDnRVSS2COESGTbfuYIBAXzSBLZqXN0/a5fefkATNCr1dWla9KfxtJ\nreuCxTkTDEhztVOdU6K9T5fGFbUCO5xAjd5mZgqchOM7RYX7pjP1wcUcErEB\nPy6Y\r\n=xTjW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8a6f39b710b2e7e70ff0a023527576d23218543a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-15T16:08:36.784Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.8-lucianbuzzo-trim-cursor-excess-8a6f39b710b2e7e70ff0a023527576d23218543a_1644941492682_0.2552393449066912","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.8":{"name":"@balena/jellyfish-client-sdk","version":"8.3.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"848b79952d97e84a04851a71fee30412468edae4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.8.tgz","fileCount":34,"integrity":"sha512-5ujJN+rmloHL7ftxr4kDX1wBuqgnLCLIVnuadPaAhC2iMPmvk92CsbL+J6GmEQQCSvskH9zeUbeDiuYrz2eqDg==","signatures":[{"sig":"MEUCICU6EsKrjHT0C1mk1CvSCdh1+wxhv+9Q2ZnypHEuv0mqAiEAtjSquRL4hU6/O71uHvK9aVtwEVAZRH3Le2gUrG+btiI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC9MmCRA9TVsSAnZWagAAVTYP/jDS1FN+LAveTRt37oM1\nyUEhD79ZrlTCDl9zinV7QAPuAUhi39nOUhpebnLe1Qf+beKYjMFTowJVWM+p\nD1101lQGJ3jwmOJ30c9PpPga9X5c7Q2+XFy6XQtO2ZZdOpLrL9R67MaSirFY\ns8TnWAOn68X6wVpy5ukIySPBl4/0fWLaUdrq1E6UyqHoPFIlcGv+qNuGgBHA\nIeTJnjWPdv2WC4MnEWcsH0WffncWKaAfQsXVZACZ1chDFRTW/DONtyGUcoz1\ni5289C80Oy/B6JILBFFRIUxvrxNVgceHZkpP9siImOTiW3fLwvCf6Bd8AtWv\njYvdyCNxBnFWq7ww1fRE5WLP4dB39u2hReduFHH6/iD8f4K43AqERr82ktey\n4BBSu5u9ulBE2P/8zo21RvnuPT+UzfG3BEw+epmi1gYjNw3yllmoXlbULjs4\n+uL+XpMoTmrBiDXR92ZyM6ay2VFYT5PASoXgudYLUep1F6WLBVxnXYqInlGA\nmu/Bg9YM0mKgwKcZhWRq1a/ARvrDsqTylu9/S4UPqc9AKh/mw7EZ88o6wZp9\nNvp0PMVgGvh14mSjCQCAODZpOKmMpoIqfrKATJl6ZJ9Nvd+e0eosETVSVN6P\nJQcju565WhpZdP4HEowgya8bZVwrtua/b14TdrMqVliaqw/apIM7Oy2fFNjA\nANdk\r\n=+QQ6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2e09565099ce22afd16343ea893965117acb0ba9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-15T16:19:47.376Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.8_1644942118531_0.9533215946215428","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.4.0-edufschmidt-authentication-tokens-5dc3f76c0a39ba0079b1e2a82a1b1f3a7bafd48e":{"name":"@balena/jellyfish-client-sdk","version":"8.4.0-edufschmidt-authentication-tokens-5dc3f76c0a39ba0079b1e2a82a1b1f3a7bafd48e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.4.0-edufschmidt-authentication-tokens-5dc3f76c0a39ba0079b1e2a82a1b1f3a7bafd48e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e074ef1bbedb1a5e72be1ff8384c474e7519d8bf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.4.0-edufschmidt-authentication-tokens-5dc3f76c0a39ba0079b1e2a82a1b1f3a7bafd48e.tgz","fileCount":34,"integrity":"sha512-6tuXuqCp/ZyOS1bEeAFK1PvNg0pHHU1nRqHvh2YQdSVsaR9nX/JPFkGmYHDaTRf9ABvVaYdPNfGZ+mhQhlW7iA==","signatures":[{"sig":"MEUCIQDb4Ael8jeibQ+XicCKKLEZfoj+pUzlflE6GPpRRugSIAIgBW9mKf/Pybtd1RUF0QFrxgixbYq7OGvYU7OyGVo1C88=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC/mJCRA9TVsSAnZWagAA6sMP/j86+CIQkJlxwjE6TGma\nzgtKLEUy7vH0rUDCuoqlYMfrESYi1qR4Uy8n9u2HSn9dW+M+92+rap1fp9II\nsRSNO3zmhRJO44tdjtN2kXsgsc8EzVgs7om50f2AE89/BRf2hpL/XyFXfEKi\nQDIgF7lkEeE9qILk1agwUEVtTUqEATK/+9+kCKaUtHBoTTXu7oN+4lw2OPG4\nhq2qBnYQyMkg23Y8zXKJpcwip8YZ8bwiwVuV2oBZELemBhAY9GZSOmLxbWc0\nGIED750ogKssQ7I9xeDj5WpiiZYoJhj1+19tM/fk8V6aJUCWctlwbpTvpm+U\nwJ0pqLIJeCS8yxDzl0aS6QbBYhqT6UyeOVcGawQ1IhMNwccq7wv72iOIopfn\njIiNVi7ozNqOCR2w6Bfy/vFHzNnxQmWWRKimMs0iqFh5G0iHn/Lkx6gZbUYT\n9Zd9hA87NfnRSvmuQz65rVEtgYpPoU2+B6bjE3eEW9G1Q7izy+ghZAug8f4/\nfcb9+03URPI+9I+4I27GzNkXz0P+Fn2Jtun+RPbCt59sTKZ4GgA9C6OMLL9o\neBVkAJVa9Of2+sb/xiJOQ9hsopR4QeeFvyKGmJZmDz2/Z1fCHUGL0U0v27NZ\nkHY1OpG6+qpmBN8Y8U4egoOru12iAvs6Eb68qWtDKPnS+k3tX5H7pRbwqIah\nUIao\r\n=y7Pp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5dc3f76c0a39ba0079b1e2a82a1b1f3a7bafd48e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-15T19:02:57.318Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.4.0-edufschmidt-authentication-tokens-5dc3f76c0a39ba0079b1e2a82a1b1f3a7bafd48e_1644951945050_0.6805015183626322","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.9-lucianbuzzo-fix-cursor-overscan-check-57547bccd756c5e98a5f09547d56544d2802c890":{"name":"@balena/jellyfish-client-sdk","version":"8.3.9-lucianbuzzo-fix-cursor-overscan-check-57547bccd756c5e98a5f09547d56544d2802c890","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.9-lucianbuzzo-fix-cursor-overscan-check-57547bccd756c5e98a5f09547d56544d2802c890","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"09d3561449d0158bf302df5a553de579072f7cf9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.9-lucianbuzzo-fix-cursor-overscan-check-57547bccd756c5e98a5f09547d56544d2802c890.tgz","fileCount":34,"integrity":"sha512-T3qRWxJEc5B3xq4p4zoC39UgwJcgRarz4QfWEbJFizmZuFuANSxQUJQKIdSN8yrjNmnmc/S27SFDv+HffAw6Fw==","signatures":[{"sig":"MEUCIGwbbyg/eToUrQiD+YpG09G1SdYocwopngaQbRQ2P4fFAiEAuKh0R/oSeI3ThvzU91xysAUvqsLv1jw/2vxkvcgM7n4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDnk1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqk/w//ZK4WFOiJRfEBjpcUeCHM38s4iMxRPOTAIqJZlHBYP/4ZdV3S\r\nYs4RzRAfsNUbTEXj8BcfMAnOoFvDkPhjozktjEjjdQFTWbSZ60Zkkn6lZVEq\r\nmziQNOhh5n/M2wICU2zCU0WdGtrj91DD8zn8uFqggJxgXPRgAywqgIGC8Eir\r\nhU55wmQS+awt4nbfaZwo8Dtp5dQlN6pZMJ1/OPEhxKEKxPW+IdGfJ+qgS5DU\r\nikvESNK8EswrdsSseEKtxbz49icANVdc24k01UMEE/IR4t5do26vr97P5ANv\r\nh9pVVezLgi217EsV9QjflmtFUxi79PPxqfhL5WCo7eRMqVxWpD8EQVKxLkds\r\n38uET1CZmy9LV9Cg1WPU39IGvwfsM6AphP2Dhk9euR+yFKUeXdpUpMLI253y\r\nhznUqScxRMEDlPjXiMpReSAWH9/dfJpGaDr72V2UczHduuMQhVYuJXyMVTCE\r\nLs50yn6zFuVyEUpqJC7H0ElNa2pvdQzL1KcwyUgv4uhxMbaq4OjjZOvEt36g\r\nD5KqnNA3LEqyRiGseUfLdn2qBFLy8xBh2bSzDG7rcpDCNtxguH5EOg990EVK\r\nm6uAoNrkzREVtVfJYaCsa5PouDUWB4XMJeWKtterYdT52VX1EPlTY6xNm812\r\nhVi24XP7MmdeHk95DQRzFQa8j8+c33C4bMA=\r\n=l2yT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"57547bccd756c5e98a5f09547d56544d2802c890","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-17T16:32:09.505Z"},"_npmVersion":"6.14.15","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.9-lucianbuzzo-fix-cursor-overscan-check-57547bccd756c5e98a5f09547d56544d2802c890_1645115701814_0.4312125809786558","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.4.0-edufschmidt-authentication-tokens-2f34da2c0a94cc118f30a58ab944ae2058e0ef7f":{"name":"@balena/jellyfish-client-sdk","version":"8.4.0-edufschmidt-authentication-tokens-2f34da2c0a94cc118f30a58ab944ae2058e0ef7f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.4.0-edufschmidt-authentication-tokens-2f34da2c0a94cc118f30a58ab944ae2058e0ef7f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"70cb59042a9c6d913be5e9f595f9417fcc32ba8c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.4.0-edufschmidt-authentication-tokens-2f34da2c0a94cc118f30a58ab944ae2058e0ef7f.tgz","fileCount":34,"integrity":"sha512-EkmMzSugo678VJpNXxRTeXj2O/iCxdKrwPhWQDlFwze2OvBITOxf1yegZHLilLkzUI2MP+Sx+o8yFQnWluX5FQ==","signatures":[{"sig":"MEQCIDyyAsSbGXyUEPjHLl1Q8vGlerbIJIibJkcfFnzZfMV8AiBzFxbGYppAGQpU4ulWCX4Py4VSyuW59NQSyANjy/gw/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":288524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDp4LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmrQ/+LbBGHFr8LSmnOCP1uS7OJjw96GGWrbWj+ygCFIRTwlf97Gkf\r\nCd+X63rto3jVv9fINQIpqDKTtdwtYak+rJBJIDbqwnKAr9rmchOPWXHRygOz\r\n8t9bTYs1dwFq+Us9oSpJASVfw8plDBQB5onvAYHd5UjPtN007WnhbNLK5jzi\r\n6lRype3Z+svQU0ma7nrILpn9nrU3saz0uJXdujKWfEttKIONM+fDjW28GFnO\r\nd4dQ++fzD1HlWZYT+rz6T3y9PaFTO3voiHK01uBvrYdjuikKNSa5iHYO35Jc\r\n86h0o8wlSJaAHN6m88Oge0F29F1K/Nj/I4xCqbyJk3VjxB19+6ATUko222/1\r\nMouVkrYp0/eaQqW8EOQibkVxyAo5HhMFYc0u2LwagTsypnU0xmjHtv9cYFcx\r\nJRUmFKoCnVY+jvmvURBYucZ5rXxH6mOVvVXBmCFa539ylosc+slcItzCzlf3\r\nZlPnt6Qik1KgEP2Ieehu5RLmHSIGRqUXZTxbyUDWBgnl5hiMaT279KwLzBzU\r\n/+hpqRoJ9Zz35PTe3FreLcAaIaTrVrMJOUu68jbLq+v9/xT7JB7oCJpu9lG+\r\nu+3CSQ3MUb05404i2GOtkxGZUXiOYrKO6A2px4ZXMXOOp9E2gv0DC2OWKBxT\r\ng2wFN6B0eXii0kwzoKwXaCdS3SxYt924qVQ=\r\n=+mTj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2f34da2c0a94cc118f30a58ab944ae2058e0ef7f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-17T19:08:57.706Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.4.0-edufschmidt-authentication-tokens-2f34da2c0a94cc118f30a58ab944ae2058e0ef7f_1645125131327_0.9125191123993572","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.9-renovate-balena-jellyfish-core-14-x-bd0be2c4db9526195838b9923f6850952ea89d6c":{"name":"@balena/jellyfish-client-sdk","version":"8.3.9-renovate-balena-jellyfish-core-14-x-bd0be2c4db9526195838b9923f6850952ea89d6c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.9-renovate-balena-jellyfish-core-14-x-bd0be2c4db9526195838b9923f6850952ea89d6c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0f89cd1185908d59b26da2a067046c4da61775a4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.9-renovate-balena-jellyfish-core-14-x-bd0be2c4db9526195838b9923f6850952ea89d6c.tgz","fileCount":34,"integrity":"sha512-aGlfhQCY+kbcAkXG5Onn9IrO2B8KHal56j4VgUzExayDikRl3X+HaAn/1aBLNUKfJDEzwvtDbBqOLORLiMykCA==","signatures":[{"sig":"MEUCIDEHomG8WKvu3zs/Q36qEZSysOrHutAsD0qwWGgdME63AiEA5ADSasmMuRP3+0g85/0nED2v6y9OYW3suFJYBkKOjYM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDp7VACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrt1Q/+Ofx9wexJ5pZFX392guxp6bfnVr1vFnXBT9JbWDxovhceV+yk\r\nkIPMOm1mbSaoZEZqmepKC3L79OyiYN5QpfnkoyisyBzVE3iiMbnt4OK9h8OY\r\nyffESd7lYXfYNeBEJy9qWpkM8gjVpwEb7KxkfkAkqzFXTwOHLLJTiJJvqDt9\r\nCGe5SNTjcZBBEpicqp/hXhAk54EU6GoUGRoYos1VqvSh5JjkjQEWBfdzADL2\r\nVr5A64R6y03qp2wPfhEGSyD/1gc+pvMFtldSQ/jR5FzaC8rFEv9hXXliMFAv\r\ncUWR/dGguavYT2q5zXuRxYHtyt4tRfJYEVuI32aVIyxvPikpncN3WE2C4SOY\r\nEFZ2BwAyIxvbYpCub3hNVYKmnvZMHyAaThiuAwwVmRipPMnWG/QuWgl+o3Sl\r\nZ+leyWTVIXv9Sl/cRhGjrRg4fXHIpvONMhYZqnwgDbAYd3Fr/FZaBjXBbVLX\r\n6a5GcxfsQXONtupg9PIQaKFQEaAorT8awnhIWBYHrcKjg0sFDIiFbpJU21pV\r\n1w02Xhb+lNe+RKt8BgmBGNPUKM5hn6C5q2V1fdWdGN8XEr50DLTTdx34Labe\r\nPQ0sENHAgGYUlKOC4Ug5ftCcP7hPtaD+evCdGQooCo9MONRGp6hd9kjo+cdj\r\n+W1cIMl2IZ1GgdkA9m3Y5NWbLelx3J6uAxI=\r\n=4a6D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bd0be2c4db9526195838b9923f6850952ea89d6c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-17T19:11:18.223Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.9-renovate-balena-jellyfish-core-14-x-bd0be2c4db9526195838b9923f6850952ea89d6c_1645125332969_0.9609736538065785","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"9.0.0-sdk-post-a996e28b8a9ecc32d5d514e9de8b644b23db18ee":{"name":"@balena/jellyfish-client-sdk","version":"9.0.0-sdk-post-a996e28b8a9ecc32d5d514e9de8b644b23db18ee","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@9.0.0-sdk-post-a996e28b8a9ecc32d5d514e9de8b644b23db18ee","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2fca8cfe65cc6f97b9f4f4cb90ad481d2ad3afc4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-9.0.0-sdk-post-a996e28b8a9ecc32d5d514e9de8b644b23db18ee.tgz","fileCount":34,"integrity":"sha512-EDG7Tyo8rTTuD+CmxpWI2d7bvXQweQiVEOzVsgp31r649YEDZ/iFKTTwzuy5fAb/eVE5p0GdBOZds7i566YHhA==","signatures":[{"sig":"MEQCIDbw4LPNIGbSyoSHmpMHAiGZ5zGjyqk1SXormWodjQdXAiAYeHhF9yXudl4vmH3+KfegK1VrYvjff0JKVuS3aI+hgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDqUmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/3A//Qmvo4or8g3wNF4Bl3tf8KKDtVJA5Gt6PQSgV9FjO116GCDVX\r\nOnR/45KKDO3FhLSySDHPFqFCUr7sRoz8/4Lw7xDwydfte3QhqSAiIbgb4btL\r\nCvBjHjK342TyGPWE15EMyJaigQPYGS7W2K/juy5KcGIcALYYwucH1gZdRpei\r\nA6B1FuxC7xlZv7EZH+kLep4l+aIrffLhli2SY6qVM2dH0v5m0A/BSHK5y0EO\r\njMOP2IRCzM7MimBtNzJXvu2Q5Ci3Q2ozoRBdknsrojfk+kORgQmMyNgKKVRy\r\nmrYoGYoBVZ8D8oJc4Ka+lHX8qklGhRW42Gb5FzQrKAOyGN9NNZE7M0tRbA9U\r\n6vr4b1HvjjorDl/2UqCzww/nNWwBjZKobgvCrYjfreTvZJQi0S6LMdcMH9yl\r\n0heNQSPN46aSBBYXqBO6C1UvLD0o6LoJT4mjlBd5tAb5CDc9ky+pfH4fE9rm\r\n3y9y2Pv7vKCzLrN3An1wRg+JEV7tgrdo+z0sGjIKs2tvC/lichRHk+YrVq/e\r\nIv/Crx5wqSMRnDG2WslLGXXprycEQyoAceg3341yUmX11qjvhZbPY6lnVz5V\r\nnVTNcTS6ajJ1vvuX85xL+8zxFKRgCQ+XJ9TI8Dw9cYgTY0livRwQ/lnAE5By\r\nuY58U8vWBG+eWpxRcdytYa1sOzj4uMSgv8A=\r\n=cDqP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a996e28b8a9ecc32d5d514e9de8b644b23db18ee","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-17T19:39:47.335Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.3.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_9.0.0-sdk-post-a996e28b8a9ecc32d5d514e9de8b644b23db18ee_1645126950585_0.4224324741563208","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"8.3.9":{"name":"@balena/jellyfish-client-sdk","version":"8.3.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@8.3.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"37e80fcd396f185c861363ee2e1ea3783a1e9537","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-8.3.9.tgz","fileCount":34,"integrity":"sha512-9MHRIXltTgUsiHt/UmzjXjWszzxcA6pqYV6aqZl0JBlCLxK/512GkpqZ6zU2rNTUU3gY3cUdTzfjeuApMjovTQ==","signatures":[{"sig":"MEYCIQC5lCgbDwOnrnoXf647FdvZc3D0ZrOtWbwmBTQ32K/lAgIhAOjN63VyBksAkLNzk3y9jQ/tDeCGt7A2kp5VRX7KfIKO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDuf2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYHQ//V5Do2hWqyWyZLj837H+bynNzoAtQb3LkSPC5qYNrKkdL2XHP\r\nlefsHp4ui81qusuDKn5fd6y63eWR1mdaMnNzrUIJykhhuVRlI9bNuZDc6vom\r\n+YG73x+ZMNnlY4b74L8r/YFy4zqaW2HgostcvJunjqx/pFtjjZ/NWaMDZ4s5\r\n0GE39SrBumay/zhzIeVuMEKGza67wxNfG+TqivLWwAGBzRytOzycKhvKzaQN\r\n+Zb54u5DWb5CedmO8lrwM2s6DVzYhlPpjxe8kSeFMp43AWLlc9UcsXEaXr+N\r\nGas+B88s9lvNMgwgLEsdM7zllokwL5V7bo9Rum/fj8OocDjXUa6ESNEvQEVv\r\nO+3mr1Yed9nVcqEcvsG3HUFgQ2Qwvgq6xLA8z7+Inv1HWDiQknmP1XkorW0m\r\ndi8LGy6aJdyHjCRAqLTOzvwCbIhH8qZFedlHSLoP+UdXAee2rlOz9iVQOWmC\r\nILA79W944Bsmb+PCGFCgTizT+NS9SflgUqSxiQVGKRhuL7XG8QurRXt0Mtbo\r\n5m8q1kjDstm0Vu9OaCcQlntgST0Q5w3z4dH7h/1kSGQnCmCuR8C8lMruukcf\r\ndR01kdOX2XqaSKqBBvvadfvSJgSD+Zh/TiSteVWNOb9kkIj9KTl7stxdRBBA\r\nAv2EvLxy3vJN1BvLCADUCP60WFBIxb4o8JY=\r\n=lpJV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"71146bf65388c436354cf4fa428717a21625478d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-18T00:25:27.703Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_8.3.9_1645144054630_0.2954406838168415","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"9.0.0-sdk-post-93daff432a78c604ff98b55a479eed2b500580d2":{"name":"@balena/jellyfish-client-sdk","version":"9.0.0-sdk-post-93daff432a78c604ff98b55a479eed2b500580d2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@9.0.0-sdk-post-93daff432a78c604ff98b55a479eed2b500580d2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4091918fe261f1ef70d50c26ed7758914047d37f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-9.0.0-sdk-post-93daff432a78c604ff98b55a479eed2b500580d2.tgz","fileCount":34,"integrity":"sha512-YQ6L/uWpAf5qexjSsgFdSMTdk0axS6VfUlahtMA4FACOfAZEGNmj9dBvZl9EEMDg0TbNQN04zq31n3rCePwk/Q==","signatures":[{"sig":"MEQCIH3hiue5IN5U5CWjpcKr3DcUx1f6c59B8uM5y559w2WAAiBlLk3G9Cj8ASXtORRSmopN6/77kC3CECGFdRnDVtt61Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD6iLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBVg//U+Qvn9MrabXjYAg+2S0/t7SOaqbkn1Zpa77GMpunYvqOwVbR\r\npikLvHPVTrCmCo1mTzUFfzCx3OyPrlhhCph2tRdxbKLH8KjeQDccR+BEh4tO\r\nUWcSM+1npJUZ9VTe+YF8qnasog3kmwEehdzGhnk3zAWfEuMup+6OE+oI2oL5\r\nNcX1gJ6/MKcF9H7kbaGXvcxwFiNiipF11AW+D5YpKW15Y9RLsjNGm0DwdO26\r\nsFyJEqOpGw2fgusU292RJmyeSUwptGiJQupuB1T3BRdil342yzK3TYomr8mp\r\n3JGs8cMl7X6wcUjgMe8/LAloQ92dc53U9pp/upxhcWFnwQWl3aDawaD1pY2w\r\nSYScR1FvMMlFwo+WbEWJb1Vslqf9i6lNZaIG8Va6uiHd4b/HQHKLswOr7UQo\r\nS2T1QgWRezQVf7iA/NOcSBvvG1ZvO6m04aeKAZNJ10hO1H4l/1tAsJXycNZ0\r\nrIzHbKqM2Rtjut5EH+plV8yPU11x6QzyFXwrQ4xtNaJuZOFc2Q+9PessLe6t\r\n4YG+RtwHo/z8d9kVgwb4y9TZoeCcxw+L+R1OiL2qbKxVfvu1FxzGJe8dBW3V\r\n7IFI/f3iDdQBPYPrBFr2iOc4nIRvVLy1KrH1ZJJlLfgqIaYLaRP/wrvWbl2y\r\n3CSKyMyurA3JGr4/pb2tnlxtRSfCNYOq0q0=\r\n=CvYV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"93daff432a78c604ff98b55a479eed2b500580d2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-18T14:05:37.320Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_9.0.0-sdk-post-93daff432a78c604ff98b55a479eed2b500580d2_1645193355489_0.10306899763151245","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"9.0.0-sdk-post-6ab76e85c6a8ce43a2560f62661509dd90c79d14":{"name":"@balena/jellyfish-client-sdk","version":"9.0.0-sdk-post-6ab76e85c6a8ce43a2560f62661509dd90c79d14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@9.0.0-sdk-post-6ab76e85c6a8ce43a2560f62661509dd90c79d14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3e994c054d71377fe6669e40559a6e44791e6046","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-9.0.0-sdk-post-6ab76e85c6a8ce43a2560f62661509dd90c79d14.tgz","fileCount":34,"integrity":"sha512-6MDER/E/lpGg4vkSFUkaFQbWf+GIKNS9AxMt+cTLU5M9LmLgv2xCRZ+Z5iRgcWltkY3Pipx6M9QFDT3ul7OFtA==","signatures":[{"sig":"MEUCIQD8fhB4maQSPDH1VO2OY7LWmmHC2zXO/ZGhKMah26JPigIgOieXvUF8alDskuGsSYvIL9xiQVwkUYoaz3V74pkE9E8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiD8H1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBDw//Ve1nzEN6hiuY/HP594cn3HOsMJ1OyEfI4T+zeWpQChIao/Zf\r\nkCRCdjIMw0G4DCyqYvlrMjHXeSF1+oaHY7r25/VU7izdKOsdj1sLqt+TVAws\r\nGP9OKIpx+8id0u2XI0u11E552gNVMSIY7fNOGWsm75eG2MnrEeYsulVfblU/\r\nOUTLQf3AWNt5DmqWTTneIVYefTXmtNG6ILIGydO5x3vP+gZHZ+eQG7blDZHB\r\nmr8oGTsKoRhqdLprsZm55abv29BslaXq2Savc3h5WoYixlW8iehJwN7XEi8R\r\nEsPn46pLWLonBHr/qmNY8m3n2l3mJqAGFapr6OQSuQBq/fZ31RUE+mpxnlzi\r\nnYCTTZ7owM9CA2zgN26vzpjj7mkvYSrFjCHXFUSkGyAsUcIINBtVkcqwdZBO\r\nljlgOnHGQ/raWpDhvSLU5xUgZJdBCmoiFu/D4tziNgB825vkl7K51pOeg9TY\r\nMDqpmVwSX6GPg86mcH55mq2YKsHy3KD7EFcmYfpdTNE335kFAMLVed+Zlire\r\nQANPMmR3ypy641r5M9P+sNAQItf99Oo7ynvJtWIzfruoHN3kiCOZzBGer3Tj\r\nCOUD5lOOJ+1VKJu75FUHk36nL6nqIiLU6PmnGZAblIi4r7b7PHv2iHmnOxWR\r\noN8pZyyu/CR6A3AvwkbMiR6EzA6dRlmuYZc=\r\n=cbch\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6ab76e85c6a8ce43a2560f62661509dd90c79d14","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-18T15:54:39.109Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_9.0.0-sdk-post-6ab76e85c6a8ce43a2560f62661509dd90c79d14_1645199861110_0.48536210325660134","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"9.0.0":{"name":"@balena/jellyfish-client-sdk","version":"9.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@9.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a0fd73c52c52f4c4a9aa958391a5b8a22a770332","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-9.0.0.tgz","fileCount":34,"integrity":"sha512-r5N+yDkU4ppe1W8jeU4xL52YXWQ2DGYSnjw5kMsP3aBqBriu5uFb2gVFD9/vxMQvQY7iGUomkC38rc44EeybHA==","signatures":[{"sig":"MEUCIQCqi8MtHjL3mVtNRazeycbQjX6KUFvoNWBmFeX6SvayaAIgBgu5G+Ujw5uO8DCOIwjDlBVKZPWggnWtWPC0ZyKVp1Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEBonACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3dQ//fKh0oG/KGsIK4w5VQ5cA7m/EO3qpt9G3eGHNA9ZognEvCjHq\r\nkqEcZYKKvMXFXC75W67BfX7QeLUTENrIoTOwV6T010WVuFHwXoNydnO9/OGU\r\nsrwt7DVhfU2w8ZAkSqJD7vqFopWy+pEXUaxZEMX9VifW7oDiPCvtGeA59AFZ\r\npnPBk3kplczYEE0xngKzOJtWX+p89h+H+eRWkLnNbbO0BpmJoyhAL/hu7Ni+\r\ngSfg5s9p46AS2vNFV/gxV3iNnRyEXLopvYZb+VNKN+L41N+2rvMdk9M4xV6G\r\nwDvCqI1Krlkf4Qz0sKUt9/YLXhtwaCkT9pqlUCyodpq2avhAKtR4mi9HBWJa\r\nffKb90Sg1Tl64vsBTTIrPGtc6U0/pMInWcNRf5iToSi+yKwjgzHLxH6VXnsP\r\n2Sm68ha6kXhc4dLUUUvumaI8xmAhBSfbA3AkgbLMYopZVgCszH9I+sbBZubL\r\n25Rgb7f93YK1hCWZdxpUCWWLE7ml1h+QjEL7dr0k1tjm53/IbYqUEOzceXo0\r\nuoZKtUWb4+t+CfQ7b4Zr57yEXLj30sKH7wUq4Rz+7RL8hfnkmURAWCOrIGrb\r\nhhEKefrj9H0QT2yOU2aHzDBgEOhzEsA9xSmnvcnZw5le5pNT7cE+tuhVIh/T\r\n8TOmrnIgsoKrNu3wmWZmPogCmF69uyi/uBI=\r\n=T5+1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9969761758ada7140fd5a9f253dcad49dc3f4d5a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-18T22:11:59.900Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_9.0.0_1645222439105_0.013768402810104385","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.0.0-request-simplify-e6e4e3c5222410150976b5654cf0f0eef4ba8083":{"name":"@balena/jellyfish-client-sdk","version":"10.0.0-request-simplify-e6e4e3c5222410150976b5654cf0f0eef4ba8083","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.0.0-request-simplify-e6e4e3c5222410150976b5654cf0f0eef4ba8083","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e6aeb610146af5ed41dc0f96368303922a8601a9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.0.0-request-simplify-e6e4e3c5222410150976b5654cf0f0eef4ba8083.tgz","fileCount":34,"integrity":"sha512-Y2sLjgbqdTVunRnp385r3ivTpIuePNL3XP8OYoq+SGn9YWGdMjlA2EB0jeX6Jib8UTZbbuFQbE+APBo0DB70rw==","signatures":[{"sig":"MEUCIARoc9w8iR/krp69+NcolBjiAUY3maldLDeRJv+1woD/AiEAsZhOLZYeWhmLRpuQ2Yci+c34yOTNXyQxrmdt3D2fLCg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiECWLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1RBAAidSJUvPn5WSH+SAS7t4FOcdWeRZVp0RQCNEDfjvmMdQyaxi/\r\nzBEQxNgc34i+LY9Yj06ROnAkhFSV6JGzgG2gH+yMhynYR9AuHu0xysOxEIdw\r\nQxS7irYXrsp3n35LNDcePHf9l7dDLOOAGWrndBdor97MnF6waB39BT7EAgz+\r\nIdNojm2WzgTla9zWn2Oacagz6VMnDQ4p6jcOk7qw9NvcDds+CVnm9jmyh2Jd\r\njwMzv+GUuxdNy53ioonvvoHc2Nj7USzTzmaNdrgvCbtbFSPAJ/3mNXYeld7t\r\nmk2+24ScsAo3/jVzPFP8/v/eWF3HqPuTBm9SAs3KJ0aeGW4Rsuuz22edZxxG\r\nDPbILFI2NPU9pCDgX3nWOeHTPGybvh6AhMcETImPbRboDtkohhwuRgA+tfi0\r\nDrHIuteMJrMm0mRfmg7fmC3Q9ok3BA23k3dn99yCZ/VFdyx5erUiiN7iyq1U\r\nCteiDmfUOASQh1BBELnaXjy5aXyVVPHnEdd7lyYrbAh3eowzVSr8wMe3XEwG\r\nf4Zxhc8n5jHdx2TPkk7Sv0spNIlBhcSKYzLY3v4xE73I2+9vJrqH8VhhlmDj\r\nqaOu5IEMo963cbb3DkjjsQTlhd6BkEdYkgce6/iLhg0rfUKpf2CT+MaIyn2C\r\n+hN2iqs2w4G/U5BWxd3EPhKnx3iZ5HM+0y8=\r\n=MOHM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e6e4e3c5222410150976b5654cf0f0eef4ba8083","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-18T23:00:01.291Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.0.0-request-simplify-e6e4e3c5222410150976b5654cf0f0eef4ba8083_1645225355819_0.044967472746926695","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.0.0":{"name":"@balena/jellyfish-client-sdk","version":"10.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"767ebc55f035b47e58500bee5a43bf7a6fa54cd7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.0.0.tgz","fileCount":34,"integrity":"sha512-MARJtkTZxBxY24eTjENSQDCQ5TFNbUB4Dal4VmOgfe1xozuZ0n+VMDRzgtpvCWdgPzl8uoNz5onSMIC/rGN1yw==","signatures":[{"sig":"MEUCIBkNKGHkAdRHSPW/lYmSGoJrzCk5HIFWujwdINdIHhLuAiEA6/zYCL3RBIPGfV7nL5GvfhCcfZT6kcElFZUpQxcbJDY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280387,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiECahACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokNQ/9EEBFXiNuLCJkTbiBGWDDT4E0BdgrTi2W0fX3/N2UxrtWELwE\r\nHlW8h8R0ejcxJ3m6fAAER8GqQQtJAkcMcfdvpOSmLIYAGUlKLK01diOowVsE\r\nExYqefiLVElUJt628uioimfxi7xyYnvFrNoSmN4c4jXz603XRSAglyZ3sdg7\r\nEraS2tKtUPASsorhVT6o2zTk8oJ+co5xTfi+G6qhZgiF0ltatFdIcE1vj5od\r\ncHStzOanEB03Vu91VraK/BwiFybjrpqywTUXASB7OLKzyyH7jOo4Y1SaCaCy\r\nH7/BYXg/P3HWQFtV+HojCIglrih2m+Ln7RSaSHZDk5LSM0/o7CtqzkLR02Y8\r\nzwc9NYmOz96kmtlCcx2XOey4O1PiE+5Wsp1dETux/uN3ju4snA02RWYpxTyt\r\ncV+A/gKfMTUkIeLq4IuMmhbpWe6chDTWGbvsKkfAinouqiJdGfktIgvkfG4c\r\nEgaIgKVGfyalqipuyFbmmm3kBlr/ZRZKg7+DUzMZj5XOdY+thKO/BfF86dlb\r\nnYIPW749OAGtQ0kkQBOfod+jhKGNapqPBQhriOz/T2IcOJMk9JVMarx/vN+C\r\n9JJ7aa2OFKAKY6SCY6THT2avhZp9h9hZsznqg8LGYelHqFpeXaCEdZ/j3+L7\r\nK2Z8J+8zmG/4QNnLhu2n8Sz2teV2hl99aTE=\r\n=hTpM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cf66ab6d9d1a3c128eaf33b330e54c6266d9e655","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-18T23:04:54.413Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.11","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.0.0_1645225632924_0.14496046181646682","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.0.1-renovate-typedoc-0-x-b30cdfcd26a402ca3b8d28d740b293d4a5d06b73":{"name":"@balena/jellyfish-client-sdk","version":"10.0.1-renovate-typedoc-0-x-b30cdfcd26a402ca3b8d28d740b293d4a5d06b73","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.0.1-renovate-typedoc-0-x-b30cdfcd26a402ca3b8d28d740b293d4a5d06b73","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aecfcafd547b1fdd690ecc0c4dd21f8850a277d8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.0.1-renovate-typedoc-0-x-b30cdfcd26a402ca3b8d28d740b293d4a5d06b73.tgz","fileCount":34,"integrity":"sha512-75/hm9hcrv/KbNsnNjh3m08DYYIKw2eMW9lXPvsdSoG4uJFT+Cbp8xLJPviwruX2X/ahmUUWyVorer5LBDxPpQ==","signatures":[{"sig":"MEQCIGrkvmXlfBRZzrV42hM0pl9AjadUXEDDLhAE6CvUBFrDAiAG/jmsP2YPhjemCFtwSw2V3rRH0aUJmlM2EtYHAFcUfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEcuoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwHA/9HtBlMhcUGT5Il3Q46Cv7drzbI1UrrcMtyQUwmT54oISnD4TW\r\n81MlzR7Ax/9CNu72MMcaq9Gzn1YUdeCczq2nx5h1GCrgPy+ABWiK4pEyqSvE\r\n2wRV5jj7viaKbtflQLYvBNmC0aJgGzKwN6fNrAkb1EmryZHko9NthfWskLbN\r\nMm2zNxE8jdKHkkY7CqdrtVaGF9lB3G3unWJNowiow0Vf1xoITEAotVjADgTo\r\n0tt0R4bQg6qNtkWikG42QYH5Hgt+v1wLeHVaiAg+alQz9QEYjo/vifg0qy1F\r\nkZtO1E4cJ3zICLuYiKDWa8mN/pZpUnM9Odmmh/96VU1g35iDLSfWRikSzNI0\r\ne/DhOgqH1bi50tapRP8/iAMHpBSeW8mm1wACFugXA88s16xFyMd5lz10oKgI\r\nmOHdzv+hRoCfe6PYIcyr8VoIP+mkdoUIBfrQE8iOEg5f+9xcSbokYMO5rxuz\r\n674nHjVW0blYT0FY9e4TQt889Uy78uoWvB/cZXP7hl8osqdpGmLG1VQ0ESs5\r\nmWci+WxGkDqaAzuhJm9DbCKxDjoQ6VkL1loJYUwcSqpnNAtZqGO+hJ/vHf6n\r\naoyUysrt+RzNqyPv0fZleM5qfpjVSvKANIVjY4goaWWzHkSd4gwDqTaIy8yt\r\n4siwDusjn/PvA7GcFopwmelkiNeZsojfPFA=\r\n=sk+Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b30cdfcd26a402ca3b8d28d740b293d4a5d06b73","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-20T05:00:43.406Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.0.1-renovate-typedoc-0-x-b30cdfcd26a402ca3b8d28d740b293d4a5d06b73_1645333415877_0.7787143181725797","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.0-lucianbuzzo-milestone-requires-milestone-a73c3538363c4cc224848ccebffbc3f8dd343c89":{"name":"@balena/jellyfish-client-sdk","version":"10.1.0-lucianbuzzo-milestone-requires-milestone-a73c3538363c4cc224848ccebffbc3f8dd343c89","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.0-lucianbuzzo-milestone-requires-milestone-a73c3538363c4cc224848ccebffbc3f8dd343c89","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"64fabbf8e8634505bbf4749c7c2982abd46c4919","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.0-lucianbuzzo-milestone-requires-milestone-a73c3538363c4cc224848ccebffbc3f8dd343c89.tgz","fileCount":34,"integrity":"sha512-LVj48Q5MmSWP5vQ8CI7/JWAUrtF+mlRmef1gM5A78yaa06u5vjEHrV0h24nONS/+ligOGnk3+4NR53GXo1Gh7Q==","signatures":[{"sig":"MEUCIQDuJP7BYDRiB5N7Tdb2bBq9FLPzc0up/5Sef9sti/OexgIgbAHA6TUZDwB06WrP0/H5mIJBRJYg4e70MyEJ04osyhk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFQSiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6jg/7B3ichVQvcMgmfdi2HX0W7/QaH++ZwBKqOY/AO7OcLFLCj/9C\r\nbX3cmga3XgHOfu4orCwGifgXjNrc5ruMkfaw3vlFmEdX/8bkaHAYYE5IVWTC\r\nL7blQBG+xOOlbpIciEBfur2LbmpAMFYGjRDDlyfldj+rX9qHt8LQrv9r7mkX\r\nyTmIbmTt4pqIUaWohjHyQOjdsK4wOVuYst32alEuH4Zn/PTKOjCHaYgvB8BG\r\nVMys1tz5CSCM+bYfOV58dTyRfIDueBnUr68gIfQqM8OBgMba+YieBc5DRb9K\r\nmTxSoajNZpUGxpwf8e/2v5nX7sb+9f766uJGrfOx/0ZxoLiCMgaOdIXz1/GE\r\nFhZfHMVPt+RSKqlYCTxon0TdovH/NorI39s+BDruNhf4R5HVqe71G7il/AM+\r\n3mbT3Y1WpImjt4VKixu3ay3FPbHyb5SivQyvGs7+RUNI/lRRl8pbM6x/4oOI\r\nIMhQ90p8TncJjPhySIk5iVRjy4Zpw1RLBqpYlw6+zMoCNXvOcP2GC0wDe117\r\n2YzQrSx6vWbkEeSz16ROQnIJTrtjSyTPgisFZUPz08RVxvWQfUt9WU1AzzNs\r\nt4QDFbtONpQOAAI/P8rB7Yao1QiFNOMeMUSVdE7JeGChpp8g2ZvbopK8akXO\r\nzOlssgEwkjKWAl6t6dEo1KNCaFT6zYFjSYo=\r\n=FMSJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a73c3538363c4cc224848ccebffbc3f8dd343c89","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-22T15:40:18.217Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.0-lucianbuzzo-milestone-requires-milestone-a73c3538363c4cc224848ccebffbc3f8dd343c89_1645544610126_0.9706969334150559","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.0":{"name":"@balena/jellyfish-client-sdk","version":"10.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a042cdfd0094401b6b2eaa520809f100589a3b19","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.0.tgz","fileCount":34,"integrity":"sha512-Z+q0njaIxX5rM/VumYIqTgFlE9luENO4GLBAgMoCOzJFV4h2bxp6GD/fBRpIuXYll9xxr6KaVkdPXJl1YTekwQ==","signatures":[{"sig":"MEUCIEBUR5A0++KtXkQuDA7dWyb6SamZcvrxS6aL0DQjFH2mAiEA/0tmlakYRSzmoqU/8Tb3IoZ6VfUJywZzTtQSphiCY5c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFQVeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9qw//YXfA0pFJRnBHKXfP3KY/d9NeCHWmuI1saxJ7KltTmq9tjXxR\r\nzt4wvplPfhr3CQ3JexqjXh/uhOvU87P60l440jqR9wd+dUFQZCSyr60qf5gJ\r\nkka3tAttrxRljhkeoPR5Kc5w+lJtXsTEN3In4543TBsfS0AWz03fcX/sMSn+\r\nCH83LnkBOQflWvOWGK6XTHlbD6K7ea1mt4req3nAjpEzNsJruRmH57A3H4JF\r\njhY4+sxddFD4uPqGVI/PVdwrLROiNKAH3M6HwMhUbzGBQraVfikkDQYSxbD8\r\nbR99tOZBTIx+err1XV6m2clIojDY4H6OyzFcSN+vQ0RVr0mwqi9hXylamQ6w\r\n3PyQITB5h7c4FPKOeFWCXIceudSuuzHBJGFTGH6dX2bA0Z8iwCrh6Iu9P8q+\r\nT3mWad0Y43/rX7cthjczoIzfIN10bh4qNi0PcW06mXa64SVQZG1FuqXSLh9a\r\nTo4Is94gTdL2CuW0TwtWjdOLUjA1BLOGi0GiXPXTetXbNMUgc+4wMgNnBCAG\r\n2HccWYz2cxmbEiiyaAEpTfWK2rTPGH0FLG+b5EUMf9sRLHZhQZHeuWVNjtEE\r\nV0+xfU5GLCHmZMD566IHK3jBjKlLQ7w7azEqeUQG1d+EUtUnoVFT5ADvB7+X\r\nvKXpS0As9NfxjOrU3PWl8hWnAmGXDAj+2q0=\r\n=7S3W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"08b9a78dda4d68ebe785af9888739862ed237884","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-22T15:44:22.875Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^14.4.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.0_1645544798743_0.3660539746155185","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.1-renovate-balena-jellyfish-core-15-x-28134f149c64838f07ffdc0b886a9e42b0fa12fb":{"name":"@balena/jellyfish-client-sdk","version":"10.1.1-renovate-balena-jellyfish-core-15-x-28134f149c64838f07ffdc0b886a9e42b0fa12fb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.1-renovate-balena-jellyfish-core-15-x-28134f149c64838f07ffdc0b886a9e42b0fa12fb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e9a8b385cadb11077fc6499cef94eb546fdfafd1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.1-renovate-balena-jellyfish-core-15-x-28134f149c64838f07ffdc0b886a9e42b0fa12fb.tgz","fileCount":34,"integrity":"sha512-2tNqVOAc5tCid7bPGCs1MNkB1c0riEo9VsG4hV01oMVf4keKjJ/FRrXRPmTi1XwMM+pEtvpMg39ptLem0TBruQ==","signatures":[{"sig":"MEUCIQCAk2bz4VE6tA19BTqyYw5MKuvcunUrkdY2DZF1ArDw8gIgeo5zpXjZGzp+8uJYhhSBgddysGf0K+p2Kt3/fGDHRPg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":281642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFr3lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyHw//ZCeHS1tPkvrueDdnxT7/1CHDht0WSqtSy8alviA2JhOfbpsE\r\n5yVB1JL2G/33z3ad1jxEjYqoY7iPEwD3phszWXYiZIrMOiqctQfEcn+smJf/\r\nglijHVIrPy8Qj4BQyJpVcIq1dztk3HIkP7Lz1qBUEv7Mc9S4MFVH+LFPMILS\r\n3CwOjocn0jHgEiLN0AuyBYixNJjfZ6SPJIv4mzefXaRPMPoHTuJLcG3dYFAF\r\n28vtBNnwZEZei2ZBFwTW65zDGSMdMyiYWuHEpb+Vhzj4FWKkMd4iOlYV4X/Y\r\nzpuUm+CI1zhPoPh0YVwgRjV6c/fKHsNuPBNn5/NGrLa1SrrqKVPx3qMV1H79\r\noAtUPmIxTXoLvNh0lGO+r1cbiOLjvSK0S0qe/fJKslR2GwCuOeBXeRliPS/Y\r\nn8zWlFEuVBoF4/6om4mt6Pal3GN1wc6b6EMmFAGsZcXLtUf3YjTlwIvlD/FT\r\nTkCYChP3PmTDQJrMbzpQA4z0aXNYxtfcmn6VRhjKm9Oj1wdVsdRMwROuElA5\r\nqtEbRBnRun5pE16o2XGBlukfMCh5eS/eBtw0VX3wa3mfXZ+GwwufWfksJscs\r\niZZP4dXOnpLTmvLjjL9aFWKVMInFPjp7kX+7jYQ2wWx4jKjbU/iUalf0BF8o\r\nePH6Jvc5CzyekI0gXZr+MI6HiOQvrn94QQ0=\r\n=In9J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"28134f149c64838f07ffdc0b886a9e42b0fa12fb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-23T23:03:46.375Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^15.0.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.1-renovate-balena-jellyfish-core-15-x-28134f149c64838f07ffdc0b886a9e42b0fa12fb_1645657573719_0.28045118308294215","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.1-lucianbuzzo-pattern-ownership-060c97bffae16c553e237a8184433a8154d39971":{"name":"@balena/jellyfish-client-sdk","version":"10.1.1-lucianbuzzo-pattern-ownership-060c97bffae16c553e237a8184433a8154d39971","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.1-lucianbuzzo-pattern-ownership-060c97bffae16c553e237a8184433a8154d39971","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea2738ef1b297283a65ffdd4d52ecb2b44937cda","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.1-lucianbuzzo-pattern-ownership-060c97bffae16c553e237a8184433a8154d39971.tgz","fileCount":34,"integrity":"sha512-IGKyKhUqCounh2DNBK2aY+9G0nTFSfj3LSFBErbaQli0L5fV764G4JpvCHGZBTph9zkTVID6W2iQPmRRoR3CpQ==","signatures":[{"sig":"MEUCIQC+OWD3yv6oZ3xlcRNK8VxHKT57U6RzbCjGGdVCdUROcwIgBmsIzLvgrO/obi/QyL5nhOfMDf4JjdU8sHh/sCdt2Ps=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF2x/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2wxAAhUv/xxn6rWr99tpnedIic4znmTv1quNEYwwE+MAVqM6HEcJx\r\nE+cdHa9X7Lx0rJGSsCioXt94/GKIvRkf5gg2xkwwIGOWXpzkLODzuNd6fa5M\r\nLohqSMD4YkW1FROwumXVwTq1/6RSTlgiWEmHtU/jHXvUlshs33+bVZGEjdNQ\r\nih5/R7V8hdYf45F4KZC6lCNt2uzMuB0OLX7+j6jsEP2tqVNqpjcyHO22446r\r\n0txy734jhH3g3AQXdQupF0CkLri1PDVKD8qK7ulRgcxWRV5EzNp+ZyaesAQo\r\njv5NYmLK/HuCAs1hYhfpPEO98G6+Yh4ZPd+czIGtZYv/uW3ZniUIyGFvESr2\r\nZ/ieECdWaNldzjk/qnaJhGXu7sXIVufjwjkbQUvQ/u4mWV5Hi4Vw2iiAkhPe\r\nfBnJs4sz98Fk8nDtTF/3sf6JGRaTdzQvdKjxEcEP2QpN5w1MoCL8Tl1HDFc+\r\nfLat29eBIrRmdnqXETV6R+cKNg8S/adjuE16dUTk6vqZl86X4HvzCy689HQo\r\nVvsB5kvP7YG5IK7nZuz5O/oSsTIvkqYcABIsjpmsDMTZQrvZoKcl1vPn8NOB\r\nE+KzGtMzqkSet+dRxht59Hq+bDGeG5vBztVyGE/zoJR9n+/UnaMSeIBhbAge\r\nnXhKkq30q99qHkcOD4hWnVs+t3Q4ZorIxak=\r\n=E01/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"060c97bffae16c553e237a8184433a8154d39971","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-24T11:27:53.075Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^15.0.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.1-lucianbuzzo-pattern-ownership-060c97bffae16c553e237a8184433a8154d39971_1645702271378_0.6976964123219203","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.1":{"name":"@balena/jellyfish-client-sdk","version":"10.1.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e4e276ddc28f077dac631a859b45b3174c7dcfd9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.1.tgz","fileCount":34,"integrity":"sha512-Er7Uuc7ClhoIr5M/Napv1WFLh3j/GAGelYKzWeQBi8ovSV29kfuWzAi85XBPnJW/Zj1DdMrnVnSCwbpmyOrFRw==","signatures":[{"sig":"MEUCIQCipyASLdIxKhXAbYHj7VF/FgXGU8YtN3VWz54/RsdoCwIgNdb5ZAUSgI+VcwCERXBaRX66Ex6Tqn4tKEt9ZlNO6Gs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF215ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogBw/+O481qGxOESScGtx7LmOyU7zxoXvX4bIeMK+q/Y3Ndu7FKACo\r\ni+mI8tTZL+mdqy42Bdw0O+DUrWj0DNSir5HE+b7k6KxjCFaOlpLWA0NP2m73\r\nEXxAZ4rDBqIR6xPuwN/G0oWxOb/kw3MfPG79rtvHROBonkJurngqpv5tEWt7\r\ntTF0BnA8dDTtlBjS3Z+hXTPCK/euvldynNH46lZhjtcwI7tLfq6OaHXj+MAi\r\n71XD2VzKbLOdfvQFMWRlikdtI9kQxekkqnwGcbRDEr7dBgi+N4rF/AmAXp29\r\nwYNC9mcImUvL3kwVM1m+RILTBsLxoskn/x6GcZhAxZg8NMYHMOBYCe/YvIHx\r\n0ZnbS1YAsx/1Ox/sXiyaQnOsif2JPVbJyv5yGsiNqsH1lgwkB7px0nj0FpFW\r\nLQmZc1wvBynuz4ceRGAIldHVzbR4pKjrg8Yk9I8NZruhuTyssH9zv1m1Cyig\r\nflMbLtnloNaLAYOJ9k8Ayz9Q8UOHj1edyQnrWMRNw4/h70UjgPD6HjoBNhiw\r\nFuVOlznlOM5sD8aze7CY+3OsOhmuTVKx2iBGarPelvAnDMtogO0fUCFW2ZMy\r\nAGQy5aYJuKOQ3DF64V4fq7RtwuVgY6kIuW6gzlKWqJnipc2+NYrCHZc6J4B9\r\n9thwW9rJyu0i613xigi+SbdIFbGGgWbV3BY=\r\n=/IoU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fd727ccc7b8bb38a429befe9613268259f9bd876","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-24T11:32:58.712Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-core":"^15.0.0","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.1_1645702521459_0.3882869149684134","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.2-core-hard-dep-8a374d715c6a804dde612289b6032f3ea39c7177":{"name":"@balena/jellyfish-client-sdk","version":"10.1.2-core-hard-dep-8a374d715c6a804dde612289b6032f3ea39c7177","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.2-core-hard-dep-8a374d715c6a804dde612289b6032f3ea39c7177","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"537c23650180e14b5fab953c57a84d904304c03a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.2-core-hard-dep-8a374d715c6a804dde612289b6032f3ea39c7177.tgz","fileCount":34,"integrity":"sha512-LugTWu5LSPWP5sGFQ2DxRjCIuHj7ofgvt7DjhU/uSfqdH1Z4YD5uBupzYRBoxdNI88gmZZASA2Sw2wE+1uRP0A==","signatures":[{"sig":"MEQCICbN9F6WrTwWFHqNefzZkY1bojDj4+PmvaOfjJb8rJHxAiAkh5kLBUZbQF3NSv6Neufa8vD8cttf49RHq64ouZmb7w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF3TLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDyBAAgNbG4yfxvqB5Mq+rZkYVKVgxxm+1M1y8CgqQ3LTY9Gls6+Sg\r\niYDNHsnkwrT2QPspO33zoM2UwZnnSalfiZPn7eDZnTxT8GqLXF0+RZfNhhNC\r\n9yecPnjYNWnRuIm4R95KY9tT4A67D/6z8SRPF5ntSpOq3SYG6TTTkWPHUGvn\r\nF+yexVdDnAawK6mFIs3Q81zsRqT3a3lGI3TJ+CDR0FEPCtcFCy6sQM46OCiW\r\nd8D0zjEaXDmt+PKwNaEC4kUZWaXFMzJYR0pFy9ufOOOIwYvgXMTmAUSdMp9w\r\naGrEbVm63LJj8x1841njU/x/q52I92trLc/9ICldTKjlwSuLj7YzchfmHSHB\r\n1pCdtx3zfNWrjir10qR1BvUtWv43U+aCJXm0q1UxlsvbnQm5TGjV3MNX1B0J\r\n66KYVtEzBDDM6JwrSR/R0hh1hHLVRyHUAWR/CMDkGaFBDUqMKHB7l+MDZO1p\r\nbHSAVwNsH7BbvPiNOUnoOqpWv5beQOvVmhq+MHMq6ebGHPMzkPM9GSH4Aism\r\n/pjU8Wg5jxwBf2TMu7bC6e4W87sW2Imamc2ZIqI2AcHIZD1FeLwkiGeZyx4R\r\nDrc4kswqolQx3BY0o89GYXKp9/x2TAK2l7/BZR++ECwecAXD4WlVrMyMVEAf\r\nWt+eK/Fc8vuA5uhcG/ar8pXW0PuV+xGsoMk=\r\n=Tn0u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8a374d715c6a804dde612289b6032f3ea39c7177","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-24T12:03:08.194Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^15.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.2-core-hard-dep-8a374d715c6a804dde612289b6032f3ea39c7177_1645704395509_0.025428606232266837","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.2":{"name":"@balena/jellyfish-client-sdk","version":"10.1.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b621e989b72d5d9250e052b809f25408bf129511","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.2.tgz","fileCount":34,"integrity":"sha512-Te9XTY58XMaFLmgVQuPK05rPgrBJQ8k0g87PF0usb9zTWFlCCkzpGuf/swoUdg2SgoWzeUak+TKAv6AxLvQhcw==","signatures":[{"sig":"MEUCIC5s44D0uBNY/Dq5ybsk2S0y1OWrG8ElXJdhKwZsamr7AiEAzOe8HWPVsbCEMHwSlGt/0bxaeueoj4YRCYu3NQluNZs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF3WnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpUww/8DD3cnwHioS5y+L4i5v/iNkuUti3J5XHLubCDlQRM1O32Og/a\r\no67BCrAAVqrvi/BsBEfhc4X2lnM7AQkolCwXoZqegpquZ2egweidJN5Br/OW\r\nvFvzchzNiKU8fBymcwhZ9+S/Gkbb6c2nV8O5z4nrh+qRqdtS9vZOHMnqC1gv\r\n28d8TyLlx/+JGLBqaM5fB7h/D6diemZR5fJxTaN7Bo3Bm2Q16t9Q7XbZgs2c\r\n0h9VhfRfeyXRTrk9WPqarOlstW+DXAAsZfxCw0P5gRcZNVihLnFxxpJsvymN\r\nJG7MlzzE9K0GrviGgQMU6u60BVrP7HJcgry3YjleR0jwZ5VYx6S4mYSDnVgm\r\nd/qbBXE/FuDjBlGFwlVe74sXix6TQ0YB9fdlORFsM2QczeaGt7x/s5hLj5/C\r\no/dKBH1rTSchrqCrqmwhErQS0fmi9TqI4Td/fueCKMdc9aSvDcBLaIdna6JQ\r\nHSf/XZfwgb0qVH4UFImR6rOp78kGKKNr2jjQEvkGb3T4jFZxUi84ptL7JlbW\r\ntV3rswUKow2F+uK9mImr+REG22/8nUUxBwd5sUp6LtL07wumBEAplbvo1Kdw\r\nYHrpA8Ghkhy9ir9rbU3F3CGkAVsFDYaMvxKcjoZjGgl+MXYir+x7hZxMX85K\r\nX27KD9KydIzHAkC9BIqBBpdVJJOx114RiAo=\r\n=wTHs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0bc5097719e664e4d0aba662e86d524504a517af","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-24T12:08:13.856Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^15.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.2_1645704614833_0.24606532038603124","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.3-renovate-internal-patch-1cd770d4ff7ed90296f103ac1ceed7918bbfc527":{"name":"@balena/jellyfish-client-sdk","version":"10.1.3-renovate-internal-patch-1cd770d4ff7ed90296f103ac1ceed7918bbfc527","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.3-renovate-internal-patch-1cd770d4ff7ed90296f103ac1ceed7918bbfc527","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"685f31f549f6a62104e67956032672f211be2178","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.3-renovate-internal-patch-1cd770d4ff7ed90296f103ac1ceed7918bbfc527.tgz","fileCount":34,"integrity":"sha512-nNuRT4FLSxVUKSwCgrfs3Zhu+Lf7poMnaSZgi8MTROxL/XsCQTJ/XFN4ww/CbHkoFuy8LCaP5PhWmS8UL0+qkQ==","signatures":[{"sig":"MEUCIAl7jjUeJjq3NJqp2aJLc+Ezwf+uls+7nc89Ecy3HF+IAiEA+/5bgylTLcMF3jg9cPQzFCQCVRxXRZQrE4Lj2NifTF8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGFzLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAkA//YHbE1AFhpTuefCugmbPXEz+Jpmnz8AKztuZHugVdmufAQU44\r\n6695n6hgwYkujVcfVfhYdKLKqb2FgDX5VHGV/2WQnjWcTTRKgCsussLYpMv7\r\nNVFay2YAg3bSacJW2EHtyc7RWkIaX8bUfLI8FAy0aKCBhtW25KhzG1/ZuMn9\r\nPYXiqY3MilTxzZ9ptxa9HsDmYcxVAkyB3bAWDt8MyOfab5KxbtPh5eoJDeqo\r\n2BpAr2afSTbgSQMmyDM5XH55WgDvhRAfEHX52axjGfZmWb2eIYUaXuwCFdTg\r\nQoy2GYu++nV9t2w3/oIRaGqtd3Owrj+b576e+dAYx3mrnZt5YVr53Lch8wsW\r\nG7l7ScGfv7+E5VmBcKL6zuAKY2VsYV2yJNEUPwK4UtZuvQMBJlOCxe7tIOI3\r\nqikMeqpZbUu382jtK/Dci75q+ZSlgLrAIEBN08l+JTnJCL4vJD9VCFaFdvQT\r\nlPyMVo+u2zcuKgmdpuMle6wvXN98b9ymm7t7nxK6W+ZC5bZ+plAoXRvq5pGF\r\nK9WVpYltaGCJhKgUr9GM4kS9bjsjXdngYOODIWsOSuPsozcIbtFhijTBijyF\r\nP9c8KCtLqm6G6AErG3qPJwSUVwlpGgs3B5K2Z7PTWMeUZoTfZW/XNFIx28d2\r\nwWi4eqgaOfNJWkArIcyHS69Hx62nvP+mcCw=\r\n=4OBE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1cd770d4ff7ed90296f103ac1ceed7918bbfc527","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-25T04:33:30.453Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^15.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.3-renovate-internal-patch-1cd770d4ff7ed90296f103ac1ceed7918bbfc527_1645763787246_0.27245082876981663","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.3":{"name":"@balena/jellyfish-client-sdk","version":"10.1.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"00bf73fe6d909916100708893e914d3fb52c6f03","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.3.tgz","fileCount":34,"integrity":"sha512-7Ullagt6WZrpJEbEtPVB4tsN6JysW1O+A5amlF4ayrb06m4iwRQnkKXQRW6RPI8kP56UhIyB26u/J8bYgbHtLg==","signatures":[{"sig":"MEUCIFv4xbkphdoPMgK2vlfJPbbWbpks/xhaR0GGA05Y2NhcAiEA1Uv7LJbLRSskyR3tR1gRiakjw6R72CcKbJ0dUV+DHAQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGF2AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkpBAAkMSBNZUnAFtNvMumcHmxBwq7mU3YpwFzQKOy5/LcemM6orjx\r\nYvzAiGJBjj6SCSXgynOu1CpsUGU9qfc231OZSRnarMVPHmST4OsDjok/LF/t\r\nB6uSXBqXoFwFjRwz+OduqD8K9CMn83RJx1g2bgifxXZ8P4z6Xsz0xSoBJXrq\r\nra94lo6uphQUz/RiLXPi2E3knyT5RBaqPJCmZlAFUu05ryc+0IEPr3q74Ihu\r\nx8OQD3AEV3O7GE6zvkt87pyhNH2RdWj8drtL5qpG0eiqs+kDiYrmRWOSSVk9\r\nJ8VvjCxCesxIJ1W6bVSVkWmXF6k1xz0zrrCnUkd/HM02kMZCt4nKFwjvXtEY\r\na5o/fuhN69m8hojbSer2j4ha9VTsFINi+tta3niKcfeGx/STZAoT3w/8Fmm/\r\n8/3nAVgof2VyHxV30FVSKDmVcDWvbswHaexVE7c71oyMS3XeT82OAFOZLUpz\r\nCExtVsghb1vBfevjKHdMxcVv6ZYBBhIj98/UP7B2Nw6SGCRuwp0c7zwUoEc+\r\nqhG2HAeOGukojXsZCmsCQHVSromPPufU6cqmOCTuqGP7JHEtybu11h4H6hH0\r\nySNDPPMhk/Bdvmbssjw7TSWW80aCyD5lltI2cSADiQro2b6EEXLyzBxfIGfb\r\nbCNVzH3NEJiGreX186tD/sP8NJz9Kci34u4=\r\n=waDE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8c45edfcf55624994631e2f1fa0675f768c8fdf1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-25T04:37:31.830Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^15.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.0","@types/uuid":"^8.3.4","lint-staged":"^12.3.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.178","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.3_1645763967899_0.6042231696061162","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.4-renovate-external-non-major-dcc791dc0ecab0459c6fb87c5a94264c1b007f4b":{"name":"@balena/jellyfish-client-sdk","version":"10.1.4-renovate-external-non-major-dcc791dc0ecab0459c6fb87c5a94264c1b007f4b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.4-renovate-external-non-major-dcc791dc0ecab0459c6fb87c5a94264c1b007f4b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c479a89741ce9226d6e997033bfd1a6b49cd9bcc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.4-renovate-external-non-major-dcc791dc0ecab0459c6fb87c5a94264c1b007f4b.tgz","fileCount":34,"integrity":"sha512-Qns0ilktKMooLHt6+CS+3J/rRZTzUEfiikHhCTPfkyeLb9VhBMyd9IuRF1a7PDK9PLSzN31txuww+IB3XLU8MA==","signatures":[{"sig":"MEYCIQDdjU2DakIdI7kt5mtIUpWbw4EcCLuCzgwehw/C5i5wswIhAOQ/8e/0YqjjEIF+7ykzbCqwqinl223/VGCrkB+8H15B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGYtqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmraOw/+IuQo99DnP2ab4LD8X2uuvSaxXlwwrGc2HLqnewG7iNZamDGU\r\nYWZax+IlaHMbLjOvr715LDXTjO+GqCxYTzp7X5V9Q3+R92hUhG+z6Sof0xZ6\r\nF6pw62DEaRhl1BsfpHHu2AQHG2H9zbQy3g6zeLEMXvYpUxFjomYF13uok1xL\r\ny0O5BDYTx8gc3l03cJ9bTehTHjrFhWP5T+d7XtCBShaFr2kJ+5XcIWgy9Nn7\r\nc7fJawaSQp0WLYDbOo43kpUt7wDgxfvFs6BaaEumW83PWhOLw6JEBxHx6oWS\r\npk7H8vtd4bko/ZihzsKu2buoIInR+51zd/I+FBlM75z8PtABVbvP+pz588Np\r\ncurpY8z1Tm1skR92P9aVhyoeCJYGnTYGolrsW3PnCY3aEHKRcg1uSLpPtsDB\r\njiubk1zUv4BpQuzGo14P3msBIXtm8IHcpVF6Qx5Gmn/CF5X8g3t2pN9uvW0f\r\nbi7fpFmvCCUtRTaqLLl9iRqV6iXvpXN7YwhiwUObNfq0ubV2jkcaLVyu7EBp\r\nBriHCKw7075NkLkkM3BkZRgpUJtwL7XTe2y0YkeIhx+h1At0H+KNoibBLZyc\r\ns039UApHE1IKnB0N/iHRDjNhWNNjiT+TKBzCjCJm9aDKkwr1AI87SxzUG0pD\r\n0INZpbBRm/KmR+q+UBAdt7yrgz45bHl6h9Q=\r\n=T+Oe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dcc791dc0ecab0459c6fb87c5a94264c1b007f4b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-26T02:05:11.504Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^15.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.4-renovate-external-non-major-dcc791dc0ecab0459c6fb87c5a94264c1b007f4b_1645841258452_0.23790701516062152","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.4":{"name":"@balena/jellyfish-client-sdk","version":"10.1.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0879c52011add54a355b94ac9824b16b6c6569e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.4.tgz","fileCount":34,"integrity":"sha512-i2ZaAfQlFUPW0wwgo/p+cKjEfSmgiUJ21g419lHSXhq1+iqSg48XIRPnuaMiGjav9MUZp7P5Q5PtbpvzkLNO0w==","signatures":[{"sig":"MEYCIQDzfAlykPZBY7Tiy3DvfXQsEjhTt7rawRzAWqslfaeFBQIhANvp/ubzBaw/Ihs80Yuq7HlSyXTrlsBptEdvLBmtiqvP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGYxXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwDw/9E9JPZHe8px+AwAG3Z3b8UVbHV0btmDO5eFwUhH3BjoljFy/8\r\nkUdqogJhh6uamGkxcrRxn+WtJRBustLPosq0XS4CIHVg7JRTgEXbdTamklpN\r\n6bjRAYzA+kUxEmvprP2hkN5gOebAj60HNEKgNtWT7upe1x6niS0dio/0I39M\r\n2thx6ap5utbX0rAFzR+BlvouA3jT8s1SJIYwTW8BLRCxDf2Jn3pGPMiOABhe\r\naPyfROgVNoH8MIkp/DbnkCQBoPY/gfRfuv/19e74obGKuKuj8UTsqHFjVtBd\r\nh8Q9jOpNfx0J/1hi5hgPwWPlfEY0v60ucDur7cpiD5eZp1u450xqRVhIJEdG\r\nojiWoU2/T3OHvMuQ7fipOQLXJXaARpNIPrivDiES9lkPbTYacXLjmFFHrMAo\r\n3rYONy/ZsFHlykzIROpC1vjCpNALfLV57SNgmp5shLqiKIFqAealqyFFNgdp\r\nu6aZTJ+8+HnZFX/8cPfsgtCjqAtajbdhKk5x5hrJ4MYR9BvmD7ogwTXHwd+U\r\n+BihLr9LgUhYFP7iddHGoHHkYfsMyg2B0SdtBHXvYpsOxNIq3lms1Kr7+9v5\r\nS9Cat8dLW9q3jxDteYMbdoynCSpI8aoitxXGdjYmLonGT25F1mSO5w+MHAJF\r\nm/sNcUrfwAlvL/kEY7zNU+/yyMlWotHV2jc=\r\n=Wc7z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ccb31cbe895f792e449cf9f90b643035c5a47a7d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-26T02:09:09.064Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^15.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.4_1645841495241_0.7793802154149425","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.5-renovate-balena-jellyfish-core-15-x-ed0ec3d66bc61a8e7497848dedd64ed3d42c4f84":{"name":"@balena/jellyfish-client-sdk","version":"10.1.5-renovate-balena-jellyfish-core-15-x-ed0ec3d66bc61a8e7497848dedd64ed3d42c4f84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.5-renovate-balena-jellyfish-core-15-x-ed0ec3d66bc61a8e7497848dedd64ed3d42c4f84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6077a94eebf983a454f39b8bea8aad0ada83e6f9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.5-renovate-balena-jellyfish-core-15-x-ed0ec3d66bc61a8e7497848dedd64ed3d42c4f84.tgz","fileCount":34,"integrity":"sha512-h0cJGs7tZkct5q3Dq6VjKL+7txaXhzvgLZLOMn8aZje9qqnJjD6XIq6PyvGYmnSWys92Smwy3DqcCmqAb1Oamg==","signatures":[{"sig":"MEYCIQCX+M2fMof2N17E6yvK0KK8WweO2BhB5ML4+z/yV1GrCAIhAK8W68o3180jKA+T+90iVsq56wb5AKxUa2du5mLZxJBJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHeUVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrt/Q//e2Re0Pgag5UxTJnhn70W8YjXO4jtOh9X0an130hpa0ctAcsk\r\nuZ0FWLmUnfANCVCzO1Jp86Y85toy6ISfQY7Otj7WdkmyBxhKdoLPbtfl4GGu\r\nrOTBB+Z4ckxZwjy0FRNm0ueNKNjgjP5wxgIkncAupAQvGndXcfAJC9b2UF/+\r\nwGYbX9n3tPJsY3W9IWNgqjB3bYlJSFNPFiQAt0TkaOKHY7/1vuJ5/D6BpP1a\r\nwO3SoRvIqdLYCGXAqwu2BmW3IZFFW2yAouVw7BO4dgZXKmdM13AyN01iK9bf\r\nID8U3J3xsI1OuSlsizmjo6YlB6tp7Ykmk77/B/gJvobV0rzQT+oH2c5j6M2v\r\nnhg3rc7s+F2sgxBFZ0K+WnUKcJptGP5zIOWzwxUYtgLFw8+MIEEWrigKPf3Y\r\ndE09hr5XXG4CAT25CZqnqRczifuEM7PCUgqvcPGAPyrLj7W/NF+DsTHmIiHm\r\nF+CwOT89VDl8F5r3QJPRbvsr1HgkAn8P8H2GdbMAYkn6S46sE6uOYzIn6TRT\r\n1D1P7jmrVSEiHTqE+Tdozxr5++4jNSlCJmzG8wlJz130l0g4SqX9jszqhvUR\r\nO51p49TNWmvfHNDzwVuJQg6WF9dABwVvj2axgyQno7Vr1k0hcTP+jPG4vw3h\r\nzPcQQFbJVYPE1uoidKNQQdDhd0q0/P1DpMw=\r\n=8kam\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ed0ec3d66bc61a8e7497848dedd64ed3d42c4f84","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-01T09:16:04.763Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^15.1.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.5-renovate-balena-jellyfish-core-15-x-ed0ec3d66bc61a8e7497848dedd64ed3d42c4f84_1646126357470_0.18832508544996873","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.5-renovate-balena-jellyfish-core-16-x-1958ed34b4faf7f76282cb89744e54e6a80e4369":{"name":"@balena/jellyfish-client-sdk","version":"10.1.5-renovate-balena-jellyfish-core-16-x-1958ed34b4faf7f76282cb89744e54e6a80e4369","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.5-renovate-balena-jellyfish-core-16-x-1958ed34b4faf7f76282cb89744e54e6a80e4369","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"098a069430b08ef811873c2aea4a01cacd433881","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.5-renovate-balena-jellyfish-core-16-x-1958ed34b4faf7f76282cb89744e54e6a80e4369.tgz","fileCount":34,"integrity":"sha512-8CVl9pSsy6xYuvsdtzDaQQsUyhaeVGz4F6FkRzfN6uqYmGutBEluRVHg86z+yYLfPasnci3WaEb1wgnVlk9OzA==","signatures":[{"sig":"MEYCIQD2NwFQg4Xi4KUoiWeJa//MmUzF0+gmcAU8lUO48W1jFAIhAOp76rrOTxxssDGY7qSlbFmBTBeTQ9w9Bmm9tRIC4QW8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHj8QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqenQ//fymaa+Dl+/b+5p4OnSXQ4JJ7StFDeaY7n40xsMnkPWdaaxUC\r\nwziUUdlC8EhStMSOP8uJFlNfuqW66jh+oKVp+aEhQ9LcOjoj71DFNkP08EzS\r\nDi8S2sN9EBmT9yy8E0T+k2/1AyjYR3pvhQjzyPxZo9m00AL14alr0iCTpC03\r\nqHFk/3FdMTqXrpZ+DexazaSIqIL9l5RKTfclYyNenGU4h2xZTSJg1eFb0LtT\r\nfGttL8TV7OGrff5SzmSuOh0qik7mIXKVJj/VQ+BV0FNO6hwn+5VQzn9vnWhJ\r\ntxwdpEo1kqnC/xo/OPwGXsTZ5bOqepfN+uU8/BzufswrEo/8eQmhRAb9b4o5\r\nW0+1cPJDKQVkcBC2YNEExF7+mWm4zAJ5iUBOOHRoaVq3fyxbHOZgQUxMxLp9\r\nX0P8Gq7Fy2B6AfCflqvTEhm/pQo9wWN2pxYk0iz1vBuwBxcHuE2EoDnxlBVK\r\n7QVHotMpCSx6VjM00CytF56Sa2Cd+azoK8r7sdrOAFa6c56QoWSZu9SwwY90\r\naAFcHdIyWHEtjaEPH7iOmeFUW5axKmyIVlhdgi2gxvAW5TGarOqjufsSpjQZ\r\nJYDL0lwZgS5DugIzSk6A1XNIk2GQ9idlW+m5lC+EAuf7az9p9u4QACK4ld0H\r\n75b0b9mRyY6LgPZqcGw7b8zAD5m3Kg6uKSc=\r\n=fNyX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1958ed34b4faf7f76282cb89744e54e6a80e4369","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-01T15:40:14.310Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.5-renovate-balena-jellyfish-core-16-x-1958ed34b4faf7f76282cb89744e54e6a80e4369_1646149392732_0.17035002306843006","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.5":{"name":"@balena/jellyfish-client-sdk","version":"10.1.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"184c45ac7f6e4ab96a198cd7d6880a04c8d91f8e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.5.tgz","fileCount":34,"integrity":"sha512-W/R3lfdnCozoUYIbk7bXtBNOn2ATfLjEGroCU52UBqg5yaiWX/Y8eedXbcbm8XbsMCPqD4K7mHwHC1R2QjEazg==","signatures":[{"sig":"MEQCIGTlXKj/dDzC2AzPwsHKcWrqidZn1Y7AswG2JSN/Y8UWAiAfr0Z+k+hw9oq+ogbhWPeGzBRycqvQV2J4H3CvFKit6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHq7MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriqQ//d1VZUVlXvcGTbsCQ352UiZF3Seic7AMTcENclIh0SDiAptLE\r\nEpW60uMm8nkVWc9180y8aodGP+OAOl/51iZ41sqN2EeJloBjfW8wJ4Hmdzr8\r\nxUmqdYz4qMDwrTxadOimCfSR4K/hZYFC9QUi5IgJpNE9WeRtxsTqP2oNagMI\r\naeDyq7epSKtf3tPIGtvY1PT0ysalRBV3YMLI1OWw4vpD/2tg65ewNz9BU5wQ\r\nocc3qtJbLtXdrKGS4JLHRq5yPAmq6/OWIMUgZULnKPfrAoRpD5qeTYmHq92T\r\niQShs0HnefwDommU/FF+pXy2Vm6wiO9rQDweEKOQJE5U/Z8IqieIxyIGLMx1\r\nCFvPP+h3MRRASPb7CBHmqHcY4HNuZ7wLTtdi2Sbe5FcfKhW6sBufy3/O3wqt\r\nVBGyhU3kOxpWjxfJ7uv0k9Y1+lPoLN1fShlP7vVSOCWwzw8SNWVJxEkWuNRJ\r\n0IM37IZ8hpbcOU4APTf9Yp6aFUhT6K+X9czCVdquIyud/AZOe0A5gu5ZqGP7\r\nPI3+SsclwyBpOyTs+/dYWKIG7lMznWb3sWOAaFYXLxTFUsrtcWAcBqn8N+Ag\r\ndcAe6Yq65CmbmxJOrDvTpCpPNjpKfsyBGHqAWcu2RxctPXQhAlEHtChOVMtT\r\noYs37gaw51gin4DMKBhnLWxmY3ZUDXbf4IY=\r\n=FV1K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"75b4d8c86cf7418cbe1239cdf39a8676f34908c6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-01T23:37:39.654Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.5_1646177996104_0.5267132731697082","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.6-renovate-external-non-major-aff36324ddb0005418e774f0ed1020ef9a7bc37b":{"name":"@balena/jellyfish-client-sdk","version":"10.1.6-renovate-external-non-major-aff36324ddb0005418e774f0ed1020ef9a7bc37b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.6-renovate-external-non-major-aff36324ddb0005418e774f0ed1020ef9a7bc37b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df5d456c911def595371efe64401f47305688f27","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.6-renovate-external-non-major-aff36324ddb0005418e774f0ed1020ef9a7bc37b.tgz","fileCount":34,"integrity":"sha512-8YOik7CsipzDOB6EzSQm+1Ya0rfMKQG2LIXAK6ROfVPZl5qXsP+Ijm8Tlx2z93WqCzrh4lQfDeJT7V92UvI4kA==","signatures":[{"sig":"MEUCIQDrZkZdtoPs8k8kSZROHheCbhCjgl1ndaZkNa61/FD9AAIgOtxL24PXk0TfwQ6oN8NzsOlE2EgQsW5RvldQM+jIfOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiI1kUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrW3Q//cir+G7ineEg8eN8Bv/5tIUWW+1MDWSqfYU9e3QkDCP0PxLAt\r\nlRVq98dSSk/893Si5i21/P7waiA8S4rmJkf02pq8oGuDxcsuyZ8p9arMfUsT\r\nw9YUS52Ofi52+TPaIUv6nl21SvHwK2hsg8UBIZ97zlO5qP77l10RTY9UQXM0\r\nYpwOHjbyxn70lIlqk1KRqsf5x9l375cXHrEz6ah25dwH0PovjAQeZW74UF07\r\n94y4zBlVecAsuF+NLL5ASw0uKrbRSD1UQw4XPP0VI2UV/n9DcHb/2NNdgJZn\r\n2FKEZgk+Y1qKTwdfjKbGJ2xVw3+IzYkIP5XBipva9UUXdduKG8GgK+jMCNHx\r\npUhwfroA7LBgO521IHs2L2YBbGTJpHHuuAjeJo03c8qsepiSnivRtRN8Rjdz\r\nC3Z2SJ50ZuD6B6u5TXR0uAJmTXDFOUqQSYigSvAMqbDnYD6ckZfAUrdMrTEk\r\nXS8KaTY3Px74SU9/8G1V6l6H1PBDZ8bNNUrptD9D7SViUjUuwA/PuwdPJ1Kc\r\nazuNsW3CXRRQ5GZb38QFouWQSYz9paeiYUUK7oxiLjPjRAl9jbfU9iEWaqMU\r\nRKgvxrNuesuiwpATOsxkRRuIIO0p7m6tb/+/xkZBfoPQe2eQyZLbHmDUO2b2\r\nXjE2655pMSkmJhh1e99yuw8RuAn3lVrRcmc=\r\n=rP+r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aff36324ddb0005418e774f0ed1020ef9a7bc37b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-05T12:32:30.121Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.6-renovate-external-non-major-aff36324ddb0005418e774f0ed1020ef9a7bc37b_1646483732120_0.7814841620811512","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.6-renovate-typescript-4-x-01930bed58c7b7fe3e275b29eed9d83c6b89ed07":{"name":"@balena/jellyfish-client-sdk","version":"10.1.6-renovate-typescript-4-x-01930bed58c7b7fe3e275b29eed9d83c6b89ed07","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.6-renovate-typescript-4-x-01930bed58c7b7fe3e275b29eed9d83c6b89ed07","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6bf0e1df1d761edb07481d46ede82ad9f06b3ea6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.6-renovate-typescript-4-x-01930bed58c7b7fe3e275b29eed9d83c6b89ed07.tgz","fileCount":34,"integrity":"sha512-B3A1ygziI07+DSFkDT6MjcWrQEJXvhDpOOquUIVH66/Hf1MdjchH3im+cJyBVHhbTz+U0qoUcs8dc8woiS+XrA==","signatures":[{"sig":"MEUCICvRAXtQcrk2Px7/w1wJIVjU3oa/arYTOSmfoGCX9eZsAiEA0Bh0cWPudfKIuw0S3otCASPp7IcGJa95pHiBQbBAvFE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJArmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp18Q//QWlmmPuqSfLmANWelJ8pYCLryDf0X44vbw6XqJpIeIVAEfsd\r\nDLoHIMCP4mobzVNlJ39EzUUHy9zwebquWsz0fdQJ8134anM8mzqd6UX9i+kh\r\nnLRIuTALILqCTSzT64cKxiYKFgPsToNzs4V6zQwcN2EVhiKmcdPOGUlqm5tE\r\nrx3TV13VTgVCskNT0K31ogNxObxguP1T67byvePNS5TRWdAiPn20M63724Iy\r\nP+jJzN+YZRNIAJivqVa+hVBkRtONhfYwBY6ETLGHS1ywwLyeWiFKvkek5uop\r\n3oF82zb5/5wPx+gyftVU7bCk6ZGTI9/Dk37j9Hzy5nqTGMyU4jRG/8KdNnEb\r\n50BJGgaAFzxA9sb9CYK84PQW1dMk8ogOfzJGgouTaQPZ1Taqh4lJ/i1qNj6P\r\nBKd/caJQI8pDRO0/NxTbbeKe7dRJq1xDqpRFp9siYghrJxacw4lYf7goq5mc\r\nBFHF8Avlv4U8PFxB8d2Ub5dUe5NDgAGjeWlBR3YApW8/wnsnnqeXTjUWVs+f\r\nqy7D4XNjl7/kA7kb0mmbIwKY5d9z1Gp1XMjj7+tXpDbQdnvRK/PHs3mjOLt0\r\nAjXfxoMye/LVyFZ/veTCWdtPZ6WFlfENrIB0j81dN4mLAS0ilxx3t/tkdhwW\r\nT+enmiOCineY13M/sMU537dsJm5qx5IuQH8=\r\n=hxtA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"01930bed58c7b7fe3e275b29eed9d83c6b89ed07","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-06T01:11:55.387Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.4","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.6-renovate-typescript-4-x-01930bed58c7b7fe3e275b29eed9d83c6b89ed07_1646529254395_0.49108435005299444","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.6-joshbwlng-bump-lint-staged-da1cb4a416e8be73d568e2ba0ae990ea53288318":{"name":"@balena/jellyfish-client-sdk","version":"10.1.6-joshbwlng-bump-lint-staged-da1cb4a416e8be73d568e2ba0ae990ea53288318","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.6-joshbwlng-bump-lint-staged-da1cb4a416e8be73d568e2ba0ae990ea53288318","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4340e1eeda3eed323577b423b386fb6d3f72ddb0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.6-joshbwlng-bump-lint-staged-da1cb4a416e8be73d568e2ba0ae990ea53288318.tgz","fileCount":34,"integrity":"sha512-Y31beU8WH2yC1BFCxznkDnpKxUeI3lX6aYW+l+cwMf1mWIfI/whGloRaXoBG1mvSLTnCjQ4nNy3o+WFnbZ748w==","signatures":[{"sig":"MEUCIQCPb4Cwn/0VzoK5tHKyySJfh20cLc3Wdx5nUbcbGcKM/gIgUKy8EUsIBFBPaIkSPNCOCCaQt/GK/o261id57XrBWvw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJCJ8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnYQ/+MhWFwhaio9X+BOLOxwmO2vpa9zkTGRgxILJXBDb8qFfLPS0o\r\nS/TWF0NsXat/ojk0Trxgaw1w96kCbGWXkF/n/lK6X+TFiXXbS3UHqxKiOce9\r\nxGcyyPm1SqdG1yEajOD9SlENN+uqv6SoR2+9LddlIiSHj6BjrfG0GX34+TK1\r\nF/Do5QXfUH2K9l0axw7tCbFdQpHfPvluAkO7LhD9xr12iU+Rhl8K4HcFIz9g\r\naISday4jH+mc6YQKiGuoBZuKhgBBx84ONzRvLFPXfl8rLyETuVKmHkB60UC9\r\nCPPA6qhRj9fUUfS09u39hc8FhLuZArWFoWLZLvM1x6aTgMsARIG0yKffJGdx\r\nmaM34OT+b47MKjtFvdyaEdxrb7yjuy8YZaqWDrhQqcrzKU4ofvcFstGvoUou\r\naPWUgTf6rtJ1GyTSdiz2Dydikc36qTvVX4aTpVdrAbpEIw7DHkng6QxjvIFw\r\nVJArUvEyoUVK6BGHx9egqOJZZDd1omjejtOXxqdLOgk7iHiQFaGg+QdZ9UsK\r\nNb7lpeUX0btFQK3lTaEnoYLh4aP2CBZEr4um74kvLaakkaJBcnyPX8f4Y3Kx\r\nzDJD9ndeIKdQnA9x2VG5RtiVFYpGd4OA+8rF52xlsZdCHpxX3dQaqZLLqcL9\r\nYvlbeWVQxru5PbNrjSFjFTcZdfebZWmWXH0=\r\n=MVfS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"da1cb4a416e8be73d568e2ba0ae990ea53288318","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-06T02:50:27.647Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.6-joshbwlng-bump-lint-staged-da1cb4a416e8be73d568e2ba0ae990ea53288318_1646535291898_0.977220735993618","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.6":{"name":"@balena/jellyfish-client-sdk","version":"10.1.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e8ca31e4a00651b077d5b601c54b6f9bef40f510","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.6.tgz","fileCount":34,"integrity":"sha512-o2Rge4Xr6oQt+0VdOfvxqN96u/p8sDFD0qrh8ed5UEJFTg0EZsME9cIV2vGDGDwznR/YVigyv7VGAO41+LUllg==","signatures":[{"sig":"MEYCIQDvQSd5zPs+t2OkqvAOQqFXaDFibTf4DXc/rpomvNwBeAIhAOb6E0h9XzT5YmnbcuvYjnzDjrsPWx53tBPyw2qwGveF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":282884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJCOWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr++Q//ZwCpESn1xUdsnW3J+B6JEL9FcPMZoHlI+Igq3FH570cXSXyH\r\n9hasIXtvUVtLQ0z1dNk+Q0BYAsF0VGy8eMIGkVnE3U7Q53tcFKoinJIcmn7x\r\np8jqorKcXBabzgcNRTUWUGAkfb6mqzCWa1JM6RHgu2A6MJQhWv1SSRgZ02kz\r\n7c1qQfGWoXY2mhscCt3Lem2DK4gsGvsTqEtoNIh/JkRagZcN9rL26VnKedfa\r\nDJb5bEsc9qvv9OaWtW3dWelyi6althNNfM0R45iJU5Mhlx7sIdG9rmTUMulW\r\nj0IglVfyBXJym7fnV+OEKgYMMMdetSyW+Pgq8ETNw7p8JHzoyehrs0lhK3+d\r\nQiMKS/774U1SK8s4jE6kCsfKBkXNsytRJuyThDgKeeEJuHtB2QOku2MRV8hF\r\n51F7pQe8FTTixen1SAoN+MSom7yBhr5k59R/pWpvo/LfWjLmuDOt/CleCWdd\r\nTDwvKN0DIwZpZBEfERNkzDC9CQ/UUI8RzpqFgsLn79CJsEgzBsxY+LNsWVgP\r\nUFMnHl/a6RGI10QhUzPg5o6GddBYBVV7gaQudM/e9NqRzQqRifkNmV7GRNIJ\r\ntkZJKULpW4La8lkxKR4CqCwkYHyeBAyIUOfOylLlamIa/5cnazh5fgffUORe\r\n05Tun4l250mrNaA73e7zd/rXOWOXg1UnIiE=\r\n=EuVZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b9f167c4aa3113f7d6e39d1d3658ad16ef63540d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-06T02:57:05.495Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.5.5","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.6_1646535574723_0.19843335476893498","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.6-renovate-typescript-4-x-8d2370a00f001485f36f21d0bc1eef460bd8c943":{"name":"@balena/jellyfish-client-sdk","version":"10.1.6-renovate-typescript-4-x-8d2370a00f001485f36f21d0bc1eef460bd8c943","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.6-renovate-typescript-4-x-8d2370a00f001485f36f21d0bc1eef460bd8c943","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0d2e577918fde6448af6707efb873ac2ddabd862","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.6-renovate-typescript-4-x-8d2370a00f001485f36f21d0bc1eef460bd8c943.tgz","fileCount":34,"integrity":"sha512-9BWySmNmTXHQFoOHR8y6AmTmMcsxpCAcWfgxI1TWs+mwCtin9QERLPHoRtahn7+rSCopmRCuHu03ao0u9JoIFA==","signatures":[{"sig":"MEUCIDcrPgU8SVn3VU6QVarX3wnA7JC81nMcKYGHospivqGEAiEA6ktJYPOfSrEjdkyCFTlSnjCngB7VGR11yu3hE7CCXJg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283004,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJCQ3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroKhAAjKUJqcvsDrBv9PPusETUlUG4PDebafETZHPWY7bepIqgd5bw\r\nDV+5Ovbj79oenoeINyfkpBCTZnyrzh6QDgJ4oz+uNo9vx6tQG59LsmH7Iujv\r\nXlWd+nv3+ayNXBP+izBN/wtIRANFq8BR2ypXJAC3e+D+20u4oroQUMG7jiHU\r\n33BMgYBFR9eFu8pViR5jsFmi/ZMeSetGkyV0gZfyAhV777bwD9AFjtetegKc\r\nxkswDKJbIVxTNpoEotrBKrBPVYVibUUO5uS0bAJkNWcmvMPnF/jHwUs7JWeY\r\nqblqpUpwkFJ6+lpnj4lxLfMcAgu/lpyjoF0apDnGUK72h9G7TUa5pmgr139s\r\nOvsi9CjCE2kkHG7MHP7NRlIZPbGpG8Fr7+G0mUjvdp5hC2tlyBaLoossF3Cu\r\nmUgZrBMzua0mpCNZWGdzPEG4f7pO6A3wR6+niy24ZhvLWanA0w5FW2DHUc4O\r\nT49jXrByZe+LNLB1EsYWS72OGamKv4kKvIyRrZbH08MAGH75VWEBOUWtbZw3\r\nPp3/yXFqZi1+15R9KzGqC2pT7bOpf81g1Wq4uag4ZpOapi/Pk7o2X3ngIIjG\r\n06b9GCqY2J6+th0SZDjjs9AthJTDVnsH7ZE3d3Sj35xNj6l3ZF4zIhnJOfeL\r\ngHNgb1LYhsyAiuxZTHvT57nbp3rNvYgpwiw=\r\n=VzH6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8d2370a00f001485f36f21d0bc1eef460bd8c943","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-06T02:58:24.847Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.6-renovate-typescript-4-x-8d2370a00f001485f36f21d0bc1eef460bd8c943_1646535735845_0.009333543519897125","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.7-renovate-typescript-4-x-d5589edf566f704aa8b6643d8861bf925ca90d51":{"name":"@balena/jellyfish-client-sdk","version":"10.1.7-renovate-typescript-4-x-d5589edf566f704aa8b6643d8861bf925ca90d51","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.7-renovate-typescript-4-x-d5589edf566f704aa8b6643d8861bf925ca90d51","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1df677b81895fe628d95750ee53621524f10636f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.7-renovate-typescript-4-x-d5589edf566f704aa8b6643d8861bf925ca90d51.tgz","fileCount":34,"integrity":"sha512-zGNb7eGL/TP0V8RTQe1BA70cfFSfDLUKt989V3C/Mr4FhdyhSehnJi/F4zHH5Y0uylhj8fuciKtvuNhj9lhXQw==","signatures":[{"sig":"MEYCIQC0hWsV85dfMwLx6W337LtmmGmR1Pfmbw5dkWcxy/yTPgIhAL9JpVtv6XygrQ0HLFMzZaJoRAYLTYfyNWlCMHZkNanp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJCUTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqdfw//QHXfXKeij6ZSGP4HxoAqh8QLsUaqVIMbjo5gczuvumr5ompI\r\neGhcGZIsvrAPUkG6knD9eRKNr2pWLVc6zv4xiu1MRqRHqjM0qHpJMCQjoJmV\r\nXkLh1dKWYg3W334Rp+OeAraMCXrqccxc2ZRUOhTL7S/5lgBvXu31e5JEFjVR\r\nsXBJU/0OtqD9zFXQ4dGxhU7qYvSgk9CDaInZGCPAWqFeV5zghw3rs01oFNaI\r\nOsLRW/I8NBYXWdhB1GkykXWqX4ZNL5dngbOAPMbvAYdS+E+tZsTvRa1u9IV/\r\nLlg1b/JP0naz/ZO1tNm0sLISl7Cb7eHXgKWOm3Au/EWL0KEek6TWemX8BtIL\r\nYS1nI5/jxfrfURacAttyzXSdZBbf2WmVQYahb0z0d36I7MhQV1WCuAPhSIRK\r\n7fwoxYZ2ZimZRwkHapPR5abQac6TwZZS/IMHWBZujNjmUJUqIVWAh+XWiW+y\r\nco4cdiSY19OzrbQ2zb3n56b2OsZRB8aZhoMLNJel1UQvHj8redXPigpJ/SgJ\r\niIeLT+H5Tkk0cIRMEqSKC53CD/8TIYMtc3fAZqLw99B3iZ5eoALa5JtjOeVD\r\nXeY87h5R9cZBuqlfinSaeXjHRCN+qLQRpakb5DfULWOu0KTWh5j5PgjBtH9H\r\nNfJDjnmBohOa8SDTe0r/841SzSoVbs68Ibw=\r\n=XxFO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d5589edf566f704aa8b6643d8861bf925ca90d51","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-06T03:02:39.154Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.12","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.7-renovate-typescript-4-x-d5589edf566f704aa8b6643d8861bf925ca90d51_1646535955552_0.9956077093022739","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.7-renovate-typedoc-0-x-654fb796f20223e22e0b8c97edf259c2599f2030":{"name":"@balena/jellyfish-client-sdk","version":"10.1.7-renovate-typedoc-0-x-654fb796f20223e22e0b8c97edf259c2599f2030","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.7-renovate-typedoc-0-x-654fb796f20223e22e0b8c97edf259c2599f2030","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e5e3816b9006b49afc960cdff67465847fc5df53","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.7-renovate-typedoc-0-x-654fb796f20223e22e0b8c97edf259c2599f2030.tgz","fileCount":34,"integrity":"sha512-ND5Lhlp4w5iM476byfPgEML7q70ROC6Z2xBRee+X6uCS4TW2rnSkjlwIqJFcwqUBFs6TeC0qfPUFyNA3g8vu6w==","signatures":[{"sig":"MEYCIQD8rliVnGKvXmbyhwDFsNTeJP/KMYDB/6Rmds9cB6iq6wIhAPy7eXO/tMh0O6IZxNdR8aVF3N6w5yz55SeXfWYFKvjG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJWsjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuMw//WMMMF98zMF19k3vQihs0VUttkcM+Ex3508k7iSLIF1leHwXT\r\neiLp7sLUc4pHkR69NwhJ32Wox4/Q2XUu8HzracwSzGsUjHJ3mvG111fe+JKS\r\nuXr4nJik1Jh0OXDl6Vz6eU+PZ/zUvkIgSc/gxQHgT9OE56WmrB64hkQzQP3u\r\n83AJIXshTGNjsYhFAxOURFGN7a81Wd5Li4LLoa6MpiSzCX4fsPyCTTMnyOQI\r\nhrgtwlO0z7h+uYKj37Pi9RupNXWUyEDJFBsMoKdQDX4tioCEIkEtrc9COGCx\r\naWwV57J6HIh0S/bf+FTvIoBlwuUIE8a0rwY55bUUeAGxA/A+yujjVyYBCNOt\r\nyxAMZmQtsMMsHXn6U+R9Ijd4LMyyBLuxCtG9UR17wKUKB5F97G6wkEmC47Je\r\nkDAIgeFy6cV0LTMQnRtrNegaE69PlZ9/ODfUDg3MjjDKcFY+2BNW3i0yGgr3\r\nOzq8Zo6NkduaW1HXcvYCnppz7DjIXHhHvcIY7/r73pQlgwwyL+ztAYZC+a4U\r\nwYsz3DeHyk/4Hbmw/Qu6tTupVBcDxudmLUSP1zB87/5wqrxaY6lRWGiXtlm0\r\nNEJqtgtTQEZICYOtNPSKKCNxlSvGjGKJR9zzP9FeF1W6GNWON3TFOa+54bav\r\nUqNQNlBT013Tiu7AE9IgLLSmTS9ecNnDEBU=\r\n=CJMK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"654fb796f20223e22e0b8c97edf259c2599f2030","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-07T02:13:46.516Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.5.5","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.7-renovate-typedoc-0-x-654fb796f20223e22e0b8c97edf259c2599f2030_1646619427314_0.38555899821953865","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.7-renovate-typescript-4-x-dfd2bd21bff886826c641576059b5873c04f2d64":{"name":"@balena/jellyfish-client-sdk","version":"10.1.7-renovate-typescript-4-x-dfd2bd21bff886826c641576059b5873c04f2d64","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.7-renovate-typescript-4-x-dfd2bd21bff886826c641576059b5873c04f2d64","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6b0a30ea8d71cfbcabff5e27ef9046360093e825","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.7-renovate-typescript-4-x-dfd2bd21bff886826c641576059b5873c04f2d64.tgz","fileCount":34,"integrity":"sha512-xLJB9IYSOaZlt2qW1UksWI3TazAJA4xU0NZlz2ZOu0Mdnbz0nYA1xwTqV+stJQ58xoFCGuqk7e2IHebpiF7CyQ==","signatures":[{"sig":"MEYCIQCQ+sd4fs6XDMpSJzQwCjPVt1WeMKDxKAud2YxIaHqtbAIhALssLv76jmo0Z9xPUX/hMqKiT74/tmVnO5OO2OGHb2AX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJZ7xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpetw//eVvl7+Pz03cahgJMMI3BAZCXaeYpZrHfNBmkmdnnRCfvn21A\r\n6PyMk/GVbZBA/i5po6FVONwW+mdMlyfglUt5VkDZN32tCbgcLIYCkdn+D+gg\r\n6j40zG434+91bo/dHMdPWz8S6y5kOkWHnySZo5cKc7gP+aorIA4+tYhNuTp9\r\nyNN8VhYM+PHTaYF2F5nvZ/U6JwuEn8KahbehgnYJbriNfX6uZ8QtFKzao1++\r\nH62X/r34rmj1kAK6Q880Ff6LsHbCEENH5+wFaKeRXRlaTDzlu2tZhGPoPIyh\r\njjy/SIUb3MRzGIGTiK8euuDht1mmLPD4WtM4uGsAjQpPvJp1xtkMjjdd1Er1\r\nT0l5NZivsrEm2CgYq2i9nO63DfFF2pk9enW09C9M/+V8pA7s5PQhLJqBWoBN\r\ntGKQ0Zi4zuBPdcvknuvdXnGtxzRmySbVGTdIWZHBFL/Ig6NnB18fWaVWQpbc\r\ntHeJCWIIUj58QE4Uww3RCdlj+phriBI2x41OdJVs9hNTSNgE/hYReAmcp3M4\r\n8CFQhltzrmMkvJzjQNJck+ArrgZWaUweCq2SSfRbiL9/rLgZqCbtUD3p1mRr\r\nakrvNJflj/zD+xENOkMGOA2q1qshrshHAlQ1fiiyn1W2iour0uAUAwUqHBA4\r\nV/AbNslNxk6aGFS0psHfelclcO1fQCPBBhE=\r\n=qA2v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dfd2bd21bff886826c641576059b5873c04f2d64","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-07T05:54:40.642Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.7-renovate-typescript-4-x-dfd2bd21bff886826c641576059b5873c04f2d64_1646632689215_0.4418040957185001","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.7":{"name":"@balena/jellyfish-client-sdk","version":"10.1.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ba8d80cc79772e1d3f1236888a7026d2766980d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.7.tgz","fileCount":34,"integrity":"sha512-D/PkfQLk9D7cvg5nhoO6Y2NO6klX3CImiS/h2QMzVsjcaJd+/ZQ7jbjGIXio2+YG5C52sfveMc7Unwx0156tyQ==","signatures":[{"sig":"MEUCIQD/mka/KrOCc5h8INGyjZBM/2IW20Vjds+6gaP/4R5+jAIgIqdXDRtpPb+MO3hYZE3Wkwz6+ZFLDMLphIdWCDK+wbU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJZ/rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5zhAAjmsOVNQJyPXa8rMWj6q2KjdSOYQNeXCxNqsOmsW10vQCEckG\r\nPgU7JCI5G8TvPor68JFcPm4LG3TXPJsZ0+RWNNrNYd/I14lyulg0IlK7DX/e\r\nCj9ziTvP1FIj3GkGOXjQMMnNiahTjdQhiAH3TZd3QSNbITTLBTr/heR5ZBda\r\nqbUhJAh9Z+gkwge60009N/5yHHc9MCichUJnp0LIDZwwFGKGBGgqYalHm37Y\r\nkpIungmUb6J1Vlo3qyCyZGim0Rn24uje/jSi2hmumuNi2Bj95DDjOIZJaDyR\r\nfVDBlJu7m0aiggasVPdmNiIp7bFwR2FmzrJnmE2QexXpMdewYtZjkF5eMxgg\r\n2BLz69VWfGeN07ZmMp04pFFWmydqOIAmBPSBBoLCDXaNVWaAZi7JMEcxmFIf\r\nWm8rukKD/28/iPkBcEbqzdx19pe1Ljd5khjHbyGQzk0t1VBQ2pcPEy52H3zL\r\n9EvwqnFagd5ZKZocbn9OM9KQCjVeuXcMCqW/8kxM0W/qU/xk4F9SeozvzHUm\r\nO1bwW7IolhT+99fV0c+/4qgs08F/LPw3i662+WBDKAfoa//WBOVSpPk6pGBx\r\nLbyOO1SgpJYWaf+Kb6pEGP2kqf0E2PvSoNlrcWN8evADb35G84BuR+o5s/o8\r\nrVU45fIT+3gIvUXI/Bt4L/ne2RNumw6HG+Y=\r\n=XMZB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a2638bf702ab06b99134cc6f83bc848112f0e781","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-07T05:59:48.212Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.7_1646632939731_0.45329058762563945","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.8-supplement-query-documentation-cab253ef72203fadaafb7b39dc388001a4bcb495":{"name":"@balena/jellyfish-client-sdk","version":"10.1.8-supplement-query-documentation-cab253ef72203fadaafb7b39dc388001a4bcb495","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.8-supplement-query-documentation-cab253ef72203fadaafb7b39dc388001a4bcb495","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1c2b7c3dff25b6e5a35c864b5d7289f0fa9d0161","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.8-supplement-query-documentation-cab253ef72203fadaafb7b39dc388001a4bcb495.tgz","fileCount":34,"integrity":"sha512-kBhKO548/VlEQQ+rlkEF96xlvqczVo1lp232KzCt7vc12Cymf2rXFdcD6mE3h47zfzcafU2TE0heDaroDO6TrQ==","signatures":[{"sig":"MEUCIFvowm3HIlNLLXDtImQ1lo/4DyC8aGKF+RFs9NGsM9VvAiEAv14pAG1pinYvCOzaKevv/HtAkLagk2HpfBP+3WeYZrQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJeG0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4yw//bgCOv62Rgm5rPvzzHed3r1Axks60vru43dA3szQggPwMH1EC\r\nKdclPUwuykcrloKhUxJdqSnmeyx+znkMIs0+RZwzHI7Bh6nn9xzzUDgkoKhC\r\nmh5hg32W8xLYAvLmmISAnERnbvmZpdHMC5gi6ogA21wACVyulL7Zl4Wb0oDX\r\nCm92dCZUEJ+QPCjMF8gH3Eg7EAcPY+J+kCf7Gp502BxaAhDmULzoPkksqrnx\r\nasrLhUffSi+u7f63DeaYZAPRwD13gtm8H9gEZwsI6r3hXA+tnbvjunqj0nnP\r\ndB7CPZ61BM4/Ml1r+xyibceztF8eZ4ZcQxRCC6y3ZJe4texHjDklQnnNRUKb\r\nPmbS/L+nXPL0+wwlWbmSGJeW0W0hE1+fouTcOdX6fKEN6VJuIpx4c7QJodri\r\njGsWjuWERYv/FiYYe5SUd/O4734hrw6MHEuWgGH6FQkd6w/CMSEi66z/ifZE\r\nd7lEANd6eJA5Ldp+8/y0fc0rLoKwZT3eIoZCbGCFrQHGQ4Ugtn5h+kQtUGJV\r\nxk+GvmAXXai/8i0kaT1V5EdBmMi8Py5kq73PXZFefu5Rr0Afc7UJr6iDKPtX\r\nXlGFD0A4nDiKiZn0Ot7/n2WUq8L0bEEga+5wUkPUf3ih2pB/4x9h4kLK9SXR\r\nU0VY3SJ1jatRAF/hjWLsVQQUhE3FeShyLs0=\r\n=uugY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cab253ef72203fadaafb7b39dc388001a4bcb495","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-07T10:40:29.890Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.8-supplement-query-documentation-cab253ef72203fadaafb7b39dc388001a4bcb495_1646649780183_0.22563750435324526","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.8":{"name":"@balena/jellyfish-client-sdk","version":"10.1.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ed672f9d09090a5220fc83dfaa5bc512cebee4c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.8.tgz","fileCount":34,"integrity":"sha512-IfZXmJKagx89teyz2DLaB+ID8r9dhFZAWNjYdMOW7o24OsZJUldgaMGfnqDaQ3o3zXmXVNHiZ6YMzcUyeXJgZQ==","signatures":[{"sig":"MEQCIBO3ZRiIuyGKRlEzmNaXdhSLyv2JM3wByoAI95pcF3BPAiAItQ6g+Rj9lKPzgzQyveBXY/f9tzektRCvE8nJobWlAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJePaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMkw//UU/1WUSpvE3lukcVUT+gnJh/j1GaEfWmZ9TKoD4iTZ9ew3O4\r\n9ilF96Tas/cVmW2Z9U4ZvNFyLVM3LdizdUljC1ftPq9sj6oQvy+aRnDj48aU\r\nNVFRagqEiAR2lg9HAiSY4zRImNW6h1ncVQDSUlhjyDgxZDzh8FF9KkOMcnrO\r\njJJhJlDHKmokysAKnODc1xlPCbVIOIfKh6doPONUGeJETOjJVdkQlLAnw5yY\r\nDbhwqTvm35KSIEnf/f6lydj1Zs1cfLUFLjNqIws2w/nr8FRlOqTxwEtYnHjO\r\nkmBqifLq9+VyQ9mpm7AqKwd5EkVr65oGsrcnH0JGn9cLAwdZG3OVy2HSVvHq\r\nTg8R2ww6mJw64/g58472n3H9Od18pq/+pdOJmOzlPVmf82MkC2vzaAyDZlc0\r\nLEm5/+IpHK09VSzhRNlJdKLiLwABXaBKXM5X+ypjePuD8QJX+YRbQn3SRNAX\r\nqF98n8T/w3qS+YpPBmCEJQ3Tm6jSJV/4ektW0CROkTw/zwyMOYV5pKyUY1QA\r\nZMX6Rqcvq2AXpbP9NIqfCJnfvuwqE8rG1TaDflfu2Ce5U/QvRsNTXS3ytGcq\r\nMD0sVKHHAPUpmRahOmsT7oJzDi8D4CwVM8qRq7hreP1w00/RGyU8BP8VFEkW\r\nTwz1Pa5oxOIBQalp/wvMK7uAY+4r8we+y/U=\r\n=DB5D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0df251e25183553f2396b096ba6592c1729648da","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-07T10:50:18.008Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.8_1646650330095_0.4792709571726925","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.9-document-query-interface-briefly-996871f0945141c851c0f742185c8b63197b8bac":{"name":"@balena/jellyfish-client-sdk","version":"10.1.9-document-query-interface-briefly-996871f0945141c851c0f742185c8b63197b8bac","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.9-document-query-interface-briefly-996871f0945141c851c0f742185c8b63197b8bac","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e95372151b2f348b70b11d2eae337f8b8d4c95e4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.9-document-query-interface-briefly-996871f0945141c851c0f742185c8b63197b8bac.tgz","fileCount":34,"integrity":"sha512-uyAxxt9VTRJWlOFrB5ZUwZGvK2IV5GZ9dJYgSNCNocXVhbSrhJ4UAh2rPx9VTW4yzexCqgqqfpNreG85iIlU6A==","signatures":[{"sig":"MEYCIQD4ZXDE5H+amvw0bpACuuhi3ZkM0fB6w0/wgdy2nw8YwgIhAMAJL36j0/8TcSJQMt4e4+g2Z3Y5+6MnI3rKvxbFysjk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJzArACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqcug/9GVsmukjsUUXPaOpN4044RdCh/3ojdOectMThwT1+vfufoHz3\r\nwwItM9zsJetPze/i+k2loNw1tcQculXWkLmzM0VTuP/lVzzP6CBBveDT1MSX\r\nGPTD0IuN1fnIOrU9aMxsPQlrd/NZV0BDhi1+D1sTJ48qOFvRPXJJTclwb3jo\r\n6r8tHjopVd5oR44MBwbT76py2EDzmxHQmc1dGWbYx4fhqVBc3H/V9HMURSQ7\r\nqiMUrWSxDYME/V5+vj7xb5PWFbfbe389UH2FvpKbxFQO9SQ9fu5+Z/FleedF\r\nV6EKYDrctu85a/EnQv6k1a5NeM0kXTVeBD899n7wemVMt7TIC7eYDdHI/hTo\r\nJU37WRWi3Uma/zv6Lvr+QLOlWxq7P3VSexgnUHSL1BmhQygk2wUj4xZxnZo3\r\n2OSajQQq0kyBn2pJEVK9wP2KrYD5K5wTWzcCynIyYUVNUcdJlB5YVI7ssSTY\r\n2YV5WXNHOIIPeQ/lNBTunpwcBvZm8b33enlESWP2ivsQ/qEUNI5Qe8wJwr6o\r\n9NRfYaxSEFd6zpxkaJEGBjD6iPJRf/0RdAPUZMhwBFKyj/jP4B3RVrtFurKq\r\nQcY9484zTtrnNhM4zj5ysBOp1TMB1Ntkv5va1WCpdWkdgTJYNwVDLu4bsVmC\r\nxlHUftRqPwzd5auc8DLl4qgAg+PeFWoaZU4=\r\n=gzA4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\n\t\t// Query to retrieve active support threads with the query API.\n\t\t// Include also links to \"pattern\" type contractswith the categor\n\t\t// 'has attachement'.\n\t\tconst supportThreadyQuery = {\n\t\t\ttype: \"object\",\n\t\t\tanyOf: [\n\t\t\t\t{\n\t\t\t\t\t$$links: {\n\t\t\t\t\t\t\"has attached\": {\n\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\ttype: {\n\t\t\t\t\t\t\t\t\tconst: \"pattern@1.0.0\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t],\n\t\t\trequired: [\"active\", \"type\", \"data\", \"links\", \"created_at\"],\n\t\t\tproperties: {\n\t\t\t\tdata: {\n\t\t\t\t\ttype: \"object\",\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\"const\": \"support-thread@1.0.0\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"active\": {\n\t\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\t\"const\": true\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t\t// Sort by created_at field with descending order, skip the first 100 records.\n\t\tconst supportThreadyQueryOptions = {\n            sortBy: 'created_at',\n            sortDir: 'desc',\n            skip: 100,\n        });\n\t\tconst supportThreads =\n\t\t\tawait sdk.query(supportThreadQuery, supportThreadQueryOptions);\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"996871f0945141c851c0f742185c8b63197b8bac","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-08T10:26:48.282Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.9-document-query-interface-briefly-996871f0945141c851c0f742185c8b63197b8bac_1646735403478_0.2658702710233738","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.9-document-query-interface-briefly-f237a2dbbe1e79363faf3455add2919fc818660e":{"name":"@balena/jellyfish-client-sdk","version":"10.1.9-document-query-interface-briefly-f237a2dbbe1e79363faf3455add2919fc818660e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.9-document-query-interface-briefly-f237a2dbbe1e79363faf3455add2919fc818660e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"79763f631edfbc95a782bbe6205877604c89f69f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.9-document-query-interface-briefly-f237a2dbbe1e79363faf3455add2919fc818660e.tgz","fileCount":34,"integrity":"sha512-vXMCLhepBX0eFLGu28FeGeVdVUeQlxgo9URk78mvb9wv7WLqzubBOk7UhRNY+5j5oL0v8Rt0cJ4vFdZK2Ao7IQ==","signatures":[{"sig":"MEUCIQDgAlES/v7s5xGdOQBWxrVahypupvs4t7uQRXKdWugH2wIgdRfF/LOzNrp3+1D3Z8oFPOZTyKJx3TX6P/Ozx/x19ig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJzJhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjcQ/+OiH5cF9VGHbXIy8tuGP13ko51AtQkzTiwhJdJvXwj/t2Jieb\r\n07OcyG3I3XvXu27mHPYIw3At/WpcGNPqPFCdumnkDBA3I3nALEdNZ1wovE+2\r\nmDh8P2U8B0xEuJM1tHYUtfPPMvcYRcG9yDRTBFoZgikUrwIUGQ2zcAWT4Ovw\r\nnVWQaOUJtcdr4vm66dLFBDntGEwzFe7QYP5pn9akhtmashMzLUflpZJ/rGfu\r\nVAInYXh21CQT2Ac2O/8Cp1+P6E/V3s1cZ0mBpcGXTdf51w73FtXiM7m6GGGP\r\ni1tb4oR0biQjsO1bfgAA2UwwZPfoV2R33Zao8v4mCphkulfpoRPTMqmO8B2F\r\ncId9XkyVMElBNPI3eAUJxJyPSZShebb/8/sZYPWZJvF9KX3QUPuimRixJ5QC\r\n0ER1QdFVPVJag5ZaE0D+lkFJj6ZpNmCjT6juCWtuHdJuxbvmlpo5zsq7aOpq\r\nulu6tZ698r4Rq7+YZSIriPsxvVJiH2ePRd+wmuuNRfJXmIRPNWSaI0pkcRpF\r\nblZPnxbA9g/ozSO07JarWSaqah0IujVvxa6PRdSxSRodYrAZhQYQomBXVLbG\r\nMosznDEiDWooSx1Hp95Y2tAbIXDFjkR34IH6bhBsTcmeM/lhMiR2LT82BE3C\r\norK3wgX3FC0rAO6xrthPshCl2IvVb0Q7tbI=\r\n=nwz9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\n\t\t// Retrieve active support threads from the API.\n\t\t// Include also links to \"pattern\" type contractswith the categor\n\t\t// 'has attachement'.\n\t\tconst supportThreadyQuery = {\n\t\t\ttype: \"object\",\n\t\t\tanyOf: [\n\t\t\t\t{\n\t\t\t\t\t$$links: {\n\t\t\t\t\t\t\"has attached\": {\n\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\ttype: {\n\t\t\t\t\t\t\t\t\tconst: \"pattern@1.0.0\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t],\n\t\t\trequired: [\"active\", \"type\", \"data\", \"links\", \"created_at\"],\n\t\t\tproperties: {\n\t\t\t\tdata: {\n\t\t\t\t\ttype: \"object\",\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\"const\": \"support-thread@1.0.0\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"active\": {\n\t\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\t\"const\": true\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t\t// Sort by created_at field with descending order, skip the first 100 records.\n\t\tconst supportThreadyQueryOptions = {\n            sortBy: 'created_at',\n            sortDir: 'desc',\n            skip: 100,\n        });\n\t\tconst supportThreads =\n\t\t\tawait sdk.query(supportThreadQuery, supportThreadQueryOptions);\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f237a2dbbe1e79363faf3455add2919fc818660e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-08T10:36:53.242Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.9-document-query-interface-briefly-f237a2dbbe1e79363faf3455add2919fc818660e_1646735969660_0.1124608311577513","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.9-document-query-interface-briefly-0c0750c29ce5f1b3468ba696bbe952ca437aba77":{"name":"@balena/jellyfish-client-sdk","version":"10.1.9-document-query-interface-briefly-0c0750c29ce5f1b3468ba696bbe952ca437aba77","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.9-document-query-interface-briefly-0c0750c29ce5f1b3468ba696bbe952ca437aba77","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b3c0530db28853c3b56abe5b7cf5b100026a1b19","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.9-document-query-interface-briefly-0c0750c29ce5f1b3468ba696bbe952ca437aba77.tgz","fileCount":34,"integrity":"sha512-sVmphWOoGKWzLdWdS5z/SdSMaJJGM9HlH7fwdvD+/7t8PtZNfSteLtJ0OaCM0swnwAQ3TeLhRHwsKhNKIF59Fw==","signatures":[{"sig":"MEUCIQCU7QXW5ftgZ/k5nMh/5LdirVBeXWNz0WWQgz6UgXhzewIgT9FVAS3JHhAMgjwKnSuT6nIW3aEhY6w4QtfuhQ5y0Z4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJ2/oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpJmA/9HdrUA5tfFsH1gQ8QTRjO/9Tiopb3wKindXk3ww+idc7a1npB\r\nTpYyiXnVTgMJKZOKd0PkacjZTw/I259pI/lFfaEVJjdfp789aMvJ90gnF7BL\r\nVq/WOzVEotXwp/UYLOvVEWUOMv0pEOEcRrw6QF03n7GUuN1wAHGc04kAlNAG\r\nB2GLIhINvVE5aK9UiF6PWcu4LfaJrzj9x5wXKUHsSNXs92nFiM8ea7MC4v3N\r\ngPDzxa3f5PZFbcv67Ml85hhTAbgr8VuUq30dRIZFDPFPoVPQ/8BMwzPXa6Wr\r\nEub67qnuKgQqpYjI/NK2KYJun9KyLZ2f4s+vWbRYZmF7K8XQW5GL7sSqEzBv\r\n7QJ419dmHU4S/OAgxtZHEGS0uD0he1TxeCagOMAUJLZvXA6Uw9O75Faeik0+\r\ns4gvsG/uQOQZe7DnrpZ/svOhqpI34OEJEjRGJUOBmCxoOtJRBMvTduOPLUCL\r\nieiQuuvRmOGva/D0Vjzx3ZI2P5jhWk7+S/fJ/2u4cIO++4iLHL6/aFDrxVN5\r\nBRYtduJzcZNVwl6MjTyKMRB14hlj+D/QIG0Y/ISyqEuXH0sZU4JFSr6TeAqx\r\n3YNncsvAL2gzgGj5ZUhm4mrRHMBCm3ewBx2N+NtDaoBA6T00qdb96oHOjTa8\r\nFGHtppTwLf2z1m2wLWFmfaoediPuhsq5MN0=\r\n=MvUJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\n\t\t// Retrieve active support threads from the API.\n\t\t// Also include \"pattern\" type contracts using the \"has attached\" link.\n\t\t// 'has attachement'.\n\t\tconst supportThreadyQuery = {\n\t\t\ttype: \"object\",\n\t\t\tanyOf: [\n\t\t\t\t{\n\t\t\t\t\t$$links: {\n\t\t\t\t\t\t\"has attached\": {\n\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\ttype: {\n\t\t\t\t\t\t\t\t\tconst: \"pattern@1.0.0\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t],\n\t\t\trequired: [\"active\", \"type\", \"data\", \"links\", \"created_at\"],\n\t\t\tproperties: {\n\t\t\t\tdata: {\n\t\t\t\t\ttype: \"object\",\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\"const\": \"support-thread@1.0.0\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"active\": {\n\t\t\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\t\t\"const\": true\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t\t// Sort by created_at field with descending order, skip the first 100 records.\n\t\tconst supportThreadyQueryOptions = {\n            sortBy: 'created_at',\n            sortDir: 'desc',\n            skip: 100,\n        });\n\t\tconst supportThreads =\n\t\t\tawait sdk.query(supportThreadQuery, supportThreadQueryOptions);\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0c0750c29ce5f1b3468ba696bbe952ca437aba77","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-08T14:58:48.474Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.9-document-query-interface-briefly-0c0750c29ce5f1b3468ba696bbe952ca437aba77_1646751720126_0.9280123624749925","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.9-renovate-axios-0-x-4523c1eff83af5fb46161f4bd668e4c8eb69ef7d":{"name":"@balena/jellyfish-client-sdk","version":"10.1.9-renovate-axios-0-x-4523c1eff83af5fb46161f4bd668e4c8eb69ef7d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.9-renovate-axios-0-x-4523c1eff83af5fb46161f4bd668e4c8eb69ef7d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6d99ea0098ab560d9cd4355ef6aeefd7ef207361","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.9-renovate-axios-0-x-4523c1eff83af5fb46161f4bd668e4c8eb69ef7d.tgz","fileCount":34,"integrity":"sha512-G4JPODCudDHuSoI44pYSk77sWS0LRoxR6zTdRGSIpwnWZ04tqijoEczGOzA2Tx38vVGXn8aZZl9Nh+KeFEeMPA==","signatures":[{"sig":"MEUCIQC3r6gKgJL34WcuIAlqc/oZ9rjBgyFYFNnb4KfYXo360gIgckwG/qfrpgzj8jhfI8uDeXHErmeWtS/qntgQIeKRhBk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKPMzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqasg/7BpjtPaciKlcWfeOQRfoWMJGMlxRLTahxFDsCw8PZB1wrtFUd\r\nd6VfkaY/EhILIndH2rrYd+FJC0TOzcITkk7dwjL/nToQBcXe3lwgot0qwl96\r\nquHmHClsw+kjf31NTlLp7lQGvaX+N9ZbJ2w68iH73QsRkNBXiwUg2ct458f8\r\nf91V7pD+bOqKOlx6CLkPYaLcOR6N8adF4PLX9Ohlwgg0gpH1rMq6SMEau7hD\r\nKqwBVUaUih2lenehhrarJUb37rlgqhq5U/4fTXNT1JKVVKWhVAeMr4k0ERtC\r\nxhTV2N7KXt+OumMlipHK7PhIPkFIxyumUinswQRuMs7mh9ZAqdWmHoRLv58f\r\nEeCrz+qds3dUZW83Xi/OlRLFke47hm3eZYVSPi9GP+NtMrFM+1pIhhqp/uiP\r\nLuuwPVqB5xxTYFAvRWpNR+irv8nM8yX/6y8T+jCrR+cajuVDJ+8APT6mFs4q\r\nJlxU+Ym2+MSm+THF3QOAl8NLii5rOLaW2gJqLBCvJtyERN/lKz7wwfyvj+dv\r\nEOF07dSZTvpEr5XNeJ0hBtessoktJ94wEhQAbvokgnnpDdn+hLKwrBGILGcn\r\nF3Bftg3moeQVlntJThY5uq9u1c1GZp5Xxx6jg7SHYRFgNIdA0Y+Ze+PTJoza\r\ngeWfcc8ene1CFUcN6aw8iQsBDZsFuX9eyZ4=\r\n=Vpb3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4523c1eff83af5fb46161f4bd668e4c8eb69ef7d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-09T18:31:45.913Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.9-renovate-axios-0-x-4523c1eff83af5fb46161f4bd668e4c8eb69ef7d_1646850866920_0.9058108531105777","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.9":{"name":"@balena/jellyfish-client-sdk","version":"10.1.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fe08df45f563637bacbce95ece6c6532bdf81d43","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.9.tgz","fileCount":34,"integrity":"sha512-ErDd+4AqAnWKkpDEXoCqdrzXwxOmoSFo4/kBzjJAf4fMHiiUpWziDOq817nAxQtKrr9OBYCtyFvZRiFSVVdJCQ==","signatures":[{"sig":"MEYCIQC12V14BjpRaxds8MHfqlJ5beeIwu8qyHCGxZY9Exh9hgIhALgKkh6OFWaa20ul6zeDErp743BFLGYpwhPApHfr8/Kv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":283925,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKTVcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrd1g//VhDwAJuYnwX3weR6GIipE+LcgstH9nlSX+c/PMjbJY+JWv7C\r\nEXFOU2BzGDlCurEw82rgUEgHqRjdjvO3GZAH2pPr8RK49vcDIdTXHov9bx8T\r\nbIaQFEzhVz4tcQUDpPez4H6dfRlAvJKtMI0kuF2lhbgbBma/NXRcufNIBcQ4\r\nu9QL6EPZTvIz9mSHnVyVimwOkkKOakWYWwSRitqwc5dxnTKpM31VRudyaTm/\r\nTu0ked5qXlbKQ1UqamBaFCpKK6o+tDLnJq9jp0MhFgCpOz2Nq+U4zPPYmUJ9\r\nOfWAF45juwbe+bIoFJcSn+3NYzG1WZ9y6fWVV6PmQ8jpZtgX5G7UuQyboRt4\r\nkj60RTTiDyLw6YeR0aP9Om+0+ftZJEuFoSIzRAox0OQOXwkmQugDgnfKo2pq\r\nliURdfVQTKthxmfr3youc1k4pluzwqzBD0CrS/F/h1Ls+mCw8AzcY7L8dWA0\r\nmVF6Ou4b5yE1ZMiGbALT5dkFBPfUIJfur16vQNARNNRJ3nhKq95Mwuqht5t3\r\nPi/j3O9NTJkXfCV/CyE871L8VgNGmOUCY2iEK8elbvjNVWO5JLN+MJT0yn0r\r\nWGBy4MHaBVK576vYIGcZ+MPW7mVIoLRxmOSHUiJpKlixKB2ndWD4ag2Tt5Uu\r\nQfh67KVth6GHKWeo17A1tA5DtSbZYUB1Wno=\r\n=l6Vj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ec1e684eaf605250ff15c825da08a8d02972d8c8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-09T23:14:28.258Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.9_1646867804422_0.5121971508291818","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.10-lucianbuzzo-todo-ownership-51e626bd87d04a557b144a35cacac824191a9c19":{"name":"@balena/jellyfish-client-sdk","version":"10.1.10-lucianbuzzo-todo-ownership-51e626bd87d04a557b144a35cacac824191a9c19","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.10-lucianbuzzo-todo-ownership-51e626bd87d04a557b144a35cacac824191a9c19","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d8ad90e4b6754fe272fccc24ac565d9d2a4e039c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.10-lucianbuzzo-todo-ownership-51e626bd87d04a557b144a35cacac824191a9c19.tgz","fileCount":34,"integrity":"sha512-WRZiO2SH8gtxsdykrkFcJvryN+Xx+W/FdBSH/gBdAUG1DJ/kZ8DMl/ukBHlV4BJMhuIaZyUp9+yBPlkNa/CO1A==","signatures":[{"sig":"MEQCIE5erwEPPBCTQ6cie+ze3JIcl8JX7fr3HPb1UkGI7eR1AiBXtjuP2vEdnjNzBoVIv4sp1a4gucxbcByaIcIxuYhMBQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284921,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKe7aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8EA//RlRY5WF7bH1S19PQZElZFC1JdK+ze2lqJCOfA9IJfFtsGdoW\r\nIFuWg0i/Qw3eVe2xhy5t5WK2/+iDmgD0dCfGkzbXkHcBnmL0CgppF6eIICzd\r\nSr+uc8jXrCs0rrsf8kZ9vXZ+aVEGtXeJDTM5pUJekQA8jiHuLHrWgBpiaRh5\r\np+ddMQrbn48E5S9qcy4g4gKPvgMBLGZonONuCCebA+76eFbNjBMiY0I9mWwn\r\nnb761P3khUGZ7k7P/58o7R4sVYQtf2wg1cr5WOP7Ptl6ctxjgRXhNK3KQu9D\r\n1aJSCl8D2MzlQiTLTgmYtxgRtl3HOCzIyyOz8oBcbLDQ+zHM8UgMlMXuVEB1\r\ns/MWkP24ZUAZf8hyhvxDyyVH7kU2+fmSpYmgvYBCCCnnEp4hFagA39jZUUz6\r\nX7SKqMSpaNC/qQYGj88MdEjn/veFgi3B7pBKGo8EikBD3C4fKgpFqTw46UW0\r\nqek1QsI46SQv/i3f4Sy3ZADeupaIGVWaKSqNzbyxtLMKGoxKqVJA3AjL0W7C\r\njQVjIxALHjsPauRl41Yy3hR3/FqYz4Y7xIp3wrApl0Tep+h+r/u5OCZlBh8G\r\nnKLVLqdHumlv3jpFAWGJYF/IkOhz3ZAEiodiNfIKONuEPh8E072R2OP+Uy47\r\nL2lE+o34j5n4PFCooOAzSntZJoO4cmphqS0=\r\n=Icxr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"51e626bd87d04a557b144a35cacac824191a9c19","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-10T12:25:32.484Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.10-lucianbuzzo-todo-ownership-51e626bd87d04a557b144a35cacac824191a9c19_1646915290727_0.09111577998301756","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.10":{"name":"@balena/jellyfish-client-sdk","version":"10.1.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1a329888fd1232caf02eddb82ae98e100e5b6732","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.10.tgz","fileCount":34,"integrity":"sha512-Q+eBtWyb1VbObLSfe75lkNhdFWeHnddf1qvbqtSdp9lKNWd10hPSgl6QoS6Oa+oKXH9xwOnszR+c9be+6TudRw==","signatures":[{"sig":"MEQCIFNerm/7lvGBKzXzekmh37cuHPUnxLKdUoK6rpj7q2vFAiBs5AY6StaD98bT0g6U8ipvZPEiFQCeewltpJdLAEdcXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKfNjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorUg//d9LWzviUVurkq4zS9zLKj4Gzvt+rXTGQ8VWfgEytNJFzIMw1\r\nbtsSnb84O6kErMrfmaDwbmbre2DsL0loBkcvO9nn89ST9dcofnecKGyN3EOj\r\n/H09ZuKwxdgS+OfbAmpq6xmeF4qJTbUOi4qk/CfjP/PfD/CtwmzT7BVNAme4\r\nGBXCtuDKWUH0ruloJuPOQO1MugW53ELzuBvM3P62dU+9+G+JxgYSR6Hh3xVj\r\nAk+3HJL77gEOSaKiSH/sCmfAqmgz1ZtKWHGVjki7oJM5cvwdUorm1Bjrbrvw\r\nEzVCpq5B4b3hCMZtTRXLxj86VO3i47lwximjxZIVyec0RCwZ0fAM187EKjpp\r\nnqhUUWv/jO4LlO+Bm5VaTfhgIQOhtnwXf8XYi3ODNw5N6FHmCFv7cXTw6Pzu\r\nqrejoIVk95E1JuGRAh3Kmm0u4dqpX7MLEPd7QZ2PgG5dnZygtxMENlql9z/k\r\nDZ72fBUdjQqXw0aUzkzEkfQfPDVAC1WGs6o8DZndUt1BPT2MMAd+4e37xDx6\r\npy01EiPICCzrA5Hzii7YrmAKHZtzu4iVPC0Nfkp6gmS4WBzyeBLCle+PGJZh\r\nFx5LU3UEwwRc+ms7R1/rqr7Mo3p2Ix2zV3970W+OA8YRG8JXhD5abmDvhSuq\r\nQVt2PAMSc2jzsBerlgFWK1WCaFJTNSwTiKE=\r\n=yE43\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b35d294648fb95f809c8c7aec77132e0c2561702","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-10T12:45:20.597Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1","@balena/jellyfish-core":"^16.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.10_1646916451466_0.03692692721980784","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.11-lucianbuzzo-autumndb-a03630fa2f6eb8f56fb8aaa0f0db3f18d69b0333":{"name":"@balena/jellyfish-client-sdk","version":"10.1.11-lucianbuzzo-autumndb-a03630fa2f6eb8f56fb8aaa0f0db3f18d69b0333","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.11-lucianbuzzo-autumndb-a03630fa2f6eb8f56fb8aaa0f0db3f18d69b0333","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"82df56c32556b3c469464d60f0fcd3fdc5623cf8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.11-lucianbuzzo-autumndb-a03630fa2f6eb8f56fb8aaa0f0db3f18d69b0333.tgz","fileCount":34,"integrity":"sha512-B9k5IycKt+QAguu7zJTNybkDj5eJur/Vt9VObLKmwZPMTAnCDI132lECKQvCLuVPIEqYuwofuvKx9ygxLdrOYg==","signatures":[{"sig":"MEUCIFhrJpCi9en4H+KAedkOrfjP7Fhq2xoxzoYn+QfRx3BuAiEA8R7xqZBss2+9HeQGVvxH96zjvGJ1gv1OIqvjQkVGps0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMcfeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+fg/+OC2ThP38ISosUsfCXlofwQyIzGKk+kilnxmspqoFYP1jvMFo\r\nkFdaMV0Lq1DpZNBg1AwtCVzMDa8x62+ggQFr0NYoYrzcHGM2oTn4K79oF+Hq\r\n5boe83sqXmt6gK1Gu2E9a+CtZKng0G3X7hFKBipDmD0CiouHJe/v6YJfPi4/\r\nsYdWd8qZTK7FlxM/WTuziTG4pD2bL7qX+3FGmI3tCJ3VLUMfMdqc2aMan981\r\nZuJLdpIJy6GrrwhBaojp73nMOmKuxdC9g3EDeORK4mhvpBC3mq/PJfmaRO3d\r\nOfXBgdL9yTFokEMItfoQHUQkwdwvchHvT9aVqGVGt9YGGHGUdZR21lGrFzpv\r\nxUn8CDBl8I8hYyYYUg96jqNLFg9LYvyBmLSpx1uabrnxaQWdorNIDf8oehxu\r\nKed9gtCtm5GbNmawaXdmBUToFDlp2bT8EIfrqNxTQ9X0/xaGXyrNXFek25Y4\r\n+jI8eF2TTcGT8m9U3Tqzn3HnCKMtaPD6COifLmn+DyEjcrl55OL7IklSi5va\r\nTxDW66viIuP6lqG1MWCgG8zCN4aTAJmqRmCvvJupHN+Pqc6kZzOUlrKYy/19\r\ntiy+pz6wDIfRA5HFu1/btdr7ZROS/ZtoRAjoty1SA820AlGLxXk2qITyV6It\r\nF++0Ti4sD1WCobgg8+XGfTmtj9/cC77Iyuk=\r\n=ZdFS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a03630fa2f6eb8f56fb8aaa0f0db3f18d69b0333","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-16T11:17:31.191Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^17.0.3","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.11-lucianbuzzo-autumndb-a03630fa2f6eb8f56fb8aaa0f0db3f18d69b0333_1647429598707_0.8037356384843295","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.11":{"name":"@balena/jellyfish-client-sdk","version":"10.1.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0a1cd6693cefca498b8521ea066dee341476d7fd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.11.tgz","fileCount":34,"integrity":"sha512-kVFmpfZ8nz3EP3Y9zkuT95OzleevZkVLeYStLKusKyYzKJqt6mUB+4ZNXOFjl87utCKESL9mGSCE8DwEYKaT+Q==","signatures":[{"sig":"MEUCIQDWTsJRfQ4V8BaZ9Nun0qlkUkoa3GwGqF9QB/uGoV/RnAIgJIpuD6Upqd8NezJyxijYHyyLjgAqzfwmYbe9x/q/Cq0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMczgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4rw/+Lfn8O+UyiawiBZEtMDnanr7Zje2dGPi8pOJpXJ1BVkXz3vn1\r\nH4Nf+yK05a+gDUrV6PW9OE2kAgQPmcMFjkh0uuoLELpa5yGN03TA0B5Sdv0t\r\nAN5vQDpwcDSQ5XpFHTDx7eQfg3CMymtyYkZ/IiSCawR0efbYAF0FHj7b0uep\r\nGrh/S2K/0EiJT1rMdHOi5AbDmtCDTPhyCmiVpByoVDn3N8nKBWimUHziLkLw\r\nRtaPVJtGoPzXKvHb/5d3LeD6vnqF5UjwVt5tNBiKY8bK+zebm5ldoTEbl+A6\r\nU9FaSl8Dsdoxr8Tbtsw7+k/Xb112XUZFF+JqVBZr59HXJFnOVscncEyG99fD\r\nz9j8tViIGA3w4XlUr6IKOiY1Gk6SJaw6GmRb98ziXB/0dlBfHp3hDt7IxVhJ\r\nBaWXhZfSX6HWsRLCg5L2AjMdrrtc45TbX4eC+Uj8Y5M1JRpaFNfj2WlwDvBl\r\nNCI9qeyhVVFuIZAOrN3xaCuOzRlX2eEcP8YhCOMUqoplUnQjeHnBPsV8y5fK\r\nRUw4ywvz+ppSdX30YtmW6dh4OQAD+qeOUMUglvPEPe+QSst19z8rI6Md9Ia/\r\nCQaZxpmOr1biaqh/NM8MEHevwClOegdpA4EAHXEQioi1hWkbL3rFDuN3Pc8R\r\nBCRE6njocz0CsUzqrdYuOAHvYg2cCGWmnbw=\r\n=pnpj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"07a6989762a30523ce7d7430b1fa1d30fc06a67e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-16T11:39:16.195Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^17.0.3","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.11_1647430880634_0.4793421373263467","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.12-joshbwlng-bump-autumndb-36556a9325d97fca80f8839e0f645c811f25b5c7":{"name":"@balena/jellyfish-client-sdk","version":"10.1.12-joshbwlng-bump-autumndb-36556a9325d97fca80f8839e0f645c811f25b5c7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.12-joshbwlng-bump-autumndb-36556a9325d97fca80f8839e0f645c811f25b5c7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"51063602b777c125d8f72e6a197d4686c634560d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.12-joshbwlng-bump-autumndb-36556a9325d97fca80f8839e0f645c811f25b5c7.tgz","fileCount":34,"integrity":"sha512-nERjFmFb/b40siMa1E4RhFcnoFDPXH6Q4BYRIss4Lq5NpV/xiZfZ0MvIyfPg7t2SmLP5QqIrTTx0tT2+6xLFyg==","signatures":[{"sig":"MEUCIHK2SfD3kbB/d343BRj32ihFAcyk2uS7Mf63aGK3WM+vAiEAojFDoJMVi5OJqgcGK4JbjKY3ZRWOW3Qq0Sdiq/i5SbU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNA3YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMhRAAhIOITfu+gW8rD75IBfpfHebL/lWqzPkpNPhMKroyZOqzx1Ql\r\n8nIKge5ATBl3Epj4cf4/33JnUgZoQie+hwpgGlxZluATyzug5JCYZUltQ7Y3\r\nJ/ZYIp9GSqMANNI3LNRTKvPG9JsdxbtyKIUgiWqGsSoh7PwQCiYLraACOvf7\r\npjHvfwwFI3bRoZ8vvPCW3yf1dU4x/6wC/cbplEAiJ3C7kgtzM+23bQJV94KE\r\nnIhWUJQO74EuEL1EVj7e+GlwyBv01lRtdVkGVOf5na6+neZSgil+GohjDInR\r\nVjjDlFonTkHWjyA4mLExrF9E2DYABvsiSABHaXuIT1A/XLtVchij1khXQOjT\r\n7Ac88enMWhrp15/Qzz64QXIrWcyNOKdZ0b+teS86jnOvFXuLRPd67zu3ygKS\r\n9xQ7tKuMG9SvfqR4ZcMSuJz4qtmIk4pA5sESftttoSpQS+4p9Fr3uvcZvzef\r\n7LJYcPAef75c6woi9gpl9lq+xUC+D11v38caijL4nmYoCJiBk6HlwUG/e2vl\r\nJNJG0QGznXyKTxH8RefBmGEE+JtUuqLNs867dsKgUxik9wvxHGe9VIlaphaJ\r\n/gvx6yhXjDWra+TJhmPa/jF8X+XzWq3uS84PscN+DsI/gn3Mzk1rjQm2NvJc\r\n8qR2ADSF7IkF8og8RPO5sDDQOQZlzIK+6Q0=\r\n=ZJ5a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"36556a9325d97fca80f8839e0f645c811f25b5c7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-18T04:39:54.005Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.12-joshbwlng-bump-autumndb-36556a9325d97fca80f8839e0f645c811f25b5c7_1647578584609_0.8321289785041637","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.12":{"name":"@balena/jellyfish-client-sdk","version":"10.1.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.12","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bfd73cfc98820bc4107299530c36b954054e42e4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.12.tgz","fileCount":34,"integrity":"sha512-E2gPAmSXqkFD89yS/p/VszcbZcDeyp+TJQ3Po9COGNktXMZaCosGSAVHQiMFQpcG/5ZFP28e3KbPtlBFvvI4JQ==","signatures":[{"sig":"MEQCIEmX3sR5ypp0TJPmylnlqj1Mvd+io2JC1GJRD/dPOU7EAiAod1YXxjAqt7hwzT+QVS1egpWBPDWGGu8E52U83LYkVg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":284932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNA6dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXqQ//SHAh91DIIcnxN/s+I5YY2hNQk5XvLIsIUhRpcv0wGPbZwiKT\r\nnfSlg+BCgBAqvOMJgd73LIFFjmA4OB+Eu+nqj1hqSuYlhspFZu/omXvY87G5\r\nkR91s7zoOPTy9lT/FYqx1YUC/r2pXdOgxBlAMbgjtIdsDUeCdZVp4VLK6MYx\r\nbODpD6MfpWjFZG+YeWaorWF1QiSS/mJuPO/YJsyznacXiiAP2BVQ0Xzf51FO\r\nC4xOri21naW/qfWF0Rlg5zKZaZ2SGsnOU52AHYkhZpp5gSaAoyp27o0IvWb8\r\nP/xkbidmUi/K58H4S8g0euJ+USsDUba4Gc+pMwN5AavxzLFtXZO9vDvsreVw\r\nshlD4IEJ9rJdLoJmY1L7jOfjHdqM7gcZY61dV2CrfL55YSgNuJCaQFt2ve9g\r\nU4jMEUwKxQjnD3XPusv+8CSJtuifIMVD5wlb7wNJANdgB9IwnouRy+6vs2CN\r\nr1gZRsEeERpExJBrp6emid1c2wLeuHPSnOw02cfSCSx0LkwD9zSf9IfADiW/\r\noH+fDVydW/67uongsultuGIXjjfnhIOwbpgcQgxLUv4csctqWPffyfDf+zp7\r\n12xkbek5IRAgILVPHC9QBATKqIBIspYYz8VKI3O2bQl9Yn9QdPMzFTpVZJwE\r\njxct4EBPuoYDNNXgfcWepbdt1S2fr8ZaWDM=\r\n=Za/s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"307efbc447f9ae3fa9f3ab55ffa71df474798415","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-18T04:44:18.605Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.5","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.179","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.12_1647578781726_0.8347021432676522","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.13-renovate-external-non-major-259a51aeade87e36729eec5e041ec88914dac012":{"name":"@balena/jellyfish-client-sdk","version":"10.1.13-renovate-external-non-major-259a51aeade87e36729eec5e041ec88914dac012","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.13-renovate-external-non-major-259a51aeade87e36729eec5e041ec88914dac012","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8a197e6edb1cf907938b4d1d3caa4043a85db134","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.13-renovate-external-non-major-259a51aeade87e36729eec5e041ec88914dac012.tgz","fileCount":34,"integrity":"sha512-Dj8ApYlzGRGW2MhyRcKoOaV+xsvwSt3SsEqVbu/eqyNmf+5tEfrQCMh9E2g2++41GYOIle7kK1uYT3Ke5w1lKw==","signatures":[{"sig":"MEQCIAYA+inrZfp/u2MHxessw5qhYpZrPbQRxjxzuu0G48EMAiA1+ZPon/6v0QbOEbio3RQDvAGvNDISr3uNKIgiRGdfzA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNVvgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0gw/9FmcQ97UHzLNcTIA1T/GU0jg015L22ddTsxrny9Vd+bRo2BOI\r\nYpBmIr/6YAv4AoWEL+hqp6sDW8ZFfzCsM94Ro30G6V6sGqPxO7kmYKw6SKsE\r\nucDXliv80tHOsTy+bGwn/ibNyoE6VnTkBxAw+99ObyyjnmabJMCUa+fPXjpF\r\nBI8qBUlRsri6iavHQVP3iwk+qH2C/JBlxtJKvSu7OUXO/TRB7car2CnQYJDT\r\nsTmp6WmvXOTF+xtalcwlkqBjVepTWIKnuHXZFsUOdeQIn54n/oethMhNVjba\r\nSH27QUKsd5sCQ8lYLl8+bR/ebyyh68p5egyM/pEifdAnH2luqAPsB2CgTiqy\r\nWqFizamUl7HeNY1tb7J0sPU4ReIqcBN6H8DS3oNTb2zYPYPURNNWF2MXiARP\r\n5t+wDOMfmrhtV/CdgHPHXeT9kIuDkcd5+EMfY6b8+ujYyTvsZTd/PhqRMvsE\r\n0aBb+J+chM4nr9QRCCY5itzLvz89oAm/nV/2buJcQiHavTKvN7BV/4iES4s/\r\n1C2vyylCxH8bycmDnlngywwfUst38XwgCvnT/ByD0eDYaR22x1IGdXOzdd6i\r\nUDloFP44BJeA2jVIb1bv5JZjFcM7vWusKqtPvPgrQ/lAvCH5bZW2xmxmgRvn\r\nSJED84JjNfugxh7R3a8rQcDBXd3962b/hVg=\r\n=n6dC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"259a51aeade87e36729eec5e041ec88914dac012","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-19T04:24:40.916Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.13-renovate-external-non-major-259a51aeade87e36729eec5e041ec88914dac012_1647664096742_0.7853020964235635","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.13":{"name":"@balena/jellyfish-client-sdk","version":"10.1.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.13","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"283b4d1976856601c41805a3fcb58aef0acd77cf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.13.tgz","fileCount":34,"integrity":"sha512-wkHBKAe+gdsbVYfxRtCa0bZcZul4k2dH/Krje7l5JGVDxoDI0gXbL8lUZGS7FRMwMVB1QLQqPJ5nrMlBoD0R8A==","signatures":[{"sig":"MEUCIGFcv/yRP2zjuYwOjoiNicqX/umMRrojqtDwbuFT96wvAiEAu8DTiL47pIDX98wtkLKgEPjPnng9wgOntjfm9URfxJM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNVzWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqB9w/+PCfWa+Oe5z7hWWGugXbmqW0Gb9aCtG3wpydj6mf3FVPlZV1r\r\nIZN/jE8Qq+0msCzmAeFG30K+7lT9l6jx0AU+MVsyjLlNMi5GItNtBVa6pxLb\r\n/1zCU6kZbtLZieV6n90/H4flsH+pAc2NBao34gQVSQz2FFvFvawK7I1JsQnB\r\ngLnBdBvwyjhITFGs/x4WExOSorCyKIoi9HsTK2EQyGWf3FGrOS3PsVSUdAUN\r\n6JNjH7/7cbuh0Lt5/WRMEm5I1MpF8YnWMuPGucXxxj1/FWp5E/LnGqjwAcpo\r\n8LpUM9NUHQikyiWuXz0avVlocAgTIYyi19tV9Hi1YZT9GsHOH3q+Tk0IKeR8\r\nO1hkfK3HXRA6y8jZcwIe38yyJjNCIPWVR0KAemPdVgH5O2gTgyzwDhqW1taV\r\ni6chjtCNlui0FceBQy+W6tei6KMNtPcFF1wlIbkaHKbgTWXE8eSpJjgVBQ7C\r\na7iZAT/paTLjQJ4XlldzhyWhCoZ9e+7khpBXELJrqbJ3YZpA0v6XpI8Yollx\r\nP7AcRo2vHvtxtQ+uxWCiJZ/Z8Z/KJ6MOqblDCqv7H/dETbriDYhiqtT18yHS\r\nfyuKdfbcivJz13NBn9Wd+YGWdw6S5Qt49qNjMFWOrYnzDYOzd+nmwGT7vSCX\r\nRYAlJ6tHn0pVebVTTgg8/I59QCls5z/jnvs=\r\n=5mHe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f4472e817dff3eddf3cd3dca1fb637a0d98fcf7f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-19T04:30:27.963Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.13_1647664341986_0.2671239787915449","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.0-joshbwlng-incident-post-mortem-6bb43a56f4047a1244b28256af9bddc6198867c2":{"name":"@balena/jellyfish-client-sdk","version":"10.2.0-joshbwlng-incident-post-mortem-6bb43a56f4047a1244b28256af9bddc6198867c2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.0-joshbwlng-incident-post-mortem-6bb43a56f4047a1244b28256af9bddc6198867c2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"582cf8d71f1a5c6129969de876ddebe917891cfa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.0-joshbwlng-incident-post-mortem-6bb43a56f4047a1244b28256af9bddc6198867c2.tgz","fileCount":34,"integrity":"sha512-qJScQSokipTzerw8d/+aoIaCjSyw4GEm3pYHIA5RGjuyflLaL/n1BfIS7g8JkdtxvrsjiFzv6VrY+RgJm2xwzQ==","signatures":[{"sig":"MEQCIFCDfrR5En0FEWknFUGHCMmYZVeGCKLMygcpLX6vzqluAiADTpc9jbVkcJRtJ6CUvkiKtsS5Rp3sUwgKDskfqSFRsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOUD5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPTBAAg1KoHEhYbvRb//uEYcDbShKUzymEtKYfcUJ29okIVOqEgKOw\r\nPltJC07CeUbqOHDkfuhoW77p4YBBRcBEY66nuknYK9tUa9LaOgZjJYemI6tG\r\n+LXVzvRTfVEQwOPDnOBVVL7VcaWR2zpRAkW3TgSneChaX79BRsaWR10YdUA4\r\nLn5AsX2ul7G+7Z+wLx77RUC57TPjUE9b8KbNd8oSvDRehd3m3wBJK+mbX2QT\r\n0KN7bqcTvoZNSRx9Sj+2X5rAxvZUr7Rc09kqJc92uFVFWUvBmKfuiwhrElmR\r\n6CJaTYSF7LlANF4T66BDbO8dPPLFMlnVpNlsfIGtTOcRuty/rAnUooeXrlTt\r\n+jmreGD7FZyMkcykLHZvOTlLPAFwSnt+mCTByAeBgk0w4fiIQt/9VbHiOW//\r\nb72Fw/XwAtoBql/LnGisaNIy00Jq0R6P1wpenSO+O9C3tYvXuDs519S6Ff5J\r\nRefMXgS2zsT4Rb/8QgeHX+372ECZFvmyLTkGXKKHCysAKleeLWdw+gYG/CLP\r\n1JTO57SkN97Y7OcXKqclI/nq0n90ECbrJWQzmzCFIJ4741QXvJdaVISc0nFF\r\ngZoKRfO3g0OTr9nSqGTAt+stQrQ9NuX9NDeSQPpwvMaNBtmJVAYbGAnGIKNg\r\nio8I4ZFUlkcftZOQPUvrv7WVdSfpO6ZFPu8=\r\n=I3/m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6bb43a56f4047a1244b28256af9bddc6198867c2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-22T03:19:21.295Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.0-joshbwlng-incident-post-mortem-6bb43a56f4047a1244b28256af9bddc6198867c2_1647919353074_0.7685356588706829","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.14-joshbwlng-update-repo-yml-4214684f2d2b2dbdc28565616df614fda5e36b2a":{"name":"@balena/jellyfish-client-sdk","version":"10.1.14-joshbwlng-update-repo-yml-4214684f2d2b2dbdc28565616df614fda5e36b2a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.14-joshbwlng-update-repo-yml-4214684f2d2b2dbdc28565616df614fda5e36b2a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b7fb7bb06649c89a0974cd06628d9489cf99723e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.14-joshbwlng-update-repo-yml-4214684f2d2b2dbdc28565616df614fda5e36b2a.tgz","fileCount":34,"integrity":"sha512-oQzOewJNdbGeda2lGnvg2NKc4+8ueTZDFNIYeEyQewJFRdRpJL/i9i2V7BnsnkFV9of0yW9BZHIYu4/9oC9jkg==","signatures":[{"sig":"MEYCIQCBWAfwFQWZBLIe5y9GBTgMoJohRsggO367kIT8yiysGwIhANAjxpEh979aNBDsdXnz2L6ijsgpNirpZdIeOGqTYuMj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOVK3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJ1BAAnoPcd2FHTy8eezknhkl5MccAqDZeA9X5oDb4mIFEAdooNG5l\r\nku7L+igYJUNYrPV4zHsq2WADbqaUUUGetrclF/gG8NZLOLTAS5zTIldUgRxT\r\nesuH5q1ly/NAjY88BnapfvZ2cD7Aoc6SgiqPz89L5nq+cCo6oVhBrM5pFye+\r\npCC4+yQBcTE4d6dh5LJzJyu/8ix1SAclqkj9eoy2G99uXaC/kAbHAVbxq71i\r\nNrlkzyXq2O8C+iCGoT4tC7SAAA+HXZv7IpI0QUmrngFtWq7RCdAEUZfM5FFU\r\ngFc0kCp0saokXNJDrI3gGUBzvALxmEsMt3y7JwLlU2a2NqjXBTge5mTzKq39\r\n+3PIMAM49GOAECUDkyItQcIhd8TcxXKSwF0byPfotjSBrCT314IQsSAI28C8\r\nmf/mzpZPmxfUliksuB4VexlcDJHAq6soNLSYTVmkO/urMduX19dnwshtt8Je\r\nvHVaV5wrEbWFrM6aX3noCB1Meo72lbMVGOrxcFmqVE9khGk1NqvaBYmSQ1p9\r\n/hy/Q6tavXh3CPKynZfSlwgi3w6RpIISIKwZvqlxHQvsr3E8EyyEz/SF6EZI\r\nR3m7ZUKosHql2W3RZ9kji2QYOOA57Pn/Y3YA7dQwyID0oIk8OJwEGASo4ICg\r\nRLlYBJHWqwZUNEH0mPwMYaBtEzfYodiUnpU=\r\n=WSsm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4214684f2d2b2dbdc28565616df614fda5e36b2a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-22T04:35:12.306Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.14-joshbwlng-update-repo-yml-4214684f2d2b2dbdc28565616df614fda5e36b2a_1647923895404_0.3997418638662267","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.1.14":{"name":"@balena/jellyfish-client-sdk","version":"10.1.14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.1.14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0d23cfa7f01462c3356138f46a793326096cefac","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.1.14.tgz","fileCount":34,"integrity":"sha512-k7Z81lUGvzedSLuJPUUJPLLU3FFzmUR0VbxEUzeBCYFyntxXqRJTaFKv0g0orI2PLUG9vVzJ7nb/gHkOPlUfXQ==","signatures":[{"sig":"MEYCIQCAC7GS/4SDdozSOXt7QzS5QgRiUya0cf+LGs8FiOdzQgIhAKiANKkO+tY7692CmFVo+9YeSyAkY9RuWnAOov5boIXL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":285073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOVPDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLWA//YFqAH/9cnQPS+SqglihWSP/IRYg1mlgS5fRoz9Gp4mKVBLzq\r\nvajwACPNzfUZILMtPZXcjUnnzwM+TJE1+S6/vlIjUYzh9vrq4QTD5yQHB9o/\r\n+1VSXNyqXaJnM8w5zItbibDMVF9liuHjeOwlnhsRozrxDhhnqKjE9AJazw8n\r\n+biKhEt/bY1m6CzjWFiUq5somz8ovJLlAWJuxeVJcL68MvDzV9kX0jmfzh8U\r\n2I29Jty4ByLzw+A2KEFqLiAQ1Ht3kOG7ryFCPMNRlRRrwcWzKlD3UpZ+GAnc\r\nd685+KshPBKylrk9k+ZUimPKTofnU0JYAApUihP5oFImZdeUbpbv6eH60jfs\r\nVt/u++IVZHCoclAs9Zf2LuzK2rBaSttTaK0NMssa38H/zQh85W9Jaj5ADbK8\r\nvPQzgCweg+cz8EMM1CHQ7q4/ps3KViw/an23LvW0cYZ5mbw7SmpC0mGhwKkv\r\nMcZSj1xbONggYBdYkvGj2RJKZwNIF++Vmu+E+pCtJ3pTKbXdHEo7niDomHGi\r\nBvuKLh+llUuskCBsVNjvKCCkbKTYVkztB3b9LpqQ8JSYTVSKGRehPt9mySrR\r\nkieaPDULeGZi6xX+sv5jKE0OPJZE5RN/Opk1Fx8MZ/pdCGCsntcNpwhg27nN\r\nEvXPcrkvSrWr+t6zuMiBwWdM1hPblS796AQ=\r\n=op2m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"49d015c4aa153d3319670b319302d4ff6ca832a6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-22T04:40:20.733Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.1.14_1647924163617_0.3033755132831959","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.0-lucianbuzzo-product-relationship-bc36df545b85dadb08d2d60026dc0a5fd5f70e9b":{"name":"@balena/jellyfish-client-sdk","version":"10.2.0-lucianbuzzo-product-relationship-bc36df545b85dadb08d2d60026dc0a5fd5f70e9b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.0-lucianbuzzo-product-relationship-bc36df545b85dadb08d2d60026dc0a5fd5f70e9b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b09dc1a48cb00e2f25f05bedc31ea67738b75442","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.0-lucianbuzzo-product-relationship-bc36df545b85dadb08d2d60026dc0a5fd5f70e9b.tgz","fileCount":34,"integrity":"sha512-PdMHMptXjhv8pmi2ADBX40K1/enyaStOXtl3QF76yoG+GsQ48EQ6nT68s3+2uRCNDA9mDDT+B4dqXjlXpIPQkg==","signatures":[{"sig":"MEYCIQC15q99O9VKMOqKeEgwv9jPQse94DyEf7P66inIttHUfQIhAMk2tN5tchxU5UXHb78gMJ6zOyDZc4mDEX1Qt9hnAm1t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPsiGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr1kQ//Rv+PqN/XbLlJIwJm5lQtI6St20xLUkO5p1K2/bzYj8Qi0Ej6\r\nAUXAPiEgQ3ffSPytBAtIpyXVCg2ZeDnmAnTHQIBuZJ8isGXo2Fog1CnL/Gsx\r\n8O4enUADV9rt4k4HPhA13kgoRHEpoBDbpWem22SJtfqiqlI+4VBTaWN/aRLj\r\nOka9XYuHzqXfSnUKqm+s9f2Ab56FHE9gplIEGTySJ8kJfWLwCM3H1609g7h1\r\nejexXG+/PaoWwEIx8GlSca1S/OILzhfl5TaUpg3CAv8xAU1SyMo9xZgMxld0\r\no2H6EKzT7376qm+t4tj/sIe5C5ESRDCosMQO86NYahVEjpYR2Q98OB33FwPl\r\nFIj3c1qS4PAGfvCd0UzjABBZde2KDv6Sb8/wOL1y4ZUbbu6F4DRNiltygBSm\r\nB69vqMLhD0GOQQKTz1+viWhVpnzqOAXU2DO88yTqd2kgQLdGcWVxc6ZdnYEj\r\nx3QkbgRBqJFXbW7EBJTIG+NUO/4AJFTLqq+qdu3MfxgajXeSIsE31/U91JYP\r\ncbJclv8vBHrk7lbCUh2dLlbouJnSCAmXNutAaCB+X/FHFbPufC9b/jsuUgQx\r\nwqBc3WXhjhn8c8GvR6pZ610obf9zrwR8Y6QeFFvjS1lgDmTHZulPmbnFI5ax\r\nBT8xgC+2k/uRuxIbtz3VFALqjjwi4F+2SBs=\r\n=YeMo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bc36df545b85dadb08d2d60026dc0a5fd5f70e9b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T07:59:42.006Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.0-lucianbuzzo-product-relationship-bc36df545b85dadb08d2d60026dc0a5fd5f70e9b_1648281733835_0.8083822102060407","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.0":{"name":"@balena/jellyfish-client-sdk","version":"10.2.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"32ec412fb7bbf8244c34530124408af9c593cac3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.0.tgz","fileCount":34,"integrity":"sha512-cGxBl0dDqQCq5zJfx1jVcownLq5MKvXTofOb0xxE1ZkJrbm/JHFRcurMsU9lkZt+uKJ+AbkST5rdckm55mmrOA==","signatures":[{"sig":"MEUCIGi2Jk7Y1Wzt6CNbonRL0RXARiIUwXqJI0BbQqsayVmnAiEAmmPjCEthXY2HC4Sq+n23i7fW0PN6svDMul6g84vLp8I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPsk+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqw1hAAgZsMqs6x/egRm5in5W3vSe/gDZCjYG3DLvjnSlJNtOFeTISA\r\nweE4w923X4VLRlJUPl34/9qS7z7KCHY8zUf9hqgAdwedYYIKpnROFWvEAeDM\r\nb6ifR2R5oIxEAZCSP0OF/n/3T7kYOKmEHybFZZ5TdP7Bq1u4gWkSpFE7zkow\r\nbSca8fkaamCGGrC1+eDaCCeoARzUFPl0fQ5BkWeyu7kD1lY7ouO3zbxcDQcd\r\n50usvhgHd2F5PDi4UA7Z2lMokh2pMY5CEbRm/LKsJ/t5W8kj6NgckOBETSjy\r\nYPI+mWy5QjzGJWEm6yPuINPnskng3raJYArlhKZUeJx8SklSqzkr9myzD4jG\r\n4n6sz5yXFRQcg4oEVnMFwZutwj8ylJscit69sruPa6YBif8m8/2GofnZA+2K\r\ns8qx96UmAJT0g3evHin0WbxrynBhBuYu3TtLiIwhTCYm1RlLZhKUwoL5mJcS\r\nZTzXEx6ipJDaO1+XEx9RIS59wwWoBTYKrP0TJzeSQ2LwO9QwBfNWZfjUdxL+\r\nq7+IiNGROJdQt7zJC/kVrMT6bv5QXw2o6LAbpwDkhKFfjL2OIFoog/AgOLQD\r\ngNP5C1bwOZ3R8TBxzf+TQsUYhTkw9NgqHU+8q+BH/VvDyZgaUkKQ5M8u9uta\r\n61SQBLVaVKKn1OnjPtu3RoO8Ts22qv0z9i8=\r\n=Ad5E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"369cb30b017abbb5a0f6cc746e04f12c98c61b9b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:03:15.040Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.0_1648281918471_0.5298145693886314","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.1-renovate-typescript-4-x-90ca16b9f7ad1ea4da6913d9e942a680c3f59aa6":{"name":"@balena/jellyfish-client-sdk","version":"10.2.1-renovate-typescript-4-x-90ca16b9f7ad1ea4da6913d9e942a680c3f59aa6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.1-renovate-typescript-4-x-90ca16b9f7ad1ea4da6913d9e942a680c3f59aa6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"25a2c18cfd30027aac1eb9d1c04d9bc698cdb960","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.1-renovate-typescript-4-x-90ca16b9f7ad1ea4da6913d9e942a680c3f59aa6.tgz","fileCount":34,"integrity":"sha512-P6dIGlBvFJnHf4/wlmWsye/L1gvpgvO3s+VEbAbpTVZ5EC4NSG8eWA86A+CRwV/B4s77PSDNX/semKbq83BjlQ==","signatures":[{"sig":"MEQCIFP3KjOrkYfwHxVv7vNoyhaQnsYOIepIGVtGOYp1utw3AiAzn+mNnjf2cffsBZSzXLjMCMjiyIWThjqftUr7kb9GRg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPspNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVZQ/+Ne8ukRIsxGZ8hb+7rHIoNRCb4bCjfG51msV4Zdr0L9pu+VaW\r\nr1I6pIHTjCbevcSmnnCOlctFyShsrnmsEWEBaS3yfjSG1Uo4ghdCr50DTQy4\r\nO4szmBSRzK+5jRZQ8k8223vilfaL9yQdddftWbFEkjfED4mhc3xrfr3EKkZI\r\npgyK2KSN+cyGlwthlohZB8dqvFNlYDo3QiTkkG5tq158ukwmoQyXUwuDGOPy\r\na7Q+ngZ44ZFYPMs5j5cmb1ZW043dl/D6LRwHPdlVNDBBi5Hgj0JGOP6s8SZT\r\nAdbfr2jlHVpjGALBIXNTBu5nvGHL4iCxu72mN+qH1gZGxkXlp3hC7xJBBK6G\r\n6loyCEKpjkNELUD6cxKN4dacg1vwLcmFd59dn4A73GVq0+C+x38+GrIerma8\r\nyTA0cSz5XoshCHdte5YUxQLkhVPL00QAU24xD32QFXdjYE6E0DqWIYxdPi3L\r\ngMMeqMVr6svGco4TKVV28yUMGLgnxFHsCVCwr+rxqLKtgpGsRyTCT+19r0A2\r\n0KpOnw2FeDqfAeNU7aTpum1yBczDg/XOPOOHyp/hYbD/x4xwEzPZsG3ch8/4\r\n496RSWcl07PnFMDEwuCbhEtHT9MFYJ5laGWuPqfnJq+Rw6SXf1v0HnyP7Efv\r\ncDcr9T/W1NphdtyfW84UuB1LD0PUrC4BdoI=\r\n=ctVy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"90ca16b9f7ad1ea4da6913d9e942a680c3f59aa6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:06:52.085Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.0.0","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.1-renovate-typescript-4-x-90ca16b9f7ad1ea4da6913d9e942a680c3f59aa6_1648282188919_0.2951858362764268","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.1-renovate-autumndb-19-x-85455e0034454c5970c8b136cf8fdd4ac19934ea":{"name":"@balena/jellyfish-client-sdk","version":"10.2.1-renovate-autumndb-19-x-85455e0034454c5970c8b136cf8fdd4ac19934ea","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.1-renovate-autumndb-19-x-85455e0034454c5970c8b136cf8fdd4ac19934ea","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"61810642e91b6aa819d7a4cc31509f2651652628","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.1-renovate-autumndb-19-x-85455e0034454c5970c8b136cf8fdd4ac19934ea.tgz","fileCount":34,"integrity":"sha512-soBn5fHAQWMYWwk0JmjWlSRqPx4tLGqdADtHhMB5lNL1oFlFeRoOJdWE6A9x9Kuw+kjrrEBd3OLPGpRQDdQRvA==","signatures":[{"sig":"MEYCIQCFiO96dvlMf5Qn4/zmT64Iww5I1QuT555fBT+1WRR0gAIhAIagUQoAQVTecx5MGJ/PQfRVWqeR4DLT0s07Vns0x30H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPspdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrz7w//e9lI3k1Emt9F8UNSA9J7/9Fe2xLqXOt52mlxe7sxX8yB7/4B\r\nULgJ5Pr7B+QTiHsPA+F4gsBwzE/+NlhTIgyvigr8U4fWhiHV/ZFhCpPcNXx5\r\nKSb+sT/MN2TUpiJ8Lt4d4PT6huuGuO3xXwpAsdt8oNJr/GwmC+LjawRHsw0I\r\niz4zVBuqIgjfKuAzK7sYzWwPXSeFIKnu4YJX8tuFagZ/V0CBbK1SftjaVWVH\r\nzLnG+e+ykghlfK8il+Emvb2CmwQDy2u5sOLXl2Olm5VvNyZdKYsW5qbeIUFH\r\nXXE0KeocRNUzs9SCsx4MaCbVmCAL3kXm054xCScxwxMkRXaLUajRnJKPrmdU\r\nlSON4C60us9CAh3pUYtSquEWd/GrgRhY5HCoIEddUTJKDWjRjHxAfAJPKuba\r\nnQYvXJZXCgZJgWMP8hMi9IlIljKTdYGdtaTeeELgGVnKVPtbWd16X2BUNvXy\r\nu0q1OGB2t9o/nxxSQVXmnTovn5P3xyC/lc+2uVpn27NQZCW9VSH8bIKSPQhC\r\nzE5y5TMX9B8wW7i24BrTEx3wCOWr3CaPoOvGsuV3SgzNGmePHNSoCPDhJcox\r\nL58NlDKzz3e9TgrrWsvUpGscmFaGsWhfj6F39OmXVA6nB1EhfKfFKhO80cw2\r\nS0x6sCWv1aC6NVyZy/qSPDuJiwDFtzYWZNo=\r\n=OljY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"85455e0034454c5970c8b136cf8fdd4ac19934ea","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:06:58.734Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.1-renovate-autumndb-19-x-85455e0034454c5970c8b136cf8fdd4ac19934ea_1648282205354_0.017841290769785578","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.1":{"name":"@balena/jellyfish-client-sdk","version":"10.2.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e8dcb010652aef21bf8ce34f004f27d4ac4decf3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.1.tgz","fileCount":34,"integrity":"sha512-4gl1DJ9TzfG/c+snSeGKBgOmcBJzzrnP7T8sgEq8AE5bpIl8P4kVmF6Q+HTkrEOlN+u1xP8VMmm8yl3Z7RxoiQ==","signatures":[{"sig":"MEUCID3ddnGiAEUmoJSFEfprR2SbLtIdICrZCvwkczRd632gAiEAs0XinON0a3OwCf1yCZ+iuKRoEnoNHZiAdh7TMaBaBII=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPtK0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEpBAAk0FT4AaV6DI/PJQ+nrnLXbpEu4uexwpy44w+NXoRffTGrpDJ\r\noFWTTwdqRHpkb1c1+73KW6cn2GMfHLjXuMD82i3Pwme0orXXIlmpXjN8/j+S\r\nQ+D16+VQLRuw+rDInJOrqUl7p0PpCSiLujn50Vyhm5jy+KiKQX+wLWHenO+r\r\ncrO2GsYxk+pIBHRbU4bGpxNktfk/pNj05JrXVhKOXjtc7x/5NKfFl+H6pmpF\r\nJHJtb6WqjN5lFeUbun1CDB6yiU9umZfsbcxH1U0YDa9aZwWtmOitgkQr2aD1\r\nK0RAczxFes8vQZq9IHx7y6VOJGUm0uJnSN6nB30vEDPoND1cZ2mteIx3A4U0\r\ni77SVzash/4537J7y56koOaLp/rxn3y4ABEcws78oHTA2B0kANEqkGmBMtQI\r\nqOaSES42uL7P8tGcRJIdZuzhAdjy7guDe3+K44OC8Yoy2qxrxPfZSlIFeV8N\r\nJLRSGmSK3dy9YQ25eGyqde8DzgYEU5IhhjfPnYfwyhj2Jxmhtn2ee71OY3Fc\r\nD4mafiuYkDcve6s/eMjkv77cr/ZyFo76d7MNenFyuD++e5L+uBEBTAz9jjkZ\r\nLhBN5D5X/z6IAUiP+fpcb2ranvKhVngC4t1adJPHM9C72R0eA9Zerdxcvn/3\r\nazBLUczudDjclMPlqiPIOW9Tw6WYezp1650=\r\n=t+8l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"25d85184558e070056a8f5fce4d7cee7ae08a5b8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:43:37.231Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.1_1648284340072_0.6449101673598807","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.2-renovate-external-non-major-c2e4c38ff25396b5a66953035d7166ac4cdef994":{"name":"@balena/jellyfish-client-sdk","version":"10.2.2-renovate-external-non-major-c2e4c38ff25396b5a66953035d7166ac4cdef994","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.2-renovate-external-non-major-c2e4c38ff25396b5a66953035d7166ac4cdef994","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5c296c8733e705cedfc02bc0171b4a658222ad64","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.2-renovate-external-non-major-c2e4c38ff25396b5a66953035d7166ac4cdef994.tgz","fileCount":34,"integrity":"sha512-LtJjeivO61we+jToCZYGTL5+dgxjFmaR1DBV2AC2muQTO5myT9pJBm0a0rqnQ/5yIuqd1LnaeQCzHFsvNs/tjg==","signatures":[{"sig":"MEUCIQDVRtearYB1/ddDyfcznjGsKdVDNaOuIdNkap0tWJAa1AIgDcbMiCqIpz+ZqY/XMO0xsC2aHI5ZjgVWkaKVIJxIJS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPtN2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAXA/+KFnwBF8SpNPnUu6DbmM+eSUXnh9a70RfNY8jlwh2DbLpwTA1\r\nbyUHaU667/o0R5fsl6c+d8iKvfYEZbVpYeF8KjJgoGPaXRghRA4h93k+jf5V\r\n1LWL8Ym/0EEM/iTAEjTkzhYHWSutPiL2YEvsDOC48jWW3NeGrXvIOLaPlvF3\r\npndFHxDU+FhE+VVzkRh3hTlLE4wep08zdwI1VDlOMlEUSIEPz2zOxEZtq1mE\r\nWKxVZnf1iHirTkJcVXCcYxzexa2R7AOiEq1lzq0Dl+LYcnHjrxBqexmlgeFt\r\nazXn+l+UnoFvMFzlV/3LnXctuQJSKmt5N8QpIOL8GsiMhrU5romMyeUOW/5J\r\n38wDr6K/cAJrogaJS8EJ1pPqHx5u/uWTpMyBek0BbEQUgDDpaeq3rc5C7WHD\r\nARHjvNwAUMj/hVgJOuUuV10PWm1IJZFDPxoMkCINwf7oE9uoq9jRpXeq0b1G\r\nG+yULnRYCzAE1TchftbOx38pfRRfxw7uPmwDyX/5eHY2IKNcilXNRhWKEUUK\r\npuds6xaIKWIJHjemNnhFIPr9H0rZc/vSFBBAOJSwMn1adCAayNIayGvOoObJ\r\nZ1rvS8PWsqs5vZnZreEvxbpD/m7RMOaKu73M9Ua6K8t4p1+qxTYUMCePHKHZ\r\nuL4sPeXrT2plJfnJc+ezcvMQAzlm7opYqag=\r\n=FprT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c2e4c38ff25396b5a66953035d7166ac4cdef994","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:45:37.912Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.2-renovate-external-non-major-c2e4c38ff25396b5a66953035d7166ac4cdef994_1648284534831_0.15801475617323923","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.2-renovate-typescript-4-x-bfe7e324c33c2041615a70d47329403901729a3e":{"name":"@balena/jellyfish-client-sdk","version":"10.2.2-renovate-typescript-4-x-bfe7e324c33c2041615a70d47329403901729a3e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.2-renovate-typescript-4-x-bfe7e324c33c2041615a70d47329403901729a3e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0fdd997244143a768be69c9f9e5650858d66cd60","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.2-renovate-typescript-4-x-bfe7e324c33c2041615a70d47329403901729a3e.tgz","fileCount":34,"integrity":"sha512-30rQDEY0KlUITaU9L7DgNKGdH5CFvLIeG62bOMysAHl/O3k+wYh9ScbR/5GBxWZJKF0P5n/GQIi1M79sFmMITw==","signatures":[{"sig":"MEQCIDog75KH9kAX/JpWF/OCLM5l3z9r4X7mJFEZ54LwWwEdAiAPhE4umG0uyck0pkIAT1Ni+7d5uma+8aazhZu/5SAOZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPtOGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDMQ//S8TASVLeM+VPnvu5Ftl5zHZjdU7LWyssAZVjmpnpIEzvGwms\r\neSHXWQn4lR+kimGu7FWSaejuoV4k5eHWP0+BuveI6yiGPfNxNKqlVqUJmt3Y\r\nuxsWIHLZCIxZSJd3x/qu/F7lM37qHR88kNylulO5SPOeFfczzaEVa8beCBlP\r\n41HMRrgaYKFe1OcnD0+HN8zlxe7qjcaT9OuFsNB8e0YBrI8PbtRyGabhEYQY\r\ngAAZ2/GuOca8DmxCdufWWu45YYkfZlIiTHFsgCnrXsz3XambxGnV13SNl/mn\r\nlBGkhXZcvbVEuTOHjkw40e7OftEQOaTB0PSDG6RTBGqyRzZFEFjrmBU3i53o\r\n15rH6Py8oSQTR6s/+eLNlJ62wmGYltpHFq5bRXhGMFgDzCIQBVQhbZzjR6NL\r\ndNQYvEPbpPGvw/SlucygVT5qfqKuRynjlE/ycDKYyF8UqA0xqhFbvlwjvfC0\r\nwYJiX53MacrNS5SllBhwaswTkJZELicAqCPxozQMOuQMVEThprAyjzc+R+pX\r\n2HRzBtctsRMcW55fOP3lRwe0uwOgMfGcLL7dzc8g9+SwC5FoGERmmQvDwDDx\r\n1rN7UnBHSDUU7bDhi0VYQAEg3sG0FgCOYJ+QIFXPgAuHMfrPCc4z7EVPE6Sw\r\nyr/Zs2fbKxvSwaJNBdHUBNSWcKB1HRJALuI=\r\n=TOVP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bfe7e324c33c2041615a70d47329403901729a3e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:45:41.373Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.0","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.3","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.2-renovate-typescript-4-x-bfe7e324c33c2041615a70d47329403901729a3e_1648284549987_0.8503554944122833","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.2":{"name":"@balena/jellyfish-client-sdk","version":"10.2.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dacc4415e0edeaec7d38dfa994cfea8b52cfde8b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.2.tgz","fileCount":34,"integrity":"sha512-DYGkRVzeWKssP4SJ5KGSOrHBRxmNwe5vLvCYtJNarMQVmRVO8ZMpfOjFYQUktQ/cagtFkC5kYKf52uw0B4zUrw==","signatures":[{"sig":"MEQCIDN+RSJqBYfF331ym8HpSA9cSDD8ycfjcKD5VNp4tYhaAiBMK6TWbFWbKxWkcPg1GmT1DBv7NbtNz+GTe+XmXi/iMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPtSiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr90g/9HbypX5leswHCuFpvm5ejXgNRnXRUfrdi0+yd/4zcRPfwT0tu\r\nbfqvBgcQBZ6+bxWFbSX4a35p8WCmsmeJnBkR3/gSGkYVGq2a3M1KGeN1qB/+\r\nrAx1F/SYM3hl6k7aBNFRt0lJNURj+1/SsF5elmTlf5oRgfob4jGBQoWWrLZx\r\n4v3ARH41b5YsPaPkLpks63U3ewkYGsEMIF+iMR1Xjj3imzH4NpaYuUQ2YNja\r\npInCCY4PtJDd80JNgIlLig7TBiGwmOWqyEicDd3l79thIkC2j/A4K5CS+MfQ\r\nZgafOTtiwcBJKdguY9jdzQxRePSKGRVQ+sZrCS8wg3Ff9RSTKb+xkdEU+RY6\r\nzmSo8pqw1G8yLLHndT7ENGUymH32UaUsW8+fOmhuMSz7tIBQJdEKUIXNeKVA\r\nr3QoiFzQXtP/E/76nHnqFv+d0R0cRmeEn3jjk3xxCHPoYVE42Riw+oBWNw7O\r\nnelaJrPgLCaUmnKQt2DQkR/KbfIPVUGrpm4zM4UVEaKkJ1kEn7AjZQK9lapN\r\nolS/wBagg0F2YrzRaVBF70kpUF4KFqXyIO3c/WxXOiV4Mn5JbpmbhXuLhkOE\r\nR/QcgRoKMe1shWHrwbLtSYlRHxvJlX/+h/at3i5Cn5/1baLOSWlUkvqW3QEO\r\nkPMw7L25iMT4Y33yaCl5uZGmSaITn6Qiiq4=\r\n=4EVn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"313ab73c59f0fdd6535e59ee63a69b51be739e17","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:51:57.465Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.2","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.2_1648284834744_0.49864154690732554","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.2-renovate-typescript-4-x-9dc43f381891aa4fec9e5e906d5fff178b9dd1b5":{"name":"@balena/jellyfish-client-sdk","version":"10.2.2-renovate-typescript-4-x-9dc43f381891aa4fec9e5e906d5fff178b9dd1b5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.2-renovate-typescript-4-x-9dc43f381891aa4fec9e5e906d5fff178b9dd1b5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1bc12a28599897bf026e325e943ce78a0f459d9a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.2-renovate-typescript-4-x-9dc43f381891aa4fec9e5e906d5fff178b9dd1b5.tgz","fileCount":34,"integrity":"sha512-w86PyGmmtNdWIqqUiymcnbEDrCphrHxUyeAqff9Gb/z+w/yDLnHb4H2UpjB3S58jI3jUtj8zkq65CRrIOgTo9A==","signatures":[{"sig":"MEUCIQDxGCUOxeE8F36jRrQTk5I6NW6G5J8RIm2SoAOhPzXuVQIgWFm2gf2tWmGLL53MD1TQo+lBKKIX+O3CjybtYRkZRqo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPtUqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCPg//RmtGpqqnEofRVEYULttp+tP+Z9iaDL/k/WBNNyoYs0LG5s5a\r\n/gpsYr4p4LKOf+Rh2eFrNGVeYu2rSj8WQ57WBqgZ9LBwN39juOq0QaTZWcK9\r\n4rV7i01cdakcCixmgdgstxxLiftIUNfepNY6kWiaMZNGrXUQZVdz68Eogwmn\r\nIydzG76bQB4CLjQYimlIomZ9J9C2Mg3YYGx7ZgaqcQ2s8zwMyh2be18xzLmK\r\n3/1okDsvhcR1aHxyr36EgtkfRNkhPKOrrn2eOfd3u4Gs6F/XGEZZvh0NGZo/\r\nMdTTX0Ay0bRlWBgTn9t1sm8ovxFBEVnKfIbj9Z8cpBrwHIEvP4sjhZMTXAdp\r\nt9p/7S4LksMpdklom6rAo3N0q8Vk8zI7aIwANSSTx/DqeLuuRWChJ5w0kcV7\r\nX7+H9Trilk8bUWpXN85DtXgVJdosc3v8x3T1ST3/5oHxWqjX6SU5c40GIviO\r\noFArYuXOtzG7CvTrPROuLJl9AVBSho4JmKE6t0k+gK9lOnG5Kc49oIdu0o7m\r\n31zsq99LIPxKYSLac2AqeMtGQMF7PP2voMQi+xyMMd5noLQqajd6IXy/2MbB\r\nWhTZQD+hxBBtWph8nmRvdeFc0382YA4IJFvu3fU2xYpitLyaziA9Z8JzKYsn\r\noVvBGYq0jSArwNJSzy1A/2FXYnd1se6q9mQ=\r\n=sqfP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9dc43f381891aa4fec9e5e906d5fff178b9dd1b5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:52:48.392Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.2-renovate-typescript-4-x-9dc43f381891aa4fec9e5e906d5fff178b9dd1b5_1648284970060_0.22703250657903928","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.3-renovate-typescript-4-x-108f8c9f1f0f7d1a09a5f5dfe2b15cb6b7945ae2":{"name":"@balena/jellyfish-client-sdk","version":"10.2.3-renovate-typescript-4-x-108f8c9f1f0f7d1a09a5f5dfe2b15cb6b7945ae2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.3-renovate-typescript-4-x-108f8c9f1f0f7d1a09a5f5dfe2b15cb6b7945ae2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"230c18aecac935b1a47cf78314d9aacf061e4b8f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.3-renovate-typescript-4-x-108f8c9f1f0f7d1a09a5f5dfe2b15cb6b7945ae2.tgz","fileCount":34,"integrity":"sha512-Q+v9KVrY/ByvquBe4mRxkvCH7+POb33Qk9Bf8xKc13yKfERFk+QUbO8zQbcorqTyIqjjUbKvXCKfnFf97zboGA==","signatures":[{"sig":"MEUCIQC6CCaV9YxapRHfrJNFDvH9vS5G58uDb6EZ/289A/+9CAIgVc9EDLdGCGcbK/rnqkK+sQt5PaQyNgFAYWInTF0Pm4g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPtXnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkYhAAnLwi9+rFjXOhe36wXVG7at3YTWj0Iiw2Pb9RFqCVaLEnsX/z\r\n63uLabVJ37D1rokTZX9PMNiCKtN1ZGTTyhsdSX3HRwGOABgFFp+5pQrLeJ5e\r\n20pU5MEnlkjF7i8lAqpAc4QDwA6CjdQtGdmn1928syc2n3sy+OtIhCRml9ff\r\niAMi9/KtNYbwmjfanKqZue+H0Gq++l4qeismn6EOycEzfSCYxQ6Vltc6RdI+\r\n/Iwbi7j8oXQg7lwobvEFp6hWdOHr19sGFWXKbHsnpjjY3cmCdxWWClNdbGrQ\r\nvsHTrPBmos7gOyKchhsEwc9qbybD/foxvg0qwnZVeGXQJYrky//ww4KzQN/m\r\nMlRIwrUyodZoPECmXvsbPBj0DO5XE0+OahBu/SFh+i2PzrvA4d+l+mt9BeyR\r\nAz+pTiKTEwCLPFdpcKVrHButaOqCgwcWamZhINx6yh61Zmsxx+f6IAHYB8ep\r\nRY7Nz7zq4yrpAdNoif8YlDcVi45AWvayY0wqBnTxwBnbvkFoGN0VFNqJDp2W\r\nVfe/GrSfsQaRBHmgc6rxNzZQZgpfi9i8JhoqK0iX0H9yzrYqPsi6ODwlWjDu\r\nP5mFqmEuBD01iZUE8h78JsIRk7rkRUWpa2pNnNIlExaKDEyeUpG+s5z5iKFk\r\neC29sY/Mul4I6smbn9Acv0UWJ8JjKyOyXpg=\r\n=aD9A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"108f8c9f1f0f7d1a09a5f5dfe2b15cb6b7945ae2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T08:55:26.813Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.3-renovate-typescript-4-x-108f8c9f1f0f7d1a09a5f5dfe2b15cb6b7945ae2_1648285159825_0.7515085947560725","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.2.3":{"name":"@balena/jellyfish-client-sdk","version":"10.2.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.2.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"75f803c6b6b5f4ceff30df977a4b36819c747984","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.2.3.tgz","fileCount":34,"integrity":"sha512-10TiymF7nCsnYEiT9I5jogDKz9fb6pXx2yEkAOnLJLOD5+IxEE79tvusnSSCUyz0N/8Nhkbr3klEIG9JVdFFRw==","signatures":[{"sig":"MEUCIQDOTpxXo2PmTFsZL6jL8TWk8fJK9qN4E6MiQHz+ooKgbwIgZThCJKRyF5oSWnpCRYn5qJ2/p7wd4dOEkQnJM2NDcAA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":286305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPtrtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgZw//UN9Al9OKq0xs59mwe5IKeSmVxpoP0QRGc4Su8ZOgw49tCbu8\r\n6IEssEiesWRVlSh30I5ZwuIpu1uOWv3hflmuQsICtJlzzQFsUy17m1x39cDb\r\nWVQNjDRLKhLdeYFm/uqjj0cmczdE085yg/mCBaBCddS5FppbPG2/DluwUTeW\r\nhVQY2SpHG/EbgOywh3ak93qlV11gZhie0R+o9pIJ0yY/Gd4AmKi0FLQ1LPjo\r\n9rxLXDQEx9Onf+PJsYH5GEqRECYEgqoutVcDCRMRHKqt1TZvaaWkadKSKdZg\r\nF2Enme87Rq+zJSvO9/z/iFk7GuQ7YclS9lA6StAgZPwwTEbsYn4liH4L+RbR\r\nKpOvlFYW+LnyNbDx57SHoodQw7X51PRli7Nf6MIUUdD6MoBRQ9jxO2zkK7bO\r\n4ucByiKrNCEqRmuQ+4uUZJ4fbzbBAcdEeqDLXaC/B3R5cpWO42pjjVRjRKcP\r\n62QTOpe+UqxucID8PTsmYoXbfSoEqv6uQEtqDp8UjUMtyj/whxOuhvZptSvp\r\naSHCBZn0y/55Q5uLsUzk+3HuidwKCgxoodlbsmB0ivLZOXqWrCsyifpqLRm1\r\nOpYaaB7mvrHrJV+x8AaW0g4Y/f/63BFw5GHJ5621VObpwNHBQZbnhU/IC26j\r\nj1LB9RHa96PAAEa4sihfGoUgt5zHabRod+w=\r\n=iqT3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"617f50924eb982381b9e8d3e98405ec569331d9a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-26T09:18:44.673Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.2.3_1648286444854_0.8567649814631935","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.0-lucianbuzzo-loop-product-link-877c6bd31a20e7e6de1c69ad8e06278d94245f52":{"name":"@balena/jellyfish-client-sdk","version":"10.3.0-lucianbuzzo-loop-product-link-877c6bd31a20e7e6de1c69ad8e06278d94245f52","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.0-lucianbuzzo-loop-product-link-877c6bd31a20e7e6de1c69ad8e06278d94245f52","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1aab2b0a7aa2a3a5e039ec7b4b523cfba48e215f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.0-lucianbuzzo-loop-product-link-877c6bd31a20e7e6de1c69ad8e06278d94245f52.tgz","fileCount":34,"integrity":"sha512-8FO0QhyEKcQcqAgg5qzbwtzd/7+iPvsuLc6NeKyzOx+O5NHx7E3V6U2l9nTW6m5V/JZ03RMBxIek/i1e0loMgQ==","signatures":[{"sig":"MEQCICzutRcHAyw3T3D2EW66B6pVqr86SYGHaNiDb+wKuufbAiBNkwVmRe1f0aSEl6B1Jl9ZuPaXstE46dp+xK9Y5QzNMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRFGkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqV/A/+N2+PjKWMwEGfYKzMiOZwbNfH9VWS15gOBaWAkuT3V0tidjN6\r\ncJn3LTxeY6vIPpbPLXzvReb84EJhLhulksb240dMoykssRgDZGjey6ApLg9e\r\n09QGYLqa6PmjgsWTwM9TJ2zaeY0Cw127cYwxLFYnRghsOrC+bVcaO6tZzY/+\r\nKkYmJ5Vs0kbIyYH5C8xPkfvsXkhgYHMHMDrS+jUB2ThVl6F5L2nNyCQRmI3Z\r\nruiQJR4UgSYKKGGz3CF4EfGmLfC6u8UWp0QEZSRaTSL+9+MpCoAd2mHejvSI\r\nRpvvb1ig/U8kNAbQ/hVgcJUkM16U3To3lZbXw+g5WoqNjjwWgdE80ElG+1LN\r\ntOqtk45qikZdR81DPlzihsFLURYe2eR8cunGGTncvZyeN9gFxwVawDifcbgZ\r\nZddHNbyXK9UseOSN9s3haFr/iS81Ab8lL0qC8zA+x7fBs11kr/rD5YviwIV5\r\n7eIM/Z/w/GnBiPZJ2svgIhoctk1a9mDmCGesU7Na324oZ8XRJCQ84pp0rQbg\r\njMr4MUK6qX/mVLtfROpSuKVEFPRYo/yWkBFkK7Q9KuxVoD5NIsJVIBaF/b1B\r\nnXmmHvgTXCdoEe4Qi+qvBCIZhefjRnsXZ1a43j2lwwGw6ujZyKQMv45URXRf\r\nMHmyZycHcdrPTvPGxkpxB8EEnJH23rvJbt0=\r\n=aA+v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"877c6bd31a20e7e6de1c69ad8e06278d94245f52","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-30T12:45:28.417Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.0-lucianbuzzo-loop-product-link-877c6bd31a20e7e6de1c69ad8e06278d94245f52_1648644516721_0.9994291286563901","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.0-lucianbuzzo-loop-product-link-4123fdda35707c643b233a9b46a1bcc1e03e96c7":{"name":"@balena/jellyfish-client-sdk","version":"10.3.0-lucianbuzzo-loop-product-link-4123fdda35707c643b233a9b46a1bcc1e03e96c7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.0-lucianbuzzo-loop-product-link-4123fdda35707c643b233a9b46a1bcc1e03e96c7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b2a0a2e20a5f01520526ce4157ac440433734f76","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.0-lucianbuzzo-loop-product-link-4123fdda35707c643b233a9b46a1bcc1e03e96c7.tgz","fileCount":34,"integrity":"sha512-Ghi9XOo1+hzRVidEyQF2GV0VTZdognOhs8JyQiDPnN2RcZWTDG1b0QenyAVlEYpByoBua7g32iC0iHJ/HPm1Sg==","signatures":[{"sig":"MEUCIBJ59YLOqbH/w/m5bY9bMVar2ge4WV8chQMrafyufhw6AiEA325ofDWqxyWEWpX4/OpoUjSrA78HAl1T8RX+03eCIlo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRFN+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouEg//XUr4Ej1xFgu8oj8kxUPRBmqy10kYRA4JupxiKyIVsQYM2VXs\r\n8rirIzITow7iI+bVeSswhelMrUPQsx38k0aHODB6Uxc6JQIB39qHaeSL/zvw\r\nsceneJ271K21kAW3wfH2d9lo1JFK2hCx/k7X0PWlPDckPGCwYrc9IbmutT5u\r\nGIt3ndIMy+MB7GtrAeWwuipVkGYson3I6Mx1o3WHUWOhp26GRgFgPTvMi+Pl\r\nNKsUhRC4al+RWrLXcqmFEeiQznHD+wJUfS1wA8nZMb4lrxfzxMmTf+6yTUH7\r\nlhfrzonIjCD7+6fboJN3/5omRJH07Ldbvwxb/9H2iQ9nJqUKlH9jzx+de57P\r\nU2gRy9xyKiL/07JjNBR6OyadU0HITSX/9CrvyBq/jZBhd3vm5DffaqHvn6XQ\r\nuiqn+msuJZL3KJ+mwMU6cD+qyQCaP1FgOUYzYcXer2KA3XEs4xZABhuigpdg\r\n1f5XRzAhqXcQ8HhshSN1HKeMnuW+9fw+wyThUteMvay2vesMjYDO9glCXHJz\r\nmHw3cGLpisposlz1QK6KwoDpBG5wmce1r1iBwwDVQSb5qipi/hmrWaUN69Yc\r\niOKXQ8+mJ4cbnKJEZfyCfrVa0V2pv8DxjTxLXD5kOZXzvKIkngteyjkY07om\r\nsHt3TPaqodRGI58OEO/GX9tWuLB20Ese2Fw=\r\n=+xhZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4123fdda35707c643b233a9b46a1bcc1e03e96c7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-30T12:52:59.525Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.0-lucianbuzzo-loop-product-link-4123fdda35707c643b233a9b46a1bcc1e03e96c7_1648644989969_0.3406661322559812","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.0":{"name":"@balena/jellyfish-client-sdk","version":"10.3.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"50345ea54e51fff4e9ecb9475daf232ffe95391a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.0.tgz","fileCount":34,"integrity":"sha512-SX0q5zRpAM26LMQemtn2jErBuGWbaxmc3eC6GiDg82JX4Uc415HUxBW3yTp1eeTiqCvuRa9BcXsxKOC3xYIIAQ==","signatures":[{"sig":"MEUCIQDziNJXwjrbUAlLo2+ArbDT00qUMnc5+pmawtwbrYkB1AIgE1nSntnBT3dTqI/uTALdvu/XoIKZBFiCZABLWLzQtaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRFSLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCvA/+MNsPYlSeI/sVcLyAMg/4qa+m4LtC3S0szmFHvejvDrgXADeI\r\nhGn6W30o+O1rv7H4BiRoEI0C3HJZa1VTkT8qKLmCTAc1l14TBEO9NIjCTXCa\r\nP5q+2pjMuDhV7xs8p/H+DHYLEZHEKCi4ynNJBP3blz2c35axxV4GjXfzp7+x\r\nlW9je2Su5sxphoihr1GCYQL/7gF71Y+AijAhMKdktQx7YQ5014uSNwINh5OB\r\n8pViOcnLJi0O6qc5D5pZnfyAD0wEQjji+zKebG1kaRbfv4YxBCYwtB/4VVea\r\n/D+T2cjIYwuMCLt88oYOKpZdnmiz/E+sFcPQtczRw8vtrBu9Qr7AN7XPVbLV\r\ndRC/+OZYHDkyBUj1fWDFxuctrehumvda+ptMt31bYbtbJRJLBSzufIEulCGs\r\ntyyzOnL/fOmTwB713nkOJCs4v/xF1WRS5z6XV3TZZBsaDZ8TXa4qwhGLmi2Y\r\no8uzFuPDaIeUdyH0r0t/X7yqYEedCYlMxbHIAA3jrlKiFHUteEZc98YH9pb1\r\nQwv9b7QRlP3y3scBid7uxZfh/sFzv/suH/JXG66a3rI0pPHSMESEFlbPDXCn\r\naRUUzrB3YFV462LmSGLwdvlwtCWb6Sc5/jPUInN+iLzjZy6nlKWsmhPZt5SB\r\nYIQq/AmSJfJg0hq7rFJ5Pc1j0Gk8ZGBarj0=\r\n=Bmr/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4650425759a9044072ae30d8d295242d98b64818","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-30T12:58:36.215Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.0_1648645259553_0.7193410663376454","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-ed3c90a9609bb9f997b548c658398abf8414ebfe":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-ed3c90a9609bb9f997b548c658398abf8414ebfe","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-ed3c90a9609bb9f997b548c658398abf8414ebfe","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"483b6804db6fb746d10f71694a4b86dbc18e6fb6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-ed3c90a9609bb9f997b548c658398abf8414ebfe.tgz","fileCount":34,"integrity":"sha512-aIqPOySVvB5xD6X8MyFXPYI6DEzT7XfhHheELlKb9FGW3o0WkPNSi32liUUltXQyQ1Z3uwh8PE3o4uqzowXxaA==","signatures":[{"sig":"MEUCIQCXc+3wNbNiSpa57U/hw97CnNg3zCzBM7D3HK8mUJ8XoQIgS7Er41uv+J2FzcDHeaBFNajQ7/hB2Sm3yXsmZC402Hc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRWVmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvCw//WqCDhS16W3DvNC07xPpQrYbmXoKHd8Hd5hf86UyE5dLBYzwL\r\nwG9qby3GM/HqSci94FSVPmnkddLr1L1FtBdzfwdULbqYP465vgm1gs8h8MuS\r\n6gd5UXa1Vr6Ru6Gnq5aKVTuE/rzZG8l+/NkUE2G8sCOcPaQWSpMPlTZEPjJ7\r\nyi3FVSEXy4UxL7+H9GszL/SZvMJGj0EF8GRBJ0FWv/j5dUC6gTme3itf+PhU\r\nNq62VUyEraPtJtDuq0UW6MM34ldiU0m55Dnc1TMz2Xl7/MUKatlw78cjPjyu\r\n/wXtgZmOZ2vkNWIb1fRtZJ+P7mqi0wSxuKuUF4ZXEVGX47AYejKldkdshnse\r\njBgKsdAvEHSEiI6lT1SvqjAJnOrGWx0XqF2eOrl+K+Oa8/1O1YdwOZ0W8DNp\r\n0f1jiOGFxwo6i6/leKLvfWqH1ujlFYTwD7aH/8MSoMPkTilqwZsYz/FSyfKq\r\nWxM10axI0frL0mRBo+i7hgkA2pcrK3qWHwBheRqpOvGuJ8JvBGUQJgsYcC4a\r\nk4r3wih6h5MQpZe7Jbu8izfYcpUdDUWXgIXHgzL9IcL2BC2Er6Uu65fV5vB8\r\ne54+sJyyXiZzTAjWJ+Hugv9C+6hmgoKFlRclCJo1rXuo5MonrHuqP38hRJ/7\r\nROZWb+Go9QoK2XSkNRmhbKDvQ2wk/eR+yTA=\r\n=88+e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ed3c90a9609bb9f997b548c658398abf8414ebfe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-31T08:22:32.329Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-ed3c90a9609bb9f997b548c658398abf8414ebfe_1648715109979_0.21083118161815273","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-666c79a2cd0a2072663c8b7e6681c6bdf48243b3":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-666c79a2cd0a2072663c8b7e6681c6bdf48243b3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-666c79a2cd0a2072663c8b7e6681c6bdf48243b3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"80e1479a64d5efc13c6cdfecba40a688f8fa8dec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-666c79a2cd0a2072663c8b7e6681c6bdf48243b3.tgz","fileCount":34,"integrity":"sha512-nCszk1Vr3FRE8abwoSGoiud2sZ1rCvNxgou4Ct0OgCW71UiM2tRrknf1hAU9uhEbtNPJKAP3HCev3uO5ET8LPw==","signatures":[{"sig":"MEUCIG7eTP4eCiqt+8Ll3pT6ils25Erg8yms8K/7fjTUwRX/AiEA5XoZyK1pjm8ODoT8nd1l2EVm/4p8uYpqfaBjoUboREs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRW8hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEOA/7BAjm/NNw1uVvjLNVdUMNTJIUdarSY7+TvTi2brxJhvMhW0uN\r\nuEfQWJJBVXgFpvCRbmFyxl1v60o4wIjRDmukBLZKln3x8Jg//pT5/rVDUn1R\r\nGU8yfqFIbganhzwzDbeZcrz9cf7oO6ZDSYDT3mH9fkjKWK2kXT64gLmtxKgV\r\niZZipWiDN14tP9hvJsNmQE6xC1XheiHEX5jO34bKo2SWPJ59mJ04egRdfr7Z\r\nXZTIFGpVbvtdJy1Jw1T4QZucrkGsb+Lu/UoNRaH6h6t/SVXgFTVtkD1E0qwX\r\nBH6vEsgXD8/JPzx0Z9bJDMJZvXjqxf+auComJDe2tI3SCmhjvhs0S9rANtgD\r\nLB4SxjdlOn87teMRG81rPbi36qSy7DMjeQcW8Q0hK2OGUfVpwOQynKpBMAaL\r\nhfgUW123FS6a3JuJLVCDweOEAY6sv3hqnEdEOLKgbzad5lfLtTzCexxj8PJa\r\nOHGeC8sXnfLuQksETMfPDv0rOWjdagpzbq5Lm6fcvgbmtuIYrbRfyDezuq5B\r\nZHZMGonAtcEMhsMH5tF1gK20nzhFpibyb6U/iWynJS1NN3W3JkyQueXo+ZFO\r\npE+B45E73vNSUvpjB4QWCSBTb/Np2mZ++uBrvXApZe6yDuvYcp2U1hd4X2KC\r\nJT5B1pbM1lksy12o96rNKSzFEbmSGVvTHOg=\r\n=H72z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"666c79a2cd0a2072663c8b7e6681c6bdf48243b3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-31T09:03:40.754Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-666c79a2cd0a2072663c8b7e6681c6bdf48243b3_1648717601140_0.226757195194899","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-32b68f28ce72317e726cb37bfd8ddb51003a87e1":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-32b68f28ce72317e726cb37bfd8ddb51003a87e1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-32b68f28ce72317e726cb37bfd8ddb51003a87e1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f9cf2a9ed76b25c3a7178452c97404477b2f3518","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-32b68f28ce72317e726cb37bfd8ddb51003a87e1.tgz","fileCount":34,"integrity":"sha512-1SqHju3lS3H2xZAI1m7FL51xwK5htnm/kH55xr35Vvw6R60RKFEOy552qfCPGsobtfCq7gJ5ERF+g2qfKhNnOQ==","signatures":[{"sig":"MEUCIF7+z4M7yRBuGvn4eLo4YSi1sG/u/x90zbCPuMuwuAAYAiEAzY9/WOzDtfrMM2Sr3H9kzoiJeqHvOHkewYZgBwzfn2E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRXElACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpW8Q//aTJKTYrgrGiS7yxPNgi9lS+kdkDkFxCDaSQeI0syCnFXrY16\r\nkOFnpW1Eqg1q7xfQSIpbFfCzapJglngMQC4P/RrDXSw+uHwM5Nvzpt0zc/ai\r\nqAt1a0rT7mLWz5J3W787vqqBr/8+grTxHO6OXFnkGhqvWTToN68yLd6wCIV9\r\nUB+6y+qUQCDtyPuT0Jbg3sybe0nbjlzbHSAPR8TzNehz77nnZ6OX7vHYDl6I\r\nyDC9lEdEt+DNaPMdLCQd0fP1S8G+v5eLfqG36iM9W/ZChgufp5pVt5G6XqdT\r\nByS+T9iKpwkhXQl1ePbUbj/IWLEBYc1MAVw9CIRGx8pRRyRmbtSrrInFEeXa\r\nfkHrPKqgXlrNcgWO4agL0jqyw1oLiU21/iTCDhCM3W+UyhZguEQb7hz8+eLN\r\nS51gkBUUG6oSI2HQt5Y+L4wy76mmr9NUBBjgjZ+SBGsYp9Teyw5M5spmy7KX\r\nbTbc+QO4+13Y+symOJj4zUeKMZvVMit91T+l2OwC6AYyKS+tl4It+9Bm42e2\r\n4O8E4B2VTbKAaFW6/2ef/eXU3mthgKc35N0dkX8LzaBdfKsYg545/iUlL0V3\r\nxm956bp1DqOXGjqC5Vj6xvXR0L/basItmMJDFVI2p8LlhoXWa5YtaSfC86Sn\r\nXuw2ZndwZBf6JwYWPq/bLWwCunHlhMngV6U=\r\n=ZcGQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"32b68f28ce72317e726cb37bfd8ddb51003a87e1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-03-31T09:12:24.447Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-32b68f28ce72317e726cb37bfd8ddb51003a87e1_1648718117710_0.5070348876574939","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.1-renovate-typedoc-0-x-14ecd89ef8fbeab39bf2900c66943b90b59db43d":{"name":"@balena/jellyfish-client-sdk","version":"10.3.1-renovate-typedoc-0-x-14ecd89ef8fbeab39bf2900c66943b90b59db43d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.1-renovate-typedoc-0-x-14ecd89ef8fbeab39bf2900c66943b90b59db43d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ee69e7068ca7b885b705c4e18111047b63002d08","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.1-renovate-typedoc-0-x-14ecd89ef8fbeab39bf2900c66943b90b59db43d.tgz","fileCount":34,"integrity":"sha512-/PZEAjcHuOD9Pw/pWflnPck2h08nn68lg/OlgCN92Jcji9jIqATWHyydAUltJqPGjCUjemPtwC9RnQ/z1VFabA==","signatures":[{"sig":"MEQCIEfxOOvNvo/k4U3vYR+0ZiGZS3nL+3pdZQJeqbcieoShAiBtLJz27QZaB6vOuScv+1teVl2tuIOoMYQBgNRhFL787g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287415,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTmMNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtJg//dsVcvTk4GxS6w6bK+72Bzmze9MfYcUl2cKPAe4KmzIE3w1pd\r\nMGG4fz+JeapCAY/qaW4v8sMXG6vCPiUq4RvXip3WKAHNXX5DrM3TS3HhY3sS\r\nxdpZF//Q83J3Ic327I9kzF04/eJG7oQMPq1i8A/4/TiU2JK0sLhAFs2XO3S1\r\nzZEnkyyZA7+37l3wKFRmWdIwyShZ9BWAboDV3KkbTCR6EmFGC04QWHtJ9eXt\r\nq2IE/Mw0FzPr+HFB01jeXXsWUXD+B5CSt/pO4NbQSNs3bYTsFldqmVKq1MKB\r\n6KnlcXiYCW1L+F6EaQ5dFRm+a6ylxG2HNGLTLduxr8CrEhUEj6H11wLUCtKp\r\nmegENIekqbCUYbIz9m+4vSdIO/tfKAD++kWRgQY03zMbfxeBAzRQKJH6Q8XS\r\nA6JgBLxqVBLNOEKTkDpmeVPAntXXYBS+IH321NJFFU7JsmlOdg9DyLN7aeP3\r\nvEcPg2OIPwjfYi56z+/m/xAsR8gueVhRe9X/01NVs2pqDYF794WbuoWzkCxR\r\n1NnuAqh/ek3j/MlxLsPt0zqjFKwTcAk+pbiHYwJ3Db3AuRumFCiy0KP40tC3\r\njPKR54n7PQvfXyqKLASC3I/Mrf+6ppSX9Jip8yqmlXBlmetq0ShbOB6eljk6\r\nw8vjpdzjYhJ31fsTz1vgiecVLOSmZqZjiN8=\r\n=vIfo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"14ecd89ef8fbeab39bf2900c66943b90b59db43d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-07T04:02:44.063Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.14","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.1-renovate-typedoc-0-x-14ecd89ef8fbeab39bf2900c66943b90b59db43d_1649304333383_0.8669752384036149","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.1":{"name":"@balena/jellyfish-client-sdk","version":"10.3.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ba2501dda6aa79776e5b3540c9e5b56dd5b08722","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.1.tgz","fileCount":34,"integrity":"sha512-XNnuhEWomlM6mgiOV1q8piDrJnMXKRpTgWGgRPfFoXWuItzWstQFJFGuUzoX6ihdPekZcmQ49sLP5tvpamTDfQ==","signatures":[{"sig":"MEQCID0Is8VcVmb1SHeXHBtpkEJrRm5IWkXd+Y0f9N1+Z42AAiA9N26pE6VFl3Cd3chCNchgqkss30v3+XyA1DBfVlh0Ow==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTmqlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofyxAAkwBwbkbMpmvL+QwtbPexqB0kV0qLJ2kBANkqrWNgnCyhLGUN\r\nt5luiynxx7xx2hP6okH6nfJCGoOi4iIJVxgEDnLoCFWcRRJT87F6XeKFiscC\r\nxrkRCEeuVM50+VFb6G/Zb3WKTXYCl078I3ibTXXCzC6dCEy29Wzg+Za8ov2F\r\n3CYvFJJHkJomE/kj1MT4zezD2P4iFluDOr/HXcaxQQ1o29FAhRrSkrFnfv0S\r\nd7nWTsXzY1gmlB9mf8Xu9SwfHDrgbW27Fz7BouOUoGziwXyIMLn9C9VJDbOG\r\n4HCH1dbEXO4paIK5pW0/Gb+DSF0unL/kiQXG8Xz7As2JZGm9gsj4GHoSDetb\r\nkujWe7a1gNxqO6Rb+s/HBh8J7lhUvN6RTk/cYg8nLLgTuSpTgp9nT2Xou7AA\r\npr7TNHSpmhO97NQpL2E843KFP9UKldaRaC79ucn27wOg7kS53INI7UDkNfol\r\nuCfH70Z9s+ylLNTyjijmtaFuSAIJZhOMgpDO4WfYRwy92OyVt/vvtaK0kDhD\r\nSOkwNhO9GrXx2+KjaH6W2tfjTcXoaPGHY7HNM2yBroNzL/0SPy8jo/YgH8VQ\r\nffWur1Tb3Ss4iCIiUCDZC2US3ZYhszkMBWDCEAP2P0kTbVGf/5OTkmf8uLZe\r\nBw6dydGDTU7ybWfgJzOs/ozxo1aczlghJXI=\r\n=zXXL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dfce52b56681ca9994d5ab170292107d474dc410","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-07T04:36:06.327Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.14","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.1_1649306276899_0.2613038040967284","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-53c62abd0a397107c21de6199f298e2568a725bf":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-53c62abd0a397107c21de6199f298e2568a725bf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-53c62abd0a397107c21de6199f298e2568a725bf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ee5cb5c350209e2927f42a90504da192535ac7dc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-53c62abd0a397107c21de6199f298e2568a725bf.tgz","fileCount":34,"integrity":"sha512-rvN9IkYKOTegs2VQcsfrFvrbc2DL0OMnLuim51QFf+Q/D00/R8aOmGGTk0iav7FAVHoDJ527OB3BlO3gHj9phg==","signatures":[{"sig":"MEUCIQCEgugHZC0cHGdPzYY13l97WJ7mgLsyY/SQdXA4x7aMYgIgKPGw9oH5OWBfFVAMa5wFkAFT5VmsDNPNHTXHrQaTkVo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTmu4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvXRAAmo/bj9A1itL8Yihc3pWdTxa6jjXb7+IGwhTGuDSAHkl2vOn0\r\ngNAy8PQAbIuErHah5XvqSZUpqBzsZL/qaoot97KNtaHHrmEE/TbVRzmGV09K\r\nS107xtEpEvJw9+sOgHWTVQ8yJBkatAwlhDSJEkx7DjYhsonGjFRaKEDotBF0\r\nyVGBCeYJsEKeMQwb3Ti7Ne2tJBm2NMW5PG4aIdgVi8SXo7dYbsz1gkHbuYEe\r\nlA1tLb5ebMgmUB9KGNuGBCKF31ylm5ePLT2Y9/mI/ppcaMxPqnThqdZNhwJh\r\nmII6qU/qUxm1O3izWiCNtdruH45M5TvBpzv5qlpp0ys0UGf3/x1uUWI2PxAG\r\nDIKwncKFtRkhdlR0wyKFp121zbvJ6Kk3q7vvV1X3+8zpKxSnXGNfakhOaTyL\r\niSpBezQwGgVn6Jx79ZQz8s60Q5c8IBZls0fOBpb3/Yzu63TTj+UF7vDAqDi7\r\nMyXTjmrzMgtC53nFKtVswgI6HkObz/y0WBcyM6o+5bOkYQQOnA7EiiYD4vUI\r\nbt024mYHFjNoW62/rJYmBToAOarMQZ4htx5vpPWbm4DJzZn+GO9sxyK+8FVP\r\nMkTHrFcoslT2BoTdsg3sqhJrWzPXWLT3gqJGJ6Cw3u8q8+c5hzsV2yCFbPqm\r\nMq6DtDEbgb6aKXRJKSKI+bc4y85RBxZrFfI=\r\n=PAEG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"53c62abd0a397107c21de6199f298e2568a725bf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-07T04:39:58.037Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.14","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-53c62abd0a397107c21de6199f298e2568a725bf_1649306551927_0.15412210960932304","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.2-renovate-typedoc-0-x-1f461d46b798c82de887bf34b6c06d3c24b6f4d6":{"name":"@balena/jellyfish-client-sdk","version":"10.3.2-renovate-typedoc-0-x-1f461d46b798c82de887bf34b6c06d3c24b6f4d6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.2-renovate-typedoc-0-x-1f461d46b798c82de887bf34b6c06d3c24b6f4d6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5247887e3afeabf96699ea47ed764940d25f2c10","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.2-renovate-typedoc-0-x-1f461d46b798c82de887bf34b6c06d3c24b6f4d6.tgz","fileCount":34,"integrity":"sha512-ezU1MYeI1O62ctjrwTxZYqqnH4wcu8QJYc/JM1vRGNqRgnsLEAnI/9digeVK09B70jroayMq+vA9MInEV3t+Rg==","signatures":[{"sig":"MEUCIQCTn/1YqMSG6xVGmBOfhRzd7Ikw+lNkUrju0/2YLVeA9gIgebdGwYZP1a9P9HyAv5epXVR+mdZMF0t4VA3SjyKncIQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVYEvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRRw//agoTs3xi5yZMF+CMYrfJ4GhIM/Zb9ApTvqHP+0PTQZPGa8xD\r\ns77jtET9SpXimkhzmOfJ9CmxH8DC0iRWzqMbW4taXJhSVhpIB5sQmiIw0Hl0\r\n20e4Z9L2GGOYWaw1tzk/UM5GUuJvFJynaBRkaPaZ0qCbxCnRGKRjfgiECIoz\r\nsKGtwx+zP6cFK5skdFlIi2ddXZ1cnMX6hCNQhJmuB/dQe9ZkXLrXPT4yazqb\r\nWwhAQJTyqccydlFA7itJkgH6t0LVN7tPxojfw6IFX7qg6CbVRZ28RNabwH3q\r\nGCrqE4q58qCInypteriNOFL3ybK+WvbiZs3bEyZj/w1PkC4vs6XMUo81lAKj\r\nJaBdRwgmwd8UhJMWEnA336gwOlEjczZHlaLZ71D3YvBIJe4Q7wbF17Hhy6C7\r\n0LBRt1dHkFzTwH8qRlmHf3sbYEdMHIo77MpP9AQdQauX5XJSoYnz7m1W/5Qe\r\nPFUABpODu6yPZGVcit2biclnLDe1y5sAd8ktvuJWnFUeicPdGuSqVlHTgu7E\r\nCyL+26ISq9CYiDgBFtVbRH5RlHch+IyzjcgTPH48omYYJnt6yjEkiJvFKK7X\r\nP7srs39z2EnRd807wSxT8tnXLpI1ocMJXAdA0uwRIQlD9Nk8jC3fIVdmpHI5\r\ncUSJ9tZKPiBsfX+wDq7YEW2sj5nNSxJUzlU=\r\n=03oq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1f461d46b798c82de887bf34b6c06d3c24b6f4d6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-12T13:34:59.384Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.2-renovate-typedoc-0-x-1f461d46b798c82de887bf34b6c06d3c24b6f4d6_1649770798837_0.23125081214009402","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.2":{"name":"@balena/jellyfish-client-sdk","version":"10.3.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"142f45cb1f5685143752809a9a9922220f31345d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.2.tgz","fileCount":34,"integrity":"sha512-BjmVOw018qPB1KzEZtHlhw1DUCDYyS9qg029TJrRSEpKIHKNXV23yInmAsL+BvKHBrbRBLJT+5toVP6Fmj5bQQ==","signatures":[{"sig":"MEUCIQCL1QuKmkJ5WiAG90ajWyP+qavL02Y/oCQEpxHg8ZyGtQIgPz5RaGMqG075F52CiPIMVEk1wrYCqHMliS6rJ0rUMEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVYKmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMAhAAkldGoXQ5e0GyPOEw/QtsJ3K/lfybN59gTBJGJwtEseDVicqM\r\nj5I6Po6gpSeFWIJ7NrMN94jZ+HRYtUoSTdPuT0IfJkok2veG8yp1U7hOWWF+\r\nGNSA/H/oHqbuGtyMvDm2XU9R5eaRjWMlcx8vq8UNZb/gvPrApXl7TDw9lGuS\r\nomOC0je4kUvjAcLPurnf3pJdCn9Dv09cJZ4QyR+3bYou2AshFasy9fgOgmm4\r\n2Iy9O9fFFGTj1t00zK46Q4vLCiRxtZvp2lVcV+YgpdMfLPZfIcXtixxwiodE\r\nNkOQmkzO4d86j9NIwMzZ0WFk9mInDkSP6+2y9ffzBDK9sLpPM5sdFrHDHBSd\r\nquerJjXBWYHbi5pkkcQJ0E4C6g2hovftmWoZqiWXHE09Bd7ETZ/oC10/aGmq\r\nbGRQL3ZKQ/mU6oH7rTvvHjdfpCILYRSwqqudeuy1I6qP25i4suiJ2cowXj9G\r\n91pKwYbgr81URzDvPmU+gK5/JLFU73dcWr1WzYVHS90dD4m9NuJX+Xv3VLgT\r\noQrxHq/IOA5P4UqvA+jAMqHrkHnkA7ZMYGIvQq8Bf4aePw6PKFHO8JJ+JgTa\r\ndTlQfy0/+d5hCC1u7dfCLwvRv+GPq5CZMwvcByH6OL7t0sgEomWsLB0Mu22Z\r\nzQvlFEIPWbkYUQYrOkm1KCcQ4G+N5JvSzHE=\r\n=/PMW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bdf6588068e09ab982850d005972a73347ad328b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-12T13:42:15.422Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.2_1649771174639_0.6875793833214023","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.3-repo-sync-jellyfish-config-default-3ce8cb0d4f2867edc177ff94c9ce0a2498363e5d":{"name":"@balena/jellyfish-client-sdk","version":"10.3.3-repo-sync-jellyfish-config-default-3ce8cb0d4f2867edc177ff94c9ce0a2498363e5d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.3-repo-sync-jellyfish-config-default-3ce8cb0d4f2867edc177ff94c9ce0a2498363e5d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6af3f8cd684a2f8cfe9ce229dc26e5ca0ae3ffdd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.3-repo-sync-jellyfish-config-default-3ce8cb0d4f2867edc177ff94c9ce0a2498363e5d.tgz","fileCount":34,"integrity":"sha512-W/DSdHnwo75TF9Lz1aJqTnyOlgpO2MMWopxqY36c6tmEhHOUCsjCNwumPvK0mKhDiby8nRzIaelSNe7NyE4M2Q==","signatures":[{"sig":"MEUCIFsTLjuQQaSHpVgveXVk3qgNlg4H1SMJ5yJD0jtyQ5FeAiEAg5psLt7dqGEfUx6EzPaaLQCHmBbZ0VPQ1XtKU+/e/qA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWOfaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvRA//QEG7t17TYvGLP/6w7b+yaXO0q5ZZ3+QpRK/0x46h+wRg9nQQ\r\nIohaegMoXkIy6TTMYQ7HpkveSaEKtfFjHLGURTtCkbRnv3NC7doAhn8Cx3DY\r\nCcQkzwFcyvFun5pDgxW9dqNjhChVqwMmWTijbQl8ErEy/ZnCdscmymVqtsKp\r\nNYsTvIkrHMfLePqQUVYHuc1CJ9Vq9Viqc/pCNHMAQBelY8RJObr+rKfM6Dyo\r\nZ/r+soRnAKrGoA0Xn2H1H6w16b9PLrd9F9AMHziWYKUQAaUlWOPH9BxBwwQC\r\nd/DuUFycywjpg2smCQChoLbzEk7grlYAQ1CB7EHNQsdgIMRUn7ABno4oX8Ys\r\nQ9idxVekHewb+FQBmO3178UfJsAgjQUWy65bOpJdGuGsJA1/i/lSREhIuhJv\r\nJtlM6/9bKolKmTtLykxH1P+wC33fBGTjwxJ1Z1jMdTDLt0mgVkBiyAcVlag9\r\nVdnt1+9UgeWysHEgnL7cUiuWV6jAvnQSwXjfWpj/OmHiIQvJRVvNp4hL+Qzk\r\n21CH4NKObwfL2kr6585XOg0Tjy/iJowmDeQvx613G+p4977YQ7neFkWRZu8a\r\nbIrnTaJo4kWEaFWZggfibD8P2XyGcUO/bgh26s6fxXRr/AvNBheu6e6HPpzt\r\nPMCKfDl5GF7XZUHQCXxtzThsZQZQUv8nMiU=\r\n=XvGM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3ce8cb0d4f2867edc177ff94c9ce0a2498363e5d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-15T03:31:09.867Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.3-repo-sync-jellyfish-config-default-3ce8cb0d4f2867edc177ff94c9ce0a2498363e5d_1649993690485_0.4430868660610694","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.3":{"name":"@balena/jellyfish-client-sdk","version":"10.3.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e97d2b3a62acf67189d0f91c02af65b29e45ff4c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.3.tgz","fileCount":34,"integrity":"sha512-1kWP4lzuxtqsO4ar6BZL3XWsuRXVtuIduBjqB3IRPx5bEu+Cl/zhRw574Ggrac+OlvrPfRf5Xl3YOoLktvEy2w==","signatures":[{"sig":"MEUCIQCa4GIGJOuNoy2MHLA97vyas9gTPaRi4w5JkFCb4BJ95gIgE2cdEmP+381gm7rMh9+9jBqh8Fr/yXYsBUsi37XO6lk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWOixACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzPg//YE8F5Rc0i3gEmjDiaLsYfyvYjiDeDUxO/HT7SGqcHV51d6+j\r\neLQBAoRWlvjmRrhceE6GnTYvZkJGdvZK3ihpJvb1KQyuSI8ZXsidHPWaKj6F\r\nEIrmiHcecsm+rKRRwW9I5ryxUdMW7oDWHc44MbA2XT0MJKD8SCQUSoiCo/Rr\r\n4nwOCifIFrnSdJZJKt3hz/vTqhWhjG9Deopbj9d5/Ie8uA7MzG+Q/iOnDMnf\r\nax2Isxo9zVaHsUD1UtaDZK9PyM2jRGWKP5FYCG10gJ9utfLukj3Zc8wmAkkQ\r\nZAEKW2JxzGD6ujD21w+KaxJQM8+OeUCsVW3J6XuqUFgaLclw52tGRVTewgOh\r\n37X+ssXXWfZhWR89aypE9rkLv20E4gm6aVmucJgbNRCvffgFAsPGuwOoU4Ok\r\nxTs2nH1eRkM+byFuKWKuB3g8yJPgwrwjk6gpRsu/YkFmlA9Ck58C41gNVlyt\r\nNvlg10KL5iKAHBr+lrP895LsJyXHsTaMSlPyXnHbhgZyNdSLs6M5OV4WYvfo\r\naGTZvXX7gSElAgg/a4ctuW+b0G5BM9dW4c7EAXm7FdL7ck1FPbdHCTihALy9\r\nqSUhNaHdgpqg1pWpzTtfcS8CjkRtvCkmNqR1IinAgPWPBgbXUa3HsqgE1D4D\r\nmMZy3IUnZItpBo/Iwnhzl8cbZ60Vo0ETjjg=\r\n=79a5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6752f5d5ca0bb59e48cb689fbe5761f2ac870d18","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-15T03:36:09.395Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.3_1649993905415_0.6515129505255264","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.4-renovate-external-non-major-4e19a8a3e88af38c9a06701c84b68510a1fac70f":{"name":"@balena/jellyfish-client-sdk","version":"10.3.4-renovate-external-non-major-4e19a8a3e88af38c9a06701c84b68510a1fac70f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.4-renovate-external-non-major-4e19a8a3e88af38c9a06701c84b68510a1fac70f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a7514a81f3e9c9b2406ab1ae3f45ba95895037f4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.4-renovate-external-non-major-4e19a8a3e88af38c9a06701c84b68510a1fac70f.tgz","fileCount":34,"integrity":"sha512-oyRXhAZE3LJrATVDoUnnoBwb04+hKck01qxZ/ccr/FIJc5TUo9iugxUGqWlocq3UeBFF2E6/rxlh5uZh99nlPQ==","signatures":[{"sig":"MEUCIQDeAlbHVoy2Yfg8ZoqYUzIqJ+80bfGwGqvUAtnSjn+LtwIgQWyw9C7KxigWDqqqkBlqfx0KOjTLzSTBh2T6WtIk6PM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWhtqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkfQ/5AY7s50OiPr3kRXvvG9+EC8Z5W5PJ+PctvZhrqQ349f4xDsHM\r\n21EUovpzZt+Mw+L06fTOvKq87a2LqUFBO2s0CDvjWPhVrDRNylNUPmRMSdno\r\nJHZeoEBTbXM8rM4NIz4Mp1FXQ2Chl5SABagpxPdIqiQYOQo6Rc62yBJlvrh+\r\ndRGnj8J2dBkFWVh2STCWSta1NQ+Un0XQlglPMqNpBfpjvCpLZNPo4f76VxC3\r\nIarxEhM1G2xWenLV8wsOZyLu+3axIBk1JfHEDPpgaz2ImvKhJ71gQ1Fl/mz8\r\nzHZ5szr3E2SVp5fJXAzCU8ZX3BRUiExxMYUU0sYHsrrK1BMv8YQK4Uz6jgqu\r\neRufOi69B6YcZmy5C2A/sOmi8uymH74o6icwkBVZ4IGq24rsXfwyrLnWz9zK\r\nQISbWquhhITy7y7O9uPa057KB8X2QdThlFHwq3DnieuKJPa+Y7cz7zP2kb9D\r\ne+flu1AyPVX3kKzJZKZd7qol7vxyUGqN7BbRIEG9jdeuZdszMwfsFw7g6NWj\r\n9Zr7EQkwjcWGJqaG/+m56mU4mxgA7wFRyfEYQ8uKCBxBAjcEDcDP2wYwrAqC\r\nNzZcC3e9TNKBGM4tVzZ/TIWIzCTOOcjEDbGfS5lv7Oqe3WQkiKjhHeUPmbQW\r\nATpxVgEDFWDUfpNUAGKUoiVw0ODJVFI9Cs4=\r\n=1u5W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4e19a8a3e88af38c9a06701c84b68510a1fac70f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-16T01:24:14.338Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.8","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.181","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.4-renovate-external-non-major-4e19a8a3e88af38c9a06701c84b68510a1fac70f_1650072426685_0.3792785023988694","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.4":{"name":"@balena/jellyfish-client-sdk","version":"10.3.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9d8e97ec85c71985912c0ed0813da2125b718ae9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.4.tgz","fileCount":34,"integrity":"sha512-qxUpeCmAXVlfp6UQPxtLOLyfSM7Wd4otslkpaZFjL2oNSUrbHoHHlyF9QmvfnWbVAIH5NHrAgSI1Aq1d59CGsg==","signatures":[{"sig":"MEUCICp18q910cWUPaAcqYw+7twX5jzzTlOhC2ivr4pevksfAiEAtRFFXoh9v2oZUlo1DVesCkEtS6jvhn8MbxXuy2YARQk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWhwmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIAg//e61hL6ZeZuHsW3uuZgHohgmFACM/2jqYhwkfDgjCrHJZpIVZ\r\nwRt+dtg5lR5ulnY7DxmnmW3KJfEMaah/uakK2j/hSYioq9XQg2i6n/ZKe7ly\r\nieDtgXRPpE3Ew2AHhF227VTtsGVMBEDiR9o0ghiDl8o8irLtegZPbKrD6xO4\r\nDZnzdvYLOJtdUA1tSazYuL109RfGdDzmnZ+IP+qSQYsBevlbC3z1gaBC3sgF\r\nP/QdHNz7szyoRb1kKzH0E6zLEky8FWl5heIBI1RDDTLMoQ8HBmGk4pfmihmM\r\naRM01NSg01WuKG1c7a6TPrz6wZ5yLrKr/1M/y6CXGSzJUPHvxO6AbXvkFD2h\r\nn9jhYK76Q420+QrgPHahVQS/3gF9cZbxMh5gcJ7CtjacTkR0kikRFntS6Drh\r\n0Oxtzk0AZjOrCnrPotD+skvnqg4GhVusQKtdj2TnTThCAAFFP7W3VjjhrBq0\r\n36WCevWBLkORI8b0wjx9S8mvLVLCaXvuFrow3bouLrL4mqQppPXnzaNNPGu9\r\n7LKPSaqB7sXMada8Xp1poxZGOhPhc2Vb0aJnTbe7akPn+a5QkfZ6djl3Nn+i\r\nXCEPu5WC4sKY0ylr11op+LJ23bZiVcitVx4hJ9X9lk2r9sHcWX/QmFVgGCx8\r\n3gI+GctTxFddDbJUHeNeu5jGkh3dNPz7KXA=\r\n=03on\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e9cea48fd5c71214af69610d03fd50a8df35f6d5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-16T01:28:15.554Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.8","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.181","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.4_1650072614051_0.49432604988437756","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.5-renovate-external-non-major-2eb761e69037b36f89a49238e8d531b6c630273e":{"name":"@balena/jellyfish-client-sdk","version":"10.3.5-renovate-external-non-major-2eb761e69037b36f89a49238e8d531b6c630273e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.5-renovate-external-non-major-2eb761e69037b36f89a49238e8d531b6c630273e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8211a200bc6b181066517fc604f6038b03160a0f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.5-renovate-external-non-major-2eb761e69037b36f89a49238e8d531b6c630273e.tgz","fileCount":34,"integrity":"sha512-g2D7AIj/OByhbUlkTUmrRVDnFhQelH2mJQCO/l4WNNHWC/ll9+tDaJeXQXOeXaRYJ4taEzptoBpGKCar5Gkreg==","signatures":[{"sig":"MEUCICnYt5Esu1UfSwuQuGOm4/lEaR165BrI2C5GM7waaYEgAiEAwrWNgAUBPFm8AmSiHZVgRwIPgrzek0CfgyVcv/Mpzik=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287731,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiY1hfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoDRg/+JG8S83b+xjAafI4JlQI7AZDzLqG+EIHUzuUBgRsGX5BoF2SV\r\nAKH2OwrrIuG6u3pqosukbGvhVAJGxfqi280GxPptvTg2TvsLEcnHFppK/ZJT\r\nKIb5fIT42o/KuBU8FOOTKPUL1SGulb7sENLxopD41/r8gYVz6Erf+hkTK9hN\r\nwk6CA3981nKc5Ktv72b78xwc3jSg56hPFFhQ2tU0toPKxb3ODkavmUwtza9f\r\nFepmFf+wlPNnhnl2VZ9CntTaeQaLW/TpHlXz7/KHRc6L/rA/mZMtO1CoFiJV\r\nsgFyvokGzpqXl4meQkD8xSJPIHD3Wp/G3Ad2kS0E9x6US6JMVfEWoMpr3lKV\r\nVgQ7m60B8Jsc6FaW9w4txcL/CrfOoeszbbbtlfl5JFXkgqGigmq0R1tlCJbl\r\nD/cFphV/ZWRicJKSSR/2oktGd5Rc0uV9VKq7lPhgLTnfSfnZDLToZsLlyTv9\r\nEtjqGqyN/ELOpyogAMeswzxF8eEPMY99WPhj0gvprzM3EGCr8pSeotM2BZ1P\r\ngm8UYhqeHodWJoesw/wCLFsDK26phZv8hFXkhjk1lME11yGpUaq+4Js6Rwfw\r\n0vY8AKv+48MXihumvNtOCiaIzpR8/xRJfX7knsp7pEFV7a2c3kLosnNKmglQ\r\nMbracz+ZfJuuJyaZcC53JNXT11uZVAj4Gm0=\r\n=D2wL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2eb761e69037b36f89a49238e8d531b6c630273e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-23T01:34:27.029Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.5-renovate-external-non-major-2eb761e69037b36f89a49238e8d531b6c630273e_1650677855382_0.21645464284461524","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.5":{"name":"@balena/jellyfish-client-sdk","version":"10.3.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"20aa9563c1ac93ac2c16d9ee9f4cfb854dfdfcb8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.5.tgz","fileCount":34,"integrity":"sha512-gms/UY6FehzU3hWhGyf1kSs02/iLu+M3FxQY263UhA5uhBj5ERU/vxX6/ylKM5QoJ4LAaiYXG5z9hKCwMGBebw==","signatures":[{"sig":"MEYCIQCpw+uXHxwGsGfbvLzsOUGP/f+oBiuF/NGtP+Z3QEHScgIhAKmiNQC136GEv4WRjnDvnh5R9hHOyn37iU49c2rtPcXR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287662,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiY1kZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoK6w/9HkzucIrZXeiJJcMROZTXDr5MIiwSoms8YSFvnA3uVRuOoOvl\r\n8/iZDYVhmiCt9mXgvDouq546f2gGqC9r6ORQi9Ko5jrfJGyGY1L60YYkV+Gw\r\ny4jPPy1DX7DiSwMLTH7GxsJ1zdWEIU5uv4yKIO0GBxXkCIVSk8sZK4RUUuLa\r\nhFsyFgzcH0AJKXpqJInL7lJbzEpQr1Fw4q93JGxWjGAXgUKXeADldx+IsQok\r\nShYuB65zt0bx/HQd2KaSNAKlNvJMW1pJsWvR+EBqc3mhq/X1gTkhsFL2CvBP\r\n8niDmcP1X93kI/1H6H26m+MSzGzaAXYJ3MY5YnKIWLTQ5ygarz+JSkmGxH+t\r\n+1xqV2EHBoeMw8F4lg7j1n5lWOlOFHd2TEsytVDodHzpPyQmjrJ830bMuaIn\r\nnh7SeXvvr5UiGQeGUSulduwt0ESEFxUQXxYobOUz/zDnXL3pALHB9+K/9mhf\r\nMfrRUHOUwWV6uvGclfg+zqgicnZdE/vGwiMroFAR3UxXIdmJJ/7UzjPpK4h+\r\nEOh6SVwod3I6xXIp2yi2Zl7k1bAt+gLTU0tAEmIcBVaVZepRFFq+niHP76wx\r\n/urqYuax/rpgEdE4KNgESyhsjv4nvhUXZfiekrvDv/YfmUwq/k5n0ZPtE1ND\r\n8efje1SMnt3tSkTPBBv6goP2j+DtRi+NBS4=\r\n=V6ec\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2cca47e260b3ed236a9c3a60406ecc2da4661ab7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-23T01:38:36.304Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.5_1650678040957_0.94319158230378","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.6-lucianbuzzo-no-retry-d948e052702bd76cdc7210bd300c2b9d4cb869d5":{"name":"@balena/jellyfish-client-sdk","version":"10.3.6-lucianbuzzo-no-retry-d948e052702bd76cdc7210bd300c2b9d4cb869d5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.6-lucianbuzzo-no-retry-d948e052702bd76cdc7210bd300c2b9d4cb869d5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"91261fc9ec3ca4b61e374c57175ceeeca354b6f2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.6-lucianbuzzo-no-retry-d948e052702bd76cdc7210bd300c2b9d4cb869d5.tgz","fileCount":34,"integrity":"sha512-EmaK/9t9DZI9xrCZXZO9w6rW8A40mkBQOL+3rOwn18cQoDWTiPC8Q0eQVoDS8KZizSJ6GOGFC14pCXgOQpy60A==","signatures":[{"sig":"MEUCIQDibCswQJOJdBoMVhZBgfJ5ggpFZXI5EZVAWr7OSZcbaAIgew1/8S1iXCa6IJAeWURn0XrjbQ5O0OeYB8AHPvSoCrE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZpgiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrz4Q/+IgXRZPw4biY+qyZjE6CNWuZAOf1JhqiATrtJhfMpV79JN40e\r\nHjW2jYVjmn8m641rI3c5Ul1Ny1q8b/rK8mBAHqK884DxLs4Gx9Dhaboz3zI3\r\ni77wloCa2/j0HyIYSu7iCBBjtBPfFPtKUrqTcqdHhdByVcew3wgb3etsZeYl\r\nD4dwhLcVRpKxeYzQfw58q0LVwxvyKUpdVN7ytYXe6yHtxnluZlAfFWgAN1u2\r\ndovpEYxMSMLzS4xJgeM4L/h5usZt4yFXfbDM7c4lgQPMOuC4vJ58MuekqlHf\r\nGmXJQYY5N5xMTkHZNJXo4/eNCpTNCZGec8wKAhdYD0iR1B18xEeZS7yi7AyA\r\ne3sarW0zQm+nY17WmBN6hE+8Gg1VxgQqFs99k3XwV0Xn2OC0b1zkrU1bU6FO\r\nssF613mQqXu4OIThviaGfLez/QozcLMGqhShp1Ieco0ZqO8ugvYVM3AmMbOe\r\njiMULfknj6VuzbgzDLKv0wX4/+OsXBd1UJ8BrBrqi0Bhg9svAqHwHLfwfS5C\r\ngzE1cMHg0TVZG+gCFjWvLTjS4dbiGnv3bSzA6Yyt7khIxLaHT9+1DUZ82H+z\r\n7qceiG4bK30fL69UztAWn4Qlo/rYC/9q9uY7hvuu2nXBpDkwBTwzyjSOpJhL\r\nmFsKvD6Ur1D8L25pBQEzlVAi2HG8IhRQcGI=\r\n=mb34\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d948e052702bd76cdc7210bd300c2b9d4cb869d5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-25T12:42:52.292Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.6-lucianbuzzo-no-retry-d948e052702bd76cdc7210bd300c2b9d4cb869d5_1650890786592_0.4846506739449965","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.6":{"name":"@balena/jellyfish-client-sdk","version":"10.3.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"12a4307300995b242c683eca50c23f6a3e797be7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.6.tgz","fileCount":34,"integrity":"sha512-jI9Wlib0oETN76KbbDdXpwnx5H36oCNqcZ3oZNzHd3DbFD0sXatL25S/oTBtw//XnJIrvV9T3gfZoTa3YSgBKA==","signatures":[{"sig":"MEUCIQCoD/k/wXzrYjkFofhfL5mE9KCO2j1tYHwfFY1X5a85zAIgdryCluvGPFQrpztvDCHH9hTezbbS0UYKN3QJSnIVLHs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiZqOMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp7hQ//UgEJh163qC1n152WnulNyhP+yijFQ5WNXHJTHdoKnwsxIQ+3\r\nx47T/g2foN+Qez0KuzRBvDZja4WYv7/reJf/HziPKPFT79HuxYwRHIU5KxTY\r\nVjiNIVvO6AogFLHCX7UEwoofJmvPN0yEDxJ14Z9ishJYDqogEZyrFk5zMvFn\r\nEporjf0k68S01rR9fRBch8BkbgjkIYgLApEwb03fO9LlnlryvEaNgjsVq4Es\r\nmkvWP7iAPXybmJTWRiJF5ATB+EKeA5ZUJBwXVwKkHujXEowi44g/7wyhIvQH\r\nAEESoQOacQaHbXpkG37nML2zZ6r/YAQFTYvnLeYQTY3fr1KPuwqSD4yRsC1J\r\ndOqvDxCT2LKhWJLjamg+r7Jqns/ilAQWzM9WQkuzjYz5DYo3DqhQB/su2CZN\r\nT4D/8TLqtVK31qAQVDMwxJHZsQkr/O+8Tc76dlfc3psD7L7QWPRiohaXbCJo\r\nCH1/KB6LlXAsOFz3dLUBC5koqZz4h0/OHGxJBAjQmFGpwwvfO94QcuGSzVF2\r\nuVHYSdm4v5F26N5gzxIKYIBpowaSDs/aaT1DnBxSRVV/W04R7aP+k04/lQoC\r\nAowbVUXj1Eo6XM/p/fh80V03avWYxLYzW6/183Ce25eth+JpfSgdQVM9Lbrw\r\n5F17OI/Y2ncCk1qvfayeknQanQb1Lc/7SkU=\r\n=4/FY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"095d0a90fb454ee6f406dbfb147785f98dfe10d6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-25T13:33:04.322Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.6_1650893708719_0.472966766987559","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-a9549d729b16522f8083faf526228c22731608f4":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-a9549d729b16522f8083faf526228c22731608f4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-a9549d729b16522f8083faf526228c22731608f4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"59751bf0e89d16065746d72963dcb4de942ef6b8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-a9549d729b16522f8083faf526228c22731608f4.tgz","fileCount":34,"integrity":"sha512-RF5bdt/ncZIN510BVOWlF2ctwRAa4xLiWMIglTi37x1BXL9IaTPa5tz0LQUNQawlw6n1stblR1Lsw2PnX82wlw==","signatures":[{"sig":"MEYCIQDl8Al0mpkolL0LX5knwwi8G7a0wyFNcZmZbMaXLdfKuQIhAI26dq9iSyOhvAWQGDOacCA+zH1u7QMnEkjLm8KzeG+9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaj3nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvzxAAiNC8CaYbUvvmdy1kxFjoy05SC9T7nuwl9j6nxSjGp4hlemtC\r\nD8WzA3DFNLD7sTRImLQokuirwmyiqIJlt/80keRb+iUHdF8ri8ZQevYqQ9c4\r\nyfOWtPsHQGks/S/8mwOEMSq+PhxDdBq3Th3ezebsD9f3YXttJWIMMTxx5Oh2\r\n+z5hF8N39Tz+yi9IaR2+qdI+kcs5jgmpKBQspB0VCfOy65sKi5ua5ACe5lFB\r\n9fJN9/SG9w5SSCovIo8iFP//UYyb/t+yR07l+H+wnBfwMmbDQTs9LWbuu9A4\r\nX1HDnuma06CqTw9I8oo3isdMPfYKNwHp/Cg1rEXCfeexxhV0pBpyYDVY8GAx\r\n6lbdgueiEuCUUXHgxiThXJJY36SdtWscoHSOJGL6hu+Zcd7XIH2Aq14ahi8y\r\n5hrzFoK9amwmO5X1h9KzUuH3U17QOyD7vqGtNZyt0VuanbxdYSkfVZekyMjV\r\nOGy9jUFjughZt467O2fwdqlYsJU5iK6frvIYch2KR+7zr8TdygyRpZ2Co15E\r\ngV6VfG0N4gSWhEfpw0wo3oW+jV9SwaCheLVLyl9TEyRTUHj0NmMv5+DEVNh3\r\njiX/iiCKcvEEsSXpXLoDXYKDOTefd0+t/So/sQdMZG6eoT5tR7eyNbxyCVEY\r\nE714OXLGY8NnH819XOqmFk+a2CY0TVUxlJI=\r\n=oYM4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a9549d729b16522f8083faf526228c22731608f4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-28T07:07:34.535Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-a9549d729b16522f8083faf526228c22731608f4_1651129831544_0.2809000907133712","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.7-joshbwlng-bump-typescript-1ab32484b86e6a1c98de164ea6ad42ee1b98ce76":{"name":"@balena/jellyfish-client-sdk","version":"10.3.7-joshbwlng-bump-typescript-1ab32484b86e6a1c98de164ea6ad42ee1b98ce76","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.7-joshbwlng-bump-typescript-1ab32484b86e6a1c98de164ea6ad42ee1b98ce76","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c8646904c9212403060fc3068c7b39b96518e9ed","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.7-joshbwlng-bump-typescript-1ab32484b86e6a1c98de164ea6ad42ee1b98ce76.tgz","fileCount":34,"integrity":"sha512-XFC9cAHmhC06r+1qG22za1iTDFoYZg8v069piKwOpKld5JNF70zbX8kctzNpL2LnWhWX4pH4GBGGwYX61dr66w==","signatures":[{"sig":"MEYCIQD0Ruz+z2O5tk6Hw9H6g8NRMShlrMDMhByc1tl9D6PzyAIhAOaSX4+DCVLzLQSzx2ItfDobiECyUUXUejJpyxgjzZkB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiayTLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+0hAAkGP7cM+FLPhU10R4F46RhVaUEcOtaNBaoZHroRvE3+rGLlms\r\nW/6mEhrwK1PEnEsGdp+8RjxwF7HRhh8kAM076iNgsqP87fht5eQV3vzPCwO+\r\n7yfAsJs9zQeAq9Y5hjg7DOY6uYVgH1kUnH/FJ0s4snUVAg5XHP1X0A0OryA+\r\nWAiTe1cHDh70FlE8YImXUo8B4vmu1wkf5QFoScbvwSxR4bTHgIlWVBQwjp1f\r\nwfLGngFaC9fGElCqYiSTHJ8oEHw+swMXcV7cHuRm8rVTONiaYGMuUHQ1ZBHi\r\ny49HLn+qQ6V7m0GGxq683UFQkirE/g8OjyWzLwpq/Vv9iyhYtlY/WHFUxZMY\r\nXjrCIUBFKyw05e1cPPS8QrCsUIMWWY4jxwsQZUemUrQa3PYo9kgFek9CX7I1\r\nUokE/ue2+KTE0Toh/L3PwiDzBjvYZfJ57PBonlg1YRP4rpFrhwBtnPjbaUpy\r\nZFULJ/5yhANT4FtVDkSfKe+FuYnoqY8A5djphM86MikKBXMY/r0240FKWmZz\r\n4gq+65eJWdzTQ+Gr5OBreDeB07DkEQJUUKS64ICteJqFj4jnKFtVbktlLcu5\r\nn1Uqztj78/Cnnhru9yVLdKjbyrO4LBwidW3dqo2QjUUYshMFWh4+oQ2/c9qP\r\n30Aav3kx4xUCl3w5DmrVcpokGsZnH0CyISs=\r\n=Ew/W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1ab32484b86e6a1c98de164ea6ad42ee1b98ce76","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-28T23:32:38.778Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.7-joshbwlng-bump-typescript-1ab32484b86e6a1c98de164ea6ad42ee1b98ce76_1651188939581_0.6279925466967642","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.7":{"name":"@balena/jellyfish-client-sdk","version":"10.3.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6aa90c2c2cd6df49480a160eb321a0c7b7f98d6e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.7.tgz","fileCount":34,"integrity":"sha512-85GIBns1zlS1JGU3HFebQOnPdT6BAVhCzmQ6z23u3u0BMwRQWIcyTdq49huGmtMh9L4eEbF4WPmQMUuXXvnCsQ==","signatures":[{"sig":"MEUCIGOdZB3w72x+gkRMcOSTU2jYwoRra0Nca3JsgaT3jRCMAiEAwNfg3uZCiHCu72F4b85NiJ6BS6eLT6kJDVVt2g3A4lU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiayWnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+aQ//U96aHn/I0xCG5KD/3rsDRqg9v4FiL7F7jzb38P+wVOr7G/Ct\r\n2Yb3U/XY+fkQZpa3xEgz1aLiS0ljVFkngLg4r9ZInXsabSP4sVwRZJxlKpqh\r\nYAhAMx0Itin9/OjLn172Ml/Toq2B+x9kklx/3fN1sUzU0Jd8ThGbMDf/Ji1c\r\n3NE2eTN6KDQmOAV0JJMSNbywOgeq95wvlx9Y8lowUKa1tUF9gGoPnNwyy6n5\r\nF6bjNbhcR0dZMJchTJJ3ULx9et9ls7ILDoHv122ncIushD2U2E/8moPiOIrd\r\n3fpRZMaHelS57Jp8a+t7Sfu9s/KtTGqAwJ/ZN3Aa51bjRJEVHdsckjL3GjKz\r\nZzyBbiukqQvh+izDfuSKQtDMh2tMqfdZBhavkk8f5ulkid5cNeQuNIT29hVa\r\nrrusBlBk5omVYrNKJsZJ4qj9GhIlgPnwDtbThikz9h9r1RHJDOOq74QipTDE\r\ni5/aym7izwT+QC0A7B2OuQw5rxqm9RD9IvnOC+xZd1yJJ6OgSnY9bJW58nB/\r\n9CzKTUb61A8fljEDvlz7q7Zb0ZE+5v7emis+PNAj3KjUFH79ewN23VanAk3a\r\nD/z6DdW5COgwocDlsjcaHp/bfYKueXe94bwOdASbBBgPIIP4cawvTLhsPsG0\r\nWN0xsAZIMzEkHjwYn6aB5L5OWiY2VZUa0tQ=\r\n=6TQm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"af93ff01fc2071e450b4f63975a6dfae294d7d84","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-28T23:37:03.736Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.7_1651189159509_0.8099280548224885","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.8-renovate-external-non-major-fc65f7d5e0db2de935153cf98f6a33b0c2d7eb1d":{"name":"@balena/jellyfish-client-sdk","version":"10.3.8-renovate-external-non-major-fc65f7d5e0db2de935153cf98f6a33b0c2d7eb1d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.8-renovate-external-non-major-fc65f7d5e0db2de935153cf98f6a33b0c2d7eb1d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"23ae6ec9d50519aa4e47435cd95df4b545f4b67d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.8-renovate-external-non-major-fc65f7d5e0db2de935153cf98f6a33b0c2d7eb1d.tgz","fileCount":34,"integrity":"sha512-v2r+7NKOrjrP301nPhpzUJU7XhUhSLFSrHeMSoH7ZmGcWRVH9I2a3Vl2Q5AFXTMKVY8qEeEeS1yfFABFxxLUrA==","signatures":[{"sig":"MEUCIQDnGHwy4XhMKaniSj8hi2de0qz7oGr6sE7DRzRmUUbMmAIgexDp9ACNQnd+qvkriaaKvrX+FK0p+9IFO7oyBdXnD3A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287306,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibJN4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrpbA//WlwzOX51ttyuTtduP4tO9UfES96sP/uYcOPpgO3z0ENiyaxi\r\n9lmQ/pZUoHUXadudhwC6nLwQllDS1Fepb5NWFulyPG/wQJGMCF37FZb+Ufia\r\nBDA1kpdoW1H6H8yGcbs1CbGTiHbAP+m9LAyQjy/Cit0sW7VP4P6msjBbJY9e\r\nkZ6U5jf2PBAg3tPGGMCRsLIzERyCBIilYayBrPe/6tbsBA8KA/jv5GRFMyw2\r\njfg89ugKbYB59+0xrgurXXsZF7+IXdVfnDXtH3fgX/fyJmjerQKdSfLDuXJf\r\nfT53MXgUNb2MzH8BSZ4/ghREtTTLB7n+KhqkxLBnN7zL0KNVtIbu216KcbSp\r\nHC/pLK4Il0V3ETk3lbSXMQEMkbq9W5wTIoTeFsxqhXUVdT7KWOz6knnxEDcn\r\n9XbObC/gNqDAdNXdb7Su2DpjyrQAvvePs44kLBSXl8oUECy1DksA6u3+USpr\r\ntH2gIubUBm0SA6WP8ziezA/tJ+CTG25C1BTwBUrIW/jDB+CcUcF1PkaWg2OZ\r\nfezwwO23OOpYG1WghqGKdEV2GpUMo2ZLpiLPKVDWD1J0MDQp/3QTfAXzNPWc\r\n024sa7cIPZMwn32hxEA2dHR2kJpmK/aIqt01T66hZMiJYrzt2idh7GK0yphR\r\n3YpaApRCMMdo89KsqB36+F25Pxlcc0O5JRg=\r\n=q9jk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fc65f7d5e0db2de935153cf98f6a33b0c2d7eb1d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-30T01:36:25.023Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.8-renovate-external-non-major-fc65f7d5e0db2de935153cf98f6a33b0c2d7eb1d_1651282808559_0.5840080618637851","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.8":{"name":"@balena/jellyfish-client-sdk","version":"10.3.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"820b4955df4c8e303be9f13ef34d30d4d4954d93","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.8.tgz","fileCount":34,"integrity":"sha512-McWquD4EHA4kwgeD5NIxdzJ+QLXziX2uZyXyrFzpkcHbasLa6YQDipdDWHURm1HyV9Nc3hkWAD457BW56sMdQA==","signatures":[{"sig":"MEYCIQD4u8Dxvi2Ioallh8neLvxO4YFvpw2HmhEeEvTSw8kf8AIhAK9W3s8ReMaCjmsdRhSDZZw7EX9T40ezYC2oU638S2gi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibJRwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoleA//VhFwFzppsXCvf4yv3WEY0FGHZWVpD8tFMatAjnaWZZqAcAmY\r\n+cNmYmC6KO7w1QrfYl+Xj9Itk0ehFrzVHvFkLn6qRAbhkHDOXihcXGUbnvhK\r\nn3WShtvssMP94cwlK4rrOQt8SsiddKxIx98EjLlmw92RiMV2As9y563PsGgl\r\nAPCZo0zqxCZtG72GJVBsjRSgb9i+sMcQpB/VCQ1LBrJrUKiHC9A5BVlODxow\r\n1Km7gIhayBFU6wRGoFeULs1TcpGtjQwlwtNoj1lJ7BeZGeGZm2SCOEcn5gSf\r\nIc4sKj/ecMrj6ns5F8icCiUBt5HfRxSANQbaPlK5pwteh0C28N9iRkzfceG1\r\n3Rgcai1pfWK1wuNl5qr/opyhPypkFwlyDfgoETNIihXZoW9P7k39EgZRyKJ0\r\nIEf12jnT5y6tFPvL7reBCddhFeu4RR2tdWi2oH0B7zrZG2UbTxZUaAeRLKbP\r\ncc+dORQ5o0Iu7Mbf9VatfbXM7SfLrme6YEUn9APCwk7in9J9MalDOPckBPLL\r\n/MFgmkTRkk+1aroBTUqqJ9jnu9/i9l7fDXNInmQQte+CBG5jnxEKRW1QtlEE\r\nQNtT+fTbSEBjgNTsuC48fagJUWxCO/iK6lx2ISBhXZ2y77XmW6F4E5kLCWqv\r\n+hF7NNpYM7rVbUODubpsCR+ckAiNoz8p95E=\r\n=4pf7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4c485787ab12e9f3904bc47ab4252c61a5702bc3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-04-30T01:42:10.872Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.8_1651283056389_0.2935097677199896","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.9-renovate-major-external-major-aacfa68e773fa442bdac3d7319bc7b918d559733":{"name":"@balena/jellyfish-client-sdk","version":"10.3.9-renovate-major-external-major-aacfa68e773fa442bdac3d7319bc7b918d559733","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.9-renovate-major-external-major-aacfa68e773fa442bdac3d7319bc7b918d559733","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dd3856db92c6d1f56d0994945775178f7be8a102","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.9-renovate-major-external-major-aacfa68e773fa442bdac3d7319bc7b918d559733.tgz","fileCount":34,"integrity":"sha512-n3cshAA7eZha7oRnuCFUB1jNoPKX411FuP2hxYu/yIJ3eKMrxaz1DOrGz0vG1pToeN71ySQqS2cAStaX+GuQvg==","signatures":[{"sig":"MEQCIF5u2R9cC10jD5cLMno9IgLVTh7EJuWvYUfcFxqxsuxqAiBkBphaDsf1PJQ3HMiiOquJU95uG8zq92ENETKCtTPcLg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidcK2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrf/RAAlug/w1H9dSTBeQmDhDGV881FzYR+jGkyM8793r3S1D+sUEwg\r\nheI15ADHVUMZdCJW/H4CQmJWsElcqbKr4A5ILNjzW1ChDTb2HTRWyScop6vg\r\n8tPMKpd9V8BY4Mtg5uVL1ydPR9upoI3H//YwCIfijf0qZASBILAxPdtwYyQD\r\nk6tlWB5ybSWPGpqQbAH9qoMgmtZv9xRUhIkJl5dumpNjJeQgtVQoj9ioVs+S\r\nUoAAITO5NPFuLBlOk0fV0ljkIaLOmxoX6ge5166j5ds5RtsDWVBLONRzX7F6\r\nB2LWNOpyt3AauCQHOcfHV2y9aSZ0GYtRbqtHBQoOODxuyo6zRXpeolOZUBV2\r\npHeyppWS8+XyqTIwRrycYh7seMdp/8XB6jkbLRDsPVFEdZYDRZqQgUK2awOW\r\nfgxPGtS6poyg+5snuMAn3710migSWRVboAWCoSGdufZyJ6w+vCk8Pcq7Z3MT\r\nqE/WB9KQI79hOFkwsQsL6cchARgdiTTY/N5g9Kqqhj2XIFg9HhW8t/jF7ChU\r\nF7HB6b5x6V4sZKEVGAP+qpDpxOaIE0t/LciAaTYPNhlXajSxDjNTjdMyd1NL\r\n5D29ySuDqh4iB94svtOzXeLAxDUzLlV1edMiiONQ5c9IF08rX3HM/V8Foiy7\r\nSA5wCpgB2l/suvfgGvQKo7yCYNnG/qaueOU=\r\n=wmRG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aacfa68e773fa442bdac3d7319bc7b918d559733","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-07T00:48:15.376Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.1","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.9-renovate-major-external-major-aacfa68e773fa442bdac3d7319bc7b918d559733_1651884725936_0.5334038588405985","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.9":{"name":"@balena/jellyfish-client-sdk","version":"10.3.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3c01b894183fd1061219268eeb2fc84000724007","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.9.tgz","fileCount":34,"integrity":"sha512-z9VGwzjzhSRg4kmk4ateIBjdSdb+rSL/j5mzGHH5uFrcOoFOwOJuYXEgKpRHUdjKpUeXbqaEJPr4s9ud1YWsow==","signatures":[{"sig":"MEUCIQCZbmHiYVDPLcXBxzOMqZOOd07CmYzTl+gZMd6RbL0UcwIgeiG8FD4NRpot1TK1vpmvAsxQm2R0VY6pMjEjAENA+hQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287301,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidenEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrE/Q//RRe2gX69FC/J4TIjsGlvaE6KhVyI5KTnX/IZZIWOLy348e9L\r\njsOmbf17irfiCMR7W7wGlHtVKjQyeaOd49zEo1iEkjDJ2BXgXAf9FHld33dp\r\n5YJjPAYXXvPg8bGs6P8yOx+uodAsc82WH4Q+7mSw6vBU2MlM12aXJ1wTqMpi\r\nder8oleJ0zq2ctWby6MmBSbt16fnbny1dortQlOJv9I8WPyRIVmvlJnvpx82\r\nzfzj3VfuxFXTTpSYiqligpT+KGKN2q0hSAgEAwOq/ezsVFu19W4y5KhTyA+J\r\nupGzCzIANQM26dl9o4OG25qofrdMhK4fIxTwF4bgYR1b7rksSsS5WjTQABA6\r\nkUJodjNFXSM4n8P/kyid5Nn36eXXBsJYU94lbUo8hkds5974bxzEAPbae6k1\r\njty8rE6lP1+vhq2/hAUBgFOyIG/EPpgda4y/lzWc/geikbUSHF/YmHXhIa4o\r\n5emPgxUDTAdkC9rD3Y6svRbcX3ihgo1SenpuH3UXLiFakHCBLVjnoUhvdtqI\r\nTCZcprV0DgIF5SeY76UKQfcStxZr8sRgzzwY7VzpbGwfAbQT1JYyfy7wcQXi\r\nyXeqG1WNsfovOSjV5hykwQYbV//qpvtU5WkGidfOxAIwKqDPDKoetkoLrLy9\r\nma+NjTpAZ80DcZdg4YdnpkBPF+Hd4/T/fEI=\r\n=onEC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e0892a17d5c534b3c8acc0e96097564a31585e7a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-07T03:36:40.346Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.1","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.9_1651894724181_0.6312877023607266","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.10-renovate-external-non-major-61846772a591f853adb2abaec80ecc95c297a05a":{"name":"@balena/jellyfish-client-sdk","version":"10.3.10-renovate-external-non-major-61846772a591f853adb2abaec80ecc95c297a05a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.10-renovate-external-non-major-61846772a591f853adb2abaec80ecc95c297a05a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"80c7118f78f36c4820937ed52b2534eb1cc65688","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.10-renovate-external-non-major-61846772a591f853adb2abaec80ecc95c297a05a.tgz","fileCount":34,"integrity":"sha512-IVsyTyeJ5/9eQMiCn0jmgg8teq2KCXEbub78UOnDLtJ1GGul+rmnCHnGvFF7dF0QtjwiF0QKr1PEgQwiIfpDZg==","signatures":[{"sig":"MEUCIAOYcurgHSk+WujrJMV3Thrpw7djnhLspQCi//VGJLRaAiEA9z5lJxM7K8b/WuUbGEFlrNpIcZL7YC05qixhKuT4EsY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287440,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJid5B/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoErA/+Lf37rGceS0gpI3Iu2gSQoXi1PtsvT71FFldJnBcFvnNYHg4D\r\nINB25enYRlVQQ96hSvbrDACRygOo62gsME0XBqyr0bkwncBK8KxeiGX6EUzw\r\nHerud1FQ6WirLF+ghRvroFCAcXn3Sh1vuEC4eO5+XVWPUk+wN0iN2Z/MP+zu\r\nAJa+iujBoH12UgLKXA2YPQW3tnSs9aufZLP57Slamp8fhsVqBc9Uq/9omRP7\r\nw6vfRwvNUTwoCrfUtWa6ImLds3p53zRbLUZrkT1G677IjPuJtgSlcloqO7G5\r\ngZwyVFNDI/11bYoXHglLJMGq9uDlIrC8nTH6aTl56L1uAzWYmf3IfV3Kq4TH\r\n2d5JkbYMUvDIktubB3mo22sN1/NMPEzhOidaLZhVPzwSH3vcPy8vnI4OQcVA\r\nfZAFX8/ucwlB8EcFu8Ij7aJUvaVyUmbqWQNv5nQxFLnHCzq6xka+30LHOJFT\r\nl88uA9EYtIN+AWMdEdQYaOOfk1yrhzE2tPKuVxr8x4cX1YjrFVYYX3dUFz6s\r\nz/R1ny1Zg6JpLqOP02TbWVEjzaH8AqMzvIXsrpyIlZE/eJd/sUsRBodeIeG1\r\ntnRycSTRVjgL+Cm2QE/C+WWZi1ucFHGjZZJMoIuXu6lNAgJz8pTkKzDBLCVi\r\nA5ZcoZyFWrP2SB4PDvEO+aJdPOgigno/40w=\r\n=C2x6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"61846772a591f853adb2abaec80ecc95c297a05a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-08T09:39:06.638Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.10-renovate-external-non-major-61846772a591f853adb2abaec80ecc95c297a05a_1652002942976_0.7669904851558638","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.10":{"name":"@balena/jellyfish-client-sdk","version":"10.3.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b4fb91da27778f66db67b56e01b5eaeda3b15061","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.10.tgz","fileCount":34,"integrity":"sha512-tdG5lpQCilOgaQJzv99uzXJtfcHjCKV3C/mLCd4pOEBE3kmPcZ3m7cBOPAoYD7J2I9PsgDKvqPKnGVA58qQx4g==","signatures":[{"sig":"MEYCIQDk8O/qQBq2njJtah5p2YgC+e8Cj8L2Y/2yZG29Jj6WowIhANDQSvPKGg4oJVZy+bHnLZMMBozdH3fLjjQpBapbqLT0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":287371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJid5FrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovAw/9GR2tBx417fPonJISMqVc/PqdaSK9PcJdygTVVDCCYeFfDyj1\r\n4XfYvRzXmupKudKfGoKLqqMj7hR0ICa0LpA86sJb8ErfRzhEjaji7x9dcCgN\r\ndjqItrGEwz1UBsfyqmiAS+30rt3aZBiVowK0FZ9S4BfDNh72Lo/jhhel1qTg\r\n4kdgmx7dwDQxrpKcvLkj4cn4+hZ4ej7br0fYXXshEyRkswGBT63aMYy8abH5\r\nkOPMttmqBOl+9hDK3N91hj9GK3Q0uqAeW1aty+lum7HF66CBVJQ+hTR/wlBT\r\nIR0V1OjDL0xEyr+hpwKjQZyfIqalbXfk1w8pWmZG5CJwyN3nb1dJJt7x0vvo\r\n7o8lMpNtIvMDMSXh4ez25/OJXM5hZpPSavUEO8e6pozu5OmSwbQAG+jkoigd\r\nCYCWo7Nq/h2wW2WNuUUvAQ/i6pwLodONFzpPhVw9FPhOadOFI/5J4XXcjvRx\r\nPZiI/mWF+czaVZqUOBHzEOvRsf/rUKKjtjjCHJDDtf/eJBEPof02h878Hmau\r\nL3QoybcLV8zKYuIM0tpPdIlgibWkqjypBS49if8TuSGzRh7jg5cYjj67YuQx\r\njns0+Ncayqm1XhZVOwQC6xcFfxJfewUCR74/D39CXR9bDg4bYoUYW5Lt+4cW\r\nlXZNgSoAbybGVX8fKc/Jo8kL2D1V08K+yuc=\r\n=+FVM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"df741fa09ef706facbc56b8409e46cf758f481a0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-08T09:44:14.555Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.10_1652003179002_0.5595431221295373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-8ea5d5b4586a65a1ee030d4a65dc3a82381b86f0":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-8ea5d5b4586a65a1ee030d4a65dc3a82381b86f0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-8ea5d5b4586a65a1ee030d4a65dc3a82381b86f0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c83aa014956860a218c706f46c0536ac665960f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-8ea5d5b4586a65a1ee030d4a65dc3a82381b86f0.tgz","fileCount":34,"integrity":"sha512-uh2LCz/i8y+Xo2j+xBusqao1bINU4+23S82N1KvqVPXYgpYrvH9bb43gNbZd4YgQ8W3d8Rpas9K+mqCfFZUo1A==","signatures":[{"sig":"MEQCIAn5UtWXUuCSChdm+fOhmMxEUTm2TknIKu8VIMGauUnGAiAnIjXgxC60ybAHWLj1whIjjTMBHh+j0UdOzamsFW9Big==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieJorACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmomYA/+LocJweajRBYnIG2f9x/OqsbqnFH13vzR1k8jga8rCfsksNsr\r\nb0vBU+f7Wzr1UT6vpcOLss45Kn+MvaQLN8TUAcHvvWesGC9czfaXi6ZaNyc1\r\nv8OA+K/nFGuBhd8QfF7sXYe0NAFeo8iECGlw1kUgpfi9meqmrnCKzOD34/Xs\r\n2Yud5JBvN26frhVlKoyXZ9LL7FCoeAxu5HbC3eWJo1rg45QqfJ5VxhNuY4ul\r\nJiXv09pyHw+h+6Cgp4yY2OZ4yyffg3L0GqvTk4DS2vPclQehgnrKaNDRNGMF\r\nLfbCRsMegVvRRnrJthxs2k1RB4Hnr6sj8H3oXfqdllhRDrcs5rsueh9BZZvh\r\nRFlGkJMxFWvwcvxPtmNoWAnHek9HrIC+3rA6zcmvYNi74JYL5KZVBG8ffMBh\r\n1VmjzFOg3Yu39vZu8r+9s/z7EjRokZn45XNJs1XVeSFDby7C+YqNFllgyVHJ\r\n9ym+ko2COQgaxni9+GbWq33kiTB2RZWAFgSd9uECCB99lsEVtsOB/JIB4Y+U\r\nuDZEoWoc+9PK0AWLFCTs64j7E2HoXPFUFdHFgdKeBSnA1EtXyczDkvsK3Sq4\r\nlb1Bl3qPCDQYIdNLgY+wx02rzgYHYwXHELxBplF8GvhBNzyq/e6VxyU6FazK\r\nsFvvCV75fYarjRASXPD6cCA1IyW5JQvM1Lk=\r\n=DLM4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8ea5d5b4586a65a1ee030d4a65dc3a82381b86f0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-09T04:31:35.774Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-8ea5d5b4586a65a1ee030d4a65dc3a82381b86f0_1652070954914_0.8354050629651264","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-4e4976d5f282356d45feb90c48e1067f6ae0df84":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-4e4976d5f282356d45feb90c48e1067f6ae0df84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-4e4976d5f282356d45feb90c48e1067f6ae0df84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e307fe2c3241609391e70ecee45fde3c1e39b5d0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-4e4976d5f282356d45feb90c48e1067f6ae0df84.tgz","fileCount":34,"integrity":"sha512-CSLFvZgBWTVR7RAVwpX+8QgUZ4bgYWh8MllrVXFkK4zqwf2MwxR/IYdwfJsxGGCXAKRIPV82sjZci5vGP6AWRg==","signatures":[{"sig":"MEUCIQCPBPmN/29t5s+PCCFRCVWjPKDL6hBnylKopNMcRLSMFgIgL1ADH48hY2TdAImlk/jMHqvVWBaxNBdtqYR8HLEfYmc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieJruACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrh4A//W/xqHV713+i+ubzPm5UqCDwcadDMetDg/FTK9pd+nOyH3KzK\r\nZVItNtohVCpFufoILVNa2q0eEayqxW1nFuiqkA0SJDV1j/iftHUnBVJRRHFS\r\nzjLcCQzaDVd16ICWELTWPnIx2SHahgI1QY0uC8plQt0CUhokiR3hHVsju0zs\r\nbe1Lx1TDG7RCbPcaSdNFFR3gkU8ON/7B7ol2urACQrZo2r0zrZWeOHPArfd8\r\n/hIw7mLaSF6EzVDzN15obkV9HOKs0ld4Uug1Ekf9PfP8Lmk3OWU4wBj/vt1A\r\n2RZgGZ6XUDgIglK/p/LxU70p93Mx8LyvxMliIsay3f+n+DA1+C4Spestah9O\r\nDDWKBwuFai/hP+257E3hfRXFN6FEsLmcAmgOTIIa+LWkWg5ZEWdM8zV9ZCVl\r\nkBWuP1psAEc9GizGbFXAwxOud7ntYNcujXyq1LhNJciX5Xfsd2L0vBa8+ad2\r\n9XQCmWMWWt1O4onXqQWm9crYilinD532pI11eSG/bfHYRff5Atsvn+xIOxRH\r\n4lnTNi/qBRZkBuKc6Vi2SqBIcaNhapYdle+vwUEF0+dTOhOjQ5iayLWtU0qV\r\neWtKNL5EyXY+uaZwHv7s7Sf380VhV9PnP4D3AL0PKMXZ95WixJYV71o1InNA\r\n/u5zZyBpK0r1D4C2Er/yWGuYiGEEdUYuf78=\r\n=Tgr7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4e4976d5f282356d45feb90c48e1067f6ae0df84","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-09T04:35:56.762Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-4e4976d5f282356d45feb90c48e1067f6ae0df84_1652071150419_0.8828362718923897","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-86d68f85e54f97d950c2e2c67c8b21f1fed2f517":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-86d68f85e54f97d950c2e2c67c8b21f1fed2f517","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-86d68f85e54f97d950c2e2c67c8b21f1fed2f517","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d2034cf88489400cc96f3601111e80704e3d4a7a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-86d68f85e54f97d950c2e2c67c8b21f1fed2f517.tgz","fileCount":34,"integrity":"sha512-M7KfsCqRMpqcQEQqknSWNSjB9aE/W/1xFJX1RXYmidscDlnFwnic19WRkBgR2qQ0j04HxWjyRgHHUWl4OsUBrg==","signatures":[{"sig":"MEUCIFLm5ZKwmC/K7C/pzchyNZQh718nqyt082UxzukB8qAgAiEAmOs/42qTdYNSIBEp4YtvZw1WiiWDYIzxn4DoMdYie/8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieJ0UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQBRAAoGzN9ExnTRPfI6qZ5ZJpT2gbRzQYXL+REytRHqv0LisXTK27\r\nLWrmUfWNZbRXZ8cPEoKHb9uUfniNZ6ld01WG+pzQJGI/SZ3PSyYOSCYGfKmI\r\n+a1gZQDlE+PL5M/F8v5jROJgLDx6whRflpxkB+gEL8Jh5Cnyjoy2MlvYA38w\r\neOSDemgmAiZt3XB9HUmCwnEwp4DQDWhaz+ZGFfnnZ66hZzhlSYOUV2t2eMDD\r\nQdJH7YWIP8RboY+M43RVIUcB22V6cLwobVDoLCscNJVonRLAsOdl9E1FYdTw\r\nqBLPNrkajmOexRPTmerkWlCrkGDEyeIVae6dwlk+q1AH7lDAw47SJMVemnPq\r\nZck29RCuAc6nUDEwRtHzhh1EVCCMDpsgqikR6aN0EKZ/Sowy8aGYPGgz6t1X\r\nNAgYEfDi7crrHT6a9v2Z3YmCgOCQTNL1zWZaWR96/3GO8um9Nj/RYrXfo0dD\r\nDiBKvfagTfhSf9HsusFyIXxgUNmPlsKkunjcr9Cgcap3ycOBXoXj02gwzEn9\r\ntXiuCdCu5xfzFjrYsNLTBHwCk0Rotr4H2qneikWp6CqcMZwp8w4MOzLeXmUH\r\nbwbhVWEWMVYtS0WsDeHMdcrG/efS2OookB0fs94+lRRlgTz59JwFlB2UA94C\r\ntaMCdWvzdjtOklylPTR4/QQL9vLUV+Axk18=\r\n=bctT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"86d68f85e54f97d950c2e2c67c8b21f1fed2f517","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-09T04:45:00.425Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-86d68f85e54f97d950c2e2c67c8b21f1fed2f517_1652071700450_0.020426202857226183","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-be854622d184701e5e4a4ba3f14827b95cff66e9":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-be854622d184701e5e4a4ba3f14827b95cff66e9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-be854622d184701e5e4a4ba3f14827b95cff66e9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"47fcfc805a04809787018086783da1cbfcca9345","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-be854622d184701e5e4a4ba3f14827b95cff66e9.tgz","fileCount":34,"integrity":"sha512-omQ8XVcuTWKva2CDtLEoK9JXu0UhOL6zolSoIQQdU4BtTb5E8M6MYDd087dH76iNlq1Y6Ef/5xvcfwsVXL3JFg==","signatures":[{"sig":"MEQCIEZb/4aezaRiWDJrJBA6PndXRN0cuYl359CQL1kiXHbUAiAx6VUSwR9x4qh/4BfAzWYP6KJsVF101CXiJs6T90Ksxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieKMvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTvw//Tq1TSeB/6uW0ZQQwfUxYg3zQlx0AcXZQtxFMEk2fBfaLxGfZ\r\nITRIzQdl3xxh2q0N8RSnAJyQK/eCYlnSpEAr40PshQhDYcD2qPISotAPVh8j\r\noYwHYzLWwn/uYJ3z0T93eiJXbUeFIm/cCxBgyGFBd/fqgTIcrjuKkm6DLnMG\r\nYDP0JEeUgL7FeAENSwwTgh/GVyA4OIAPYsrlvBdsV4k7itgEFJvpdV4gUZQV\r\nODza68rJhcY7H0g5zpuMihhj4EWLH8FXAiso1B9Zmku6fzYeBX2ppIdjD+PA\r\ncCJ8umb3zOnPwDH6TV65BuVGljFDONb/naX4ro8Oe6vlQKlxhHYGkPN4sVKr\r\n5fJXPd2X0ZOagnFebVsWjAeRe2qyzpydAxhlQxEzInzY/bI4euYazbilE/IG\r\nQtog6UDxgcd1itw/H6zqEKPFX4EyIshXYCmt56lBZv70ClSMeP2ZkWzywYRM\r\nklb+u7MQLPdPxo/SyhMwYxoytSE6xBYE19g/K1lJst+KyUFQ7WVKhXn0ihfF\r\nwsyBXi509Zz9m00dtYvky+Fu1E6C3ns6te/ennzvb8BIcKMOg8GLkT2rrLhY\r\n2+604xtQn5Z+vyhd/QZNHkdRA3ht9RGZQAhtxvzg59pO6fJnLx4Lvy7oDYwd\r\nQV+/oC4G4k7vpPgEDM+m/Qzt2DF9u6Scx3U=\r\n=tTHF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"be854622d184701e5e4a4ba3f14827b95cff66e9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-09T05:11:11.253Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-be854622d184701e5e4a4ba3f14827b95cff66e9_1652073263721_0.9035897610866783","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0-joshbwlng-user-preference-links-f4340d3c22c836fe4de89c3509343c68cc2e0e09":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0-joshbwlng-user-preference-links-f4340d3c22c836fe4de89c3509343c68cc2e0e09","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0-joshbwlng-user-preference-links-f4340d3c22c836fe4de89c3509343c68cc2e0e09","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"693b4c13eba0f1088a8d4cfb26bf035a9175ce8a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0-joshbwlng-user-preference-links-f4340d3c22c836fe4de89c3509343c68cc2e0e09.tgz","fileCount":34,"integrity":"sha512-a92rz7ZnD4tSV2AZBePFynuuqVMG5ElBRO4kkLc7PHmQz0wQIkkXP78rpzZvsus1hmTIag1zonfyNEuW4T5fKQ==","signatures":[{"sig":"MEUCID5FQNmYeJU8kk0aZkqKBOR1akGoOP/g8IEmVVXdo7W6AiEAvNMB9qZsTLUi0+t6wYXTe5oyneb+SVUMcgZfHGewmYQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieeCtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrkfg/7BBbH9ENMHogZgnXLbXc/FdxJgqKUzTiXzyolU80PFLRFLxHf\r\nvTaZw6K1qt5xz7kp8Mb80tmApR1iSRUt6bQpRaLAwje5faWjcNFNAgPfI+x8\r\nuGWL6mgNhWLCJFQi3Ql4HxpXF8v6Jp0OKM42Kr0/d7MX4+2oqJh1YKAEDn8p\r\nbTtWrBLXdG7E3RvYpT6dvsebZ3Y2y0apKleira8+jmOAPAWSUSQAXaxaJIoP\r\nfpSkEresccA/Eb9tllbmkWSXjbhpNwH4kP7ZkwkOlPZD6/bUQInlj/5emsxv\r\nPQuLvMSc2hQ9NEwLA2cX87nuie9T52lxXMe9Mirf6LRXQ/J57sOwMcR8woKK\r\nxhnxUGrICIBJreX3mH1s/W/1Rp+cbW4O0el0jO4K0RUtyPkwKcFl3kOGioBc\r\n17LEefDioWpiiU4RWLF5pi1JxivWuglM4/8e47EP3pzqfW0606sKB4brg8LF\r\npWaXMOnXFEGVuJ20P1C/ZaS1GVD9c1y6+F5qseDRdwJYcHFhjit2P8qmW2aW\r\n7TxGydgZZfJmfeS8dAnG9Ff60cAVap1va0u1Fibo2nhZLGX9kuLpp4s6DVXM\r\nR7si6wzUXsf0eE8mREIV8oYk6kMBXPDSyd4b9PQSpueQPmY8VJ51NUzGHcP2\r\n699JxxoRnDU4Unx5VMGjXeg0nv3lTbJCQEY=\r\n=fLMh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f4340d3c22c836fe4de89c3509343c68cc2e0e09","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-10T03:46:03.119Z"},"_npmVersion":"6.14.16","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0-joshbwlng-user-preference-links-f4340d3c22c836fe4de89c3509343c68cc2e0e09_1652154541738_0.9772010946705669","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.0":{"name":"@balena/jellyfish-client-sdk","version":"10.4.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8452cc5ec47964a0eebd46d65437414afdddd59d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.0.tgz","fileCount":34,"integrity":"sha512-nZSeEFthCf9I9p5v1Cwd3vBKHJK9Gc/P1LiH+ULA9UK7zEsOVqKYS3fiHlXOu5XP7YkkQdSZi1jL5IHlXf04UQ==","signatures":[{"sig":"MEUCIQCGtMAcvbQacj+xuZlAMnIihKJmd82Ysy6ky/FHCJVhhQIgeHrJBBSet86BAaaICvvoQ2qwuQTKJ2KQrd10u3S/Yv4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiewdPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqaHBAAiizl90kITtQYs1FehzngfzPHfYj0d4YwiqriKtSz//c9bkom\r\n0oXLGBYmyIU53QGAu6i3g2KaIgIzm1jy4dYGdGrYO/j9UdoWbWyd+x2eFN8A\r\ncQboVvYn1i5e4/bMnvIZIkLF1EHVudgwbLaATyRFwi/E5EsZJrZ+FYJhX405\r\noPEQTJ693A29QeKGAFoQ39qeyVCeQHsqwwvXhxl1bKY1utMOUX98/bPzdnFq\r\n5t9Zy7/W1OBXTsPUV35OJYgZjfg4QvHNf1gIy9gNyRuUnzzxVi2abDfJvFBS\r\nb0OjBOVLKio1xCloDLv89W1jIwhSmCOH1osRroFfrDcMA8X7XBsjZrnSKDl6\r\nxFFypsdl1oQm91thIw0tBQZ1GZZ/pFO2KXhjGwQSrM19yogX8IyBHdRmZOt8\r\nXE/8kdFaSBqdSVh7n6QKVl3ZObVM9KZgflO24TMMO7rNjM65gUSpDVzDyfID\r\n9uxgw5LaK1+stJ2oKhOeEb0GILMcQZ0c4hMcofrIXf6SFksPKrmLKWuRbqVK\r\nG2V1hX6FHRaQv57CE78ejuOaUmG9s6u5GKotcy0cXLldyffQ72qOfNWsRQPB\r\nyXOYVFoP50hXc4IowP8/sXQPa8H4PKvI99NXGVHp1BNRd2AgTHcsTdW+yjjv\r\nVZ79dDpJw3c6HR3zKaciAuhKRxUYhMj8KAE=\r\n=4ga7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"427693efde23d8df28711ec8756f1c4229c87cc7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-11T00:43:51.976Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.0_1652229967031_0.7498781386464086","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.1-renovate-autumndb-20-x-d7fe2ff4899879fd7996c70d102306ec0741f2aa":{"name":"@balena/jellyfish-client-sdk","version":"10.4.1-renovate-autumndb-20-x-d7fe2ff4899879fd7996c70d102306ec0741f2aa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.1-renovate-autumndb-20-x-d7fe2ff4899879fd7996c70d102306ec0741f2aa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"56522d0f5594533dbeb815dd2a7451674b0579cc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.1-renovate-autumndb-20-x-d7fe2ff4899879fd7996c70d102306ec0741f2aa.tgz","fileCount":34,"integrity":"sha512-jqz1SmwvROIuJzCj1ak4hyTbACeREF1xMkc1YyfPHTR71zrNY7Qi1JBtylgi6WKbN0BzAgKLVTE7NTpT8yE7tA==","signatures":[{"sig":"MEUCIQDp5tLFijM5EQszggaVXBlRuVE1Ypzh10Bm/kK46uTXWgIgQCElzSB7g7wMVVDzjHv+KwvGez7DU4VMT/hYat5EQP8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifUhkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1cA//XKIhro8WTygHU8WW+Fn4EF8W0CPoenL2TtQzaDKLI2+1AXnr\r\nBZAxQnCtP0KTiwOCgMqcdoW7tNH8DyeV2AsKfarAwHjXmpqOvfXm0LUQc4tO\r\nFKVb3XAKu/ULj7hYRDFxJ2SWwsmOdiWRJbtquAAw//Be1CCyh+xUVYkRWia8\r\nMaIXIQRRots/bEEAu5F8y8z7I+dTJ6DKfZUq57veUSSTe53wRZhC/YiLXWKp\r\nEy5PeLQ2zNETG+mLExGbZLk0GrwvDXca79Z02vioFQkuRGh1MeIISaDJzX9M\r\n/RBSfBFN8qcuh6AUIJu2O65b32AiGCbXmIUPrHyKVDL6JSm1U7VOrffqsA92\r\nIj/r9sLGZzRWXQW6XRiO4GnZNc2N4fLk9FbcEoaBa00hx3mHRuMAgC/r7Jja\r\ncZiOZEgoMmB1t8pU9ZCkkdIPrweayEeGTd9aoPfLf2PdHY1QrnNyj/XOVsez\r\nVjRMCi02wDp6rOBunnyM1oiYRxA5N7mH/S5V+ivJT+88FlhWMecBq/qnu6l8\r\nVHnmPGrP8W5hpAU0biMo2OypdcNXoS/gna1Iv8hkC8T+HD3Ej0YyBkKR3oRb\r\nDmdpMHxiMZqdXkEw5/KP2i9PL7tTdb2JAYQhumjIm1HmhTAA7P4SaqXv/OvU\r\nd+9Pd0j0Tm2I3hxrb0m8V8KEuGtAbSyDmJw=\r\n=YGd8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d7fe2ff4899879fd7996c70d102306ec0741f2aa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-12T17:45:31.631Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.0","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.1-renovate-autumndb-20-x-d7fe2ff4899879fd7996c70d102306ec0741f2aa_1652377700533_0.19261723054841062","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.1-renovate-external-non-major-0a569a45bcf4f5b75a6a5789ee47069cec3edbbd":{"name":"@balena/jellyfish-client-sdk","version":"10.4.1-renovate-external-non-major-0a569a45bcf4f5b75a6a5789ee47069cec3edbbd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.1-renovate-external-non-major-0a569a45bcf4f5b75a6a5789ee47069cec3edbbd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"201eb554f4dffa8ba4ff2fee460038c92637d78a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.1-renovate-external-non-major-0a569a45bcf4f5b75a6a5789ee47069cec3edbbd.tgz","fileCount":34,"integrity":"sha512-LqYmnsyndj1HrnH3bLxJ4BrY4vDYkdxT0IKyi+jSxYmY7KPb5a9kZLFRoRpeWpHo9X5ga7MXfrIQ9e6xya7z0g==","signatures":[{"sig":"MEQCIEL5BTLW4e/YayC5oLyGz2EhlHUFGcBOsQy/xcBjcDkQAiBkOB/3D0+S707x9DHW2iQ+DLy8o9Ip1+1YDrEj5rbcxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiiFLTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqz/RAAnK8v8rCcPUgk3ZmpPvhHV+IrnB97T7BSsbZ/bEyxoXmIIJth\r\nsXl7bBuUaA76BgTrBsXmQiyQJmgDnJrxhibDKhwNQVRgX4yzLN9J27kgBDNp\r\nI67BxaEnOa/gk0A3uNAercVDhtXtiJ+2K+CQRp+9wmcv60DOseOBs1Eg5tsO\r\nVD7OSrwG7MlQmGjbCOQ8mDEEewxzRoAhAgEUo/FKJYbwlo/PbGa7nFZB0Db7\r\n0fHfhdtOuvRpMHoWVwDPPAtB/dPluTbMZY+PDlPROt7PMYiE2Nhe2PhNUY23\r\nejsHmcAQT3zhsI/1PgHizIx6i4uz1otkTke+OEozViDo0TPAGzXT9t9uFSXu\r\nF+Ybrn2UjLO72JjzdlAt7mi4bruysRok+DDGgL5W+kvfw9YpknTY4YXgVR6S\r\nE23mspB61VSAFiE2lFFv2MWTf5DXsRREY8c0bklevWD+exkM/P+5Axu/iN2z\r\n1NYz4An1NJ0+FZD51L0BERhENRNJOyzXtfaxReNJP9NLhBV8iXfasxN+sG8r\r\n5xp/I8e+i1vn1vA7d/eoulkwGUBlyrLtwMzqsTVnebKqDTmY01QoxCXwKj8h\r\neOKI76BS1sl0vlydNjFgSOrb2g1tBCC30VO3jIyQk6nEuU62IesfJ5CMA6o6\r\n/goh/d4alPN9lHpIwFp32MAVjfDnhxOf6Po=\r\n=cvnM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0a569a45bcf4f5b75a6a5789ee47069cec3edbbd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-21T02:44:47.810Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.1-renovate-external-non-major-0a569a45bcf4f5b75a6a5789ee47069cec3edbbd_1653101266979_0.04813925173834921","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.1":{"name":"@balena/jellyfish-client-sdk","version":"10.4.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"58591713f4c23d56d9e29cb733e51994a6b5baaa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.1.tgz","fileCount":34,"integrity":"sha512-iLSuLWpnVoiGk02KZxBW2pzEEK+df4LdfP6nvDa8qtYpNyVtVglGtDoWAcE4/G3rLbT6u0NtIYZYlkhpcbI6qQ==","signatures":[{"sig":"MEYCIQCjWzEuc+aDVzu/tLVXE/MZReSmEfZ+SuZmtCr17q5/fwIhAJ+LkhEYS5e11ZcaodNeM2e6eqszGEUK8TYu/wE8SZWA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292369,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiiFOEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmptfBAAkBWfeFgbW8Jh8az2qO4/pPH6t41iNCOxGRf9aRVUwLkqfSKG\r\n/REp6J62/2A9+Wgc6L7GxMaFcGnKs6HwsmQFQ+2ZCpYCmhBvKRockyis9pK7\r\ndKbfq5OP1ptRbDwc4+i/nV36+kQ/SXtAN/aO+ewgwDRjClNKf6jUtttp1NG9\r\nYdLNM2GydwR97TdyXlCYUHMmddGFjGq1jZLADNN9uXlq46iPn91ZnYnUTuyi\r\n/W8YTNoQUvA0qs90bkwc936ywX0aARaKpUBOmPAe+xWPH22sTxPP417tEoy0\r\nlxLaMeO/BfltTFApEvAiKVHs3Ze+6HvNA4O+1L6g+C9NMzHyjZ/46/BDDcdW\r\n9j7z7YauN3vqeDR20ACyPTZvrYF3fEQXMBAJfYuQdmIAs98hdvVpgxRMjfPq\r\nn+Mjx09pvdqd1QXXBhOVdMNSCNjrcNFP0XqPqtRUwmsjGmaoS3Bx+Bnj0rRW\r\ntVtKMNveGuIdByuT4CtJmJROnMRubRPqlcsiAAB4/kmQEmRcZ2VrDv1vPL8L\r\n/E8bAYvTwfnmfV22QgNGMBdnVHfHPGgJzSChljEIBNke30tftFVuNaC6O8fm\r\nlSfueYZoduzIUGxPFnKxOIfI6/8V4xTKPkSXInYrZgFsLG5ZIF2saiXXnu6r\r\nOmH/vqrKEtY170u9xGVeUoOogW+Vs6xB5fg=\r\n=EDo5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e038e70db64ab3bb3148581c48f0b6ba4ddfef74","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-21T02:48:47.571Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.1_1653101444663_0.8109780088116771","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.2-renovate-typescript-4-x-e974823d224f16e1e656adb3d210c6f1941d0b35":{"name":"@balena/jellyfish-client-sdk","version":"10.4.2-renovate-typescript-4-x-e974823d224f16e1e656adb3d210c6f1941d0b35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.2-renovate-typescript-4-x-e974823d224f16e1e656adb3d210c6f1941d0b35","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"28485b13bbe564ee906940a3e5020cc1b70a0277","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.2-renovate-typescript-4-x-e974823d224f16e1e656adb3d210c6f1941d0b35.tgz","fileCount":34,"integrity":"sha512-ttHB6B97B834VbyB6fMYFVFE0QPDUUPxCawTpoF4Pig1CQLCWr4sAEoBT/DTShzHQW6ddLeCSL+edsJ/7rsRng==","signatures":[{"sig":"MEYCIQDOFlzgFxZ3tlF727bzaNSLrOuhVzXU8jXTPcO4mmMp8gIhAIOQIWi1wfIaLvdUMv3h+Q7nRiB3noLfu7yvRz+JGX1P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJijU87ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrV7Q//Vj5M9XxPPx+fS7+NsUiv9iwGW3wXDC++T6hcjMIO6DmHyhfX\r\nwnegMQjQjPevPnWPUhvRgPTzsrhtnVdqj1MpE1ngu+bkNZFo83tp6FlPSCwC\r\nhz52kCCy8+7BkKNNXhPd5LECmLEmrOJhdOXtLsZT3W/5P0ar+1AW2jLUaRk+\r\nURKeoXv5tDbPxPjjUgxVHY8YoHyRH/Tb2kpnzGknlpzBqMgUg5oAWVwRjLT2\r\njcLoZAhskdyUWapoZm4VqZXTm/MTobNwHFJm1lu55qA6OAZepMETUBge/VU1\r\nxFqB/ECFmKi2PmZo71Nzp41luvuREd2zMaoxA8pEQaGKvKy4ZjlGA4Nj+cJd\r\nObT5LX/iqyP37/J50z5IFedKfe5z3/p2Ygzl5AJT5ACAWN6v1qTVOL/DDhMq\r\n6x2GKmayyusAcdn9G78iwzUlI1xJw+SH6xgJpSPkm7u12BrlJ5O6V8ixQaJo\r\nHVAZ5JUMbhqtc6HIs7Zi9oUdbVViDvStbPrUIkQyCbv2e1KVA3ok+ePvysM0\r\nUXgu9/43oymVTH6QKYCdu5vPiNa91uU5yA1n5EXdfUCaygupPV/ye8nGhpEv\r\n3gt284ZhzvSXst/qOrUnewd304SMOIgFtVqwMkq9uYzdzktj9k6cgYsGtmnA\r\nDmBwF0qzk06875zwxnDziy2FKtIGwR5DMV4=\r\n=/LZp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e974823d224f16e1e656adb3d210c6f1941d0b35","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-24T21:30:48.074Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.2","typedoc":"^0.22.15","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.1","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.2-renovate-typescript-4-x-e974823d224f16e1e656adb3d210c6f1941d0b35_1653428027437_0.16758520656936704","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.2-renovate-external-non-major-85a70fe0a47e17277263985c37c63213a5ecf422":{"name":"@balena/jellyfish-client-sdk","version":"10.4.2-renovate-external-non-major-85a70fe0a47e17277263985c37c63213a5ecf422","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.2-renovate-external-non-major-85a70fe0a47e17277263985c37c63213a5ecf422","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0684d06297add4ef7abd6be9eff372213e66abb7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.2-renovate-external-non-major-85a70fe0a47e17277263985c37c63213a5ecf422.tgz","fileCount":34,"integrity":"sha512-VWs9muaSyydQnu01iKcQBaGrLnXIWXbfisZLnd9eCYSOpoCSkdoWWbzMxTKyiZ6vzLS0AgtV9h+MQ0n/k7Cy9A==","signatures":[{"sig":"MEQCICc/yL24kzjgFuNnnQv6Gd+LPqwZ8Fd2HHsKFMmNDgtOAiACfQcW4K21yPaT7vryAdv0VKDqXKQkhqNRRekkQoEuDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikXV6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+kw/+L5SYZZUnblsBluL4xY8l16QYe/Y8vGXxG8/Lqqk+HcjFuA7d\r\n0uFxTV4OK/ezTZG74XdARtyLa1dW06EkA8Y0BptatIiGfz2WCJnXJoSTcjfr\r\n6K81WxZ0DOoT6r4tbSwY3Oqyo91vJxDvUEO4L1Oh04x58chDul30cJJ1evCv\r\nuiiSsPkwdgvp5I2kEiF2XuRzAK/MTlSV/szOFa7mYWCyeBt9Y+MiFZTAfqEb\r\nQwJhabAG0qSqUugOQqxvuybfIqTEG2GkkWUeDCVfCWuRt3N7sFhHqXS1hMg1\r\nBH+GveJorAUz87WCSZH7iIpmx3iqHDwwrUbZKbr8iidQkRgH/YA+pMLYu/jy\r\nLh2D3hkyPOLIEMitH1mqYJ6HI9kgc8AeGQdHry3rSghDeT0veQoggTq6NigJ\r\nA7e+Jg3Her3z9sKnRQJba65qdIjuR/nazcnluzNQhY0HdRK4r1z+W33WMyJO\r\nISLwtmPWHe5aJDDZ7DCQ9xcPhYmMjXvFxBVCJ89VxZNaV6gLAxPI2d5qvJpX\r\nV7NxLFYZKk1C3NbPAF1OW08X+yshgns3LmVEje1ar9wWYdvq5Vr0vouLhGlZ\r\n/ad7slUwOOHAWSFWb08wyKVoQGHMQ36XghDUcYVscffDEiZxamiBaNiy0q54\r\nvIsJ9UqN93nDZpQNsPonhHHOZzZsK/5+oks=\r\n=m23k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"85a70fe0a47e17277263985c37c63213a5ecf422","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-28T01:00:44.178Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.2-renovate-external-non-major-85a70fe0a47e17277263985c37c63213a5ecf422_1653699962260_0.16620974061898863","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.2":{"name":"@balena/jellyfish-client-sdk","version":"10.4.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bfecf41bd585bc36c67246e299454dd294600987","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.2.tgz","fileCount":34,"integrity":"sha512-n5qT8524S9yDvSolvieAYU50ezkM2G3dJRr/Vw64bBBgbr0RICqzFo0awbTMDCdoNYgloASfBuVze8S3xafPmw==","signatures":[{"sig":"MEUCIQCTrYEY6XXrUIpbkOVdvr5T1feFESufxiqWesUZxQk5HQIgHlmGfttYTAAUGa2W5v0Fc+3UH9UXV8zFxUs/Nyitimc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292464,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikXa8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCgRAAlgYRnaheYqNsdBDUZk3xV/x+ldhtI5/aaSBtfXZdIsE1Z5Zh\r\nM/IRO2wtvEUu5XGP5oKY/Uez51BU9SaVXKXGj0XLbfHOv2B+SzbYO7xX6ATs\r\nq6+IgRrtjWE6LyUZd5IHOII2+uyfqyvZw1f/vfletgQLboreeBQIdBLE3Cx+\r\nGaEJaEnwOYMbLmW4rLyhBSaRxQwyO/NNTMFoMMfPltwbJxlxcdRhq8jvdt88\r\nSv4xvh9zoFitcGzPuY4baQYOZJsGAeWcG6LfUZqIE8IVy4yzTRTLRydQRcs+\r\nPJDlsJK5YBCa5q6qwS05WzqDehut4qPJCfXel9nP33UDUhlqL7HRO2sbvy/G\r\nr7fwSGW6jQyRUA1cN2wTQfwyBXmUcclYpISe1HZmVHQ+45ltEvpmtB8AX//l\r\nT/M0mRCJyB8S+vcrlpRxa+RkSDLZS8BHavXtifCjbmQAR2Ke958aYr4ey6RB\r\nT/IFPn9fbJ1HBkky13k/Ck6Lt9nv5I3Pb3vLeYY/pbVKh3h3RIIZAz9OpyPd\r\nnf0dqYRWHdBSqj/Cgi5fBYVAtop+VfMtioYEOeYoJ/2jlDWv/12RehpxFbKT\r\nJp3COZSBLliPHkfdLHUcfR+1QcjrNssdOKuUu1SWkHDTZ3BX8DDpGwVSj/f+\r\nDtME+fMRcAd6UQFRYeBM43sfZSTsKd5hU+Q=\r\n=wIo+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"95dcb9e5193cf38fd6e4d4b93cbd0b31b53440e2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-28T01:08:27.342Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.15","typescript":"^4.6.4","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.2_1653700283874_0.28018172972643085","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.3-renovate-typescript-4-x-30c633db6a5a839fefa7450766b9bd5a42b36607":{"name":"@balena/jellyfish-client-sdk","version":"10.4.3-renovate-typescript-4-x-30c633db6a5a839fefa7450766b9bd5a42b36607","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.3-renovate-typescript-4-x-30c633db6a5a839fefa7450766b9bd5a42b36607","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca4ad4d38adf10c54c1cbebe2d756a5bb600b88e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.3-renovate-typescript-4-x-30c633db6a5a839fefa7450766b9bd5a42b36607.tgz","fileCount":34,"integrity":"sha512-9t26cy3tHud1TjuVd4gyEeFPwVtTHGzJVfGnApKiTD5YSdXKRW4UrtTx36oaxnLFrP3Fvueixru5sK9THgO6Qg==","signatures":[{"sig":"MEYCIQCDk7H/wMdnOrJ+5sftA8VNSZWJQBbUtdHsU3F3xRwLhAIhAJy7EDBaOcd9ItYqcL+8Nx5/O9vpmSigryylcvCBi27g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292609,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJikXkGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0+A//TCJSy441bqMBjPHGouocLBxBC65vVKuDDomh9fH7kS4sRBK/\r\np5YpP+AtLxybuldr+74MF/5D7yuEBEZ0pGtbqvamsvwITzoV6OSHrw9dP9uz\r\nYGGfghpGhtaJQcaaEydKx8Js6sQqCZm+HRyS69ghNJ2koC17V17NLRft9oTy\r\nYSddj/mjvdhi0Y44+vNSQTD2EBZ+drWokFoshHWx2loXrYmH4V1iOYmRloT0\r\nOX3N4HbSYQpJZ8Czhsf+h0AsqJTMsFT8lJc0nZxh6Br5GXwoj6ob3I+Ak9s9\r\n4j1ejvK+BDQkLKiRuraqKbxqne1lOPPKzazl3EhXRtbY8x7ne4QOzqX7K+Hr\r\n9DkHEjXWiKDj39T35XqyabyRlkzULdimxarV1GQeTquVrSScyuiMUd/v0BOx\r\nwEc/uA9D4WO2MrlbLDW9tigvU32+22qO+yLvWosnCT5vDbTl8Cc3DyzV3Csg\r\nOqpJlGWWjog4K0sD+09L0h4bjcSaUwpwrmxFoNqsdhCp2+pQouZ8XWxGo+uL\r\nBq7k1UIA4hAM5x5xyl3v/WNGKhtX6FRVkP2t1mImMaSFmwKzae42WuxdFYL6\r\noYqIBNur4kfYr6e2iBs0Oo3EbG3KUypZ7EAAfJ2alWkImhMfDcx5dkl2AJQi\r\npoDTnLzbVKXMYZhyHcTRdrvR0ekdcg4/g1o=\r\n=nKxi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"30c633db6a5a839fefa7450766b9bd5a42b36607","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-28T01:14:49.806Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.15","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.3-renovate-typescript-4-x-30c633db6a5a839fefa7450766b9bd5a42b36607_1653700870565_0.4507800174438499","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.3-renovate-typedoc-0-x-f80f8b9ef385a94227bc44944f912be510172582":{"name":"@balena/jellyfish-client-sdk","version":"10.4.3-renovate-typedoc-0-x-f80f8b9ef385a94227bc44944f912be510172582","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.3-renovate-typedoc-0-x-f80f8b9ef385a94227bc44944f912be510172582","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"446d2a53bda879598cf9e182d1e7b6df57c8052d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.3-renovate-typedoc-0-x-f80f8b9ef385a94227bc44944f912be510172582.tgz","fileCount":34,"integrity":"sha512-b0ZXU8X0TT5LFij1f7Akljze7KrKIRcQ6dpwnLiUT2ZdxocMByHsRbSJEABUioLXbZ3tGh8ow3jdjC0Z1luyQQ==","signatures":[{"sig":"MEUCIQCG+fHf4euTdi2faME9yQX2NFcuHCFYFCwvavMbD/Ei8QIgeguPJfVqkdN/5SFdwi0JchCXDh0ZM98c9ju+OtDLxxQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilSWYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwBg//SD21qHyKt+cIsFT11Gl6+Qh8JQaEGosAS4lqgjkPQAZ9BECX\r\nkE+ni+1M8l15phSP0+ze1h1dAYWak6apKjmG1I9k4pbWrV/S8GmzYoiTgQ08\r\neXnxSFVcPNiI8LEHP/3qpgDFZ4Kso75kUH+NiUoF3+/FThom2vVVwxA5zpij\r\nZZt+vIMuPNLFzsAjG+vLS4AnYBEdkX2AWv0Fwpd9D6ScjxJ1QBsS8rAKdSAz\r\n4T+Sa7um47NCGOgrgsbJJvq0QmI+jpDj1xEHxeY2oHD5fm4O885JJ9Z+KIHg\r\nmrcCLAvlcsKUlVfA0QV4xGoiGRJN2IW+Rk749tLUNNGssMtZT85xueAhDAAD\r\nuRIxpF33pANoQ7mcjVKpgbxt37lbCIu+AJYHK04UHQ+pazB6e5GNNrWUrXhv\r\ntVFTc52OB67FkEyIE4SyMlCtcI0uwZwFNmT2fbbDDUvW81wQVz0J71apO/Pp\r\nfdOspQMdyDsbQVLqFPPpmEaovSdPqA/sGGHnE1dQNVr5qWdA4Ux4Hhlgwfsl\r\ntIeRHu0eubRlmD+ZQHT61CsUS+9rjJfi6IELCprI84kRIfVtA4YIOqC5q4UL\r\nW8QepiZuCsU4DxQwzKMuQN0357jeziR5/PknLc3OFM7DFWpgYgaO0zkcDWMz\r\n2r9XkiHI0p+kZXmPxoJJW79eXEI9BDlrzHs=\r\n=q79c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f80f8b9ef385a94227bc44944f912be510172582","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-30T20:11:16.602Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.16","typescript":"^4.6.4","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.3-renovate-typedoc-0-x-f80f8b9ef385a94227bc44944f912be510172582_1653941656581_0.22689143328223982","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.3-renovate-typescript-4-x-1e8019e53bd7cfa206f27410a971c1f08eeaabfd":{"name":"@balena/jellyfish-client-sdk","version":"10.4.3-renovate-typescript-4-x-1e8019e53bd7cfa206f27410a971c1f08eeaabfd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.3-renovate-typescript-4-x-1e8019e53bd7cfa206f27410a971c1f08eeaabfd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2a1ece478bd3143efb523881d0f198a61f914c4b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.3-renovate-typescript-4-x-1e8019e53bd7cfa206f27410a971c1f08eeaabfd.tgz","fileCount":34,"integrity":"sha512-V5aSbTEaTw21GVK8cKcVNY4vWOVFjQjrFbaSC10kMhC5b7xU0GM2/NAmKGeGMeFQGnbARiwGBHTmNclhNPPrpw==","signatures":[{"sig":"MEQCIHaFlQOF9IPeqU6dMSbPbNhuhmlipqMLuviS2nFKNUkMAiBKxygVFdvDw9BapLou9grFDW8qku5ri3Rhaawl7ZZXaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292665,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilXKmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFWQ/5ACJTrYRJznbKsy8LPeMLMDUQaeoDz3MYdb+xa1NAZfxlAVZ2\r\nXwZy/3cz+3iI1ID49FaxxCVSMOPCY0x0IxQLwD/jZmU5G1Y9DaMoZRkQ/Fhg\r\n7uCUJvCnvMqUUC9EUBx0OAWWfWqDdLAeim3hdZhPajtV+F+D3WVHu6gbHCOX\r\n/XtyO8omqmlrhtvyB9x40W2oqIOZXptizxpwFeBOC8dRroVSPhAMXnxqWDK7\r\nm7hnbKAZadAlLgngY+znRio9GFhstfZt8SUaBhZR6mZBDATIw2rC46a/IXRM\r\nhy+Kqqhzd6TdQsFbKKCTgzur4VAQvckEkOK9jxgVCszkcKxrac3uoz1blqgY\r\np5MesBn6DCAebURhit2pTsntoqOz6Y/YhwKe25c/FHslaZA1OfIEbTLpQKOE\r\nczY791sma/YkbG5SEbswTIkTiQKeSnJBW1BaL960IBQtihPN8vxV4iwcXhe2\r\nMHTDmNZ0Q0M1Y/pNM5a/EnfugEC4Ucy3bqY4wsMZ+9TQM3LaX31982R+ihpx\r\ndBl+VzkA+H65G1bmiPQW2AsLZxgxOjteDJ3JHN9LalIP2/b2ffHTy48v6F9W\r\nhbsuckdp9fyHnGTvkgCamPeGxur4K2eWK0y1Wb7BmT6X0nnd0TbFGxmZsBg1\r\n1JUc7ORQ3sJlqO/l5NT729L6kXrcNnsfde8=\r\n=i0sA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1e8019e53bd7cfa206f27410a971c1f08eeaabfd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-31T01:35:49.380Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.16","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.3-renovate-typescript-4-x-1e8019e53bd7cfa206f27410a971c1f08eeaabfd_1653961382100_0.7548488463973113","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.3":{"name":"@balena/jellyfish-client-sdk","version":"10.4.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fa82a04c870c4db5bfc07672c36a7f7ec6a47117","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.3.tgz","fileCount":34,"integrity":"sha512-iK4AAb3Js6c53dLlU2JyNK8wLNzjHr8UuA8R+FmAUjNVF6MQmLsVGb/6posDumKpUeIUjgA7EObwB1Mr+ifNJw==","signatures":[{"sig":"MEUCICsQGNo/Jkwlf35kqlkjImBejvsfe4bvazrCHVPCdakCAiEA9seIIwDavk/W4nuoi3U4x969UUjdtm1IPXzmcJpjfwI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJileOAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMERAAhTKzXLKYiJ6ZDLtahVpMDtR2FRQ4MVW8htC/NUkiNaykAyXM\r\nmY4bsDTyW4XRWtbxaHMRJgKEFzxNwrk6UMl0cEV5xCFI6AHq7ONKCzH7vqZe\r\nr2DfN8QEbCizz/XR9KQ4TbtiB19Tpmf5alEs2JewRpoLHx7medJIrXAjjwuD\r\nmadWUlzHUJx3s2yPoxqO1cr6C4iTn5UOREj43YdX1RZEtxMd1CE3VC3HYoOi\r\nGBshJ8LM4WCgLOAfi3HHH2ZdJ6zFYiVoMfPnIwyYHjhdoFhcgSRlbu6ram7X\r\nMWHYH9FIlXAEcLZp6CaCeMNxVdra8hi2toE68PeOSfe3/3/YdKS1LDcplLZt\r\nmMbGdVG3j9KMH+v+qjvv2O2cjj6wmEjzWkUipuwBeQ6krPPJMO1PLmszLPTz\r\nErCj4HHk4fzXoFew/8BA4qDn6qOmmnB9Z5Fu06xeGLbwrkaEJREfwMqxkwQ4\r\nKigPiOw0aDQslSOoG4PAVWi3GEnW0++SFbuXQzX3AcHJRaWZ+2UPidswece9\r\nEJf44JK9oBLJyPZGsxjz9/3Xhcmz9P88+z0DHncIsfQDhZHnXVFml1UeeXtD\r\nNYFCdeWAfbBsRr52+BcgTBPIXUR9rrkZdB5/3Cq8FKzfIPoagDxuTUDqOzK/\r\nKXE5ICMQQWwd0STxMBefDXAA1lXk872fWXI=\r\n=e8NV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"08369c998aa094af84c886938f7ac2f4635b3a4d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-31T09:42:26.752Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.16","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.3_1653990271835_0.922170465458378","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.4-renovate-autumndb-20-x-886beb74c0353fd72dfb0095f1ddadbbf15caeb0":{"name":"@balena/jellyfish-client-sdk","version":"10.4.4-renovate-autumndb-20-x-886beb74c0353fd72dfb0095f1ddadbbf15caeb0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.4-renovate-autumndb-20-x-886beb74c0353fd72dfb0095f1ddadbbf15caeb0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"790358c7b5175a1574bece5c9ead55f39f08bc85","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.4-renovate-autumndb-20-x-886beb74c0353fd72dfb0095f1ddadbbf15caeb0.tgz","fileCount":34,"integrity":"sha512-LXTEidsr0gFUkZCEmrn8P44vaidbys+b+bEs6Yrq0OknJ/iUIjR5ya+agTtBLcv9AnvsnklauRpQQ85kPC0Etg==","signatures":[{"sig":"MEUCIA+nymQA30WkTPZzyOzai51+dTfJxSOWhlqGYJUtDuUjAiEA6aJKaxWP8wvEPICDH9bdSNQ1RZsf4U8Di4+hf9vEkKE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiletHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3HA/9GN1sBu6KDum/TqLmE5eEGNfDW4NEOdtryeWPO5PkrcaGLBsu\r\nZ85L6qENTH6tJmdf4qnbCfhvM2eYwkLCBcrGMKE4xC234IxjeI8EWgIaGlFe\r\nr0AXD/wsW28ey7+a2p5eN+AYWCMKNXtL+5HjQa7+dZvbJD41039HPXxIN9Hc\r\nlooqXSL3L+ptyL2ZYLPETVL+GoaBw2Bc1Y5nqQYJTf6cRVr+cwscZCarY/To\r\n/4nf6nhoCLrUCatuyxck4NPiuPzBKQDfU6FgoZIw5zQOgykew33ppo8nspUI\r\nipjibzBDyeWjPa5XCHeOwMN+fxibOgusVNmqqOktMgAjHo6JYVnwbkAkWzl/\r\nnDNS0z/kSCp6jfvplazTamewXGxRAbVUzrgyGuh30RXpfDU8uvmRwr100TLP\r\nxIz+yyolCmbiuxz+w7K4vq3zXvBu05154qMztSvDVRr+W7hmge8SPjWjo3m7\r\nDxuZy7j7onwnkfmkyJRPdHciKvsA7Ag4xOUYMIGIaFJqEfKOM5r9tvDpEd9q\r\n3BIlTpbt8sWwT/JQstYuDMPBJNvdIgYT4D1SV1/gEiOb3yC6ID4gqi4vqBhI\r\n6qYHNg/9fbxgExwiJ6BIRCVv8rM0vRI+wt9464tijlXaBVhNLcgHc29uL16A\r\nWJx3rFujaa01Rb1YYpExUW/8uZdVkm6s8fI=\r\n=yqNe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"886beb74c0353fd72dfb0095f1ddadbbf15caeb0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-31T10:14:45.142Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.16","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.4-renovate-autumndb-20-x-886beb74c0353fd72dfb0095f1ddadbbf15caeb0_1653992263114_0.4039319024540231","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.4":{"name":"@balena/jellyfish-client-sdk","version":"10.4.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"37893a6c3dff4fdfa105d89f900f0620f09bf5ce","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.4.tgz","fileCount":34,"integrity":"sha512-PnJ6sE2qUV8CIAyTYgNrmJUczasnWCYXKpCBD08Lr/whmDyxsnBjkscdP/iR6UvkSWJ5kPHkkjo+sMzde4Tx/A==","signatures":[{"sig":"MEQCIBt2mR3xUTTwC+jW4y4sEsO24+4EDGd/p9WiWcUlt931AiB0snJg4+PQ7/SlFY5RwT4Yhj5NlZ8Hh+hqnvkgLTfv4A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilqrEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVGg//bQIkMDZYeeySDTc7wToW94YWgjonbF9YRpjpoqcKSrygOGnW\r\nOQZk/Eg3zc79rfVkNMjSo78PkCPGokbAPYyUKl2YFMVovLwxEzHiKkuTbM0p\r\nqKqH6nmwh3HWjW2HCXfmNvvWylKCRi5HXMGpteq+Nfxte9Uv0Vf7wZAuRkcC\r\nqmafALi29yX1i7aHfkK4PdRM6IQdm2eor1NnQK0v0XW8w1zzS0OIdFtC6aLu\r\nA7pEwK+Dv585VaQRQGk5/UHljIt8A/by8F3okhT9/JVUoksn36MdYALCg49B\r\nE58gA9TMEpkcs3HaOdUdwEBtC8YXwjRdonbGmMAPs9Frk65AWd615PxdCqip\r\nNRmQE/yCyyPtJM4xhQGjZrIoiCktSJCyzt5WEg2QkFfNPgnY4CTp7UiZHCm7\r\nXInGwJFlGVvghFA/E2dzEFZLbfTIssfY622HQX1/xrM+9RQoGJ5ysFwPi0D9\r\nFgqyp16TbxWJlxakOYXD+em7+5+rx6vCeMYYQo4be2PLYK0zdkp1Ux+DBHZP\r\neiu05wmkbNZSY0nwgKl1M5O0zgEKvo5/lFcZn8sIAUwT4HdRvu6pigDh+OCI\r\n/UpqT5CQnEvkLaws8W9vpx2kxsb7wgCVAA84eDvdMDry5J27MIM0ViNNxoBN\r\nF/E4CF2dCo73jsoifTkExTZYNlgJi2zZVTE=\r\n=r5Ge\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"13c2cb4904b10a975ca5e0f12236a52ddeaa6acb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-05-31T23:51:44.403Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.16","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.4_1654041284197_0.11463464203453144","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.1-add-message-reaction-contract-add-link-contraints-48a8deb141d905d46fbec1636a27499855c46270":{"name":"@balena/jellyfish-client-sdk","version":"10.3.1-add-message-reaction-contract-add-link-contraints-48a8deb141d905d46fbec1636a27499855c46270","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.1-add-message-reaction-contract-add-link-contraints-48a8deb141d905d46fbec1636a27499855c46270","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"47271a36dc4022ac2a15cc2c63ae7c9747f2ccdc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.1-add-message-reaction-contract-add-link-contraints-48a8deb141d905d46fbec1636a27499855c46270.tgz","fileCount":34,"integrity":"sha512-UxhWkaPyQEFFk2nlM7t6cctPRSqGwe2B40BKLmtxFGlWzsR5LMnNZ6pw0TXMOT2wVEUZDKu6NnJzUbufMKyfiQ==","signatures":[{"sig":"MEUCIQCiA935efd0deUQEE03009+0Xxj+v94nZgZIPQbNZN13AIgU3nnS6l5fKIX77Q64qQ8vyLbvD/f01hOgdjJYtdWofM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":289193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilr/kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpkcw//Tq0wD/pbe/y50aVMcsdjsWSYfJJD5qXAbtnljxOnJOIaIZ4P\r\nenYhKFJugQQPHRVOwO6VDgl0+glIB0sq0OeXYdMHez6RGhMUl7zCHy+Nb/Nz\r\nPo6jUIC5Au8vKgaGcKtee1t8fdW9qf0S1uLB+MdU8/Cmf2WgCRfrEAe9q4Cv\r\nXJgI7BCa6EHZnPXoQmGhHsaZzt2QHt8o4AIJU8HHvYl9gf5TppX91tFWVx4s\r\ntr1TiVYOtMf8TT+dZPASxrRC2mEyB1hOhgY/OPddOdanyQLeEf0gN79T1sjO\r\nfSje+eJ1gebOmG5q82LuuHsOd7po1xYEoD4Qq4E07HBUAMaDMi2gGjmDKRLG\r\n2uYdhKbFAkQN0h9vwvgpkmaYija3K3OJeUt1bVueZ0WW8lUsyG7aO/brqXkI\r\n2biiTTAjy/Alvso43Y0P4W7wfu1ldKXiXCfiVsHnFofqCa4Dy/uvUBpbkq6r\r\n8a3Be2gAMbGSrdSzfG07IrlOyV3wOUS6Fl7b8GC6LBtBnomzGzqp6EsEsYlQ\r\nsHLC3eTqM35oyjxuXDG3sv8A4ypwfTQ0mwsZZc6AZOca1e39NChsS06A+tyZ\r\naEr5VTUNkRRZUo56qip1p3Otr35wUmRojcc8GWnvdQmXxddmlKgSdvgeUyg4\r\nHckFDrGj7T1WcpvDdHehfi7XpEQB3hxVbzM=\r\n=PaNA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"48a8deb141d905d46fbec1636a27499855c46270","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-01T01:22:18.077Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.1-add-message-reaction-contract-add-link-contraints-48a8deb141d905d46fbec1636a27499855c46270_1654046692506_0.36602189494452486","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.3.1-add-message-reaction-contract-add-link-contraints-31bea617a7d8b801c97b0cdba817a37bb0b11c5a":{"name":"@balena/jellyfish-client-sdk","version":"10.3.1-add-message-reaction-contract-add-link-contraints-31bea617a7d8b801c97b0cdba817a37bb0b11c5a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.3.1-add-message-reaction-contract-add-link-contraints-31bea617a7d8b801c97b0cdba817a37bb0b11c5a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df845b409f0dd34efc8cc2d5c9f34e16f0b774d0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.3.1-add-message-reaction-contract-add-link-contraints-31bea617a7d8b801c97b0cdba817a37bb0b11c5a.tgz","fileCount":34,"integrity":"sha512-O5RwZvdsDSTWgr7iMlRvuV8iQBifLPIPQp2lTzNOzq9syg86h4z7vU0wmK1qL31+wimKotNC7skOefXqggJc2w==","signatures":[{"sig":"MEQCICKypBAJZJo7Ja8LkLZMXG1B2beLZqMk1RTBPowvozRwAiATLmFF6zDN2A7aqwTqVgnAuZfBKT1DW+wL7Hc7oZEyqA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291011,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilsiuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmowaw//Wu5RBVSi+Yu6DQqU8jN4hfJvTdDAYop5b89PpHbvx3EvI2cF\r\nob0wmxU7fZul1yNRU0THyzjuSkQlcylJdD+LcFvraBYCdR12YyaNxl60IEIm\r\nlXvYK8gaopveiWixRMRay5WE3JfsOrhUk34VKnhJgf9RPZMQuwJ/4i5Vf4RF\r\nFFt0qwYT2ml1one0xMzRid4xB6u/Ff6o9cQ69MLT5MfDpX1a4ypRBB2hKMsW\r\n7hdehrHLFOvnejmW4MpZuchG4OdsgqDGIfVPpPnuFjoSghz4cHrca9zdIXjm\r\nc9Dn8+JCNg8KgFnZVphvOwQmr8eVWsGCBNUbG1N+UsbGo6gbedrw+RKtVgoV\r\nO2uOpThIYwfip329t+TO45oXWIYO1VUcz+lUJ7IQmiBp9dge9Ydcim6R3kci\r\nEkww+MxNt28QjE37Q0Igx/78+K5ubu5xdAN6Npgx7JtL7GoZ/iiyG5nxfqEp\r\npL/AbHbsFZU+uzJ5Ij1QckC3IPT/dV7eRk2w61NjA4YFkVBW/OnXqK6sjJyo\r\nPHQHxEH1jW5tBYyomKq+44OC3gTaHE3UpMyDr1ew8xLk1ow4ehnlpU+lrnbP\r\nNecQvB7NRuQiQP/F0G9LOX+kMcXp5BdzzU6yu3czfVZQQ5mKPlIYGRV2Wnex\r\nW8FUABE90TlpHROSK4ARJAGOfRvyV+bUa/I=\r\n=Szp9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"31bea617a7d8b801c97b0cdba817a37bb0b11c5a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-01T01:59:20.188Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^19.1.7","deep-copy":"^1.4.2","axios-retry":"^3.2.4","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.4.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","sinon":"^13.0.1","deplint":"^1.1.3","ts-jest":"^27.1.4","typedoc":"^0.22.13","typescript":"^4.6.3","@types/jest":"^27.4.1","@types/uuid":"^8.3.4","lint-staged":"^12.3.7","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.180","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.3.1-add-message-reaction-contract-add-link-contraints-31bea617a7d8b801c97b0cdba817a37bb0b11c5a_1654048941896_0.07958486329364467","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.5-renovate-typedoc-0-x-1d21998af8abb9286976ada2e1c23bf3f9bc73d1":{"name":"@balena/jellyfish-client-sdk","version":"10.4.5-renovate-typedoc-0-x-1d21998af8abb9286976ada2e1c23bf3f9bc73d1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.5-renovate-typedoc-0-x-1d21998af8abb9286976ada2e1c23bf3f9bc73d1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6cc2f6b114b45d73761c8cb2ac2d15d8a1e81ac0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.5-renovate-typedoc-0-x-1d21998af8abb9286976ada2e1c23bf3f9bc73d1.tgz","fileCount":34,"integrity":"sha512-IxVWy4NBjR4b7+Oo4ac8Rp1ZqRx8HXwDHJw3O57MaSgyP9fd9x0lf67bvULehh0MhesVhkgYBqlQ4b8CWbdBNQ==","signatures":[{"sig":"MEYCIQCMrDlhlxhZpuoqoPqGmmf5o3h6zU6EhNORnVQSU8v1dQIhANQsMPFEeUtj06oEzzuhSzy5QHlec+/lgjnta0TSuHpH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilvJlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqv2BAAlm10pHLWGoKgRpIbvilTWLVmvup1mDHnq8EsUatXEa0uZ8S3\r\nRov9mI3DmcfKPfrzHyRCqM1lsnrnmbFJUmjf4oW4NaUv40ITdWKijC0L4+cg\r\nLo0uZcdQp5tZ79Skrr89eia+N7eHl9CHCx8iOvMG7YiSDOfJDX0gduwvxuKu\r\nUvUaLJ3bsmWvEiUjVUlHM1tCfTBOu22XQSRPZDNCtQhNs1KxEAhGHNusJ0Xr\r\nFlywEZMlFfQY7rNUZIyejvHcOhPSekVzRvvWHk5j8cfdrEDvmT5KKEIhYL2f\r\ne9KSUoSuzcXuB6pSih4aiwlus9CbtTpMzC2YK1rJTOrSxt+YC1wbLoAw2WJa\r\n7yJ3bucyDwNwc6TphNrfDbtxrz4Nw1e+CRyTr/00hpJ7MipfSl8YOdOLL1uS\r\nLGaCcwZWGXZ0KOVYn04Xjc4Bmv+yRZRtRctNnFagYBFWnh/3LUKPNVxeYS+G\r\nzVNiSQ2h/IijQ5xW+VT5/WGmdIxax27NmxuyHCxfw5LYx4JRFTJvgHe9KLki\r\n1SLuuaKN67I2UdkPydMmP1nLYUafuQdUs4zmJOw5lqviGxqo//AHLYBImhRo\r\nZmBR+8TygUGlovTwh7VtZvuDZPQb3CK0zAYyf9Vg1c5H3FWYi/0dKyEoWNcQ\r\n4l3G+GwM/ANEKf7qn+NO0iTR6rpBrfc3CPI=\r\n=RPtg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1d21998af8abb9286976ada2e1c23bf3f9bc73d1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-01T04:56:42.840Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.5-renovate-typedoc-0-x-1d21998af8abb9286976ada2e1c23bf3f9bc73d1_1654059620271_0.09150572884049879","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.5":{"name":"@balena/jellyfish-client-sdk","version":"10.4.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6013545522fba9b52719049781bfe010a4de08ad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.5.tgz","fileCount":34,"integrity":"sha512-qXxih4WnqScx0MoLbzdFspIwKDx4TG48I5VyFATagrf0PPDVm7bEBEV+LHGwiCJ6aE+c5yRL3M79RIhxO7W+7Q==","signatures":[{"sig":"MEYCIQCiU7ej84C8FjjYbNSOj1PGa60W3Hfq/mHB1CIVofYz8AIhALPIO/EciRZxem/e9pMtKYaR5TJrktpaZUg5a7sIK+S8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilx17ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroKg/8Ce4A9PbsXK9iAomqwEQa4Z74RCUNrNFFiT/LMvl13NMpq9mI\r\nMrqTFVvhonty7O5AZ5hjUq3VCF/5AF/Bp6W51IbhEKD9Yq7zNW9TghXR8/Kc\r\nOdRQU4+FDhHICTLhPjTITDY5WEe01IzzljNODl+zCZYu9NcbW60pHzUd/tvG\r\ncLU2q+S0JMrYCyt79NWlPYV3ihiSiIda0kKIiFEMX3t9Th4QNsJhQQBAfE32\r\nBYv/Cqw1u99XjoNtZpvlIh8hPDRgQxIpDdx1f4kPYNs7R72kNAQOqOejESfi\r\ncpXp7oDUSFWkAadYfbH3A1pDTWhYoptbE8zzoPVgfDwNRU96HV3cXcKWj8P+\r\nt2quXDvWT3VFnSZYdd5fCni2UqnISyteaZ6Tx5iLBJYH9X4ymzZC87QvqVA+\r\njtKy7f4z6j0L7aUw+qS5VnyRanhwtAkDj/bSx5Xadb3RtMLdRmZ8bkk7kotp\r\nmG3zNKD0cwCcopdOCLIM9m7XU9QrVo5ZPHnWcl0VBdw9L0BBFD2+dy/mHcUt\r\n+I5Arpa582V9XBYZM9F9nVHRkjamHFKF4DuCN6S2vjLw4bXTIpE5FSpqwDLP\r\nQi9csHs0+7sPzVn565yzRvNmGWMx807dop805fHTeeh+yDIUB/WOnPCCmYpf\r\nNN7ua4E+vQ7RTOZB0ac9reBEXw7oyU5T/wo=\r\n=xWpi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"93a5c4a26f8f39bad08085993ee6e127b70b92e5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-01T07:59:55.419Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.5_1654070651400_0.2132207545770708","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6-add-message-reaction-contract-add-link-contraints-f8fbc01c849f22d1be29bedb067226fb46d3c6f7":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6-add-message-reaction-contract-add-link-contraints-f8fbc01c849f22d1be29bedb067226fb46d3c6f7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6-add-message-reaction-contract-add-link-contraints-f8fbc01c849f22d1be29bedb067226fb46d3c6f7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a82024c8223277b219d3b5108d77df80e327f0e7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6-add-message-reaction-contract-add-link-contraints-f8fbc01c849f22d1be29bedb067226fb46d3c6f7.tgz","fileCount":34,"integrity":"sha512-ADPRTuh+qAmKT4XFOb0VgWdTbVZaZcuAokrz8dxdsa8MtMtRE3dfPh9YsiIWL8hRU1MBLCG8K+eCvoSKqoowcA==","signatures":[{"sig":"MEUCIQDpMa803mVXZpyCTy1EHFERIMrGwM9SRmnci4CmgoZcgQIgKctr3ek8yVEV0XxQITXMXWEpCBZaRy1u/nQXwRSMfk0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil3rLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtWQ/6AiDR2fdlYK6+Iqe4tfBj3u5paqqiHxKcrwbvBtQ3pJMiomqs\r\nyJgczkY6E7bF001dXiGAN11sp7M7GIeFpfzw4aAPUiuo6LpvosoYd9WwSTVY\r\n9YaqX2UOB60313fuFehyHHET3IpxxPWHCiv8uhLBFuS+umHzqGRqsunANOdf\r\n0jww7eo2y7lUPS91muHmB9kCIktfzNbpRtIrWcYq2nKDLxQsoHVITBdwmj4m\r\nhr0xn9UQ6agV7kq+ePWca5HK/q1fSdhGgdXbbUMmfbO03iuVW9bFIMRtdyJ2\r\nCQ61XuYdgHu7E6pKA67uI2AeyfqKPhaIvezQ23+0LJDQs7HRwdGHhlIxMQFK\r\ncbyXOmxFJLeXsbGRgYzub5qozkZmohIIFDCztm6GnXaN2f5rQWjoQ0Q/NbaZ\r\nfOOCzEkGTg9HSRVIDsmhsbjqiVfLPofkhuqzUHb1l91zlcJVqlkh/ozP75vI\r\nl+WbRfbYvDguyRHUB7nQBXusw5DDfZfUDbZGfNR35poeZc0EfGY2N6/y8Jwg\r\nT7YvmX9vPbLjARytQIurG0yxioY8lPeKsfeFSWYoQ5TxLBQk5+Wwt6I27jRI\r\njy2yXwXaHwn0W3dvaa9hezpG9AB8GtP8srXpwq5nDd84mFlqUl1gWnjjbWuQ\r\nxXZ1nRy9IoBopa/nQY4Hjy2pnezdEAjEmqY=\r\n=q2me\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f8fbc01c849f22d1be29bedb067226fb46d3c6f7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-01T14:39:07.166Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6-add-message-reaction-contract-add-link-contraints-f8fbc01c849f22d1be29bedb067226fb46d3c6f7_1654094539446_0.5440318649883409","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6-add-message-reaction-contract-add-link-contraints-23f057ed2d3e739f2b7e352152218f4c8d34727d":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6-add-message-reaction-contract-add-link-contraints-23f057ed2d3e739f2b7e352152218f4c8d34727d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6-add-message-reaction-contract-add-link-contraints-23f057ed2d3e739f2b7e352152218f4c8d34727d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"74be1de1645d270620c7e98b7d145ea23f37c73d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6-add-message-reaction-contract-add-link-contraints-23f057ed2d3e739f2b7e352152218f4c8d34727d.tgz","fileCount":34,"integrity":"sha512-41ud9+mIn04Kk2EXJ6uo96io4WUJ/KSCiat7o7MdpTJ+VIx9iVEW1d1KQ8FjFrTgAeCFfo9jH/XwP/aB6i6vcw==","signatures":[{"sig":"MEQCIC9VYcFDwCD+qRQRgCndmsAhK0egWPBfOMdfdl8yLePQAiBv6hPdA3rhNRYuCcb38aqryDwuJKFeux1E3DTDVVso/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimBXYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdxQ//XN4NveRrcHR+3cR61ese8Ov6ofl1LSE+gZpA9KgEPQQz7V1v\r\nRofjafqSLWr4h0/UXZ4E0K7i2Yt/VGCh0lB+U/iheg8NOXNKylQEMY2ya/JU\r\nxG5gicKvd3vbe4VhknjfzYevyAw2xdkutZTL4tiZEKXOptjrBTgA/BuUM1ri\r\n3J4FYAckDYOBrFx+m/hsUWCVGXBduiyVnjP+7Ciq0bEgJ7txg+qKYV0BNM6I\r\n02HWG5p5fcgkqyMsx4V9AqBN0TZD1HoM2K+Joz7fLX5NjWJ2gqzlRl4066g3\r\nIJa5yYxRW7Eu32Mo1mwG70WRkvULY94sZ3PPUo3+lKv0P8WVKGkit8wIIBKn\r\nj07Ad9+GPN6LHmgrIc+vOZLJ94RNBOWr/PVtf7pvbifbjx1Yu37j8gyTEGjL\r\nJDa3A+vkYa0h3wTKqkCHW9ABDplgxYT+wOSdeTGaXI0+ziJH2PouWnw6jifV\r\nIqUKS2p5F23H4ziuh+EnwU742DEjUUmqQZuSsQ8cN5dEhVaq2GTdzZnowoLT\r\nTgzp+4kG3ZE682ciIVPJRvrTe6l6S62H/9xS0ZsDlrK/NlHQpFvHKW8fYWsr\r\nFjIjLGJtFuZ7xWCl+EOK8yghaVl59K/8cIGD/udOzSnYG6Rnv3v7w2JafExr\r\ngGv3oHaToI9SX8lXNBEHAgmrCDYKcwf8o1s=\r\n=drLy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"23f057ed2d3e739f2b7e352152218f4c8d34727d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-02T01:40:40.007Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6-add-message-reaction-contract-add-link-contraints-23f057ed2d3e739f2b7e352152218f4c8d34727d_1654134232638_0.8806976521425833","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6-add-message-reaction-contract-add-link-contraints-454d5833860c021fcd30130dc79f8bfa794c1f06":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6-add-message-reaction-contract-add-link-contraints-454d5833860c021fcd30130dc79f8bfa794c1f06","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6-add-message-reaction-contract-add-link-contraints-454d5833860c021fcd30130dc79f8bfa794c1f06","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5692f7e42a4aada450aaf4d470a41e74f9bab8c5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6-add-message-reaction-contract-add-link-contraints-454d5833860c021fcd30130dc79f8bfa794c1f06.tgz","fileCount":34,"integrity":"sha512-T8ZZAx9cQyqh+V15nNNF/GO21dZrqJMhzQ0WXtrqkwp+9n2O1t3/AyJBSJi07ad4D9Ao7OrqQ6iswPNs/II+5w==","signatures":[{"sig":"MEQCIC7BEtM70vi22tsNJS1xHsPAWF7kl/Mt/8fPqvrc59VGAiA048EbZeUEsH+rr2rjT/bZPhfmvqf2N2ja2CvGSmvQMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294745,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimBxxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr17A//c5Saf/+mTIQA/1XZ3RVP3pUxL5Z+7Ak+an/52bWfzqAaMdSM\r\nyLbo9IYhD8NqNpib0W99z9mzam6HTTNQlUwAW2mbctwIsxSm/Ucyr9LCumiK\r\n64Wqh+NceuH5tQ4vIpQpU9bIsV7i2OanXXO4Ha0vL9lAjG4WrhryHKmVwyk7\r\nzQyCOKqrfM0ESzYFEa+L7GC3MyIyXcPnBREKm4wXvwsF0kQaKXBDiGXWuFSC\r\nLeFLqctBf8ygAp2TNJx1IPl0QxJEW/gKENaW2gqqolTfthR93F3ln5CFqv0J\r\nmfSAnfgMx+NUm5wRG5wP+BeSugVBzuieY2Rb2uhqa258GbX35C9vW07LYbQo\r\noGL6Mp0QqrvRKva5TVBjkIUtlOs11y974Y+85+xxGNkse4f7/ZibWCZBijML\r\nf3fvHXqFLNsZK0PXmZuFsQr69OL0bPD6JTks7UzkexrvgyhAQb3RFe90hXEO\r\nMqS8Rn+DheI6hVv1VhaeQ3zswWjdaqkMVWoLYeDUkhhIF9R4z8N1UaNumnZz\r\nz5KacaugK1y9M/5sYL1ZJeOEK1WORiP3phhUNb+DoGwsZK4D3DtvpcfeWSTP\r\nNdOFI5hm2ovwE6Fq8sB00vHYJJ/k5yW3wmD2vU38FOWll6Hjg7pNhg4wqKAI\r\ni8hhdYnXXxdnV+HteIbWTJieMsHY0ZlcHZU=\r\n=WkeI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"454d5833860c021fcd30130dc79f8bfa794c1f06","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-02T02:08:45.847Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6-add-message-reaction-contract-add-link-contraints-454d5833860c021fcd30130dc79f8bfa794c1f06_1654135921004_0.4699543014967331","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6-add-message-reaction-contract-add-link-contraints-638302f4149eec49c9833b2061ab61c29d0cb351":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6-add-message-reaction-contract-add-link-contraints-638302f4149eec49c9833b2061ab61c29d0cb351","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6-add-message-reaction-contract-add-link-contraints-638302f4149eec49c9833b2061ab61c29d0cb351","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8ea9317418845a9716e98c1bffd1ae32452d91fb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6-add-message-reaction-contract-add-link-contraints-638302f4149eec49c9833b2061ab61c29d0cb351.tgz","fileCount":34,"integrity":"sha512-g40fS8RIllNrpJqHvdmEtN72Ln4pOQE//5GgYx+Cj+TZw98+Z1xsy0Oh3JOmxxmOa3hz0ktaVRrYKoZTeQCe+g==","signatures":[{"sig":"MEUCID6GdTMveJjAm2efgtoXkm8TtajZEZZ/f/66eKQmBZTvAiEAtYZxgKh8biKgrAnoAbd1WSNoFBthmGu9q3bcwWMP1CY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294795,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimNAKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhEA//cfcYR6ItZoax8uB/NBrIPgY5lXrQk+eOcyq0OOT9H0dJMrzD\r\n/c8XTs5px0eqTEbUUorT8kyTydxSb8aNCWNDuyDRYJxBWnfj8Cx/JaySEqho\r\noVVJ9Uhlwt7ES+eVRe9k+TKfTGMomAqPrhsU1IxgL+pT4A6oql2DiLHdSVkt\r\niXXPpzusjP8Vyas2EViM8BiFskJWhb71K4vkSC5EmeJOOVv8Ulu5ZJuyfsQ9\r\nyDS47V7M5WdUr6ILBEfrq6m0JvfLk6hyAwmoF13lMbiynJFP7kst0ZS8mM4L\r\nIRx0XliFnJFGifv8i9IyxO9vj+xKEDXg2nu+ztzZqYPuaqlmOKs71kUYvkus\r\nVNISZUBMu3hdv/zeQUB4Cbv6BWfJfGJroffnoBDOGZz5e6E2OgiKWrfXo9vj\r\nhSxt01ioZVwbSKK9xrjKn+2ozdNZD3NIpPgCKGP/TbQxPHNR9HCU7itWmyv8\r\nW53PysEtEmlwcWvbNNlYIaJ8+ti2NGFQABKegBl+5znKpL4F1BrLGv1D5QjN\r\nQ7tCwLn1Q/eUIILcemX5UPipY2tC4zzQtpt2MoRBICTOp8+U6DUko6ReOn3q\r\n2NdpgEeaX19l/LBzMdxxKzObnSnemQvPdvnRXxQOQCnzA2PVl3DaFSAL9uXC\r\nBBnqWmkpIfqPzun2pMl5I2iE6DCClWV1uMM=\r\n=MUgJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"638302f4149eec49c9833b2061ab61c29d0cb351","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-02T14:54:49.890Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6-add-message-reaction-contract-add-link-contraints-638302f4149eec49c9833b2061ab61c29d0cb351_1654181898031_0.9010420943596382","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6-add-message-reaction-contract-add-link-contraints-d32148ee314e9049c30d3619330d39c7bf787a21":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6-add-message-reaction-contract-add-link-contraints-d32148ee314e9049c30d3619330d39c7bf787a21","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6-add-message-reaction-contract-add-link-contraints-d32148ee314e9049c30d3619330d39c7bf787a21","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8888194351da61f0c583fd1e3b088115a9633123","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6-add-message-reaction-contract-add-link-contraints-d32148ee314e9049c30d3619330d39c7bf787a21.tgz","fileCount":34,"integrity":"sha512-hSrg6tOtQf6uiDmm8HHXiL64URmv4+kSCuJf1afx4ayUIKZHxUxOvUCOZ1kZJpE4/QrdNqqkY90KRVK9NX/gpg==","signatures":[{"sig":"MEUCIALBh68uUr+rXdbPYqq5tm2Axn2awqy+qT6pFNlG8KEcAiEAuBRvMmdzCyvBcm+eWHXqe6066Tobt3htl46COl6chFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimiKkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQZA/9FIXnYQtYvInznKtpco0sb/Kd6wHfjGIIAlpoC9JYrXbxEmAQ\r\nGn/SpUKs342DVUnt5+FNYPN0JuZcX4EpoGCHMpQwjtFB/XEa/YQ8Sy60Z4jE\r\n6FeUf0lG5JGUX+QQA6aHkGljF8gB3ZtMY9/JQtmEi/Rg6uq6D+SPemOv0PTL\r\nvPyvhc2yGgjQVNXjoF3/RK+MpiQv1mIMvFnV6eGQgQH9qE6UEL6Y+ZYDVPMq\r\nKTIiXKlHmjlTsSsaGy4GQW/q4fSt6PiUIeVoqJapFc9KM8LnTM3lXkPF7L4u\r\nj6YFZHGbRnt8zEvj8tvTvUBq56R3WowThf5lLTuMqczPN50nVxE9GAW4r0xL\r\nzpZHdSemYCGBybLaWAZNG89EQzY5plOCAvtb64RRIUWFOLyjORqeqiZ2HoIb\r\nRFVBKf2IDueO/Li6ZdsCh4zUocdp6YaOTIzXWf7/gHzgDFdI5wSHR8Ts8Bly\r\n0XPiQg5H3d+uyhiuqVbpYR5MMJUcR0WV7kg2AJ6IIpVB+llbzWDuIai/F3gs\r\nSFRjCr1aqPAI5g/rdMHIFglBJFyBFBdF8OBxz+X/QqaNd1jlkNcHxBhFLP5V\r\nD6pmD4D7EJNID1eNIRKZHlw6R8ensZIvfKNKrDuVzsmYmttdWAqd7gxCuQFS\r\nOckPmY20mjs1KWPlmUoV3VBlIsCMx9bhqHw=\r\n=WxZO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d32148ee314e9049c30d3619330d39c7bf787a21","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-03T14:59:46.324Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6-add-message-reaction-contract-add-link-contraints-d32148ee314e9049c30d3619330d39c7bf787a21_1654268580165_0.6869561231180163","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6-renovate-major-external-major-122e4bfca1ca477376c8e6b8d791fd325aead7c1":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6-renovate-major-external-major-122e4bfca1ca477376c8e6b8d791fd325aead7c1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6-renovate-major-external-major-122e4bfca1ca477376c8e6b8d791fd325aead7c1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"548ad4336a8fb38eddb16c073f5c79ed794fd4e9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6-renovate-major-external-major-122e4bfca1ca477376c8e6b8d791fd325aead7c1.tgz","fileCount":34,"integrity":"sha512-GF9biQn4mX6I7Vne8p7X+e4C5CIYrgvtdtrL2jCw+RCjYFDaM5DuZeraNNYlMe6eDnejUkfa0RAHG5v/vsMRGA==","signatures":[{"sig":"MEUCIQCnxl4fQ71rf8g3bpYaZLnlKXBqC2+xl4YFYEw+46D9QQIgNR9++HQaWy3jSARw8hWGzefR+sOFHfUhb3I/DxlB5bc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimqwOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogRg//YOWD9AvvIFNZzd0Mm3G7tFJ6mr4v5bTFqy4qSZH8NeuDc3Ow\r\nm689kdK2uBsDJrmgpIP6tvCm/I8oiPpPwddosQH/as3Bc9T4u9DQTvvR5c9j\r\nzw9hZdCfKflFTQMUNj98LDjglrQ7fjFgjdwagzCIAPlkykghimJUizbc85Zt\r\n45oiF6L+on7g/Vzzaj0/KdR9DJ1jFYqgPeO+Pn7CNq/CRlz5ix9PX8xWHW1T\r\nBYSF0xocaGC9b0SlVn3svZj6nYwu31DsHEqBmiSGVOnnCtxrq/nFhb7034i4\r\nmp6Slo8CP6FOrHXqh5ius2sVkLXRCfaTbbN6OLVk1NeGMIz/qPeoC+zGhF8K\r\nnlXhh4eSCapE6cOmRGmHC+cOtMoimd0ZXAakrBVHmCaDD4KgNQ6Qd5gcVTOy\r\nd2lpaFyLh8EgyVJfELWMfPUFz3ZSn4mVW9QkH7rr1+bSkDLT+4wBOQEj+GUA\r\nnPLAyuRDT7wDKvrYio6i60JdbN3EVMm5VBxCQGW7GeM2khd0mfyy5r/w/IjA\r\n/CnYbDtzS3eM2U0RY24uj4GIsP7jIhUa5C1Y+1+vQyASJkoXOQmKSzp4ezE2\r\niw1GWMeTHcUJ/tzL5i55WDSu6EceD27+T1tv+pSJjFRVMxBsv/lGg7QfXYcZ\r\nIMatHnVhtMbjY778ZfKZemYjNzq2sxpSODc=\r\n=wkP6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"122e4bfca1ca477376c8e6b8d791fd325aead7c1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-04T00:45:39.175Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^28.1.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6-renovate-major-external-major-122e4bfca1ca477376c8e6b8d791fd325aead7c1_1654303758332_0.47912095936195165","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6-renovate-typescript-4-x-b8c039f9450af6ceff70b713cc52b59612c656f9":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6-renovate-typescript-4-x-b8c039f9450af6ceff70b713cc52b59612c656f9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6-renovate-typescript-4-x-b8c039f9450af6ceff70b713cc52b59612c656f9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8d7525c858ad6b918d547b49d8a21d2802e012f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6-renovate-typescript-4-x-b8c039f9450af6ceff70b713cc52b59612c656f9.tgz","fileCount":34,"integrity":"sha512-rPggjiJMsxeHesE18+dkleY5qp9kqTHBuRvbm3NKLdDlxB9jhM5y7FYHWDYFKfAO9srrMXp1Kz/LXkTw9MaJNA==","signatures":[{"sig":"MEUCIQCVMhnwxan5Z36ky1yxxa+wlVGLu6JeyWwGfWmydZMUJQIgSQsW7H+68akLHSlS7/n/qD5crXzDfCXDp8HTqAAPZi0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimq0vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6IA//XS4LSpOlm0azpnOyIYAfTb3AdS3FzH7fxinjJOkgsrz5uBeJ\r\nLwxtrF8+f50Y8E4FHtDNphFjjwJYs1wDAG6REPSpjEkEk4ukVzPOJeML+0e1\r\niFjnd3fkF4C4JcbTOKyvJKb9kQZmf+vEZQF1QLCJZPZljGOZkEEm0dffKc/E\r\n5p+931PyI8IhA5nkumhmWxTp2hag7SUr/82GmYrGSuxRaOHmvSvzFNiW6YDZ\r\nsFCcwKHivYB9VGl5KLFA6DHa+CUV24zoKP7DwF+nOIW4x+4sWkSVC0opuOtf\r\nThLL15xd9Fbq8YoVx7LmTVSIN/v5Qe42INb93DzCnuNUEBVFbQcZ/T+9rLaD\r\nZY/iLdbPBNFfMNUfkAeUTpf+84C6zExL67Hkc4wGqvjSAUZ4zWdprd5Objli\r\n5u3YXrpDKRW/W2erk6TyfeX4e5gSHGHqnsYI3RdNxFOWMIMIw/pP55MSm3Pl\r\njWfUVQlkzaP4a63AfSOLSybATIQrawESOhEBNofczQp/GpgGVlhq4WmHJy9J\r\nA9dhndOTURjxhWExuKEhficnalqZjpNZYFzohvgIbnPMPxI96ax/vFwY3b9V\r\ng96zrS6sYvhMcEbm4Zz8BDYK1G7f7vUAQpgc+SDp8EYKr7Rv0Qm956hf56X4\r\ncjUfbVe6HYIRDMS6AMhKdB4bWDfSxNde/aY=\r\n=QID/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b8c039f9450af6ceff70b713cc52b59612c656f9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-04T00:50:48.061Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6-renovate-typescript-4-x-b8c039f9450af6ceff70b713cc52b59612c656f9_1654304047055_0.26099130346600097","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e06178e987fa2ab9fdfe7b09180c3852fcf3dd72","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6.tgz","fileCount":34,"integrity":"sha512-4eP81XYP/wjdxXPusy6oilAUSF5sGw5gW2bJbZ1F+QukjYArgENneDVwIi+82Bugh30qqdYDyxAOtTdfe5hHKg==","signatures":[{"sig":"MEYCIQCsq6Pp4PB/2vhu5W+yEDIeB7HUMtVJFlrLIaAyLu5Z4QIhALipCzGobPf3etqJmtXPWY273N7SdbhiziO7nw1haZI4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimq4eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmptJBAAk7fpB/iL4nNaD3E7BG/pmLOfp6LgNwAs+qsrdYSGnq+piMqH\r\nQaJ5W/RZ21XQIWFIb4AXqQLlxckefVyjitVsDiwvHUhhefAmnLl7sYA8zO8F\r\nOAwT5NiFvx//esN4BdHYozM5dCXE2Vo8vgb0Lv4J2X+VlIeOE8mfxiZDMIbV\r\nPlXHwzUoA07qU3amVcOhlWhCBYty2IQHIW/wWllcpkI5KjFG/ZtpWJVP3GCc\r\n4HEJPifSWdAq4bBYLpz/lu0vrEgGlsVZOh4/YFHfd4Yd3AvQEqvK86o+/UZx\r\nEHehwqRA0MBvN/cfECPLgOqfELqy84+IgYg3Kyev/3waKfZVLgoW18mwk9Pa\r\nTRDeekykDBvhPEVGQIRr1lSdUEv8lvf8AwjkxaA2Aegc7smlHN2Kuuhm8qKp\r\nkWtsny0qJ7UeGnIb6HTKT1+U+Tb45hB1CeoQc++BhJllUpH8JnkOyxalp+1A\r\nFG0AN4PCw0rZeNy5RARqZlAjnwYZTpmCr3RDDMSP+GeQONgaVXGGNbKWk2jp\r\n9N81EpwhuZO6IWKBPyzVHOrD0DXanLLc6JBiUQIZDuufruq2OZn9+PZouvih\r\nVooIIHikrIy5xz599lim9r1QWXdopTcgdCqpcCJCYQmWbX493r1xkkPzGuSE\r\nWpCEOr9u4bYJk/jdXyr1pcJXTl+vq65oRvM=\r\n=hcQm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7c63de5f48280a03c2d3cbcf5b7416d697ddf65d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-04T00:55:52.582Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6_1654304286042_0.278694087799374","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.7-joshbwlng-update-link-constraint-24d0e101512ec63252e38ac58a11cb0d905578d7":{"name":"@balena/jellyfish-client-sdk","version":"10.4.7-joshbwlng-update-link-constraint-24d0e101512ec63252e38ac58a11cb0d905578d7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.7-joshbwlng-update-link-constraint-24d0e101512ec63252e38ac58a11cb0d905578d7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"67132a451093e7cef2c335b3a82cb281cf9fb477","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.7-joshbwlng-update-link-constraint-24d0e101512ec63252e38ac58a11cb0d905578d7.tgz","fileCount":34,"integrity":"sha512-jXldqN0a8QQXznjhvPPR6IkBTAxk6mz5aUFjDFU3nMOvGE0Q+vgeAOW5U5sgWzz4MDlVFAHc99Jev1MaB+oLDg==","signatures":[{"sig":"MEYCIQCijOJg4kRveek6o8gcNz0X4/Om7CDSs64twbO35Fh3iQIhANA5FD9gLtFSzfC41bq0iVdMO0GN+R2zOrAi627U4uSQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimtJwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHsQ/+PfWFQweg3ntdfoUfB9TI/rpxe3Q6nEh8HND0YRbxxJly6hp3\r\n8cF5VOOFtPg9e/2qb8QfFBjNVdMxMfnwgj/8LVe2dINmvpC+f/CcBuULqFEA\r\nmdtSJx5406YkmS5JRaTysBK7J3myygqdCmfN6ZbmLSWKWB3NQTrXXLuAuXlc\r\nwevdFRuqPaGRUxFBGqIqmdnJjtR9wNkgZaTr+Nom2NT9W5xGDj1ZowxPJoi7\r\ncUVMMiQOwavZE/TmS5pxgob8GuGInoGJdXTNZAzuAtb76NBNzRCLeDzIocEO\r\nS+BNuhEfUGZloNhWZRtXSA2mGFggUICaBgmX1ZhP9ccjre+AWRZVPePQ9qDv\r\na3v3vNA7rJRoQEv/KKicYAwhquhfBIsu0WXUzscB0T9JyOeqO71UCHDzfzaQ\r\nyDjh0gy6LjoP4eP1IK9WVhKCaDlHKj+qcQbCtYja7ZbJRJ3Jfdwtum7USewe\r\nLOhOfkBK76qZGayMxuS8m0D9U/Lve/8U7c2BW2WxnjrYO1qmiOrsVGc+zLms\r\nqWEvT+hg87QMDJqFbjeC1072C/XGx7z+0TI3bgB+eXzEMzp1lcVnXqNDNP7T\r\nhneKwOKrcsHJAFjnfut0EgzZ3EKrA/Iy3GXbm669jtQ/LhXtqArqhQZiNq59\r\nWjMf6gL93MIlNKB5Cj8Y2TMH7bsUeVvxpsE=\r\n=hiRX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"24d0e101512ec63252e38ac58a11cb0d905578d7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-04T03:29:33.781Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.7-joshbwlng-update-link-constraint-24d0e101512ec63252e38ac58a11cb0d905578d7_1654313584238_0.6761321013797374","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.7":{"name":"@balena/jellyfish-client-sdk","version":"10.4.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"89d3c60c35c8ee6f7fb4ed18d9bdd70693f838fe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.7.tgz","fileCount":34,"integrity":"sha512-mw4rjJ4rNKthafcVca9kUUskq4HhWQP3kpPp4r9QOnGDOp4LEcbAbZXoVR1CiGMXiR5Li5wEfnI8hpXdoWJemQ==","signatures":[{"sig":"MEYCIQC9kXMcchbHhJQ0dXHbak+B0vwDxnXGxhxIkwV94A2T9AIhAMpNEAY8WJKREoOiTm7X96JiNlXWyWL9X3gyoJHjt6Q8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimtNOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDsBAAkvF7BPVOHzHv0fdr0KxG0Imxl6g9iZVCKpLFoB4w/Z0k8sGo\r\njsDiQai5Iokvxznb/A485Sa2sk4fBnKZjF1oENUIMqMUMGOUCNjISweWlBhe\r\nVaBIesHDbq0Irx06rjtz1mpmyfBdeXlm5x0ddu4b0qP3q+U6QHIHa6SSEPWf\r\nmXpj6Z321+8IxZbfZngXM669lGk/ji4H+k5l22zYCDusQt2GdfFHPv8IE5l+\r\nYMLzrKQzHQx1Dd1S0IZ9DRXh5MHGzJkjByVcNusOplBMEb2CVbWV9yEpaQ/+\r\nqVI4ygnafHtownOW1NPjmmMINOuIXJnoMHlqtbC7R6Z7cLW4zyppCZ0hf0/7\r\naGY65KLOUHgqYgxLnsSAp5QaXR87l09VXfnU3UJ6ziBQsTzo37Jhb6Psu1yt\r\n1AQV1MXZD4tF3MzkP8vwLrtrkF4vb83uvxTX8jpbC1QnzA8DBsjJuHjoyKZ2\r\nawwQw9+1iqIEqUjuvwnQAmYPZ9d0iB4nqOGCtG3CsBBBvg8fsSkJvqBOBuRZ\r\npvJyPHYyRL8I7CP8pXaSVzpSIWOyAW5FEwIt3JSLTBhr4cQTvyrDZXzpl1zP\r\nnBSJ22pGI4nBZF73bLjHw2llOhYVX/WgVbCR9sDak0ODDs1SI5fniwtasFuK\r\nuIZMDQGvETC35Yly+r0srS6Tq6Xoy/FoQPY=\r\n=Oecd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3c9a17e9ce0aaabedab01a007484bb370cc8004e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-04T03:34:55.468Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.7_1654313806401_0.11252164498646744","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.8-renovate-major-external-major-2c5c88018dcbb40a93a1069bc01ad59e9a5cd101":{"name":"@balena/jellyfish-client-sdk","version":"10.4.8-renovate-major-external-major-2c5c88018dcbb40a93a1069bc01ad59e9a5cd101","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.8-renovate-major-external-major-2c5c88018dcbb40a93a1069bc01ad59e9a5cd101","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0a209819a22f2d979e80f266922a43efc854e4a6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.8-renovate-major-external-major-2c5c88018dcbb40a93a1069bc01ad59e9a5cd101.tgz","fileCount":34,"integrity":"sha512-PhAcElyipdalv78XfEJWNEKe1eYLp1tOvm4OPNPbRzDJD5kAb7imwtC35XXFBsV+tht40O6QemVc/hBlyXkFmg==","signatures":[{"sig":"MEUCIQD/1Gf9Gy/AUjezHX4PfqBCJicjZUmzgZfs6skCnw0sUQIgG+NGyQNm3AeJ7X4s253nglN/Qr+sAk7HGJcFoEIikxE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinGNKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpnvw//UGl7v3f+by38z3RjYotcfFaZtbNJ/4RWOB2E+ZR5FiPq46i4\r\nAopizG1LPKLC0kopokfxg3L2qvioWSlXNkZOwQCpro1HszcjlcJow31LzJpG\r\n79pdl+hwIt6Tsc6Kibp3X4Fh5vlaJO+IHgiLaBg+/V641j3wHFzgZBpeXdK+\r\nDVh8dF2a5dR86/uGq5i8vQgRgqVHdRS5Biwy6vFLnYF7KfVBFV9RUz7lxw05\r\nmflfTdL+ogux7oEif87tokIgtXKUu3zSMY+diD/F5TM0srsZMq+dDAGj6tkB\r\nFX0vEJoxKVQzpzVtHNBf3Pi3Df/OvxyplUPAnVSLUgnLn7A/Tk2AslkhNWlE\r\nV2lEUPPpKQwH9Y5qtXKU8RXqKWdtRksBHI5qhu7mD++R1wWgq2gCX6zBk8lw\r\n/vxezQJr9WSv7RFKSyit/mXJeW/62VbTrPSSw0rwgvoUPgWmBoVfYmOvmDyP\r\nqNqLUGiNOQH7HWVpeYbUMAaHoI0Fa1F0EZSADps9X1qvWsYQfGWLYObPuCug\r\nL7Tk8s6sX/bmg/jUUzj+VM9RtEuveoOoDsdti5tQG5f2Lutrw/d8fJd6BDTh\r\nfH3UQSDG9gMu79Sgt83IzvvGNzOQwtZLjG6FW4bbVDB3toNd+z14CP3w+IJV\r\nvUGOXTQB8mnk030rxgoOFq2O4iliWg83f+Y=\r\n=ImLj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2c5c88018dcbb40a93a1069bc01ad59e9a5cd101","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-05T08:00:28.637Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.8-renovate-major-external-major-2c5c88018dcbb40a93a1069bc01ad59e9a5cd101_1654416202128_0.8153335864462772","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.8":{"name":"@balena/jellyfish-client-sdk","version":"10.4.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"44a25fbd8aacc393e17113b9b9cad4162d70c324","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.8.tgz","fileCount":34,"integrity":"sha512-n7pYCbQRlCs47FIu1hsjSaxuR3TkjW1f4xJQoa2egQcfIPtgKU+KSIut393uy+eQL5GRxJgo1zjFHqBEOCaSpg==","signatures":[{"sig":"MEQCIAhXo+erhAbyLsmFPoG0zpJ+CLfnoUEBpuFPoky1/rG4AiAH8BgE72+2+EY04DbnUtDs8k47eMbx4aXiaQMtbCbuDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":292902,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinGPvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoh+g/+NhVKOL5MY3cfSiy0nLBiNztfD1+n2jPlKdvH9sPvV+97IntS\r\nUQzbg1ndpyH8WvDOW9S36tIp9wjs1P7iX7LHojMiXCLIoh76AcmWi4NM3kSI\r\nyxgBmZpx92BzKrvBCc5+2MLqbIWuqP0n9wVq3oGw/JbWkrGF6XZvD9BpEu9P\r\nmrKqIj6Ez6So+YFuC2QNUKG54DP2QnXWd7c+20OP6UHJC5ABDpePqBrIADZe\r\n+ue6VbzC28FQfiWcKUF2ocaHGhIXoBwbMM8s8c9Ah3mgM+CL79gKMM5c78mc\r\nVlglMyBtbrUMspONz3ZD/CnH7A4al4xkOfnaN9HdapVFOc8FmkZ5v1dTAvI/\r\n6DCn+cJzdirUYZ8czoOa8TofO2JeKdpc5VkREL0ArYmTuxoSJY/JzBa+A4HP\r\nk9RHzmgpnrNFp9RQGG5dMG3BBRJrOY5c79sL0CERZFYg/ETo4XziSxnDCnB8\r\npcc/RFVfLxNi5X9OGtJOcfas2rVd9I25w/botseTG6L81pkljxWu/DnSMSkC\r\n0DniPUoObUcojvpD7OLErtjcpj7P5XTJnyHpndQ8/w90a+7GHOgAgpZrYBD/\r\ntOzt/Z26GeUOS5/7vZY24Vq9T0LJNR6kyBmb7E4Qcn2tOSnekblYWtgrjCTo\r\nbeRfEhvpVB1enjOhcILrCwj1q0JYdnsB4Bk=\r\n=gC0K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b6c62080341b3d39f7e1192f57474b81ca5f8873","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-05T08:04:12.270Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.8_1654416367354_0.3909032761930864","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.6-add-message-reaction-contract-add-link-contraints-79a0354f3883d2e56f97adf83914d29283dd1502":{"name":"@balena/jellyfish-client-sdk","version":"10.4.6-add-message-reaction-contract-add-link-contraints-79a0354f3883d2e56f97adf83914d29283dd1502","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.6-add-message-reaction-contract-add-link-contraints-79a0354f3883d2e56f97adf83914d29283dd1502","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a0659425ecf45f2d11c413b486f366e5d0bcbc05","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.6-add-message-reaction-contract-add-link-contraints-79a0354f3883d2e56f97adf83914d29283dd1502.tgz","fileCount":34,"integrity":"sha512-kYFLmuMquJ9S5gcDg8fiD1UpPziho3hPReyi0Q8dTKw/VAiEv5tKfpsjNG/P/RTUVrwv408/F/4g4r8pW204PQ==","signatures":[{"sig":"MEYCIQCEmuy9huYEgyfKniCWNTWY6tmMEiPjtp3oPV+El8ysQQIhALA2X07hHE301G0gNfwGQiKaeUqq402giqmAdBUOFKT7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJina+KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmroxw//U7MF7oVsBKCdQzBdMSMh6MsNmY0e+W4UcUal5fj+tpJYvpUn\r\nRL4qEEyHo70WgDYUQ2IMGw6u2qboBQhN/o7G+vGppRsy4gNFGi/Dfahofx1B\r\nNAcP4xrSyNgakHNc/N7lUm9qcpCzMmmBI88woeYsSfqGwnu7w+7LhVwOXBcv\r\nNQGBipB8uN/qfibjs3Bjc2ynxeP6KuLA44c8xEF7lkG6Oxp3619p4tt2Wsaq\r\ngpxvJ7VJE46K+qNCCLo2PKSZYnfbV9QZL7Vzx+lGPzUWPNW4skK94Fhc55ch\r\nMc/PIZqDOPNxDxLw7RrxYr8FBOG5On8D3RDQxLVhycSNnTD+vGkQPbonurro\r\nhRDvKWRyfYrUUjcoD8pbQBM2/XYJMTNh7drqdtGy50cxzD+Q7XCXMb6dHUn7\r\nBfFRKpPizjMq5u6nxfnMeILEdWKnECv0EoySaUMob9B0TmrhRLIOfvD8+voP\r\nCfyk0GMrQ9OZlaEvHsvrGL57hq4MfeOsZkOWpQBKiPOeTq98lrWoA3KFXXW4\r\ndwlD9l952jUJ/dM13BlQefCWPzaIv4PzjSbYJtnh54DACiMZ9cPzmk0Gm1j5\r\nNkRSmIAqVNbTlDbPEtq2rjK8sHjjLdhwQjX/fR/RDoVgLYmAnPjqT2+f/Js6\r\nRPnHAhCgsHGJzzj4+d3KhjqaNaM5kuL8n74=\r\n=IWBw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"79a0354f3883d2e56f97adf83914d29283dd1502","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-06T07:37:55.719Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^13.0.2","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.2","@types/jest":"^27.5.1","@types/uuid":"^8.3.4","lint-staged":"^12.4.2","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.6-add-message-reaction-contract-add-link-contraints-79a0354f3883d2e56f97adf83914d29283dd1502_1654501257958_0.2720130492210253","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.9-add-message-reaction-contract-add-link-contraints-0a59467e268abad5325c2968d8e08eab371aa63f":{"name":"@balena/jellyfish-client-sdk","version":"10.4.9-add-message-reaction-contract-add-link-contraints-0a59467e268abad5325c2968d8e08eab371aa63f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.9-add-message-reaction-contract-add-link-contraints-0a59467e268abad5325c2968d8e08eab371aa63f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"39e6b94c0141f4671dbca8f3ed11eae363dc482d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.9-add-message-reaction-contract-add-link-contraints-0a59467e268abad5325c2968d8e08eab371aa63f.tgz","fileCount":34,"integrity":"sha512-GL8xsJor+IKIGdiVJ4gW1KA3B487JyZgU3SeB0J8BznO5y+G6kQg0qoHpeGvFxfn4iY2w0hUhQABu8X1zqjqaA==","signatures":[{"sig":"MEQCIH7UzKFWVwlh4f+6Rzc3m+htH7lXijjwGeALL2RVRMptAiBoT65/UewwKdrw6EJ1VibkhM9ubQadlJZS8xkb2e1nrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinhWTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrw0Q/+Nd93mV7K7k1CjZgAs96yhmKXPp1P1OT75dLrf2FJlP3iINHD\r\n1loj8BbGbwbb8TPxTheTKsOysJHiikdo/oYrJKb81YHAIEW5/yTEf53NbMq4\r\nM5Jffc/gftS9XYm/A/o/3sZ2ZKq8FY2P8sO3MUkgWANyw5lYqvyCi2xVKjD3\r\nyriZa9+h6iEf7/rMLUmb7EWmHsFHlmKj0b/+shATfyPqr5Uo2P6pxnXbKQlz\r\nh6DLrsuz+E8FiqQem2vM3iwQL+/72wJYgfQNqCJQAbRZV6UQeXiXXPS/x5xB\r\nTSyG0Wi6WzSS9OLcWRfnP05zbHn5W+adu554jd8WrldXTqrzSylBl/bBuk2Q\r\n4mVaZ39VGlNZexIpjNA5MQlNgLFEt0XLvgWnljYqmeb/KfnGJ9vOhYDuH1JN\r\nhZdFsARK/knool0GfRScPFQ+cQuhSFhqDTjrQNRzFYL0xmJWEZd7ZjgXo62j\r\nuo8tQApO/66YeCDj7osg/J7GkTxgvSsNwdAiBTAIRCeXcZ+S7zR74c4vnO/h\r\naxBG4sCqHXDmXr3/tqgNcs3fXALTLVp0lF2lEfT6mAPCTHSpbNxrSqkwXDeC\r\n7HUblGn9PUPhFC2f+/RP3l4SKFNIeCx0ZzTqCZHyjt7nTala9nZYMqaCkEAX\r\n8P6/XHSwFMdX0fBM1LuxxAdvKMTM9fiyKmw=\r\n=SJYL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0a59467e268abad5325c2968d8e08eab371aa63f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-06T14:53:55.145Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.9-add-message-reaction-contract-add-link-contraints-0a59467e268abad5325c2968d8e08eab371aa63f_1654527379457_0.8886134033399484","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"10.4.9":{"name":"@balena/jellyfish-client-sdk","version":"10.4.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@10.4.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"68200d60c18a732cc20c14bd03fd5dd8fcd26ba8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-10.4.9.tgz","fileCount":34,"integrity":"sha512-yN3Jbqb0w4NUwWPi4LjvNrtod9lNderzvuuHlkbqaL3a5mO/laQo6gERdKHv+MLcgLHUZ/AUK8RNcTtoaG0Fjg==","signatures":[{"sig":"MEYCIQDbYYawSghL7hZz1EX2uZ+mOH/37AtArLDjXbM6LKaWzAIhALe4wgXSLuKd9DpIF1rC2/rDpqxt8QM+WFnBuQGJtQhu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinhdwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOgw//Srjsq9U9+Yx4DyaNw87LewgJMn42eJ3yATjl7AlhGJsloU8c\r\nwsZrsJL3Z+6c5KMs+eEFGHOjP/XD6uyIXgTpzfA3PTAy85AcrJFH6Prt7I+a\r\nxmnY16KVlllUbXSKM5bYCi8pGgDhMAxi5k1qQRHkWIEXqFGGu+CRUoiE9O2k\r\nUL3uWwG6ydrX+1ChyS+96fTIIvVHjDQLL7K0ZA/wRBYy2QT/0mFZyC9JKuyO\r\nGWEx3ZWzPlykDd+N4KReGoUFtqJH02ksd6lvXZYuteuOdoFXF4dySZV0BmEV\r\nBAsJBfqfpqA7pReCLFHkirVh+S6eT8qmfTNDbsdcKC21C+n0m8GsCc48o1cx\r\nHPX66fuT0bhIEfgbV2Abb63d941T11OG1NXBR5SlXNKEly0uGIdAk1+xO3S6\r\nBzwo8Evgs40rQZ9A85SL8NstRrgz7Gg1m4maoD8D0TlP1I8h4gpy2iHdpAEL\r\n3w1rIstSkHyutUJfjnGUYZ+k4X6qPYkC3BbSdlhD9YmGUZKlMCs/2/tVh0yT\r\nC30fL+V446QEtEziZ41dwv18NQYdyGLNDO69H5e7H54NCPXjTzW7rVhHNAtD\r\nkone0USlVM3tw4R0cc9X0BGxWIbQ10ShbJxOY9R2mfYdpxzZRyNwywoL2ZrZ\r\n0aFy3V6kap2es/pe3SHX/OpkMCDcPUcQ90I=\r\n=8tDQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ad1d7c010a59cdc67f90ab74faa4026917c274ce","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-06T15:02:11.364Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_10.4.9_1654527856441_0.4303241429393372","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.0-joshbwlng-update-link-constraints-a20a8c044b99cdbc1c7c12ba130a22a62f849783":{"name":"@balena/jellyfish-client-sdk","version":"11.0.0-joshbwlng-update-link-constraints-a20a8c044b99cdbc1c7c12ba130a22a62f849783","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.0-joshbwlng-update-link-constraints-a20a8c044b99cdbc1c7c12ba130a22a62f849783","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"310336f9194cbb7a7ec9e73e518995ff4fbe7fd6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.0-joshbwlng-update-link-constraints-a20a8c044b99cdbc1c7c12ba130a22a62f849783.tgz","fileCount":34,"integrity":"sha512-FG8ozVy+ZqPP1JdBMLgUF4m/KkoYJ+UA23stcNXlgu4dlBfpQPnk+77OG5GrlD/c9VQtbrGgJOzId65+F/NAeA==","signatures":[{"sig":"MEYCIQCXWtrl3J/rv5n3CGzleOT5sMq0cMIpNfEVqgdXdylSLAIhAMACYQWlI64yXWtkCpoy7PqYhsy7/+pdpsWQfdEfHtHU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinqRrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohZA/+IZsyIztToO8PVnO1N7mpmkG8rCf+1PXoWJmxdIHoYRbynR7y\r\ngd3Cg9qy0+xeB/M9mpIIkbj4Qdn7tLRwI8DuKyuhdF6Dv5fJPgtivIgIVAt0\r\nJ6LlRZhKm6lUqqab9H08wEo5BV3HPJpNBma8HMZo3ucvaaLKlSAQWNWmdA9H\r\nVKoFrsLUdfkQ1GfsUp8st6O0e8TgkWJPCxrMnJE7T/QL3wMz3s86ca86SfQf\r\nYjMUkonztGZTxfh3HPuXPezy4sFvpqiJMaXQMXZZyXRtWHzs+SvsIICrI65j\r\nkWiCl+A8vJ6DZSlOaWhsUC/HOqHehmnK7jYLrgz6Y60PT4M2St3XCy2aVmw3\r\njGT8AZ0+pUL+RCoYvF0p0EBzbcHONLhPVKT0hneQzMyJLdzWWlXaVpPgRUjV\r\nSdLhB1GpgEDbxHuSP4PH3iw0HzLSRTSpAyM3cv7UeAo8SyOiCdZDaPmHbHqf\r\nF43YgdtYFsNA1RPulLYxuP58UGWDlH2YzdBjIfXGCi9iBgee4U3XQpoQ2gU4\r\nfbnHVGH38l0IeZ+JAWkzBGAm144h3zzimtNpxKEp8zaOIvmg1BAPQ6ni7Xj/\r\nfscnkzZGd5xfaqJO/zlG1QXFMMhUvjH/Ph6JF6OHhQPHtjA6rfP58VDogkhh\r\nMtGdSzDMeZ099fsZZSBsJOMBdAFZtQkyCFU=\r\n=o/9G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a20a8c044b99cdbc1c7c12ba130a22a62f849783","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-07T01:02:41.078Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.0-joshbwlng-update-link-constraints-a20a8c044b99cdbc1c7c12ba130a22a62f849783_1654563947428_0.957657548114045","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.0":{"name":"@balena/jellyfish-client-sdk","version":"11.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ec22b098b7e8793c3c6a1ea026ef621c56a80444","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.0.tgz","fileCount":34,"integrity":"sha512-1qeMU+DYHRt48jGc/3P+9NB3zwIIN/Q9F7vK70l2pJ5PPnjzKJbfmGErfSXoPLECXTABAbHcw3B5Nh7h3ztW/g==","signatures":[{"sig":"MEYCIQCcLxzXZm1+/+L/7bEmDtaNCRUBdBRbmgo6cHtDNMiI4gIhAO5Q0QaEQ1HAeCegXF3UWIlpHCOEaWQCxqD7Ph2CtHTn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJinrmCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolxQ//cnTRP9w0usHHfobtcddOC2Wj70mfQYKFoH9NBuMUv8kez3oN\r\n6D1ThEo5qOqztIrAf4xBXb+NKOfK1FnqyZKnip3VumSXwnCbWhg3xbkkOSsp\r\nRV18zUtJSWnepf32XmFcgm/X6GYOIkI2yCMOFDAwXKOu3i/48D+2zSvE5/E5\r\n8ENkWVioi2rSWbfsRD80Z515GRWK5yoNkBzfOOcSm7VNJ77rhhFOEqmyI+7M\r\nXNM6z+aVVaa/WvwR1RLgnYbwpO5QEwbLly2Io1/PMhruiaj+JWijS2niUlfZ\r\nnz2izS0uc8ziBguZW8P2BboyJCGmpb18fmSNYoYD7fvmFBOf47v3ngAe8hWa\r\ne47+Golb3SaCsJ7afHRjqu7Q4X24WMCbZP76tIe3Y9YinRx/W1JvTAYF37YB\r\n3GNWRf5ZIAJBVi58O619OhjzjOMLrCgBxIkF0/dnfOkmr62VCDyODUWCap6D\r\nesb6Qbz2KOv52fLJZpFWsAV6FI/dDvHensZitDrch6i404keMEQciOOE+jy/\r\nDB4X2bQnRMl0jLT2g1V9XiIgSuNJaxEyFQ3th42VG+ouE2qVa8XoiOQrOqHq\r\naCH8GvKJRvTivOemy6M02Ws9Lb3Lbw/3rQOBfv6gbVwBsflhkMd7WMWRaMKD\r\n5UYLC+qBxqd3f1htgZCeQquQxh8774Q1t5I=\r\n=g6qc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d5d19b7383744a32c9836e6e4908149645ed76a7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-07T02:33:33.101Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.3","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.0_1654569346379_0.39512154557036516","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.1-renovate-typescript-4-x-1c55b1ca4b5575bdda61673422f1bfe60442d3b5":{"name":"@balena/jellyfish-client-sdk","version":"11.0.1-renovate-typescript-4-x-1c55b1ca4b5575bdda61673422f1bfe60442d3b5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.1-renovate-typescript-4-x-1c55b1ca4b5575bdda61673422f1bfe60442d3b5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1e33fc77d24bacf89cb1924f30e313774fbe2d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.1-renovate-typescript-4-x-1c55b1ca4b5575bdda61673422f1bfe60442d3b5.tgz","fileCount":34,"integrity":"sha512-pvvKeiL8yVthNbQhHCw/V1+UqC23uKV0QaiZ1W6NMweVpgSS3AwnViLNRTUlk5tXIpnCOMEZ/xjEtrylagZWDw==","signatures":[{"sig":"MEYCIQD+WGxUT8HMCy77tQ6z+sBlpgJcWn/0YE7BBY6uXeKjNgIhALO5w/5BNF0OcPIIWAuWnYLqkouHj9Fwbzsd10yzEG8W","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirNdLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6xBAAkd7Pxh1e9KYD/H0b43WiYULL8lObhFU3XBYQ77fIAcoD9swX\r\nVaQxYq5sCJ0aljysJKUlp+PwTnvk09ferVOgMu/P0FbHw9TKmlSnson9BYnw\r\nW/4Yddi8PQEO4XDtp+kSqjUcWU0FhD2AW1yWRK6l+AVmnZ/K1mZB1F23J5GR\r\nvpbIKOjeJH6tx+WuQK4ojezB9DR5zJUcHH/X6150Zd+ayXJEkW/0afhoehpZ\r\nWUPu8kbaAfRZsdIpJ764VmmBBPZb2jwmTcc/3kYoU/hBxpw/lfkCO4kTi1EQ\r\nfpjLturPJIJt35AWxTZ7SI1y43I4kPcz1ubEEtqpz6/dr4iFKgYKtkRSPdrc\r\nYHKTQZvaGg8QOQMv0e0lsogqEnqIpaIpkAK+GC5ZQ89GPXHzTnvRCHGN5r6k\r\n7VvQFQ8t8G6o0+fcEeObuL+rCHghoqbQlUPmt2cQp+5GsrRkc31vqvjlQHVH\r\nRVXqtNk5lsvs02f8zKq+72UVAsoI70N5vLMJ3IE3K8vJ5PtOIkM3ay1Ce1tZ\r\nuluATJmYKpQD65dBA5jTrgz/1FEvn++6MOwQKcjfgrb/LCW20wwUiutYsIrq\r\n2t0CaJU8rpDRSwktr7cg1UXGc6ZDrlZo9/qM+N6adIIMj4NLg/w0zN+yKbdB\r\ngF6NUhbkhebMT1pVcD1tv5Q6MAf+hJDVoxw=\r\n=dhhF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1c55b1ca4b5575bdda61673422f1bfe60442d3b5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-17T19:31:41.545Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.1-renovate-typescript-4-x-1c55b1ca4b5575bdda61673422f1bfe60442d3b5_1655494475070_0.10398142533101473","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.1":{"name":"@balena/jellyfish-client-sdk","version":"11.0.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5c2edadb7a08d542ad91ea215bcad371424e42b6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.1.tgz","fileCount":34,"integrity":"sha512-fjBh++z/bz0mswtsBCWwOvSvC/wLvWbWZg5X99tp93hk3H0JbCQj+zzdiTb/hkpto7RYqYgqmnXZ0PRUquWc3w==","signatures":[{"sig":"MEUCIFFaOQe53habM4/DXMBiLU8KBBSOgpAEOCWjHIywYo1sAiEAzudRxnLisZz74wCn4zPbzbxq8lWSIRkA3N/prlALXAQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiruHeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsFhAAmjlnWmT4Ge+hIR14f2OKRirAkkOoT3je0vNHmOMgwGuiJ8IS\r\ntv56MiSCFzgyr8jPTZQKuyD6gvS4nZXF8HpfXUHp+TXWN75hE6jLkwhGKWjm\r\nCXFYIZEbK7ogEG2JNI5uCxwSKLNKrT/OnfuhOyMWnECFGjWexQi4ZZuXBiN9\r\nVLgt1s6ZCk/vrQ8mDIMFu3NItdHlTkxEzcIjyyP+8luXvIgd0k/qVMKyCxt2\r\n8vsnh/hLvDNycFbO6bMref1LFjBOWcO4RPuG253rK2dvgoav77YRy2Oc4QSK\r\nR+Z4Xdo7GbXgHQko666Or0SnOnMrubzruxXu3BV7bgYXzK5g2YiFP126+dN7\r\ngfnHskZJ5tUp4mQs49xNwgJQbhhhOZUldmcWRz8wLe27zh85MaG4zBrssqmV\r\nHV2hWle9xH2QQO5q+Hn5DxwLrKV7fxPiFTkPgjWolSimiCe//iNivylNQvW5\r\nsnMeyevytNVpYMRnNHTMUCjFIXxfh9E78cuLntQg8wglBAdwLKuIjrRobCLq\r\nYbkegBTa4fNSSAa/YTZKhMQDLNW08bOpg841sl8N+SmmHZ5k0UDFoJSVaCk8\r\n6fritnGeo1qoOyf5pTlfdFOcvAOqab4Ixl58BM6FjFygGleXQcEFGBusnDaU\r\nJpe2m3CzbTX63jvjDJfZTYcJPekZYjrRPyo=\r\n=JQRy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2976657b553ef6e9800519c125f2671432709946","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-19T08:41:21.872Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4","@balena/jellyfish-config":"^2.0.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.1_1655628254408_0.3563481356357574","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.2-joshbwlng-drop-jellyfish-config-6cb1b584d69062bb4c63f5eb4338035c9f388a40":{"name":"@balena/jellyfish-client-sdk","version":"11.0.2-joshbwlng-drop-jellyfish-config-6cb1b584d69062bb4c63f5eb4338035c9f388a40","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.2-joshbwlng-drop-jellyfish-config-6cb1b584d69062bb4c63f5eb4338035c9f388a40","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"07fde333ad6e1768d13c2d97e131036d66558372","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.2-joshbwlng-drop-jellyfish-config-6cb1b584d69062bb4c63f5eb4338035c9f388a40.tgz","fileCount":34,"integrity":"sha512-KJ5ixaF61TngCQKSFIIiORVjsZU1J7umdRHQ4mlrY0CaNOnab7C/KBLbe3eBOy651d/vTYb1YwBfrDB7HaeCfQ==","signatures":[{"sig":"MEYCIQC2KbVphYDw7DUDOxiN5PiFBIz2PlRytW7m8Lty8ym9XQIhAI4El//oGZ7LzI1dQp+uaMWswrYxN6s6gkNb5ko96ZMV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirua7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrxJA/9HqyVxrV9azNDNKpp+8A6GU3k5cgKUUgAKvaFSTcTzm8Y/7gI\r\ngNsaetTcRC3OqVxyxcXqFo02k8BhUdBWzRU00ZYoGVuTwm4ZpIBHXfiUe86T\r\n5iBxuRar3RwUqKi2xUpQYj+EbfkyjI509HJkOU5fAVtZQARmlmbdtKCCWk8y\r\nZT+4rk5atq+1YRQdOzqWNR6QhIyEXLNEAxJwtBdweQQPp4LWFwpG06ghi8DA\r\neCL44DgBNcJJWeKiaruj8rdoLt4WN9zW59/emQUhCPsRNeiv1Eyw+UGrlPib\r\nxBJtL/AtDBjaeqQxTVrniWdq6jZyMhF7HnpaZtMP6vjokjfh77uUDKh7L44g\r\nj67TpR2NXJ7VOYXTAmrfN+uot4EwPIbjduPWA4ZSuEHTMtkL/jIzpXVQ/JOh\r\n9CBRA7rQptNeBV7dKemnyMR93iunh1MuCeFb35b6Hz1dPIu0vYLU3dLb/JBd\r\nhRg4iaiz3ol7so+qoD96Za1j4U3QMumTSUnIiZU2Rg7Iq6FNN6Ekxv9hQ8QH\r\nt2hMW2iq0g36j+97KrWoangGea91R4TAMjlTN1hjL9NA9GNMKuXlTFPwU6MX\r\nO2kzJSWYjy+vtw+1TMf4fsgsXDW4iE8itdWX6nEKPFEs2Njmt66o0TJIxRcQ\r\nhwkwDjPWn1vGhS6cYGVpueeIyhsIwkuHSyU=\r\n=8Ogx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6cb1b584d69062bb4c63f5eb4338035c9f388a40","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-19T09:01:30.138Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.2-joshbwlng-drop-jellyfish-config-6cb1b584d69062bb4c63f5eb4338035c9f388a40_1655629499367_0.3490403639559263","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.2":{"name":"@balena/jellyfish-client-sdk","version":"11.0.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"71c27bf57fe60cd3c6724089343336a55b71faa9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.2.tgz","fileCount":34,"integrity":"sha512-WvscRvJTy0h17uPS2AWOOwizHZdS4IOo7pCPaSE+X7sCq10hfVPM5zpVtZJb7MYlt4qHoSSriTM/KswwJQxngQ==","signatures":[{"sig":"MEQCIHQKV/dY5fLCV4q+tK1wLZIZLqcslY+Xg4ydAACNyDU7AiBSthZKs+7vj8vA7ccmsysi1rYbai4scNVg0IfJr1tCgg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294934,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJirue1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr5Bw/+NoIChKC731FsOtawe7v+z051uhgr70uDeZoLFiplHiko5RE4\r\nLVE/72UoLpx9akG6D18Oi7dMNzTRMBZBG/7YN/g/mNZJINmDCgitdWU4ZyUv\r\nupY2Enfby6p4trZENd8VwAgII0G504tLJ6idk4ew0jfK9Oujxo7YyTJEyh3O\r\nD08H9Q0gMIJlAXBKyMOrYqfBJp5otc06BMWp0tYezh+KlwNR6uI9tugxQJYd\r\n9mTng5JugYpbpqUjHc1/TZyAYT6EV0Bf7ALFeCuDgFvXEeBa4etKZ5rS+9ll\r\n1vkPQy2WUQkqc4wN9iYBLIUGbNcIHzWD4mH95DJy/vfRkMIKzjhdcPtyzCPi\r\nkUquXAVaSpj5Szp7xGPlJcMn+Ib6GmGN1PASIZssnCZoC9QYhXlu+U7Nt4vu\r\n7/QCCllSZMwSK4H+DVx7iShyit3WKHRA9alkX+l/9YZ0vgN3AfhSg9H9SaZd\r\nl/CbftK1jo9veMfuh7i3lAdYPVnh/RbQuZEJqLArzP9nc8EA1ha74jmfzmXR\r\nK3cmONtvMnPiRNzVwYTgI8pvjediW77pkqiAU6PAK4t53n9gzpVzU55//tJ1\r\nbfMyIi5ptAbDpkAdTaMhDXlzYq4iwI/HnwlPZI6Mq47UntvdlQXp6ZWX4PEp\r\n1WrEQmjqXGkQsXQoHuqjhEwSJTHEvaK0UJU=\r\n=eFdu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5c3d0082a1346de8a6c767806cb52bda3baee662","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-19T09:06:37.133Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.2_1655629749413_0.9673008899810756","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.3-joshbwlng-drop-makefile-a7fa6ece41fca930ed2c76113195aa3f3c350b2f":{"name":"@balena/jellyfish-client-sdk","version":"11.0.3-joshbwlng-drop-makefile-a7fa6ece41fca930ed2c76113195aa3f3c350b2f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.3-joshbwlng-drop-makefile-a7fa6ece41fca930ed2c76113195aa3f3c350b2f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d3a4b67a84b1599294c4b33a4c4fe86210329ed8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.3-joshbwlng-drop-makefile-a7fa6ece41fca930ed2c76113195aa3f3c350b2f.tgz","fileCount":34,"integrity":"sha512-8u5wJAbG3KXVJaVI5JVlQTEp3E+8i3tAvd8gyQMpYPqhLQzHo7/7AMeqq8zdIloJ4BwIvsmI8DQYOY0Rsarwqg==","signatures":[{"sig":"MEQCIGCe2Q5MqzXRYLPXFoWPq3pW5HZxPCkwOu4bTM0wMMznAiAhm6OPNRDp9gd5buYsUlbv7cjPyVp5Re7HPveKWWakTQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJir/6OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp23g/+NLg6T5Sxs+h17wh41LuztPGCIdsn81a3yLj+3u0jZvQuooCp\r\nv7Kf8g5oZ6ExOW8be5wgYUt/s3diDTOrGeSzCKhtvhexiMI7uigFRXi/Gz7e\r\nq4M+7SrQ+nWepl7BB2IML9VWOPJrGc8BXJwOrhlGLror8s2PfOgtvb1ofnvc\r\n+f8sY7mlp5mvUWFlGintQOCLgSxKPLgCiUFo+j8K1CT+OfVrho4FOLVUkGOJ\r\nJNpS8ADOiG9TDLyklZdxqmCcD6uvEHHcWYTBLCyCWYjYzGNJk1tkH8X+ofZb\r\n3F5MSSbDLf8WIGE6lDIu3+kf5VsBmf8g0foCr6vs++TYkAa1Vd3Sso18r6zC\r\nBGmjeRFKtdSxAQXc6w+SyGN4hUlOwEaiEfpA7aHcWmflS6XBffZ52vSKXT8u\r\nIqHJJ0PBHV5TTCzaKTeYsT9T7+9noha6Q2D7DwyPktSvaIIzCQCoJh1/oIRC\r\ndwUMYlpTjR8/5asLxPbr2t0MF2NmTztHS6NGbLmHa2KK9ESIHPBI8FIod+yJ\r\nm+HzjKNua88PV0H23Ua0ccZrmfucm17uznErGY18MhgoVBo8RE4AJj0c8U5g\r\nSb/bekQcx5FiVbTw5QYw0TyhILd3lJ2II9iek+7oPyQKmTtBnqv57PBkO1p4\r\ne+uc8juxPqrbdKq8S+s+Yztvi+0tp/XQ5kY=\r\n=cea5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a7fa6ece41fca930ed2c76113195aa3f3c350b2f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-20T04:56:00.522Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.3-joshbwlng-drop-makefile-a7fa6ece41fca930ed2c76113195aa3f3c350b2f_1655701134406_0.5738223850613293","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.3":{"name":"@balena/jellyfish-client-sdk","version":"11.0.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c7157802986d8052df60ada28409fb5370a5e087","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.3.tgz","fileCount":34,"integrity":"sha512-vq2Pcoqiuo0gW9hkF+Xf7fC0H7rhNpvfT6DdmKSE6iNEL1H8evPvpjuls6IIjnbfO/pabWlKbcRBKqwSAmGmIA==","signatures":[{"sig":"MEYCIQDJWYq7tgQBz/mNN3y5FNX67eMM5Gqj+ZxSOYz3kf+gfgIhAPA3G7OKoBRwlEFGZ1aB+ca0KfkXeNvMDthITziD14SQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":294990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJir/+TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCcxAAmU7+xJ9B6nrBQ6/RpKHfz4o85Uvd4mo93FXP64PxWgQXqGfX\r\nHqhaCZ9EhVD9KoLw23UO7icf7TAFnMzxQHmCXvGhl33UC2xd4dSDNhliDAYs\r\nTZlusEVEHChuZaC+tcUcf6j+kFf1LQR80F7KCdZNQaC7JCEEpAWMT8wqfsli\r\nl3yZMrRkbvlMIVG8pD3+rvX08Hjip8+MICCfO/SpqPRxrIKBLQXqi8UUBjFP\r\nJ/LPAIF7bIDDT1yFj/S+pmqO7CPI/uoAJrmP2ikU0UMs0Tm08OAzuvSBbGDy\r\nQVC4H8MYlIN4JC1tkNHy02bF7lKLfKY2A0E0rGwX2nTZCqeL0vqD3/nxy2D/\r\n+cUVpCOIOKfoJgbMYLDzt1xohmA97KW40h5lYnik+3FroLpIdLvlZXMPYK7w\r\nY9Oa2PWxQXYVLO2AodbbGPe69e590jRV76v0sVm/ONDXuNVFXq9Aj2eJj2cx\r\nVbLUGmqcLRcKV9B7pvqxXP7tXnNUIP0iCs+Bg9AJKoqDL+8P1y+YeV0knoL0\r\nranYJHKBw608yR+WrICr6UOdEVUteR9S+oSaXrDur56zTWB4hZJeY3MitYBm\r\nx85E1mF9d38zQbDBAqA4HOkcznf6z+zZr+V0GzB42R2f+Ckua+EPfA5zeE71\r\nmmKm/82BJfELGHLrPTPKGX3NatdOSrQlQjo=\r\n=oKcK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"24c682693822eece684f2b0c97a9f9ec3e662b8e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-20T05:00:59.569Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.3_1655701395267_0.41148235743674877","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.4-joshbwlng-working-hours-5900f820558770b5241222ae51f61a92d5d73821":{"name":"@balena/jellyfish-client-sdk","version":"11.0.4-joshbwlng-working-hours-5900f820558770b5241222ae51f61a92d5d73821","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.4-joshbwlng-working-hours-5900f820558770b5241222ae51f61a92d5d73821","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7857a8ef39de1f8a7d163655aab4d56fdf1fca05","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.4-joshbwlng-working-hours-5900f820558770b5241222ae51f61a92d5d73821.tgz","fileCount":34,"integrity":"sha512-GP+ZkZWzf8c3ZsSZqJM0hjNuZKPdZ3IGHIXjdMnfl2VBEFTdZ7Njpw7kY8tss/nBsZNt0X8qZjZK+zytCeYnnA==","signatures":[{"sig":"MEQCIDv3OfvBCe4aSVdEoRhicOdFRuM7HTj+AvfVSPoMlkcyAiBIhwJ1rEtL7uwqy9d63fCLyC8jShx0vounkFZ4PSwJ/A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297126,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJis/LNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoc+Q/+J/lHeviQ3PKG9Oglfiye5TmZRsUkleQoKeOJ92D/BtEXl8tT\r\niXKdNQ8sYt7HPSKBWOhY2GUhg6n1DfDdsO8wyF53NL9E598SFMj8qtm0fqco\r\nqcsgTRdP596zTa8bskmtDVGTtte6Y+cqCxY1pbNPporNsXLVPvXRedBNQdzq\r\neDZhNefhtXDtVFVEzsLjz7MydDXx0rJwbxiut7ovsYct4leh/L7YcaNhut8s\r\nhXrvu3RTbuDzIhvzVJW7kh4PU8O1X31risMF9z24yxcbJN8tg1drlm+PCZHt\r\nRc4zBshTEScNM8NNK3RCfs2K+rvXtI9vzEUCn3ABQF7iTweVLJSaUs+nJUW5\r\nQWkNrBKCQEq0Amj1d4h3l8b+uEt8hgRcCYjb6MIv4vlDALbkhHcX3P1O3GWD\r\nVAy1svthE7Bg8G5u6eR48ypyAqEB/3g7aS39VjjbD03d8xmVEDhZO/iXHJfY\r\nf+XS1cbphVV51AKVIhpWzC8JqkVKheOGWP/o0EIFkoW5UxU1v/HnoC1ZiPnx\r\nnXVnX2rkwWst7xX4qL1AY5iBz0goNWAiVIF0PKSwlhw+xtKOOJS1Qn0Yx/+6\r\nyeYSjurOrWNQnG8Vr9nBuDyka5xO/5Iuudc9Nc63wWlSgj6kmiBmU+mutrYM\r\nt+AivumurLZmi5tL578odP/lSFqJf+bevf8=\r\n=FfvS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5900f820558770b5241222ae51f61a92d5d73821","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-23T04:55:34.010Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.4-joshbwlng-working-hours-5900f820558770b5241222ae51f61a92d5d73821_1655960269706_0.7932619925312798","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-cac4b3f829fb4b02e6c7753f67396771df93b98f":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-cac4b3f829fb4b02e6c7753f67396771df93b98f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-cac4b3f829fb4b02e6c7753f67396771df93b98f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b5239b4c3b194e7fe2aa1d871cca69e48c7dce28","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-cac4b3f829fb4b02e6c7753f67396771df93b98f.tgz","fileCount":31,"integrity":"sha512-EG9RvIGMiqwIihREwqd/DLj+be47sfNOg5A6DDg46WiDo3zZ5UdAaumUcUyXWnasq50/hwJTFlrjPXVgxgrTXQ==","signatures":[{"sig":"MEYCIQDtDM4lObrfGMP1qJw9uToq6iRoC3ijweXwKLo1VUU3jwIhAJPYKjQULe/ScLjPMaCiRUl6W0LHZq6ia8sto/UgDa0V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitXISACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqftQ/9E8HH9fRSKK7P1YP3HMbRvaYkT34W4XzwGRK6Y8/gKicI4/of\r\nP4ybAa1QC0SKXYKGE97ELghRT/9AM9XOhZ3nDL/YddY8RLLEaxFJHy9zs0PF\r\nzCGvJrjDAROEK6ez156jJYdszIZ01lihSnt0+Wlr8s0jKwbYcyjlc1QwV20B\r\nslo+188/erexT9Keq1o93qFGXfyKK2K/1nVYSWppkxKGXlsRPeNmPlazdcOz\r\nCBo0JDgB6Aw19dAeciOwf63PxBOLGD19dipmSaBBb0IO260xa7S/hH505OT8\r\n4VSIXcGMqWXkN6lSj2DaT94Cnqlw1fG3jeUH20XRE7IfJ0WLSYd9/70wm9Ba\r\nb1n7FQ44dGzo7F0sde1ztAtC9CVFyw0FcVTLEswDMKQqKag0vRv2yl1vN+5M\r\n2jwR4vcKKgeSiNMqqQiwlV2fcmQactHLxFC+UkK6uEQRxD6/VAbNfgtxxM8+\r\nLaXAccij9hoAz4N8uuiJitBiS6Tqfufo1uXE32iiaVLU/AVLAzw9ajLmKx5N\r\nx13AQsuXP1V1SAVga5y8oMCPM1VdnIq8DkYBLxMS4240PBfoLHMw//GyM0Xq\r\njaIB0Cx0kb8EPmJFzbqyD8iewudDDAMCYNmTnhsNOwQ2DcpSHX1xgajg7ehD\r\n0yQ2mFqySObZM8z13ZfOAG9C08oV0qewkjg=\r\n=saOX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cac4b3f829fb4b02e6c7753f67396771df93b98f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-24T08:10:16.931Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-cac4b3f829fb4b02e6c7753f67396771df93b98f_1656058386189_0.5380361598558374","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-26ea62ed046b2cc4865ec56426fb611c89cd534a":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-26ea62ed046b2cc4865ec56426fb611c89cd534a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-26ea62ed046b2cc4865ec56426fb611c89cd534a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1ecc83426b653a89437881a4eccbd10f9645cf1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-26ea62ed046b2cc4865ec56426fb611c89cd534a.tgz","fileCount":31,"integrity":"sha512-9gGODl1Eskrhgh/AT6ugi1yhQH4flJ4wp48z8cJofZC5WbKTRQAbdJK+oxeSL6cVE/SOCH8lHwFXnHFnGsKduw==","signatures":[{"sig":"MEQCIDenuVFQAQmoOiv+WK+6lsWrTRRoD0CXpgPHhRLijZG/AiBPNshYBj/p1SzazbR5M723QjwFCH7okPWhofw/dfgLGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitXN9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYmxAApLedRkfWhqiIbdrCS1tcrM7VWGqQGSZEIUQcLCbw37oUiN16\r\nxYoUtY/rB+k7jUH4V6iYu5GCeULXOApkQx5HnzUCaFW9ss9xYkT0A3m21vpW\r\nE3eMSszixesdZM1bpb9be/Kca5F9OvyeJEU1hCYKTyrTOVF684iWHYsvW4AA\r\nvLcLNPrSG7kteaC0o809InIS6A2Jz33iMNgzG/qMEm1QEaaTrzFqvCyznB1/\r\nbP3OO8NhijbSHUXPq0ZMAN78KL+WNlXrlAQ/8dobG2BzvHP8uNaafmJVFTsO\r\nfVydRCZLJp9b1GgWS24wga8L9Cm69mX9YfOSf0JT9kVlFUUsmsHdsuveZjAv\r\nZYu9mxHVaBTmgoFUGiQkZMyaHnpjgQd7M7dtgv5ZOfVuLjaf2rAMa2MD+g+8\r\nDkuYKat2/7Wk0+XNaMXJ/KLmQ+9E5PDhUMqSCGgkZORwqV8WXjjFq9V+DC1P\r\nebk069lyXIxRGdDoszdBPB5Q/dO4mNS0eAYBaQWSKLW4d4/c/92I/T0sVuTI\r\nnksPeB28ygcBbV77IE+6W13i34prI0o7X7ePfaa8Xc3hx/IP8zfcrY8cpxIw\r\n6AjiEJ4yWXYlZ3HezbRFd88Z5/9U4SYbSrAulzk02bCeAcyfnkygX6fxmyKM\r\nBf4DY861rtl0F86du3YJQ118sD/vxsOSaY8=\r\n=IV9+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"26ea62ed046b2cc4865ec56426fb611c89cd534a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-24T08:16:41.506Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-26ea62ed046b2cc4865ec56426fb611c89cd534a_1656058748906_0.30327416078007885","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-17cb4c84e3bf24aac1cccf91d619a5a04e27b5b6":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-17cb4c84e3bf24aac1cccf91d619a5a04e27b5b6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-17cb4c84e3bf24aac1cccf91d619a5a04e27b5b6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3331e9af41d9e03d2b16c77ecf326fe0ffa0334e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-17cb4c84e3bf24aac1cccf91d619a5a04e27b5b6.tgz","fileCount":31,"integrity":"sha512-h6S8tK5KFBmLOlAhabkOouNPw5ydaq8rL1tLH22AFYY/yiASC5ajSu+3jOU7nKf6yhpYP7lMBX8jR0Btdlt1wg==","signatures":[{"sig":"MEQCIFnaWagYilbsKUHbiF7CEqCWsp4eH/s9kQtKBul1rDSlAiAtAiXFU7VEwbQ2/FJ5WvWVLqjEhwhnPSSd+z7CERGsQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitXRUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBRg/9F8sQe1S4EwqnVSHNi52fBW6vNMcVTXAlmf5cKi87gRH/m9gH\r\nQS69tuvddzlqp83l56XsCYOuMvNBzduFjb9RR/FSKKATy2qzsvz9KrVacu54\r\nY7erEGqU3Rd5drTu/PCY4o7Kh+7awvzo5JzT1quVMwUOcstCOBYUVzkXVtni\r\njd0NqGOjCInq/4ueyg0niVFczXy1CspCzzVR+mvsgy6GP3nnG96qzB2IP7FH\r\nXKzafbEKadfO4t42Pqn+FAG/Fe2moU74n/NuXfd0GbrJCmMdXMZ+gcOvWHPJ\r\nBZBol9NmGN5APIYa3Er8HqzfqkaqIc9Tvc3Yk3aVXcNXz2t1Eg//ZjDCol2t\r\nJDHKdDK1ZQ07AluoBAWeLtja3KJtJxoDuCDlbPsAxSLzPv8ioS/o6Oaut1z2\r\nzMqgzHSZBgR9qbEx31nkigjGDMhZe5gZr3AzaHgLNykdrK3C+ezJo+bJ6Asn\r\nrDcKq4LFaRC0v6Ytd0UtF0a5P6V39ATpYg3n9y13xKIqFqk4YrdJfggJ+Dmz\r\nwvU2DXb6M48MtaXRM+2k71nvq9VnWrI+B2jeLAJx4gzB3//mNWleKbQfP7CL\r\n1bO76EEKmzJ8RKL7qgPWqln/a+4FGB4B2KeZSImLPdUqs4eoAc4mKO+EQyJv\r\nDpJvyrWtL/kd6p7/UKUNRAomXMDrURYCfFw=\r\n=9E59\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"17cb4c84e3bf24aac1cccf91d619a5a04e27b5b6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-24T08:20:21.523Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-17cb4c84e3bf24aac1cccf91d619a5a04e27b5b6_1656058964331_0.45777247524240416","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-0f3e916050183223c9ff9043c062dbc09ca985cd":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-0f3e916050183223c9ff9043c062dbc09ca985cd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-0f3e916050183223c9ff9043c062dbc09ca985cd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b02d2c975acafd40aec7908eeb14283c0414c152","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-0f3e916050183223c9ff9043c062dbc09ca985cd.tgz","fileCount":31,"integrity":"sha512-dRlgH5L3AsC+3gQ6lBjis7j51qOZtR2AM2/5SBbbrg6ZfdWAiUx3ZMZqC1+a+Xo6KzE/ZR9naQZxaDPJbVCepw==","signatures":[{"sig":"MEYCIQDFpbTCmsJbSvvvd+uAunu9p7LnZLJV4KlwseXVLsRxgQIhANV/sU8/Ed2DOWJ9X3WVgcRJy71VlpmwWHQoo0gScMt/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitXYCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdyQ/+PcKdvPnZNFn+b0QW1tZcOCFG0L3K32g6uEomQHcJHfJCj+oq\r\n3SgrobtgXUAz3XK+WSKq52SdTYM8za7Ghng0OHIsIHV5cDkbFQcTV9Q9fWAI\r\nMnloHVuBEvGDoWvTlEWVhgYMl6g3muqJy1cXQ/XGDS/VP2POYgzchtcjJ07I\r\n1epAKX+S2WhSyEHmOFd+WkAq+lSaAh74ZLtRIySmyIWB4wYJ1H3mZaW2oUjv\r\nFwOut7CN+suoTEOulfSCvdEGow40OuzgnNJqcS7q2aPP8ZF+48JIHleEME90\r\nCbQgDwAZJVc8IrMVjGcW+anP5488y1zUPWgkdQVS06s2kunBYQbOeIQ/d9Rh\r\nrlA6SrRxH0njmubd+kZA0ScdBnTb5wtVKM0Nshjmuwx5KCvAhLR8tb3s4yWH\r\nbC7qfU1colnY7ZthICGi5xD58q//aRNS0AquaaKa8G1Uy+s3m8A0GZ/d4Xcx\r\n4Jize4CoNyacCk5JSPhEfFOEPPCarP8FsKDjbxLyeeqL55SKr8ulfD46H/sU\r\nmERtrwW27nA5KZX6dMCmUSl4sWF6LSXomJsV6x0+5EG/TRgeEhwTam+7FaqR\r\nHgo3im9gdKJuAX5Uh3zNPotMg7l5TH6zsXFPJ+nxXvb/KBl7nTZMDLk8PH9A\r\nIiSUOXeCkcI9hivixSFx13YpQ5W+5s7Jk1A=\r\n=sKEn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0f3e916050183223c9ff9043c062dbc09ca985cd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-24T08:26:56.429Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.17","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-0f3e916050183223c9ff9043c062dbc09ca985cd_1656059393939_0.42023083772047354","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.4-renovate-typedoc-0-x-f1350682f814d89bd46ebf229edbd57704a27753":{"name":"@balena/jellyfish-client-sdk","version":"11.0.4-renovate-typedoc-0-x-f1350682f814d89bd46ebf229edbd57704a27753","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.4-renovate-typedoc-0-x-f1350682f814d89bd46ebf229edbd57704a27753","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"01c3b8e779a90bae58bda2552fee294916f247b2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.4-renovate-typedoc-0-x-f1350682f814d89bd46ebf229edbd57704a27753.tgz","fileCount":34,"integrity":"sha512-xrWQEr86JbLpLRw1ELTg2yvWBDgavuXejfkukou+OxmLL7A/sd8sURhNf/0NcP5QckG74JBNO1mQE/+q6asU9Q==","signatures":[{"sig":"MEUCIEhZeErBJKoKJmcdhl1R4xGUi3cWbiQEccGdIVtNqfh1AiEA0weNfXxf0HLmMikCOjWgC/Iyp8TD1Oe3Gc4dnlUCdqM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitniuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3Cw//Z+nqo+i67B1SkOQ/0D7p4OBDT2wo05rG/TKCIYt2zlH4wJza\r\nWNFS2RGndCKXlFNUPFedU+ljJh55zQKEv3W+cGIhpDVQyf531+O7bllU2cgY\r\ny2A1C5ySwtfZoZBkPdfbqUUU3W1B7vuVA5vMwEaWD66Jkh0ymugb+sxlpaSQ\r\nCsr/wXLqk2vOR6P2nSrb8al/+ZGSXPgh3w74Up1lr+jtO0dJJOx5enZuGQuO\r\nE5+Xzql1Ld+WSpms5cWTSFA9j0uQoEWj9XXGLoTaBwg0X6UaEHmIpTuFW4j4\r\nooJUf4AnNlMug63Ehr8EOrqqa39Fn1smR1M3A6Qap8Ao9urHfmzyRXi1/BM4\r\nIZdiC6v8MnxyIQX4Lxh+wDFn3x71yRPe8K0f+uGClQRhfzQyamZtdNP6efaj\r\nsZj08pjps2j4BPEKtgRCJx2ehzOzbw62DVzz+b2t4ERhcsrzLGhI1wg9MFV1\r\nDHUXDu3aa9bPNCO7eAuLV9Ll5ikKRxoaFUN/gK+DyedKL8WqcpUS2hNWpd9H\r\nMIUuBhO5OTm+3J9sFgi+aKlDMug6aSp8Nk5Qy64DBr8RTKO5wDBNo1hGZOSr\r\nNPADuOVQo4YuFW2fYyMN0wm+ClOyqZYE65Bna8y8P48Nni7T23yOnUyrEYXR\r\nTSM/j93KiUZBcb7+18+j4QeGLrlx4f23Aw0=\r\n=VJ2X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f1350682f814d89bd46ebf229edbd57704a27753","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-25T02:50:22.277Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.18","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.4-renovate-typedoc-0-x-f1350682f814d89bd46ebf229edbd57704a27753_1656125614490_0.0706618645005006","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.4":{"name":"@balena/jellyfish-client-sdk","version":"11.0.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3028e066c99be5cdd30ba531a89a8ed402b69286","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.4.tgz","fileCount":34,"integrity":"sha512-28SRfjhFwLVe5royb1KA7wYdv0hPaF1u90zQHHxNBI5+Tu1Xyi7Hx7TXod/bYyNrUmpHNqO397Sh8WUP8SmEmw==","signatures":[{"sig":"MEQCIANXGF3Q3mM9acreNzhq1NFxwQXgbFEFh9mPH2HDuRfqAiARPt4ph81xtj1zDqqu0Z++p4JGQ3ahbFHSw9YYzAuONw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuOlLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqz+A//ULXbf67SmBLLc6BXwfPbn2mjme4pFoGAODR3Jc3zj8ktC8SS\r\nTzfilEZYt64botnERTsa2+//lrM33ZxCsEDzUjXTZ+IxefZlnUbX2TImymAq\r\nH+IAPXui/qCvHPKuMyWpuEYAVRLlEBT+uR9++TlUxi83I43XBxVeFWRoe9PR\r\nJ54UdfAW6PnCxZJGOHwcFA6ew2r24qpRAtpP12FVoV2Lt23Tipmrofx7jzRd\r\nrU9ZtW09H7nspwIaN4Jou9Pu+LPkEUwjAWNLFeEpt7GFQG/bFN/9ZzDtC17q\r\nwGo4kd1jShpAWjh20YkuZ1grkfUUN/uzyyQf/pXK3QOEsoU5XNcFyHylWI5O\r\nTjzIVYWNePg3agJ+3dlcVL+DiMFx/lmWyB5joV+jonlp47GDHvXDC+mbVKuq\r\niW7JM47KXZDvmgG5guJVYQCOptAAhEF6pTtfEVZUOVHiarvio9V/CPTGsz2D\r\n2sAtTgbb7L3F+H+BOcGHX2PK2veU9IRQ76t7WbgV9+Vdp9eSbfiEeen6IuLo\r\n+NBt3zA0vrdmoSHI3Sa+XP0KcEaAnXRFMbV6wjmd8J/2Mz6shsaCaJ9u19MQ\r\nFWTRODx39xjXfjuoupYuICgR+BIhzsR2MbSe53t7w1GY5hMiEAEErnbnb3M+\r\nVJ0yVazoLc6hocAdGqR+O+UyVJuJLgT1W4c=\r\n=1cP2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8433aff07d4ebf75b3f5d5213b3ad76a7a0fa357","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-26T23:16:24.387Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.22.18","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.4_1656285515566_0.7196368610914943","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.5-renovate-external-zero-minor-5851708d22e2c02ca46750b53743c626235fddf4":{"name":"@balena/jellyfish-client-sdk","version":"11.0.5-renovate-external-zero-minor-5851708d22e2c02ca46750b53743c626235fddf4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.5-renovate-external-zero-minor-5851708d22e2c02ca46750b53743c626235fddf4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"38f132da7a528577ae50814c2687b6a4f5dff10f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.5-renovate-external-zero-minor-5851708d22e2c02ca46750b53743c626235fddf4.tgz","fileCount":34,"integrity":"sha512-do3tMu1LoqSruym0wn97/kRNykwtMS0m99SnsYG7VrkuAMuX65TS89XnBCZvw1p+s89msVJRsD0P08C2BDhKng==","signatures":[{"sig":"MEUCIHAfNeFEFwgWrR15xPrmvDM30/rDfVR1T9cVkG3Bv1eUAiEAmjUQPw7p5pHdJv4rZ2qlK3cvvu0sTBAQuNmc/byf4L0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuOsiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWhRAAgefGEFJMa9fnIgYyWEDIr8fhb+0/tspHlEIhzD9QRE6cdxno\r\nU41zDrNbDPg1xN+c/eF1G7sgd0FzJRT6VJZNMwlfjo5nZEeFgAsSDelCfepw\r\nk6AMli0AaYDA00GmM8fwR7jDnQV2TOMEXht5r/YgnHhX+CIvpI8TdpHS9sFw\r\nvvgRwzNxXJMkF5zMn7lq/zUS4uUoJqEluxSWhAFCggHdAYhWFprqcuKZOA4u\r\n8Fmrjli47QwP3rXh5tmJB0M3aYFInHIngOLS/ACv7y2W4HXSrZFpCqDObbzj\r\n22SqmEbfNdVwDYHYjroGaK2MIFcwtdzPNIxn+/WE6Y9hT1OOzomIOp07p80P\r\noPZXxQDjW0CDKiH2JyIlroT1qnuRp5J5DTGGE9vcNsXjXd9AMA26JHN/B7JA\r\nisiiqKqXRq8r9t07Nh5jqlFh1vsJ73Vx2JNUoUFWaVDmoh+Y9ut+aFXF47b5\r\nfXQNvX7Z++mUptNBDIkaR1Hjx+ilEijCwg8ACgo7PNvxs68mtuqEa3/0p5sW\r\njDZj+Ve9vh2Q0u+yoW+xYY8igz+G4ZdseJpqhf3zHj9QfcsKJ0BhhFU+S3LP\r\nkGUB93USqT+Vgz9BVmYpUtbPbSRvZkRqODnTuZVhw77ze6LbQIgKuuYMweLr\r\nY1VBCadsYrMLqncHvVMVq4fPZH1548ZvyjU=\r\n=wfPj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5851708d22e2c02ca46750b53743c626235fddf4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-26T23:21:23.268Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.5-renovate-external-zero-minor-5851708d22e2c02ca46750b53743c626235fddf4_1656285986704_0.7910165372616087","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.5-joshbwlng-update-typedoc-63b64489ced019696aab7806a2fc89cb5c866176":{"name":"@balena/jellyfish-client-sdk","version":"11.0.5-joshbwlng-update-typedoc-63b64489ced019696aab7806a2fc89cb5c866176","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.5-joshbwlng-update-typedoc-63b64489ced019696aab7806a2fc89cb5c866176","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1623b3c5b7953b71813740da0e3c750efd6d5b7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.5-joshbwlng-update-typedoc-63b64489ced019696aab7806a2fc89cb5c866176.tgz","fileCount":34,"integrity":"sha512-hRfB9QgfzlR1tryxXuQnVBcG0/Br7AQvPV3jHh3VUH6C5o7v+x9vN/mdu7nRvNf1rLdm7Y1vEoYtuNJjC83Smw==","signatures":[{"sig":"MEQCIGnvjP8eEbWjaw61T6jjnRwyyshJJ9Ew8QvbE2UGzilUAiBR3E1wn8jgSSwe+CV6rRxXgxXJ7yEFM6FPjDmbDzugxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuQwcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPwg//fyh1a8AFOFpRKz0Lac5ocCaZjlGnsEMiwtM/jKaSZaeeHxBQ\r\nJ9/1LKag4Dlc9yA9ofP0l5VmHR9lRS+GEr784ueeokdl+7dC5sIWMqSZCKbQ\r\non+1nZIA7nioeYFJvCledPkY49Dhnw0iQXkWHzcCgc/NMPqNvyiXjDerX+QX\r\ngBKyoK0Gg/UQh21FzrYd2F0NJJUXBJwDsZHS4Ht0FWQ+kkNufRonV8VlElEH\r\nRMhaSPiYW5zWRIAZDgQ/Wf9pB6lv067ZiouPeAGjIQIQPbZhglxJaoSmMUnm\r\nMiWU0fwD6RzbEgWlCQxsaS115HpCMw/UZUZdoVW8g5b6OwZkaOkrtbnfWJIW\r\nkwn7NZZ4QxIw+Tq0HjKbdSpHhuLF35DMWAgITlErrf0aIxzia1y34djvd+0G\r\nz1izpGDUij+gQ2umNnTvzbOA6ioPZ8hqESC8nwP5PQJH1i+j6syPHc4CEJUQ\r\nTRW9tJ/kNNe15VxWyqo94/z8tSE38e2/5Cq/nSJ7Gu/Ml0fJOMx6+SCtx196\r\nT5nWmMaJwypVA0OChXTRgEPxmd+4xYEaja4vJcn4OoAmqGxJw01FZ9Z2/ozU\r\nEsfIO4lfABWOIC071ToJCws2tHgk2aU9GdfLKa6NJ0NnRenu16ft6lTglmCl\r\nBfrk/22VCuDlbkx7WFXq+WdvjlsuLENcC6s=\r\n=rEkS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"63b64489ced019696aab7806a2fc89cb5c866176","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T01:44:02.244Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.5-joshbwlng-update-typedoc-63b64489ced019696aab7806a2fc89cb5c866176_1656294428196_0.7043921659052905","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.5":{"name":"@balena/jellyfish-client-sdk","version":"11.0.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4345ce7040e3be3742c0e11e851c19c6635d0a56","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.5.tgz","fileCount":34,"integrity":"sha512-KOzNuP9H0wEJN+TI/5VbvZMjMectqa4AdEzkHza6mL47s9mSU9z1WdgKbg49UQvQ2QNMQ/ptXnMvTS0FtCHthA==","signatures":[{"sig":"MEYCIQCEerk8ddRFp2xI39ZamJkgToGD5kkrSfIpSYqSBX7vzQIhAI7dxKtoWMfiY9e2agGWvRbrV/DJEsB//HIt4xYh5Za8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuQ0KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8rBAAkF1S6O0Bljk7KK6brz8efHqHttsXAS+e+ACPwerrTTETOcdS\r\nQCMlwkFt/T+3eVJEH+4d8OUzVjekXjzunrQXdKIKHKK5KIWjnSj4EEf8ERyU\r\njJZ3jpg1lXGaOS9SAmVeIQA8kCjHcCf19Y5A+vqkIbV80sQjEyXs8Zvhq6H5\r\ncFLuadTUaBT204wH1UtYF135+X16ffT0vYSix3375/xwT6oTnsJT8EfB81jf\r\nMkQcjlESCT5xb/9Fyw42xOBVe7Nwt8YG1j+ey0Xol7INu+mE54c6AZxWRXPl\r\nTBh6DTd9X9Z0f1pKOqSqvw1W5/J6uP/en8gA64K2Au4SsK39xfIX0y1r0ubu\r\nZ8Pd8If1kieejGDQr//vnfHx40S2p0xae7Y14aNUCj1Y/Akdr/2n73kOSyNa\r\nPN69yobEjCou6mLGkXyR58mIyGuA7++IjItYF87EjDTXo+Hksqt2bY/IPEJG\r\nvEFBpRw76fToXBG+gSgJv/rc+1y5FnNs+ZLJ5ULAxVbXmN7dBy67X4eLbWYs\r\nIAt8+tICQCnIMzseX7rY68Fn7xJpyuOYb4MEKVN44ZhNEe6pCUbrS/Bzdfz0\r\nm3PPNXb6gdtFpEAZvNt3OdaUqgr1rE/r8zjIO7WcG+uCdYwYOEYa1FFBy5OJ\r\npd1fDeIEq6BAOUGGxsWDS3PLA2j2p7SWnKI=\r\n=cIjq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"07d8167ad05cdbd05febef76879160356b602c5c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T01:49:04.602Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.26.1","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.5_1656294666044_0.7359999731309255","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.6-renovate-external-zero-minor-c3227c51c6af36044c3150915d2af0857b57371e":{"name":"@balena/jellyfish-client-sdk","version":"11.0.6-renovate-external-zero-minor-c3227c51c6af36044c3150915d2af0857b57371e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.6-renovate-external-zero-minor-c3227c51c6af36044c3150915d2af0857b57371e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8013722fe278a7c6ab268aacc9ea8e457603005f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.6-renovate-external-zero-minor-c3227c51c6af36044c3150915d2af0857b57371e.tgz","fileCount":34,"integrity":"sha512-nGVQI2pzrV4kczcUnajjlYUv9NybDa9mdbYU+5XdOrS0K0twXGK5Izf9idNwT6rI9qJyPvmHO38GFvyOeJKILQ==","signatures":[{"sig":"MEQCIFneV2ifvjbyfdMXzTMTlL4tTiAeMQz0y6NVYE17LJZZAiB9/5K3G+ORHO6IuQuKvSa3xOQyK9yXwZfH6sokNRhwaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuQ5DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorWg//f9yZB6d+oQpWem+sPBn9PFio9dRtn7LuX2E+cHGIJ39wKg3h\r\nQI2Uff1Fdx9w+WlCJFihS++AJ6yaJo1ASrRdgovHtCULA7O9//q2+Qj3d5rS\r\nygyvDhm1SIvpBijQcWcq4b1825IEfT30SON9vqjSAI0aQCyyfMMQdUMEVqFb\r\nSaZW88MXKkOGp37WJ0mQZF+3AjN2cOvv5EkvqagDpGS/TUVNFQqmWDh8q0D5\r\nSOOFNr5dVLPgvbnXoPfqB3zJ1md7Z4GPHGKutBdUtJ+8ri3Cr+awW0APXIND\r\nn874Z1sSyY45CID1A6hEtLjgZk0dO2N/sT552hmK+V5aFKfTfhbBFvPcwUx2\r\nVT2jkY4jyxLGyaSjGHt8cvxIU6MHafvqmzzH889DECJWLGSBBPq/xZza1zme\r\n9AaPhwPRfl0ACTgWZIB0HDD808g180gSPxHIv27bxh2ZN0VRZ5nMzBkPBAfE\r\n1nSvh4l2iW68haKI43mr1vjZcSXETkP+8U3zfNVttVpOeayRGeO+hTrekqXt\r\nICD5cc4p8PuSKrbarnC6GtWnoOWy6nz6MHtQD8Blr3/VXZlQqLueIdN8/4aV\r\nwlDd2h0KQp1J6tQERFq4VNewjj7bMPQmkaDSsJIoL9455064I4pQCh1oiAyE\r\nAnWz0sDtKJSZ9EE9TMiusl69eGDTywB8gUs=\r\n=YoD8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c3227c51c6af36044c3150915d2af0857b57371e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T01:52:38.249Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.6-renovate-external-zero-minor-c3227c51c6af36044c3150915d2af0857b57371e_1656294978949_0.9036944400763167","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.6":{"name":"@balena/jellyfish-client-sdk","version":"11.0.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bb7e91e16d14a459995093dfff9fe031df1feb33","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.6.tgz","fileCount":34,"integrity":"sha512-2CvGjU/EUX0w+ImbtooadmEe/ysvpPyxedDhgkJph6DgdqghXKl+qwaDL+vTulmUpKUzhZhCGoiwbmokaBRdZg==","signatures":[{"sig":"MEQCIBMQ3MJfHo4ULu76ffX6gYJAZxU/UIjoocPRlRAF4raSAiAhRbXv4RsJEiK+atFZBvToR9mxSaz/Oub+ne1fxchecg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuRLOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIQxAAnZoe7s7xuqyxdVEaHK2XbrHOuKcFfrWUt9EY9JJiVdNdFe8P\r\npCb6tPGSjRPKl9m5wkpeX1JaLeCKKwxiKdsZFCbUdl+LKSmwKUuJ0nAE6Iv3\r\npeLVeGEgkw3uoETpixbIeFS6ttitWBR/Z1Vl4Ugcfyvua1mhIenmTyEMBoej\r\n5LgONp+EjJjvs2ui1VAoknnyo1dZsYWelJbAmKrMn33eZT6kYE70MzNO6OVr\r\nzF3lCaW+YgJdACv7MN2DMZD9Xrz0+O0+N93CIPlkpsr8bpnMzdo6VTas2cRb\r\nX4RfSCa1krKgTUybHkLm65dh206ylYnv/PzEmyH78h1nI5Tb3xr8Nmg5t00r\r\nud1ugmYLBpkZPvDgQuBCsHjFffpAbwNJMLU+odF4Z1W41e9dh+ZUhJCuYy/N\r\nWxPg/t8xp1IqoxvNr3ST2NidDrv0mOLCw/DaT36NKI3RLxKspln9GVfOtz69\r\nvsXBI7M6jDbTKcSzjHfdIPI1RIdCmDMkHEuAEBTfSLezmyAEF/QFy0rUNb3j\r\nSWe/jRyMbD8NLEpOVzZMK4dLeKilCi41CHLySz7b3ruMRAXHiUYKqinHt5Dw\r\nviG7ZYfQVOaEXBP1rXpJu2IzVe40I6qcxuRGRfGW63KjDT8r4miOGR6Xqekb\r\naTfl9TSzPzSnnXe8cV+Jxg/Fc8KBA71JPV4=\r\n=/w+p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d047173ae8a82f567740255a8874f4ca3649ae72","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T02:12:26.844Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.6_1656296141967_0.9379391905575851","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-beb0c85975631169d587eddd4f3b962d3f00b34a":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-beb0c85975631169d587eddd4f3b962d3f00b34a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-beb0c85975631169d587eddd4f3b962d3f00b34a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7eb9dd59d393caf93b2ccc07497c93f01ec26795","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-beb0c85975631169d587eddd4f3b962d3f00b34a.tgz","fileCount":31,"integrity":"sha512-5hV8GrRNkAd0FnW1CRy1lbITjp3koBd3V+ivRI7X+aenS6WOdlE8tJNKAv/o5V/AjKUmC3w8XiKaDFjpwaK4RA==","signatures":[{"sig":"MEUCIG4+vZ9Aafyr1ElDytjyomGt14GYAPbyVfVjIKawo6H4AiEAj91j1ptHlGIwdis+odl+qgH1J3boLFGIJNk0ugl4hh4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuRlKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcgRAAmwDZv6DLc3bncnXRTFxE3duENQuNP3mvbXH+CkWXkg8P0+ZX\r\nW08rIkOY3UyfCu7GYbiMq4PWdHO7/zlWErqBX66KXO3PAQiiBYjERF9/e14j\r\ngaXq8MV56VSOnTvFEPcNvADmFP5GcWKsnXAxq58eBy2KsE06YcNJc664GXP+\r\n8DIpz/Kwox53bpMOup9lhnHC1DRkNz66r0vtWmTn+dqTOaesypvJrBX4/QgO\r\nO2I+5Mib+VR71se7dbqF31RLZh1WjY1xhuSK57ecgRlAfCNXdJ1DCm9sMQBs\r\nyRgcYt+7E6J2deK4Wy5hm9BjOusQLVbuNwW/ppgMCUFEyHZT1ch8QWDUdGxz\r\nq1Q03ZyL6aff5Kp83MK7cjSJ9rGYoNG9yGjS10ZZXkEXs5BtAtvepGrKZKzN\r\njXuCKuHS6ZX+2XgDYSbXKgKoPx0v0GUs3Pd8p69klHKHWb3u6zBinRD9fMdN\r\nVloNg6gx87yQPk+xc5v2bnGbuyC7FYlbSCbWM/mQrRI9s/vh2Vr9oo8KgFl0\r\nNr1dvq/GKtFQNq48RNyILLgobYNeTHenh7M/r5sIsLAGSdc4k9Iwf8QhWUU0\r\nvKoPcSdZqu+vb092jATh6aZTh75jjDU5C623ikJjrS66P+o5ijYgXJ4Sm9MR\r\nY0jToMO98ixuQl/HwCLdN2Fyf45/DCHGmrc=\r\n=mMvQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"beb0c85975631169d587eddd4f3b962d3f00b34a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T02:40:37.022Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-beb0c85975631169d587eddd4f3b962d3f00b34a_1656297802608_0.6559691328305255","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-55636d4e45f8d5bbbc78d8da48981ed553a4c55b":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-55636d4e45f8d5bbbc78d8da48981ed553a4c55b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-55636d4e45f8d5bbbc78d8da48981ed553a4c55b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"216ca69c637aeb924d77e003bcc4cf119941df15","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-55636d4e45f8d5bbbc78d8da48981ed553a4c55b.tgz","fileCount":31,"integrity":"sha512-IQnFmZEkDQW4U66jC599iEz5fn+7Ct0wCCp5kJ+egVHNQwGhhM1HdEEqTTS834WVo/IydJBRwHHqqVzN+0Qgqg==","signatures":[{"sig":"MEUCIAZHtjxC+7ztmi/Ww9plbSNtxNau44KtjuA3HtD+DrgjAiEArsH0hQKBD6vOvEThzJwDW6E00zUiMEvBUz/7sBgSzpw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuR/pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3Qw/+JE2cojm7hc4gkQeiKdnVvvF7oAGxnfah8BvFyulDKbf+FAMQ\r\n5Tnp3XrqvXDbXk7AZDVMNCDvS173Ag0IDSUGh1EMdIhswyG1aq2hiDytvsPd\r\n67EWG6MkT7XBbo4d3QpRX7xxDvLv2nGSKmEl2LLOyg+DvIj0ejLwFXb/YfUH\r\nHq+qH0GKXmjTDPTrnRjSpLsyFB+feMbv7LoT4kHfLxui7AtF/ji/mFBbzL1k\r\n8DmsS8eEjqGpwHD0AunNq+78UQUbK7NhG59I1EWKsrpenmbro6/s/f1SbZWf\r\n8Zid/cwKupumhQv6+KnhTCzfwsregUN2z2xVkTEuZOoWQkFP561vA2SggC7/\r\nWgCFOtASD3LcheEZoOouxQE8WuARlTUdP4K29xZDDc9v8nUSvf1tnmmqRxQw\r\n9obJZ4HxbbQsc7jt0yCUr6dtsVmJq6agAzYb5fcE6ms4h0q2thbaLCrQb+av\r\nmPdBfivwX+13QS78n6/9F0JFXlTQ52c/MgD63OAcguZSGotv2WI/S4syavJU\r\n2Bjl8Qibz7WmrcZNS2JFXN9Es/sBxAfI8UfO9wIFlTDNoy/twsRiOv6I0zvP\r\n2ELuQw5JgGPBnoiZGxwT8Jv/l7VlK0Bkay4JXcDYGZBL4tIe9MvfNVH7QnRf\r\n55N7PCIQf3Jo28thz+kCSXAcgS9VTxxSWMM=\r\n=ZZU+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"55636d4e45f8d5bbbc78d8da48981ed553a4c55b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T03:08:04.877Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-55636d4e45f8d5bbbc78d8da48981ed553a4c55b_1656299497383_0.2035902529898188","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-0c63371523b6b78c641b77956ab07e490cffd6ac":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-0c63371523b6b78c641b77956ab07e490cffd6ac","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-0c63371523b6b78c641b77956ab07e490cffd6ac","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f524cabb1eabc82e32c0386939e30138f4bcbd9d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-0c63371523b6b78c641b77956ab07e490cffd6ac.tgz","fileCount":31,"integrity":"sha512-ZDGrqBfwDG3L5Op1oXzwK+Q4wlSBv1iNYHEV1SdgFOxc2QgmUknndvD7ZHIWM0qzUhM8cSodeCoe7PGylMGgwA==","signatures":[{"sig":"MEUCIQCriSHCpPjV4z3400yOrF7llSGMxKG0p9A6qwKw7qyvzgIgHMG/2GxANb8RtHvGEnchLCVgTOrIkruekNJMZwG5K9g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuTJVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmppHBAAh+Z2HvVFCs/s3AxXHGSA8yhw0ZAiGuUoIg901oJeAOPQmhdR\r\n3ThDnrlFzpBp8lfmVYT3lr63nh1+jPPOoaccgxpHO456Qtsg7DgGK4WMsT1q\r\nMB6chLbW0wF+62HJ2PCBNKuXJzuWVyjkHL58g/DSnKCqXQy3oDtT4JAGjb1b\r\nU76td1MkjO2vCwiutuHkxtFIRRtD/db1KJPoa++g4UQndGJ8OsyBGWsHFzkK\r\nCHxSXb35NR/R2eGxloioVOnZSHfY7IAFTv9pxATPk5QLQzDFPmodZ+QxxmRf\r\nOM8Aj1b4yqMSX4O8nJIx0Lyvp2qqr5kF3K6JCQWiagC/I4yVac1hc7Jx5Q2c\r\nGq6mHK4QewzsfeO69I0eXjISO/+35oGx99z2zuh9o8JHmSE3ntqO+B+PZIki\r\neHhVjuMx9PcEsvK5/aKK3vhRxkAEFRhN5/fsrXEYlXTWX1zTJ5wvLYnlbJs1\r\nN7z4RlVp4IWt2wwpuggaQgl7Ga9m4OgpCA9aVZHGVS1x9xqQoOPTT1ss356r\r\njhDQTZXnoioBh+xGFrUeNtdF4tvGjXffiSU00hOvfL5wjSGTKLbTgO3gTvpJ\r\n78T2hzW9lqFzQIrOwcEBIiSMsIvK52MVChJ9U0tsO2QV0Z2TWP3f5X98zKHx\r\nLvYdO7DFg/OdiZ66yPnJzGKICHSjWfbefNQ=\r\n=SJzB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0c63371523b6b78c641b77956ab07e490cffd6ac","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T04:27:34.962Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-0c63371523b6b78c641b77956ab07e490cffd6ac_1656304212723_0.029443485480576514","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-60f92d0fc62c8d9f2bf1be0380ff6fdfc6c316f7":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-60f92d0fc62c8d9f2bf1be0380ff6fdfc6c316f7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-60f92d0fc62c8d9f2bf1be0380ff6fdfc6c316f7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"61a79b423d91355cedb10265a6b42373515823e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-60f92d0fc62c8d9f2bf1be0380ff6fdfc6c316f7.tgz","fileCount":31,"integrity":"sha512-wKqa+D/AhLCz9TJyLazI8y1g9MdETRjKsOeFTi3gUmlOzquPoGhxFXXJ97AkRlyJzwFd6VWBLhoDUf6qu1vktw==","signatures":[{"sig":"MEQCIDqDBgq1zJ4Ri9aQR+iH2PHo0+pigZ0lzYmPn84tuWFgAiBmyamN271N7Ygq/NphzlrpUjYaoNeVBF5i+iYTDSEzYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216730,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuTttACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6ohAAinLasshBz6hOq6Mrs6r6SiaJK7C3iEHTdMbWEE4Jjk4s1Ldr\r\nwxWO8sAaM06CGVZZkbUKAzZ7UpspBOvMu8iS3BTpvbrhVkEgU901nRy9hiIo\r\n3X46gaoUTC9SnKikqu7nTMHY26tVtBCYX4PzQwb+dd1YycK3XI0BJ3gAqCzX\r\no+u+aB7mclN9mnwvW0qIXh14vXe+Ua1AjP7a0aYqhv6obFy6FraIxFXtG6g7\r\n3K3z5J3JH57HpddkuxAl+yny1BQ6HqCM0m0uzjCCvD2/fno9bDDw8QQyd5Ao\r\nc9Hcugd0xpwlVRF3/5gf7jDO0lllGL4p4gjBK4PoFgFel2H9Tdre/A9KUov9\r\nECPd9xsBdyJAv/e6f0Ea26zxgXdLoYotZ+qu3QSjbZmlqZv8va9ZsdnFeu0o\r\np9pcN/5swl4jYG9qYUmG9+5GYzuf+xWctU/TQzHPg0wsHtaFCU+zc9Nb+bwL\r\nxn2RFH3UMFsocKMfB15tFk4qevlX0zSHvtU/5uddpyHjPx6CNXJXT3glr8AS\r\nsa/cTooUiY9HBPOcjSOMJxDg2ZAyiXYwTazcpvMXprHe5L5nXfF6bOhV5g1a\r\nt/yQ6B6oE8JZ4CJ1PDt6WeaxPYKoQiHIdZJzZrBePrrfOvBTJOiT5X+ZGpXL\r\nRYLdnSii9reBPExfHqHdmGzPxGXdXemeCfU=\r\n=m8fj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"60f92d0fc62c8d9f2bf1be0380ff6fdfc6c316f7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T05:05:54.346Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-60f92d0fc62c8d9f2bf1be0380ff6fdfc6c316f7_1656306541040_0.6550284110931937","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.7-renovate-internal-patch-d5d1f9c7f7d58fc3d3cf25d5737d82967937e5f2":{"name":"@balena/jellyfish-client-sdk","version":"11.0.7-renovate-internal-patch-d5d1f9c7f7d58fc3d3cf25d5737d82967937e5f2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.7-renovate-internal-patch-d5d1f9c7f7d58fc3d3cf25d5737d82967937e5f2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5b66a07a8aec5dcdc7bb82c10003b35b62f37643","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.7-renovate-internal-patch-d5d1f9c7f7d58fc3d3cf25d5737d82967937e5f2.tgz","fileCount":34,"integrity":"sha512-mu2jiJDyP7YT9kc3GUgjZpH6bXT1OFoVEALQevNE80sPYLpItsRSIgExslmQgLMUXJSJH3IDmOiT4eF/x7mzzg==","signatures":[{"sig":"MEYCIQDl0DN0TU9Wj8pG5cYYRrAQ0Eh2Lmn06ZIIgucTFY5FZQIhAJlechbq14hDsCAjiUCkn+sAfQ7zQIxRcmKrgJWKk6dm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuUPHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8/BAAlef/R317kZSGvgGxvVaWXPxU7nuS+1dolu2MVubMZnlQR4Kn\r\ne/TC9ioSG17lXJoq96IttSjExxjiBq+b4CxyYHFgfu3g1oyZpeCkRMvzDezw\r\nJQqKOdhx7uhSDg4ZEkSk9c62RNzc1lx1Zk1dUkYPK10GUKFay8YdLcyTOdAZ\r\nPTff2FgwRDVjx5cfMAxvOvnhOcSEtVTLWAVhW0AdG2Xu/T565FdkBKiLUCxt\r\n18x57VwtSfjPAkeqHIWHNItVWr9NKaXpIZk2E9TuYZ/cP49wLSZSQC0H08zP\r\nUq/Ob6cjZXm6i6Daz4BmwpEOuBzOlKwBNim0bJjx235RXZQHoYj7Itski0Ot\r\nmPnN4XiBS4r0vtlwhzZPfW2nBeONgWM0HLSJm3dwM3eav0uqsRc9dN8L9HDV\r\nJsJyh6CoJocMgmteLJJ9sEZR3uw/aCCYLLrwBu1XLsqKKOtqy2lK82PB8+Aw\r\nPhSfF6oedPWXZUHlYAKrBNiQv9y0OTb4DiOfMLwjXTLD/VpOfkyKmJKEExtZ\r\nfsf6DUWB5XRxMnkp1VpalIaaarAaqSov/kVeRAdoVgq4UpnqiXLgWRMgIkZf\r\nC/Snf2KXPCrAAEI4t0bb6xo5qtK6SaEmJVmOcBWOU3PWUAiEZi+VcgTeYeMC\r\nRCjwvM8b+rZAvMAkjeWcZ5y1XqDqwsvf+I4=\r\n=lTin\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d5d1f9c7f7d58fc3d3cf25d5737d82967937e5f2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T05:41:09.197Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.23","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.7-renovate-internal-patch-d5d1f9c7f7d58fc3d3cf25d5737d82967937e5f2_1656308679544_0.7939100038884896","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.7":{"name":"@balena/jellyfish-client-sdk","version":"11.0.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"920c3cb106377b2fd9bd624869d2241425e3a35f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.7.tgz","fileCount":34,"integrity":"sha512-t8r6naffJ9/TWFu/JndGrAtKUoBgYFPiQYGyy9F06jrco8FCnjGt7jqriywcpsuB1F6kp/wb3LZcjv4KHIsrag==","signatures":[{"sig":"MEUCIH2TE9y+ZbVkHSY5e9aFsxIVMDFcUyCHFfRDg1zlwnYDAiEAwkC5R3+EmNxqhIua1Wn53OGfyH2dlAWyoK6zPQ6PU1E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuUTTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqgxBAAnqtlRDuDjDi3JtmkgHvM+PQqRmpAG4YoHVDhChStmb1olDiS\r\ntzh2Pzs/PevuGpAA9pjm38BXTObXCuTvSTUVOwci0hEEC+nQ3T5K8IbVnoOq\r\nZewSzqu7QAxy6ZoqanpFYiTigZsekHM6stn0a+nIfE6nkFTiUmW4zK6KoRkd\r\nV3PNY1Ovefv/zLrQsIIxuRKxOOakTpcKK1Uh6VGQ1WynWxaz45+L9ZmQWYKM\r\nZZX41O6oWltGor0S7qxzM1aGMKcYD8qa9peH+nhySN/pq0s3EA39QBmpzsi7\r\nsHKaKX+MxGYZ6Bb9pe0f5rd3O6UsBSqXo8BuXYZms6+07/Mk99XjREuygCIq\r\n9Z7xrmUpIIPPf3rHA8h/5y+0Di0jXa3PEkRf2BAQYlbNmaVR9ZFJKxWrnW5S\r\nzoCjubeGd9KBwNMsfmlYv8xh0ePLCN+oiTJrDHcfrAttkpaCg9X6hEdepYys\r\n9UeKCCYCv81hSDGK75H5Jn3v+IQw4S+nwFmIBoN1Zmr0CMwSfZL/9zRlvpB1\r\nQ1bKYTHBVryqxAUtk3/67xp07JEGdB5fNriPPVOvNpW36tCT6qmrbYkFIjBZ\r\nJVXQTMSYlKqXDkwLxnGkIn0tDvNHSfSqH+uq8/8sKURh2yVxZ8IGCLz3p0ix\r\nPvVJ1/aM9G/Sha6I1TDbZOw8nzIo55rbOYM=\r\n=iPyN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0680c7da3ad49fc799eb950439bd95bd344b4efe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T05:47:01.865Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.23","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.7_1656308946983_0.3898599101945661","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-3dc33cc48c363dcc6301e998ac7601f759e0325f":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-3dc33cc48c363dcc6301e998ac7601f759e0325f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-3dc33cc48c363dcc6301e998ac7601f759e0325f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e66985f144e2304fe09fb91ade23656c4be4d8a3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-3dc33cc48c363dcc6301e998ac7601f759e0325f.tgz","fileCount":31,"integrity":"sha512-2OluoY7bLHGRRa2DhF+B6nxvPEBwrROMDp8E78IO/gUY4snd2pBptZMJBmz29UCqa7Edgxp6k5zEwTNNbGH+5g==","signatures":[{"sig":"MEYCIQDQ8HEohJbLPa8s6S7mYYaW1/TJDlIgev1xCvEZSof0jQIhAPRB6h536tZCim0fUXNn/T059UtkllttpgAviALosPkG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuU6cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRCA//ZSTLqTGcZGqBKUcMT3TZs1ycJW8jgM3a1WodAWDUMa3dnaFV\r\nm65zQWLeyQCazwozpR90GJaDFva3RseYWyZV0q21UGKQ6/A+zVFv9YL/psGz\r\n0Gmqp+xzssOeBSAuaydGeN4zw/rfl/NRRyybTjiIMFNUmrZ0PxTORTOAv2ln\r\nI11wOU9pqwpAXITdHOMg8HC+36wtGd2JvKzbWhV6+R0SnhPHjw0zy/odNYjw\r\npJmGn5zlCiZpTonDB1sBMCedCFPnlTE968x+klYrqE0l0HdwGFjDTHj2u6dl\r\n9hSzElNEYT0D30DtRg4PTx78FSRn/LWpYpm5pzxdjQ7H3bpqlViPSHGJVEx+\r\nk9u0yhXyfas1lSPlvgbeg80UVNX8HqKtR0x/ZHUq7OVHiFWuy8vfkuWOfoWu\r\ndOBkE/RMUhFiOe3e7BDDWuLUS/JstB5kQIlw80H+ZEhDhIoPJJWmXKQrYpuG\r\nitvCL9BM031Wx/lc3mO5jc6byJGR8jHGX2dzXss9wGPqYu8rE93MJUosiPsT\r\n/tevEKosIFINsi7QAzkXeATJauFQAVzFnX+3grHzKSuJr/cqvq13yJikx2/I\r\nxoXgkEppnf4vn2NNisKn+QHNsshgb0T1sHfYeZjD5EEpDz+NQ+CD3QEEk5wk\r\nfAPcTgUa0OLVqm5d4UtYeEHI1y9CLx9CeMk=\r\n=xcmY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3dc33cc48c363dcc6301e998ac7601f759e0325f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-27T06:27:45.522Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.23","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-3dc33cc48c363dcc6301e998ac7601f759e0325f_1656311451920_0.49082514333368166","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.8-joshbwlng-message-links-5851e730abfe172342f507d981220256cd95e27a":{"name":"@balena/jellyfish-client-sdk","version":"11.0.8-joshbwlng-message-links-5851e730abfe172342f507d981220256cd95e27a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.8-joshbwlng-message-links-5851e730abfe172342f507d981220256cd95e27a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b43b1dfb7ddc4663d5e9919b4ac6cf79bb1938a9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.8-joshbwlng-message-links-5851e730abfe172342f507d981220256cd95e27a.tgz","fileCount":34,"integrity":"sha512-GmJqSe+3qsn7RraceN/jUvRWEUvax/mii1wqG/lVtjvtUQBb8c+Ya3HISEeVG5lya7ysp1bdxg/qU0bi/SMbfg==","signatures":[{"sig":"MEYCIQCkiJfq0UilfnjiD15j2QDAH6EuNUHUCjMeZ6PYxRcZdwIhAObnx8MAscwtpcShUh1Ai6es/znIr/Md0lQEk3qJ0Zmu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuprDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmotlw/+IFgKLz8B3nNVsWy/D5/bIgAguvsbSs4+g1qyTtWGTHb4Ftrr\r\nDkKfTeQEKeXQNjU9AHW8XIUnSkvPB6JhzTgiYWvcuQYHqXL5+hmwpVjpwK+H\r\n3p0UAZeYVnV+43r5MLnlHgWZJ0hx2QH9QSeQZQMSbu4iz4+5v/9jhKzynT/S\r\ncPFb0JOSXDtE1ss3aS6/5pgQ9l/YbyM3rGqapO9t16bjiwKWjI7NxVFrHsqN\r\noaHV1QhA5rCUyp7SdAu3JMFR5igUokak/bEgw3SkzyipZBoJa5AYXCoFACvh\r\nRkPhL1ogCCH0t3PRZpsEhF0BtWOh3PGqFo4uSJAupjr+AIH9JrAdcVe7K8KS\r\ngb29CooxJcyXYQw1o2oDEX7DtDvJYrRXwWo+t8lU0ziHMbciHslXMvDYeIuj\r\nKWXeQOmp/lSGyv8m04zmuBTRZHauHWd18wTfjH54kfApwWAggEZUQcoEw6EY\r\nsCQRS+fJ9qBpGO2tLKY1G8cp7XXUW6LbUQQVMRLNtLbsM+UF98keS3f9apV2\r\nqZUXcm3bsV5iD58fC5C7YUfa+gjYPaW7PqbNCDmFV8H9EmlKE63RGMkMgcrF\r\nBGYrNunGfdcmeYG2PVrlO6qaisP4a34ifjU0M9Y6mZ7IDwfoL3wWiLg0HFPY\r\nW2ekK/+FxNJnE1vBOlECOcJit9Zgs1Avmrw=\r\n=YjnD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5851e730abfe172342f507d981220256cd95e27a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-28T06:04:54.725Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.23","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.8-joshbwlng-message-links-5851e730abfe172342f507d981220256cd95e27a_1656396483423_0.45884467651079386","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.8":{"name":"@balena/jellyfish-client-sdk","version":"11.0.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"71d6e7e7ef67247663a507c261b6536445388f16","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.8.tgz","fileCount":34,"integrity":"sha512-0spQGsegMiQiddHALO9KHO6WusEYsnAfgIV8I+3anL4HMGv+Vs/RwsyEX7zmNXudZO2+p5rPT1TkDkszkdYwvA==","signatures":[{"sig":"MEQCIGc7/64npS3jS9DeXw3OLyW2tZm6uHVaQYjmtsicjIjAAiBb21T1U09yVqTsjuwTWPkltDN+WkCvPaCGGZAjW40jnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiupvOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrtIA/+LKTVAQ+J4GIizpy56t6gGI/NxiDJzXAVJBR4ILj0Puy2A+Md\r\ntpIkv6ywmPaxFS5xuNPUKoSHJjWQNzmWALov1taDDSkg3JOJmdGxQJR7Otf4\r\nYanUwquZtuj+U2uEXtaI96Uaxh2UFLRQLlDKtDFtERKhemGT9qGjI3YJyPK7\r\ndK4c0Q7n91Kl+h4C7Q9N2SLwOIftXffy5g8sNMBg1qKyWssT3oVtG3v3/Kgj\r\n2nAKO15t6MoFbm71luHPBBeU0IHyUg+Ax+sGzWH9dRT46kW1Z5QkSgElcdJe\r\nhHDwpiXlb0aSJ+MkWwDwfq98ojx1+UhRGztab1d462RIf8rt9L6UKZX+i+KM\r\nc7V3dNKVCjFyBq+8aejzKsxE6fkwE4z1ez+6xM89IK2Xo3qLdE5h6ZZHLkpH\r\n84pKAHCERXKziTdQaLJhAkl05N/yvDRKO2QBwhd11OGnhpezNIAOuyEk9GbY\r\nLwAvYC37ZstXwXbelMI1QpCSuXo2MW9ZMaT97vnlugkNwAKllSbXIn9v9V8m\r\nxJS5Za91zIzJcNojOuCuz23Fr22EgSVtM5bZyr6LP79H2xDnKG3QZWvEZ4dw\r\ngstfoy1XphZxf/zGbr5FdePJDuShelODVPC602TjKbbAklAhvo58NQcDmRKz\r\nN5hiJQIDMSUuY67cBA8KYLYUW7Zz800GoRA=\r\n=Ahd5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"31412266234df40009b5a86ab5cdd04ebf1cdc29","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-28T06:10:25.310Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.23","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.8_1656396750491_0.4792425561969631","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.9-renovate-autumndb-20-x-ec2898f2bcaece3b15cc29204865f5418293469f":{"name":"@balena/jellyfish-client-sdk","version":"11.0.9-renovate-autumndb-20-x-ec2898f2bcaece3b15cc29204865f5418293469f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.9-renovate-autumndb-20-x-ec2898f2bcaece3b15cc29204865f5418293469f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1a1852350bade2c08f7a70ed3d66ece79d028d26","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.9-renovate-autumndb-20-x-ec2898f2bcaece3b15cc29204865f5418293469f.tgz","fileCount":34,"integrity":"sha512-Muh1TiuudVeS7ZMPnLvAegOATVEl1ihhsJe7AOFxO8tvNj+1bXps9EKZkf9DPLjLLL6mQ5PJH40fObB22OWPsg==","signatures":[{"sig":"MEUCIQDVYOunFxAkTUPnnzyx79g8IyGoS53DvZyj4u7VHfvtAwIgRm+WGNuETEVKoVIWRGmtCybrYIXHrBocTSfEKyxxEZU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu45KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+Vg/+PKDPL2/L3BAIJf1zYIHSddamvgLJovKQMyMg7U0kfhkoiqJl\r\nF/fQWwTjqITt263slhg6c3HRe+PzLwILm/QWEwIpqAf9K9tJarzE/D919kvt\r\ndrYeMThPxC4VeoIv+S68VYadnYdqCN0DWHxKNts26jR6hkENQLv9zPy56VFO\r\nReULTjXocuWJqPRE4Hu++2QHuopYuohV2L4j0jYTyWOHgrMXi2s1FvlMT5T4\r\nfHZePdyFFJ+ZKiaYoqeGOXlwV/X8SmQN3Uam8D+OoEckdvSmpwA3cYtCS03E\r\n6+9THDi2yx4SqGrJUVfRbv9BQWXqCXpn7UzE6afnRUUrjVrG2mFlf70U7vU5\r\nYcHDBZpSL2MSC2rbgweDBbz4u5UevPNr76f/XRhiz70y+7fvNfscjGdyNBwU\r\nzx/pBwBqvNhyqGKb++fZR5tDM22GJ+GxNllMVFtzie9iniQ+AfOa7dcELNbs\r\n+KWBcN6Hvb9HTp8RPUXCvw8Qn112TBJrOmGEjA8kPTP7ki0PoiykAhOH9lyq\r\n7ChPlcZCXqCO8Z3SX9atlOmWoygXGOLf+y2kGNOZtvRH5jnBYJhnSvimOSiK\r\nSmuH7cH4RqLZrLt8PAG03hX9K3Pssss8wnWnrCGPWp5eFT5Au0FeX/U0ZdUp\r\n7Tw3Ztblp6fonnnHd4PWiYNeenWpC5Ak3gw=\r\n=nmpz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ec2898f2bcaece3b15cc29204865f5418293469f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-28T23:23:45.485Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.1","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.9-renovate-autumndb-20-x-ec2898f2bcaece3b15cc29204865f5418293469f_1656458825888_0.9520952996329843","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.9-renovate-typedoc-0-x-6a74fd3bc7d5b258180f13ac0d73d9f7c01ac953":{"name":"@balena/jellyfish-client-sdk","version":"11.0.9-renovate-typedoc-0-x-6a74fd3bc7d5b258180f13ac0d73d9f7c01ac953","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.9-renovate-typedoc-0-x-6a74fd3bc7d5b258180f13ac0d73d9f7c01ac953","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea56c231cc2ea3ea3933fe1ffd6d524ccc4cea61","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.9-renovate-typedoc-0-x-6a74fd3bc7d5b258180f13ac0d73d9f7c01ac953.tgz","fileCount":34,"integrity":"sha512-IsAm/96TSG7JgIi0sbIFaDR3IVtITR85xslHhCJ1DUOpHc0gpDLfdDKPOyfuD0MDH7xvphy63GXhHCnn6T7cKA==","signatures":[{"sig":"MEUCIASReAOrcjSzJVf3QWS5CpaFvP/7joXCPoCr29u6nQoaAiEA4rbMLEy1Kutz0nlnvhYeY/x6PVw02KjwRgLhz/jyLLY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu6T0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKQg/+PotQ+dSfifyAPFCfrGHxM5RMEe9WBVK2wEj7m6VUtWVyrsW4\r\nbGbfUlHhhiGCse4VW9572OBEm5yxJQR/8a8l6/yN00lBe8GwI7P8sWIuqBlZ\r\nk9wq70inCRgcWt/yB/3JQ2i+qbu4+jJc5o0NmbOdNtRJCKN+wFkmklZn08Yv\r\nWJguh2KjYPgjIpEE4z9qxCH2FnCAJI6rI++onm4HsYOEIl//CydwmIeDI/SD\r\nSD/77mNWk+dI/zyxKUIVq4sA85BZhofj2tr9vzYq/rlY3VnREZ5cjg2Pleyb\r\ntJZDsfbv7Y32NnmfEuRgSJtoIA/XJ/pWgXCSkQYnvaV3zpTY6iDqE5rL0iGZ\r\nnPxxO09IZAtEUFXV18lLk3QSwaefav2EJBusPnM8SyDxAZSi1jOwW5HSi21G\r\n2/Jy8kfKHXApFfUWCgpHEZs4xENECAW9kRZYZ1AQEJifahvak0om+304926K\r\nM1ilkWc8gK0Y8qMU7kF0vXNIJo665MRKgdelL1ZrEki/DqJ82MOszaP+hclr\r\n2Y8XIycLjPfpZCulluJHKo8ba0WSRJA3bjVZDX4SsRVgeYDSTbVQIDkWwX50\r\njlTvixfpMWxB0bXk/Aarzi/ielGY5HYWPhKSZ6Vilxg4wfSuZrWCSbaFnE1x\r\nBniJM/Eqs+1sWdqI8Xe/wLJUoSvWds2PUGE=\r\n=fjZc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6a74fd3bc7d5b258180f13ac0d73d9f7c01ac953","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-29T00:59:28.966Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.23","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.2","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.9-renovate-typedoc-0-x-6a74fd3bc7d5b258180f13ac0d73d9f7c01ac953_1656464628094_0.7353672889844796","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.9":{"name":"@balena/jellyfish-client-sdk","version":"11.0.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c744efb4a6cab7b5228df4468fccbe3c383d1b13","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.9.tgz","fileCount":34,"integrity":"sha512-mywTYRPGPkoAeo13Pv4iphbi7Jb8ffEOXgZk2l07y6HW5RVoaP+ukP0i0dN9Wli/1CWlF6EiTqONRsOkSJLIPA==","signatures":[{"sig":"MEUCIQDIS3Fo6TVDA0CS9aMReSohiWQcKsbQSDTNbjtzIfsyiAIgegTyVTFrlKyEknUesie6c68xif4Y64uLv4U/ygLbCVw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu6XzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTOA/+PTVhSFxCvrctVvOycp9B6pS3FGXV5NkclpOlq0X4cg+Df6Vh\r\nVCuLFjfpZ0N34g5RsIkzZ52b+RQcFMm98DYhkqYf0HyghefeSY6dWW4ptc7q\r\nWRf9T2Sl9KvHcSHZpZNsp4mAweQmc9Hyxgn3vK/Wq3DQyedUSQif5TQ0+D4l\r\ngH/EyRZRqEUayXFQ0ZribLN8xaocXhoJnb10Nhkh5XLDY+1PK0k6ziWCypIg\r\nW0jRiqAGCQEm2A7ehgrlZpifT88vyKFvG2wq3GxtryBqpyIJai7y4BySeGj8\r\nBXp1fsCgbvn3SLS9lmVuizxrZ+QupKmuuQDVT1V92HKX9/EYGYkOCxwexq9p\r\njKsTDSlp3r7N3+7XLsWMqn4JVAH5qvACdaAEyjr0Dw02r36lNiMY29ECh4Hl\r\nKSNDYKo1b9SpN8Ga/gf+lO4S6B4Wfp5hSv1gEoSZo0qIgE+pOMQxMc8LcHxy\r\n3aMDrnoQkoSrdrlyFfWITVP14KkUR8HF6IZjFnFJ+6XX+uFD46KPoijeSJlU\r\nJddGnArINE1ALxKj3/gWn7j5jfaDXp8+pblFMJPAusr4LqKf4NiZZuFmM+2l\r\nNRRgbGICBEll9qXDgrvGDSvWex9w+ibwkN5yHsfEPxP0H2flX/BDdRdq5Kmv\r\nD6DkgKAvn5nsYAKMwGmKgqmytZzF+4z45zg=\r\n=38fQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fea0ab84d3a42eed4fd1b8055a0082654b701b83","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-29T01:05:31.226Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.1.23","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.2","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.9_1656464883077_0.9404964123566388","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.10-renovate-autumndb-20-x-610887f2009f43c20e6c7c517d38f1752f278f7d":{"name":"@balena/jellyfish-client-sdk","version":"11.0.10-renovate-autumndb-20-x-610887f2009f43c20e6c7c517d38f1752f278f7d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.10-renovate-autumndb-20-x-610887f2009f43c20e6c7c517d38f1752f278f7d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ac16ef61d4bc421f656c16336f9a1aa5cb6347d7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.10-renovate-autumndb-20-x-610887f2009f43c20e6c7c517d38f1752f278f7d.tgz","fileCount":34,"integrity":"sha512-SvNziE+M6y3msp+dmNF2dv+z3RWEcZizmASSE5bTqbtHGrMm1OVNr+oCP9Jl6y1gInUv+geziJCJZP2xYKySaQ==","signatures":[{"sig":"MEUCIEHAS7zLUpaxRBg9CUVFc7H3j8iN9JKblCplHWe8IkMJAiEAxBg0Uf+O9O9z0yU26RlK8c71o0iueYZCAgAqGXEDqhk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu6c/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLgg/+MS8w582jFqDHGr4omtxK8SGlhPi4a6TLe4JEs1H1QIcdsE2M\r\nk0xpGUBsy4kmrwb9x0xqkv8//cmqDhJBuNK31vZBNkw5QmzLcBRZ/2RHyzsY\r\nfuETx4DRAMEFHxATfzZDTjILlmXO0B4lA0weRLxvtQVvH+PlsFbqXPmsIjvN\r\nCkyltiSv8cQm4kdm4pUsz0ZM+8R3OoWvNfiNGs5FtbAcFkP8xvkasMKiDVYz\r\nwwRkHJhaomWUT51ih3jjlvLXsM7oW1kJ5XLC7ad1Py8dbpPs2ngHC37iIvHm\r\nLuJfoI/VGMELNPMoOWS8BTFazsvCP7Xt2EyHT5EqyUxCrNJu2n/SORrdOqB1\r\nWcazoL9iEksYECu1XY4JyX98BcqZW5qEi7lrSAqKv/XqIgpgbWs1fF5+2XuG\r\njINJs2Do4S9BFN5CquJycQyGr9rYrYzTeWhDebugyc4wQ6qrELhwXBqMJzAC\r\nRaTlpwFAQfdNoWKdkqAzf7+VaB9Fz2nsF2MQSHoGXkbnHxsba9dSxXRz2kyY\r\nUv3bn8dpU139I3QzwEhB8L5JmyJXqvnaRZqzhjPCijrKjhSd1lkNBomDEdwr\r\nS1E390INX441tUz6KL9i4/TPsfIlmVwRkAmKZROGuu09ExNgse8NZT6t2GXO\r\nPEE1nxtU10FHVDdN/X5MWWV5vJEb16XhxaM=\r\n=6IgU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"610887f2009f43c20e6c7c517d38f1752f278f7d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-29T01:09:20.285Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.2","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.10-renovate-autumndb-20-x-610887f2009f43c20e6c7c517d38f1752f278f7d_1656465215422_0.5753621960674058","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.10":{"name":"@balena/jellyfish-client-sdk","version":"11.0.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b62adcb92f61fe6cc46eb299126ca811b144454d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.10.tgz","fileCount":34,"integrity":"sha512-OcidwKtaVYBd81hqb/3dVUI4BLt3uoJc7aVh6Gh6xYnodyGftgIkTv94DSgCjg08oCAuCmQDkNwyIdw6aK8Txg==","signatures":[{"sig":"MEQCICrZtW5F8SOAN4Ztu83xAcidZ3/fyICzLZfMtniBm3n+AiBiFJsUkymAmIjFnT4e0lDYAS3DoJrminRXGVjCfkMSxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu6hOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmptyRAAmWHkm1DVIO6DSePsursrbWBr6RZSbwTdMuZ5GSVBQzMi2zPP\r\n0AAkH6bYtza+/CfAmMn25UKzyzzp+5LBcWFBAl30wO0uWdNlTOOkr0e/dvoM\r\n5x+88v8fTSVBYMqZNHrsPe0B096pqWJ3+EwM3AqOTz1oAqm/5LW67FZhBDH0\r\nlMtPbfneE7RrKob4iUKbNrOwWUGDLus+s8fLrL25bNxkmaXcKRqe9aXZ6FD8\r\nyEhBaksZ1PhH5b1KKuyBmSTR8Z1XVxZFDr6GDhCFcrJWMNvkKG4aXaS8Ch4P\r\nyEgzJ+HEOOtIGzQ6OBNOdJOBMtRIG5ohkDCOH3HzbVAwSmW/56/yg3X/gt7x\r\n9egXvvsLkKAq1qbVODhtM5zi0QaDgnl7iVrir0FZKGtM/0SxXLfQvVHJnE40\r\nGDJ0U8/pR76j5yq/cTX/dLhzCODPlL2r+hscW5aTYOr3W3nFxaCV7GGvSy+k\r\nOmmFszgkE8XSPHv0Tv3THEXBkg52+zyvVwT67Uk49Q0jW0vaZ+S6UupOkw8P\r\n77U9L+ASwg6LawPDtyYepOHIsBkMS6g6dIFTbaSFt5mG18dOIM8E5eabaW0p\r\nTZVe+KM/Ra4oqQrueGmUTwZi8hkMDMmkSeZvOwdyBviiXjb+S0n8/rzt0P57\r\n5XwpJg1b93PEKDjw9zKv8/s2pfszAlAklDs=\r\n=F9V5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"49fdd25fe28b04c024abdff5d7a5692e9d235dfb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-29T01:15:20.202Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.2","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.10_1656465486499_0.6497101345324852","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-relationships-66093732b50f46c4daecd97d22a4a4589193e71f":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-relationships-66093732b50f46c4daecd97d22a4a4589193e71f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-relationships-66093732b50f46c4daecd97d22a4a4589193e71f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"84fc9ddcb2092e5033ea698ca858c5af60a71032","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-relationships-66093732b50f46c4daecd97d22a4a4589193e71f.tgz","fileCount":31,"integrity":"sha512-xMoEqZmy/jq/t7rOt4n0mxq2OPbCugHcbDGxSLaevnfU9dM5tT5IQ1RZvE+ufq98hl95HSiN53AaaiwUw4tGvA==","signatures":[{"sig":"MEQCIDUxl9QbO06QuUU6NhjzakhnXwfSseK3QjA49vJUKycEAiAyvwwy9/my3QacBK1XHgyjiq+LLHjPQGKR1Vo4qxUBrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu+XxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokmQ//RJXJF//hYrexKziakLL+Ez4idszSCzCgBzDn4+6q4ru6HeC3\r\nIfP/Ei+7qzwsdWd4AOpYf78H79CFjF2I9Mna8qfPfTZvCgteopLf1a0FyOMq\r\nc31Lgat51EfHLPPkAwxq5OTkp5TMhINYGHjN6Vua5a4YrqVAT59wwlRfGoCk\r\nSEmLpvPVjZNsvRDVitDEbuUw7kXbh2WIWpVmtUObBK5xsis3VuW3ymLKWJmD\r\nzResYzTLPK+xD7g0RNlmnHwJXtmivBQ+IQ8bjA2Gj7EA2pVrcyF5FfU/oAId\r\no/7pVbOOxW4siBDUkmkl/tLeBP1f9YdQ5l6HKEep/MQ5dBvJhob1NZeD8Y/X\r\nORTUHEipdux4sqqNjV/U1aPWj+k3qpYdrrDQfYuIGpnaCAeSXJ0GHv9mcon4\r\nmu1wJ0WwAeY6+G5Y2/nYvMLwOFQsVxqda29FV7Yy9YLBOEon1Ynzgxt9cA1D\r\nM1M8vhS+1kGh1zVPXEivTFRasogk7WjnMixv7t01vFUaIjcHyzTvPvzJuWj1\r\nqfbPy8m5u55OzyTWlMMwwSB6ewuEQl5GHqquaHt8PqHh6tcVdqu3TgP7CPQX\r\n9QW6wwNkENLyc+Cvf0JspASGo4Qw08l46naNXu384S6Jd1AGwm3xG1QHvo1b\r\nyHRa7Etf97vC0mXH/FV0qHZCSQshDvsuIpA=\r\n=d6ro\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"66093732b50f46c4daecd97d22a4a4589193e71f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-29T05:38:12.754Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.2","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-relationships-66093732b50f46c4daecd97d22a4a4589193e71f_1656481265629_0.7945662967948697","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-drop-link-constraints-6101d1dc3963c3c2112e9279e2ed7f8976b05c66":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-drop-link-constraints-6101d1dc3963c3c2112e9279e2ed7f8976b05c66","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-drop-link-constraints-6101d1dc3963c3c2112e9279e2ed7f8976b05c66","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1fcbae4feb3a515c7c67092f9f157dae9be7f4df","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-drop-link-constraints-6101d1dc3963c3c2112e9279e2ed7f8976b05c66.tgz","fileCount":31,"integrity":"sha512-elnc6dS6tZAX028H7/RhDrRdscaV9offrRqkwNblLuBA3g4Q+o+j9HaKCXxrreg4OCFAqRIPhaYwTsgW97tFFg==","signatures":[{"sig":"MEQCIG05nu0oTRDHJ1c5Wa1SytpkWISArcMaF9vdV8Ijf/u3AiAkxDuNkQA1CNmzOuPeNa7KRmu+OXW81WfF1QbOUs1PTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":210732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivPQkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJww//YRI2R8Y4Cq7zPVDMCJiAg4P6TaX+D0HOh5oPT11rXhHDXZF7\r\nuwIGhibWQyvCGMJok7HZyacHhf5kL4GaUk6yso1GaVaf4LhA84DbunmnuHSw\r\nM9LSw7fmG+J0xCD75XrVWc7GDXYCYbRrSUL4+eFsRC+L7Ub3cOUuM+ZSl24Y\r\nNCbjuzd2ExMIiQHgboSSACiiJOnu98rkG2vhvAe3N1ofCH2UeOL11aIigCVO\r\nSaP1oejAs9BzgvLHZ2yGQUqti4FJ1emNRgN5xyN4/iU3DRIL1eTQUkS1qybX\r\n0g6k02sSgvnB3F0SkZ7ApXB5SLD6tVtPaWUeQr663VZGOcvI2FsI23JB4Tcx\r\nwjuiRkR/0Zmgc+isJluXTDEgRiS8NxZmQnA+1Xlkk5vDmqr0pjDqv80ycvdA\r\nQiZ/WUliMxC/H8CeiOEyb0/9mNG4wYwyKtxyV30GyKVqIqOKtPt6NgXQtlmI\r\n/baSCssSvDsPRDWMYVeNL9Q3MfQQ2pW50/MbnhKNyVVRSTaMAE6RQvdrvwtP\r\ncDj5oroDFDUWZnvNdWfyasGN2zoedYQSCLOAPz0R+FV88zkkDnW6NLpkzHBH\r\nXuQj9caeFvMEuDaTH1vdn/6rKnekARZDWVklen0p8//+jBLa/YrVjljmS8N4\r\nHOwBUVSV9faEUgQ4rS2VzaN5kiHki+f0YoQ=\r\n=g8EH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6101d1dc3963c3c2112e9279e2ed7f8976b05c66","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-06-30T00:51:01.377Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.2","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-drop-link-constraints-6101d1dc3963c3c2112e9279e2ed7f8976b05c66_1656550436663_0.8898883206595294","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.11-renovate-typedoc-0-x-620c6230412280249439ca0fcce6d525bf088a6d":{"name":"@balena/jellyfish-client-sdk","version":"11.0.11-renovate-typedoc-0-x-620c6230412280249439ca0fcce6d525bf088a6d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.11-renovate-typedoc-0-x-620c6230412280249439ca0fcce6d525bf088a6d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9568d77925ea308b44eb9f6133e104357bb65535","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.11-renovate-typedoc-0-x-620c6230412280249439ca0fcce6d525bf088a6d.tgz","fileCount":34,"integrity":"sha512-oZqpz6LOM+YZnaEpYkAW1HJ5eOEvCLCIgdDa/TahBUkZA1bKx4wROyDGRs8yfY/0Bd2hw024sHCju6kHmV6whg==","signatures":[{"sig":"MEYCIQCB/JYekWha+av2KOx7a5svdFCcSvjZGjCW92HsldZyDgIhAPu+DW7DWQcJXosYKSmfUxpQRjwZVnQqU5GPUB3ePdDh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiv2rLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrEMBAAosevUFBqAstt8egltXFP3rIXYsl/7hIkoh7k8+pF2VwWpCYY\r\n5oP3oJB3icDq1pA36bV+CW6EEntvGNXVA1cdKPcmHNPkJTtkxyOMRG/iCp6N\r\nnrzyTctMEPkdjfGf8/WqGWfp/fQZJFOEdV5anw5XIvyWTZVsOLO8QvzAtyNj\r\ntdFCWEQSa0atuQQuByLBKyR97z1YULO6J4+jnp0QpNr0NtNVWA8maFqpCEn2\r\neVxZXoP9YsyxtBMp3yV2Ct3tRzU81gC3Jc+Jrtk6U1yyL529+UKD3C5KEdCQ\r\nONOLsXdCV9smJkqcHVygNJ05h88/rr2Tv9+Cr7VbdZRe6TEdgLhO/0QHSIh0\r\nzU/BDOdibuT4HKRq+euhxyKjVHF93b2g5Ep/caElGXd92vMU1fFQqGs10fFU\r\nrK4nVxq1qNr3KeqcEGYPAMd/qsimi8IIkiV6sGyiicqtk/+x7A6aqoZ9rVt/\r\nhxPySgBCKu28PtCVuR9K4mLBqeS1y80uyA0U24/Q1ArTdO/75Xx1ow5C32vC\r\no1sSlh8qAXihOnYbmSTy7dTCoXxvQ/Ai+RYL2wko9ggUqEOzHQKJMK8179OF\r\nUmCR4RgmrMZkky2DC2T75O7vy2ygYniARpspdFW7x2ZqmRXdbzblo8Rt4nAa\r\n0xyURQgd65Z1aHbWiafiEB91L63LT8QwsDA=\r\n=wgTm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"620c6230412280249439ca0fcce6d525bf088a6d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-01T21:42:23.928Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.3","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.11-renovate-typedoc-0-x-620c6230412280249439ca0fcce6d525bf088a6d_1656711883143_0.7868707601770084","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.11":{"name":"@balena/jellyfish-client-sdk","version":"11.0.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b9f38aedeb0012ec89ced47e2ba319042c3786e8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.11.tgz","fileCount":34,"integrity":"sha512-IqE2/vqqDROirrn/7dHeC5VcxFhln8ce1X3VhTfTn6qk20tOQm3wHkBq2L1pBNpoDkQ0pnMAdE5whwhrr4f4cg==","signatures":[{"sig":"MEQCIHftQsypvT1nVWUMWFDVzkUlcBgdqkMtRBYgiqmU4sqrAiA0jKkArK+rrYLKxbwmUCr2Lo4XwIg459V2cIqH7wsCvw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiv4g+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUDBAAlUUbN5hc37Ho5MYTdwXkkropvzsP6mHvVJt9KNvC0VUdRakG\r\nbb5ZswivyIJqMrVcPqASfm6UwVaQWuZfdJcxvYQV7I/UVVH9OkdDf8fbRLji\r\nn1BFwKz5KFF1QZjpe5lcLVUPEJ5sgvdlJN+fv0qS928TBYPnXLzgKYD/d1iG\r\nWX5SIYRC97zzzoo2WwXhaLQYuTWY1+kEn4zgKIxNySsg1/xJQ39SwkfA9faf\r\ni3tlRM/s/8Fm1Nfu8SqP6Zq0AmeUoGKUgUPWx2851KC42mmjDjtLEA0X8Kiv\r\nNSPAv+UN4K5Uvz/pDd7dijLkldYu1UtGbmP4yFbHDf6OKWDWqfxFIexEThdj\r\niHse3h2/wybaIblKpTPBhotTFOjuXHrtRuvHOObkMdXmml6Wtc2etnA7aJgP\r\n4g4yqTsP6oG/WDoHQ/QG6Aq+3FpgYhbads9KRncdLQleWtUSqGlBM0GifoV0\r\n+qszDPgDTBbIAhmmjWRPII0MFceackSwceDMZbmPPVxUnBz6k9wvL38gPhkd\r\n+tauSR04FL11HoaZRZ2HyjeKPyaMK3Dcs2LQ1DRa1ZddIXk/xJc3mpVGyEZF\r\nKzEzv3YfpfB79/mSQOWuv8Od5ykyVu5IGktTHAJ8jgfT8PR8hnIzcPfZi1Wy\r\nsHIIH2Pc/6m/E+rlKbwpxUuSJJR0/4rTCu0=\r\n=1eAi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"39699bb4ac3d75d50ecb1ee6eb3d3ea2160161d7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-01T23:46:34.265Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.3","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.11_1656719421938_0.968788712679501","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.12-renovate-typedoc-0-x-76989652ffaf6ee3a1770155ddabbe4759f86e31":{"name":"@balena/jellyfish-client-sdk","version":"11.0.12-renovate-typedoc-0-x-76989652ffaf6ee3a1770155ddabbe4759f86e31","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.12-renovate-typedoc-0-x-76989652ffaf6ee3a1770155ddabbe4759f86e31","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e07b29eb9ade117401be4bc6ce7c2525ca976dff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.12-renovate-typedoc-0-x-76989652ffaf6ee3a1770155ddabbe4759f86e31.tgz","fileCount":34,"integrity":"sha512-fh1n9I0a1kZbpB+Sx+EwiWC2/2818IwQO4sx+6J3mUKJddG0w7GToH95ncfqa85L6RqCIQDRoPA0xRmFm6H5Gw==","signatures":[{"sig":"MEQCIBw3EMCBCeFFjsTnZhBC+JLnlVlEGPByiKDS4kIjlCG4AiAlpeZO/kXU2Q0ncKpRioGDroL0nVA9XtGOH+Z8UzX6TA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwI0bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmow1w//TFSoA42mlwjveNmVh9a1uFUHqgNbl4BpDGF9sVigEMRSJCg8\r\n7VfDHCQeI6KOEueVh3VFB9H8YbSTGfXxrlN4+R3fD/a71Zl7Sz7UZ2n8P7G3\r\nb+NR3BI/rDeNuNYG26srx8MYYlHcJOASIXQz6VT/JGq2RQfmiDrSsBMksq28\r\nz71UVfUgZEn7+g45DUJZ+GRN7dk9ePzTFptEKA8/2pfZMfn1EuJsJCQn2gHh\r\nOMQ0NN1EpjOr7fhQqVvPHGsobJFCpue4/kcNAdH8ylvC6k+7ZnMRGyx8HmdS\r\nYNEj/MjjWIQfZq13HhRwVOpgjYNL214E9grlWQzLWvHp6RLzrE+rBZs2ZI5o\r\n4WjFMuRfjXwo1IaDY9JobTts5rVITJeP7j3UjBJ9hO2rJiqRVUW4Yxd6xm4I\r\n4uYU6vDW4imDRUEFRjjQG9kRaYW7cnnmErlGJCRyYbaJPGZY/PkHinY/qvdm\r\np/9ueNW7v6KUYFq4rNc8xBEUvOCtnJTwkSpCeYliGMOltWvr3IOhOERYZONN\r\nPIik05dxpeqgYblHycl7DDLSORU3aXN+TFR9az7LTvjF4KCqFYlUSHgR0Cx4\r\n+5/b/z2Vm00zrSI+T8NYj4qztOK0dT3N30DcJL0dxh2P+pk/irpmdl4VZcDs\r\nTNqLpD7LFIDQ8NzcyB61LdQCUjWI/xOWcN4=\r\n=7q2s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"76989652ffaf6ee3a1770155ddabbe4759f86e31","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-02T18:20:15.857Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.12-renovate-typedoc-0-x-76989652ffaf6ee3a1770155ddabbe4759f86e31_1656786202912_0.8937588344542959","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-drop-link-constraints-c98164c2012823e2493fdeab47dc02142db79259":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-drop-link-constraints-c98164c2012823e2493fdeab47dc02142db79259","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-drop-link-constraints-c98164c2012823e2493fdeab47dc02142db79259","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea33b0cbb846900f91a5ed26d9c1cc55d4e6dbdb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-drop-link-constraints-c98164c2012823e2493fdeab47dc02142db79259.tgz","fileCount":31,"integrity":"sha512-7Q8GM4STM5f0Ev5af32r2ZVr3TxMIcXc+lst9v4z/4npHZQYyIFdiKqzHOj0mjQq6xE+4/HuY0Zn6irrq0EeYA==","signatures":[{"sig":"MEUCIDFTTab8dsjPUdbmIxOJyYAPUOywVIfgtLVIJzXxvjd8AiEA4bD8nhScsbA7W5MRlQFSzw379yDZx6Y2erfEgQMEFAE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":210840,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiw+C4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVURAAn7hgujPM1mmLhnplIpiN+mCDzYF5uL9LTHEWx4JtP5b2C/L9\r\ncV6l6FwCFBZAvGTcEGX8qItegpOkZXQiVmzwu9R7FoIOvitdX9GL+KeGv2tw\r\nA3OMyiPAWuSdAk6B8m0BTbXPdmoesx/jwNECxOQP3FFIJxAnyfuvmWgSN/1o\r\njUbN+uDHJBczqEzRq1DZ0Nn3z9N2ZB6IS0wcqk4ljwNQHIjWWGafrSyZkRIP\r\nr/qKATq3K9u/pCrJIjQPfsJuph4eBxPfWDSY5FfgGxZZvkad1185IxBuf0QD\r\n2P22SW+yRKxVoU1YggKPE0SjEmbb51vUeimBrYh2zb2KFJ+BtXA6uh2goqeW\r\nreIwcUTw7TgZfNG9Y9kruwe9l93F9x8EtYdH2jCFGtq6TgxjnQqQ3NPMcCIX\r\nwAx9hV2I3nIaPoV+mEl/EAcDspbph1KkcxjnHe0uUB657pxR5Y6u8nMN33ZH\r\nQ9vskOUEJaXo9V/wEFb95peQaObYCa2RGd5UjTZ39+KxZ3YpjcIsxkH4Xf/I\r\nHyyt0BKM294y4I/Bxbd7z+HRgKWsgnqF1Dt9pjoBRoTGe+WhzEYyhUOM0MmA\r\nt9Std98t19NJV9qNtKbcru1113KNvn92NmU+v6XfRfu+iiSZySKOUIKYuGpD\r\n0ZRYM/dkV/1yi7NlRhErc+0Eo9VjiB6ltws=\r\n=TmBq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c98164c2012823e2493fdeab47dc02142db79259","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-05T06:53:29.553Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-drop-link-constraints-c98164c2012823e2493fdeab47dc02142db79259_1657004215957_0.777889069578839","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.12-renovate-autumndb-20-x-f402b04b662d7522a5b9b87cf2fc65848308abd7":{"name":"@balena/jellyfish-client-sdk","version":"11.0.12-renovate-autumndb-20-x-f402b04b662d7522a5b9b87cf2fc65848308abd7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.12-renovate-autumndb-20-x-f402b04b662d7522a5b9b87cf2fc65848308abd7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4e8f581d4b50ce3e34820079a02f6b0672129821","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.12-renovate-autumndb-20-x-f402b04b662d7522a5b9b87cf2fc65848308abd7.tgz","fileCount":34,"integrity":"sha512-5TE7APo+mHYMCbNdBXi4fvSNSClmONPws5oxoRnuUF4eHlsQceEQSVp8LmU2Zahp0w5M8FmHWfxDNEHvtAxdkQ==","signatures":[{"sig":"MEUCIQCUMD6Z/JHb5WTIkZ3hOAT4Dcb4qt6v6V2TnBFyBYZWEwIgIosraCj/g3BbqM0cy10WTIL431p9zoMOwQOLyhU5VDw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixA4UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVnw//WNpX/Gcmig0lxqL8WlmdBrBw4kvnR6prxemXSig+5RY6b0dr\r\na+8Tr+5Bi3n47UFRnx75H18wg8/mrzzHB202o0DoY6WHyU39rBW13F9r+Kvv\r\nFl9xwqXjrUKIPkwlsxxK7h5EFErzZzzRmJo9OTpuF7OHqU0YtudTaDuam+ET\r\nVz97mumbpxkJmQqrZ6yH8EUyPP++sVKEohcpCQGGcVF8KTFjnMjrx2OonuSj\r\nEXdVsjWAOLGcFVu1CNjW/GduWD0ilfyZJ1lZZjs9D0KAxAwPG9koyelgWpG1\r\nfX65r0sQqIsuTY49Xhs2T9Kje3bukCVNqjRu4Q7vHYUS6TCq01i7Cth4u9Z6\r\nXa7tEydCj6egkl4TWTOrHi/ZWkXIxehscMmukDJNaVGAaUK0z7rzvqtr3WQ7\r\nPqTtARud1rWavxx3VA9PyJhweh13iufsMm6jf9LCB8gtMEAGj8JMzHM4L+am\r\n4gDX0P0NcOEDwQMBNjfsx50zGJz6ZhHIIY90Y3rSLJnO6O33se24iqfZiiK0\r\nwGFcT4oFf+W/HOvRrzZhsqz6BqGB0X4Z+5GQjEGqc59GevsqopabwWhraFL0\r\ncRiTcpKwBHrwHVYQIL/xdCOk6z8StctPcRqLudWLIG/fUsfzaqaXeMaBUG2e\r\n29pYEVTh5oYTJNb66ADCblzWVI0Dq+nYEGI=\r\n=GEVC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f402b04b662d7522a5b9b87cf2fc65848308abd7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-05T10:07:01.096Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.12-renovate-autumndb-20-x-f402b04b662d7522a5b9b87cf2fc65848308abd7_1657015828128_0.8312992783042663","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-drop-link-constraints-243ffae0e9e655ba00e48884ae9b244c6c00d42a":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-drop-link-constraints-243ffae0e9e655ba00e48884ae9b244c6c00d42a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-drop-link-constraints-243ffae0e9e655ba00e48884ae9b244c6c00d42a","maintainers":[{"name":"dsevastianov","email":"dmitry.sevastianov@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c26d18fb398c233cfd74e4e47b3e875436fe0b75","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-drop-link-constraints-243ffae0e9e655ba00e48884ae9b244c6c00d42a.tgz","fileCount":31,"integrity":"sha512-ly3hAAxo7p287XliH+IAiWf/zKasQtldYWc2NUgTKC4XZ3kewZdVJLkDTSpWq2SZ/zYLUBlJ+Ns17WyLyD/gUg==","signatures":[{"sig":"MEYCIQCcL7dnTmtULMDa5DnScyWPPalgD1FbU84YNNF0DZ3NCgIhAIJi8SOl/sD1QbofJfkyGtqrcBd/UZM7PPR0ftpqcWwA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixKzDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8UA/+MGDZY/W9csnUDoGy2F885HPmIEL9TDXtMPr6WRjlGTNK/9Vg\r\n9p0AFt7JB0bP0tuwDpG76yrASBvq7r9EKj6XVFkagCaWsXpUg3ARgpOj71L1\r\nzd65LNIxYp7HqiO6haJMl/ziYwkAd4BEXkuRJiJAi3CpMsGk/lVe3EzHSvYw\r\nstlTi5o6SC2MDkpq2fiH+5JwlVpSf2XIQ1XYw3/HcsWMCnYWOyU3XdGwPJry\r\nrFm+oxORnDmPgVZCCZWTnTVpXsZT+8hyocCTStDYCXNYH3FngvnmxJ+mV5UY\r\nDYNH7zFKVUPOVMv0Up6hi8H0eS6D/vtqXiQ0V2SaQdQGMDUMxY8+drJIpB85\r\nwrFyWQqPbsD65aQ2e26VOK6aFWS70Z7LqiIMeDuqavsSPKY1pKWgLnMd6KfH\r\nTYohD7iIu4QJbENaO7DhMQ73RFyAJ6tyWJABKqZKQU1FAdUNDSCuFpEvjnwR\r\nXTpioHIXpxi+N0AIYfFDGE2jMuwZeewLvQxWQdIkYAGLI+L3TQHJhACwn1Uh\r\npr7OfeDSUM8IjziPhx4Pmcb9K8+PLWcfTdRdh66eDZyFtq08VIs8sowL39TJ\r\nlZYWy7FkHkBusWXIYiUmzLKrd0jFKuUxflXNNBZiKyfUvbUEV7qv2lkkozoX\r\nVYWiUPdDiGqubaEToskJyqTGfBPbv7TULAA=\r\n=5NlE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"243ffae0e9e655ba00e48884ae9b244c6c00d42a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-05T21:24:04.434Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.2.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-drop-link-constraints-243ffae0e9e655ba00e48884ae9b244c6c00d42a_1657056451092_0.03345859464711398","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.12":{"name":"@balena/jellyfish-client-sdk","version":"11.0.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.12","maintainers":[{"name":"dsevastianov","email":"dmitry.sevastianov@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"361a3160875663bbd6f65d96ae5db058d063c51e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.12.tgz","fileCount":34,"integrity":"sha512-36A1m9MXBFqDUTQ/CK/YBf0hjis8mqidQitmb2r5eZPo2OvEY35CF/rHQsJDfe1sskL7cymqohWQOINBeQYtTQ==","signatures":[{"sig":"MEQCIBhPJSiixeJNjWmLlf0lWtkSCCV305VeZkUVWi4peyNXAiAfX6gZuHKH7XSPMlEocrUht+m6e9ih+VBbAJfbukEeIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixONhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmru7w/+Md5PVcKvPkVdqCaghn4bZPiq/6urrZ+52dpS3h+9SOC3WecY\r\nZgLYsYjtBCmyA30KoXOlHOvIdaiU3FLPizk486alq6OSqUqu7QfwdUXuA4QQ\r\n3sIYYMtnOncG3TZr3RyspEQfE5yCd8Gwr8KgDA49S0BeQrbfkSRSBB6oy3OD\r\nJTdZo13vA1i4VDnVAwtgFW9zUAmxmifM+A/6YDfapqNpAfvVe+8ZqrXJ8XnH\r\nfRMWQlwAmsm9CpVLoL0xtQt0xUDNw055c23m2i2QFlvxwB+qaHc1HqgsK47P\r\nO98yD4uPfmwd46c37/mXMH4F8OxmNcCIz4hof+k2YOhAex7W/nxyq8LMiWLj\r\nUE1E06l+Z93+Vt+TXjvlxl7L9acGVxXo82cbHYkM7Om9v16LusiGlFMfvX8v\r\n69LuMXgQR/iBjDSeEHb8jlzbxFSUAM4QnF2hBXE3DG2lrRqN1TmLVFaQjdvA\r\nGqBFtqfJ4VRusgIt3pl2sSApk272rS5xqOlVlD5n/Yi/O/3qoSolmIvT/NiV\r\nlksDrcVi3eehVFiBZe6jX5ennuU0STii/D6mr/PwH5U2ESCKPvw8Ih/qL1Z0\r\nfLfg6vQqmF3wIf3HZ9/3HwhMrnK/ZIDVAScnpCw/eQVfm0ZioXlJ/RWdmVrZ\r\nvUlrO1MctoTXVDoS7iMuh05ktwyUCTS+Syk=\r\n=AID+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c0011edd638983d95657b7dc8cb2a504cd50629b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-06T01:18:17.646Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1","@balena/jellyfish-types":"^2.0.4"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.12_1657070432966_0.8590352550875018","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.13-joshbwlng-drop-jellyfish-types-7ce7522bb14c26e505a4016b2210a2e8b07aaf7f":{"name":"@balena/jellyfish-client-sdk","version":"11.0.13-joshbwlng-drop-jellyfish-types-7ce7522bb14c26e505a4016b2210a2e8b07aaf7f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.13-joshbwlng-drop-jellyfish-types-7ce7522bb14c26e505a4016b2210a2e8b07aaf7f","maintainers":[{"name":"dsevastianov","email":"dmitry.sevastianov@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"065ff6f8428d8ca30e4b509f32b2b042edb23cf4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.13-joshbwlng-drop-jellyfish-types-7ce7522bb14c26e505a4016b2210a2e8b07aaf7f.tgz","fileCount":34,"integrity":"sha512-VTwwit6Un3oTmIwnUfWpent+HhSYEE/24yjAknNQRM43eyWm6+YRnugv2wWZ/I1sUG1zxMJbS8XF5ZISsN/ZIA==","signatures":[{"sig":"MEYCIQDFHt1BYWvwiokV7LZn22UkHOuV7oiYKX3q8sMjGtCD4AIhAOx/EK6o6cD6lMDg818bCggqOr6xfZbyM5UMsg1ieNwW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixVCHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoM7Q/+LePrAGA1CgrlK6TFlzg08NQQdshBHJfSJ8yer2b7C01IJcTZ\r\nhdlt3/BBMZdgepGaZJRwvHkaLnkCkyLiMBgJSOgqke6g7g7p10E6S45aoy/Q\r\n4furA2qPpPj3N2VFflqWqMYkF353f99xlqaNpFwsG3md+G24myPeHyktwFb5\r\noNxvc9CgEhXESUjfhwNESZoIV11SCqRL80pu9UkkCwzadn8CLxXlKs3IszMQ\r\nDOXWZjfq5pJG/36AmiwpTgFU7hL5iHTcoIDiIjGI8kGM6OKEje+SqYLM6Yzk\r\ng7Rlh3nn1zNW6J3y+elb32tltb1nnMILU6oVk6BSf0ai0rGCrxuxBlrN3fgH\r\nwg5Xw1GR3UEEEkb5ZApRCXqy4aAwJSBRml/RRDYxCwB3La4qLePAsQopkERr\r\nTXY0/qhyr3MeTke81U1DVVb/EwdzSGOh/3Uw8fPc+qCngW/jGemZSz3CS5Al\r\nZ9Pt3t37MF7JUNZI5Ny/+eJxUBhHwk5WhreioTkpiIvQ5Mqr3pFwfNMW8IXi\r\naWyU9BG+p+s+xjCZqxgSO13nSRvl49xcFAIquq3GUQyjP65gEpbglLd7Xtrl\r\nawGkFP1lIlv7K6J2LH2y21YrGO2dgLBATZKeh4s21GLJp1DVuzL20i4ClzAW\r\n02yCBtiprd/kjUaQEDDLlYfcM9lzbyu4HEc=\r\n=BxD3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7ce7522bb14c26e505a4016b2210a2e8b07aaf7f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-06T09:03:01.407Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.13-joshbwlng-drop-jellyfish-types-7ce7522bb14c26e505a4016b2210a2e8b07aaf7f_1657098374849_0.8360842832819808","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.13":{"name":"@balena/jellyfish-client-sdk","version":"11.0.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.13","maintainers":[{"name":"dsevastianov","email":"dmitry.sevastianov@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e4527a2d2743ed3158b0b8a01bfca642176b43fd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.13.tgz","fileCount":34,"integrity":"sha512-3PSLMMTnqFNDiTVEmR/IpiA+EaXFEYn3zR6U1IWiE/H1UigBY7kJ4dKfcOpofi2+9WQv+FG7s+DGt9Qk2g38oA==","signatures":[{"sig":"MEUCIQCncGzZRRGolL8jCURtdSheLNqkxFe5ArbhTu5L8B/4pQIgNgGHgJvROiSh1O9eVp0Rp9YExlruulMEcoGllM+OjyA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixVFrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpdtA/+IYgjf74XvAgxEo2jVYAh/qbTwIXYTBvEEMcONbRn32xeVqWC\r\n/kMPeEbI1sHrkMe9/w5S9hpH4k0iKQpQu5bx8g7di9jKWSX9QCS48iP2VD5a\r\n80uUu1IG95S8oP+ynaIYY0CU/cE1qkbyPv0B9Mf/xFrFhKZavmIGoTMYfxZ3\r\nYJKcVNSPLS8LEvkhPjbAt+yE1ITSge34P9FyguKH8LbUgWXXwKJAdhHn8nsn\r\nNnid2YnKXaiicU+QSi25/d2rxTseUxQWoOx+oi78xm1NEmltDgVai7NBmYUv\r\n8FE3DJvbZKjEeQon1og9NWHdqtxyqZeFWcY+FEnHuzra6HEm4MWQ/Lf2QN8J\r\n9lUTYpcCPm6/twTMo8x4dhBOt3w6dmbOHb/MN+BUng045TmepPUPbwdpMx8B\r\nM83vDPgk3D7on/2RAVj8FeSCFfyyEtF9yLNQ6aCoHrZEaSt4yUZabPQn+DXS\r\ntV3NPcXhT1Vra8zlmRlGPhfa5tIZrnxeTj5A1nz/HvVeP0719SI4joNGu+eS\r\nM7b5v5O6A0tnC4ViakOPlqjs0lQceGGQiCp+XeFyYBQIsUQiqELUhiXa8xo0\r\n/a0gPiz+xDSCjAlxX/Klx3KVfKx3kV8hczVyJSkp7HJGUyX6LcA41NuZJZkQ\r\nqUJ08prhyMEeZ2dtY4lxQD//bCWFconPmao=\r\n=nb43\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e64d888395ac81edc59339ec3be6ea4176d781cb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-06T09:08:01.209Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.13_1657098603540_0.49653139820177583","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-drop-link-constraints-2de31fe34a5779479b1d41b7babf90c99850809b":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-drop-link-constraints-2de31fe34a5779479b1d41b7babf90c99850809b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-drop-link-constraints-2de31fe34a5779479b1d41b7babf90c99850809b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"397f22ecfc8fbacdedb0d7099e6cfeb7d8f5f7d9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-drop-link-constraints-2de31fe34a5779479b1d41b7babf90c99850809b.tgz","fileCount":31,"integrity":"sha512-H/lxtHhpnoioGRwSxSMWiXdnWwjVE+2sdD8n9e9bAZO2RvVAWcCutbidwHGPgs8TIbg6htSGQYsmHTFu2VuH+Q==","signatures":[{"sig":"MEUCIAmpgg6LHvfpfW6LJPIEFo+CB0hJ9PqantHBsGXEnqXfAiEA2QF238bLe6RzgjNCtNM113d/IP9EcXH+aPHJZAZbmp0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":212741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixpreACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrv0g/+K3MiAuDC1U2w6xT7FKbqJU48f3bP1etGRO98VUxVKmuhhgoX\r\ny1/RX/Vk5jg49RuiynwlAjCwTUGb4P0+kTHovwtCyvHbMU63dAv6Z2hklHSA\r\nTD+Tf1FMtY7BOT+G2REJWDeH+cn6hKBmBerPFMlC/8f3U1mWaqTGvnkoLSQq\r\nNUwaVKAjB0RR5GZq1PkitSFMzHK/totAyUGyKfCzzNfzO6Lh+VDlO6u3j936\r\nSsFVaRskoNJ9s64w0OqpIAUmPvgntHHX8b2KxGqlirE37uxueRHlmeklYLSq\r\nHJG6P7URYJuLf32GyeITYQpBQ0vqq2KVlXoL2ZfEL03eoJRo6GWoiknc4rPB\r\nxlTuijcReVXYKL0IIW6NLCh1HXy1n5u4TzsldWmgavZrMI8LkT9MyXEm2Qf4\r\nFUnqZ1b0Bxl2UZmmZb+IfQplN5U86W9aowxcufI6OlUcOO/Ubh6DKS+0kSzt\r\n0WFwspNctgtDwAxtCSLjCHuYImtbApyxnWdQP1Ha3zIQ9L1pHqbpo8omCzH4\r\n7wVNJzdVSB9FV2wMlSbqy73hHpjIsnFrqEwkIAdikO8Q7vJ7mwFfAuRdpl9h\r\nPIl2DiQE0WKYu4K/ucf76zj4pezK6LE08hJX000gXnTI7sbxOFkungydHbnO\r\nREArUWaUsw9m8A45NQvjOgXit4K8P151s2Y=\r\n=nCaG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2de31fe34a5779479b1d41b7babf90c99850809b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-07T08:31:37.594Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-drop-link-constraints-2de31fe34a5779479b1d41b7babf90c99850809b_1657182942725_0.008170666806189608","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.14-renovate-typedoc-0-x-937cf295c0c2d9c68d648c47e3ebd3c2b2af709e":{"name":"@balena/jellyfish-client-sdk","version":"11.0.14-renovate-typedoc-0-x-937cf295c0c2d9c68d648c47e3ebd3c2b2af709e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.14-renovate-typedoc-0-x-937cf295c0c2d9c68d648c47e3ebd3c2b2af709e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"eafb32b133b46feb9181ebafa5da0f7efa0df254","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.14-renovate-typedoc-0-x-937cf295c0c2d9c68d648c47e3ebd3c2b2af709e.tgz","fileCount":34,"integrity":"sha512-quN0riQ0rzJk35x5fYwiT5Qxv+zB/WKjzGNiHiELgpRy/ohtpHab6UByEwvDZhQw6spGXy7aOb2H6PJmo1BW3A==","signatures":[{"sig":"MEUCIQCRokcHs6yf51eOkRk5pRAhAT/0EuTv+OVgjYXtLJ8qywIgfSrZKzbrNEUGrFDyTdDcw/ieVOAbs5xLOj5H8wHLESs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix6LIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCiRAAnFpCov1T0KR7P03pqifDUzVhwNftgpCSs9BsP7iI6XjFqUMo\r\nLmV+KWroQmQwYybdN3mZyEPARCzoPuNHaXR0xTOkkJ2pmIf7igB5yo3gVnlD\r\nKeVVveMyMRoWCN4HWT5HQRXJpG/BkkGAMpnvcrStt97MeRBK05uE7Nz2Wito\r\n6MWu3kNHTimdNUUCnX9ZmLkBKHO26HcOGnIepOOEYaowRcNrUbuWREt+gfXV\r\n9gXfUNAHmyIii++OYHg/jnz7TDHBmwcG0jIf9fzftPv6e2BfqkbsmITHoTs+\r\nJUd9pi2kqQnDXvHvyJLlEybGlxCnzU/Hs/RHVHBv1FZYKHMo2pWImiNdX6xN\r\nXsyITK7Ch4FwPd6dU7d41eBfDKFKFesb9U2v7Duj9f/Vwmt3kCuVkEAxige0\r\neHVBN6EJre7bZiyS8JxOeh6s/mWtqmDwSDN+5pZwFjZMye/eYHHlYNsemqEo\r\nQXyEaPsB/LKQLKwMqKl9yznj8zjzaGSKBKTcegdh1JxG3w85lCKiSz4+PRD/\r\nAGmHImPvbPe6mYn3WKVQlAQWds0REBobNpJpOPIUFDk0aRwW6qzQWkZjn5RQ\r\nK0PneErFYNHqDkp0kBekYDzcMIClXheHFVyTM0oWtn812/m3PHWHVb7gT+eF\r\n9Cz3uho9pZxEKCIBHEO6VmApqRGhqq0bfUc=\r\n=Uz/s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"937cf295c0c2d9c68d648c47e3ebd3c2b2af709e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-08T03:18:14.945Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.6","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.14-renovate-typedoc-0-x-937cf295c0c2d9c68d648c47e3ebd3c2b2af709e_1657250504599_0.9969116729571161","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.14":{"name":"@balena/jellyfish-client-sdk","version":"11.0.14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"06441a680427a46ffbe9c0d7f4b76d260a7b47e9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.14.tgz","fileCount":34,"integrity":"sha512-eLSAl98QiXesBUKbNWDbrrhpcuqP+VZediY32fbkk2kz2wzCvcwEKXd/PUuqBU3+wopVKd3x+TKuRm0QgKsrSw==","signatures":[{"sig":"MEUCIQCE1BDR6QoVvoWLvU8bTrzWoflOm0h2Q/HYJ7PsTYePRQIgElj33KZZKQZQuND+LOZo+O2XXJIL3aSFoW6mGmF8MlI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix6PLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqykg/9F17WtzUawz5qGnsZhN6q9CgskVJTsXZVNb8Wd9wDXeisNOvm\r\nzxvdraG1dxuY6fKYCKfv0poDgiuXAZ5BhzkMRvpPpFZRqR05FhabSejPcs6K\r\ngyQDp0Co9Zx+6TtyvqxNSOLiBVHdkmZohNQEM/cgwSLn5pxR6t2zuFEWiEJT\r\n2O1zs3/JXXA616RPL1SiM8k2Ij4tEl8ioIUI6oUsdx6VUV7ev1FzuhF/JeCb\r\nv9hptFZCP2pyx+fzowpcXtJoujFJr6HRXzENkSp2MSm58qZh0lu13ruhqL/d\r\nX/2qcOuEjbbV/KsjjdyNIsOOcSY3J9fwQb+FzEb34WB4j6XBi7NYPkMaE3vX\r\nJqKz05saSV2671uAIF1Dn8LZ1WZGZA9o09uzfQ0jwGlKOOc04qDTTP6BHykn\r\ngoTholfbrkngiF16Us4kNM7yH+yISyU9U19YpK4gPkGzhHuOq7VQ5PLRAjcx\r\nQVaKY36MLsb1aFyShjzgTXVECoEvzw7usawSMjJLbMlsvCyHAp5q8h1Qdp8g\r\nI6NLA+i7lwu+XZqtOKZEHkUsdizYzjDzmdwbFXS+wPcOXiP6Cqgx2S3HRoMc\r\n0MEi7K3E60CWH3osQbj9W7nfiG5bKGjAGrO+1FVqIlpbTJ66c5DQew7cEzMX\r\nvRO5ZrnzEYP6pMjiehEj5v5f6Uz73SZyWDg=\r\n=I3aR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dd68fd53ea09cefb9712c05f3fef9b6c1d8cd423","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-08T03:23:37.699Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.6","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.14_1657250763533_0.9846109280796527","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-drop-link-constraints-d7fb6b7cc86ef87de5b15d27b1c0a01e20a8cfc4":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-drop-link-constraints-d7fb6b7cc86ef87de5b15d27b1c0a01e20a8cfc4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-drop-link-constraints-d7fb6b7cc86ef87de5b15d27b1c0a01e20a8cfc4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"60305618711c8e5265d617958a9b35568cf84ec0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-drop-link-constraints-d7fb6b7cc86ef87de5b15d27b1c0a01e20a8cfc4.tgz","fileCount":31,"integrity":"sha512-BfC9GJZRVbBfRtdeWLCUqrLwl5rfuPG+vNKuUJdSqu60BPF2sYYgB4kgxUxSxMpspc83dC/PKA9tJv4yQ51jiw==","signatures":[{"sig":"MEUCIQClv124sx+q5bbfrejM0IweyNhJ6tGxseRm7AVYRc0XJQIgZ24MpZjZX7xyKapUUgX9vfslEa2VY/qvAHE7zVnpJmQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":212742,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix8HKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTZg//SyyaF/IhdLb7r5SQr+xVg8hHoSWhZXuWHsSZ8JsNm+Rgdtkl\r\n/QlMkrQOb1wKNsPdWH7FnewM1X+pSFw4A6Au2iVJVcgMJcO7Bmbxp/UNRZKf\r\njCjEC2yiWVuK5oFYXjJMavpUGJ79J01zw+LorDtHBNf+AlGcWJE5Yn0mK/od\r\nVkA2Wisxuw4ce6jTf6DGFyMI504tiyH9UIKBH4YeZ9yvQcKI9s6367bBN6Qw\r\nX2rDoVDWC1iV5CQcLrPDnNSvLy0HHp4Ab5VHhlrE5AcwPmE4ZPdOPJd5u8ou\r\navErQK0AXFiBARfG9/Kly6bFNosuwI4MNokRUeb0xNbU9Xhd3p+K//rm4eJx\r\n1yrv/zCV3BqcAe+SRm8VOOci3zsV3I76m7oyPaCU5WZ0OP/Wig/wAjk2lxqr\r\nf88vKXzCPnB4A3E+pZmpbPXmtlmv9gt+vS7mwtR85F99Kf5WVH4zKm5IjxmP\r\n3y+ZWANrkduX+/c9GYBGmMEksFuS+gKluU/mF+aIiUrclfKo/aEeF/x5wVf7\r\nSfwntNiZhJ6y2ugA36YUhEbkihIWU8a8WDpaimWQ0NjVbBpXuJA6cyyJirGK\r\n6zbe7nq7C27HlDTi70Xtwdb/NMUGe+8MRTB325xKq3gCEYXOxwvxfhv6pGPT\r\n8djwXVmWo30or/ktwc5TNAf1Y8XFVbLC6Z8=\r\n=cx9p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d7fb6b7cc86ef87de5b15d27b1c0a01e20a8cfc4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-08T05:31:31.737Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-drop-link-constraints-d7fb6b7cc86ef87de5b15d27b1c0a01e20a8cfc4_1657258442738_0.3624760889747125","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-drop-link-constraints-09fcf24b0b5004ceb2564b6d5c40faeac9cad8f5":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-drop-link-constraints-09fcf24b0b5004ceb2564b6d5c40faeac9cad8f5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-drop-link-constraints-09fcf24b0b5004ceb2564b6d5c40faeac9cad8f5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e4e906f64e5bcc1d7ee7dd7c77fa4e158aed31ee","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-drop-link-constraints-09fcf24b0b5004ceb2564b6d5c40faeac9cad8f5.tgz","fileCount":31,"integrity":"sha512-IV5RBnaCLz2FzcZNN4kdbd7Vp10FgHn3K86o0mCbEZsv2aGvT51KvzFRWxf1VXSzsefwMZiqTj1N66RyObf17g==","signatures":[{"sig":"MEUCIDXz/fv+YAY9fmqcRR3L6qT9TuUJukoNIQY7ML2734plAiEA/3EAQ69nvmG0/ueKn4YKH4t9HxLgiSA3MYLyW3yx+js=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":212602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix8tQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBoA/+Jp/95r0NsGFCParFu+X3HTm/8ghw49poaDNYQj1KWfSayEvC\r\nJWAPntoVkfDOPXD3wtzb6QEqhmheADaAWj1VmV0vI8zbyzno3K4FGKr50RD1\r\n35bQD4TgQ9Vo72FGvSeN8FR4h2qdBAeYhT1d4m8myxS/VHM9hhB9gI5PICBC\r\ns6sMNCMelhXOU9gQEPTvTSXULsX60Ld0894OhiZ1857/ZUsSKz7iZOK4gDqe\r\nnZtKruxq1wXQ6R83DmDXlzoc+V9fKij7q1UwqZ+mRZhSal08oN3pIPV4rsht\r\nKtru9MT+DIzwKmxWPtWm3fF3eZWA8Ub97c060aboqHvz1v8e0q83x6Ln4F53\r\nCoWwWXTmlE7h/9LyMnnW4GmIPwDbgTSDdI/DRgMPtmnhN65Lbdpm1w886ok6\r\n6T3f6C9VOr4WaGLb8YIXv+/+b7F1mv0ie59+jjhoZ5yU3jAUh1P1Hz5+x8E2\r\n55snrqcxuklaPYATM/80efa+UxQwU1q3pzfAIdzt/ALdOF7J0emuaMjntl3L\r\nMjErKayVN2KBXugisYg9DiqFbtSonPOD5CBHwwBLkdB9ttSSCdA6smOJpAjQ\r\nqiUFf9orGkUqBJ1DrJyXeubsp4IMCM+2/186UalQYzn6cYzqAl07h6cGgbhG\r\nI11C9vU4BX7nXuEIS9KX2iRfUAOuKlbGrxU=\r\n=Yl1P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"09fcf24b0b5004ceb2564b6d5c40faeac9cad8f5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-08T06:11:28.538Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-drop-link-constraints-09fcf24b0b5004ceb2564b6d5c40faeac9cad8f5_1657260880460_0.37720369295884915","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-drop-link-constraints-aed040631a35540321299c8ce4464b96cb48cc43":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-drop-link-constraints-aed040631a35540321299c8ce4464b96cb48cc43","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-drop-link-constraints-aed040631a35540321299c8ce4464b96cb48cc43","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3d776380706ca1ea0ee4c49b3d675c4f00710fe9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-drop-link-constraints-aed040631a35540321299c8ce4464b96cb48cc43.tgz","fileCount":31,"integrity":"sha512-tO/nA5xuLE/akhGlcRLSBh2DVwx5FMYHisGOxQo5/ruMNEmjVoEUh7+8a2t1pc6W5NZKzNQo7CS0BhBCEe7cyw==","signatures":[{"sig":"MEYCIQD1w/KuuqpotoloVErRDVjEeXid7SmhCskuuHX3GtmqkgIhAISGdUWlN+GRx/VVQ/9FvIDpimC0AjC4DU5uM/YjdSYV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":212771,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix/CSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2ag/8CSdHyPmg/4ycyST9x4rjc5W34x2QJQ6Y3oh2TkqCgYv5xBQ3\r\nXivZ+xR90c0vLtZ7kY6RgiTQooX6GBtslmHfqi1KAQowpQCGWTZdoOdNB9Nx\r\nG68A+lHlLtROXFUNQu0l75HnA8h8DgIgSTNUpozrwhTeEC9h68LzAiFCYdmG\r\nLwBFmQLE2bW8j0FcCrkxMYsR3p6MjjEv45LyYJ/fbOqDiG4NAQQcmr1JC4fE\r\nc//bwCxCoRXDXejB54SIFg/+UDyFLyobkxYB2YUnpQNiKKpNZF0WudBh8UCL\r\niXKkXV66uzBmCDr3eprL+G3iv+UGAFIiefiumb1PNn6gi1qlv1lfQKnRQwr7\r\nHZW4h40ZnKOuMhNXCjXYYeGpUnc7qFe8YI5AqNFitG0vYEpVue9lBGx3gq8U\r\nKExhsF8BHVoAxhN7w+vphVCi9qIl42EOjInEi9HDewLdkDEkrxWaEjJ/OHd3\r\nMqitVTtGf/Pa9Cm2Ah62zdI4s1N2mh5gyHFGswwsp/l8jt+7L4UUGabv+w0C\r\njFMrvFofAhBKoA+e69AMqxQJnnmDlcZFy/GLdExy4CEJoqUZyl4IbWpirSkB\r\nuhf6Hv3kKJ2JcDOZ8ubmC9IKSpOzqpfjBBK9WYxxnDesladKad6WQ+gbonrX\r\n6b4qmFIEUz3jA9sV8L4kBfcYSqn8ILJsn2s=\r\n=sI9V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aed040631a35540321299c8ce4464b96cb48cc43","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-08T08:50:32.894Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.5","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-drop-link-constraints-aed040631a35540321299c8ce4464b96cb48cc43_1657270418632_0.9755335557676359","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.15-renovate-typedoc-0-x-369cc72c3ba34c1d56024d9413c0b01576b94253":{"name":"@balena/jellyfish-client-sdk","version":"11.0.15-renovate-typedoc-0-x-369cc72c3ba34c1d56024d9413c0b01576b94253","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.15-renovate-typedoc-0-x-369cc72c3ba34c1d56024d9413c0b01576b94253","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"90f75c16501a5be73f062e3c6cf4dbdb2aa2b022","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.15-renovate-typedoc-0-x-369cc72c3ba34c1d56024d9413c0b01576b94253.tgz","fileCount":34,"integrity":"sha512-/FBfYRUF3jwqaBdHqC2Q6ZI24FOSdtsNPIahtmwoWrHBaGA8qvcnPm2h7CTwYPpSypXhoM8N7WD70AC9yXZGNQ==","signatures":[{"sig":"MEYCIQDrJ2iwUOUj3FIeYKx7HaBa8dLQybxDon+A2y3vfLwGMwIhAOS0+aonbZ/1PPTSADWb99LOM06qyQ2ojbSEJQiUe5M0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiygd8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp63xAAkuCrq0v7eeQUiQtOfobl35y/8XgZfeyAL70YOSnjxHEVGzS8\r\nULRuvzYzaJMdbu4aZ33WpmV2hBsZhVm+nE8aMLxPiI//6rOEKRQJS8VmBPbb\r\nKDBlhbI5oI7koPSa/Qy4unkTUiWOCUIiIk2CCc7EZ85BK2xwQn0o3iK0MA2K\r\n1VcAyNgGUrr4WAuof4Gyn9Z4HNdva3anL8HVzrDG05SxaNXx6ZavVPI7wGtr\r\n12vYQtjFoAmxSf0VCD2H2cdoi6/W7S43w24vYmUZHA5qxeodlKLZTJg76d0Y\r\nj8VNJnpxDkPS+XVJG306LY2riQaWWzaL3Zm6Q5y3c9Zz0HxOXHfKzFDIkbLr\r\nZjePB0kTc+1aaFYYREdXnrxwYrYPkVmOq91bLJaf5sG1PmH5dCgQRESwsofI\r\nsn+0lMpRFc1LhjQXrSYkzJhxq3BoYnFuVf26bHo2YyG8B3nPLin79wCgY5VI\r\nckORvhsnJ3Vx2gPOnMYUuHN5JqK6rjxdyLFQ4yxeytJAgVtSzuf2/gjahWw+\r\n49lJN9+tUkQTHXWz9lStPx3kJcBgajFkPeAPWtweianxmwqCCHuLsWW67JYg\r\n+Po1FFTTBH1twcSs3yP+uskfloRPYL6eGmqp6tBNkeX4NITFfTtc+R5S43c/\r\nMZObOTObVsO6+Qyg4SQa2vYj37mzlik7kVU=\r\n=Xo9R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"369cc72c3ba34c1d56024d9413c0b01576b94253","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-09T22:53:10.685Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.7","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.15-renovate-typedoc-0-x-369cc72c3ba34c1d56024d9413c0b01576b94253_1657407356137_0.711091823004973","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"11.0.15":{"name":"@balena/jellyfish-client-sdk","version":"11.0.15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@11.0.15","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"715c448417900a2b0ffbfb4e5f0c2ee975ca49af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-11.0.15.tgz","fileCount":34,"integrity":"sha512-x6UA9SOWY5qoGONhEj4Lbw+VXhsNV10nNe3FGP1xoMSxXWHpdno6j4/q0IOy15++h+Cbp+xp7JjjoXJjxcYiiQ==","signatures":[{"sig":"MEQCIBlDxJB6x0Mg0ewb+cfbCWp9wCmt2SbphVgz+LIZUoTWAiB8p81Tj0RiHvifVAU7gmd81z0t7ENqxNlMHysbNTrRYA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":297457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiygiFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgmBAAneCmdZJMmu+qz0FKjNwH+lW+6xrFUzd/aEkeSdTWXrOkTdCD\r\niYNDMEhy+LHIqLD1gatDuVnQ2MSJMxl0ITMBFT8mrQcX88nkG+36l6vGrF1M\r\nBFNqC/1tB+848lHbO/nUxbL1+Yo5LSiRZ0gaew3KvQFlsAy/Qo0DtfiATllF\r\nRE14z8lJ60hKbNdu5idX46uLRlsK6anw5X7BQmmWsH5sPkFH2/cshJGRt1hG\r\nt532tJULKJT7aaEtraygL3nDVU4xYr7WSNTTMUH84ycQ8vxIfy6Smc6eobme\r\nVtxLd5dTmdz2Gn8dxFKBTS9TdLfICQotaSMc+zRZaRpmZn2qKCegmP61ToNz\r\nevED4rt9MJ5aA8X/a0XGL6bH3qq4O4TpI5bb9QclAd7JoiHAchIwPsYw0LH8\r\nwzp+kplwLOCorZJXpJGJq2KPYr28IP4TXH3qISVabsotnBodIIauiz1LRDhy\r\n0lulMBQWuUYqnKhmdByiGG2mDa5KgKH3+QqwEsi9fzh4mwTiQTtiDNFaDK5W\r\nQwkaOHizN9515UawxOLNK91FVIlt79RhHLBOwebrxXK3KMpjGOV389UX1ksZ\r\nAwO0397/Ws5sBHjbZ5LXHYOhJ52XVtJFqAS1t6U8GI1XwI7jttjK8DYpF3RP\r\nB51cuTi3OWD//VsC9FFIxF+3Z5yEzTUs/lY=\r\n=dyi5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"66dd354e6ff32d2fa65549cb31d16c202998fdff","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-09T22:57:46.759Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.7","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_11.0.15_1657407621199_0.25053757234911966","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0-joshbwlng-drop-link-constraints-20b7c08457607863f5c3daad5f3a5ee8b38946cf":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0-joshbwlng-drop-link-constraints-20b7c08457607863f5c3daad5f3a5ee8b38946cf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0-joshbwlng-drop-link-constraints-20b7c08457607863f5c3daad5f3a5ee8b38946cf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9e57ff166e88f230c9689039de50ed88a774904f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0-joshbwlng-drop-link-constraints-20b7c08457607863f5c3daad5f3a5ee8b38946cf.tgz","fileCount":31,"integrity":"sha512-alnfT1OhzkueNo7d9YKe0ZH3FWcKcdaZEeUCZrnW6VXbMSiQp5gOcsRyvvb9bkSjoM7bJ50QJBhK1jT3NIt41Q==","signatures":[{"sig":"MEQCIGmkuEpoQSpA/4rXMIXUvlU1WjWDPNiICL/W/1JCk06VAiAELMfrzgiGlEYChZK/efTwu9a3WBrpHS+j6VBmP53kfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":212933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiy5uzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpi5w/8DnqRhq6t37BNLx9LoTe5OVJPIh74zaBcpK46gejmOWtT10vV\r\nWIAd9oUUbcem/+mAXj/wkE7UGgX+ihny+tNBVexCeJZf/tjbgf8f3MaBFOf6\r\n3h2vKE8gbJqEhzkm6VlG6sBWR9QXnEd/E3Bv+6w+hMXoH/yQiGUVnsFxQk7r\r\neZcJ98fzVypadh94eAMZkGUA8EbsQMugxTkT+NzAafirvEYrqYMXpwGhfM20\r\n429CDM3DrwiUh9GPhwvRLwrR/LlYN1xGE/UxDWWxGKFcZFG8+OPYj6YMKYaN\r\nD4NGSrCEzURveBuyxxgsZ2YJAvh13RP/qOrkKaZRmXB+KpD8OCUnDvH8Mr66\r\niIbmEUkgSu722f8YrscB31wTXcpESgSsibcegE3mQsRXOOgN4/FfSlo4SEJ0\r\nMC/SAhDrUB6cg0eODm9sLgHOeHhy86J929tfFLep5x8tfNefgNMWACJ3TAZr\r\nwE5erEUc+EloNqBNNeFV0OCEBdN0IcJ3RHpCMnPSXuPqM0AMAR0gkraAGP7X\r\nUltJB5v9YKKyBqOjR3n07WhccPYzcqlomkxS87rF/t6o1ku9nTPESqvjevKw\r\n3Ms1Wvo4rByR/AlGaQJDWrKksjxoElUeD4z5XDdOVazzQ8ySYhxjEJTrH01s\r\nhSBuayCyCF30/0tAipfvno/rjwEbHFACub4=\r\n=uQbr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"20b7c08457607863f5c3daad5f3a5ee8b38946cf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-11T03:36:45.763Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.7","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0-joshbwlng-drop-link-constraints-20b7c08457607863f5c3daad5f3a5ee8b38946cf_1657510835190_0.25966238982959244","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.0":{"name":"@balena/jellyfish-client-sdk","version":"12.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5e72083437f137e0990585cdd651bcf363de3d7c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.0.tgz","fileCount":31,"integrity":"sha512-XULWOx277g5uo0742NfFX/k+KAh6nv+13+doNl8vvVJyYmA1KWRCmH0cUjVoXtBl5B7jedtAP2qfjN0Fy23ZGg==","signatures":[{"sig":"MEUCIA8Qf1lBST2zxDFoRjLqo4zr8+u24tWmpqXu2mUi9urYAiEAwo1QO7vsZ1k3McWGiZ3dSq/gW4ia6dHuI+jtkaxR6Z0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":212860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiziY/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmre5A//ZbCIDaw3r0mP/7X9RHZYSXjPFFLPkCg4FS3+rtar617NR82A\r\njPjHPnoxVtO95ARlwvcvZGAAb+7W0ggRqJyGUnwQkVDGlvA4xeec6T4p2VQX\r\nyVBL7/z8L4HawnB1bPEdnTDYhL40krIJCUwPUrg+ZxEHKO+l0zg9t95FlFyx\r\najSkGz2cauNOpKfZJ4yi4WDMw7YzrxjnF23H46ECL+e+rd1Q9x8aLROVhUrN\r\nI8b0EzOrZDha0KGAiP3TuQaWtiH+fE7z2OC0lG8RoQ7P4WFfdy6S6wxQBDEK\r\nqBE/9Aq9og2g0WfFIFS7v65ZRxJIUGZ6y18L/xOLKQm00Ihq+IJw3/G8e8I9\r\nTncDtzM8ovSBaoM4gNpKoo6o4LKKNvaGkgxm0i+RnDy7aTVqObx66Si3/3El\r\nm5f4UiActfvGysuoN4peDOf7tC+GgCYLjKcVGc0lBmvRQQNVeCb5Y+slNb5T\r\ncZUUu2J6qg3CNsMlMvX+fnJmwCMYKqIVICM1J9ayjftBG/HoimeK9RpgPAUN\r\nvS4KfFNmOUnJ4Nqs4p8qIEBiBpvUt0pHucn9BZphrKLbhL1SRcAeE4ILXxf0\r\ntZstLIUuJYAFjc3d6CRe/+SDOdeseOgiYCMlSGWAZ08dA2Xkwc2gJAI5gvIN\r\nky6/8BhGPUm0TV1t8zzv3baE4aqlDd26nmQ=\r\n=rpfC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ae42241f5c2bb1c50c66b34574c97375b6f06ef8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-13T01:54:16.090Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.7","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.0_1657677375406_0.18668470457203967","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.1-renovate-typedoc-0-x-1c0e2584b332af4307f1e63e772f4a12cdfb96d2":{"name":"@balena/jellyfish-client-sdk","version":"12.0.1-renovate-typedoc-0-x-1c0e2584b332af4307f1e63e772f4a12cdfb96d2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.1-renovate-typedoc-0-x-1c0e2584b332af4307f1e63e772f4a12cdfb96d2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"755d619ffa42097e387bdbe75aa263cfd784255b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.1-renovate-typedoc-0-x-1c0e2584b332af4307f1e63e772f4a12cdfb96d2.tgz","fileCount":31,"integrity":"sha512-M6i2wrBvfV/ihHfW46Qf6s42byitefYQaW4YRXFo5kEaG/aq/WKeWLjQWH/OneVSpzUtLiKdolLtf/H1Y0v2LQ==","signatures":[{"sig":"MEUCIQC6ZWw+hT4qqwNRilQxzvue8FAjxjSs9OG0U2xe/aoBRwIgCMfmXv6+MFhhh7frmVtgQo+/3gRA7DaH3K71eq41/8Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1KIdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSSRAAmyYB2HOsFCk0pKWVlOP2W9eEtVnfUxNIP713f9ZJjb0cFYqm\r\nXEgpmhDzTCUHkrK3JAFobNygRYT4rduB4rmY31cnhjTtk1tDfP5v4Hai8h3M\r\n5RD/HKkl9yIybmIwraVvMVA110B1kgujsBMx9/m+dKk9Spx9aqeSo/0FnvZl\r\nbZsBxbJYhtxi6TY3kGTDL0O16iqF76Hyu1rp4vbSzRvjHjV5+OhQWuI3UFMb\r\nJMBOyw2e1GjyjNc3lTn74u2QEo9LARgxDo0XcZjx2lTdLKFnkvubQD0FCrHl\r\nY+DYo0jw4ajjcfbvR2mdBWS4k/dp6vYZFGy/eNw4JHpB9iNG5Y/Vjk2OFLQv\r\nqbHQlsVT+o7TQKtT+k3ZfhdYyQg2mXpf43ifo+ir+R1xS+oiOvE6q0ocseKD\r\nOalUsfm+EpGxtNJ6BJr+dWPmt+wQ+fFuMdJyPrhVSMtgg/QaJ2GgyWHkcRCl\r\npH7+p9z/VekaPIFk4xKe7WYhdfs8bWy4FXXw22fjd3TKNkdCUlczRHvJdkiD\r\nHfSK12jijFsc6Uerz1yeF+m2eeQX+/IWPgMCLk3w6ya9KblJa/248dkk9mpC\r\nuJJLr2dJsHfUIXpybw89G8sZAqzbUqzFjdnDOQsFlntzCZ0Iyp4PZq/9E+H/\r\nsFkmHCeupJO1BfEMcjMO1iYss2siihwQ9iA=\r\n=NWc2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1c0e2584b332af4307f1e63e772f4a12cdfb96d2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-17T23:55:10.432Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.1-renovate-typedoc-0-x-1c0e2584b332af4307f1e63e772f4a12cdfb96d2_1658102300915_0.9674043754625505","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.1":{"name":"@balena/jellyfish-client-sdk","version":"12.0.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c80efec5b56eae435529e60cc97afb29ded1ec13","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.1.tgz","fileCount":31,"integrity":"sha512-TAXoN3DmIWKE5AWglpRZoq2rZFHpP6EZhKpLgmea8rsY1b7HhD3M1G307FBo6D9eCQNVpN0v2SvQDgvQmrFDXQ==","signatures":[{"sig":"MEUCIQC6a2JclMpTVF5NlrzRUClGEjjSplEgc2nXGgALcyOSNgIgFiJ1tVpt0X2iZtEMh5uEWwxV3w8HEb4q51jjbcXkkQg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":212940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1KMKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoq2w/+IPrE/TElUydofWKNwkrAKvmzzUt3ND+WUHkQzM75ZrxwHgPR\r\ndPjC8pzHMZ2x0t6XmU51Rv1FPeM0g99Mi0x8oV+N4b6p0QVwuCKg0EaSf6n2\r\nOOmZ7OqikAH0frJvb49COxQOKo2zDKMhNeiCRHzemrhvfviYRCZ3OpGeosQy\r\nAHJc0LrMenJqP7yEVwor9088DcD5dmdTIFAozImmcPLnPCJ8oju58b7f035C\r\nHzgaV5VZRbr6CsROp8JHvYCDOJhGNjIWrfUk8dsxCRBZdzB/ymJQ2T70H2Ho\r\nCJs5I8T5xo8wd/7sthYRFKcXFRIWjstrmY6gjP/DSMy/hXGub2y90WONTlQ5\r\nQwin8SnNWj+Y7+zAGR1MW1r0GZ3yMJri0QgmjGnszLllJiGjUkIJEsG3quTl\r\nlVkxwRG0q7kCKr0S84UbD1mWTz9H+xJZUnIDC+tl2tacbcuR2H6nAWbTZ6hu\r\nuXeexTBedNBf692o6w5xGuqy15cgHv3QGJaPUP2df5RSvgDomc29RzFY4KIE\r\nwY35yWBVRIHKcHFpWWP9e0yMYm9yWOzsZCVl4Nv39oIAfLZ1qmow6m4InG9I\r\nRoFEJaoS9rhTXgXLT5bjTi49CjRUzRUjk/zNuAxsGqTe61nyi2496iCx81pB\r\n+kyJyAAGZMvj39srkGpx15EK/QV7XwSfB6g=\r\n=T6jv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c69e694223c3c991eeb193f8ab0a0ce9c0a98a58","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-18T00:00:19.185Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^20.3.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.1_1658102537937_0.7905703034528619","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"12.0.2-renovate-autumndb-21-x-0cc634f4b3be0e6e6f0eb9da2e9bc0eb3577c6bb":{"name":"@balena/jellyfish-client-sdk","version":"12.0.2-renovate-autumndb-21-x-0cc634f4b3be0e6e6f0eb9da2e9bc0eb3577c6bb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@12.0.2-renovate-autumndb-21-x-0cc634f4b3be0e6e6f0eb9da2e9bc0eb3577c6bb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d3b402e34cae452f172353b5bc60a006821982a3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-12.0.2-renovate-autumndb-21-x-0cc634f4b3be0e6e6f0eb9da2e9bc0eb3577c6bb.tgz","fileCount":31,"integrity":"sha512-PCJ4ZQoE0zMFmNASeTrORVsuMFJk0viB6iDzEn05BfJhx1DNT7VGTZsA9kEHYgpEkWagT9b5qxVC3NJgqGRVog==","signatures":[{"sig":"MEUCIQCTVsFXublTyJ3HSz2kerzKIo5BSdjoewL7PP54ZQQ0qQIgOtc8ESmxGWcOmdJc3MAv7HaKfqf8IvJuiepKvsW9Ln4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1puuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7Cw/+NDCwZqoG1NNhePPotHBV1/JMFl8fkiqDty/vDdpYdO5SLxK5\r\nn3+VyEBj7A4z0NiJ/WO+xcGNTab82PSX92sA1BTrZBvW3kPkraCk7rJy1EqS\r\nbNQQvMlONfLajQ2IU7BYBCn6yb0uOvhnlhSLPRxv2GuPFDPCYDH7+vASWnBP\r\nf1x1jzJOrgXHrFer0eO/u4i3N7egIvD0sVUj8574/Rk3vOzeSo4zfjpZIxa4\r\n3BmqoNPorNG2E6Pr90GP46V5HUuePzJ60zgETypMh5qtUqyIxyj5z4p5iDUY\r\nf2qaaV4yQu7XU5eU7tirB2NoPqm260wBrH3dOQgvCxp96AsCBkqf8Myty8wZ\r\nu6VN7RKiyvstH6ZQZ8AduW58LK5eiaRFz9lSxZJ/6XJtyPjJHHbAE8w7UaUH\r\nifn8ruXY/8ouZ62uE0SIDGNvVT8DOriMobJofZyhp2JIuuXqQm5RhS5o3goF\r\navb3vzjSmAsLHt8T3/ohAjTOYWoIQ39jjVGGxev9LewJCw6oonuzyvJI8Ip2\r\ngkXVBCTl7otkt/KMXK+8pXBMEyBhtvrbonjUfi0BG+SArKkxZpP+8vHGnAfy\r\nC1oN/j4arVrU+Eso3NxKIqpz1kGpcXCuVhvfrD2I4qKBjbnzYiKunYD5l3PQ\r\nH116t9785rdfy0NotPDEFUmgfFCY6AxLbv8=\r\n=ukyd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0cc634f4b3be0e6e6f0eb9da2e9bc0eb3577c6bb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-19T11:52:49.621Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^21.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_12.0.2-renovate-autumndb-21-x-0cc634f4b3be0e6e6f0eb9da2e9bc0eb3577c6bb_1658231726195_0.5138597564023517","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.0-lucianbuzzo-upgrade-autumndb-23-x-431c340211a9d4244210702024d7936db657add7":{"name":"@balena/jellyfish-client-sdk","version":"13.0.0-lucianbuzzo-upgrade-autumndb-23-x-431c340211a9d4244210702024d7936db657add7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.0-lucianbuzzo-upgrade-autumndb-23-x-431c340211a9d4244210702024d7936db657add7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0f31b993d6918bfe0de2500f1c9076f6f2b803e7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.0-lucianbuzzo-upgrade-autumndb-23-x-431c340211a9d4244210702024d7936db657add7.tgz","fileCount":31,"integrity":"sha512-e/I56Ta92/hSSvG9br+kXtsKWunUS2CHZVpSf2bH7HIz9Z3DLPwTblEZt6zvn9TKgvYKP83pavJJu2cKRGKvIw==","signatures":[{"sig":"MEUCIFk6T/HLPRUcT0UIxFJ7DzXjeQjkNWvZzA/ZH2OPMIJWAiEAhI3CSpFil6gZNW0/rqjk9SEBT2ggyWTXfmoCsNidyLY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1u3UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjjA/7BtobKRtNEytmJUv+4IujV7hQG0kwJ7S69PwvE6Q367YkNXuE\r\n85sLXroy1cA1I+LCkVmPvUSuYpbtWD+GH8hgm8JJy9koFULVyVmW7Ua3aa3T\r\nhCKTaWrOkXjulpOrkqLvjv6PbH++ZS2Oq+5A+TZYDazuBSfrvNDG/RhSWr8C\r\n9+3lqrUl6pQU45PW8Q/Nh/WTziAIDgzxWYp1SDspJhTEMWGTDzEkBZfx+IK+\r\nepjrno0kevdPV5e26Syc2Vawb2pH6SDSMc/Wz85qr1k1x1U8A2R7n7mfK6Ym\r\nsvbaaIxElm/SREWutT1YwYKy2AHg47lNiti9Pbo40/0ZVeY8F+YEOP1k5x92\r\nDDT2PbNk+tTY3D/BOnT2mTW9X7nV/xO172OBazRi1nmEMWSNKG9hTYcUrZzK\r\n6EpF48xUDMcuv5yNqk1V18DT9V8MNid6iHr6UT5e8bZBSJbhhuys9wVT4Iaq\r\npe75ZmpubMgtb+E8drevIEk34AxgaBFath6Nm4LuUUoASXZmFhfrg7SjGoTk\r\nd+rK78AVM3oapQr1E3m7shLz3zExFCR3DFC/KrplzIS7EErn12c1nefB+7tT\r\nGt9z+BBzPpqYiWT2eEWDNel48LCU5sQcuf3nNSwAZk2yD6wEWdXEfCt5YWd8\r\n8eMf+7iyqj3Ct/26UFg2RwTkZtZL2Kzt+4M=\r\n=6coH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"431c340211a9d4244210702024d7936db657add7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-19T17:41:23.330Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^21.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.0-lucianbuzzo-upgrade-autumndb-23-x-431c340211a9d4244210702024d7936db657add7_1658252755719_0.6460876141921039","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.0":{"name":"@balena/jellyfish-client-sdk","version":"13.0.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"49cee01490c47e41bf2726ef876d6b065614b91f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.0.tgz","fileCount":31,"integrity":"sha512-Y0a8mCTxR7PW0Lfop1StkpRr8SPogPeEPaEQOgDv9VyICIGiZQz6j5zig9KIkMIIsZFizeS2t+djmLwezz3KWg==","signatures":[{"sig":"MEQCICh8iASmpA9W1zPtcHhPbpWy5lBk8eKPA5F4u2djFMQaAiBlOUWFP9x/fmMMTQChtrUfEa5esv8b8jfkrJ1fbvadxg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213008,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi18oJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQDA/8CPEgEDsR9YlbEHDuANGIugRJGOI/Ixd8FeD3Glc8bN6KlxIX\r\nUxZzEupbIgmnyrLIbrdhWH5x43QUCiaEefRgxcZ1QgK2AgNZgSxcTqiru4Tl\r\nW/bY0c5GcfPV8/aCjoEDKLVtSXqsYMC7UmVjVQXKgjKdp4dGhiMt/tdqG2uy\r\nT41VYr7AigAeycBSgLDehYBW83ykBNdPHS0LnWDXP36jdNe7WA/DEEvf3EXD\r\nYRyYuX1ef6cwUmlQUGz57SM/vc1JNtoghVTsNy20dYCMNeFhlGwpzGZ5YH1+\r\nRGPbVb7vQm47MyZKFuW6exPq05SdIj9BETmCzLKXJ3g/UpBabDaVbIKcghE0\r\n3ocEk3tLhzWk0rk8R8doF8DJZEdIbAT2lSC713utcuCjbvCdwoiW/H50i0OP\r\nCTTGBQUHSywqDk7br4kBDLGEX4eZP3Xr2PN5eCqdk8bjLjccoSo3FKNAtnwV\r\ngff6osn8w6M16W5WMBcJLrPjqzyGjx3cp6QydaMLOLnRSziauOO19Lgc5GBL\r\n3TEEMlUYPRic9PAffhY5cgXqpVSFh64tFEGF+L8g4Px9R/GjAvHRFPDkjIA/\r\nKwR6V7z4lFYwaoOo7wEKXqfmwea/PTCYbE/yfODeElHUxi8rl6JYRCAOTXLx\r\noBwZnWbJ4hFZdPDakv55G9Lhy4KI9J0l97Y=\r\n=JE5J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dc9ff1831b0dd5d2a616029a2a7b33817d9394c9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-20T09:23:34.436Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^21.0.0","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.0_1658309129385_0.2844008410935246","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.1-renovate-autumndb-21-x-bdf1c189bcf7936c98cfbc2a63405cf63d1613cb":{"name":"@balena/jellyfish-client-sdk","version":"13.0.1-renovate-autumndb-21-x-bdf1c189bcf7936c98cfbc2a63405cf63d1613cb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.1-renovate-autumndb-21-x-bdf1c189bcf7936c98cfbc2a63405cf63d1613cb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"895084bb37a4d9c2dbbd5c661ec8da8a0bcd3b7f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.1-renovate-autumndb-21-x-bdf1c189bcf7936c98cfbc2a63405cf63d1613cb.tgz","fileCount":31,"integrity":"sha512-BKq6mXZgQe9Ox3w1+GVpaNQsJaKUcBjmplAtI6Pk+YiEDLuRgvEuMI1DBdIzRR+vDXS1LaZ9Y/3K5b40tLAETw==","signatures":[{"sig":"MEQCIEFn3ZSjMgr3Qv5sGPDgzKnEB9MEq3pXxRshDmw1ModQAiBNPxzZDpGyKSCr2lCljbACjGtXoo+X40c38ih5DgNeHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2H/TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoW5RAAgurr/S9LSRPNPEY2nOq6IhPDv7vNES7mzUrtp2m1zlcGZCY1\r\n55K0BbVOmMMflX3ksFGj4Dyy3N7GXyT0XyNxKzcxYObl5Oq2DMhxfolrEbYN\r\nelZmZXw49rZre66/dJp/hXKbdoFjd2jutIvw7KX3TbI3+ONEetZxUzVkttAV\r\nnib3wFbpHtPj2HuDl4QLaPPuWrzGC5TUFJYu59IgFIQsrmuLfb0lkkk23vOK\r\nx8MjX3vgrJXDcz5aWDHVflBswwgJG1zOVaRzm9K5EuFctMPBO0dBaU2/gyVY\r\nPSnDre7HPqDs3WkZzkc4KR//2Pa/oJsJTDxHYjklpPYs/WU8sg6jcilBbTV5\r\ncVHJxKZwqNIHMVU2LCthHIONgFIpSBl65hvnKiTi5fyGL1gRzJjNt55QSu47\r\n+kQ7u5O19l8SONUgsn/N+nuRTjWHbbKolvkSNeLTq/qU0UtiS0hdYRhp3FYf\r\nugZ9l/gK158xi+U4JO1UWHezX3CkL8fR5scPDB5Gnf8E7M3cP8RcHAJKFwy5\r\nTHaYeGc3SdcuSn7e5iSymIzrkT3ZVpDLQFchSu4ve1AC+HfWGzLmWCIGYOi7\r\nN2Ts3prMdmiu1/doDDsmMYEz9e6F7aop8YOw0tdfZCN92P6FEEmK8JRCyy50\r\nFKk+xg2rpdA0OmhW4rb2IARiWo79QumUqJQ=\r\n=nobu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bdf1c189bcf7936c98cfbc2a63405cf63d1613cb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-20T22:17:25.024Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^21.1.1","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.1-renovate-autumndb-21-x-bdf1c189bcf7936c98cfbc2a63405cf63d1613cb_1658355667212_0.899599750778983","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.1-renovate-autumndb-21-x-de9322e89f2d2d90ed4e8b07f8369e00af01cb43":{"name":"@balena/jellyfish-client-sdk","version":"13.0.1-renovate-autumndb-21-x-de9322e89f2d2d90ed4e8b07f8369e00af01cb43","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.1-renovate-autumndb-21-x-de9322e89f2d2d90ed4e8b07f8369e00af01cb43","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ae39613f1d8b8802d77a0c646f9dc90b138dcaa9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.1-renovate-autumndb-21-x-de9322e89f2d2d90ed4e8b07f8369e00af01cb43.tgz","fileCount":31,"integrity":"sha512-22KEQim0oKQVCZgOEVuA0enTqVyR/DsWjdPxnkrebDvVe9ivSrG2/zMAbhpNqtFrks6Oicsr9A0emcFhXwLUfw==","signatures":[{"sig":"MEUCIQDUJK9y17MKL5bjYPWE6GLM2jJxU2dwA7q+hpjJPmOs3wIgWWKOU4UcGNyunSu8glayHhxIdaw4uEFQLkOiopPW6R8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2VGlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZ+A/+LRjw/FWD/KZ+n4vawXJvYwnDurqIT7Oo8GzcSzuTa7Cdw5YD\r\n7ouV1Kt5zvAMViVVR7yffaSzNCKvZeTiR7WyplfexCkHG9gDnHWdqa0+oiKw\r\nG8e+LLsWiFZu/E4bTMoPF+UvsWr7xfzsBXdQkDC8N1+EErpiQJ1BJTA9j6+c\r\nsPBSJ2GHkUF9ZEjNl7YbNb8MH8qZiU0C/lQhz0V7C0S61APjmxrCdIkdTLsQ\r\n+she9GvbmXqTw98iUyJW2yQiZb68u+tz5Y0zd1abL2Xa+CmEe0C0hgjOoP1Z\r\nqLKWTABSKfBvT3TqNvhUOMcIQR4+wJ1okN4/qMkg4T/bAkhmevY6urWOzXT4\r\ngm8RjWzYnXkBf9k/6TG+QH3kc/Bua+BPSum0u21kkaSqCAnhEq8qGjuxKN8b\r\nPP6wQBH0KidhVjoIk958KpWPTuTp6JKVNtgTYzi6/YsjA7qedTZrFB7JubGu\r\n7Fbr7r3Tdb+ljJKtMAqixzqL4gDq3p4UK+D4jldmS3JLCdYBpsB4l5ajumnQ\r\nGN4p5rv1Fug7Amp7AEFmaih2C987mjZZzSqvdukt+ixUWDgYfOoRh+8LBfTo\r\nekk7pAkcyNrIn4ep//u6WFjgDn78b01QPioVC+3aKjD29pesyaKKBi+lzJT3\r\nQlZiGvfSW5A1NJmfP/EWu28fahNidPGqXnI=\r\n=pyKl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"de9322e89f2d2d90ed4e8b07f8369e00af01cb43","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-21T13:12:25.394Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^21.1.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.1-renovate-autumndb-21-x-de9322e89f2d2d90ed4e8b07f8369e00af01cb43_1658409381146_0.7857722553269075","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.1-renovate-autumndb-21-x-385e6d32f1430ceb1de9b310fd615dcc0e9248ef":{"name":"@balena/jellyfish-client-sdk","version":"13.0.1-renovate-autumndb-21-x-385e6d32f1430ceb1de9b310fd615dcc0e9248ef","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.1-renovate-autumndb-21-x-385e6d32f1430ceb1de9b310fd615dcc0e9248ef","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d854617abac7fc9f9b2caefe1e1e176cd31bed67","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.1-renovate-autumndb-21-x-385e6d32f1430ceb1de9b310fd615dcc0e9248ef.tgz","fileCount":31,"integrity":"sha512-kAGBVKPwjA+uOb89uwAwRpAI1aODu7kEyz4b4Pren8zn7fxRRqj1svMqtGWiE9UbwqYAuwEPoc6DZj4MmCUUrw==","signatures":[{"sig":"MEQCIGI8le4frNZQTGfBtI3unrduiK7/H34OzN/eqArBYeLxAiAmpbPFdJWKEfxwoNIq24Mcovt9VIAlLbZSIttw+oLK1w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2Yy7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSxw/+JTtMKJCvjIxZnnd6hqcRIWi/a163sFvZktytM/vR05T8HkrB\r\nmeXcW+OjVwA9ot/M+8f37sqZTEgWHrBHr6ZL1+tcRPF6hKCbs/WnOq5Wh8h9\r\nh9mZ8yWVsUsisVBBpj+YZ/715p5is6KqJU14MZIIrHziQCwKlgEWYDQpTDTW\r\nPv0s8VDDC29Xnsc8hOE87VdNKQ3HxNayt1ClV+X7NfPYlPsSuoFzMfpbPC9E\r\nehptTVzs+oABORCPIjsVCXi5ASrTp2DRSHBwIZ4QV6qs23iL6arnDeKpf4xR\r\nMxP6YYEGqBlzYrtFJ0xNh3U3EM9c5zu24midF0hftkWnULgbOrRuMdphqbTW\r\no8lzdefy+DXiqaCPl/9XVKZ56sXeNIAyuToNKNFeKiefyq0MPquVED0XvSPX\r\n2joaXwli/r0zI+2VJ9p4TJHi5o/gyu/Kq52Ty6JLUV1SiSiKcoG4JMCUWeJq\r\nwNahto2Y1BwqFMeXWwAyhk0RcgOTD4t5UwZfaKlKDaoRZ9Bjgqf+lQPVDaLX\r\ngTab1qg/vm7127MLKKXBn7KwVTyd6EhR/lmJNPke9ZWqnPojHUZnDhau5Tw5\r\nngjQF5SBwVgkx5aY9KmXoaVm+qEM/44goYKYGGwST7y8o9X8EaCYV7vd+CRd\r\n5B9ShvRW/IybKNczFls3v+l7e5UzXU6GcPk=\r\n=N2oS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"385e6d32f1430ceb1de9b310fd615dcc0e9248ef","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-21T17:22:46.935Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^21.1.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.1-renovate-autumndb-21-x-385e6d32f1430ceb1de9b310fd615dcc0e9248ef_1658424506860_0.5976526313448234","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"625a53356b539bd6ff7499bbc97550bd56984574","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.1.tgz","fileCount":31,"integrity":"sha512-CNqaKGL/4Dac2kCiN3IaqDKDyAE79ZQE470E/zmbcsEtH4tcfR/k7HXAph7VBeFNhvlGyk+Ops/ytapI1J5X1g==","signatures":[{"sig":"MEYCIQDqfH4cL0kAAsZeNClru3qgtgJlxWk4kS2crpuouHZoswIhAPOiT2yCYr8xx2RwRe/uVSNfUZEIcwptoO8bUE/VCiuK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3LGMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1Xg//ZyFwyKng7FlKZ9wyyYz+T7+SKvb+jnGqUuiFuZiBG8QA1P4O\r\nNko+FT3rm7RXmeDR5zy4YMtag9a3aG8dgr+0bYUefv6/EyyhlHRWobmEO8yF\r\n37tov4UFj6XiBE3vS+2p5pkHQ/fFi6op3XndwIrhf3O4fpiobexYB1QoNCQQ\r\nsajwG7UdRIyaypDlJslBAKHYQgKaVeWKwUuvlXT7/4RGG2z6V0jBJ3RSPRiD\r\nhbEHKjFAoLEHdjY1PYsemKWkGIT/vCHxInm6QH5dYbjgTE0BvSuCPM18Ym68\r\nsFjg9OihH9PQJ7QSnMGtIPcUdLD6pSfDAo+xXPeDRnvSPyDAOsBMFrHDgvR6\r\n0U5dkjq1wpD+J2WXPBMoI4+Ao3rA6mcAxFm6EQU0OdRJIJN9fy/P7aPeHqZl\r\nISMKnTjKrg8DUcZj+8QYN6HY6t1fe1InJXt6G4gbZdcx4bbhmYNtALQcKFn7\r\nu3z03gcz0ZgHGT4nt3bU+Be3qyNaqFgpKFiPWLPaNbCaTnCqf239xQ3TZ8XL\r\nOYu+EHJBPkGgU5y9LGVa7Ao0a4nS76xXlzcEUOCQrglhtHUEhsD1dVb9ZRWh\r\n/h0RdEuh2jUHWJSKGLBcLWd4k6SC5LcvMZtfzP0aSp/ma686L9xAzP1m/RaJ\r\nveidn7kEtaH6/mFZJa1IrWA0eptVD8UEdnE=\r\n=707L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9f1efef2a3a478be12c668d1db6d79720408ac0f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-24T02:39:55.618Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","autumndb":"^21.1.3","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.1_1658630540198_0.9445974863298754","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.2-joshbwlng-move-autumndb-d71b9d6acfe0d0c165345c03fe016d0d138653de":{"name":"@balena/jellyfish-client-sdk","version":"13.0.2-joshbwlng-move-autumndb-d71b9d6acfe0d0c165345c03fe016d0d138653de","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.2-joshbwlng-move-autumndb-d71b9d6acfe0d0c165345c03fe016d0d138653de","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"967751f9127b7393010628a1126c50b17f28312b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.2-joshbwlng-move-autumndb-d71b9d6acfe0d0c165345c03fe016d0d138653de.tgz","fileCount":31,"integrity":"sha512-FoEWG0LeNDVQ5fJHbDHXAYfMhRdAVN8KXputDD0UhiPNtPkjeb7V3L9f3SvYP8P2E2coIdQhZKuqSztdtmzxtg==","signatures":[{"sig":"MEYCIQC4XB3fGyP4UzQdT0vwnWPvVK05SORVvS1oN1RSeOWoSwIhAKrXHC3TUaOA6fFxVaM9p+IJ9U+ihrA8vjaDhsBfpsVe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3LOfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDbg/5ADDVNmEQxUEQrBFIFJxZ0uVs/qhvyDMYHZJ0UFPCDfgjXL2E\r\nycPyczEAbz5FQgWwpEcVkNc+gnATL9G5wCvj9E5oYGpa8PPhQM3AdxfwRCZm\r\nAtf8E5lA1qP3WvWea766TCqjYm4eH9BO7DN1Rh8DAFybKM5/9on9gJzmRqvX\r\nM/SFdBtN6/6Y/aDXWung+qgd1ZP+AHEPHGJrQuN0HFyT/Zr9R3ay8dkl8rqj\r\n4py3jbiXSf5sIReCO9voM+Z3PMuJCaxbVCbEaCBBNFAinB8p75SsUulpl9ux\r\n5+p09IhixVXLREjBLQTK1zRKF0GRTs5A9B2Rr1LrrHOfrWGDZRjvsHCTMl5S\r\niRML8p5vEFmG9D60QOgXrulxa4btRzL3dr62ZAqmVKeVjbySOrnjFbY2Z7ar\r\nbvwvNuLEem4k4Q1Jw+BaJbfJ2rjSziQQGeJqcuifG111agvY98+v+iHSfcj/\r\nci0lSAOX05YcqwCpiAXZCiKJjdyCnB/izIWXD/ZYfmbYdMbi4qt+xJFBA/CJ\r\nlBUeWkphhI3WNav5Vuf5lNIFXKdRrU2ZOzeEgfz1004d1y5WYvKWYPN2RF15\r\nlu1hMGZx4l/jsezJjguu8kfHFU/VLgWpHyTJJCaqML4I6rOJJr+87uh4D098\r\nS/UYNFa/dcnKkBZ/8MOu1ac6kizVa+1DFb4=\r\n=i8V0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d71b9d6acfe0d0c165345c03fe016d0d138653de","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-24T02:48:02.224Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","autumndb":"^21.1.4","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.2-joshbwlng-move-autumndb-d71b9d6acfe0d0c165345c03fe016d0d138653de_1658631071444_0.4983859985527139","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.2":{"name":"@balena/jellyfish-client-sdk","version":"13.0.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5de9c63c6dc02b6b163251d4e67a88775bd5ed3d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.2.tgz","fileCount":31,"integrity":"sha512-l6LeGbUFauMOLek2GRJCv9VQAF5eK6e8D6ndbyJuMm1IWiOkx5hpDPJxSaOdMFi3eOyilAsf0b/ddHwRorjVAg==","signatures":[{"sig":"MEUCIQDy8RMRgQJfYfUPMoUgHX/50nAvQVdRR4XbNP52DzhWFwIgBar5p9GkDM/xz9nMW8GqAtA0H7rf5GNfR3mRMmMZ/HI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3LSRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqX4g/+LUJmr6F0M/gyCkcWhkzF/3FOMlW+iwHQxmsvqk1Q58CED+Kn\r\nM+YfR7/G3jrkcAwK6vHCN4bRye/2Kh/p5RGLs0wN9Qcb6zv9dkzbv2/iHb7C\r\nV3bY2h7WkDNC+Ni9K8PQdHfKwGrWXwiAMq63AzZO1G8NLeS7uKodn9i/j75x\r\nFA2cqpXT8AsLcXG0lfy9bh2s7cbLCUAheeB6Qp7ByEGJmhCLXXh0frwLDm/x\r\nI5H6JJvcxyy8AU4VugOu4fpWK4OLuS/pxPxoHy9y/s4uw3IbQh6DeTOvsFXe\r\n9r2SKJuyxRFEATAdt5EhRGtXxZ1k8Zw6PcXgmFt8nDEKdMPcgu1NB+HBKYuf\r\n2B/gabhPKcthB+iS3JTLcWJp0l2uSf+5qrezqN6YCfQk6bd51crMXc7LWa/A\r\nfL5q4H55+QFO8SEKo7OJo2JtcnOz4ze9LDibePNZb6CHFvEsV9M4scGB5qfQ\r\n/v4iOJ6OnjvfpOGkaF/+egULE3w0Uwe56yg0Zj/CznAxBPvqVraWA6/TTTMj\r\nFlUjMt3dIJ0zXoDYDEz8erUD0BOJirhgo5375i1nD6FX6UYaIqDFOmhorSBi\r\npuGzW9oOrpypigYLf3xPxowBUEiA4KROhj4HSerKkqR0YMYSaoC7J5duBrba\r\nCttzeqLwgtvlutJ56nUiPOfNpbYPceTGEjQ=\r\n=I/YH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8e0d4aabe940521358f939498580a1a17a78d23e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-24T02:53:12.915Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.8","autumndb":"^21.1.4","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.2_1658631313383_0.4264991322608118","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.3-renovate-typedoc-0-x-b463326ae784123c96dd312b5202f14d419f64fd":{"name":"@balena/jellyfish-client-sdk","version":"13.0.3-renovate-typedoc-0-x-b463326ae784123c96dd312b5202f14d419f64fd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.3-renovate-typedoc-0-x-b463326ae784123c96dd312b5202f14d419f64fd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7e239b8dad5b58af2774d3e60d937719fa535b0e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.3-renovate-typedoc-0-x-b463326ae784123c96dd312b5202f14d419f64fd.tgz","fileCount":31,"integrity":"sha512-35mHghwpM7hzMAGdGHi/Yqe5gEkBqEbuEhguXMB2de2v41qTJ9wWgfTJfpGJuJEyidAuD1Asw51WvRuOpO3NJQ==","signatures":[{"sig":"MEYCIQC1s0G8lUQVmMeui6T0HEhoaFAXY98sn/vIQFoH3XA9AAIhAP8uStqQGwk/MzN7bh/OlVDhjVhyXd22q7J+cEiKA5gu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213299,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3b0IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqT5hAAmyzVHmIU/ekgyOElwL/FMjhc2OvEQHMHiGeZaVSi+JFjTOYF\r\nw7QJL1rnvsIqZf0VClH1vpue7jlbHsqzY3XcK57AEFn1desqv+GIjsV1G+n7\r\nbyw8HtdfDnjrHQ18ZVqhDsKWLjYJokhxEKsiPb4+xf/e0On+kxCWtYI0l0CT\r\nte2gPUmhOyuhbc7EKNLZCLAXO7NxpanjG7HzjGqBR7UdDREcwe9VSoeSBHOU\r\nPp3vUXODuXxt9phORQqvzze6U29AiKrITGuNrr/oGWeXdvb86Chl0preR81M\r\nUrExRD/8drnZq5jeqsGm1gaZlNNKnDOBb+eOktDZ/CElCGH6Dya5V/dIRmyV\r\nVY7M6KMVoBXMZa/4Z0kUyI/YhQrfxBFm+6cxepT75JQ9pHpdYbJ6Rpa4oFeT\r\nKwQlTh1T2Nisb9rFWWPj41ixB3fHdghD+jaqRtoai0oNiEvflDkTY46NI0OD\r\naVHGtS9KYLujgSkf0zDLb6ME96/HMOmGJznv6i8Ex81H+zPBSvansddip8Li\r\nXnLdiDMILT9Y2kNn+dyK6kKrRK663KL2N0e2kD4vtHf7rd1jnWQwL7wA5OM4\r\nr83TQwSP4KU9bIkGhMY4pSgprRU6J726LUjRBABHepDzIZXcvMNipSziop0W\r\n0pzAJvPa3F5zcbfyqvN/eBiwDKCXXiugi58=\r\n=Il9Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b463326ae784123c96dd312b5202f14d419f64fd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-24T21:39:34.752Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.1.4","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.3-renovate-typedoc-0-x-b463326ae784123c96dd312b5202f14d419f64fd_1658699015066_0.7333925098792327","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.3":{"name":"@balena/jellyfish-client-sdk","version":"13.0.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2cc1ea29e5ab7b44aaef269a95620ac4c29e706a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.3.tgz","fileCount":31,"integrity":"sha512-Twkph38XDiu+wl0MR8+BkFK9BMyg8oXRGp/jqpijJ5ZRYXaIQEFVIvH8fUWSIqSDgNGKtpmQODrrZ4fGjgx0oA==","signatures":[{"sig":"MEUCIAVFZH43fulvQvuxUwkT2tViW5JO94ROudUXdO6Vf4HbAiEAhSomcfXf+oKDD6DwOdy+K6FD+KSOaw0LKbLK78O7K5Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3b4eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmotqQ/+MLiAHDDtVg7WjOzAoCJvzkTYmDrwdNlCCYwVrZvpqBS3IblA\r\nlBAvirkOn+exLfvKfrj9PqnQ2I+uaEsOzw4L1mPH0QmIN3EDZL22VSeeMO/A\r\n9+MW2r9Ncmb917Ktuy1ePlfjdFoojw0Flb/ppCaQhkS6iGEFEY6PnipiUB6A\r\n9fKRidfz2q8OGQgBtCKalhhbgnE27djvUJ6CCNwsMlc5WECGX0/DY4c3C8kz\r\ngrSM6r4BlOaYPkgxA9nIfc8fEyDIN81MzpL3BFW++SjZUtQf6JD0WC5FJxev\r\nR6ATQ7DRu/N5a5rb/jJsuIJVM0A0YjIzF+I8LhPBWvMebUv2D8JVReOi1f3P\r\ntP5oV8SPcRNiNcwrCAM+h8B035bTErlvAblqFQyXIkXJzLm2hl2VxTC8B2j4\r\na9mtG0aWfyzuNO23cK+iXb9QRENi4NsV5978Y9Lagn+Fn8IFqq/AXSaRDrXO\r\nw8GZJ5oJ1Oj5VKluAM+wY9OES6n23MqynHdLS+hvzs/TQtOOv67s2OsfpeKM\r\np1Kh2aaC7V0yldQC6d8vqjdi19TvozsnzZFkZjZR+3ZNKRsstp2ZITAdtaFG\r\nw2t9M2EFESV8TfAQ8kvEIqkz3bqEPfVsHGsJNa0IZwv5rmmYqwQuLgX9Bmt2\r\no63HsOE6F7aioBHV0rZfjCLFgpRP9UEATqg=\r\n=wEAM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"eb79f861ab60613ec88209b2cc7bffd32e2c9683","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-24T21:45:32.863Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.1.4","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.3_1658699293661_0.4509072280604607","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.4-renovate-autumndb-21-x-ead3d6a4ce437ec9fb3f55d7cbf871a1288a1a69":{"name":"@balena/jellyfish-client-sdk","version":"13.0.4-renovate-autumndb-21-x-ead3d6a4ce437ec9fb3f55d7cbf871a1288a1a69","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.4-renovate-autumndb-21-x-ead3d6a4ce437ec9fb3f55d7cbf871a1288a1a69","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8841bfb8e6c05ea664ea7cb32f620710d8e386e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.4-renovate-autumndb-21-x-ead3d6a4ce437ec9fb3f55d7cbf871a1288a1a69.tgz","fileCount":31,"integrity":"sha512-k+8m6gTPaM7BSLS4QZwPgVSV8+SPynCakbTB5yD4CXAonlJuCm92jiuchkYv+057d1n5jVKHvqqz/N1sR3aDUw==","signatures":[{"sig":"MEUCIQCVSF4UGZiaIW4xRwU9N0uglOuyOW64xty9704Nne8e5wIgV1myndnoUjG+LzMcrnYxIY2bSv8UdepFNF0MJ1n0Fzg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3uvEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpadg//QEVwg87/4h/ePbnYWCo5XL3ANtbxrQtWU8EL4O0SzQ3HGiQa\r\nuv3tTEPQJvhPW7RbPwWqZM5r5YnS4BOxZSfU9HhK5S1fxkglxTOaITJ8DDKw\r\nGfxIO/xJw5EHb+z/b5ZGExgtYVxr0k9BrGTxPxXH8tFkXio6DnD4hXcQMoP9\r\n5xdhW9ZpY/zQch9brnhEu0ulf27pFPWRieV2xEQ4mTn6+mJnxQ6NeLQCeegv\r\ndYhywGGW4h2juEAZBfrogVO8PoAjK0YsN1hCKqaMdBbKZ/zh3C8vpNJODb0P\r\nLwhy7fTJJr3KPdFuz7aIRotnXrmQzr4O1cZWxEJU56vI8zAJcTWYo1kfryiA\r\nOSha/iJwO3VKDGB5DUasrEyM26hfkVvj6j3fFK6jo4KbKJwFgM6BoRZvZfEE\r\nM+Arl4HgkOyIi+ygaJEFbfqNM+iCWpkoTyOfvJWObHkC2RAGNuccuB+y+BjC\r\n7JWsj3JceQXIdcUjF/GstVSX2BEBcecjlFpZn3Cv1sSVgRhFcApJ9HEhBGEu\r\n/qckXsdnILrd/XtdgfWMOTiO7RSnPC9k45o+oCjTvuplxAjFHoJ/2Y80U2dX\r\nQS2GxCwzZh2hHoX40KVQIziutF6OJ8yPijAsTYfkZHudGhWwaKV1cSkRrHaU\r\nmloaE2aGxtzssXZFVazRqe97REJOO6FhkMU=\r\n=Nnh6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ead3d6a4ce437ec9fb3f55d7cbf871a1288a1a69","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-25T19:11:52.828Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.4-renovate-autumndb-21-x-ead3d6a4ce437ec9fb3f55d7cbf871a1288a1a69_1658776516648_0.9468547308723732","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.4":{"name":"@balena/jellyfish-client-sdk","version":"13.0.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f955bf1ca2cd257de9ce4b727adb65c60ef852fb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.4.tgz","fileCount":31,"integrity":"sha512-x+v8a/3q7In+xy5E1pNV+VrvwMSzlnXX1ARJGnxuRJiTA3JQLLdSgKPzKvde3hxUUgMtIj6GkBTz9UDuckb1tQ==","signatures":[{"sig":"MEYCIQCMTpJKlbaarFweKB6/LXoi/bV80qOzosMvpd0NaBzFkQIhALBGENW36UpdDZnOGXNlL5WU03JI4uT/WwVWWp4riWQ8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3uypACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrsaw//Y5ryNy+TczMTY89Y6WTVCynxfhRshKT6BFn6uKBLTy77gquL\r\nIMMI9cMxFXbAnXEJ9qD1BQjEsP1KL0wEPQhOpPFJxvwVsqTnusUK6n4Aq+HF\r\nahy/82SJ7nR9VIXniaNhdMuHDGZ8NbtJjpQfVyH6bZF8xLSkvorungxR89sA\r\nBJi9sdfAvFjKzMmqqrpdlc4jS9YMR8HZrao+FMYBNbfVGg5bHr25lfVlb3vc\r\nVzmokMSUjBLX29EnKvpwSC7ENS+E2ng1LyCuuXkcLFQnLO/H5+d0CpC8hv49\r\nsNvnYUdmDZyTtI8/fyNbv6xFbzgfVw7YiItWfSK7yTBOf949xA50iAXI4czA\r\n7B6aNCrs35/T1EJPfx01APkepSFJRZ98nmTzPmAar3P1pLsNn+f36D9Hpf9L\r\nXvsPZvPlXn2dxCGRTXliQh1TChT4+jb108XKpbCo7FZQaXzt3gQEyXQvmRhE\r\nK8Ar98HfZNTsw4IVkZksafkQx63hlBjb8TMHb0NT6ZHLhA8VWqpc1H7WvOkn\r\nLCDWXkWQuS0RW8o2Rvw/tx2DLYPHGlcHYzDN/NdsUMdAR5nZCyzaejA9nBzF\r\n34J6zpIV5kMv78Dr9BDPT9UEgjgP5d+VFR9Buc2J3jdk8kep3Su5gYxoWUHw\r\n4gS4oKUUX5aZmzAxGoGv/ERsbD8OIECtcag=\r\n=34Fc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d59b2024275a514d8fafee11a5cafccce3b98b4c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-25T19:16:46.690Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.4_1658776745592_0.7244564968463165","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.5-renovate-sinon-10-x-938172b0b6e023739571956455a61f487c7ecdf4":{"name":"@balena/jellyfish-client-sdk","version":"13.0.5-renovate-sinon-10-x-938172b0b6e023739571956455a61f487c7ecdf4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.5-renovate-sinon-10-x-938172b0b6e023739571956455a61f487c7ecdf4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"325cf392035588bede01fa2f672d51f3515075ca","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.5-renovate-sinon-10-x-938172b0b6e023739571956455a61f487c7ecdf4.tgz","fileCount":31,"integrity":"sha512-YqKAdacooRvSA1fdgA3gUQsn1hvHWcaW0w59YZere4TuNZlnK3tAI5XTcp8YtcZNsG12zfyUv4tCzrtqU7mTiw==","signatures":[{"sig":"MEUCIQDHx7YRff6Cxh7Bfa41SZf+/Nkxs8hVv6LajL+S4fxLhQIgVTNgKJUj6qDg/kWgG6djTqjpiv6sbIUuGBo4zoGasB0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5lqLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoK2xAAkxv/HeDytiSzUF5zc00532Zsi4xw0pOFOUenB2pFBKtlmHW4\r\njPdfxju04ySICNnaVc2TFUxOrrSC32etr4wUSMDyOpYfpwMwGAwWC1cnSsUE\r\nCsXhxO7XX9TET2Tl6rJR5RtAhnoy6R3nbzZWwK7IQfRCsD24ikmp2I+mFCre\r\nwRxH91LsSPrUJ6VlJoTKuf/3hDIMb/KFxQ+rHDB3xO5YuFOot2+d1xQnaVyb\r\nRVW6twWu0VmSniCEFIPVQQkMdAYdxmyz4IozNu1g6K2sxa74KZGgEuJQWdka\r\nZNUHNko3roeDtJE2qdgvl9Sxd/UTKWiFlBSegn4j7dOa9sayC7xjTrigBnCX\r\n3Cz6UmBOdFV/SN2y7CAMOgeufRFrpU40/Y1oATzt2nR3n39rjUpMadz+wJEv\r\n4H7XjZYI/LiZnSJV6RglqM837bFEmUIpN9tDwHFKtIuOJc2nmUs4cYBVwh4f\r\ntlov4uGArpSwXcdv2J7u+G5PR6lFHdNf8F5pd5l8qpo9LOWWEdFf4o8w0PkL\r\nv6oFJhbw5FiWTq1jmgItEYvFc0GG3YOHpUoIU7SefvIOgIrZu1XOY8SovtiT\r\nR58vj1LEXMu+y/B0K/P3f9x7N3UuGJyUmqzOiLMdVmxLPYfMjzu1pr/W1I0L\r\nRC5zipD1MaRFvy+DBl29l+PVcRYw1dPAi3E=\r\n=RG2f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"938172b0b6e023739571956455a61f487c7ecdf4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T10:30:07.969Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.5-renovate-sinon-10-x-938172b0b6e023739571956455a61f487c7ecdf4_1659263627762_0.27692655059584004","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.5-renovate-jest-monorepo-8ce39e61a5afa3ad03e5b404543e90e87c80a493":{"name":"@balena/jellyfish-client-sdk","version":"13.0.5-renovate-jest-monorepo-8ce39e61a5afa3ad03e5b404543e90e87c80a493","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.5-renovate-jest-monorepo-8ce39e61a5afa3ad03e5b404543e90e87c80a493","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0843222d2f99c83dddb90816266b9e2a9ea8c9b5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.5-renovate-jest-monorepo-8ce39e61a5afa3ad03e5b404543e90e87c80a493.tgz","fileCount":31,"integrity":"sha512-TIVc9mIziNXUBkwAI2NaOprySSrc2NqSmqcD20G74N7RCtnuSgFkz6ykTJItcEFrtsGPPnKE3zVZ3u6l6pGYBA==","signatures":[{"sig":"MEYCIQDwlZcGhPrV6x0DUqLCo4Wjxraac5TxNGzS67ZKBNnkbgIhAJqD9i3vChYAkAvpHDz9A9jOS37RdktOMTu/cFJ9+dpw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5lqeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqqfQ/9GpvfHa7LvYDa4hav23uAiVWAouiSS69YseexoSQZ4xAJuuSY\r\nYnqRAEHSyrRqcbOAxuVOvcEwrMeilGRTviN8hF5/b9Q8P/Q+3+ev5zXc1jlx\r\nFchaEbFtIvwzrNBP7Tu5MXXIpcbWdxJJoYoPUvyI7RxA3v7MsUfEh52F1syP\r\nehMOHyYjI9m39Gb2V36M7B0vl3yg9AUqY+rl9xjlKL4LezBNTSZjX5tBbexU\r\nmIQRdYLsxHYo/aBhzfqarmqBZReDQxXDKF2OzN03iuKQ8k1S0HZP+e+GClRm\r\n08UMyofUXQrovC+08Enr9pM+5FM11SJ1YvBVYeaqB/WwY363ZNEjq2OMfOYz\r\nYqF6xPP6C2eOSmqMRMIpPDuO092OsApOQKA1MhiTE8/3qKPisZfc7bPnLE5j\r\nvUpLmcLwaxOqw4Z8Xc2AFzwM72rOoouixp3MelhiZaXH8xQy0Jz3hC7Y1/2r\r\ne6KZQsSjUifEfs97f72WhUaUU8Lps/Hp5e/olmdtGfDh53paFPj/iFtbr60B\r\nnC5hotDDvqeuxmxBOT7GhdkgR0WNLM27qaogE8MNgSBQ7BIpcnYjhvsbiPUc\r\n0YTrxaKMwJ/UwPB7+FVpZnMJJa4w+HZ9Gkdhv1/XSLRcEDzpu2ft3iDBaViJ\r\nji1A7LEFbA/6umJwwGy/q1uWwvZyegzMvNs=\r\n=Y6Fb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8ce39e61a5afa3ad03e5b404543e90e87c80a493","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T10:30:14.234Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.5-renovate-jest-monorepo-8ce39e61a5afa3ad03e5b404543e90e87c80a493_1659263645785_0.4851605370457346","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.5":{"name":"@balena/jellyfish-client-sdk","version":"13.0.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"245a71397d228afa13c8f9e7d359fa325050ebc4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.5.tgz","fileCount":31,"integrity":"sha512-f49NzsH1MbqWFWDx1AfSzUd5gzGhQz1FAXrw08rOO0YKVPI/OrTG1Qa//QGIMDCSCsWNukQnaI9GK4JQm4gOxA==","signatures":[{"sig":"MEQCIDh3JRACi0+ZAFuIy9J6td9N0A88JcWg0geGXbwYC488AiBoc2+kilzWxSyr0bo5wGV0YHFRxoDyZnIIvcBBTlUYfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5lucACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqW3BAAk8DhyLsBps2NAq8gBJrZDTAIith8NBYJ9LHeW+h2bNz1x4BE\r\ni6F5XEbzu9xhe/hh5kcOFQYIh0gFS7ovXOD0AR1mJJJVu3E93e8qXYaJovz5\r\nABOizwXAQH/GMLGrZoeY8HgBdprdaOpN1VfEw5/Bx5R4BE+Ta8frw6LYb3XZ\r\nyxtpz/CKiYAWBPCAsBibZRkLcpd0n1VbuV2dvHrxsnpoWYjKIUMfX5/mXDdM\r\no3mlTpMtbV+H0gxuOEVm+EMVjsQNGidsUC9ldVq20WJWbpg2ZVKEkqjWTTA+\r\n3fk3JzQWEE7S8Q2C/hK/We88vP22Ga+w6xMXBJ677T7SFD9ucvvlwTJ7t7q2\r\nxujmC+OXyYCkmv1x1pZUMeAfBJFf4WGLo4hn1ZoZ8XxIzRO7RxuHy6nhLZSH\r\noUCg04QQ9SOcddz7bywFIJmbpTqfEZ6hduCimMTg4zy/tpN21nH9X19kJS7M\r\noQNrGq1yY1XhoS69swR8cMqZTKpOqCmCOrVhgpAl5DHn8/YRWtHdlVQj2gFk\r\nPyU+QnRxhRyI4KqvJO0mPVAPt4n8wo3KIMD+B0E1d6Xf9fAB8AhUbltrl8xn\r\nmsZEmIrvTjQ4Yaw0QfkrLc+dlqvLp1Yie2/zwCE/fe/yuZO4o4YvYpK9rIaa\r\nzflAE8SlNIxv+pS1wA7LAEfVxZV7MmqFJ3o=\r\n=rbK9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b50f315f2978493c608004719bacb5d8a43fee39","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T10:35:48.919Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.11","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.5_1659263900090_0.6660038325965707","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.6-renovate-sinon-10-x-807ba787c884738a705ecce11435e20a9147a740":{"name":"@balena/jellyfish-client-sdk","version":"13.0.6-renovate-sinon-10-x-807ba787c884738a705ecce11435e20a9147a740","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.6-renovate-sinon-10-x-807ba787c884738a705ecce11435e20a9147a740","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"602d4f4e69e4cc95eef1037255bbb6e444752f58","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.6-renovate-sinon-10-x-807ba787c884738a705ecce11435e20a9147a740.tgz","fileCount":31,"integrity":"sha512-bjhDvVKnrFcSQbnonAavtZfZT1syv0I1Pqxd5if3eOTp1PtuIbkkA7B1EsuRSsR0rU5sO4eI2/7vhv9/l6QnXw==","signatures":[{"sig":"MEUCIQCCXPv4Os54QnnZobQQZGkywBYEntvPl98ZyUy5d7hkewIgDp/qs17iFG8Snp6mWOC0qzchlfryS2s8wzLB92Aq2U0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5ly+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQkA/+J1hO7UkB7WeGbgNNo+LQLyJXwAdelDQ4ySujg5bHpZCqwL/A\r\n0LyTL7GBrnlLFWcWf4cuCSTnmk0C4c0yG5MHgn2sWl2qHiHnAtlN8za+Dz23\r\njk+8GknehvIP5YIAleFpNeAWJfDwUXJmgp0G8wbgNyA2znkdGli3XWxmiDXa\r\nyvDrpqiAvvXQGW9xduN2DzEmg2uVs4lpZtL2CvDUxTLwpxVYbwmbgfBTkwaA\r\nMiIYgcv+gGNIPw4uaV7h3dvADlwC37l3k2cGHGe3lTsFu7T4M6x+DUXVvmU1\r\nB/5A2WzF6RAiWxl6GNQackExUbDA3pP4p75xgH70Bu0wSGa/VRvb7Yh+fUFC\r\nnYLZR8b1RDMAGAluVLX6sfleE/5UaByGow6FkynDTz1tXdX7D734VyeJTNNr\r\n4anwwTgt8T64lRxzmkKMT3LfbxqFUTO4i9JAkUyVVqUPfVknQvaUrZhMwgjr\r\nHEexokMS9GUezmGGDIbYg32zy+crDi0ZjbdTIRrmnS4vqEAiuE8Lyu3cEFjf\r\nRsQ61MHnYw94km5Zz+Yv3HeT+ubJ/6XvRJwNVvFv0qyDjoQaPeYo2R/p1Osi\r\nrVqqP4AaFtTvbnnxhFUl7gqhJ4uieWTK2WOfAy+litaT/7X05wXGHUjqWvns\r\n/OaNyIZ1H9QQFzui43JFNM58oqzvKZM0Has=\r\n=y6rj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"807ba787c884738a705ecce11435e20a9147a740","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T10:37:29.776Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.6-renovate-sinon-10-x-807ba787c884738a705ecce11435e20a9147a740_1659264190223_0.04969778268921843","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.6":{"name":"@balena/jellyfish-client-sdk","version":"13.0.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"16ae63eb6b505a8137e87bb6dd39da22e3f78eef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.6.tgz","fileCount":31,"integrity":"sha512-jZbTt4OCakajbalP3jrU3O9nk1YwCHoQLBtu5Tt58yAxzLh96NGXaj6H9Ud5DRdbSlzYwV4UEwQoVdNe5rAGCw==","signatures":[{"sig":"MEYCIQDAFx34YSh9wbeLJ0trfEszteHH7M3oqfZjHHRmFOWPpAIhAKfNC+Y2iLRDvgpwBP5giCDmjxJailCp7d4WSBRTkYSj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5l4oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUJQ/8CY9Qn+Awn8nZ4Hf5US38kBxkJrwFT414Q3padEZK7hQn/H5T\r\neyZ12hvKUclhk6lcwsD4eJggbroPZpRfNJgeH04zfgYtjp38qMca4ARkJ6nO\r\nlZhuGoptffD/zLqmOl1kdvACnzNBxYvpEfkK+HqWarQl1idJgv6utcgXYae0\r\nx4NP8OmPlcoPh5bAOzYpyk24GpduixaobxoKu6LBbLE7Uf6ZXUDX8+l1msXJ\r\nCzU1HNnXamWPqMWi2A2C2qc0ocRoDB0/XopbO/UVfiEAvbKRAXwwM6eAt7FZ\r\n/kpuMQGhWFAieZDI5QMyaxnDaTg7EOBADXf5/r2xLYNlNjTRJE/Ba8NoMbQF\r\nnMGLN0fABqO7xgcHxmOWOLr5a6T+DfLmjjtvHimCXYoJwY5d60fbs3nRMx7e\r\nMSAwyxmx6QbNGZ+PWJivw0y4+xGs16iciFotZpMN6e8QVgifsuZEeFUNKBoR\r\n7T4U/wTm+utvYtaPp0w6mqU9grTljxEHrAFrbulPdHMTCMokHygcfOuHyeBv\r\nGEoyo5lzIrtl5KE2mbpMjoOkKfXSoGCQ6q/ZL0tWH8RwIYVueIY0zw1+CiuS\r\n5GN9UVP/ndAGvDKLEK1YSfs9wJYrgPUAPAMHfmkzBvGKxgpqIa3U/ZMBWjdx\r\nRM76eVabzEw11UN2ld5YQOi4j0PyGUJYPHQ=\r\n=eFs9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"51568585776a07833148c23ec1a73dad040ace33","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T10:47:03.871Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.4","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.6_1659264551880_0.5893306841950516","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.7-renovate-nock-13-x-1dcb2602348320c490e664c7ca30e558f6c71c05":{"name":"@balena/jellyfish-client-sdk","version":"13.0.7-renovate-nock-13-x-1dcb2602348320c490e664c7ca30e558f6c71c05","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.7-renovate-nock-13-x-1dcb2602348320c490e664c7ca30e558f6c71c05","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6eb78753507ed90558243069c3f9677dc3c7c209","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.7-renovate-nock-13-x-1dcb2602348320c490e664c7ca30e558f6c71c05.tgz","fileCount":31,"integrity":"sha512-p29qbpy5+pdmOItaaS/IG49GJWHzssNhpjYHfuHxI2msiX+TrAxkHtiKUwaRAXTpsN6oSsT781TfepY8XqzQUQ==","signatures":[{"sig":"MEUCIQDvJJo9/LFPW8efS4qA+UEmcSUUYTt3ux6laaEsmq5mRQIgZ+r8jK6wCdsy0n2PrK370zNcrA6EtVJHK55UkmkJ/Dc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5nzDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoO9w//X2Ub36iTis7D2+d5xluo7IvyAdCNi7oAgF5uxFRdQ8n82tFB\r\nYLDsoa9YWEpm6zt9cJT7foyL1a3unSFep0SRzGKWXkLVcLgjlNhKuOVV35lj\r\nFylAA1xFCXcZOKTF3cpIw9GT/vNGwo/6RdaMtpOlcNqgSWUl+2kxbpCVcnQ1\r\nea55el0B0IVflQlJHQ3xi+ufsb73QUfs231F84XquCWGH1mVmUt6nFlMsEO/\r\nzI1sVgRTStJZk7/anttFuv3MhNAi/jrBWCuBWOzVEPQD8q+4eTO4oFrg9W1N\r\nqhVlZItzZyq8XrEo6S9sf8EQAlFMjEaP3d+LrBfCe5GeaemCaGLXtKmskxgS\r\nWRG4i0L5WkF3GuVPRFWONDD9ZhB5EhXw2HrdgFX8+3GwekkJzLGAmUH2NJCk\r\neQDwSVIO4M2wnC6rBdotAZb3Haxp/Qh+AyuzuIGFnNjWc+gdWFwu5e0xFgpV\r\nMEdLV4nDgCGrdBLzjU4Mb2oUUpzXzYpjuUpM74TZjl8rSfyT+AjGBjvzz6pQ\r\nEg9KWusNf1hE6vt259gigs2G6ko9soWsVA4dd3Dqg16wvUvs78LU1ceUsvQz\r\np5G04Enlj00UyAytR6vG+IURM1jgh0hQ674bkxBf0b+DfMz+TJzLcuTVfJ/u\r\nuaHKGTmou+jEL5iTgalKJVlJhYpTjQZvAfI=\r\n=TxK6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1dcb2602348320c490e664c7ca30e558f6c71c05","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T12:55:33.778Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.0","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.7-renovate-nock-13-x-1dcb2602348320c490e664c7ca30e558f6c71c05_1659272386864_0.39355984949691125","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.7-renovate-lint-staged-13-x-e809a112d071282d66bc9ecb20973bc51b5949d1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.7-renovate-lint-staged-13-x-e809a112d071282d66bc9ecb20973bc51b5949d1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.7-renovate-lint-staged-13-x-e809a112d071282d66bc9ecb20973bc51b5949d1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5875262d944adad28fd0bf0bca340baf48ae1400","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.7-renovate-lint-staged-13-x-e809a112d071282d66bc9ecb20973bc51b5949d1.tgz","fileCount":31,"integrity":"sha512-mN1g4Q0T+ZfupXFLiTR4Ci6VA9zDEPzsJpa5oQK2ZKDlom8WJSB4h8TmftvPO6k5MACoiMujc2tw8T2tl0fShA==","signatures":[{"sig":"MEQCIEEKqDfbxZPv4KMsFE1i3zYsZSdWEpNnLOvSn/MsBJ5vAiAQ9AvTtpI4Ib9GuIsZ2Pi7nDqy3N2r3jdg8EpKq28svg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5oDsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpP3RAAn5xEvJkaG6MpMam/lRLJKxJJbYEysdK6dvkvJocM71GQGZ/h\r\nv5EvJfEGLdSYgEFuhOtB3rFzryXFJu5jNhEyhoI5AIZNVVP/aT+qZc3kSZ2L\r\n89nyGF5qw1xUz27wwXtYxFtwF8VTYNaTkKnc6bpIIZf/HnxZX5T0JIQ5u4Ov\r\nrosuRykzY37tH9dMAfIVmGacTRsAqCdDermwXMLlFr4UxvEuMj6FIYul3LIE\r\nU6yomxlv5XdMxgyr5QDSYpay7R3sZEzJUVctjNrkRhpkmUiuh7WfPFJ6z+7j\r\nwdOSyvo4jEQG27KkkpSPG/rQCUZZpTsCoGFVuVC4e/PL3x+clwDKWdrBPpjJ\r\n9DNBw1rklpnZjHFBQxvvwvF5YYOt0Ysslwr7uXp4he5hvGTjjKnR8d32Z5+l\r\nMVR9ykz1KQ1ZABAtSsbZIpoTNk5KPAczPgwcd3mhtZAubXlZej8iSU/Ha9QH\r\nGsYoamLcFpro3uBlCiN3U0JI9msiERE0cGgHRImBk+ejLM2/tXIoS8WzwrKy\r\nOwLVAGnNvrpB5jDEw8+ETx2ELJgL7Y5+kY4z/B+h/DG56Ft5v896i4FDQXCJ\r\niuYuL2dEs4luMaunCsOuXrhbsz5jxbZZeO0KjuFgNt/V5bv56om8CxhTZ+bQ\r\nQT6u5MuGDcvbM2RRqekFZ9xn+yCFQLn6nWg=\r\n=6fZd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e809a112d071282d66bc9ecb20973bc51b5949d1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T13:08:50.142Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.7-renovate-lint-staged-13-x-e809a112d071282d66bc9ecb20973bc51b5949d1_1659273452610_0.6944418328615838","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.7":{"name":"@balena/jellyfish-client-sdk","version":"13.0.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a7adc0c5718644d6bbff67047edfae52a7843563","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.7.tgz","fileCount":31,"integrity":"sha512-TG84FZQxO2knMxWZLwE9Meo6ZgjVCZZlF4n+7d/lJUrF2BFvXB3ewD98Nuwzey6M/Z1nZQnSSPH8Gd10niIFIA==","signatures":[{"sig":"MEQCIAsrqrd6G2CAW5FX9A7EKarcsrqPag5pN2CLRBVPtejZAiAgxxjZpepwtLvx3wZ4P20trZx32AR07d5YFNt0b3RJsQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5oHxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWOQ//YPZh2HadZBe6Il7Um+2DKj5JSysfcrdXUINLOR1v1Tzkrkao\r\n0ks5YzsWbqQJDZdKLF3E+da2mEfYZ0euvAsKR/yvs9OIS7RSb1KICocAMrWs\r\n+P+LYYGknCiDem69I+Ide45ufqPtpUvQrMGgOBW/mAJ2teKouyNdCC2JZyhk\r\nSg2b7z/tCrckGVUIjSVyY0QDU/20PZ/eW3iqmwca6+VzS9ZQDt3vXARzXl3O\r\nEoPeG0aq0RHoyMisXDU5pzK/MTI6HRIlvGFFGE8EKQP+UHqF5yXcZ9tU4y1W\r\nLUC5M4hJuWZFBXjZINNZezvquI84ZaA+P7QvQ0r5aWHiJ3ZH98l9GCiPCbTl\r\nmdgPZiXc+4A+wI9EdYnjzicy9Ithxcv3plNaDueWdLUhJG/QHKkoxWitNQaf\r\nHNS2j9O2xQtDbcEQ0C3CHrfv0zcpi4rOA+hAIDPB07suFRtCG3r8j0Sma+xR\r\nPd0ntTXAD1Qz/AbqYORVqTl2PqHuq8bSf3jllTchkRml+TrjM6AMDLGh+qd/\r\nRgRlQ136OuEgsILXEWpKV/LKNN9O5ffQ65cSt7ApYhrSUITBSMJAiMCy7nBN\r\n7qDX70ovRnYNECgsQHLSqw7iwEVSZZmnThePlC6CdTHDd+r/zv4o2UsRmmSw\r\n4WTtlY1wWEEjUNvU7vUdaPAPINw/xZvGu6g=\r\n=MKVP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6b33e8ae56f90b5c9c5504b0904b11ea5fb8ebc4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T13:19:21.105Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.3","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.7_1659273713065_0.6735773373961231","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.8-renovate-ts-jest-28-x-9783f67afbd2e0fea916e384062dc0d79ba0b053":{"name":"@balena/jellyfish-client-sdk","version":"13.0.8-renovate-ts-jest-28-x-9783f67afbd2e0fea916e384062dc0d79ba0b053","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.8-renovate-ts-jest-28-x-9783f67afbd2e0fea916e384062dc0d79ba0b053","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2abbcd425d9709341a309850e18f5683efc9a377","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.8-renovate-ts-jest-28-x-9783f67afbd2e0fea916e384062dc0d79ba0b053.tgz","fileCount":31,"integrity":"sha512-GDa20WJgN6SVZZjeOoAKFTiib2SRAKUJWDIjKLeMJTohI931r7FL0pZzP4WmJZf1AhyVk2z5p+DuuQkB5vM9lA==","signatures":[{"sig":"MEUCIHkmBHgmwkz6X6HS6KgzC/vxzoTyn7h6ChjSIBcAFGP6AiEAiUeMtaKVj2chAXoyxKqCRR/y6ST5NA0hIiPpZHd65sA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5oNRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSgg/+PNz8Imf9/cnxL+PM4Qjb1kNlVZMVr9ReTZK78OqHgFFRgtcT\r\nmFW4HlYYFOiC/1/u0RTBgiHRK3Vkwihw6gKGOctbyxN/s3t/lOudllGE3fwx\r\nc2tNYsTHfixLtlm2KE9u914/5gWg03B2rR6YHKirO4DGfDLpTkFYz1Qxcind\r\nulNz0zml/y6hwE6T0LJhM8M9/F29LCgwQvVpnx7l3AwjHygOP+4QeNPuwrZy\r\nmRyoiU5HkTCqz6GNLKteutoye2/U8Y0moRGcHGumr5u1SvI7SoQgBfyQb+iq\r\nRAq36MXkAUjXt+GHBtGiWccWbWs4J1zjYUZUNFcpNinqFtfnt4VagJ7l2pKN\r\nUMW0WGv/Kdymg3Jc+a474Peo1bm0Qdpt7s8hWP8KUvvSGt6BxTyEJXzKpqSQ\r\nj2taKhB5QHBlUXVpyTWuqrDywzHIQvDf4FrB/6gUUL/RjwgV4FHRIBSZiRgo\r\nyW52+F3bqhVARZGVq1Ne3z17OsO4T3WIS607HXVxJrKyD8PQpay3KlmfpIRG\r\nvX3Kxbo/gPFCpGBRLHxjHPo9XxO4kVLYxaYw7J+PfMXTKBHJLfl3CquXsGV5\r\nIDzNuN+46GPUwF9PRbbXzrnAheWRxGu99fB2DyRsEOnPO0I0pD/uYGHwhKTp\r\nBLUH4zAwMGwiSy3ZFLJoto/jvvuvFFa7o6s=\r\n=Btol\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9783f67afbd2e0fea916e384062dc0d79ba0b053","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T13:23:59.080Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.8-renovate-ts-jest-28-x-9783f67afbd2e0fea916e384062dc0d79ba0b053_1659274065133_0.5394057771482235","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.8":{"name":"@balena/jellyfish-client-sdk","version":"13.0.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"007843055e2dcdf3f1297fdc1575ca2876c3d83d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.8.tgz","fileCount":31,"integrity":"sha512-YEIQ+VZFkv5cjyQ+aZdJedxHz/wys067MnTOKgzeUP04bcNFkcuj/IX1QzN6gQe+SfHNMAbY3EcPNDDGwzXrDQ==","signatures":[{"sig":"MEQCIH8P4Rbnnda2JN/yoHEuZGHLGFDfO1hRQaqBA2wAppYGAiAmO+S8DxNnHscoK25uOGcZHOu0OTTAVFS761U3X6NUQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5oS9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobBxAAhLvhw0Iuw+xFP56kV6DM1/xct5UfU9FD4+B6Uo4iUtaJ28Bo\r\n0Y+0JRJAvWYFi+0rEr6xaodJ/X5mFscsgnZmoEcA4M5P/rHu7aTeaJ2nqGuE\r\nZxepBKYa+GvB05OXFeZRS2SgwCua1UiI3ZHG82qjNMV71iQvByZ0/w9JC1f9\r\npQiEuHk7zsg7LYY+gMBlOXDv2vkZjCEdk0BFUjsiKWfxyizCVU6MHnpVbvDN\r\nw41KY3WRWoqCZcUT9MwT0AV5zb6ewfFcKm0VWEQyL4CHQN2RGbJUs5e4Nz5V\r\nm9w+dcAOirs19RAYD9z41dSOQqAqMMRbcZOfiIVVci/LF7RieRKO/jjh+Iyg\r\nYb/CqYjjC/+hU9VuVZ/4r1IyWQ/udjYLmnaEABphZtIme3RqOCo24WkouFx6\r\nlGySZYSWxSov5CawPAkrBugytSbyctfyNFd0aM6nJMY/8rGQ2j+ftv+mLo4z\r\nSBdsNAWkO4af+EvlMscYSVApcAqxvs9gtciitYtG97Q8zB81O1w2dfSwEpAO\r\nSRMvuA6SUyQ/CciUE3BfIteOqqvFABwvx8ohzVRztLWdYBNANDTXwBXjYsUv\r\nqAJRZozCotrRCWx50mmN0/6iAWI2ridFDjC/N69EMdpftp0zatsrVfPGVJsv\r\nO5c5PA1I2C0FO/nb87KVcbKypdjTRTyBz/I=\r\n=q9il\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"96acbee1f3816d134fa4331ef80b92ca42f1c917","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T13:31:15.037Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.2.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.8_1659274429078_0.6695109953899772","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.9-renovate-autumndb-21-x-ad4b85c4fd9a99747b9dcfa66319550a009a9b8c":{"name":"@balena/jellyfish-client-sdk","version":"13.0.9-renovate-autumndb-21-x-ad4b85c4fd9a99747b9dcfa66319550a009a9b8c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.9-renovate-autumndb-21-x-ad4b85c4fd9a99747b9dcfa66319550a009a9b8c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e9de0e9b2d338982bccda77b29fdc5db181a04dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.9-renovate-autumndb-21-x-ad4b85c4fd9a99747b9dcfa66319550a009a9b8c.tgz","fileCount":31,"integrity":"sha512-KyXGocPg0UE0dXwlwwtkvECxPtUsx+g3U3WtNJg2J6qmxzj8BAymywiC694Qe0+gclvrZCX0G/n0KPh0qistKQ==","signatures":[{"sig":"MEYCIQDoOaSYKHtUWPpDa52F2DqcvU4dXfnapEl0mMd+UWKFKAIhAOGj4SwCtNKcD2aBax0jwWw7s15wz7tpVP3VIGQ2Ww/W","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5oXdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4vQ//Y5ifZ7Y2dQDY+v+axhfIbi7+oYAGn9qLDoTpHCNVjlKf9BYS\r\no2nn+iZyywM0feYVzBOhyFjE4TR1uYk6wMKC8rjSgGZF95s/7gnTRl0jPq3j\r\nCByqpW1x3a4XtCtu6uSZpCdHcc0n/ujU+bMi29fuvclrILKbFQofjydCcWCE\r\ntS0PO0r3Vx8CzAHwQdww8x8BFrrGVUCsU+BGUkI4jDYAtKSvi70SlRx1TJVj\r\nwVyjip//9AgB9LmVvnYMjbh7JI6HiQcUlLZpFAimKQuoCT/vJk2NXTOL6hGZ\r\n6wIf1QJJ2orCPVvn5ybFcNfhaxpEG9syPy1jD10FA370d0gdVGuE289XZZEC\r\nGAZVlxNT1y3aejUp/tzNDLRxWEZyvrilrAsviW0TwNcmtDeeU61w2/Ans1qI\r\nJD1g8KHQGFxL19hSbJlOUPlyRvvV1lp/hpj7CXCDrNbyVpfDpEzqzPb5jojw\r\ni7LXFxRjQSkYxHmfdNS1l8bdRZMUFEoo3S0YxuS3c80EoGvpS5AVzSCGwZl/\r\nr8dXBafOy0jW5cMqLamU25MfOk6dDxsohvjRNN5wZbO7/wZlYTiFMp2O8ZP8\r\nx6IKN1/QCKM60sK7JvSrvZxu21+rNDPk6nsjkUpoxD/jlObZwh0+2tuZVYO3\r\n6odbAOyIjw7jRHW94aKke6sf9x93PRm8EDk=\r\n=5lB5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ad4b85c4fd9a99747b9dcfa66319550a009a9b8c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T13:35:21.677Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.3.1","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.9-renovate-autumndb-21-x-ad4b85c4fd9a99747b9dcfa66319550a009a9b8c_1659274717201_0.194259910742538","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.9":{"name":"@balena/jellyfish-client-sdk","version":"13.0.9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8d0c715de00899b430737e054b47eef2d39e1799","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.9.tgz","fileCount":31,"integrity":"sha512-Xxwdy0ls+g8zRmkDmT/KLQhgoPQae97JV63lAIARyHVsHgZ6app82CebyrfKhP99xNG2fjdspfW8L+i/18LkdQ==","signatures":[{"sig":"MEUCIQCrd0QKwWYWfvyqG0Nwt0ehOb5hxyG4XvwHSC8tocYinAIgczYSSgo1f+CFZ2bqGp9p4RZYTHDaMTLvbXKlhwtpfYY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5oqZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoS7g/7BFpZ2rqPtfDe2gcXbTzcgO0WCQz7YVP5pDXBNQXBbDx+FdhZ\r\nGN/WcYVxiNwU7tSP660GGXOmhAvdjc3cQcO0eCdrytyBkqOqXF4pZGoqXcBz\r\nDFkqzRkLpmOhac1Wqa2qgL4RJJwf3iSX/NtD0DvflmrWIy/GOUvlhCu9jrWa\r\nHScpW5VpUahN0d9GN45dlmFM0Z0a9+RsDuFXz0E/gurOxu+CfyL7YGNv7Xqp\r\nmN7ScfWnrKBb46TlSbCdMYLRX5f5Wf7jT9mUdSoYhgFtZeAlOmlTKE23nt4w\r\n2tTNYXZJ7pV8hiHandejT7gjLj3j2cfbaTOjBUf9wObnWAR3FEcb6FWePWqd\r\nh/01ZAs4FR5xNBnFM1iw1LcsJ+ZGwih1Izoaz33pbFAo7GyaVXgKXxa2iFHd\r\n+O+a+rl6EdLjpHPmXPT5cisq8iY/6DWB36anPZ9/81O2Mts0Ekd9Kc7bvsCG\r\neLuTXE/QzAFOxwGhmcOTIPNguGQobJaqPh9GrK9UX4c4jdYySi6FIwglDliW\r\n7qNj36OdtzBVPXgXKruDsXGrSAPsyBWMxv2OER84HB9ocYg2h/hrI2ap6S+F\r\nnZljCEUBw5nz5LMUhT8tjNjuZ9grTy6HfI5uacq2/T75LreLyw8nW9BRPlCw\r\ngIeMQj9u9ynSzhlCiredQXp0J6vecqhX2mM=\r\n=QpgR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"02a9ef24b6f16637cee66d80842f949e14faa894","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T13:56:45.967Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.3.1","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.9_1659275929725_0.23501290649581952","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.10-renovate-autumndb-21-x-0a77c7c012d9a0d63099b50657fdd8a58b746350":{"name":"@balena/jellyfish-client-sdk","version":"13.0.10-renovate-autumndb-21-x-0a77c7c012d9a0d63099b50657fdd8a58b746350","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.10-renovate-autumndb-21-x-0a77c7c012d9a0d63099b50657fdd8a58b746350","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"652c2392d2d7ae95063d5589f20251b103d5a114","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.10-renovate-autumndb-21-x-0a77c7c012d9a0d63099b50657fdd8a58b746350.tgz","fileCount":31,"integrity":"sha512-MtHbHaaQllLqMqtOH5+rY60TBrmgpu/ElNRswUyKvpb0wX46IrMmURfKA39DuOWbtH1RuuFZVUGIgLYpXJKzLg==","signatures":[{"sig":"MEUCIQCOkQM4WZ0XPZZ5VKLZUl0ZDzRZfNRzBmu8YqIE82x9cAIgVVndG5F4J7neIUMePvtqihx/h4YiOHj4v1+dbbwj9cQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5q0oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/PA//cFbBR/VePCVFwixPiALMWqt/L3XVHKNgIUqVvOLDQe/tgh2B\r\nZ55EyYxe3fD089zCryPCUHTiHaVJYW1ICkb2h+IKPbYpn6Rt/bnZFy9hEetY\r\ntg88IFpdh/kGaiUa7S5MfQTTwzAuob6hqkaYYhObhUf2oETHbdUx0juxnhqZ\r\nAZd2uhfxZctETaxa7JX8rh6yfhDqHaELiJXTIe4WKImtyDAwEuNGT4x/EWVM\r\n/2Dclveg7Atymd6xxFYVoijwTpv5n3pm3r/t6ZHrJSrT8GCF2VSxn0Ps+9+g\r\nVew5Axmo8qfZUAZ3pOIbUbJd5WvYDco1izgGyuJKQBGpH84OctJMBkYFq5Yz\r\n7beRscgXmP6PxQnYfWqBuVCbUTTuLy3APlE/X4YKL0o4B+BPz4p7/aAoOogm\r\nj1y1rXRB1glVbLA8c0bX0OC78DebXex+qHf2CjHTfUupwXqLnRSLQKWLhTX/\r\ng/Q6oLt3zI2cf6VKMQoD5i+MfDsaSFCbrktM8Lv0TaTwh+NQYu35CqVJgm4k\r\nHwqSymsiAPYMT4WmAy11Z0fsyVL7sA76REeDVsGUtlKvQAnKEsaZB//HaFr/\r\nzqFpCtTa0pdhokZIwa0S1zjbfKY3VjaL+spMxW5Qj4ey6dCeHGeTQxamnqo9\r\nE6JBxo5ZE4UbBmuFJCQXdaZqJO9ZxTxBPrA=\r\n=a/Ls\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0a77c7c012d9a0d63099b50657fdd8a58b746350","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T16:22:10.037Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.3.3","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.10-renovate-autumndb-21-x-0a77c7c012d9a0d63099b50657fdd8a58b746350_1659284775876_0.3518462121865953","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.10":{"name":"@balena/jellyfish-client-sdk","version":"13.0.10","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.10","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"52760c9e48e3eaa59bdaa2c2c50c8511a38e579a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.10.tgz","fileCount":31,"integrity":"sha512-kXc6gYAleE53OMX4h0f75l+dPZ49zeSrasO/4ESlAnNNIka07jI8Voh1q8D9CMuEV4w2N7p3oifvtZ93Vst+0A==","signatures":[{"sig":"MEQCIHhkQlf/AfZtAkdNk5F63rpzpthseh7nz7O/M4TjqsOsAiAfdZa2yO3bme6XJLhZR8/BWd6SrePb0XCAkwMscZzwKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5sOSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZLw/7BLWQ6/VKC6KQReBSMhTmY7nm8Zn5nrHuBu5NRXW/JIv5OhTD\r\nq0mDPZrvRe5v+x+Vh0c1WJvy3uu4ocFEIHnnrlixRFQNx+UJAVXMpe6sennT\r\nfEoPykrG2b9kbBiymGpdQ+rpxEfqsiudkZjBTjx0kiDOFolqi6/Oi9j8cx99\r\npowsYJ98D00PVToR4DiKzZZcojJj2VsGpsWRhQF3JE0iURzJI9u0HeaGkrA+\r\nldTuixcyPrvuZ+Vff+JhPDmwCaSVkB1mt0VC0ynhTcusBbkWXglXAuQ80Eq2\r\nAU9/1J8u+ut7zAp3Ca75zrhoH3m0bxkdWNRXq6E9QO6lSmYMNY9DDl1x/Mnr\r\ntgDE7vx3U/5As51qDeLMLBIcsSX+MBGivcFqxVebUhFKHC1G+qKg31waOJvL\r\neyEVWvrTTF+XZP9G7/jJDgXTjieTVqfgDCybJiBq8ou2Nfd4IUUnaUln5JbF\r\n9LpBNt691WOxyc6s0SXF52flnkuT03ieEnJuthu0PxGcOjiByAs7m168WQ8x\r\nbzKWaaMk+EHylcL76je38n/UzqH79vP9xq7HN0Cfqovt0AMswq7uDyYQqfsW\r\n85HBcldFQ0hPRpWeuzSGRee0pXA9UU/A/PA5y3pLgZLvw24YKG69uE/CUaZQ\r\nPkmwDO9QrrqM4DLtYClYOIIWjxUur3sbQf4=\r\n=1073\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"27efd38465f551a525f0aa2e3d7e1558574189c5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T17:59:13.912Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.3.3","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.10_1659290514060_0.49063094027109266","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.10-renovate-autumndb-21-x-bffac0b4ea0359df248645950c89343831af694c":{"name":"@balena/jellyfish-client-sdk","version":"13.0.10-renovate-autumndb-21-x-bffac0b4ea0359df248645950c89343831af694c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.10-renovate-autumndb-21-x-bffac0b4ea0359df248645950c89343831af694c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"505e09e5802060cb6d12b3f790a2755ba1efe60d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.10-renovate-autumndb-21-x-bffac0b4ea0359df248645950c89343831af694c.tgz","fileCount":31,"integrity":"sha512-x3SoF04CSDgmZ5/hVR6NWJqzmW10qhWMaMqnhvtLMo5C4OriYJw5zEo/Gg5d9vQLoSfvxWDjh1cJShgSIrH/UQ==","signatures":[{"sig":"MEUCIQDAjf/zONcrozyM4Fr64BHxmFc4bqA1nTla2tG+D5eVXgIgDe/PRLteTELaEEIUS2CfWAfFdXKGwxMulaxb9oAC0WM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5sRLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr34xAAo+njX7T2WBkBwavwsgu9DlIBN7DD+cPoIV1KT8vzWyqwt7j0\r\n2nDJdcRrRinb6iISVays9/2TpY15VC1pcs/Pv7/492sR8m+7UYd+IgZTnMw6\r\nqts9/6a2D4d3pgM2879x9korvnry1zrxRpnMsT50xT1hFinxZW8wB/as9Hqf\r\nh3FpH8k8ImXNblLtUgk2Ld40211UMewwlfLhlyDMpbqJ5nVNCfrBZLOcJ5kk\r\nZf3hW4a26AijOad94/X+9Lcn3+Kzg4NrUHoeyWoxQCeePorFiokOLp8CSpIb\r\nHzQGJHN+3uP0f57rnX0hvCbYryKC5+bJJuMtS/Jr0Psg9DBCVhGMm8nGmBAj\r\nh6hhWWPxbEQk7xlPFw54AUJHAaaK/kMIsBL4Hr9lINv4z6v+Jz2iAGRDcgvM\r\ntkwXKYJwzXy/QkOWr9wzwTiQSTxZ6Q2sdGV0Q6Mo4Yx2OsIcDYo3dlpEIiPl\r\ngESsjjnlM9Vzm9QF4sLJSWKgTtREXNZQ9A8en1VCUHdbWVgG0y8lqRH+88C+\r\nBgH7G9y19Q5qZupbW+nM9YQZKXrhuVZlShVPIsvRV9E3aLvBXwZen7HwiVB+\r\na/Vbs8hmcgwTik95gnzKLfATrBqSs/i9W5nmxF5p0qlP8JSFkjxIuz+Ou1ze\r\nKRu5RrFdr8cv1QaB5epZLoiHn+REfZzkTS0=\r\n=tv0u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"bffac0b4ea0359df248645950c89343831af694c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T18:00:16.148Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.3.6","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.10-renovate-autumndb-21-x-bffac0b4ea0359df248645950c89343831af694c_1659290699268_0.32268526768242145","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.11-renovate-autumndb-21-x-e8f7163785bd6175818f20b6f767c91cf6b70a05":{"name":"@balena/jellyfish-client-sdk","version":"13.0.11-renovate-autumndb-21-x-e8f7163785bd6175818f20b6f767c91cf6b70a05","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.11-renovate-autumndb-21-x-e8f7163785bd6175818f20b6f767c91cf6b70a05","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1ba77b92929b6c517c94ace69a83172ca7f62efb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.11-renovate-autumndb-21-x-e8f7163785bd6175818f20b6f767c91cf6b70a05.tgz","fileCount":31,"integrity":"sha512-puh+j1ztV5WShBjx88sP5hVd2IBBDdvZbr0o+fhAa772UUvv61q2mRBOId3Py3+Rj+qyInjkOpf5nYn7WLvuvw==","signatures":[{"sig":"MEUCIGbuH7qwYttepHOHDSqzHPC+S8bcmOaGcL091OFVO2lcAiEAk4rtCD1xpWEhv4QWC2oin1jGKNoO9Dq8mUvRC7zKMKs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213995,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5sT3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDOg//atkm/sVzquxHYfYWQe75nvGLsBlSs2u6CSgIuoG1aUafPFV7\r\n9XnKSIE4FxL9EUDIvcuOB+u92d5gvr395gTr1R75h1ZCldpZYAvgYIyuaGxS\r\nltzmJq5hYQUgUcrX8qbusqVdayHo+9rOCiXI7W1HAD8JkakTJPK6aNoRO6By\r\nhoxVgmEjtU3+DOq+gJr2sEfzaqV5RfANc+1o/8dK5LZDAuc0rhYwAuwHrbji\r\nxOEaJ/cVWCcklaIA6ROD1rDBO8yR2PT1j27AcXcDGxnAn3FWtzORrxrJaikx\r\nFbsPnBwNFHGjkUClz2eDyNZ7Nc9+X8hObJ2BnvdkDbZysj/rq70r6n63+DTY\r\n43GYDH/M6lc9m0VdxXggKwatcmduChY8T7pHpvq5NumlWgwDaHQxxadb2eUC\r\n0yiHN3DFuC2fpO249Y1lgsvXF+zq03dEvJUNuuyEYOe8/AD/Q8smBE43MTtg\r\n4tDudH4R2SkmaDwgSnBqf2T3cjxMKBddHEjLkOV7t/xHjBfxbKduDPhQrnTO\r\nUsy95wTIfGyaUJa6FGcSGdXAv/LPFJ4JTkE0zhEjVZ91MRjyeX9SrxFi+QdM\r\nl5GptXTsL9Zj7avnZTM+w8Hl0M1ZqFQ96iIGACSczy+3gakjNOLF02W8WfKU\r\nE+ilgb8A67iFkpGX2LSFGYwJR8xLQbcmrAI=\r\n=MBdE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e8f7163785bd6175818f20b6f767c91cf6b70a05","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T18:03:37.668Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.3.6","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.11-renovate-autumndb-21-x-e8f7163785bd6175818f20b6f767c91cf6b70a05_1659290871475_0.7944806092575272","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.11":{"name":"@balena/jellyfish-client-sdk","version":"13.0.11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"390d171737440b7b4d8b31d6240b25e9071346d0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.11.tgz","fileCount":31,"integrity":"sha512-VQ3toRxtWmwnuZHlB+NqF/T/ksgw/XiHg8/twBGG5KE8ansi4OZdidULjx3qkwnAQR1pUjCtDhPo/4+7HuipSA==","signatures":[{"sig":"MEUCIQCAaQxAz1wl+ALHGbkRRsdJVzX33tSDecX1l9uWqhgt0AIgIIbCeTwMiXV+VLuB/nCfk3pdliAaXmRK+xJjtNrbK5o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":213931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5sX0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqxxg/8CtKCzv9XTWJy3CWXoSs1YCrO4bHWPGhtki0JBzBHN+UINYTu\r\n0kYBuTeq839leXWUWMB05E9hioQuEsHmH719uJTiSaV4RFPWk9h9eYMKlJ/5\r\npDId1xgJQYUzb6yWNn+JxUb5V7D9DdPG5HXUQy1c9PEOE0BOq/fDmdfYtbrS\r\nsZB/Jei+OnZs/8aGDJNFX0BYy7gQdAb4i9OrFNVS6Dj/u1IjdbyhCgPHKU/q\r\n+B6fXsi9HDTrCEhMWsiKD25xpCjxuMP2hEU8pQSznCjJJj7IUMLQOVFIgxqX\r\nfjmKAucSg48ZIMke2htoLSkMVX6elPwYRVTd9uNI7OHSvrMvzXrJ5mYGzj1o\r\nXQaymuGDNDi7QY2Cpk95ASZoWO0NfWYNa86HqjEo7E1tFgg3nL4Ontm4Sy3p\r\nnjBPnixXfGtp6jTeeHPzqhCw30eS81Z83O/N9uDle5ivEIniN4DgO7B6JvHG\r\nyW+1jS7ppB+6IvdAWXDG9SwethyDqdJPLRpWKw8wk1uIaQnoyJXMFYP00ciW\r\nc6H175qoeASZBzo0xHopgy6caqg9LS/eA1UC8JE+AAO39EtQdO8Von9k2cv2\r\nF6rNdGTQy/VYwSS98T/QtnS1O3U8tK9N5z3FWTc12qZPNunkIK594u3URQLO\r\nY8DngAzFAc6tOedq9P6n5IjmkSG4ppCPJDM=\r\n=2DYa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3390091a2079be5c7847391e6cb7acfaaf2af57d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T18:09:32.528Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.9","autumndb":"^21.3.6","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.11_1659291124069_0.5096178124047153","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.12-renovate-typedoc-0-x-86abf98cc69cdfdfc4195064273ed3de1312b326":{"name":"@balena/jellyfish-client-sdk","version":"13.0.12-renovate-typedoc-0-x-86abf98cc69cdfdfc4195064273ed3de1312b326","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.12-renovate-typedoc-0-x-86abf98cc69cdfdfc4195064273ed3de1312b326","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"85d29c2e0f26a433ffe52a45558d12543fe3d47c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.12-renovate-typedoc-0-x-86abf98cc69cdfdfc4195064273ed3de1312b326.tgz","fileCount":31,"integrity":"sha512-37pPYMFRA3j/eBk2Z+nmWgNXPRhlKoS4SDL5CciYGCm43kHIWGbXBgwMOEAZKhCHqlPL8ls+LLIHDgq5calVcg==","signatures":[{"sig":"MEUCIQCidAyri3TKbKVd3E9uPT43S01dJaqzxRuttqjxKhlM0gIgODJ86vAUBSK5g93I/Fp17d+XPVrmlhv23aXgXZEULlc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5sd4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJJA//RMK9PEaAu/Y7NCLzZpjl1CLYEJy62W6M/RLOrqbzVgzGqgsm\r\nfW/I7mV5QlP1WlI7llSa3SM1wigjMaLWfyobWX312L8EwHtqBv3jPQvqhyua\r\nKym1a63thiVAfrwpp6Wx/Zh0pzRCiDMpHxJUitGWl8kfjwW0dQ3L6Ft8DpH0\r\nqLshGpUklGJ2HgoQqj4fW81iqz4ezmJ44tAkE/XyMT/w2uyXB1IPT0UTIN6h\r\ntx0H3sgcdwj/kxJS4/uTuBRCu9rHoBcbttvL5sN8NaraULVHuuAsFXYDnlO9\r\n+s6uinQjEnu+2WGsyjoAajGIAKMVdk5p/xufxudGn6PuBgEC6apnaj5MRKL8\r\nDOuuvkJ4jsDftDvdd/hgsvOAaZf77YR5cJLj2/HEqD8tcXIQkwoArbvRui4H\r\nE4oiN7SnoF8U29geThl1TKgGrSpRFp5sclUqwNOcD9X0GoZUgPW8CDA/Wg06\r\nuOX1pCVZvMjAZz9ZmEyI2u5R/p+Hu/rkUgECdp1nFQKSKaLDukQvuaq05WLf\r\nMX+QpD8xZQ1o+cqGPnZTjMssNe3+5NQfNWUpNvYfKhd+wXivoO3BxLwCXiFn\r\nNPZrcozos4EGvlCU/Lr26jkuHhsb65a/O3YboN1j4+0Jllag3w5TsKNSZDQw\r\nKBznJPi1PMZbGhU02sQ44V7wv02BfGi1TIw=\r\n=+z4S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"86abf98cc69cdfdfc4195064273ed3de1312b326","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T18:14:22.042Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.6","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.12-renovate-typedoc-0-x-86abf98cc69cdfdfc4195064273ed3de1312b326_1659291512096_0.7128963903185863","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.12":{"name":"@balena/jellyfish-client-sdk","version":"13.0.12","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.12","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4d1f5afa5442b8427833a4a7163c7d80fc1695ab","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.12.tgz","fileCount":31,"integrity":"sha512-6k5fQ2TUlbs6Ou8Hb45nRqPPtjfk2IcxQkqdVCBV2M75H1VkUEeld3RlAeyXv1yAD4izPgYPEYBuLt8XSKfUow==","signatures":[{"sig":"MEYCIQCHGAftZVOSv/VHrlHw67kcqS55bMzJSytJ63M5usIYgQIhAJnA3E6If+VFkYm4W6U7xRhy/44SWc5iwnHRx7oQfMrz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5uyrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJ/w/+LZsR95ZdTLE9lNvGJHLInUMmEQdwCczhbJWYYsj3jhkVdkSX\r\nFkJzwz3aLBkpLtiYZxx1ZW4RHozhzw14D3a3tXlSIknXx7r50V1Z3cksmFGL\r\n7g3uC+7/+N6ZZOpaGfJBVtdGVKRg2ZnFD6qPZcbU28Yb2mS1KHiyqH5+HRH+\r\n2qWHWIt0dNJfWvJVaM0Vbt/W0P/zdpJYdqFIA3pH6nRqQagLVo7qxtMIPZBU\r\nEhOlq1OjEYwBBjxyBraQzuOw3B0X/ayHnszJQH/BY6lfYQ+RyNE4qo+9wVBv\r\n5QKlVO6dchMqNfRczdVsRM+oPT1avLNFgUjuIl61/Rjj/oS4M0HQNNON6iVE\r\n9G1SBOhMkMKmA8TnQaNQYnXe5dDZZ41LVCsaR6donwuT/v9fWd/ES+jTEltM\r\nXtRm+TDKyggY06474jw6g8bKbl7WWvo03wpzKSBj4nU5mkHdyx7jgwxEC+FX\r\nLmI7lxgyUB9ctCTT43Oz2wnGQH6yGr1UwZE8LAAG1LUApHZINFLlAz7SHtuM\r\nYDUYkqrbc9odIuXf5go4n+YuJrKRXjnzoSq1QnHTurVCOT/1nLNmxcYbU8EO\r\nWJVz8d/+R+Go/Px8pwdynKVUdtu54dcPrIBklKCs8rkO6Yb7pEowIhbJKlHZ\r\nLti+H4QUYsW2DiZto6h1SmY1KdXu/F40lw0=\r\n=vuEj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0ebd10b5caedaf38f62867aa40f1ce31cfeb1623","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T20:55:02.662Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.6","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.12_1659301035198_0.11117592981410818","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.13-renovate-autumndb-21-x-d2a5ac03e599829c16c613aaf20b2ffcb046729a":{"name":"@balena/jellyfish-client-sdk","version":"13.0.13-renovate-autumndb-21-x-d2a5ac03e599829c16c613aaf20b2ffcb046729a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.13-renovate-autumndb-21-x-d2a5ac03e599829c16c613aaf20b2ffcb046729a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"02cd4e02e960a063cbd2695239f5f027914b3f2d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.13-renovate-autumndb-21-x-d2a5ac03e599829c16c613aaf20b2ffcb046729a.tgz","fileCount":31,"integrity":"sha512-wPfouW20GKNWFUwfiYb3/3IH8xImmF8F2uRpTbsvAriFraENApIK1/PpbIF/UskwaTTa9tAl9m9skWEMcNu2Og==","signatures":[{"sig":"MEYCIQCGQRNVbtCSAQ21vOGyJVMa54H4K2QT9opk10WpURaoJgIhANQHvG4B4pCPc2KoUEr277p4jqDOtOqUaWOkX5X8/oE5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5u1zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGwxAAkRtQ3GI95mGFz1V5iUS6V7MpQ2z/lS+bbXRatvpaMiuigAHy\r\ntuzsB27pO7Bs2rBv7AyTIm4BLC3lF5gLZYlyOg/9LkbHjMWA9oMbqADm75Gr\r\noNieSYX6n60S6K0Vpi9ttllDhYFroBX0THy9xT/qk/rHs4a0kSd2RHjhpJYJ\r\nazJjeWzo2eDqZLlaipPweYAtAAHhKpHZl+R9/jMK8xCKXLARfNFMl1jm7etp\r\n3onzaxG18UD3yGh4yjFE900g0UOWRz1RiIAsuXg0VR1Igv1v6ToNGS8iZCYv\r\n2rvEltZdXjz1X4aH5oCa/hsn6lMsY9afCsGR+Zf4pTXDJNiB7PSvpNzPNJg0\r\n6p2fYwjnMjJdvfbwMkTkpy7u75POFbey7nXWtu/BBG3Gel1audGeB7WKL3ng\r\n9+kkASSMmUH3aUQi0SNC4jXr33OeN0JaC1oS2RqFewuE4l9FZ/4UE5CiI3h0\r\nF8HgdUbEStABw0VbMnekUUWA0jk6BE2TYZodbQFYtkNIDs727bZtZykXis8R\r\n+lowR57MKhzrwK3F54mbWcr8nHusUHiZE7SROJfbmrRvc1puMbR6jPwKPCBr\r\nqko6aEWpa5oFaZWn2aklRMwViIJgCuJvAiAKOJpNfWePQcGr1xDwrRi38Wt9\r\n0xI5DlVFutbq8w8Bp7RuH+dNoedn5jsle1M=\r\n=qMee\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d2a5ac03e599829c16c613aaf20b2ffcb046729a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T20:57:02.255Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.7","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.13-renovate-autumndb-21-x-d2a5ac03e599829c16c613aaf20b2ffcb046729a_1659301234757_0.8129626470944755","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.13":{"name":"@balena/jellyfish-client-sdk","version":"13.0.13","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.13","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7f4873ce4c19973fa602df0484419d35f4daa5e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.13.tgz","fileCount":31,"integrity":"sha512-7vRoINorPBn3mYVnkf/T3mFkOhNTcsWa84CBg84+ztqTUomX60WzsUcUXzWJr+CoTgGQBeKOGr6Cex+zZb27ug==","signatures":[{"sig":"MEUCIQC0jHKHjJrpoAg1gJsxj4rhre/fHIutOIppw4hIqT9KnwIgP2B8OzvSE5PWMdiQA2E52ZO9ozJRhn4waLU+6brVlOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5u6eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2aA/+Oac+pCxx/WlfywiDD2coYrXyIWkMaRYoFOQRyGt216ioJJAv\r\nlUTh8g/EJ/S2pDfx7mV/etOo9eCb2Ih1VY2Kz57qiF/VkusbX9JJ9OIj+uNJ\r\n5d0j5HKDC2Xl+GLIUrIMTOL5L3aE4kBh88sRxTCpa70owbrEknMQ+gqA5Dss\r\nc+4povF+K1qVOcIaTumOmWJuMQ4evPx3KvpAoeyMUlN0GmRPQHMmf1RM9QPy\r\npOxYS6N3eRBpHkWdj2uFbBD0+8AAm6umY4B9VJaEENXwy7cOy/YmLHiK3Ufo\r\n8QtKWbp+an8R/6hazWY7t3+KBcUHnX1YHSQdTuBnzqlwxpB7X8aW/no+U/q/\r\noI4Ebsyaq6tDpQBCLNecrH/DZXmNOiJ+yYyVFpnk0hNgGSy/9vxUC4l3AOcv\r\nN7ixh4mlY7gUqv3f2AOKtubgpSy61ezcsu/1417Q+xZt1Q+K5TJ5Cc3qHov+\r\nLFrzJZxCSjZsOH2SqlPSns4PHoN0gJOzlriRagYog8Cq+cUXGVrzef0BKVFx\r\nqAC/REXMhdt5Oej2negqDLeE6flaDZSt7whMP4VW/Was1+of1fqNU7xJkhmD\r\nk5u716SR0DFYedoSUIWIo+d7N/M748dnDJRCXXtB/zO2bmnRKNNbUpHitnDk\r\np6tDK8CJ3yrv10ci85yRdLkyAoq4AQ9DLbk=\r\n=UV3I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d950ea8e435042fab945089cdffaf7aeee13ef7a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T21:03:33.166Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.7","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.13_1659301534183_0.8284693717098899","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.14-renovate-autumndb-21-x-78e79c68c19e09aa38223350980f936abe9fd732":{"name":"@balena/jellyfish-client-sdk","version":"13.0.14-renovate-autumndb-21-x-78e79c68c19e09aa38223350980f936abe9fd732","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.14-renovate-autumndb-21-x-78e79c68c19e09aa38223350980f936abe9fd732","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"66e568fd9593f7ca9d2333517b2134caca383c5d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.14-renovate-autumndb-21-x-78e79c68c19e09aa38223350980f936abe9fd732.tgz","fileCount":31,"integrity":"sha512-3rg+ENl+kjj6lE9HCZrmJVvJDNufrcy8L7cT2OuglKBhU1YwzHuekEQxDB5j+VnQ46tJQoBwjRUNOa116p+xLQ==","signatures":[{"sig":"MEQCICawn+G+7rY5SyCUx/KaWzwCswRC3Kpv9tEnbFc7eOzrAiAOj25GSeLQDVqxPUJQuAGW9MRWB5DsJF/NzMxcfcJVLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5u87ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqX8hAAkLbkyCA+cOT4QxMzIALkk8snWfI/os+ULPk++g7DBpvFNv30\r\nLr3cj0fpoUaZkqpOehP1+GNV42i39ZX/iehe1FSIFP7bQVkots1DrCuxJCdp\r\nF8yEP3EdeK8kWDN4okeZUPM5BFxD05666yHlXdFrJfwzTrDBvjoe0ijsepz4\r\nRGVzWutBs1kSbec6FM0v35LFx28WRHFiwAtWDnDpHmSnfAh+GFM/bBzGHyGA\r\nNeDDGo0Wa9HWBSufWcEKPKvRPmi6Qel4BjWr19PT6WwXjEsTXjrhyqNxzrVt\r\nArpkmAs7glxgV+uqW5he+s5M/C1SBMFhrug+YCWLHmIHcuDV0LVSqwzTr6Xp\r\nwzFiD7eMYs6xG/o20Sl9HZU1WkjbMZ6XQgihTGtxTubKZgmBSc0Mm3B6KAqs\r\nNlwpklnOhFhr5eC7y0qJMuoc3H1MkvbY9Xg4NDHZ3mvwTHGwD+TEDZDLb4VD\r\nETmtb5egStLmAWy+OFaiKYBgf2ocBbTGvhKmYyMhv8O2+gOROLACR8V7loLw\r\nQDPF3pb8kW1dEuqPUh0tn+ZGnh/fZWTQHOQ3QfuE065R8GQiBaidk1ddbOey\r\nhkR4l/DurJVEiBUjLk7DMVnSaMp/74Hmi0+FbUy/Fu4pDEboDnBlEcEyDX5y\r\nviddd+UrUCNa999ta+sWsrejgU8tAlSiY8k=\r\n=DDHn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"78e79c68c19e09aa38223350980f936abe9fd732","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T21:05:24.589Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.14-renovate-autumndb-21-x-78e79c68c19e09aa38223350980f936abe9fd732_1659301691493_0.7711078322751641","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.14":{"name":"@balena/jellyfish-client-sdk","version":"13.0.14","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.14","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"993fe7157a1704f8faefb77ef5b540f82f6d332c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.14.tgz","fileCount":31,"integrity":"sha512-dZtZSkI6EsTSVfiNoPpXfrEJwMQrVGMwZg6oLuZJcg8w4Kvw1CgNZxluOtoLil3rKBWp9N84yqorl6XmvAi0jA==","signatures":[{"sig":"MEUCIECMLJP6pFJWqI3QR9g53Pm88Zz8iCiSJhjaP74oDjn6AiEA1fPImYvyX5BTcPhWOD3S/pS6laTEmNmHE3caJgm/6fk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5vCUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmozgRAAmAxndedNVVDJS3Di/fyw9Od7hfaS7whgbvzQmCJPos15T7uD\r\nhC82pa53upN+LyU9kykYOIAbhRdQfKR0sVxnKHcwXffq88D7OqhPv9gA+UgZ\r\nopu6TPpD4bntCcF4i93JqnJuHrLyybHI47rLdpyWaatEtlXrYn28qCwQMDRg\r\n/nViF9ok0mGe7WJ9wwDtPprLIZGbvka/Bp5bjCBPYgyPkWIJX8jUNadVw85c\r\nZ3Hi6o2kpyXs+2J4dx00FH1Ef9Y5B/TFZ3FJRHOmkkGRKX2Kv4MXswVQ40s8\r\nsgmIcaBsTT8w3iJU7edT+xTmRSqjnLOiaOpKaRKsM4D6xJDV0Mq3M7XZTUJR\r\nN2M2XbUOABuqC6rHmB2v0ppX8fs5lO1FzE6OV/s0HN8NhBNqZyJ5uISytmo9\r\nJHEY8V1RFpE6chYLEsttw+1qIz7eF9kFXTKNrAnsCkDRODSoDsZMxtC8q9p+\r\nz6DvccsfFjLAtUAyn/PMkwlCQ8gEJ85VoieuiwibrpPF81ICpOwACbA0moOG\r\npz2NdT/CJfyRq7TQAw/cRN+3AlLzWDVPwPiKgB1ar7hMJ1xnQ3MjB4rQ6Yqs\r\noSd3zVfd86ovpuGzGYIDQQGJ3P/WPYhLQHJL9oOGS/Fx7ttmWkQ5u2x9hWpF\r\nKyXyN/Ep5sKL7LYw7E5i5ez7FCLA9VZy2yc=\r\n=kQhi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"33218b5d60cd6dc3a0b0670b3e000a55fb724cd9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T21:11:48.551Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.7.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.14_1659302036133_0.37276526075892114","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.15-renovate-simple-git-hooks-2-x-d24ba6cde82ddfaf6aca23c75c250b420714b666":{"name":"@balena/jellyfish-client-sdk","version":"13.0.15-renovate-simple-git-hooks-2-x-d24ba6cde82ddfaf6aca23c75c250b420714b666","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.15-renovate-simple-git-hooks-2-x-d24ba6cde82ddfaf6aca23c75c250b420714b666","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"261a91562dc04394860bd5eade97d25498732f2b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.15-renovate-simple-git-hooks-2-x-d24ba6cde82ddfaf6aca23c75c250b420714b666.tgz","fileCount":31,"integrity":"sha512-WDWV/yS+SPwbAM9HkRPyxHsnlFJrdE+bBWlTo8MtzMR9bUH7lWHiiPT1rD75edKgF5JOx0M42S61DW26VKRy4A==","signatures":[{"sig":"MEYCIQCpEde49pf5r/D6yfiW+8LUklDyUBPoBzPgd5r1jWA4xAIhANbdd+fKo5+Y4ciUyEKIBwHNLTKDQWTKuW5TBnnCX/MF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5vEZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHPBAAosvUUTDJp+kss/Gw8s0bJPVH4v8sujU5xnGKvIugbQrktUm+\r\nROiEglOAUU4Nf3SvANy90YoKergIlHXUR4uoY2VCsv0kcm9hlZVoJ7aGywe0\r\nlDnPL7Uol9J1EIlEoDA2zgSGIudFLz0T7Ut0ex6OjKywLu8O/cqLOl471+yG\r\nENYRpTOvcoM6dpDdJt+T0NhzKHURhUgJn807NmgY9rG5JB4z5BZwPlJyDIUp\r\n+z9KNyiw55MVtCAPhAe3AZ8wIHAWUiM8nCDOYZBxd1qD3xl9FVO8dbwHWd7I\r\nqO46vLD2GA5jSf7PywVCi7TewrzijbERGmrNp7P5YQ8vV14uZd1ITfzccaSR\r\nzArb7OYTZiWhi9H8QGXVsqpwxibOif2fmoP6eL/NlLBiLcWqDVx/jBym5Kp0\r\nxwQ1UvRkbiNL5Lf+6DBU8OKFRZ4hIAQ1L3L+fhuVBy4PV792kXE/s8Vum433\r\n/O611XhwIveRKQMB5Y4DzmfvDYCh6bCgiAlAErhi1loUWmYDerTNlS6PUZ4e\r\n4F5buU+oq5iftZLTB7h9C7Yk4L3C5XdJbNreqXexFOfds14jvAcGs/EASm5p\r\nOM4TDau9ZUxpKIVhUtCvCBlWvG46ipQwA7CSWag066oIaN0FtDiQYnDcZdjH\r\neqqPk7lcJDrPAeEoqhomgwcd7aYcaPGofcA=\r\n=uUJL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d24ba6cde82ddfaf6aca23c75c250b420714b666","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T21:12:53.329Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.15-renovate-simple-git-hooks-2-x-d24ba6cde82ddfaf6aca23c75c250b420714b666_1659302169329_0.41381382849476256","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.15":{"name":"@balena/jellyfish-client-sdk","version":"13.0.15","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.15","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a47c3bd5fa9faad162e05a868a47e888647b5de1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.15.tgz","fileCount":31,"integrity":"sha512-yQNbqO8gWHZe81nkdhJAOE9IzSc6IPcVcIF0mKG1QSngd4CSjO1G20n8MQoIkptP4VhOLGoPzdEYE9M/x0h3yA==","signatures":[{"sig":"MEUCICMT6uh3G4arjZf9p9BCiaej1UAzBjUYfYhIRY4JD9gGAiEAhl7yJB8rGejYakLVb9WQ08LqHvFX+D1DvXGEjbbEkDk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5vKkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbRBAAk+ghtnytZnvt5lTwjRQEx0Fz7aEWXbVIZg1KfG0qW1/KPqcK\r\n4tFsQrVse52fKdyUuFf7iMz2b0H4PyGVAnvkROXciCgyNwsQJlC2+lcrHypL\r\n7GJHc1JcJEurXLkxBY8MYTyxTURAU5/0oQDZcb9b1XqU6RUKkUvrX9m3uPKb\r\nDG2S/vg3atlOOtqXaTrYvaji94Z8ke2pMnGbqs3cG6ifSfOtW+UI5+YaohWm\r\nfQ2vGGMoqlWFQQhkwfgs40DcvXefaurky/qpglrtJEzarM9sUI+UOnuxJE1u\r\n88NkaneNFNryV85xuCOLXu2+DMYfq+MrvYJ/L8r5mL9yU/9AdB/x1ZxpCBJT\r\nwrhFHIGXJp/89LhK7Gm+O1q2ptQ6hcAg2B+qFmVkOtM7bjWvePiT2Sp3HPHo\r\nn+CkVjE9NrvGh52Ui4GnE53kKobkZIbXnFteGSKci/9UeMcMt0A+uQAIv+Lx\r\nlk7tBeuvhpCPF7cL0aqAenAk7BqslylEGYK+zwlFn6ueNTTs7dzMEVEF3bST\r\ndGpjSnth/sEN0bsDHIeK4nZdpcBJzpVu62gVHceya8DSlDqGtmoJ2HNLRks2\r\nYhN2YfMJI8rWvrVJDtDvFX9n580DcDeqTPGdh+ucUBMx3Ca040eydJhhoU1l\r\nVcG3GcCPMsCP0dTBLxKWY+IUhWoFg3L4KSE=\r\n=P4Uf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4e8a7d27296c810992660168203aa743fafd72ba","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T21:20:38.056Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.15_1659302564532_0.6621671030026375","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.16-renovate-autumndb-21-x-d7984bc0b6c78f0d22f872c19495eccb85881735":{"name":"@balena/jellyfish-client-sdk","version":"13.0.16-renovate-autumndb-21-x-d7984bc0b6c78f0d22f872c19495eccb85881735","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.16-renovate-autumndb-21-x-d7984bc0b6c78f0d22f872c19495eccb85881735","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7034c9451904e442cc5a03b6b9e6cf5e5839510d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.16-renovate-autumndb-21-x-d7984bc0b6c78f0d22f872c19495eccb85881735.tgz","fileCount":31,"integrity":"sha512-zBLwNbwbK3qjhscj4aqzBMcn3M/ZVHbVjvaZMYSioEDmvwQFD6YStE3VabnYgHMPPBq8W+2NRs2yxY+o/nRatQ==","signatures":[{"sig":"MEUCIQDCItl0LeflScFMxAGx8nre7B1f6zM8nl4oJvk6cF9QuwIgLxObZnBr/UpN4X6peD1S07Y34PxE/4CLqFAzz5BbO/8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5xI9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoP5g/+PsZWuKZkkrsXJIvGVJ5eE+K2nYLmh7TYx4CKqj42l3CmoVDp\r\nk2eQGsw1xroAMhBWEAwvPRPxLtZTtAQlP4BRo+tREYBxbFowagKGG0mY9iEo\r\n8s1IA4sadUOsTgGpsSAlfJlqG4Y3qL4XDXj9pkMUlvFJSItNg9XQdacnvXIE\r\nVAtulsf1eR/mcuwP1tQjI/5R8i/eP3Keekj8Hu9dEZUSWKTMEqvXAzczTFd0\r\naFIGTsxwADFMKTHWj/1KCUj3fu/Xga/jq5aFps6LNcPHecHLJXbg6xubzSEA\r\n1SjPsbWXF2zE2NwwrBCkV22FDhTi5ors6FZd6yYU0eysWgRFt/99PJ7Gee18\r\nFQ20I0S4yflR0NgCEDJsMh+bKxKLu0N23xDQ/frzXHNGllaeaeEgYza/CRMi\r\ntcDiCbKEUWUbikBAbujt7fKDIogU5TLJbNsehhnvWWHuhKlWj/P9mhCmG9nY\r\nfAKMU+FLVE3j/4zBF7/DgwcXkMFsnKRuPvE1FSFAdlLhDbZM/+dGP4bP2aaz\r\nsCIDQHvLBn6Kr3gdUZMfbh4aW/p4QGltA99H8m8W82JJOzSFiHAL5VTqTK2Y\r\n2DPKu8Fksw5LyuuOtH6oW7+q3AbwUZTbrf4O2LxsodCHBD0O/vzdm0z2HAWu\r\n5aOLUgcPfx1K9Fjwdgga/ojNynxF/jUd17c=\r\n=LyN6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d7984bc0b6c78f0d22f872c19495eccb85881735","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-31T23:33:49.941Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.9","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.16-renovate-autumndb-21-x-d7984bc0b6c78f0d22f872c19495eccb85881735_1659310652856_0.06653707364042538","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.16":{"name":"@balena/jellyfish-client-sdk","version":"13.0.16","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.16","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f0c7ff95af011cf895abc95d0389b105ad8c12fb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.16.tgz","fileCount":31,"integrity":"sha512-cX0+sw70xdpvjfMfZYTkmwXox6dueFvg/W39VYzX17HZqfyZkbpdBUk2ApNuIdKjLePjwEjT0zf6K3J1RHMK7w==","signatures":[{"sig":"MEQCIEDhmzHyVLSmayf9BGJN9CqB4KbOH0j6mdLNMfi4p2QfAiBvzfpcsP3wNU+0iZlp1uoz5EZr40zCj459+hs4sbvJeg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5xmlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkFA//WxpPu+uZwxA7gebo0sevXQTxrrJQ6uvs+UBiJRI9dlWH7R13\r\nZ3kaQIFfpb/Qs3DTTpEWIgNa5GNTAvp/JI+NtadIoelOwhcHEgwrb6YRWYlw\r\nNiKTJ8vyoCP/+sA1TyJMHAeszjjsx3T21Wd6+QaxSIkn6IWAbAnuCVomeog1\r\ny84ua3TSfB5bIJ3aG2fzwL5kYIm7EAmV1TFrz+hspxBiJc0s9Ju02SW5vjYy\r\nX8iXrkNyU4rqBk1UJxK4+Wf4Hw+5W5W5Z6t3ae3R6PwDqdpIsQxyHuR7/IQu\r\n88N6sJvKqad0Y9UfGTH1xgx+C7MYmNLAx0qapEfnjZ0IlKt7Tm7SIF6JZGPC\r\nZc0QpfR8XAbBdvchQlnXJRRjm3KDNa0A9vmlijoWpk9Uwx3S1OpV3cNlqiTO\r\n1cADtxxgkdGis1bdA/t3LS7xTA79nWKqo1ZIDSicppXSpkWkRj8/SYW+qbfh\r\nVJLAoQnWANS57gt6Z49gZY31TuCV9AjenKPnxh2qtkEZcmR11uWOKzAjpfIU\r\nFlLORzOyUQJ+JQt7dyYy/m3MAvHTNc9cj1oI8DQheMVz9oKyagjAbZnwB/h0\r\neKyO+W5STuyJDQbMe+lgDTkNUHdkp70bYFMLRHL8N0UQIf+2C3qV/gkxtTKv\r\nLK6pl5NiyAEO4gYCiKGduAoHwWm+SErBOlY=\r\n=F3sJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5725d7092f759511bd7322f938ad1f5fcfd54cd0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-01T00:06:48.360Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.9","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.16_1659312548922_0.526734341037403","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.17-renovate-autumndb-21-x-60aa57334da5fc12284b8322df6d222fdefb0c90":{"name":"@balena/jellyfish-client-sdk","version":"13.0.17-renovate-autumndb-21-x-60aa57334da5fc12284b8322df6d222fdefb0c90","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.17-renovate-autumndb-21-x-60aa57334da5fc12284b8322df6d222fdefb0c90","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"487e0f20248290ebb1ece9fd7876fbda6750bb51","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.17-renovate-autumndb-21-x-60aa57334da5fc12284b8322df6d222fdefb0c90.tgz","fileCount":31,"integrity":"sha512-81tqaRy0pCQ3thQJIPIR1OiJ9dlLPNbi3KdYyXVGdaFSj6a3O3H0WB5LddbDUXX2527EWpqFfQstDKdYUVKVmg==","signatures":[{"sig":"MEUCIQDMoU0Ln+gbRHam0OLTKBM3SxayoFmynG0XO/enVcnHngIgDE7rR2jmJBPtQN06u6VuTivbIjYqZHRhkp1nyGctPQc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5znWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqL+w//f0xz1EYKGbJZydm98kTtXPMFYK1kkYDjH2s+aCicTMCBv1Tg\r\n7+FvWvbwI0wdMdQYsC/hU2sqyEs0Z4s/ilVnzoNyzGyVnMF24Bob+018hVdP\r\n5eiAWooe2oKaYKElYImtgw1JAQyKbhQEVAmyOiQlI15dViawq6YkD7Ie5d2h\r\nFInhTsmYArk9yIDXXIvgG7EJObWG9EvySf7SWYPdke1J3KenrnmuRyvyildP\r\nzvnZzZuqVB4stjRv+89JYOxwfMbu1lo2paddkpEJR2i/pB415ddwXlhxfwnD\r\nCCPsKaU9gMdIL9tNhyVqDJTMU1vHLP+XwQDHw8DOiQz9R3oaw3tAHvuWsxbP\r\nzmneZsRCBvunYJQHSBUUepParQERT8BZBnPitcREY7WQR5Ej6A0+XY1OkPLg\r\nV1xaQc7al7MtEA5o39tnXJBvI9pV8xfyhwC30HoCz4sPuAj+wVIUPP1G/Tx9\r\n4R8oUJOrCo0Jz/vRUoE9N6GdiZi29PBtR7vR947eyTmYd5DZfeIKKdvC87kZ\r\n/FawHUhgAKxPiq1VvwfdSNQge6N/qbOJyHxsGc6DYpVZX62snWyKt+GQ8aQl\r\nFovVF6Mf24vn0y0JH/oMK/2KXx+3wTOHgAnJzhpyirUG00RHs/svoumji2Sp\r\nWe5EX0GDzddG53XcSj8zxpGgIv2T/FDp1Xs=\r\n=oQ46\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"60aa57334da5fc12284b8322df6d222fdefb0c90","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-01T02:23:04.229Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.11","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.17-renovate-autumndb-21-x-60aa57334da5fc12284b8322df6d222fdefb0c90_1659320790032_0.42456464925068227","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.17":{"name":"@balena/jellyfish-client-sdk","version":"13.0.17","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.17","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7d8a783f49b4b92b3889366c7a0225357cdb3174","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.17.tgz","fileCount":31,"integrity":"sha512-wGBPrC3f6WVSpxlGYrd2kbAQHNonFtXLMcK7HaI65Eti3m/vqo1zlqnEa/kfaZXfcKttJUluzBOUMpX20b5Ccw==","signatures":[{"sig":"MEYCIQC+SaPpZnXY+f8S9dIeoclkMQhL+fqAAATv7a8zl2AI3QIhAMIden4jSXp7T/XEzdZLahmI/75UOCq+Wxo720WexxXe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5zwjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2oxAAhok00aS9rQDnbnt//8IiYd1iY5OnQlzoZ5irSgXYCcDK+f+Q\r\nuJ1nmuaN5P5CTef5mywCQACLttZfisFxOAJUSImf8ysXPIUbxeroys2sCQE1\r\n7cIGduxy8mLZoRKFA+AemXa5LT39arYaCZ9VoYQ86Wd+a3wlJlKcUhn8ZQRD\r\n5AT7q+NRFhH9jAuvlxO1ONE4q2RoWkuYh/VqMW1X+DBB/+68+s8KfC9muM4L\r\nKDkPY4nJV1EdwWpNK5TR4NUDZXYH4kC3IUv6Y3keoaptSHeLPFYNxLauOvqg\r\ndjiVSjWDriPsqyXMJcj0gqfAxu4mxvfwf+Tn+OOpH8yneL/ouYZURLvX9GVV\r\nyc1DoSJ2gqryNpOGCXr7PJ8y9dYpW3z5/SXrfdI7U92NvE9q3ZghJjLm33hf\r\nvLdiChf4fUTGh1fN4kD6KHpMpht2/7pTlkhHNfilIjHzZv/PzpOzfxKVCBuD\r\ncSWODmI7E9zYuU4qS6FK5x2G5HaNUnqSWqrm/yVY6RaECJqKfcQX/A/y1VSS\r\nhtvSvMusygmF5dBqKIenv/G+pYhaRqPVDMretjwXGdMoHwWGiF8OpRFhH5XT\r\n/Hdw1fF13d4wAQ46nEOioFNvVXioJT4VLayppM1CXkaKCt/JD8HT+HnhCGTU\r\nEAN6ymthhjAG/sTHQcvvg6W6jiFntr5bK8o=\r\n=CtY2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aa9661aace6234f19a341fb141c8c0ebbf2be600","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-01T02:33:34.349Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.11","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.17_1659321378930_0.8402853896761369","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.18-renovate-autumndb-21-x-c199a2912f15dcddd09783993374479e16ea3e77":{"name":"@balena/jellyfish-client-sdk","version":"13.0.18-renovate-autumndb-21-x-c199a2912f15dcddd09783993374479e16ea3e77","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.18-renovate-autumndb-21-x-c199a2912f15dcddd09783993374479e16ea3e77","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"35b24a1aa330f4fe171a573438c57d9272c4a0fd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.18-renovate-autumndb-21-x-c199a2912f15dcddd09783993374479e16ea3e77.tgz","fileCount":31,"integrity":"sha512-nJMopu9tf8Tf7nMRh79gGAs+fw3drtcsHD8UfWPrgcTFoalsD9riiHCgR12kjEh1a6Xis+iqBxZiFn02tV/mEA==","signatures":[{"sig":"MEUCIAjnza8lfsyg4FoQQq4vmojJGsbDZiZtwhUrZ5Llg+WBAiEAqOxnDr0GM7q9G5Mh3uF06Lh2bFY9H/j8b5L2CWs8ito=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi52mCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIQw//a+ddcJk0ntRDmioH2TfvmvKICPNjOg1p8HQgvZNjYpOHV44X\r\nVJUlZBoJ6VpxbafpkAoVQa9eOmV5QhfOp9iZscBNCzsgt7SICtg+MFI1UFX1\r\nTvMYuCledzb7DryDDJQ/CyznjeEbwa1xz3KDXCv9zXM8226YgGB39UmPMXMQ\r\nFa1qMeEH+DW4sbtTEb0ENAX1fcBMaTDrRQq83d2U4p4S4GAamoH8087pWL45\r\ncD0Nxg4OT8MI/HmPG80XkBx5ByQ8GEhK/juy6zM793sIrgyq7zXBqzqLVWwR\r\nELQBh5KVyRUMQQDb4fyOI4Ke2op/7PTg72rTNFkoJ3GtmqHLhVp+aSbeB3ZU\r\nkNd97d1lzBvLZT932w7XCiEufVPL64mJWse7TblYBLipTomL3J02oNvXI7oM\r\nw2OJEAK/PJzQMsifdTR7gNNDzOfwqnLpghmKx7jLnBxqdrVri8omXRRZ75ER\r\ns1BYx3O/MVQ9tNHn2+XiVW8RihIfLIkEAXWYGQMtvvUrRWch8zpyiV50+Rl/\r\nH4VXLmIt7FctZFl18lzK3CG/ixFJJbniIH+faszLQXXr7dQ/rPdT3Atuyp9i\r\nIRsT3nSbiq2oqBoyO60CM+MDU0COoy+moocXXI9SbwHQPRtjHYexZc+coszh\r\nUm5YuZ/R7V8m6aiLw49cLggUs42ksWXVo6s=\r\n=eF/v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c199a2912f15dcddd09783993374479e16ea3e77","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-01T05:46:31.196Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.14","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.18-renovate-autumndb-21-x-c199a2912f15dcddd09783993374479e16ea3e77_1659332993925_0.8501128657708876","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.18":{"name":"@balena/jellyfish-client-sdk","version":"13.0.18","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.18","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7b7506921d3b9db06127b4698118ee002090366b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.18.tgz","fileCount":31,"integrity":"sha512-RKSvzH+2NJplEB0gjVpy9ek0W4BwUSzdJweQpnj30UOHbvi2IqySdeMZ5Dae57bue3HPXuE7NiDRsm9iy6rLCA==","signatures":[{"sig":"MEUCIQCyVRQGRCdpBvqhkZkqmeyfixdi/dylk/EIdADwN99B/gIgSatIUYS54+Pby+N6oi0AJnazo8kXh/o/scNfLaLRKpw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi52qJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpspw//bWfkUHLlEYYZTKqvK6oNiyuoX1bvysgDk8DH4ncQkeEoii1t\r\nIbifJ4b6DU1V9iaAaWmdF2oedSRHF9pA68SkZKOWSrS1wTSsGIESCI6nz4BY\r\nNF84gxrEVQgltZbh/9nz6e0LESDQIFZgRmBUS00WmI5Oh8g6rrzKkG4pTrVB\r\nIopuaELREJ2cHl1EDvCLmSeYUYnQZyXUNLMcpcP0TVrK05wpvuQsN83OFTAN\r\nGw0Rs1pNkaOyshzMXL1m9dJdPwnaXst/Q3ub9b6QGvtTKK3FR6Gfc2F7hogY\r\nX+atkKXIjPFyfM5Vl/WmR4Zpb0ZpEUmX7dmUj84bmSas2oAMySqf9lsGdXm+\r\njqvv9FZ/e+3g0UOe2Tj46Ig7BnnPScf51OyUVscD47vMBMkpT6Tmq2aQnlnH\r\nyD/QWjEaXfv03Ab3Coqgbm077s3Qt6QaOSHe/XTYtrkFTo8CH3bZy1PI2wLy\r\n3FPC4zJtTQlnYMnfSfPtRWLZU0YYmV2gMb0MeoIxV41Y79HcOWZ5GrAzuReP\r\nfquq58c2DWsLTJN+jYUIzr2n3UmxH5GkaW1tDvDKQFMNOROG09XHUTCi1soE\r\nlYFb3Y/sxUxrkQAOmv5heg7T+mnofNdRnz1yAD/ZJUvfZiSrE/mcoixOjoHP\r\n4U8vuBoqzkFsfLpW6W4JJ/curg7DbgIxRbE=\r\n=tZxM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"024a02057e908a6a79a9ca591f1929dea0b1cb12","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-01T05:50:51.929Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.14","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.18_1659333256857_0.45462410319696756","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.19-renovate-autumndb-21-x-c9048a92374213d787cc463771a8d4714c5950b1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.19-renovate-autumndb-21-x-c9048a92374213d787cc463771a8d4714c5950b1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.19-renovate-autumndb-21-x-c9048a92374213d787cc463771a8d4714c5950b1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3f5c58c372506a42eeb172acb90b58eb5ebc6de3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.19-renovate-autumndb-21-x-c9048a92374213d787cc463771a8d4714c5950b1.tgz","fileCount":31,"integrity":"sha512-k4aD2R7///aXERoTZSzOxT9ULdXQ+QPr0wOPXu9R8hafIWMWGjlyFk4cbR7dVWBubxzeNP9pZFVIrdnai29qjQ==","signatures":[{"sig":"MEUCIEru3pAzB8S56Mn47VGP20yHoeNnUFFNnYYWqeosXTGEAiEAkogVmvejkOBSQJ1MyN+KnHqO7PnJLFSPfJmtFU/yLhw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6+AZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpY8Q/8ClckYEzTkslJXPy5em9QCx/6cfGbdkq+0c7T4cmPRn/MMJoq\r\nFAalIBNgw1xRqsw3kUQ4b5hzGcDGC2FiTkMpVcMlUsv90Ewt+PZKprumz7Ni\r\n+P5xdGPfNtwSn9KjcVzys69o79uzhX6JW6gK7BSpAOqmq6Mqn8mIcbJg3kWA\r\njmpBqii1As7h885GxCAUX/GVFBkuuEGPX0VmvnPYg3hUFvL5dyv3PNMA0fjk\r\nBm5VA5N5y+F8hbsS6CUx7aAi4q9Yu0uGm254L7elqw/cMneXQKIMQ+88aWtg\r\ndWM7pkFef1MK1/NLqpZYiA3gAKXygiV4/Iq+NgwHHHeP5h7sziOpz05RrbMg\r\n9+DsIdWX2v+3ihjKN/b9N/cmQXr5EBPMHl3KvfOJRIpJcyvguiUE+GkjEHQO\r\nWVGVbfWjBI9+ydOq8l/tyANANfhf4ISIsTQcPZqupJR2WwK9F2X67yW1zr08\r\nsTbbJWJGp1hbf5NdRy+pgld7n6YlBTwrLK/pn0UoLRVfJ+/unM5DkQwWjWDC\r\niocEBjcoQG+9NltRq2fw1ET+Dnyn2ts6TUcR12yTIWOkleiRAT2WiYOG9IOk\r\nmni3pg/q9xKB/K2RNaGedevpBKuT7NJ0iAeqKkTdYJ9lEVbc43zGIjA+OWOS\r\nOcJvCkVH8XMAvG20OyZENz06dIH5UcG2yP4=\r\n=Ycur\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c9048a92374213d787cc463771a8d4714c5950b1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-04T15:01:33.084Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.15","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.19-renovate-autumndb-21-x-c9048a92374213d787cc463771a8d4714c5950b1_1659625497750_0.5975619896155155","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.19":{"name":"@balena/jellyfish-client-sdk","version":"13.0.19","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.19","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"593dc78b8ea153a8e34e1e13a691d05d15fbc667","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.19.tgz","fileCount":31,"integrity":"sha512-HPizCtzRI5bEXJWGayQ4+H3txFiwL1YF+Mh6AGHU14TWxoNCCu5nS7kcqnEMO/bI0cWdkJbWTVBWN81bdhRXPQ==","signatures":[{"sig":"MEUCIQCqW4huK4qQKxPMBBgLfCJkRUSoUz1E5nD6F26pHtSUxwIgCjr6vB0PGQLT3BSFwrgkJZy1z9dAp2Ucb6mF2PWx3/4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6+D2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3UA/+I0kUOjITzLbu4dVv4jrftJcpf1ejlIPaJDSfXhMe+FOgLRdY\r\n4TCmDSlCuBkfvqje9LGAViqECpvMtT3SrX54iX2aalePCzFzQFopfqNPGyOH\r\nN1LdgPHhJv/IPD7WtlvTL04DbAIiXRfzYr3wewR00AbMf411pkKSAqqH+w7c\r\nvXJk9fFtx5APtyLCGgAj/x5G6HVSJYkcxaAXSt/WVh7o0klI+aPSGnyF8qfl\r\nexbRaBz55gl4tIIPGO7I+q+nwqlap9KR7pHd49uAo0j9/5MfqxxgHde6zjK0\r\n9h+uPpHIYdjQrtK2scuTT6ovQ0cpM6gaOVIk/sD2rT8ZVhkmrDXAosO+sJcW\r\n9OYFclj6e5QYRjPcthV1sP+1McpuZ2RCKkTre96hzhcWiWPViy2AG1gPpuhc\r\nS1P3MVaRyoQEyjNQrvDw+bnGTHt3OfrBiS3mMZE4ybyETpat9if7y0qwlckk\r\naTdep/0VsTQrefHJnXa7+UKps0Io1RQxjqZmXjaW/lDuXwgwhDERZ85IG/eQ\r\ng5egqvSu8ywUs4NB/s1a94cmakpacaMcarc3hHiDLCfDtTZRZEZYNf0fwj4w\r\n+y70KIHXiuzRGTCdzn48i40nHPr5V6Ks4WETv4V5R/VI6R8OUNAY+/eVw4kC\r\nNivV1i/hi/MO4Pvhw8hz7QdBbZaaeATAwXI=\r\n=SMXP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"67e0f40c7342f2f2158331568de1438ee5f80497","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-04T15:06:33.719Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^21.3.15","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.19_1659625718215_0.497944305070501","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.20-renovate-autumndb-22-x-e5791a4d5b13fa1a3ff698b28aae7d3568fd2232":{"name":"@balena/jellyfish-client-sdk","version":"13.0.20-renovate-autumndb-22-x-e5791a4d5b13fa1a3ff698b28aae7d3568fd2232","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.20-renovate-autumndb-22-x-e5791a4d5b13fa1a3ff698b28aae7d3568fd2232","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dd5987c279eea23ac2e93a81848892d97a9065af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.20-renovate-autumndb-22-x-e5791a4d5b13fa1a3ff698b28aae7d3568fd2232.tgz","fileCount":31,"integrity":"sha512-Klx3Cfv0V9Hq+6jsBatPLetOM6HYZHv1NeDgReD1nPkK1H0LyarIFCO/3EMqpAx+ybxqv3jqpEJkkU3c2fHxVQ==","signatures":[{"sig":"MEUCIC2kmHrAwtdSXv6b/nehVOr8bM5CR4BqiNHi3+VfzUKkAiEAybJ0LYaLwvr8bWRmr1ePhv/1NtvTaX4b9cjPJ4vO+ac=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7CzIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqxcw/+KaYbRpCqrzO81fpoMnB/Q4puENTwlxe7828mQlQ2NpTwGSiB\r\niAdjUsK1gWkpjcSy2/BPwGTFvb/J2yZ0PtpKzVZfadDBEwoCxZYCithMZrGn\r\norZBr0O3HK9z7yFi38rlqw01wwRFYwqcsINDVkKTRmjSliuS6sjHm1Wa3l1b\r\nnOJLrUuJCEDaHMoE6hNQukHFOdE+d9OmvhcVF5Wd2zII6OaTAJJ66XC0lif1\r\n6ptP0VFG312XMTvpyuk7dUeTGRi7nzxIO/nVZ6NWzMYPXw2Rxs+dyGfcvPOQ\r\n3fjrJm8X8JXT84Z6fsxvJLCKTHkO3Loh4lrMJIipJWoVyEdYwUoCMBqpdG2/\r\nDVEQ06SJQBEYeDUHrd70/wGyEo6diYoiORkNof2L4d5OL9BKNc/fPt36uT/6\r\n+LNnRehkbZJeljXJzO0EB9BuDATUh/gq2QtXbjUvgxNK/fAisgoSybVjs9wT\r\nLGE201uIkmb/+yHEHKfdxcUGwI1XQboRHSEk0+zYCnq6wSSGs4ly51WYSMa/\r\nh27/fy+OWhbKoaijxIoCoB7VA0EojLwVaVXHbx7iiF/l2W0hwIcDX1DNMSac\r\nzvZHsDj1pQTqx4KCcF0kMWI4obVReUDZrVaKynLTz+77BxV/5c/fBmEnhF1y\r\nXCcT03j48XX7eBaVgoHzZApKAyrsTrCWl4s=\r\n=IjM3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e5791a4d5b13fa1a3ff698b28aae7d3568fd2232","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-04T20:28:57.017Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.20-renovate-autumndb-22-x-e5791a4d5b13fa1a3ff698b28aae7d3568fd2232_1659645128320_0.04315007251844749","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.20":{"name":"@balena/jellyfish-client-sdk","version":"13.0.20","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.20","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"208176562f70c3ebb44ab57d7e867fd828519091","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.20.tgz","fileCount":31,"integrity":"sha512-VbqlNMEQ01HRJ6wZcTHGDeR7rAf7W+tGORcXs+zDKaIVzNtbjNW9TzCQ3g315mVnNFy2ozJb1Ddw2qI0iAgq4Q==","signatures":[{"sig":"MEUCIF9WY89RaKcSW27phDqZ0fM09Sc/04Aa4drGuCn32soaAiEA/UlVWEufX+ZN+3XnAtkN8657g26LlVq69Ue2GBDLW9Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7C3HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5nRAAn2D2wckz8ylisNpOALU5YiNpcABjPJ/EOqCrsfPPwpQvXxci\r\nuvNP21JzUgAlie32F8y76++QABWtFbAO5qHMvg0kEJ+0KzehV6yHuo075XZG\r\ndI5VPAazwuZfDDTzi8b7iXOEiZ5h9gOdnY92kXAahbJcdv4pNIR/K6cHeJMR\r\nVM4TwYrE/ICNnML1GkmqSYUnD9DR8ofbkJ7qH2/sqC9tGgUyW+VdhL97LO2k\r\nLkkmyKQ5ermltsdcOFl1Yg15i+NLL540lzuNEWZ88KjfrOIZ83L/XjTfVCgS\r\nMuFXHNLfn5Rvm9ma6beCWCp4xeGPH2vs8fWSiGd4IVBB3zvPbrUFMTGmyRQs\r\nBZ/9eMSjW1niavb6v1KJwoQKL7lIpUKEqrgFJwBQPzQf7cUiAAx4xtPRkKKq\r\neppI3cOu6xtn37lN/USIKOGXAhSceYTOu2R97SnNPz2MIE0ItOms4TDBE4Jr\r\nr1VDxdvb8WoaS5At0HzaFr0PGt2vSwaGNXRSDifspjIZuQWFpbQk507bdItI\r\nQPo67nrSfU/2yeHnXImYtbeCmNjPEkxHkvvZC+8BOfz7dHNfKOQ82sxmOwvO\r\nRAsyixBQdpabf0BfrocNhpkiQuo3EUZTK/ne4nB+eXtvSq+dAMBpwWxyqx7W\r\nXeCuxLdLGaY7BMQJUMtyzKBTCZMGsg11N1s=\r\n=V2QA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2ce1cd121b160d21fb7bec42d462f14cd558f829","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-04T20:33:52.965Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.20_1659645382888_0.56854263307901","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.21-renovate-autumndb-22-x-7f1011d7d34e5b19f048fa9acce4f80c71273f5b":{"name":"@balena/jellyfish-client-sdk","version":"13.0.21-renovate-autumndb-22-x-7f1011d7d34e5b19f048fa9acce4f80c71273f5b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.21-renovate-autumndb-22-x-7f1011d7d34e5b19f048fa9acce4f80c71273f5b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f8f58788c9715d42f2c78b570f9e27f2dc37707d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.21-renovate-autumndb-22-x-7f1011d7d34e5b19f048fa9acce4f80c71273f5b.tgz","fileCount":31,"integrity":"sha512-uDhSr1R6UMloa71O5TX8OYnr68wHaWz/G+LV26e5Or0r6TN/xB81YSW8KakFsrS6Z3AmUvSx9liVjWKXjacpcg==","signatures":[{"sig":"MEUCIQC2NimxnoLDkLaT5kLs4QThZGb7hrfdJuli14O8PF1qVwIgaaF4ZEsnnFcco9jsqMZRNKAVghlaizHrAXpqW0d0cUI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7dX+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3sA/9HIgnSNaI/KVndKG4dSJYGguGxtVWFNImI6f+OyGGbGDfKCxm\r\n/9NfxPwBR9CLssYfN/jy0KlvWu/vS6ekJJd7wATFzUAarzaR7rt5UB3seqUs\r\nqUOQCu+vdcf89gkhshi49LLMQe/hOk4GsgzjMuoFcKdgxLIOqt2lShZYB7fN\r\nfJWiSypW1WuGr+YdSCV6IU3fwislFqT+evJ8WbqCSzVyEu2xE93emgbaPo/Z\r\nKwjLG05qAYRA1wKKBHA5AoWWD2d/tzFIkymo3oPfqWbU7Yjwnduj75+HVpXL\r\n+4kvRKpnDpZ+SVIrx7v8j1r9OQEIvmzOAwxVBm0z5Lh6YWiyPzKLiLpseYlk\r\nMJqZemhGDDHbIgFfjAL3lW5bG5sSFocyZvFW7pAQ8B3IEvsY9HozbT03GaLi\r\nuXf+nmjHjf2kKR5294gwWBVzVZZx5lMKiVRazFi6Z9mYxXPd4XS1DuLlfReY\r\nSoC8eolQd3GryJJGbPJfgXOM2fGvdBzzuggn5cDiOhV9hxeWHFwSAmflixAg\r\nJwVOswODxGrGSRiI/l0oBbl1SGietYzEFNY5sIDJnjSzEz9SB8vVScEndEBI\r\ndfAXjJeEENEQknMZK4WJ+0I3EREQyQsS04v2jzdoBUsgw9s+/6XRrmB1fvgc\r\ndNCsbyeXBdopwgrHtel5drJRQf2IR4TrS0o=\r\n=PDq7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7f1011d7d34e5b19f048fa9acce4f80c71273f5b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-06T02:42:34.602Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.2","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.21-renovate-autumndb-22-x-7f1011d7d34e5b19f048fa9acce4f80c71273f5b_1659753982265_0.6765649997949545","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.21":{"name":"@balena/jellyfish-client-sdk","version":"13.0.21","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.21","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4e9379e0247235373114cb1dc1a2467a859fef4b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.21.tgz","fileCount":31,"integrity":"sha512-481IMMsmMIfSYR/S4S33s9/4HMPIu6yTmKvudwNMswCu1hrXDdE1BTXO4tS2rGQVGvyyFGWooO4fKMY3WuGq7A==","signatures":[{"sig":"MEQCICcU+4mKuIEItgl4YwtZ+N8szEE2AHOx74f+DMfICQIjAiA5kB4+1j75FFd7Ogn7YwtIvltBuNCrvZ4QWzSra2CS+A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7dbBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjXw//dt989XBVwBerBnaP3F1RL6ohGQQLTkg5YYT3jV+s+GN4LHIl\r\nCiuFQtuG+9dMw9p1bGpRept7knJCe6zgQ4S2zNKOv6TxvsU5BrAqNvDolhF+\r\nnbaU8JvE5hrw5pZlBuRF27yPae3Rb/X2yIZcUpvswqc8nF1ngRtdWLiVbOTn\r\nqOjozNkFGRqgkMG8B4ZCDYzqwu2JYrWuQS2qG4W8IO+mdjQJOyYZLbMY/VqO\r\nfdRvXP/A+h0/VzZLxa4qVmZBein/J/D2mJbu9KVLz7SOFv2kV43CK1qqBIuy\r\nLy+tEjzj3fvh/IWxOvTb5UuQlsqV4+tdAPn6ocLAjMmCyRzbQbvyNGttYiiN\r\nXFhc0Tii9iZL0Mda/qNsHtPXjMeFsufoAwGxTqDOsFAmP1+cQZHBBi4mQzQH\r\nPBDVUWcQSVzsA/hGnMNdsq793S1yx3QzQnPrNcykrdGTz/nnJ85lusVsMGEa\r\nfAsBl6ZwYpk0M67MTiS3Xmi7CykcHjmhNY6ZjrBusu7mnkEYFBgq3s+Ewdv+\r\nbd9EsOUSI7XbKG6HGSH3hDUTqL3INq7MSMqO/sxoiIOTwv7nxPKcJ3KcBszW\r\n0SkQBQYdqq3SC8yQxk/uDdpvN/bauoidm4mnx56WirL8Zl0q6Nt+K4eaKNS8\r\n6YFj6VX34R0qZWOQYRnifvP8GgoQw8EvmaQ=\r\n=w4LJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b4a6bf120661309b7fa21dd788229a75aad6ccbe","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-06T02:47:05.933Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.2","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.21_1659754177297_0.22439620998884724","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.22-renovate-autumndb-22-x-237dd74d049d2687d546097e540fd0b0549565c3":{"name":"@balena/jellyfish-client-sdk","version":"13.0.22-renovate-autumndb-22-x-237dd74d049d2687d546097e540fd0b0549565c3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.22-renovate-autumndb-22-x-237dd74d049d2687d546097e540fd0b0549565c3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5657ebc099d7c3f7b5b1f6f042d85cda315be561","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.22-renovate-autumndb-22-x-237dd74d049d2687d546097e540fd0b0549565c3.tgz","fileCount":31,"integrity":"sha512-TAeM9h6VJglro6BC3wUd/81Oj1ERtmD1OfqE1eCJGUztYZVq7hrPwQDtzcgixb7KigM9KKRN4tCjPOAdl+x1aA==","signatures":[{"sig":"MEUCIQD8mj2hLbdw5JvR9A0ypz+7kIoFAM4XPr8Djb9UwcuI3AIgAOczw5VG6O1h40ntyhcIJFclhBIrUKoK6dYeE09hQTs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7fs9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMpQ/9Gfs2t05KuuUd8sD0afrCsXsQpLQcRoJMqaqZQd8xJ3leOrZt\r\n5EwLGjxUd+lCxkRIc5KiVj6aVQmOYZfqgh9N985pa1LfHrZScHpLpLnE+seN\r\npWNCTocb79HXaEE4C7X0+V3rSzeef1BUyEXNVK24CaII1GZGuuWpF3zmZiVu\r\njhOq1FJ8jKfidaVZSftQNIiWzT4Pd8+rGAjlKfaZ6k5TJWvcgyr7AIWX4hm+\r\nd5gPZO8qJ9kfB4cQGTcUp/sj+am70givXUcOko0TWyS20xLQxHg7PZuhK6kV\r\nXZTtqN7MsA1YAA/GAsdzr+VYtHxWdrAhDsAa5yJTjVIUQlz2cEjXmpa9Q5HW\r\njfmgpU/DVmilc+KLo9d8jUJ/9UqMLIgUNwhdlOd0YOaF4b+IHVY6RseRTZL9\r\nYE5pFHHwakv1Hc8N6M+exPv68YrystnoLXhEuOS1KGrJjeNUEOg702gKnmGM\r\nRyo7OIupzUUEk1Co8M8tAxxizB77zYGxdgAToID5czy9+ELOYmxaOhoZs6ds\r\nuUAWsYdtWQhSI/k1yytBLoC1tBCjDEqzrjkbviCpNgt95Tx8Myet8/6454s4\r\n7AVS2vUHy556A3tl3APsbj2ayz9E6iHmhPv2jEO8C+GaVaySsshTX23s3ZQi\r\nL/G6SgjVa8aY5bl10jGfjbZgCGBSFxWXfqk=\r\n=3wgq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"237dd74d049d2687d546097e540fd0b0549565c3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-06T05:22:23.076Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.4","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.22-renovate-autumndb-22-x-237dd74d049d2687d546097e540fd0b0549565c3_1659763516974_0.3860890669865229","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.22":{"name":"@balena/jellyfish-client-sdk","version":"13.0.22","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.22","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ce6a2e5ef3c877730e3d3ee99c65188ada6d221d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.22.tgz","fileCount":31,"integrity":"sha512-gVgivme0w+p6V88tE72z0c28D/Rz9Ga5CTegX1cN99VVJxn/eIF87x9FxJ6FnUOf8XvpNePuxOsJszTKfDzIsg==","signatures":[{"sig":"MEYCIQCv4o2UZOKBIZ0vOmSIuNW4ffcZapDiAoTRT6HPY4M4TQIhAOa8OVrbhJSTidfX4FRKFOb+BxuioZA/9bQwvQFYmO94","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7fwqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrS8Q/7B6PtjIs6JlnQl5w2LG/NqS4JqH9RNxI7h6IiWyLLJUW1YVk7\r\nd0wlRgicQQoGW+cIOlcCdazVUED4kqcUhr/9h9t7foK12hGJqPdb5yvgxceZ\r\nLSXshXG6P1Jx1Ts7LcTbIoNE/Mt21vdna7B/kBWP4VdYJhi4Me9fqSNLhHMy\r\nVohJWnkcpxhi0hrHRvcbwppMQaI76dLUE16KZSMKPlwdrzZozuk1H6zV6Yd6\r\ng5mm3hPrOaIF6fMGe876jZNdsTttqnDBTgTtnTAaf3IP4tbKovzUzdsLL/E2\r\npxswX/Y9hmc4DargyN7TjPZbgMAf0fkzpvZeZdl8Tk5y6BxAFuTUtBzDjC/y\r\nqevO1ZlRpfnO6Og2PUaY5WAHFKWw10p6GoWVnsA6cABaXkocT06iWPqb0xu2\r\nsvklXNpF70xDIhgqomMBDMxNHExCigNmJC2DE4WN9ni8QRKSGtT1nz3HBJoF\r\n5Pfxz7VOrgO3wAp6CAJtKGjYtIbo5GmDpwvkvIeuYtU76DljMYyznqVMkpdB\r\nDCn+jlxYRdLFC2vwu7tIPEDpr9d5slEkc54BnuIWVifgh8llQN/I7ExMd34l\r\nbrhqkXdsSrQ7gNfLzQV9nzBjLF5ReWE3rOSO3WRocQZ8BSDFikp/NFmHA6NX\r\nUjeMofp6+eeDkwSP1V22fGaSZK/Y9KEfJv4=\r\n=A1hz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"947bcd18e448cc08fab559510faeb9a433b78890","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-06T05:26:58.338Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.4","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.22_1659763754000_0.6632452948445708","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.23-renovate-autumndb-22-x-a8c39492493bca11071d7f8030fad2fa668200b8":{"name":"@balena/jellyfish-client-sdk","version":"13.0.23-renovate-autumndb-22-x-a8c39492493bca11071d7f8030fad2fa668200b8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.23-renovate-autumndb-22-x-a8c39492493bca11071d7f8030fad2fa668200b8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6197142f673dca62ebfb941b8f78915267c600b5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.23-renovate-autumndb-22-x-a8c39492493bca11071d7f8030fad2fa668200b8.tgz","fileCount":31,"integrity":"sha512-H7+aqK5tCJhM9e6vRK0hzMvxK/QBRjG708j3TSXEaAXKGtssJEynGlWGCZAdmTDNYeqnhhghK4ixk15v69jtZg==","signatures":[{"sig":"MEQCIGhRkolnWLryq7FMHXOwat7ZDzvMzwPPqU0it6U7hRLXAiAzW9DV1xZ4IjFM8HgQk1fp6lNfrSlx0GN39+jAU+fpBQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7lKgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTrw//T9q4/5Iwh9RN9KDxrMgWU19OFYvUIxk4kuXnjvJB8ubXS1IA\r\n4pUaLjDk2SbdE716oyomn5dgL5fvCm44GchZgOZPgIBTKqRqQk6e6IuPKeJA\r\n937d9TjLb8a2NFxIaXkMFbGGcpXp0cw68uanT8iMFwkIcp0/WtAr+uUjQF7E\r\nGu8CzihcU5kt2BKdGQErGRjp47XFcrW0XuACj3ZEF/SRgnbTfgZ9KWLLRz0l\r\n0fn0r1sfqghV8yOCS1A81gyP2TWf960ATQZu8tJo6rgHWN0FI6d9XBfwPc8k\r\nf9e9TpHUnn4V62BW+3ZBI6P12d62jrjI8Yu4fNxHapt8HgCPCh0BvGKlJahH\r\nZtNXX9DpKMl731cPvOJ3ACENWhRWlzJGjZDG+iX/Sl/kXEF1wlGKtF1c7Sav\r\nfc7jOSt4mtX1qd7wSJzgQzxi5da/oeL2boFYrZB4IM8SlmnKUHSM0dH4+BKH\r\nd3BTgG9abh+moAruO5S5RpUggJ8yJXm5Q0f83slqET4tGUWw/1vA3gT/Cvtj\r\nS5MXgoJq3PL7e0EjTFyh+lAxn3ZorKIgesKeGsnOkIWlEYns20pzZfj1Ugbi\r\n9wrA6zrOAcpc2027RtDNnLP5/vSlHHZYhLzdwDSa4AnXLMHFwbMFm4MkGUQb\r\n07I9dELswVkMxCSKDBC7lVEa3FmQiGdNVEk=\r\n=O3ri\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a8c39492493bca11071d7f8030fad2fa668200b8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-06T11:35:05.731Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.5","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.23-renovate-autumndb-22-x-a8c39492493bca11071d7f8030fad2fa668200b8_1659785888691_0.16213548683854673","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.23":{"name":"@balena/jellyfish-client-sdk","version":"13.0.23","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.23","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e68d4a6631322c55fbaefb1e6ba9d35a0014ecd3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.23.tgz","fileCount":31,"integrity":"sha512-G5JTmZB9nXb1GWrn/km9hTa6kFMBOJzo0RMHmArgQrt8Du/dEA2g2kT2wBQkMF3UTJiIJjuvqZrq1rifmahz9A==","signatures":[{"sig":"MEQCIALbU79bekFX8NW8zaJGd0M4xHJDxzEQ8N/UxPsM+eXPAiApVY6XTe8gG+vwAVxMo6hD4Nu6qIW/HqGnL0o7xUR/1w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":214928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7lObACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9Xw//Y4PqpVjdByulqyuSZpJqGdTqWHzxJrAEIckOMIMa44fBO6c/\r\nZ5E6fnCLi7fzOPwMC4jNQY2RSegZhZ4nhnzJyEDruqVhb7J4oz67WkzOc2eq\r\nuCWRgUJQRCmqtXTX5qIVQdYzxP6bjTqeCaArJDZI8uSN/8XOcTeXGvqYxMtg\r\ntP24vN7wv+xaJpluX56q0JRgRrNVVp4MeGv2+WTYEZiM2UXOReFmGWDxUE37\r\ntcgUoov3rlN0RPbwye+HMUy3Ao1kNMvX0TuO29ywO3LPbipcMI+2vsBAcK9/\r\njYKFC3+dTmZwQJ/wJsCf0tFYOzMmwmJDj9ynRLRI1h9fjSytpjizfKhLoDE1\r\nv9cPq2GLmSgsWMc8P0OKdBygeioJMYDR8nuckOfPCE6BH+h6ZXoowOiHXHmA\r\ntGp3zoUKidknaEZfZ6QC43wiaXAcmeVqP/tY7aCed9kip1pgo1CWTKTqAT96\r\n2OMSK0WjAG8uS3veHyccZ8bJ1ojzYRuopgylNQmGnJ9VgOm9b38YFPghlJqZ\r\niDpQHpAjy2nPwEYoE9mS4eqX/W56+qEdgC3yELCf90R+BbHhLlNVATANnpLl\r\nW7sctPwSX6J0+YgFVMuvr9vQ02McJh4D+6Jw7GnfETYMo4ag8+YO+hh2DfHS\r\nbiqAgAV6IY2zoNddR9O0LExc7d+IL2qXDS4=\r\n=D+Oj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"de0020fe75db9fa00c7ae04a768db8bbba286a36","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-06T11:39:33.305Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.5","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.23_1659786139196_0.21713546823017293","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.24-renovate-autumndb-22-x-e97ba24129bbfd9b4e0e6da222ecbf195140a266":{"name":"@balena/jellyfish-client-sdk","version":"13.0.24-renovate-autumndb-22-x-e97ba24129bbfd9b4e0e6da222ecbf195140a266","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.24-renovate-autumndb-22-x-e97ba24129bbfd9b4e0e6da222ecbf195140a266","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"130c8fa04a0d3ab9d3e527aeed32e9db47cb2047","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.24-renovate-autumndb-22-x-e97ba24129bbfd9b4e0e6da222ecbf195140a266.tgz","fileCount":31,"integrity":"sha512-sedxmB+i+nCWijqcT3fQIfwPvUi+QPgu7F2D2eh0ARsJxIqwid9x3FIjR/XHi27FKBGaLZIcq+GQZ15LCG5Wbw==","signatures":[{"sig":"MEQCIFTos+2Iqqd8X3iMaL0zI3xLmIfox/3MI789YJv5IxJ5AiAbJliNMNSA2Mcl3VopLebGNNSlKrIewKqUk0pEs0tg0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7nDkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpH5g//Svg3X0WBHnCqfjRlBMqx0+2M9SN2mOiIjfSQmQEe6hqAiuG1\r\nxwUnXvMLNtryy/nTlwmeG57vQHBrfgBlIOodeDAZPvEaxhgwGTjKyYKtHWhm\r\nXUQXRuxxc35XkPTWzgNBiGguPs6Z0KTBuUFqRNzHX3eE6N+EBNj12ZkIFbGa\r\nxNlEgsUdgHUBz/SmAuqoPsj7dJB+/rYA1a5uvz0Vlbv8D/tS6HZRP2NsW/+z\r\nSRBBLKZx4HczBxmpWEhtthFS4zdD1+c3+CZICSz9Ry5VGmrVSCehAl1GuEkW\r\nKf7H0aODWorDvFFqd0Jwe5WBwjS2IdfRDc38mbrblR3AWyE9ndeVIQ3AjGiY\r\nEUCwCx2sYrU2D188yoybOCaZrr+R+l6b4DoHsEOfvZeYPDgzKzTHI7VAObeU\r\nfMLM2ScbWDO/gkdUKdkz0R7TYbjhC/L7lvPrE/4raNY2ITkcig8VVzO/kiU3\r\nuvsCo23YzmrsmbJaqWFEGny6DZ/WxJvZZVzNhJ1LY/ELlfwOUvwuwbCEhQ5p\r\nwg0l+lBlkbOpeNleLg9CTAFqfSw1MS+IX7OypXB4q81fkM8PQuX2eSmLS4KA\r\nRPkgTYxasQNdCQC9aaFxMTg7pCsSgSPUr5i75baqlgt6Ft79W/6+rFSh22Kn\r\n1juZYJAYZDX43kcsdgAhThYkH+F74LGF+Ys=\r\n=/IYo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e97ba24129bbfd9b4e0e6da222ecbf195140a266","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-06T13:44:21.778Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.6","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.24-renovate-autumndb-22-x-e97ba24129bbfd9b4e0e6da222ecbf195140a266_1659793635937_0.3960519682078021","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.24":{"name":"@balena/jellyfish-client-sdk","version":"13.0.24","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.24","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9e8082e731725a2d5c324b8d26bdd3a6629c7265","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.24.tgz","fileCount":31,"integrity":"sha512-a+fbC8V/2AJwVvba8YAGyLr6aF1i3Ws3VbGjymaDFHghhhrTQJblXEKDlpYRzBYlfs5Icnp2saJzna9y1xjxbA==","signatures":[{"sig":"MEUCIFepS7ZEh6AfyTik1c7f8Gyp9IY4mMaFLrffuamXULqNAiEA8TMx0AHdJ0CMQXu0KFpvI4/4YPk+XDGAUbMVoCcs7vk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7nGlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCXQ/+MNDrKD83eV/AJxbrvslcEjiFKIyCu6HehUUnHYCOZ8w48eKZ\r\n7tIEkKtpH7zFhe3zd0pMR8vm4A7h8y3zVch3FB3kk9kvRXWE389grVb2urJs\r\nxaHBwTHorXaRdZRAHGYdE9m855MK89+v7/BmrIjRrHvBZCf3rFO2ztJLD+62\r\nHmPMCVNKSFJ/ctJ3DopWdZisgkrDyyeWVkG2JO8pufi7HSbvAS+w41NZH6JH\r\nu2W/QiQwIodzSAzIJmz/uVxG/uikxrma9S7DuUGDn15and+4/3Nri+JZlAWR\r\nBB6IRr0IUXaMb/POU3JcGqQej5XVPc7ANN67Akc31Um4HDonln7XNp7FsEyX\r\njs52zv1dGgow88VLEMtsVRa2OwAbZamjQGO0bSI/7JZqror6+4hZfs6db8Jw\r\n+qwfdslt10bohYH5ia6wGTQnK8bbvxqZJErXCCSkatOFmRk1XCNasln3HcV4\r\nz8J2pvzkY/1OkOOgyN/JdIgVScrizbD4i09KX6352587/tdC1W3MoxSG+EC/\r\nQ/JqXoDBnsHeKU6IlD3ZJCiOGn5H76c64NYC4od5zHd7dG05HgJBLCThmNV/\r\nQofU8S2S5E0WWQc/a6/MUGd3WxfehS4ANli/F7qwklmEMQnkKzmvz7i0bxcM\r\nE+H7W1Qnx4rtNFHt+0jJX8GPF2h+jcxm/jM=\r\n=G1Xj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8a13752885bc5d85d1c9ec432d4972c7ce9b230d","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-06T13:48:07.494Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.6","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.24_1659793828973_0.5926250648642897","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.25-renovate-autumndb-22-x-590df16a2e9b6fd393e86c9f322d2b653fe87f72":{"name":"@balena/jellyfish-client-sdk","version":"13.0.25-renovate-autumndb-22-x-590df16a2e9b6fd393e86c9f322d2b653fe87f72","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.25-renovate-autumndb-22-x-590df16a2e9b6fd393e86c9f322d2b653fe87f72","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e49f6e2d70e986c7575e96aa8df76bb28ece2fd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.25-renovate-autumndb-22-x-590df16a2e9b6fd393e86c9f322d2b653fe87f72.tgz","fileCount":31,"integrity":"sha512-GO7d0Zqesjsp4R62/MRWNrO/+MGKRI/0hdXLaeGVT7jeB/5ZHs4ATdCmW/+FTnUVP6YZDoGK0uNVGiWB57FEQw==","signatures":[{"sig":"MEQCIGRtcnbRyQPgff036IYB4APCOA4PbE4dwGBS7Mosl4HGAiAW2b/xkgwXbcBD6gHI/K6h9YmcJ8xAbh/thv/eS2opoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8PeiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwiBAAkzS/opqVqk5d01fRuxgLKvpFHsUsuYa1SQpmhM9mvB3w9ydN\r\nRNEye7/6suoB9q/DvDzdmWNRT3ieY4bDTd2AgObfxfULWHvWRvrhwyFuYObw\r\nRGLOa82MDh1qx50e7NUhvdidBgW18Dw+6veyeu5m3y4vq9lWczjOek0xi2ES\r\n1NJAYVBC6qSK21rxJ3E6w8G8p34lCthly0b7MmUJ2FHNC8yIfmLU/4xf54am\r\ntCu6U+n317VsQQpug1vBu5H+Dh/h8OcZ1TyWkburi7PEhHzUynPZaKAcEtKM\r\nOcO/ahrg6fPJEsULQq8o2nvdSshjw8sjNXhtz8kFO/sbWj0QL7sJzImpOXQD\r\npJn+bq/00zMMOpWWuOL7t3mkLxh0vXYoGo3I21WVqKTchNBc2//Fyd2TKfjM\r\n7dJ1vzH7rNQtI/17kPzViWfKF2tCmK3ta+GyJig8u9rEQOVtThgwuIAdmJ1z\r\nN8U9SI8uqHxXNkiKT+RtVG3G8cQ857QUTKUJXLw0wOTsvy6ByVHK4NK8E/Ds\r\nM6ssPsJ6rT2xntnYHLUH66e/5kJip5WVZ50jwcZ7O0bHb3PRT6p4hA8qf1lp\r\nRj2drnW5kdRWzIJu5RwWmx0SN0ZrMA71BwrsD4nmZutHZ+QKw1ESWYwZSr2g\r\nB6tncIetEoP1JA9ndkqQzQcRwKuaAfNAlMg=\r\n=BK1M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"590df16a2e9b6fd393e86c9f322d2b653fe87f72","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-08T11:43:07.414Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.7","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.25-renovate-autumndb-22-x-590df16a2e9b6fd393e86c9f322d2b653fe87f72_1659959202214_0.9039409754350036","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.25":{"name":"@balena/jellyfish-client-sdk","version":"13.0.25","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.25","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"66beffef3fec0a8274d72dc019eb6c22e48ee7d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.25.tgz","fileCount":31,"integrity":"sha512-CS4z8XtaJRnE6PMbJXu/svUG+MtM+5J1vsu0gxyOfzjy8FlWaPv651vQXfIh+4w6LEo9YhkHOiHY+wEaGT8+gw==","signatures":[{"sig":"MEQCIDkWrUMKLfozCf9z1eiURIu7C9s8ffrxaWItoS8vXC0KAiBlCoAx6GfaNkYZuW0vUxfK0nNqTrqSHdavGF7apgCupg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8Pi+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpusxAAhWoGwbT0/Uliga9RE+qWKSO/+yqnIquy3WuC0HTUYRns5ZVE\r\n6DglxIRZeR7ZOftJD5ZfjJJo3KgSByFHF9BNoT4mwi84hr64reXtoE3CC6Ae\r\nQSsjFozLxNPqE1QJzFO1uMnQ4v9X/+2QqYjZDS8TMvzMTd9cJEocDhlyG6LA\r\n8k2JBCI3Eo+q58AES0BSu8ZCGhrMyiTB8qkhb2wrUgGiEe29e9rjzoo3bxOG\r\nAYMsyM+x+IrHO3VuxeuihoR3tIX0D9qxh3185HyV+wFR72NslnDdAnQGHTAS\r\nf/GuHD0WMosyNPiGI7VHb+q6QH/liKNElsdwjILYJxu5drreE69UPZDF36vL\r\nyj1+s3pzG6GyNj9dpJoB/7CSBsZ76Xz57T6l2cxPcgU9qwYLFOUsj6Umd7F5\r\ndDlMFPm15t6kjZz2SKL76XoyFSLU+9jEz+W1HmQ4Ukk9gHMWloK9qtmwBldB\r\nJUAvmb5A4AIHW6KBqcJVoXNiDT0d9y+N4u8yoGGdKvzq1bdLWgLUy89ZGXev\r\nFWxliKQdpDHGhq+ymsXJzcIfvwXa84ewhKvzOIhjsfDiCLangqShHFHroUnY\r\ndhemW3dfaeUoV/vd3TeT+5bkzcReoChFAztg6IyIWSxHolV5QlTLgvb+H80r\r\nPhp/CU56rCtG0/mdAWlNusHCS21ytUS8tVg=\r\n=tPJ3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"22f33abad522529754969641cff56752b32d7991","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-08T11:48:37.935Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.7","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.25_1659959486494_0.9712397190501607","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.26-renovate-autumndb-22-x-ee3015499e9279ecc83145844ebb9f7db4a9ebc0":{"name":"@balena/jellyfish-client-sdk","version":"13.0.26-renovate-autumndb-22-x-ee3015499e9279ecc83145844ebb9f7db4a9ebc0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.26-renovate-autumndb-22-x-ee3015499e9279ecc83145844ebb9f7db4a9ebc0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6d17edd6831ca19622ba7752a3da4a9603d50e83","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.26-renovate-autumndb-22-x-ee3015499e9279ecc83145844ebb9f7db4a9ebc0.tgz","fileCount":31,"integrity":"sha512-FG010S5gkXnqpc7NBdQTnyazoCddGdOlw/7LqRZwOsJgNvEfcRxNblWPEmmJZbkmgoKdwV9acwB2r2Ni1XBTuw==","signatures":[{"sig":"MEUCIFeKjCNOEiip9gyJvVwKn3+47sWklqtd5O7oVd7btCFjAiEAj2Cp3cTVchfninq8S1I5c/76Pr+LW3pPfH1G7n+JFU0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8SUvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr85g/+Lou5G0Gj7xKHySXLeWdWwM60LqRoz5i2f3DtxTm85E4MG4Zq\r\np4rGkCJXgF/tG6cRd2a5xSJdRwyOiHSvXy0lKJc056EiU5Rf9YQMTK9O+UVS\r\n0pgHYleD8hLLYKJPXxBHyknxjTOIfGafs7B/XtsyaemBRi/fPXyFnO/g83Z0\r\n9Uy0qlIXHgB0KnrtShQUdZ7R8LpFDsoXIX4I/wg88IzoaGk+xMVlgxZGN3Li\r\n9K18674gM/FPgJIC3ejQ5Od+dLx8goeWosmk61k9Zij25ORTTRJXsXTV5FRA\r\n6vZV9HewHGCKlv9V4f8iB/XI6K9EEiWEIu9Nk0gW5lcC568jamu/isDscAl4\r\n07s5hJtER4eehX7wq/lCYkxQFUFb+r1h5l/KAAk4x1F0Fa+G5sWO8a2+ZcsY\r\nC0UDVfTHCNL4Rjg/4ekZz3N8gjEqPHxBsY7ktVoVobPbEGDzaDH/ms/U0j7i\r\nNljK5gaRdFlpNPadUhJ6YJkiAueWmY4tOlSipvS9RpD77KDTm0Rz9T5yQsrF\r\n7Qtj5FqS5Cf164uiMDuecU7Bdl0MFt7WPoUUk0+jCGXQACi+IWaQEIMcUfia\r\ncpDX2oH4cMTc+C4RCR70Dk7YZqBBE+Y6SGdFPuIC1KJ/DlogsLgYk2vRfx4e\r\n6smrQOlvILx6H4zZ3bNFuDy4i2VqTHZZ0DA=\r\n=2fjb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ee3015499e9279ecc83145844ebb9f7db4a9ebc0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-08T14:58:13.359Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.26-renovate-autumndb-22-x-ee3015499e9279ecc83145844ebb9f7db4a9ebc0_1659970863116_0.2962046633067621","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.26":{"name":"@balena/jellyfish-client-sdk","version":"13.0.26","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.26","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"780e859e386c82c11b791c7e37e1b4126098f706","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.26.tgz","fileCount":31,"integrity":"sha512-/eNKFBsrhy4Lmrg/AJC32QVJb/eOIBv8KrmQt66PW1Nqxoz257r9VyDE8mSRH2Cv3R77NEUrwckPyhDKFKnqsg==","signatures":[{"sig":"MEUCIFwcWlrh3P20JaLKRXZKJcE4tE5+Fm6n1q8KEFObQ/9xAiEA0KzQbAx/YBVsdC6BXWwaCblhAYVbV0aAqxCBlT1vSkQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8SZAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2EBAAkA6EvoVbtdHZWn55c8KjyVfYA6zCNr2YdL3Sspmlj4Of3t8E\r\nsPtiEKZKv6APcBcSFTjdYuW4fzeYyhXYr9R2XjXfWCwJbT4/13l5Myh4S5gb\r\n+dT0uXROHe17VRtZakB+DKGrrZ/vJO6uCzetx8kW65kgdQLToelW9d/XmNLo\r\nZut23ZC4JgI+sbI/5IET91PrfUpMhf8NEN6GALswDCXAvG63x/cHwKWvO6cI\r\ndQXcD22tKsf3187YY0DrbNkzNIgS41W8yuEezOzD2G/6CPgYbVesQglMHYkw\r\nx6JwSPU+f0uc0SHimmo8gnPt32yFMKpJHpcnY9ySR8M+Ck8zMTVhlaCq+IA6\r\nzkC0MzaQ4OTT5CA9xm9AmdSyA5Zv6hMpo6ljd7nVQmCM2j3wtDRxXk616qfF\r\nwLbA+0E9dGv7JOiVecodfHQ04rlayPM3BSH6WcqDWdwWr8SyNsW6jEWGGyGL\r\nbYdAthGQxZ2+1U++0EnzqXlErp/EApdU+L4J4B3hXtAuOe6J3XSib223QaQP\r\nBUVanMzDZ+5iBddti3odbOs2LP14RTBG9paLl6Q49Id0uMiAl84egQuhaorU\r\nD9t7sY8FEqeutggRp2Q3r57vYlW+8BU5qf+soxFe8DHQ/h93vyOvZvOCUN5L\r\n76noCuw32wXi5Od/dH5e3xg0g7uWmuZDKG0=\r\n=d+j8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3e252898641aa295d0ac9cb6859269dbab447315","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-08T15:03:08.336Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.0.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.26_1659971136222_0.32128062890747855","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.27-renovate-autumndb-22-x-44755d18c2f64a1cd2162ceb204f941c32136156":{"name":"@balena/jellyfish-client-sdk","version":"13.0.27-renovate-autumndb-22-x-44755d18c2f64a1cd2162ceb204f941c32136156","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.27-renovate-autumndb-22-x-44755d18c2f64a1cd2162ceb204f941c32136156","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2ce9775c46c7ae7bfecffc5047bcea2edbc7c04a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.27-renovate-autumndb-22-x-44755d18c2f64a1cd2162ceb204f941c32136156.tgz","fileCount":31,"integrity":"sha512-dRvz1GsA+4ICi+zk5WNL0dXKwmZTJl50RN1FjdJKS6vutqz11ELmEJ8cx7tIFQjfnWWp559QygANaim75x7kPg==","signatures":[{"sig":"MEUCIBe617GvZNIJeI/+idvB6MZKdY44/OKoEWY1tBN8KabSAiEA3vgJDcBnJKGqiOcHkc7r0d1c/n/qZL0SRBZ7NePh1bI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi87yGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrn2w//Ys882sTgF0cpvyWuf/7oXjce9HHXDCj7uoZWUcelxqIreY44\r\nD1VD9GbWE0R8Q6yeotdppWWui91Ulh1t5XguNzWdQDzAqZo4UfuFVq9WtH44\r\noCRyziKkCL4Qj9c8Z8IB1jxRp4kR1FvDn8OPAg4cwxAQ/09+7mUeoGMSvGGb\r\nn/rFO6oGIJPc6sClE1BeVg/6NNmcUiTP3jPHZ4lWRMiZu/Rif1DDpF8g+xKD\r\ngNu6uQ6AtIL6hQuQqT6O1HFVUh5DYYAD6imqhXGVopdyRBuxI9NVLFxHrhh5\r\n9anQUvAtpBHsLppa5l3jwa7cgcsPLxq+y/KoN0a2aCSETUFlLk1PWKf/xO6l\r\nLueL3Jp4hmpSjUIIF4h0y0/yIOKIozK1/pkxr/3O6gA5Ij5ryg+FJBcL+ARh\r\nrLErwPeeFfVlgXx6HIkNdZzbG0ocuv7EDlTnAYFtU5l/NdtLtCwElsV3uyFF\r\nE81a867bjf2FV68Qp7XENBuThZL7pNCgv54FjiuQJuREuJagjhciZQUYj0nt\r\n9PYIdAsDcCZ5pwHMkk2mS8u1stgW24uNsbD/E/Zb2HPI0pDSWi811IEdlRSR\r\nBE5Lk26+TtkkSzbV899f4YIAtLBGg0nqCdUnwc5E07VNecEa4jqCuyfKW3Kh\r\nawPmBQ02ysVP61Muc9s1N/vY+WxrAQjRye0=\r\n=g21g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"44755d18c2f64a1cd2162ceb204f941c32136156","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-10T14:08:12.017Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.27-renovate-autumndb-22-x-44755d18c2f64a1cd2162ceb204f941c32136156_1660140678454_0.8923393492092029","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.27":{"name":"@balena/jellyfish-client-sdk","version":"13.0.27","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.27","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca0d9b738335d30be1ea0bf0f83d929038723cf4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.27.tgz","fileCount":31,"integrity":"sha512-5aRsI8zCYsaU76OfAoZn0w2kphA8xvrgU4jUWqcg1wlJX2jwekydeQFZUpZfLtKtFiD8ByrvgktPZDin87MG0A==","signatures":[{"sig":"MEUCICf1m6S3zFfvYeGHb/YmTXNGj1c/Qr2KCtKzVx97hNbjAiEA7d1FJPfy3U3Z9SEq1+fbzXXB3C3/x6U528jOJ3guQpo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215256,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi871YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFug//aZJZxcTG8Zn8ipqciIvIlJXH/bH9qZwgxeME19b8Pgd4VRI7\r\nRdMEwj9nZVF4xyX6tUzhZjosaZjIUkUB+bJNwJ+hTqXz1OVc/6aupe8qGAXi\r\nplQJcecN/S8owq3qPThKqNqPj0He2EyqZx5ohqO0XBiTy7zD0qw62rdlvILO\r\nEiI7uGc/s/7OjW6w/9yeUwAVibqWD3w/poti7ZHtNtokDNUoWtPgLfHzrMcn\r\npSFeer60P9Cr7N3Y+yGIDlLxAQHorMmez3LV6bRKYGv4R9VxuQ0+/vL/NmDO\r\n8nhfW74w1yHRfKEaLKaxU+PiXjeHGW85/2CzW+u1Co7BJwJV8vdA/tlUkXCg\r\nH6xfqWXrH9AY/zxWxAprVe0Ibc/qzlR6wf+6xU0R8G6u8OcEbdE9TxHAGRZo\r\npA6U5fRYyuBQAMNQLPy2QoQ5eA+lB1+i8+kucy9sssaeLTP+uhxSzvc0Y+D+\r\nJbpVmQa5jslURG1GEOo02CXCAEWnZMxs+iEdg2uf4QHGDSANN0Ub0RqP/oVm\r\n/d32fDs/YPhDByqzaQT/xRPSu1NogKOnou9gO1sEPNszRlSF4YaOxkrK48gg\r\nz7qOToGme1bEjKMec7HMl4FjIw8xpo4AfgvG67trE0WPYLNQipEi3KhZfie/\r\nuAd3XfrmJdsi2ZaqmSEAc46ynvBdKLWVNQg=\r\n=rs2P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3aeb40f56c01341fced07860c9b287de36900361","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-10T14:12:46.810Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.0","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.27_1660140888084_0.5693473967260374","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.28-renovate-autumndb-22-x-fe2319c2214c1cb6fe970fcd478df0e8ba2e2595":{"name":"@balena/jellyfish-client-sdk","version":"13.0.28-renovate-autumndb-22-x-fe2319c2214c1cb6fe970fcd478df0e8ba2e2595","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.28-renovate-autumndb-22-x-fe2319c2214c1cb6fe970fcd478df0e8ba2e2595","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9b8fa7c4cef43c3a48206707b3b3ca2d469d2728","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.28-renovate-autumndb-22-x-fe2319c2214c1cb6fe970fcd478df0e8ba2e2595.tgz","fileCount":31,"integrity":"sha512-QVkXqQS0yhjL0MpEY7Aro79obL55yMdXwlo1HjtjVKo3qrt7/9JNEm03gLJB7bZmneupAFYxFzty0bYtgntFgQ==","signatures":[{"sig":"MEUCIDCTf0Af43fzcT6azKjO4SQ3gV9jkhJM6fgCxPCV35NRAiEAifXKIfXxylUkGkpeYKetvJsrz6v6KFjdxRyoO77eask=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9xhzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTdQ/5AXEY7203XGzlUV7NKWugA3BxOXIr9Td5PMMhEwjAKuRRF1Ch\r\n6nH+YDsSf9TNqTg4JGpwYQ3tvB6JwFsq0uPX1pcnOeXU8/9WqEpTI1wZYB6n\r\nzcH6SVEFEXVm1tTsiyyvOJ/PRF6POqUVxi37puSxp65n5arJ9ydV56Ma+4BZ\r\naVGgHdXtZO7PeSIPZnj3zWHaEw++QJ1ylQtvhefhLcvDL8zFOJAyI0h2Q9zy\r\nULFmAZeL9JiAoX0ETCyJsy1kFoHIkGA98seBPTrCevsBR1g0ElqBPcS2S1n5\r\nbr4gUgJOETMJa4LuhTu+a+Em8A7HoxXPFNC2yOqKw3U7QYGnSV1f7+nIIPc3\r\n1fY3fTIJ+UxZjaP+QSnEMvGFsls8n7ZkxNF/rTUIP2neNMOHm1Rw/TEt8IQ6\r\nrq+nOgKwOXv+eHHW+TgNW0cfR4DLaz8buCVabU6NiIsSwFE+wyIUN1SSrOuX\r\n+j+iGvV1VwttIpwA2tDXFgtdgiRrcSQmEtQ5CkAMXqyMJZyE0lbZHED7WHgY\r\ng/dxzXszEgITIiV0zMiF2LXrj6U8utazQ48NyT5A4MfUIL07uDymocC2rIgc\r\nZ/Jwo/18Yy/S5VPoH4/PK/S4WE7++a8eC4uK6hyiZbuClaEDbMRjFeCtgKRd\r\naQES/DN1fqpdVoCDGQ54gax04H9ehCsISrA=\r\n=vg52\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fe2319c2214c1cb6fe970fcd478df0e8ba2e2595","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-13T03:17:40.070Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.1","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.28-renovate-autumndb-22-x-fe2319c2214c1cb6fe970fcd478df0e8ba2e2595_1660360819351_0.5472575505425112","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.28":{"name":"@balena/jellyfish-client-sdk","version":"13.0.28","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.28","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"de5c9b2a574ec2acc0ebdd218dbad9905850cfbf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.28.tgz","fileCount":31,"integrity":"sha512-EyLwZ3tn2JziPGIjrcPhaWWnsjjH78pB3YtDw8ZsMYEX8EaxJh92l26G61ugsIwjkVjaQdBf/YaaMJ612atrJQ==","signatures":[{"sig":"MEYCIQCr3eBxggYltXfjMtCIoWPE9+J/USbWhDwkiHyuadSgYwIhAJ/EKxMNVJvZc5Z05T+PvWuK2BNxgV/SiKl5Jl4KeAjA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9xlqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlxQ//eSoWOh7HAYfK61OpyC6Vlzu83YT4qVGdC5Fl96XshVg1s80L\r\n93y+hX82tGcWuaXdSpn13iqdM4Z+Gm932V0uNFwbCiUEUa5htrPEj2ZTbvWM\r\nduW8Unyu6ZOOd//cQZm70QwcVAaY9BX+cbfyJDn909qKGO6WeMmR6hUsOVpg\r\nr/FNFR8JioTRoLXZh4VeaRv6NB68+D6i9RFtVStwmy/BmU4heyrvxHTaP5nn\r\nQ1hRzPr/a2pJmngr0/QtRtmZ4pnEzkIAg0Dm2WLDtYuB1Caqxu+uychR+2en\r\nIoHWVAKV93dITyeqi6DHciu0uuPKaUuais3UTusNK5n1dZAQSxL7Lp3YEbyS\r\nDhk1rkmAE6tVgNOb3l6f/bfBwGWTUVdniPOyJE3iGm56u1npiX3gJv/CuLg6\r\nN76pLaU14bEcp2CXNZwj0f5Ic+C9hPENAS+8eyLPIji1WZ4cqj8KXuAsryFz\r\nKkwII3s2tHT4//x6gqyNcFJkQQQNfI5M2UCna9mKwTpktR9UcTjLPN7wboao\r\nGO6QXG0wDk0eWhO5I/XUQxspxpSaVaFyCtGhy1qPcsuELfs9K9edg1BjNAjL\r\nScq50VfF7D1SB/wXiM3smtU4FXrO2+sJGdCgfUbJ8Y1ihiHLj8GZHqIldUwI\r\neMkDPFuECV9Qk+ksRSZJrC0HfaUoPvdtHI0=\r\n=mRqK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"82a8dda0609c403913d95cdc54a6c3ce6a592152","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-13T03:22:00.250Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.1","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.28_1660361066123_0.9230167823899924","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.29-renovate-autumndb-22-x-8be0a9372f4e384a551128d462c19d9781a70b96":{"name":"@balena/jellyfish-client-sdk","version":"13.0.29-renovate-autumndb-22-x-8be0a9372f4e384a551128d462c19d9781a70b96","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.29-renovate-autumndb-22-x-8be0a9372f4e384a551128d462c19d9781a70b96","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d3acacfd2029f76ad803d84a2df1508d3a2720c8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.29-renovate-autumndb-22-x-8be0a9372f4e384a551128d462c19d9781a70b96.tgz","fileCount":31,"integrity":"sha512-5czMQWsoPALFjnK9x2n/aOC66pmc30EzFwjuNxrVb3+kN5V8rKEvvbesFJ3zMgnDt9B5atE7BaSN7UQKtnxmFA==","signatures":[{"sig":"MEYCIQCYFd4fFyMh0RX/u1Iyy0YnoA21NOikdtcfs4TIY3b49gIhALb32DxTWafe/IG3ITAyLDzdAkJ3l56/cYlOAbTNnjzm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi90B+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTtw/+Pf5iUb1++SmHspaabK7iD0JubWDIC0mzohvO6HO5lDvysIKZ\r\nRfZwbGXDFsZN78Xu7aOCfXuhqMKNEFG1ZX+Ipum8Mdkr9+yd0P4A+9d2+mmV\r\nDbN06/BDaVnacx10coF0u1/gQvkyCsWVNK+kn5Cp/1AmHrX6PB1c/U4+VJQb\r\n7Eos25GZnt/DQANAn/e+xLqOwVBvTWzpzjGg65z0jCvtUebG5L+ueNiXpq2r\r\nG/zOz5LSh0UgM8ED3auzmQDVId3EuX9sPihXNSFimilnAxSN/4nDabipuYM1\r\nDVtay608Pyak27vtvxvHZrjYeYbP0hw3i+LtJsx0KKja6csIqgb5j0XW7e87\r\nMJDl6fnbZQroWBWN7/12BhkPpFyRRtX5TvLthmaMmDd0AbZtXENedLxvSmnE\r\nWSoUFpK6OCVLZSiihQqH7I/IRTw3IsZlXMP84MbcxkEkAiHMhwJmTg6L/kcZ\r\nNQaNcAJpQNEvdK3SeGm6Zh1ZOAkYfzASefqLQp5tEHiY8aitVyWhGEis1M4l\r\nZYPu+19b4jmBNAUE+SrKRCQYc2wFq6Upd3ubxS/Y/aX7XcDuwR+axvl5Qx2+\r\nm5VD3aI7WUjjxUsOI2c+rnVlOqW5/+mHDG04neW7/gOd67phH171dtZWtmGc\r\nNSRoQMZZB0qePS0cxU0OXXl/qcjisoxe81c=\r\n=o6Ex\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8be0a9372f4e384a551128d462c19d9781a70b96","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-13T06:08:29.186Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.6","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.29-renovate-autumndb-22-x-8be0a9372f4e384a551128d462c19d9781a70b96_1660371070666_0.7021599524530926","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.29-renovate-autumndb-22-x-8a09d110f5d76213a7636aa81219906d92e88d54":{"name":"@balena/jellyfish-client-sdk","version":"13.0.29-renovate-autumndb-22-x-8a09d110f5d76213a7636aa81219906d92e88d54","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.29-renovate-autumndb-22-x-8a09d110f5d76213a7636aa81219906d92e88d54","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7e661015a77073c5e3b77ffd283a36b101113891","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.29-renovate-autumndb-22-x-8a09d110f5d76213a7636aa81219906d92e88d54.tgz","fileCount":31,"integrity":"sha512-raevoGg2rXd7BF6ZmoNGVL+iyd22FwGPXZ0c1yrQi88h5vhYwlVUJcCI2iiygLv4DT29YQrETHWXt6sjauze2g==","signatures":[{"sig":"MEUCIGET7SIiEcEuvL77AASEphwdLWpk/Y2hgiiGOA6orjeLAiEAm9Q+Rm0HqWP0YkpH7YxHGLzldmQA9Pc8Bvv/8yl7E4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi935dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmowmg/+J7bklJhKdSf7+Ubfm6cGudtMyLNfRVmzhIOTYahfVl8J/aUH\r\nGLS5yYW1R9LqDsJc24OTVVZuUyqUCi+gEY1HddzSkqYoukK7AM4pL8m0cUWz\r\nGN2o5G06OqK+8qa8ivUoQFStVnbBzZxoaDkhdzJ3vAm4LfU/IeOcUz5/sfCj\r\n/R8P32UoqUWmTJ5gZDI6BotQmY73mX7nIFHbz/5vFYtWWZwn3nA5JgrAZmDn\r\nClyg9E58NHqgh5e7OYdjLN+6XBBeXhl7LW6uGiF9/lk2JkLfZ1U+xmwhDgml\r\nv3GxN6mxFWXL2Xv/wib5pkYHPw1aqczbp6jGiqhgzFYiSs1BMxNZpTaYAP0+\r\nYk+t/06E4dGBY4p88yk7PGhqGLIuuEizgWLBIrTca0dWp6ETfnqHdvnptnDN\r\nmRpK2sGHNTniCEsCfbQSdoV7TS2jHMyvxd6djQ6ti0t5uIDMTvnnVMQrXfCv\r\nTuaT8MsfIiidnVoaOw7dqbqlY3JLN20ZGyxozEuY2hp5u/inhnz5NUtf+kCX\r\n/vC0uaQX4xVQjePVY4DU8xL7hN/fBbQ/HYEBVxcZpkTkV3NYaOM4s+oiM2qM\r\nGQHZYFUEHCweAC4vqYKPj8Och19Xw+zD3Sj5lXQRByqUqNKpUuJ998ocY2BI\r\ncV/17TVcs3URLN6JmyyIakfJgcv8LX3Wrg4=\r\n=Jk/7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8a09d110f5d76213a7636aa81219906d92e88d54","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-13T10:31:47.253Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.7","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.29-renovate-autumndb-22-x-8a09d110f5d76213a7636aa81219906d92e88d54_1660386909698_0.7948268157072329","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.29-renovate-autumndb-22-x-862b6294ce31e5c26a88822baf27c70cc9fde777":{"name":"@balena/jellyfish-client-sdk","version":"13.0.29-renovate-autumndb-22-x-862b6294ce31e5c26a88822baf27c70cc9fde777","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.29-renovate-autumndb-22-x-862b6294ce31e5c26a88822baf27c70cc9fde777","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5b8ce29ff4655d32ca4269835d7f89bd12dda17d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.29-renovate-autumndb-22-x-862b6294ce31e5c26a88822baf27c70cc9fde777.tgz","fileCount":31,"integrity":"sha512-8Tin9Pnl0nAV/2+I6GqITmOjEjlsIvzNDdsho/4rJ3xgO8ig3jMAxUUKjUFBEQN1tzTT1QncPYqSQfZTum1f0Q==","signatures":[{"sig":"MEYCIQDdGPJ++Gw5/PcTxzA7ZQDLly90rLcatn04Ci1CEsvGigIhALvo75d7UL7RzVBWeOGZ6A1cmuw6yMGxQb3IgqJ7mEyT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi9380ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXiw/6A7qEba0j7raAbO2DcqLzLV38EOeSyHs6A+axtENsSfpwu+CY\r\nDoPs0ngdxLs/bjOluZMww6k+LpQiQFjhTeC39i3J/3s/sPp+KWncXVM3dKSW\r\newmviUgypqffJFZBdlQm4oODMTrXyVUakwaqzJ9Losy+KMYmJ9FfBH1teHx4\r\nr+O4fFjGqh2uF7fJpJYXnx7woPZWNkiRus0mUB9wc1r0mu88mBc1LNYG93lP\r\ns1C3DBk0HnOIs7AP5FBme9hhSAyb+LaoquNHhOp1kUZxau8c+t2XeEUwVU+N\r\nIGGC5DlLXziTJXnhVrFx+FUONY5wkMnml1gsB/qaFwcc+A1fvscucMv9S1Uk\r\nv6JyKAJ7C4MVFBWSk4XpN218CZR6nzs6ZLOO4OM/DexfZkwIoANEFG7xCfX4\r\nhjSBqvOLgR/tRBGbbaYOxE+hHkKcsbMJmbOvQKLYzseW/jY9sFn282j5bZZY\r\nUL221unNT0JK6WOFTku7rnJbxOz1KV1vfylRA5SphNqW5UaVAgmcKZ/Ley/Z\r\nHlDTwiZ13JThf1RR+HUFneQZHVuCbPHV845K4DZQW1rA3ZTsqdoWTFXk2jhZ\r\nRQvGATRLkIzhHoB4mEvB4YU2S3PPsD2P/qauuZcPrACOf+S9cEaNe9AhrW+E\r\nTx/X70D6nmJ+YH5tsV8PZTdsMeob2kiO5+A=\r\n=dT+a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"862b6294ce31e5c26a88822baf27c70cc9fde777","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-13T10:35:14.622Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.29-renovate-autumndb-22-x-862b6294ce31e5c26a88822baf27c70cc9fde777_1660387124475_0.03056999846954289","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.29":{"name":"@balena/jellyfish-client-sdk","version":"13.0.29","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.29","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6f9a2db67a81605fffbd71a8c66b3a811a8a9aa9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.29.tgz","fileCount":31,"integrity":"sha512-x0cfCB4/WETztm1r237C0+YaVfHHjTonTUpuYmai2MYcCWVoo4KMy7RtTsbYGic0HIWyBPdoe+ahrWw7nejNDw==","signatures":[{"sig":"MEUCIQDQtu140O/bZXsc9Qx12110b/KWsL2mBSzJdnmQuMEHewIgalRXbZtt4g6ani2d4bGUOSKSCvmqOwydlGrdMmqNwZs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi94AnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwlBAApB7dKPmfyAIuqHeD8tIpaULWNuj1ULddq42ZAq812sCee2Pd\r\n1JYIqHUGfAUhraXkPL1jAmpb+NNiCPTPrSXpfbidME/pJRaPCX2vpzlilEs6\r\n3J2PFbb0XRQ9HQ0t6TAe2ATeJXdmRv5jG8mwUXgXRbjR5dw0mhFtFO3oumzp\r\nmF/gKF66ZiQdHCAC2SGfwmJ4dPtsnthYoBg0naqaGRBRn0lLcT7BsO5a0NfO\r\nJcjuxZtfGgY2gT0h09Mh62DPgnZdFn1JuLeabIiK0U+ggH4SC94/UfW3JKUy\r\ntBOXVLWeilmCO/MuAEbio4fZVmyyncvjkmbC3E/ws31O5/AE32BhDCz1QQF0\r\nzlMlSwiFdgHpqerDi56Ve/6ZkYOgKTCiTAX6giFhUEqf3fsI3RCexee/qZwO\r\nvK3c8ZwMe5fqcDP4ksnrhR7baiziW14XkAsViq3qsoNb4kWZnZDxt9DXf6jM\r\nKdUsvSVie57DEG3wK9Cg9YvBzFcYr5oPxihb3rMpFpt3vw4SOYjHnEaZaVRb\r\nKRkicK1JeTbdZ+2FTQpZHiZH2Gb0VTVVfNbiPz3hDKS/qeaQtfVGFtVhqRaL\r\ns/54qeLdP9VwiyW4TLzuWCZBM40oa9GT7cM1/PKs7dZjrsye3CygxpLAxqVr\r\nkU/7HROyCB9Tu2KQi15YQ5KA99yFFRCV1q4=\r\n=fXbh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2e8937e03a242bd8b8160d54207108b8c1310cfb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-13T10:40:34.019Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.29_1660387366883_0.9471281771472","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.30-joshbwlng-update-gitignore-5a0b85d862c8164b6857115c0ead26d80388e774":{"name":"@balena/jellyfish-client-sdk","version":"13.0.30-joshbwlng-update-gitignore-5a0b85d862c8164b6857115c0ead26d80388e774","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.30-joshbwlng-update-gitignore-5a0b85d862c8164b6857115c0ead26d80388e774","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"37d092ef5e0ddf8150e0f14ccc9378083f7b2196","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.30-joshbwlng-update-gitignore-5a0b85d862c8164b6857115c0ead26d80388e774.tgz","fileCount":31,"integrity":"sha512-2mNmcEgd3HukOLSBP967/eOVJ6qjPqMdzb0T8SuErsMCUGe3HXVUxM3wM6MtmOK/NCJNsD49cGaH2Lvh3TpMvw==","signatures":[{"sig":"MEYCIQCvlhg09cE0AQwfxi2lgk94o5DZQRO/YXa/LYjvakr/SQIhAPy4/WtbAaI2gXwe8Tv1zaAmZx2xxtojTZzmhT2tf5Oz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215617,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+y67ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtTA//SjmtlZSlHrsWnYyIMRLsF551h4jButpC90XibulcTt/VnDzY\r\n9hhsx9/M3ZEOXr6LraPJbE6lAKLHZrXne0khszD9QTdQmdjOD0ms5FiMg9it\r\nrOFaPOf94wZjnKT37aX2H11jKCUnHZCQJwDjuTLf2l6bo2NGDOMIgayHTNoj\r\nKiK6yYtWP8qON5oJQM6f5kOtp3LbR6SjZ8A+5RHTFgtDDi8kIKcE6RRnFEj+\r\ne/DhEt4kLBp6rrPWCp4YLUyNzUGtuf9SWalZ6tgfMMk/ntwRDoMji4fuJveb\r\nNjpbK2qLeuSsRcjdnBoLxWUlNSqyKFtFRqTNSG+8AsH/aE32hcqNZx7LwXTI\r\nzsgIkUGRvQzkkKNXJGfqBtYaiXQVdgoduresbDNXomV+2V+c4sKGjo0SIli6\r\n5lqf+pLct4y25taBitlhMfySCL5hWZM14slqFhR3g4X+60vzXKW2UE8qZeYp\r\nbJMMJjuO8bmmGA6LEqTRkUZzFuUEScRMOL9jq9LEjXnDXmjbImaE0y0Xqt3C\r\nauuzTTNnPeX3x9UkOINh0GfvysVYN2sjyPwPc5LmSRDzoLr03WQRR/z2iyJp\r\nPO01eF0Ui6dUineCRaDfJg9FMf0wfFWMI2/M+/h7S2PbeXECez4fixXCTe8c\r\nGN53p7L6igSUwG4j/m65EyW0v2smxepUKv0=\r\n=kXs/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"5a0b85d862c8164b6857115c0ead26d80388e774","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T05:42:05.501Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.30-joshbwlng-update-gitignore-5a0b85d862c8164b6857115c0ead26d80388e774_1660628666714_0.9505669802630097","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.30":{"name":"@balena/jellyfish-client-sdk","version":"13.0.30","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.30","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ba94cfc6a45545d6cfe3495b342f01773aef4ab4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.30.tgz","fileCount":31,"integrity":"sha512-wN3ULMcylqoN6eDp1ytLv9u9wbo+FFtjNKi4Anmli9q9f3AtE9SgDBHdb3q3j+STLbJCuX1ul7Zmo+H++Eqoqg==","signatures":[{"sig":"MEUCIQDj/7h0p25EdWlRq0ostQdKiZodbzeriuXuICRjvJ1OoQIgebcGWt8bn40InzFtrVppHvhKi6mmqjFSlx0hFV5Squ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+1eWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrB9w/8C1dCgIrGCjaGUtDl7NXumXg0ChtwuE57e7bNX+/7ZOpNzZlP\r\nVWwDoGRXFwAREawIWb5jU76ZF72CzwwrzkbztdRABR61W8a+NYXrdD86ddF+\r\ndbQaejsfpEO39tbOK+Rr8yELanJiaAjE4jL+hKEjM0/UHzJygDlyVIhaxnVX\r\nA9C54KWe5mhZJCEgApsh5Z2MveHQ2qgMwKugaMHTEiMcyVCh8g5WTKG1ok0G\r\nrXiJjBifHM2fbq/1CG2d4KQZ4+u9ex/m6dNqFHYxj58Z+yt8zXguHJjSM+S4\r\nNM1T7W3G72qjgMKRBG/aPPCmVm1lub8LLYv5JVX9BWOy/Gbu40gsFbqhpFQ4\r\nkaxf8xnFPQKhR3xmh9KivFqgQItj4CmvOToAAueZ5NUEqsePiNEI5uct0q6m\r\nk4mCWBv8SqRvmpGQcBoD/So7DrtwOr9s2P6M8vfm3cDywA4RAKa1S7sZ0Vio\r\nHe4Ea0bt8atkD+y1g+ZOafe8uHRm9X5COmHR2BR0uCUluhWnK+NFurVJHwmd\r\ngVyAUkWvsZoBTLJubUPmUnRY9cKJTuxe8G1KmDCEVd0EJgPClJbut/Ku6nC0\r\njUsJAZEAthpG1t2w9L67KDayTGdN7+l8osWfKJmS6A/MUcXsvbTVsn+FKCsG\r\njRuRpffed1xLSy2fVGhWAnkVlxiPoi0jZlE=\r\n=bnpj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"385aaf6eee4226ff147a0074f95421747ccf4cd8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T08:36:11.963Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.8","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.30_1660639125760_0.6019491892995323","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.31-renovate-autumndb-22-x-8e8e485d27716c5bb5e94d8b88b3bbc5548460e5":{"name":"@balena/jellyfish-client-sdk","version":"13.0.31-renovate-autumndb-22-x-8e8e485d27716c5bb5e94d8b88b3bbc5548460e5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.31-renovate-autumndb-22-x-8e8e485d27716c5bb5e94d8b88b3bbc5548460e5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"27355fe144ddaeb381cca6a1e5ae0d1224a05903","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.31-renovate-autumndb-22-x-8e8e485d27716c5bb5e94d8b88b3bbc5548460e5.tgz","fileCount":31,"integrity":"sha512-8TaF7+b/nT5APMNLyjoTtxJNDCjvv5NMYUlVDIyQvQ5vC1etlfEXjwkJ0pN+K3Bhrh+UGjYqvEX52cSSMii8qw==","signatures":[{"sig":"MEUCIHziq5A8fjJwbUKvQ/HMqRbVqn7vAsMxQzyu5VTvOdrOAiEApJSyhrPh2e2HOw4QXh+wAkzVHCuc0JP9JnUOzyVT9qQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+4gkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpxDw//Ug8Ai/JiLK/aOKeFXXtCsENtYg1ir5VNdw10L3gnhiPiinJm\r\nsQIGn0QdH7ZT6hOJBDjGTw7cZHLfrpsvjytSdt82mcwXxjJbOopXN2LqwIOT\r\n5QM/KigUToNiqPq6nhL4Qzx41XLEa0r19EPZfxrlRZ5jkSCeGHvlUhsgISCM\r\nb8EaU2zlMUU4oNkmdLKKtwslLAnWBdO1V0S+CuDpjG2nUgihexXuMLVTfRiy\r\nP4zDEsge1rEpbSfD+5UniQVOPYvOr4VHVymhpKQMw5/2Sd1xgsAzMI01jVcm\r\npbWjjoZgQ+CA2QszGUSoAxt6llDTxakEenmSVkKC1ctCR7+vu3wI558qSCXG\r\nGn8AYXxA44dlUWz8jsiiS0c2M8YW6HJis//LHzEAr1lF0RHt7ufOrMXieF06\r\n/zLKSQb4da9Sf49nf0TSihCeHxC0xmv4zu4xbNddXRL89RdnMJIGFR3PYP08\r\nY7j+nDCBzJzIQQWW+nJ0KrJvir8CBwtRaUoK+xP6RiWXALfcKsFySkCNOFpk\r\nywsGHwqaaeUi5RQ1wQ+2fS8Ccm99DnduHCp39IIt2kRN7tKfG/y7N3y4/O88\r\nStqt27LAE4zNlhjgzKqXyGUDGxaL+3nlqYUe8JaLyQWHi6dXOAxh6w5RTmfp\r\nrzIMVhO5Ti6+6gxTZ4vTsYwY6neZj3Sb6jc=\r\n=wbRn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8e8e485d27716c5bb5e94d8b88b3bbc5548460e5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T12:01:02.579Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.9","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.31-renovate-autumndb-22-x-8e8e485d27716c5bb5e94d8b88b3bbc5548460e5_1660651555775_0.07025764510209154","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.31":{"name":"@balena/jellyfish-client-sdk","version":"13.0.31","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.31","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1780d0b9d5e8035a7edfeb746c4dcdd6b6231089","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.31.tgz","fileCount":31,"integrity":"sha512-YqX5yBQ+WNCL1srdL63kK2XoI0kit9o7tftsjKCYyhbCiS935ZRKtDtq2LvuFNBiIg5Pb/gDFBlKIU4A12IJIg==","signatures":[{"sig":"MEUCIAnfJ/gfx1do4iQbCV6P6dugtjt7qpXbBwBZO25/SMDWAiEAiIk8r+lsteQ0UzILjwGILeDFFodK+f8X9IzPDeHt0UE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+4k6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpN9Q//f96cVG/jjaqQFI9aUIm+kNr/ykQ+hg3Hj6GZ3wPizkwr514i\r\nYTnak5awmyqahFtVVK8jHMSXH4c60orW/+R+PIadMscgG52qwVgL1T1E0NO4\r\n9l8/5vZmrl0cEz86/mCC9rf0F4dzvJYo4s4tvTNyEiIo1dn30WvgpSJ6iOPH\r\nyBt3Uq8jcbMMaaDwiB0n4nHw1vLOir3RqCSC2qPAAHYnMn7r9vFCCCH5TFEu\r\nd1OJN4euWDa3mXakBHG19OBMzq0th4vm3XLm6GsAB0dXGzqmd9vYj1TiakAT\r\nTdQN5v/B1dtwMwZUP5PSsRJL0sfti8pWvUKvB+iyXA11kNbDOCM0I+8bW5nN\r\nhsREffDxxDSH5C03S9ksxU59OjpLl9Gmp/x0NG6AZV7wxgekTjAgDAWfI7bI\r\n47P+GuEcl3ML+UL4pzVo8/nFokzDibut7S0WCeD8tLG9tEQjN0ZufgfC6Mte\r\nJRBUjOg0RtlUIJlegKGQsUXffeD0mdxjwa+AjS7rFbFxkVqxP61zm8+e2Qex\r\nemPtX59HZn+93ib3K8diyNBgHwDbgHfCAUSBUWkdBoo2ddv9bDZXqIf4f1G6\r\n7Qc+9rDAVkmpyzZdsMV15wEzeQ5PLqlgz9QRdYiwCbkn75ATQiOCZpO0zrZd\r\nKNj+Hk24jKfR60bOTE+seSCzP6L1Vmx0Mhs=\r\n=2q0o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"53738a75a280ee48f8778660366b9b87cd3dc32a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T12:08:14.748Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.9","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.31_1660651834494_0.6858378098131415","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.31-renovate-autumndb-22-x-8aee2d440be99a18346f3acb001f01618b5984c6":{"name":"@balena/jellyfish-client-sdk","version":"13.0.31-renovate-autumndb-22-x-8aee2d440be99a18346f3acb001f01618b5984c6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.31-renovate-autumndb-22-x-8aee2d440be99a18346f3acb001f01618b5984c6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fbe2a034db7fc5f785325c6823c61a869450e83c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.31-renovate-autumndb-22-x-8aee2d440be99a18346f3acb001f01618b5984c6.tgz","fileCount":31,"integrity":"sha512-V864w5XJQNl056ff6toAho9u+iudOl7ZsxatKZyaOZvq8dh59KXcU5DTyPSLXJWh0J5hlo6XX8WdNtyau9MZ5w==","signatures":[{"sig":"MEYCIQC19GrQlkotlXzYD5vZ7elPeTd+O8S3kvs+ZFFjHnbbXgIhAMUd+NVEacJQr+m+hUskFa5Ko7ebNPFPnOfxkqqHua4Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+4m6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmiA//bM7+uAOMCZgqetTPiq5OODA5UmFharnqci+8R0zX2aepjXYX\r\nujOcjlcb8i43UYjOvIZMD/0WRuoz6GWr6j/opF/hVCcYyICWiaPe+atnche9\r\neO6qmrIgNkTQQA2pvvy1fTZUydUPdPuaWJdLeRtnJn8KjYpVW4WHm5lz1Cuc\r\nf4aOnG5qQTRjiCr3qqyyViZyNRAMyIHIvQzoWp1eoU1V1adjdhJ0s9n3TEcQ\r\nZeXzJcW7sarlJ1nZ+xk3GkIN5Hsh2phDYu3E0j0CdNfC4qnY3L4eclfWb+fB\r\nq3qXVv7PDTV/eZVWDTfnVmoRukWUiDUpnVwnZ9ibt2Mb2jTfjyuCEcwvtmWb\r\nfcc7lYoL/e+F2a0KqBriskiTTJ3yhCLtGXyL1biqGGdkECCcK62l0cK4Ll2p\r\nlGhnPfYhkUUNMT6fGSvYbkj4AG1vjIBeKG4C4uFgArNd0eFbDmKqz57NEEus\r\nN0khPRiX6mhxXMR9FWZ79oVdsaCrclm+Fvghe0gTgXuEoPUA7JmESeBhkvKm\r\nfmr5v719I4vv5d6LA3h4Bv9/qj9Ce1phdXmQIp79rhAoAm47xiq3gQUMnYMp\r\nfw5hh58Oa8b2pOChzncKogT8gX180ApJ7zWAHyn5GZQr/yR7Mu/Dhyn5yAjy\r\nzxjCPGqHkXKxKPrql8fyd8V5gku0cGPTMWs=\r\n=pIp9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8aee2d440be99a18346f3acb001f01618b5984c6","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T12:09:01.280Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.10","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.31-renovate-autumndb-22-x-8aee2d440be99a18346f3acb001f01618b5984c6_1660651962313_0.08986000713676678","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.32-renovate-autumndb-22-x-a99f514b02efb02c8e40351c1a42a593cbf470e3":{"name":"@balena/jellyfish-client-sdk","version":"13.0.32-renovate-autumndb-22-x-a99f514b02efb02c8e40351c1a42a593cbf470e3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.32-renovate-autumndb-22-x-a99f514b02efb02c8e40351c1a42a593cbf470e3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d6b5872f64d414e47d4fe126273aaebf2bc929dd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.32-renovate-autumndb-22-x-a99f514b02efb02c8e40351c1a42a593cbf470e3.tgz","fileCount":31,"integrity":"sha512-qcQNUzLC+w/RhUeS++c13BXZuuV9NlS18J+Bqa985CDDTj/k2iSAqHJbqXfIFVnSPXDLFHezEwHH/Qlj8qyKkw==","signatures":[{"sig":"MEQCIA07yKqG0HZuy8udUnTkB3bwe6xK/MHuasioueimQ8W1AiANp1zsu4nNbD5wjLOLwgufRdUiHNGcjzjX49LNP3+9Gg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215779,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+7lZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBow/+MsyHLk3PGTwBWcln+UFfkdx2o7KM7WaXI3NWEx0HjqRok88l\r\nuH238c+qbPV+Ir06Sbu0N0RuQC7hTR7IkhB0w0S5JovTizwJMSktz6dTYOFK\r\nsHh+ub9qtZLxyPaQwiqw+nakahoq6rFehLn/kq7Du8uuzvFOLqPzBIAhgTon\r\nwc5B6SlqjCZucKDtP5F+2qYkRdnL8IoLYEHCm5d1rru9GvOrMwHVPpJRTpdP\r\n0UCcZZOQRfikWHANWTjDMGLayIMpLle794YK9xC1DFzhCsVhngMJEKAPhT/p\r\n58AUCMaOBLtTC6/DcX8Yxvh9gveHJeHqBoEnUc7/IEeXzvLMLzTt3DjDB44z\r\nX/lncNtyOFEQOpxVPF7cLhZNAyQJoS6sCfekb0co9KPLdTXwNwQYcEW0enrP\r\nZij+x2fhGkzKwM2ksN+L9kWgao96J887s9wfZpbfvn7eoZmW28Ohd7xM63Fr\r\n9e6ru9xiSrjQnG5bg69Xl17iy+MZpS+wu1KHABCzzYYGqCxlNFZ+kGr9lAp2\r\ntxZnzt/2cude1BgN194cLL2eyK+SKLQ3VImFzfHCsXgdkhII9qQUD+1LBNpt\r\nJ2K2JRD893Mudxz67IoNGPD7WYz7MDXIFMDlb5bcR2Yw+09+Dj6plYYIBK18\r\n2lyImmJA3k14ONs0d7c61jobc9H6Tl7SfA4=\r\n=Y4+D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a99f514b02efb02c8e40351c1a42a593cbf470e3","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T15:32:51.255Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.11","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.32-renovate-autumndb-22-x-a99f514b02efb02c8e40351c1a42a593cbf470e3_1660664153302_0.45968970470574777","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.32":{"name":"@balena/jellyfish-client-sdk","version":"13.0.32","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.32","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8bdd166852a671a7fd91cce6653e1ea165bed969","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.32.tgz","fileCount":31,"integrity":"sha512-aAjfJcPjbegUM6zkb9f6yKwEFe5vWcf10a0NafndR2JmUdhCGzWaEPCeEm1GKwhIeISy3ccHpHoEXb7ZnNXxVw==","signatures":[{"sig":"MEQCIDGbnXRRSSNRvnAWE4VvRBprQ7s7We3sGhIea4CqNNeFAiBhZleWJ9dX48dK4dn+5+Qdj5z5c+LJJnDtO97zVtypBQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+7ooACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhIxAAjwkj+X/0aaCCbPaBw1v0nm7+BmXo1Eabxyrb4dXguHbbZdPw\r\nTbhaR5nGTOXXw1pH/DYB6cXWE+i8wRzg84PMP/EgCwuo5b2gLhHVuNal8upm\r\nAEZcapJZlhwwXqM3qLxX/hOmjTfdwTb5weRh+B5JqmSuzVzxiYupH72NyWVM\r\nc6bPSXXzzC0xArT2vFiW3KDZJes6KYfJmL+HhnW2x2qR3uVlz30FxPS31blB\r\ncD5LDhBXnzEuCLDKvLbq1ncgf4efOrvP9qU1eGLg8pcwAPwBwZBnC0D4d/Ey\r\nQJpHqJY7xYOXiTrAXHMtHu9Ion4kWPtVyK9teIcBB+RGnGCeoElhsh9j3XRu\r\ntZvEJ2eNSKk0JVXGhgUXCa1Y4CcZc0J+F336zEmdsADTasCtCeO1FUAB20+B\r\nXTIuAuH6rVInBgcKQgxeFchwCY0/+5GUPZ5Pxyw4JAM3IURwBfjFYEjR3+08\r\nWtgI4OZORgigimK64o+sYl4Rd2JufrZpvpcujmnkMta+sjrt/daYZuK2/4I2\r\nxBOxDVDnI76sh1V9oJ7JC+fPmmLbEnC48XoQrEtZ/01UGfMQNO7a2gc7yrub\r\ntkH+v4jCPZsXDtSLDIU6vz2QQK9HI7uulMGSQb92QEBHGLHB/XjFhn3Ypv9m\r\n7waUiHVxmmMxA6oQM8pM1/98qBOEX665hGs=\r\n=pO2E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1d193c9cd7a8ba8045dbd7a63a6068aed5650ae2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T15:36:55.336Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.11","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.32_1660664359879_0.6144824093304204","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.32-lucianbuzzo-stream-typing-1bae82cb91a8b1b453233c271fa8caa3ccde033b":{"name":"@balena/jellyfish-client-sdk","version":"13.0.32-lucianbuzzo-stream-typing-1bae82cb91a8b1b453233c271fa8caa3ccde033b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.32-lucianbuzzo-stream-typing-1bae82cb91a8b1b453233c271fa8caa3ccde033b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1277918fea5d334fd7d25003b0daabbc7c52fd8a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.32-lucianbuzzo-stream-typing-1bae82cb91a8b1b453233c271fa8caa3ccde033b.tgz","fileCount":31,"integrity":"sha512-mGFrslMjyROt9QdsoGzLgKqD6R8tolfVSGI5VYEHXKAaqamzL/xS2iJF4r/MgnzPc67QiRVA7wv295GTUMyybA==","signatures":[{"sig":"MEUCIQDlrWJckUuYTUGyvwdDkwdpjIjXxlHsWqtDYUl2v4rZeQIgae1k2GPV2UlFQObKNX/IKMWBYbdxWL+MnulrPuEAWAg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+7tAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrh1g//YBEF1a+tyH8i422jpXzgGUSccud6PINm042z9AoPfHiwiPrw\r\ny4GJNmeWMG9uidGZ/GFHChF4mcWh24CgbxdMP7zX0FSnbuSVZOyTZ91VBuax\r\nS/+Rd+4tzkO3HnTCI1m/SsuzS0GacqNws/kFrgHetN7R9aPo6CpeWdlKhM/I\r\ncb4veIyvck4WwBzBVaGhOeO0ZLy13PkSVJmMxfTuT/uXwyhZVJj/CN06KOc9\r\nmGYAI2fem7RmkxdwNfzh59+l2ITix2AIzCk7BFVPn9vhHnAYkp1IiWkJmAKT\r\nmnYfMBqWlA5Saf/OOh+emU7eoE9iV+W8mOb3eRsz+ODNsw+moURk0qXakSUA\r\n6kvylnm1TG7Dp99xWxtCq+Rf2yeJyX5l65FoSiP3HlaEs4dTNVfPj7f5mZne\r\n0PKW8eYprB1Xyk22FfTjc00cK96EsEnw3YbZeyx+/zD7yPrFd5sFoyAKwDmU\r\nC4AlBQEwr4o4iDro/Wrhlo23SCZbKC3SyicLmY4b5iarir3jMJ4MjSwZbdCm\r\nBM97Rb8ekcvHOpQIltTN4lhnlGNBLG1rH+6AlmPCuyvQL9Dfj913Gw8JQ2wW\r\nNA4+I+JEBGZn+VtuM1suHKOMXxIR2SYmoumyTNWUIY4GFoe24qyPpe+/M3J0\r\nim/6mSAn1lFVifpjo+EsVPJEk+z05Y4udGU=\r\n=SJog\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1bae82cb91a8b1b453233c271fa8caa3ccde033b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T15:41:19.111Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.11","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.32-lucianbuzzo-stream-typing-1bae82cb91a8b1b453233c271fa8caa3ccde033b_1660664640462_0.6094415496854033","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.33-lucianbuzzo-stream-typing-946e8c569d5b75035bed82ab220868194c05c2c9":{"name":"@balena/jellyfish-client-sdk","version":"13.0.33-lucianbuzzo-stream-typing-946e8c569d5b75035bed82ab220868194c05c2c9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.33-lucianbuzzo-stream-typing-946e8c569d5b75035bed82ab220868194c05c2c9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"35181f8c718feca1169a2c5a46cafd62fdd9bd1b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.33-lucianbuzzo-stream-typing-946e8c569d5b75035bed82ab220868194c05c2c9.tgz","fileCount":31,"integrity":"sha512-0qqJOMNidArsd3aJto31hi/Mz+9/rdUlgmHl0BQn9wZDh8GS6L4BqzSbBHQdphnjLCZ6KBGdGxfT1oRfohbSQg==","signatures":[{"sig":"MEQCIG9SKvXs4RdwslC2pwa61PYebzhW9TtX4YnYVcv2gIoaAiA7mLV+vRN426hOVfdOgxwzBfbVgC5nhon/e+MaoO0T6w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+7wpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQgQ//TkAhVYHINL18Uv8InZxdRj1fVOfeRNX3i03rIn/MZiyxAScS\r\nxdaVJ09zbZzx77YY+Pa96d9C6xt35d6i63J+4rZkm6wTBkuDEzgB1ML1Aw57\r\n9/8tXJZeEeMUBZtiEMHdvSMM5pJEDPBhga/Ex62Cgamp4gBEAGuFg26REutl\r\nw4nFU4y9sX2ScDsInFdpCMvWUujqrH5gwlLXS/+AOueOVRqDyHhCs/Jqxpcl\r\nQmRx5OayqVgo/F6NmgQOSctyHdzR4AI1dyEBj7XM+xx0QVXel4s+z7ERxOlF\r\nk3V5kflWHFBgy/06i5wPE0pp2q9FBtKOBNu2sUdfEk136XtzRz+mbDGvpJAG\r\nPcJBsedbTyzW1Q8QDEIn9x/hZVev7ow5oqditpQLem7OzHb7Q1qAvSlA3zKg\r\nSL2phRVEEQsueujhje8iO1Wjtg/dpHuU5nAtAvHZhi9aVTaIsnxZOU6WuiL/\r\nNFh6tSrsB/XFp7RgtPjXF3dDLMhgWIhv20Eh7ikx+bFViMczV3/2oKd0mnoo\r\nCIXVSkR3sLwZ6IpDV1aEHKM2Ku8g8ZKB7eXcnj+NOotxhGrkVv+GN/MErvvE\r\nAdP47C3OlDCfvFKksAdDaIDc+haa61GL/e5d8X7+H59c5OBFPa0RxXbDRs6M\r\nKJ8E5LD1eGMT809vXZgh7KiKHGCfqZBBG60=\r\n=DbVB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"946e8c569d5b75035bed82ab220868194c05c2c9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T15:45:00.574Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.11","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.33-lucianbuzzo-stream-typing-946e8c569d5b75035bed82ab220868194c05c2c9_1660664873365_0.26730716948273825","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.33":{"name":"@balena/jellyfish-client-sdk","version":"13.0.33","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.33","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cdd0e9d88f5829c814ccd57652405cc14450adcb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.33.tgz","fileCount":31,"integrity":"sha512-wy543wKHKQ6jh25ndLpx3y9L2pLcXoZ0WkfvRnJPWNqo1bTsiM+lx6SduAstAZBwdRZ/Oyln4XtfD8zMdc+4+Q==","signatures":[{"sig":"MEQCIEwP5pECQ4noD9gOy7jEDc4P3JvVkH4/uBYhum4wq1vQAiABF1XG7s0JvpzxtBPFmbjnN7U15KYIXzS33GLRw9/lKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+71EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4rxAAh2EXTiFrDCKmjO37xYIvVEed7x1/RZhsE46N6j25YRn/RbNA\r\n9Fz7t7rP86Nz6dguFxe6iDTNe7eKhfBU8kw1VTcK8V1ah1+qdw5I1t3531UZ\r\nIOrk5uHAPuwy05oYv8EHVwi/0ZrCXGZlkckzy3zo3I/nkF3qlzkPd9/FpEjP\r\nQoXhkr0qmEuPQDQlggdtTwsxaP974l104HltMARxARZvY5M/mBJCp6NEWrlt\r\n1k6ZOBc3yIEzwM6XIuFCBlSTcAfe072SEujLuW2Y3o3wmKU34MW/R4O70sIp\r\ne5IyTR2kC6sEBIMbgkC1nWTSzgUKdnDCJV4FhOVRfo4FocNUbTBfKCnre8PX\r\nB1d9qzn2/l62dYOIOH574wcDn8KVSKa28bhiqHtKHI+9svib/s9h2mpxKAyZ\r\nnZafrZUKLBfkGsIgUEfqcfqcERmlrwE9wlrEQzryHmKOSLLBOXT/Vm9Glrmk\r\nVxFydqmaP6snFCvZQObu599zNkrcHvJmKDd3Q4tiIeCigWSR3vCuS6XCRuH5\r\nGu6nC37eKUcbtrfmjFxtDGtv3nOOVmCxFc1qbiPLAiChbDgbS6hBsqRouT2J\r\n6vCI31WnTgXuPc2UleLx3lWMVEZhWiXICkz0YSEbHeDpJdO1j8UJ4aROtOLN\r\nFzlDuHKwDryXXWF2d9dhLp82nOi0FwFxCrI=\r\n=rWAP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b52845001fd8b7918666edc54efc66ad4cfc6360","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-16T15:49:55.167Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.11","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.33_1660665156214_0.014734169497061522","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.34-renovate-autumndb-22-x-f879ee8559c574ebecbd7588cf560ba405ace2f1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.34-renovate-autumndb-22-x-f879ee8559c574ebecbd7588cf560ba405ace2f1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.34-renovate-autumndb-22-x-f879ee8559c574ebecbd7588cf560ba405ace2f1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6be25cad4883caf2fe9138b63715b5080c7cb58d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.34-renovate-autumndb-22-x-f879ee8559c574ebecbd7588cf560ba405ace2f1.tgz","fileCount":31,"integrity":"sha512-ylrLaBbjJIV8GeF+2ZtHKUtM6cbqWJLmqciYnZt+UHDau0lWJ2xLn8lSgBvfSeG3s5Xwtfh4cva30sUzZlcbiA==","signatures":[{"sig":"MEYCIQCL2U7cwqbtdLoOO6ZQvV+/bmPKZZr4CSUZE6c0NkrELAIhALChBaMM57aj3vCw5YWiX/2RjYDsi9Sbc4rlx6ANcll/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/PveACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFLQ/5AWJXHxLaoIQm/lFq8UBjn6DaGrPv2opJcJDdhpFh0W1vr1e6\r\nd25gbTw4oVEhbDDlieJ7UcGAmDQTyJlbYpQb8gWk4jag5PTBPcJeI8cgOO/L\r\nXfnu8jFVuDOXwg4CpoNDGz7/mcZEnKsHgxEjeyJ4UHqNAl9P0zU+84Zjc6Ye\r\nE6zusPz57o0ruV5wGXwC1lYT5FfnxisfmZr4M93mQfnzyphp4e8CVgTibiF1\r\n7o5ssSebtNSKZwvOGQOuFkZyYRuIpeypf+hfCndDT3DId2oN2mrvT4N6a22Y\r\n9zAPoeiwNUnFUV04lLjrLUMrWxuKUEY5xDsx/mElfOIdrJYlGUgmeOr+lYoI\r\nKRmU6xhmQvgF/BrNYRAhYDI6PW0cDeeR/f+OoK8ljVXHzZLZYgw2iSpcfThq\r\nUEaYMyWggnEb57wZpOMy6Rce8F7WomhffgyQWMJy1s9bDPNpP7D2RiHyYG3O\r\nHp763Z+KMmcj180D78EHk706Tjqzx4Oz31r11a7c3vmqjkvHGinufSFgPkzp\r\nKjAeHN29WU7KBJKol0QrvqfqadeNMh/9WT6pcQ+uDjbDg+HBd24KMmbYV00c\r\nskdwFvFpN2jD4PtOZPrj76SJJk3NwtnOqT+z/1QqnSwhjdy5ebLd30sYfX58\r\nwMs4hoi0syCXChr1j9iVQJODOSn1V3r25+A=\r\n=Q1/T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f879ee8559c574ebecbd7588cf560ba405ace2f1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-17T14:26:34.024Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.13","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.34-renovate-autumndb-22-x-f879ee8559c574ebecbd7588cf560ba405ace2f1_1660746717939_0.9139669330365028","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.34":{"name":"@balena/jellyfish-client-sdk","version":"13.0.34","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.34","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d56d174aac61e302cd11fabbda66d62b9c2015df","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.34.tgz","fileCount":31,"integrity":"sha512-1fQO8AI0VwHPhAbQW2+i8yJ2AmTmLTLERmG7R7Q9X3W2ns6oBA1+oderEIUQhPp4DeP176mDalpMibI8AFMwQg==","signatures":[{"sig":"MEYCIQCTK/PBcz3ypbBeqqq3VbCoVJ9wN1bpSUmVNmdd4jKhJwIhAMZw9N/QEXmfKwKFCu5BwPhDoS7lNBjJqRuJDdetfHFz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/PzTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCahAAgMsxIIjJAwI4E/MV6+h1A1RBkb3Pu5k7RSSdHtH7VRPjwVCh\r\nJPnwN7od35zeaE62bcp0qI/fb/PWyQfeadE+gnBeHxmxyBjrffBRFp7b81Ze\r\nSqqxOaVlLfOZrwITnjszKOFF7WhO8XSHJPh5uBpaB0QYtFLFmvdAG8s1oXPm\r\n69Vx9y666vacO1BszK6GalXB+OTbXuS92IJVl7OdyjPlxEi+yNN9hOxUKQQj\r\n9+5G9y4mfGWCFfDcEkVVL3odI0Xu5b33BdWzZOucQHjH9MeDGk/lWyor6XIq\r\nP2lRiyubRjdnrWdqwR4WdvM2jUFYIVvmQ1SyDk76gwqsYmGXSc1hKB8Z5/xx\r\n/gJyLr31tHRrmybGVxPr5THrUBfodK8adiSI/684uQbBkXK5SLHjC2cqVhHs\r\ngPXswMFo4z+mE4BET8oslYWIkJIJWdxYvjelVA0n4x9cnN98TiURD9r0qMez\r\nshUSy0o2nBCES3UqpuXsDwCvH9VKkRHgqM/aEqrHZIQVDoklKEIQvEHMG0Q0\r\nXXcUr7V7jSJMxE1Labc3/cFIfjOfDN2SBD61+j7mo3FfHLN5bV9QtyJGgeDi\r\nVo8+82dgWJbadnPHR69HkRrvEHJayFFUlCdp5RTqZ42myYUlnaAaI2oew6Iv\r\nAen9X6DfPwPJ9jHw/vup7fWtvgLE69PXXwI=\r\n=2p+S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2456b23b0d5435f22d419820142bd101520ca247","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-17T14:33:53.367Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.13","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.34_1660746963472_0.757587955916879","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.35-renovate-autumndb-22-x-de4611c04fe4f832882440bb0090acdbdbc61bad":{"name":"@balena/jellyfish-client-sdk","version":"13.0.35-renovate-autumndb-22-x-de4611c04fe4f832882440bb0090acdbdbc61bad","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.35-renovate-autumndb-22-x-de4611c04fe4f832882440bb0090acdbdbc61bad","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b24e111958dcaae388cab4a1931be48b8bc2da16","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.35-renovate-autumndb-22-x-de4611c04fe4f832882440bb0090acdbdbc61bad.tgz","fileCount":31,"integrity":"sha512-NCtyXulfaDFO0kyNGfXIxX3uj3nwD5DNzHYj25k73XDVR3kUreh1p9vI+vSPiY/BWMQXn4Z4sR16W9h2DMp5rg==","signatures":[{"sig":"MEYCIQCO7yU/atBPdTzWYu1JpgdMBKRz3CVshhdXA404+hmYdwIhAM8X5YIoF8mTo9mvniUmwMfzuHzyFo4HAgxcX1waJgzb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/sD8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoB8w//UIpaP8hhv+yP/RMcWjmRxCZgoQzD4McHtp62jAWAqxg4o98M\r\n6WIsYSW6O99zGRFsLsi9TUKnd93XcjTwIpAqrWjhC5caVdqCnUVTW6iRmEUo\r\nOIzG22rQpIhwdV2RUtfj0l4i+PRMgmDQHFw4mh0v/bKOyc4yZtlxyJKi8Rqk\r\n1wyIJm5pPbRmwg0/sp+gyYBR0sF+xLavY1YVgYwsisgBZhdgw2ToDaOsQDkI\r\nCVdDRDkKXreo1wMCPF9KntGX8SaFiN4LSvIArU8UWvcz4tDBpaXMgyXjvOC7\r\npCDT+coTN8mUTDuFLy4RLXbap1nAglFRJoj+P+K9cFA8sUcTPOdzI+EaiHWI\r\nak1e+WvdAbdhyUCFgsixFGso4Zahr/racvZF8p1m2qlkH9O8VeYQ3NPuENpy\r\nRqF/S75+cN4eYJQBljKMFsNHHcWbPYDYkDn/dgziHGDdsmpm8bt0KNn5lrCU\r\nDSiujH2fo5BbFLfeNuvulYVPq2P8z2Rn4VIlEQWA1boHr3ggqPfcnWNGvE1B\r\nu3O0W1ue+X6MTNMOOhec46Lw3dHArkZLVNp/y3SKt/PtGqcZOxtd0zayzFLW\r\nbC15pE1s/9OBFOUIs2K1l5jmaUZ69gOeGe01wPWSBdg/wlWT8OjY8el+Vtfo\r\nBxiuC3GFM/vXyUw67fib7+ovHyUIb75CaFY=\r\n=YJMC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"de4611c04fe4f832882440bb0090acdbdbc61bad","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-18T22:40:59.952Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.35-renovate-autumndb-22-x-de4611c04fe4f832882440bb0090acdbdbc61bad_1660862716684_0.5367675363802451","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.35":{"name":"@balena/jellyfish-client-sdk","version":"13.0.35","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.35","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"116a6ff1ba3efe0333fd0be084f25c1f9b1dc350","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.35.tgz","fileCount":31,"integrity":"sha512-jK+LcHmKiRAkMqSJJg9bV+E+qbvaWEbk+0VT2EbTo7pxSfW7lxCbfj0M5SA1ZBEW+JfuAC5ihtLO1sKwDodpig==","signatures":[{"sig":"MEQCIAIJvVPy70JqP8JoQah7BecvEUKPXn8f9WBXy8fRURZQAiBwrEHPK2kRsSCjAOzMOqc0/Ij9cbDjXJ/+UN47wtkHpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":215974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/sH1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvBA/+NOxTXEfR9aJoNPVq+cBdr0CRmLIyr6afQc2N1C8pxgQLCkUK\r\nP/4+jbnFdQFsNw3X/okC7j2jep6ATlzBTxLgLLleQmQdyVBSDiAHOtyR4qIq\r\n2nEDh6DAmsHl2TzXTV8iqjOc9wV3kJZaAJxkTYg8Y14R3XOed3ov0eu7aMQC\r\nJVkAByDSrRq8LejUD6Ihuk6Uiit+/BTyDGf6hezMstdO1BWPKroGHLmHxpbY\r\nDyCpQ0MbRXdn6OmkqboU5nqndJS7H+O4koCFlGpmVO/VEr5EJOvPpfm9W91H\r\nrhqFGaVJ+dLMQlPrxf7gJxf7xUv5xdk0WY7rbqxe0GyP5vMxGaxPGSn+V1cq\r\ntM1ygZuA0l46kjnF1MmVuvXuZgvu3jhm57ii3aXirDTarj383xycVtLPQnO8\r\nAgjrcOSkzzaV0N602FOXEbPiyjgUlYmFLlV2CguP7V4ASDCUI6klbcddr+Cs\r\nWWzHfPyCnZvlgSIUsbAZrOXeuQanPuYe9Di5edcRIU4yVWK5Iblvkw6rvCtU\r\n5oRrHXSLJXqWGR45ugip0atkkkfKwYfUN92dKINz7WLuPjXSGZzuPM+XaC2i\r\nb6HiaBm/8m2Nz1NWEzPgKoG6WVeIU0/ak52uz4sZxvQrm4Meogyzsn54DBrE\r\nKVTUukiFvA/sh39E/aUy9dKH9nI4Vem5Ld0=\r\n=JyH0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d171211ae06e6efe9bb034fcf0c8353a58942b0f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-18T22:47:01.725Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.6","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.35_1660862965457_0.3581162440390373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.36-renovate-jest-monorepo-65c168af4474f0c9ea008ec724808169e273a878":{"name":"@balena/jellyfish-client-sdk","version":"13.0.36-renovate-jest-monorepo-65c168af4474f0c9ea008ec724808169e273a878","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.36-renovate-jest-monorepo-65c168af4474f0c9ea008ec724808169e273a878","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d10520f0d857c285fa9f1c3f851235b2243eda07","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.36-renovate-jest-monorepo-65c168af4474f0c9ea008ec724808169e273a878.tgz","fileCount":31,"integrity":"sha512-T81n5Eq0qsp4OdosXhn6MVsbB0rAJI+Hq/g4QV8DOsipxf8qDe5nMwjwxiFTDe8vtKf8Fd0tK9GLyWI6tfrpHA==","signatures":[{"sig":"MEUCIF0+7m+JOQFou4g87l3inojECpk16yCUC0ziq6npgzoZAiEA3sW5XLCgr3Etx/Cr6tGsFzMXh43ZaT1TqbON3QRKK+E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjADRUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYvg/9FIkFuHSysjUvrSeuY5Gx5VICwttNJlkniPUfKMsWZbdjGmx8\r\nWr1nNZptDs3ZOvnnCbVrvf1nOUfco2+rgRRwVPLBSEKIrsggpzTVIHYBFGn3\r\nQlkq7karTvWbRGzAprgUPo0FwX99CSamSrcIkLgayPeRj/WJedizWosHPH0t\r\n7pLD5uyuGiSvCYFPWTpwbkNG5rDsEqe5lGgmJIx1WE1dRuZ57vYb5CfrlHPs\r\ntEL8wFDZIlxQEH9gPwmvXwYusuUckYosxZ3sXb5ZdWqjW3aIeMF0E79ctOdx\r\nISPm9HOfk9gakW7b6xvAcqJDhVkTOiyQGU4WbGYx6li4FEfbu4WE4/v59utJ\r\nt367I2uIcrIpcxg3JhdxZVc1nwalAr2OjfuorUuGM76uvflG/lWrWy66eid3\r\ntXXLnqYqon7a1s6saqhruGPhjg6YTknYR/RrqzzvHocxY2pSpaX0mYTHUOAP\r\ne/rTDlDnPUiHAaxYxlzVEsuJQ7OsNd03O+DJ0QiHOJcTxPM8BN3vq7N+zJQM\r\ngbnrScpX/BJx0p0ZNmcz/osBIwqpr0s0IKjHv0H/vESPIvxYnZJkRIawOUNy\r\nbnNb2HJeM0gL0c+G9xhinkpanIIAa8Me/dPt/cuPTGIwzl94K2paKL+naMHZ\r\nmPOi8l8dFWwmPYCzA3oL7cIDZBTLo6tLWko=\r\n=5h0o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"65c168af4474f0c9ea008ec724808169e273a878","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T01:06:45.158Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.36-renovate-jest-monorepo-65c168af4474f0c9ea008ec724808169e273a878_1660957779847_0.05125171266039219","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.36":{"name":"@balena/jellyfish-client-sdk","version":"13.0.36","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.36","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"467d259ba2a01a0be1222515fdf5c3b1dd52b267","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.36.tgz","fileCount":31,"integrity":"sha512-62crVbCRKXbuhpBYLvSvFE6rwHiHRek/XvMj/v48OgoPfQxe7msJwKI1fW8x/fOgTbdq8NkYfw9ZyWH739gSGA==","signatures":[{"sig":"MEQCIAMRbBSrSQwr8PXsMEh7qjeSa8CQX9XxXG9g2lBCvJRzAiBMhuLqN6e/UGoqOs/AcWxdwOG50H/cuvEsNpHq3iypbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjADVKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnLA/9G7CiVyvlQGJk7GL1xQfqUf+rVArg4NEgcCRdf8r5jEgx2VoD\r\nDA19TbINu/F23zHBbtFWnAyZ3FxDrup58aBVFdkmy9JW8h6ft5Nupa4I/AYd\r\n/hmT3eEXGgasTVyCIpOdevetECNApo0uSqiD4sZJYD1P8YjDEOLH7pczfGfA\r\nO8i1e3BNN1YlJmI5Z5wPYZ8kgBaBJNNZlJF21SYEGCqqZfTP5Lf7wojIx/U9\r\nByLqG6isLPnEUVSpQr3ccZc8Czf930KmCNeATG6k6Ya1vF7yyU7GdjPV40wS\r\ndr8l1NSXlYapvm5tM3O+cTn/O5ExMrwHX+XIyZir49kI3R+OmiQJorQBagoC\r\n1LpCGF9slS1pt0Mxd8glxQpJQue3MazaG3t3IzDYSbeschHVNHpk8PZXmjNh\r\nQHmtr5z+l76qNM7/3/PdqVZvzaN9ZvdzgQqNkBjHulBysZsmfa4jfTl3tStU\r\nc0Qp2bZ3kR2sU5bDxVdd2VPzikkTv+XdW57H9D89YF1oN5FmMjqrvrjPrl8Z\r\nFdW/CYpzlsngb9dmveVoSzEDjFeNwLFd7vSB1TgFUKhXT86aPbL573/jkiYG\r\nE4Tv1mdje10LWUTrydS5TzkBx93F5juNkUJvGmTwfy7As6DUH65mHuzAnfci\r\nX7HzSKJbg2jFetmjN6KvdDlEXKXrvWtoDVA=\r\n=txfp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0cb8f7bdb900d99506688f47e54a090b7dab6054","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T01:11:19.857Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.182","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.36_1660958025708_0.14047666427978145","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.36-renovate-lodash-4-x-560f34f2a31dbbcb87399cf5a66fcf8a9d4a0d60":{"name":"@balena/jellyfish-client-sdk","version":"13.0.36-renovate-lodash-4-x-560f34f2a31dbbcb87399cf5a66fcf8a9d4a0d60","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.36-renovate-lodash-4-x-560f34f2a31dbbcb87399cf5a66fcf8a9d4a0d60","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0a69bfeb8041f641d02bd35d61f774002d4830a6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.36-renovate-lodash-4-x-560f34f2a31dbbcb87399cf5a66fcf8a9d4a0d60.tgz","fileCount":31,"integrity":"sha512-QHqSNbmeWNDCS4OpQMQ/ypAPs2slXBuXIn3qVkuTTktIYTIGB8/moUfeGwuTcrzCn3zrfBc4ZH+hISTqAfKOdQ==","signatures":[{"sig":"MEUCIQC0aiB8z50VYuRqSNEt+6IFl+Ju+84ALX5zX9rwgXx8MQIgJSyTvE2nLtBksesb2i0GJQ5Ac9NVfBdbe5G5E8beey8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjADYAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8fQ//X4CknB8hZAOhJ7iO2ANPciA2Y76KNDlNQzBz0T0HFEuOsuMo\r\nydo1zAD80e0NRGsH1hq7dP3UNuBU74X3PGY9rcsVcK7yo8BI87HZOvw2iSqp\r\nT+u8wqPen+UjmCo/Z8SqUyvqy6g3emvieGdGf/CoCDFP4MbAy3zaqaq2a32Z\r\nGAMMptgDq1fnWkEFVrpGjTUwrtEa70MZtXDUHLDYndof8BRSXaGNikfc0Pld\r\nL8tfxK9VjXFPCmjGOYgxWUeNW+GNLcvJzoUI3BgS8AvyNAuiD+ARiZ/XfXaK\r\njF4FreT3HVZmtONyRCWEY0gporzdKIamSesbSFnCuhsh8r7//VRZm+QAxx2E\r\nDv+4iQwh7MOSDYXbcMsPfh679mWHyEnB8TEObVMIo3M0J5dVSLBJCQUvpy3K\r\n+ev14oUH1nPvj0SnqivgttubnoZZBK7ZxpZJdI61ZFqjNU/avu3sBPB4OeI+\r\nuIB9enKOCEE0cIBfRKdmrOA8H0KV+4SxoYZiPzolHfzNli2OceqVX9YfwVyu\r\nLvEbEMDXoIz2THjnuj/JXkTuFBdePvQVZCIe5+PCzhnoMFaUIkpj9OiWr//i\r\nAONF1M1dQVBJlSiWM8Vw6nrDhBrCEz55aBG3q+NfAnp3tn+LvXfjjDjG2TD8\r\nNpTQpx6grKEGaIGm1+VIBJyKrhq3MmqN8is=\r\n=+adS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"560f34f2a31dbbcb87399cf5a66fcf8a9d4a0d60","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T01:12:08.985Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.36-renovate-lodash-4-x-560f34f2a31dbbcb87399cf5a66fcf8a9d4a0d60_1660958208090_0.1906399105742318","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.37-renovate-lodash-4-x-4d3bb3b9b535836df8e6b9c15aabf0434cd79d28":{"name":"@balena/jellyfish-client-sdk","version":"13.0.37-renovate-lodash-4-x-4d3bb3b9b535836df8e6b9c15aabf0434cd79d28","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.37-renovate-lodash-4-x-4d3bb3b9b535836df8e6b9c15aabf0434cd79d28","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6fdd90afd0268681823693c941ea30a396d6a04f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.37-renovate-lodash-4-x-4d3bb3b9b535836df8e6b9c15aabf0434cd79d28.tgz","fileCount":31,"integrity":"sha512-EahM9yxkZS8x8pgx7Oc3Cl+Bm297kavwuRxzyQ3kszXH2HAm78wPvTw7lvgXy6dmjXF/ojFF810OOc4NKJaXlg==","signatures":[{"sig":"MEUCIQDnCE/FJx/qX2aHwgxOd02AlZUQFrtLzL7qHdwVATE//gIgAMMhOuJjhxepGiFtO9PwyClmWWOcUYj0iZXhd17MrqU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjADZxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYHBAAiOGT0Rh/XhNsJNl2/1kF14qRIkp8d6itpCr3Wsfj5HaMcVuV\r\nQW/azNeY0IHlBwrI7bkyDfWim3GszaX6zxfNF7AFcp9qQFGPmjcXFEE2X0L/\r\nZmad7ksSaOqZcAJs/8XMaQQR3E0jj4iBrNreefgBykQigBckk5lGNpQxMQTy\r\nRpTaRnQnSSGCNXjOWw4sjy2FsfaW+IJG+e4VxcxS8K/84wnSSN7FAdxNuJkR\r\nJuzQ3uujnJhqZPwCDU3473eOA3FgLJZg0wxg8Iv2fD0OQ6ylGh8ua4dvp/nO\r\nl4VkN+HIUaYvw+PSGjIcEQ5KM1vEbKqR4b1QUYYwtifCZAqa9jJCEhCrOmQn\r\n8oGtT1DaXJJVC4Act6odvEZSv4eqoSlukCoQMprAGcq1xLua3iFN265TGPeb\r\ni0lHTNPwUKfcFGhs+R0QsO7REiNQsikv3Qyg0u73f8mQU6481H6xfwN4SxM/\r\nVehmJq1qKbNr30qqRngRcW7Voxz5oUz3rcDxHG2muOARXzX0Gul8d6Z6EE0+\r\njO5Dw7eOd75sIjXIBhZEA6iavHbKXMiDns52uq9DBdzAJziWF3E96rAaCD7q\r\nrsmU76Ow0Q8iW5Vb9COU8XfgRokMf/tFbHZXcyrR3yhEXxZ0YWB6cv8Nq63i\r\naYifMcl4dk5ZdpMt7gY0VcdnXiUzaWaIONw=\r\n=pFB9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4d3bb3b9b535836df8e6b9c15aabf0434cd79d28","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T01:15:14.359Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.37-renovate-lodash-4-x-4d3bb3b9b535836df8e6b9c15aabf0434cd79d28_1660958321608_0.617481237393648","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.37":{"name":"@balena/jellyfish-client-sdk","version":"13.0.37","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.37","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7e3772366b0b109da375bbc566cde976569a0b3a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.37.tgz","fileCount":31,"integrity":"sha512-OsFEPZXMq8HLl+s5tWf9OaYCXq2BV3CsBtaw9LoZAX1agAkX4ELOCtNYaFIsce6tjCxxR3fV/SE3fenhqpdPzA==","signatures":[{"sig":"MEUCIEUQNMMqW+5iIba/UEvB3RZ105Wu2QUxxULL1oed0ICbAiEAo4aWSRDXCOv3AEeX0faN0h1unoDj9+7DlYULrYkzLog=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjADeAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVbg/+JvMfGFoYTpjcP0Fee4uT9sCMRhOipreeNd08MvrQ7mTEExSv\r\n5AMXa6DwJkpp8nyprvhljEWxFS2Vg5i/OPat6b0MzfQYrWwTrG/RhnwsHODk\r\nJUa/9wYo09J/EkL1wR1iTnC6XCGksCgdzxQYc8CCj2kvl7FtMXbDJ7V/bbdp\r\nrsHvjef2g+J08MhSf8Xuw4a5sI8ZTCzLC5UY/vtPNeHqrTDpi947dBPrbXAK\r\n+Z8kKmwWUP/XupoQsRGTUEY6lOrt0E99HYNC+2bbNb3yu0MVM2jS5zahxvsl\r\nRBIuX1s1ZZ39ISs/kBbE+e50NLFlGZRPviWcbAX+47Us19FN3SRJcxwkQWXS\r\n4Mag1/VZ87grhqqZizQvSVobmYpRVI9BKstfds42uAYH5Bjx7aAdugHIRjLD\r\nF4kbkLDNlRp9yKQPXU1Ax9ZgMqO6KBcNkO9tNueZgFSmbvfr6KnjTI0cZx+s\r\nlaBxtMAr8o9SSlT6h8m5qaV9rZXijSIPVbzLP/SQpmWiUnAG4FV+9RnnNMrX\r\nUXtAJuEYfyTTV/Y/lhQkcWWswda6Mho8psXALzMgNrRUtgnZll5JX/1SIFDG\r\n76evc3aKWDijwN8KuQc6C5jkSpWlZUn/bPTwUCcndNY/9aYYzc9+ffd1nylb\r\njuVgfEBjogSAWVMFbWg0L8yYlXsU4mRNy7s=\r\n=Aqow\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"07d06c5bb0626839d647366c0ab6a913017478fd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T01:19:52.159Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.7","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.37_1660958592477_0.07295011334824864","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.38-renovate-ts-jest-28-x-42380aa617a50bf51e0e5a6a3ee3cb493327e71c":{"name":"@balena/jellyfish-client-sdk","version":"13.0.38-renovate-ts-jest-28-x-42380aa617a50bf51e0e5a6a3ee3cb493327e71c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.38-renovate-ts-jest-28-x-42380aa617a50bf51e0e5a6a3ee3cb493327e71c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7e8a9a7bc3049cfc2ba1473a30e779522f812230","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.38-renovate-ts-jest-28-x-42380aa617a50bf51e0e5a6a3ee3cb493327e71c.tgz","fileCount":31,"integrity":"sha512-X45yZANZKfyvqwBMkMsonsS6V+F7LjpKewTsmHyGb1Ajl+rjOyhy+RHp24QdQ4OJfaUX4m4CWHQz6DM/aC7gMg==","signatures":[{"sig":"MEUCIDohPc4snCZOi+s74qzxDdNwC3U0KY8T8ldViRD7/n7dAiEA9IXK9lun5Md96mGmIuZ5IbztCX24JPCb0vup+oSCzPA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAFsGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOng//U63BwUFEbW7kTo7iqDyC9qJ+ieyWUZZGnmIvTMrWyK5diLUE\r\ndEhK/vMItKtcpB8w+uSKAQ6h/zR36tO5TU/e7Ub0ORxumsN8DhBbiI2I4fT+\r\nZMUE4fjHoQ2T2jBP9O54ay+npPSfh7MqFxrp7LMRYRg9ZW6YIaBUG4Ey6uFJ\r\njK0Y/C4WfhKMk1Rdz5l+cJn3lmzzV085qVFjq8/1FmXp0vh81IE+2IGge6tt\r\nq7TFCn5ibWxsTIEShAWpPk2No3AadnDnjEG/qyc41UIioucEOuw0O0R/GKwm\r\n/wRGBlYnwkmwaGRh95qHw6HOcimAgm8zXU6HPk1NKjw7hX5ybthh3AelYOPK\r\nNhBDWt/68RHmf4SJSGuOe38OCNp3OaoTfPfZ9gf17FmDOrPpWDebzdelaBx7\r\nUiT0avGTFwa6ytxxQo+kwNZZxVtafnQphRyA7A5pwzRLier5IzdyssLhMV2S\r\nLW3q7FXIGUeXB7jmCwg+yOOTDdvKn08iYc47MQewJNlI9Rg1wkmcEzJVGNG1\r\nVtIF0+GMEReAxhbT3/xgU5CU+ahDT0qkvNwHyAJJOZLScotKrbnc1yCJKCB2\r\ni4376I9NG92cyafWILIDoLCSg63WDdCTUp1/UoJ4VgKGeF5FF27tceDK1APs\r\n7hgQ85oAmxT9whcfCiooQyENe8FDQRsqyTo=\r\n=qPBm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"42380aa617a50bf51e0e5a6a3ee3cb493327e71c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T03:51:42.859Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.38-renovate-ts-jest-28-x-42380aa617a50bf51e0e5a6a3ee3cb493327e71c_1660967686565_0.6231697959184115","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.38":{"name":"@balena/jellyfish-client-sdk","version":"13.0.38","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.38","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"736a89fb8cc0ff81b7567b445e5dfdabbf144aa6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.38.tgz","fileCount":31,"integrity":"sha512-wIuybudUtnPdHH+PHalnx3Bxkgn4SXNRnkqA+MM6X5Sb5j24IJdQUDTBdw5Ljxg4Xyum9d//94GNhEzWVmlR4g==","signatures":[{"sig":"MEUCIQCbDA6J4uV8MyGJ2S7+XX8T9g8qFmYsNUkRPHv+t8+f5AIgViaTq5l5tggenLP1j8z1stoQLn0q+UrG5q+0z4I3fOc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAFvMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFDQ//XN4agBIL7/w93rdRJEsEa5ZIuO9GeH3c/ZNetKV8JeCaM3gh\r\nxMPaJ9FwIzaMlSlMoz/6d33zIyOHb0HYZlg2xcz7ph7vvC4KYfbalBoPQADo\r\nc7iKAGjscBwFAD3leMkQHE4IHo9QNTzso+7UOHCoEiaAELmYWcVedUbqeGz/\r\nP7bP3PaNUp0XcMReFjVY0rzyI5JiBwW1UWMJshSvdBQvTBbWyI/TkgM26KBD\r\nJg2/kbMUU1JaeqyDH615DeaGjMfb9Rdh/dWde2rCtHy27wngkQRVlyddMAuq\r\ney8Tlc9bn1dyhyd4RmRDAKXCKYM3T9p4MdAEFO1RwgipE/tbCbxAtzVoNHSl\r\nAH4/rHz/jI5YFxYfhr2sHe596TOjYAIqgoj52a3x2eyEsy31SySDranPt//i\r\nGEX6sli6M6kW7cOqDgJZdmNYPM6fUEuINJMSPyqUCsnHwJozQHsaAZAUWIEy\r\n1fYnpsbtuJt3Ikoa4ZFV0fCVWZ//tqU34a8etWJdqFN34pSd9Odvg1aLw4tY\r\naE1xl5p5ojq2M+JEW6Yx3elOW0UCFaf/rTbou2BVLKM5n70DpEO2Dg9+hB2E\r\n60m5KmDBcQwmDvRfg0OtrMNJrYpex2Dm/YA3YjcjGv3PyCEhMOrMbDeI8oKe\r\nw2ETQzQivDbevVhogb7Mt1c5ZOURYqBDwl8=\r\n=DId2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"aee481a6e6fe6ed14c325abd7f6c3d28fa1898df","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T03:55:42.272Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.14","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.38_1660967884207_0.3513069645107467","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.39-renovate-autumndb-22-x-2a276a60c132a4f970a389f45cc533042ab35a11":{"name":"@balena/jellyfish-client-sdk","version":"13.0.39-renovate-autumndb-22-x-2a276a60c132a4f970a389f45cc533042ab35a11","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.39-renovate-autumndb-22-x-2a276a60c132a4f970a389f45cc533042ab35a11","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0ef9067c98e814fce6e68e8a6fd270301b2ec520","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.39-renovate-autumndb-22-x-2a276a60c132a4f970a389f45cc533042ab35a11.tgz","fileCount":31,"integrity":"sha512-hZXLRNsYDO1FtruWI9Y5axZjXLUOKOBxFKJ79uhIbDJMbtofUJRCnlvObCQqu8mQoWSQBrLbw8YMIV7CHRu3Ug==","signatures":[{"sig":"MEUCIG3AQ3xtJY2eeSBCFsCsT8N+bx4LzjFVWIwo3PHpilMjAiEAoalXgpaCoYmaUCXZ0dxhJFYfnRRt9I5IE5XO+H7JwgA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAHUvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohBA//VOuSVQcHZxmZVKjA9vjz7qxInxjUMMlTufTw1GCDmJskfwa0\r\nW9kHt37gLH/9E5gM3lMG+uAzO1M4d5TbAJY4UDp69AKXIK1DtEYJ+g7NO/y5\r\nE7N9/WOeHCKkKEQmIrPFcbkBR/5JufM7eu0lxbVQuUgRKqJ85GGMxRgcaMf/\r\nfG5ZgdL5nH6rHSepD7I4nTNHxlO7blMxI/iRqx6OrZimjedH12DQ0CKWei2v\r\ngQv7ETLzJ2WhgjdMlwTk0EBb799GrPdjYiJGC5p2zh313QK8sxVlPkcRvKQY\r\nqb0deuRESZySQTsQo7mdmarsmaURMjcK+b+KcdO4pSlrEPulMAcrOgQWzWtW\r\n8w01fbSqqa4p3S0Hu6D4Zuq8FeAAdt5qaD8WY3bn/J0n6uLq0COIozEqGijK\r\nCPDqG7zjpy3dxT2TLrHkAp5osEx18Ghcx30pswFc4Q6sbn0WjGdmP86k9IwK\r\nksT8d5gaZhA4ictNGWKoUqwqBVCzhw81fck7Uix1aSAJQQ8m+49fhlFZSYOM\r\nw5b4rPRH7TgXsRiQ+/HtiJZHHamkx0p7nuCqxnb4arErPnx1S8kvLyNXso8Z\r\n0STcStbWvUQmZzcfIVlRhY7dM8rDvEDJ3jIlWUBso0hCtnglsgBAVZU4lksy\r\nH0LQpNYlDfnAQNaDslwYg4qqEPN/LH+L7rQ=\r\n=MG55\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2a276a60c132a4f970a389f45cc533042ab35a11","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T05:43:30.150Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.17","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.39-renovate-autumndb-22-x-2a276a60c132a4f970a389f45cc533042ab35a11_1660974383272_0.10468817746841208","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.39":{"name":"@balena/jellyfish-client-sdk","version":"13.0.39","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.39","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2837387d5b507ed6e6792d336d655cadf6462574","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.39.tgz","fileCount":31,"integrity":"sha512-fYFXqAQ9yKh+5ElUAz0l7GMhWKnfWW/bYAMeHsIfzs8vTN01Jbj1AfpR1xyNSDllLfCoknyIi0Z8sAL/wjv2jA==","signatures":[{"sig":"MEUCIQDhpQ44lyE4ToWgrA/ZPqhloIYssyGLpmQqgazRoXiaZAIgfGMLxYmOWdEukDSTbwfWieSLEI4KQ7brMF0c1Kq4GBA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAHYCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoA5Q//VKp42MUgVOJ05iETaQTq953wf1ShpXNkQ9M0FJ0ZD5mN67hG\r\nbaw2xuQ6dS6DXEcIyoVy16NGl37+rQwabSzq+obVaU/qhUnNmu9LUffufkyc\r\nEBe0kjqgzlQ5z+cwtFURvNqQuiTZRGcM7ktCJA9hLZiDfGZRr4fGSwFKGNPL\r\nPeqdC4UCuMJL9kwkCIAEUeeS0yjsPuBTrBql4TQvj0hqoxenNZ5mw+cfFlCF\r\nZJAfHcxShZofI8nGbVnpAvHNl+g5iA1EbwmQA7GkuvShqymmSgxx739Mw+Pf\r\n6adI6LpcrRUkVlrCJMULnpaIvRZvLpIlmhbtttsin5GVhGC2CObneKEdmH8k\r\nEPStiDdXmYE/uHZDWOh6qAGk/amwFVcwjalrTfBuNyvBCSDy+re5qVG2hcAG\r\n2h0XwdIv3OLDThsdtafDpnZCGcbc6f2zGC4MB8oBjGA5t8W5fORDScBhn9hz\r\not25/IX+1nK4aDDNBDMd+TbwTyDU/b04c6GLtH1zvzwFAMA87czfBZ6ciYin\r\nVK+3Oz9Wcqv8Vyv58wYoFHP1LQdP/+EwajbfLzPzMozqz3okuUPIeQ5zwXjj\r\n2A0O29U0qNJFc+kkUw1LUEtL/0ONvi6aEzaAePasD+pzbsdDXXL4SUBTUqKL\r\nhqVqnjU3VGBgzPCWVQvNQqzciboFJKE/5y0=\r\n=dgzy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9a6535985650445f64c5b4f2caef2233d97fb7e2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T05:47:26.823Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.17","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.39_1660974594646_0.12197743119429894","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.40-renovate-autumndb-22-x-b98f9837af362e26abbf7f1a55679e2b68c5b1dc":{"name":"@balena/jellyfish-client-sdk","version":"13.0.40-renovate-autumndb-22-x-b98f9837af362e26abbf7f1a55679e2b68c5b1dc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.40-renovate-autumndb-22-x-b98f9837af362e26abbf7f1a55679e2b68c5b1dc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"34e5845d7156b005941e1ab9cea61b71c99cfcd6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.40-renovate-autumndb-22-x-b98f9837af362e26abbf7f1a55679e2b68c5b1dc.tgz","fileCount":31,"integrity":"sha512-m7MrBzu/WbgJq0XyqNw/ckYCiBbQZDZ9Xqm3y4KDEvS62Cmhbfx2MZ6r88Olb88wjU5jJkZFSQS3uQzEVnS5cw==","signatures":[{"sig":"MEYCIQCQ2MiX2AXYYR4y1zPJ1Ok6V0/0TeVXUAy8+kbwC25mdgIhANTqxev9LkQ86anRll+yiwnEuWhCpYvL6KFbSv0ROQtj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjALVWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlBQ/+IPy4l5SMqxt1nGtEOSrGyWBTT5ym38N8JIEpWPNqWK0/IClC\r\n+Ysv8oGntD7jJdTztVFli2ndlS4aaqnPgX0KAiwBt4f/cW2mBNRraEQgPlLM\r\nxtyleGQWOFgfp4/0d2/3zKMA/FRpffHplMYBerSGuXP3Ta+aG47VG7TWZOFh\r\nxQqsSA//1rUyHME/AKY+GtcImg4BIiyuxkcpALfbiWwvySxRQ0AOpOOQAMWm\r\ntm482eGDFRRqkDqqOKwa1I/kgzelZNEMomSb09Kr//kPgY/vD8U2l6OGcMce\r\niPiTCSfR1FjWzNgtUXplpj81zW8YZ0k46ykJB4ikZ3sWoRt+F083EWs8ha4Q\r\nG1lSIpAbkjMxdkB/AAdWsz4pLPMiKtdKhS7EYSjbZp0TiiD7bqBjNYpvYvIW\r\nGmrX12sCM/m2/mGPLTpxY9z6ZTlYuQfttGQbPSFOjmLE4FKWks8QOtfE8Xp3\r\nk2WcMqU/SirfASnvJhE5/KEe8tLQbLzO+V0/zivLlqdxsHjiJ7s5OnVz0lLw\r\nJKwKeW3/rLvFYxGEmkNevHl9eClN/OYyZ1WCe13EE7IHkzkPtWuhRZH3UbtO\r\n5ROG90gFx6dUsvVcAHqO8SR6nHVpIQ6b7jYpCyUTk6pFwRZJ7/f+yBDxEP1S\r\nduMShYbHaiB2ey7bf0oHm2e97YgzWRcczLk=\r\n=bwkN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b98f9837af362e26abbf7f1a55679e2b68c5b1dc","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T10:17:09.438Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.19","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.40-renovate-autumndb-22-x-b98f9837af362e26abbf7f1a55679e2b68c5b1dc_1660990806486_0.8892294953542899","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.40":{"name":"@balena/jellyfish-client-sdk","version":"13.0.40","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.40","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df1cd152e8036574a94fe7e545f43db8da607a52","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.40.tgz","fileCount":31,"integrity":"sha512-xjs3JgJaJ0l1yQhepWZ0/HAKsOTZvvjeT9HyYw5JAOzoZ/JI+77x8osJ1en+CdVdKo1kkSEzmsDPPtzXTDu0mQ==","signatures":[{"sig":"MEYCIQCqtdpSU9CgJvYWcCbDv2vmgLUsh7/Lv0gYRTGBlng1SwIhAP5p2jajKYN76UUJYfrdW13ACwTfXJM4r8QX/vEuNIlZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjALYYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqRjA/+NfjhT3kdpTpw2o5MHZGWz3MkxCzbdeerObDYg/4hpf85ngS/\r\nEVRayflUb690Zr4gBZX5nA5HPCEdAzntw6IbISSTcn+i2MDcTgPr6otea8Sd\r\nBBfMn4p4AnPsxZvDd66TuHCBUg9CPjq9mKWyRKumKCp+YAw1mta3TnYkXC4K\r\nPcx/UeOKkuyhYUrxtJfAYxYBLRa2yqNjIZaCtcA/hKP+/Vz36HDZxAEIAkRY\r\nDRChYF190lcLPoumQkNeL120IuPXH/LpnoAhcbst09yu7HDjmluIw4V1CUMW\r\nozD+O6HvScYl1s5gQmuyomQveKkrrsvG9GqNW9kbc+dTCdIPMKENK8fthPWc\r\nqWgGPF5arQRsQYJEkyY4ImSHJ6qYHaypFTMXkikxHlgsoO9yoDn6NlMxWoSK\r\nRBoI9lbbQBm2Bx7GUCAqaeCq0tnldbGMs66buNoRl0WUHF/3b4gkqsHmEQnH\r\nbwzXRbdT96eEjG6HV67WBrl+TBYfHpuMFV8RUHToaCDCs+cmeQYkwae3hU3C\r\n2WVRIRF6waev81R/YCyfJFJeqEqfGH/mVKoOJZJdOwPjjbN3VsPFSx1D37OR\r\n/u9niY5grw0d7jwZvqkWR6EpcYomfjV92TpXW4RNMEelIBqNoc3Z7LVBe4Ph\r\nTsdwrhUvx3H4q8ns30CdB027hyXpsiTHT9g=\r\n=qFEW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4e2c4a2604a16549c2685284585bbb4487c8e3a5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T10:21:09.271Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.19","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.40_1660990999820_0.438684012129811","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.41-renovate-autumndb-22-x-9975febf0db735e9120f31de6b1585b71f313651":{"name":"@balena/jellyfish-client-sdk","version":"13.0.41-renovate-autumndb-22-x-9975febf0db735e9120f31de6b1585b71f313651","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.41-renovate-autumndb-22-x-9975febf0db735e9120f31de6b1585b71f313651","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6cc4e56e7e807d576639061931858bc9ea6cd6b0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.41-renovate-autumndb-22-x-9975febf0db735e9120f31de6b1585b71f313651.tgz","fileCount":31,"integrity":"sha512-y0lSVqepF9/mSEbX6sLIxOhDOTvTpWJq8BPxOqsSIB0LUzYBuFg2IRcHcSA5xvo+se07nCPcf/LadNsv96mb3Q==","signatures":[{"sig":"MEYCIQC9/i+dIUM8F03TSbRVpuBxVCLCRYK4YB1AgW8t4DxouAIhAMQuwH1yHEvkSfjNadjjkwW84kjYqFI92J2mlVCZTRJr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAN7/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBow//YFZO4qM41fylKVjRg2nRB//GA7Gk5uY+OFANrFwEyWKjPvZg\r\nVxzHwtryCzoKH5c+j3rWYtcGebGd7CSrkVSRVmS8HDSvCD8b8NjWREuiKioT\r\noQC3LAN7nZUiU1raZJCJb3xscISgmiS4/nRXKv2Sqiyg9KtTJMwvrFP4H0ah\r\n6SVyCaIO2d8BzlX5W71LlXJP0tY8x0qRsf70oNLpcIo3ut7FTfGkDhANYR6f\r\nQlniV77lOVwMNIKfn+8V4znPxRheumOdywHOlqMOI4SpqVSPzFqbLSlumRHV\r\niRjE8InRn68kt5SPouT7qGB2F3C/So0gvrTL9tnjZeZXQKemzGJ6ikkjtctd\r\n7B7wYYPYM+cVDnVPeNsrXpbdbQovGdJ6IJO1JKdM0ny+BzumWLg5jfEoO5uS\r\nRcWB7xPVfyBIUUHJdp8pvk+zQkyiskUEFJTZTTzoZ3/GKaDyJKtR1NJj+Km7\r\nwNjWjMrpFLEF4A1eMXhF7CyYsqtAeMmCht8rHQonAWhJf5yzkQjqtvajnBsY\r\n6YUeYWlDQFgnPjdHG5vctPVAEhx2IyRGQdFZ2D8WaARZRm/u4OPf/njl/eT9\r\nY/NapSWPgBnycpyP/QVIpVTGkoKaidpTIfdQzIFlOMv0bDG2MfwcZP0NSqO4\r\nEp/RLdOpWZXzY+gxcpF/U6zv8NVMxBhQA38=\r\n=dxzE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9975febf0db735e9120f31de6b1585b71f313651","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T13:14:23.235Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.21","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.41-renovate-autumndb-22-x-9975febf0db735e9120f31de6b1585b71f313651_1661001471044_0.9609717398883633","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.41":{"name":"@balena/jellyfish-client-sdk","version":"13.0.41","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.41","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0edbd2cdc167cec87c6006a90a2101dec1f4b6fe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.41.tgz","fileCount":31,"integrity":"sha512-1dhjijM0b5GMUyUUx2VI5C76/LQCBmWkZ0VXSbSwDRMdKWQy1IYrp4h3I2cx+sitk080zTuduAmR5rtYOedY2A==","signatures":[{"sig":"MEUCIQD2EMaA8yGEYWAn64QClp5hmLFwk1p0tWaFcImmZllUVgIgepv7X6rBUAS78apHEqvzUIh5coQUT1nwVYwsWPI4maI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAN/mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp2xQ/8Cqw1V5aZZfi9BVHz+szqXhJKOxnHsJUqooxcpFq9ung0YsPj\r\n8/nA+7XDHNNyD2meOWr2ePWStzUBIJE7qakAGjLa3bDrGQbofxQbvEQDuCCZ\r\n2CURkI6lyQ5WIDeh/ibFNeLurn/lrEl6FALKxHPD1ZO31yEVfv0BrsIIl4mr\r\nkeR8YDzDKWHCVHaUAEe/9sNEiJeMbgSPCYB9a44oS0fTYgD8+E17M5ltADX4\r\nHhiscB3vvSNnVA3cnh87j6RjxOSoMAW1YAmiqlY1Z+84yRKDdoKtq8TebHcV\r\nJR6n9BfeKjRQqNNdwgIWE55fUDui0GBGgCM9BgKLCOoAq2mtNxhTigk+zCcc\r\nTjOf5hRuuJ0d5tNeEHGwCXYlDUyZ/O5P24wvJj3kVju49d9kNURLB2FL/Mnz\r\nuSlPjRe0WqT9ci390EPSKhjXjr0YSpZi1VM0D2Oo0qteo/u5K2rX4Bn/56JE\r\nWzFss709TW9l+KqgRIi78Oc0aUISXCY6wcq4C46+nZncgNA/Fe4+EbKvnOTX\r\nZVkCw2CfRH5Tv3X+Zt0uVw+Of4tgdc3HXIspgG5U4969Ray/o+wt3LYClDZN\r\nmRjTIObrILlWztA4RQZZ9iwY1703HhlejKDGBGPzFLnJHuNdQ7F0IvYkto4V\r\nuaqEf7r2jSPPo69TK9u1qC3KpJTUhUR1qj8=\r\n=2M1U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"0cc2f03b22070b3867884365d8dd60e5161b1bfb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T13:19:28.944Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.21","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.41_1661001702688_0.28094966875543603","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.42-renovate-autumndb-22-x-4706dc5c7f834c11affb86575bbc209025efa4e8":{"name":"@balena/jellyfish-client-sdk","version":"13.0.42-renovate-autumndb-22-x-4706dc5c7f834c11affb86575bbc209025efa4e8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.42-renovate-autumndb-22-x-4706dc5c7f834c11affb86575bbc209025efa4e8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2f92f9fbdc1c54b0b9d69b9c5a2a16230b433bf0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.42-renovate-autumndb-22-x-4706dc5c7f834c11affb86575bbc209025efa4e8.tgz","fileCount":31,"integrity":"sha512-DiF7Zzdc66qMMls8U36rgkP/qtR7KRWLhoVSkw0HcQYLoH3VNvW9u3vgaqUAo7foIZ1/CQj0hKkQVwZ21PKxQA==","signatures":[{"sig":"MEUCIQDvKumrbslQkmSZSMcp4UF2mwO3mL9sH+My0raIy8DEGwIgNWDwVIAyQglyplWvQUpb3vJxTc53rLld7CswvObQrnY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAQicACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLKw//XA0VItKJur2jX5fNdG92u2owFTi139DTZqyqB3IY4ApKr984\r\n2EJlZMnZq8lnYcrCfZeoJ2UGenAtwKpAY7peGqLYgwMWUg0piEYCe7cj5AYW\r\n9q/3vJbQl7u1cuubs2e/QD9ycID52j4Xrf05NBDO4lnF61XbC4CoU6hsOVbR\r\nP6sCT5qxQ5EAMGAIWMgWCiBnqiOc7RE+c/olOE14u5ptd1EptTznxm6IQxay\r\n8X1IL+nrYU+ByF7YrKrwEMJ2e9xE6ioOK2g6tgg0gYcjKv4nPNWtsyVMfE3O\r\nJTxEeWLyuikpmX07Jrfu7/K9Cvs17VgsOaXV7oIuXMiZfEUpHD0plmqZAfr5\r\nf/w38j45jcmZu9AYBjIdTwER2w021iM04RJaT38fE4t7saMx+LGvgTi/yMVz\r\n5ObZgq4hqSZfOWJHjiNRl2Mv48xUu24huyeOnqBIxAH4wuDRI+NuY7C94LGf\r\nW8Ng+K6UKFtlQrEqJDYgVcRHDFI4NHcBDSk9EPC7Rqi9JaRMUe2qXX88bGd1\r\nwmx+fy/Rg911rkLUA1w0fWuF+ysmbexJy35yErNZWBIsERRxWWZe/m7b18K6\r\nJYmnW/kinB004lQX97nDYzRawNqhfr7Iq02rjiUADaqaC6T5WGOFwYjbWmJD\r\nQhV+WtQYzOFrXs7wR4dEnvpkVn5FjqbyDUc=\r\n=UUDb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4706dc5c7f834c11affb86575bbc209025efa4e8","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T16:12:22.394Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.24","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.42-renovate-autumndb-22-x-4706dc5c7f834c11affb86575bbc209025efa4e8_1661012123852_0.18282378106959674","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.42":{"name":"@balena/jellyfish-client-sdk","version":"13.0.42","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.42","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4ee4874954d8477168315ebb67295bd908df75a5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.42.tgz","fileCount":31,"integrity":"sha512-NgGQbauDuUROO5sDH7G3h9wQnrUrED4RRQzRB8bgmi0N+SV6BujPTunrEMrP9gK+9gCdSl1pM6ZT9RgE+O2Pig==","signatures":[{"sig":"MEQCIF0ZmWnLhVEZs4OXd0rhAe/KfvzoZpgPyPgf4RBexIyxAiAaJsFVcndNaw0qS0mXY2teSFXdwkWE35TohxY9eQI9Tg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAQmnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqx/g//cWB82YWbBpM1262iwapyIsqskZNOcLAqbsbTDYjo4UsYD92/\r\nxm+PK7Q5+LKJfYk5BRCGFMXO3QOADlvLeFCC8KH5gXiiN7hrBzqNUyS5Gix9\r\naaaViewgm10UM6LSmEeHP+lqvWqjpHHEgIGC1KTvZHQiYnkMmNSgoqcAzORX\r\n7DRnmV102Ptqa3h/MAc1VbZT/Gtn+pCjeZ7nYD7Zm4HpFy2hm9GAB11uKPFB\r\n0u4T0uBlXjZr3mOGZcXnbhyAPRpg326XIvH6jxINUZDnnRmD5aBdE4enhhKm\r\nz/wTBWdHPF3xGK1d8gKUG/83X/LYE1S5LKfwU+m8JM428YnJxXH5TPeyMJuS\r\nJQk2C40zU4EOXG+GFyuPOu4EfWewLcS2BwoXX4gJxEAYqNy8ktnn3mHiljzD\r\nDHLx5b7AwwxikMopj55OVGoQdqOpqPONDjkpYCzSP1CJ+2Fwp9Zu5fo/eb9n\r\nPTYCEgp/CCLfSfusqMRl+Y2/+M3LPw1Mo5YYCWsSbmWfiDE2Oh3LqkymqqPi\r\nH6IyZNjnzkjjn40p/9AlYCoVQ/0yezbevxC76+XXVPT04jZ5xqf/ijG1Hp0s\r\n259kND0zMJ0pvsM/xEQPp1iQ8nQukCk5BaBvwJHR9u0O2ttP/GbQlxsLzlpi\r\n9bpPA1Rgp65PLEuHmMEHQaENHqXcPWgqjYU=\r\n=jJAg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"fa1292550148146019da25ee085defb17c6423fd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-20T16:17:33.285Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.24","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.42_1661012391386_0.017485994037784724","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.43-renovate-autumndb-22-x-c5ec6bff4f2ac4ec0d1d2225dfaef586e627f02b":{"name":"@balena/jellyfish-client-sdk","version":"13.0.43-renovate-autumndb-22-x-c5ec6bff4f2ac4ec0d1d2225dfaef586e627f02b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.43-renovate-autumndb-22-x-c5ec6bff4f2ac4ec0d1d2225dfaef586e627f02b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3ac989773897d9d1bdc553c154c3cc91e6082c0c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.43-renovate-autumndb-22-x-c5ec6bff4f2ac4ec0d1d2225dfaef586e627f02b.tgz","fileCount":31,"integrity":"sha512-+a6yDGyEBmrsE0JJ7eOQ7tXu054sJRdSzLdq5wsjrJ+TPW/O8J26ok/6TPgPHp+KCjASyRgz0NF+F7aQTqR+1Q==","signatures":[{"sig":"MEQCIDr85mlQX0p2ony/wlbQmTf15G4uO2t8wy/vwlVxQsRzAiBSLhlsZ3FDu58C1Bqu9hT8Oc8yIKC16W7Xe6nv2Ro+NA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAa2FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoyKA/9Gy8OMUQeYg082eIyiUmL5UfcTA1sM02Y8YFJxYRvfuRGounS\r\nFGDWjHdV70Dg7hw4nWZaLko1zoqT/6gbgNGQriJjT7oauyLxAJTNNpIuc5f/\r\neEhzysY7Bs8d85L0hTKk3/UidNc0SuWLt5tNx7Sx+vwGY2UxfRu4DTI4ahpk\r\nPNJtwc+FQPb4bMZ29JMqXycTed/CZfIiiayvXYGQxleI0OdRv99LZAUC8VAr\r\nFqfhu9vxhuzEjWApYSuYiH9cAubaRep1rNXk5cadTwP6ql42miXNbbjqu8kM\r\nl2i6WLtvgJdPifeXu7UY/70p9yndh0d5ilD7MApiLGEHxP5zocAiLmU+3aWq\r\ngui8m0dfcZ26nTPFdv4zwnBhojMCa3DV2I1SMq71uzIoS1W8tydW38MCNGQh\r\nGVy3cEsU6BTOXMUiGniD5OLvZnDP6NRuu99gljx6CEHJtDHBew5V4eZ+ps8f\r\nM9cL4/72dLL8o4O1JeIiyU7tlSgsdxPdqG6t6FjGzP62h68UwWyJuThSQs1A\r\nC7oj49qd/90st0B/f7isklCOTRoXoYYhQFrWrVjI9+qVh77EUYXyeU149+QO\r\nAx9FYPy699WHvvChM6m47ie8RmJKN4jGsDhnXBfShdM19FpSC7YfacEuJ/su\r\nhVKKOUI/T1U8Tf5dpsKI/T+GVNOrO3wncvo=\r\n=GGwO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c5ec6bff4f2ac4ec0d1d2225dfaef586e627f02b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-21T03:54:05.106Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.25","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.43-renovate-autumndb-22-x-c5ec6bff4f2ac4ec0d1d2225dfaef586e627f02b_1661054341509_0.3085562397575812","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.43":{"name":"@balena/jellyfish-client-sdk","version":"13.0.43","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.43","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"86c6a9d5b34dde2fa38ea9e6e3c9ed05ffb1d263","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.43.tgz","fileCount":31,"integrity":"sha512-Jxwb4mdujALGf1tuznNkoVVvwMyvceKBvNnOwsqrCp7O3Md2zmtlgo+38uPDQLOE7fgrSKKWlXb2H1Bt4CENvA==","signatures":[{"sig":"MEYCIQCT0kmM6lxMbmyEMU+wNNsSDjUWCoduKF94dJW4Pc7n9wIhAL3zjTI+uDgJ1CEsNWMM+tvC6kUDfKUNSZDehKH8HgQb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAa5eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPZw/9FZlXxtHsm0VLftKyaRhEKejjpo4LoLid5rYW8YkR+nXykfV/\r\n/K5WtnfVHMpU9cacRrQuRDtPQuLTBapMwCdxMT7YHHvl4NyIY1lr/o+WxgmN\r\n2XgmXUcNpaTVr5J+rIl5tdV+j2DxcfleSnCXnhYxpix/WXGKWvMPaFJwos0c\r\nE7KvJ5vNNkCO+IUJ7NEgpWg2Xp9nAFCG/f3p9VPGiUaq8t0D8yDpy9rpGSKD\r\neBlFB6vxYR8uNxx77+KOf0srfoNunsAZcQuxu67v0aFSt2zSUgPRaJJrL5An\r\njh+t7aysP6eoFMkSOeJuUsLazceUpwwiURvfPMzfzA0SjxvGrquq1HoAWw7h\r\n3OrjwpH7Qk703gBS82g3j9eSo0PJcedOP2hW0a1GziDkjrVditEoGrLEubBN\r\nI5n1VPurf24yH3xBD/vMZqbHeGzrU1ec6wImmdDkugs5L/FK30lhyEFi8bs7\r\n0ytefQMPdgj1UWsK8Sq+BUdtzt5XqDTaKac3sSx9FCVc4O5e1eTtWy7Z8cEG\r\nEBGOqYUvXJjhGWAbS+kardCfYdSuDkCCwWIPM5z6PPxpEzuDFHhqQUwtu0Dc\r\nHrXpoy6tz3iWpp2RnvCB/6XFu85YN1zlZkdJ8jOhKE40GF3HUNlabhF0zuDq\r\nuqRXI1URgBqXXptpu7tSSe971+D5xMT5YWc=\r\n=Na2B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2a088bf8f978cdcdf794a4c22054503bb9886c62","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-21T04:00:17.824Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.25","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.43_1661054558213_0.3859211603179955","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.44-renovate-autumndb-22-x-8d98ddbb0b1a737dcec1b535874e0d628a8657cf":{"name":"@balena/jellyfish-client-sdk","version":"13.0.44-renovate-autumndb-22-x-8d98ddbb0b1a737dcec1b535874e0d628a8657cf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.44-renovate-autumndb-22-x-8d98ddbb0b1a737dcec1b535874e0d628a8657cf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca1e0637051b8f33783d6a37990c14cd4a9bb480","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.44-renovate-autumndb-22-x-8d98ddbb0b1a737dcec1b535874e0d628a8657cf.tgz","fileCount":31,"integrity":"sha512-Qb1GSOY04FWo69nEp0cYk18UcI9Yg9tKl3XsvgolOHdHU2s4PIZJtdAzf/y2sAqVEjiD5GNIC5FS7oyU0oWTLQ==","signatures":[{"sig":"MEQCIED1q5cFSouYFx49mLCaKlXrDmHi2qZCT83OkeW5Txr8AiBRNS61RzC+1wSiBBdEnnNRdUwBus4YJcfmyXeX/QweMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216799,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAtsRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOIw//bAWrSVGuUtrGc8343Jv7Dn/ZklkHoI2p71QWin3RThOGzIBa\r\nhzCPz6u+wsF6VIZsaLnCyHpn+4jnlaZDFwXKk9cT6n2MiT+tr7pf8HsasWLS\r\nuEuNgVGEh5SfgGC/hdNDGTGrkX4MMIMpD3kJnChNfr2esza8sRfZVGIUNVWP\r\nDUEGsCgdsOZPLATmtP+Nr3jBQLPt5xzw6QpTePxmChGv+CJaLyKdvBCFDvqN\r\njagk9B2aQg0QedwHhksNEBQojB0X8tvqoIIaxnnubN+Qjeptr5Q9pj6B57IP\r\nB45tUsa5E9z3vVxjLk11sd0QCXCQowMOsLB4iLj/N54nVb16X+oFvkLhbvRt\r\nRxWo8C2V5Tq7BqWtdGIv0XflioeUYZ0bAQpZhaOOtNUWSmujCnntBs+68E4g\r\nWgyOzdFYGrYLpbrLka8fO+6eCQf4PzPmG+aN0jMt9d/T+Oa7fy+RW7utc1Wj\r\n3aFfl6h0/xVlYqPIt46X6G5nJ3F+0hEnoZrsBk2CFBmXigtmwW0Mizm3CwWp\r\nVtESaDy2m9rEoxzNwnRK+Nub4sXrCXBEGd2VwvJdBezF0EqnBFsAorYgGIPa\r\nK2rHKwVfySwuifuXjA7O4EKoA0iRFnEFL5BXxwd5P1z2Zm4ULQIqCZkfJSFK\r\ns+H9rNmcEtqDhG5bJ6qGXI9Ph0MxRzSarFg=\r\n=T4NY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8d98ddbb0b1a737dcec1b535874e0d628a8657cf","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-22T01:19:52.508Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.26","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.44-renovate-autumndb-22-x-8d98ddbb0b1a737dcec1b535874e0d628a8657cf_1661131536818_0.7879497516069058","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.44":{"name":"@balena/jellyfish-client-sdk","version":"13.0.44","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.44","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c3abc9697f85e058c4c255b998e1d9785a613c87","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.44.tgz","fileCount":31,"integrity":"sha512-jnJ7quBrAtpKU/93OlT+CxDjKDo7y6ZlirRQ0FQz8XuR2D4xuyyXNzLO49Kaq7+YvyoCKYfehTsZ+DVe80SgmA==","signatures":[{"sig":"MEUCIBAI96XoIwLDzJy57Yi9G03SHtjSKEJ967qhV+WoPZ6iAiEAnGQxl80zFdKPflquoNQuoyFRem7Y/wNkTotN7A5NE+Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216735,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAtxaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmZg//cTig+2Qw2Qn+/v+FLEKQ4IyiLBRZqERQiJYRG6corxTR0sy2\r\nz+8Ue32QMDn9T7G3zedBBUjCpPVNw2Iq71lEnDJ+Y4OhSfE4pf8H6qAwEK52\r\nsssVR6yY50QujUrMQ7unSDRbEvM5bKYTQz24ZfMvgAQuylhAUFGjIOK6r785\r\nd36A8AqaZhjEosXr7DhIcHAfI2dr/9dBkSfdTQetWDyDGkUeY5/9zDXdIyut\r\nI4zPrE3a9+uaox4w9Gm64B9YWFtnbHWtsPkn8eApzZCjUIkts4D1VAYDs4Tq\r\niOk25j0v3sALiF6ESw55tDZS4X1mjstaNmdJrYMMSWvLeqG8knceDEQulfH/\r\n0XzOXGCJcqL9f/1MEX5sdpZhTNTh/GeevoVbaVmn26goYPnAXenyWdsd/MQl\r\nC0ancDSJtFzks4lEgKIfsKnuwIeQ0A93Kx2zIejJmfXXViIDv8OExCAGNzeh\r\na09HJkqw7BowicNvmElhsT1tQvetiFCX6h6kwAdilrTaIvxkInm285CQIq+H\r\nRaRDfZH0Ez1DtE2rMkCHgMerjc/E/+2QpEoeWVww0tZVn/e9JyjBUvwBZY9U\r\nZgdEC51X/hiN5zap1bNbobU4YT4whf7ILPyOzkSdvbrgFVikX/NU4ZpLyB3Z\r\nnD8DzPsvbtlp2DPMCHgTFqrOuWdwJ1ZjYak=\r\n=W/g5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f3d1219e91bee69846d5c46e46b89afc55de35c7","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-22T01:27:02.611Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.26","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.44_1661131866312_0.8517536906630907","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.45-renovate-autumndb-22-x-1ab93a391d8b1c3ea646f1148fb24e1b1784ebdd":{"name":"@balena/jellyfish-client-sdk","version":"13.0.45-renovate-autumndb-22-x-1ab93a391d8b1c3ea646f1148fb24e1b1784ebdd","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.45-renovate-autumndb-22-x-1ab93a391d8b1c3ea646f1148fb24e1b1784ebdd","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dedf8d730e3be4e28227476d062dcece6c219534","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.45-renovate-autumndb-22-x-1ab93a391d8b1c3ea646f1148fb24e1b1784ebdd.tgz","fileCount":31,"integrity":"sha512-rtjNAbYxU/sfrB8lmaPzmlPWkyT5uu2unFKk5KA0/zrflJCqrlRKopucMH47tD6w+UKf5Jushqk/4gKvGDE2Tw==","signatures":[{"sig":"MEUCIQDlfsH1wEMIFIRWGgc2xgx8cRUq4m5tz1OJqRooYnna9QIgHzloOXFJutOjG5BNZmoUgXGItTcV8R21Dn210XEr2ts=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjA3rQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdOQ/+KXAw2iikNOUpm7omEyIhmYhwQmBijAw9XACtuGHgl6/AZ9f2\r\n51Qo4J9q3CwrLCPY67nb0ZAPRP+lMZZzUmdq6MxWnj1y5jAFVWZmUuSUlccA\r\nDh3PzJb0ZJva4lG5uZg27GN53toVpCfrZrEdKQ3Q+W5C4skwQc91IUepr/jk\r\naxmB/Euk/IX31NPRymCrgryIOtkn1mwwxtGSyn6j3g6O8/K5Y3jt/k5+ITjr\r\ngH6+1Wcig2o2XfThc+dLvY3xVKiLnmvuTwT4zdLrrHpOISW/yaK8hRUDDPd8\r\nuf41FX35VHVi+chRgUa59WX9qfgnP6hZtU+AUHRhNhXsy4TA5JMe3aK1qIE9\r\n6w66vNDOLB+RhheRwZbVweNfHqbX7xKSPGFa/MQu7d1RH+qMmTmwXEifl591\r\nEtra32ZLjTrvbL1+oZJGGozIKnTZ+xGLErB56RpA2L67tw/pVUlx9I2ykQXb\r\nK/Vxe4KmX+v1s9NhkldQh4Nx+zymKA5RswKtiHy3jbMRghZ/qLaUZ/udTrvf\r\nz/N9RqdAeSL0FHO9gsnT+gLei4yp2ybbtAhInGBtsthnTnfz8gsTwejfQaly\r\nxsnyTdGRdrVPv8RBayfiNgPQU8WCDLVWKeso2FYAW0EPM+MsnimiYLvsf0hl\r\nkvbrmqmiC79EMCq6xquhCa0Qz8ODvNZ728E=\r\n=cx+a\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1ab93a391d8b1c3ea646f1148fb24e1b1784ebdd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-22T12:44:03.473Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.27","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.45-renovate-autumndb-22-x-1ab93a391d8b1c3ea646f1148fb24e1b1784ebdd_1661172431938_0.8170664393422917","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.45":{"name":"@balena/jellyfish-client-sdk","version":"13.0.45","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.45","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d5a665ef923b8de6a1de81d00dfad894065eb420","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.45.tgz","fileCount":31,"integrity":"sha512-Ie0yXC7RsibKySwwnOrbuoEsm+8NCdY6og/AP3bT7wMhdq+Uw48SU0hyHjqu9+KvJcibTqErFCmyxtD+59CUCQ==","signatures":[{"sig":"MEUCIGDcIr4j7ZJw3LP6ZHkc/lkfp3smVzbWvlz24GM9x050AiEA8haW5Va/5X/vANyxQdAItivfkv2mrY8O1hY6sv4Piig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjA3veACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2KQ//SilrGaoqSoxijuOMJsCfiBA68USg94eYJj/TZrAo5DXfuLm5\r\nrkOgoXtCrroiDYQo9DJLdEq4i+WN3pWracXaatzV0WwIMkjzdVtbP/jmy2mW\r\nU7ZdiSgKcaS3CYWlMf/eibvJww2i7WcluzUxYHcDbCxveAKOSI3DTASUASKs\r\nw9IDEOIf9pxAdOyrQE18BMnlnf3XsFU5SgSTASgADWTVBBFIQeK56H7yWXKi\r\nflmddkpmSrYNMlXH4++MCaryF13/IkreITsdCSoU40Wqx44LVoMp6SWHo4e3\r\nLGz+MmbRnsVxCIxdWA0eYyAp5Y0mWsPvtMRs/+lOHIRQcgEeZ0at36nIICZd\r\n3MAxtzntGTEf7DX7Wuw4wXg5r2P1JiISOfKAgOupNjt5V1Rafny1jhXjq4WW\r\nZj8FLDE7yaoDu4ZfvgpK7pN9p5v3JJ/B+MRGp6JJ6YyERVWJGIukbu4Ss5ge\r\njPjIsro7uiWsZdbDrMQHCKo+72kVuOa+ous3kgbGcClkETncoVNe8GI7n9LP\r\n7cJdlndV/qZoLly0yj4Sq2oNxjIlLvUwqNseag1YYD3Es+BslXGCE+QZY47F\r\nr6Vu4vCgwegko545I3aMIPIZBFi4x0P2vw+AZ3cgCFV9N/tllXoXVeWEw7Mm\r\n0bdypOyXjL/VLEfx7t/8SEAQ22dO73xbaWw=\r\n=wJJI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"107b2733d8e62245adc00d28c5de06cb01786886","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-22T12:49:24.695Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.27","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.45_1661172702763_0.1715301387114836","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.46-renovate-autumndb-22-x-8821910dadcb945f9e90eed589e13aca10cb871f":{"name":"@balena/jellyfish-client-sdk","version":"13.0.46-renovate-autumndb-22-x-8821910dadcb945f9e90eed589e13aca10cb871f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.46-renovate-autumndb-22-x-8821910dadcb945f9e90eed589e13aca10cb871f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ae6e9f9a7bd9c1e57d1c673b45f872b63beae9d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.46-renovate-autumndb-22-x-8821910dadcb945f9e90eed589e13aca10cb871f.tgz","fileCount":31,"integrity":"sha512-Za7coSKBnSJGHjPsaPPUoXEr31USzzBxTCvDUugzvQxkY8/DyneZkpq20Y2YpAWD86nFNkbKeO0+Bggufh+rgw==","signatures":[{"sig":"MEUCIQC6RJgSEpBWgZWqDt1MO28hVEFGX3WJhmGOpPLxVKmoLAIgNb3DwB/gbZFzlcGliujfbhTVC6yHhVgg06orOXQCMwc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBHsEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGjA//WQpVDjgjjaRZ91FI84uBgQDK/hrbKIa+svV0JsqtqkwnutmN\r\nYD5UUkxDZsehN5x1UGN/WuUMBfs7nv5ZdaQdl3E4CAO7/0/v3MJafg2pa6WN\r\nRbR8shaQZEa8lqd8rVWgcom8CNQuN9s8ppRaHVH07p9x+rdRshgvmncmXlA6\r\nw2TkOPnOy8acnOTyOxSJmbRLhjRL3ldFBEtPJJg/pnSohbS+dutjfToJgAX8\r\nJzn1nd0hu+x14FkJDmgZWEMyTLf6P5z3pTnFp1kDpIIRWJDAaegCSyLfJfjb\r\nY78YN54wlUxiPSx4EezSvnaijyytrxlLcip8J3zJ9qQ2psRx4m57aLHoK4CT\r\n1g+tQ8y9NUjYZUzu36Us1QECUH85ZHBRd703sdklNWfXWeW2wWu+hO6jbi5A\r\nhWvmdrLu+olQMpEhQNlPtcBwO4iZpdtB6XpirUbomntE5DY436RUSoPtB/r5\r\nT4t5Kckf1njwSbwhiEnnteklTvtyx5QzyBQe5KOCKnQXIdGgR6fCqFQbfBA/\r\nAzOtRx7e5oTf4+Ib2zTAU9K4iouozOad0DVSMuMRdX80CDVn6XHYFcnYiJOX\r\nQDn2b/r46MKLxGyKxvl1oXBXdgwumP8ui41u18JBb9k50YxBSn2soiJCVR0v\r\nyyq3V/9l5ts0qRSokpWQGQQJmp9PQpM4J2M=\r\n=w74A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8821910dadcb945f9e90eed589e13aca10cb871f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-23T06:57:19.724Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.28","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.46-renovate-autumndb-22-x-8821910dadcb945f9e90eed589e13aca10cb871f_1661238020144_0.5599339344124865","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.46":{"name":"@balena/jellyfish-client-sdk","version":"13.0.46","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.46","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"600bf398d8cfeb04162fd6df1a2e63ef2f0673ac","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.46.tgz","fileCount":31,"integrity":"sha512-Iy8sJoJJHtkEBYJtyUui0GZtlp46ourbGfpYuRnHSi/F5AZFD5OJR5EaIWWiosR59/HiKblryRussUD5xVX9qQ==","signatures":[{"sig":"MEUCIAemNx6sx3Zlu1fk94QDm1a6FfBcLXFfPMSCNMEFH9/NAiEA7yTeS1R74h9GHNh2fPx5BTIcqmyOllEfwfAyzYFSV6Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBHv+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq8xg/+IsnRlbyhRxBF3BFKLqSN598gmyqw0JR0luSLK7SDnVDqVf6U\r\nlWpAcDh5NARPKhwp1+qsPbHKwzoJp7Y4/Lg0aDEADRw+laPUwxNMUkgCcHsT\r\n//MT6sc3aQlrCWlmR5Oxj4BlTBVt45L0Vyw9eFEE56d8sMyDk7OJL/H0cwJz\r\nuO9JzTRNrlTrvzyGFKBgumcK5l2WOf/IMDM/JG+GiknpvHsAVJpqJSaRDGTD\r\nRfPI764s8wE47+U3V5eMiioC1talE5S64WRoW+cbSWjY0OpV7LxLk97jtfHu\r\n1Z0UAR3E9KCu42byYbuul4oDLYfdVpGWwFsikvm/25D5O9fYaVe9/iBnto+N\r\nrPy/Jlqk240WSaCNCA8R4KwK08YuGPSB1zw2cY4/vYJ7fq8jZVsfMvVDIAJa\r\npo8Zi3spHPCJBb1eSA4Y05qu+0AO6cZB5nlc4cqaP3K1e+R7+iJTcBK30rSS\r\nlJmCrWAGsTLTwYKUIVRaiPoUzRao4qo01cfsGoclyLz7uNMWhlpNmM004Cuu\r\nMJVa41L93LxmtDYWHZTYbcOGyQk4Y6S/6BEP7rK/4Mht8s622awdFhE8dZW+\r\ndpj7QuIotMk9oDMkDpaZAYle9fR/K3qpmwa8JjqIcB+SagnYB2yv6tAMeL0y\r\nViQMpKCS+FxiJwP9QQ0m/3xSVv7xV2AEY9M=\r\n=rDfZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"64af3c26ecc5a84779ce5d2b6dde22fab76e896e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-23T07:02:14.815Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.28","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.46_1661238270730_0.872687919052995","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.47-renovate-jest-monorepo-68c56c2a24af86384914b508a9b44104cc36a062":{"name":"@balena/jellyfish-client-sdk","version":"13.0.47-renovate-jest-monorepo-68c56c2a24af86384914b508a9b44104cc36a062","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.47-renovate-jest-monorepo-68c56c2a24af86384914b508a9b44104cc36a062","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e0b9fce9d36ea46c54bc4c0975dee16d5f1679a3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.47-renovate-jest-monorepo-68c56c2a24af86384914b508a9b44104cc36a062.tgz","fileCount":31,"integrity":"sha512-gf0/h7ofpUlRpe0hCpjKIdyNMvHOBhSpPJPTPWbmu7Czvv4LAM51OS2rZ1+YCYlvw1zYdfGw5vw+M/pMJq0a8Q==","signatures":[{"sig":"MEYCIQDKdI9oz6/CgDheOk/Yu5L+FuZpxKPmaako+l9uLxNFdgIhAOp6JCEQqOQDNuTRn6ivOUaoEgtfECyF9hz80DAkgc+O","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217052,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCt3xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4TA//STcvuwZLiMqG2fUX+Lyy5Vg8fOZ7PnwIcvAVVZuK6qD4l/Q6\r\nt+xiKqL7uTBLdnnC/TufvspzHpfUf4Ug+mxZl07V+39UEYkHa/zpHPQ3vK2H\r\n8yiVs1xkzD4cV7uVp5hAfuV3RgNhXQyS2OItHfKT1kJAYL6H9QbAYziQ3OBP\r\nhwYW4NXT+dcvz9Iabp+qWxam66MMGEPC9EWydXqOivIClxeaqiIhij7zc1Q9\r\nCfva0N329NzIttAuyvHJASUvGmM9AMbL9t/WyG2z4U1SvQt5rWihSFw89Ghn\r\njV40jk3y70hDE52HEhGgtKSRGVHnnBZpwyD3nvcSSw1WWegQo60eNKqEv0Q9\r\ngGE3biFIZrxjXBhfBKvni+C5KngHx/Zgwp5ZsI1dXoC9+c7QXZixv07LJyi1\r\nKniECsTUC00demMsqUoHEetx8uI35E9vUP4b+RNtdsZ/tWB4mfArO6WzMZ2x\r\nuzP5jssLIRMN6BLucIyWEMRiSmj1WdHLolhyxb17f8tJcjg7AYRVfb/zXRdn\r\nLoiE0ymYUFTV6ZUdMsZ4x/YF42ervfbjT+V3FYUzXY7/1WCibRluAZ739/ql\r\nArKZRgZtv7ydqbjSgF5xn9g/4ruv4yphq/8rS7mNIYiB+pU1sWjYgN70evyl\r\ni2nC5BJOsFptA04g6y496FJ68PcFeByqQAE=\r\n=B3HN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"68c56c2a24af86384914b508a9b44104cc36a062","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-28T03:11:57.767Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.28","typescript":"^4.7.4","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.47-renovate-jest-monorepo-68c56c2a24af86384914b508a9b44104cc36a062_1661656561505_0.7665768026963922","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.47":{"name":"@balena/jellyfish-client-sdk","version":"13.0.47","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.47","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8f8633ec66abc95e2fbd8a3ede2b1c46bd4548ad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.47.tgz","fileCount":31,"integrity":"sha512-kNmbeMHYxeiYuWlwI2Z0pQRMyAywI0ZsE5q/wW9GsFKWYBHU5fOhK5ZD3Fcd/3oGTkprO9Bc7Wuvk7Gabi0B4g==","signatures":[{"sig":"MEUCIFFb/A29FXkBQLiP9lIsRmUhEH9Xte5MhrJAWKx7dF3WAiEAzH14B1CI/sbqtRuxwLjuvUG1XlMC9XgF28xttIgL3QM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":216988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCt8jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrt4g//SB7foEUOJLbCFJbAdfrr2L1uUf0ZMXg9AJ52X1qjGx39uw9Z\r\naaqHi0US7xPzHMBFym33PVInciTmvxMp+R5VJ0ty3Xn/WRE8DrsB2wTCFWqC\r\nQup66cOdds/XRylHWDKko8ta/TzBGXTJhZxmYyIC5yFhaqTaB23MIrBj2WiT\r\nF+bA8ONtVMOdi5sNNq6QifTfv+y3xOAWIofJPPHhblqBb3BpNYnmS4NaeHD1\r\nidDOJg0GE4I6psu2iapjWWevOdfxOK8/V7C02FrUgaqGB7rP7cLKWY64HMjW\r\nYFr4JoVPsZeXjT1RDNXz0bM4dgj/AGYPad0FTDujnAGTnvNAK24wWpEFyXUP\r\nRvCr361wOWbctAadnBndc0DC3l3FdWPUyfNrvhhn4WQ8B3BsSFaZdh8tGZwo\r\nSuwwqXXoTv9hE+m43ZpUfrnxOPAzdWmqmK2zHP3E/X76NVU+twJL11VKYW1M\r\ntTTssdAh42t3U+vMnvlNgUlZLkPckVMs5Ff5aLivC6oT/5K49xfKk08HbQWY\r\n0s6h99KZIRYKhLiPWdceILBJrIDdMxq9kNRVEoZf9k9qxsu3zbUvPaYsOryZ\r\nZCpfKUt/6wRROadfLG5c0GG4a41VKF0HJXumEILdJCAxHTvyQb2YUvKMohPw\r\nWXTqmM2B6Gle0IL0qPYobZyGA2kpty194c4=\r\n=puX4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"9ebe55cfacb54b8f6792a7af35d37fd0b47b46e4","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-28T03:18:05.741Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.10","autumndb":"^22.1.28","typescript":"^4.7.4","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.47_1661656867532_0.6460024827520285","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.48-renovate-typedoc-0-x-6963569b62f87d3f753f7958b67a75ca8d0f174c":{"name":"@balena/jellyfish-client-sdk","version":"13.0.48-renovate-typedoc-0-x-6963569b62f87d3f753f7958b67a75ca8d0f174c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.48-renovate-typedoc-0-x-6963569b62f87d3f753f7958b67a75ca8d0f174c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"884dcb1203177650a582b2e4997a0c322e0d1bf0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.48-renovate-typedoc-0-x-6963569b62f87d3f753f7958b67a75ca8d0f174c.tgz","fileCount":31,"integrity":"sha512-sAdF66M3Xq1Xe8acR02KERpsB50F6kQhF778cw4FoB2nWzVqx++QNbwjo9iu6zU+Y+VKefSKcAqM3c48y9yMRQ==","signatures":[{"sig":"MEUCIGzN2+tNUa2o/rAUwXaCtndzAO3IcygYZ+bp+XWgp8nCAiEA358h1TVjfpmCqB1+++NjsJzaAWi7Y2ngGHEHl3mS3Qg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCuCPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmppohAAkxLJPoQq9PiSYX2hMjWKWxdm4hs6HYtOfs2k6CiV/GjuQm/9\r\n2UQos7g6AeccBYmcpvCNCVLwRsvefBlr/saYgh6QDj7xFqs5Pj/gCyz/kYgm\r\n1y7utwroyEqHPauXwtfWZrb0QngdK4aVDTwFuEK4vgak+VHcbOEsLyLjAjrq\r\nVsjQWz5ey87XbRVk6KOzvt+/KhJtEEJG1cCeSs1soMRpPa3Vf+pvKCBC47Ch\r\nbXJM3tF781jxWLpZEjjSZmcM3MPRZlDzmre6+aXANa4M8ZiYNrzlXN16w6dU\r\naEL3bTa8RksgPZFc9lH73ilGdmul1vtFK89UnMLNFr90nt8FvmlZ7JhxeWUL\r\nfs5y1M7lpysJPFGdZ16pAtprWbhK9+D4hhvxRNu2q/hiSdLg8FVqF1oPlKCf\r\nU0z4O6Rqa/HOL9ksHPiTgDsGCtVTyFnCM5+jSjsHdvcZKjhvF6cjbxh5Bn/z\r\normBQFzWWwofURj7WtwLLKJQM/PDu9nIXUvE3RMnOHW3vIN/8KFBQxNUVvV7\r\nX0/f8iB6J89NWWeBAftNQE0lD6eWHihm2J+5vc+TBReL3HRKyRFPwZ5SMpjr\r\nIJiVMUZANMB4AE/srDNJHqPMuTbNzhz2HOwsnhTanYtQXUIJWyEpBMcWJa4l\r\nhhPBKg1fU9rNLM7tgZyCHAyidCSfv59UoVA=\r\n=DSda\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6963569b62f87d3f753f7958b67a75ca8d0f174c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-28T03:22:18.992Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.11","autumndb":"^22.1.28","typescript":"^4.7.4","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.48-renovate-typedoc-0-x-6963569b62f87d3f753f7958b67a75ca8d0f174c_1661657231178_0.8916297759258172","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.48":{"name":"@balena/jellyfish-client-sdk","version":"13.0.48","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.48","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"953358b60f0f7d7fa8fba42b30269a168613a6e5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.48.tgz","fileCount":31,"integrity":"sha512-sSj4ZYrc1kqJR5BQqd5mEUYAsTyFGqPpciuzR6FU4B70jM2t5MqfmAJJfXkzVYbcb/diwwoZ7tVrn41VrnOo6g==","signatures":[{"sig":"MEUCIHADTbVgvjd62lEA9nygX/53d44Awanb52XvCzV+zTFfAiEAix89z9Ju5iYaJaZjS0/MgpV7jwih+ppFe0thvOyb49E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCuF3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnTA//S/OhG1jftWJOEvbhFKH4IU3yhDz1vRZTWAaAUsJmbqz5r0aU\r\nFeNW8Bhz7zkTJntrlsjxfmgUFGzrk+irVcZH5bpoUvu6LLzw/Uj0Qx/yOClD\r\n0u6XxrovY/mgk2oiJRteYRtQtt6+pMRQz2SBFJr6/UxVEQNb5Japmu8bf+wl\r\n3ous463FDIrpeN0AgY+Hx0EGeZJL1upefVxVuJCN7vU/ieMODvOPX8rr3OGU\r\nNsCns4jKSQ+YC+wO5Gwh6TH9R1aOR02mpFZQvFaijw01I27yUMDdx7dA1tte\r\n79c0nKc15Nqr8SV0XKLjlr9gMm6Yue+0uXxlnWXN1HWFCyU9r13VcBztBjol\r\njpcYLg3mdhtqIyrX4hL38sfvcrKwu6cqWrfDE6gzDBhV07T4E48A+QBIB3x7\r\nFlT2bc8eSoQqn1s/hk+bQVV9TJ3xxKhiTbpZVY5gYVQTxIz7/EXsw8MtZF9w\r\naxHO/8AvrK/2LpTFzW0ifbThdgKY+v/j2KL4FY7LPQr5tusawrb2oIOyCRV8\r\njoYe6+nWz6yEcwPOIkqIq4bz6CfB+Dq6ow+hB9zmFlpisjbItCBAPpgXfs91\r\n+Tmeki8pfBUVZDum5qZL4SymzOOFHLvn7ACWO6mav/XGOjpsViVT9JZUl5tp\r\nPPoodgs5tg24GXeScde/umDy/6Ck0pbb9O4=\r\n=HaML\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"69534c082ae2b2869011a3675908ac4bc4ab1284","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-28T03:28:43.770Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.11","autumndb":"^22.1.28","typescript":"^4.7.4","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.48_1661657463424_0.8520405569680691","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.49-renovate-typescript-4-x-cf2de1abf3966e5765a7a1afa66a9115b4a0de9e":{"name":"@balena/jellyfish-client-sdk","version":"13.0.49-renovate-typescript-4-x-cf2de1abf3966e5765a7a1afa66a9115b4a0de9e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.49-renovate-typescript-4-x-cf2de1abf3966e5765a7a1afa66a9115b4a0de9e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4d9073f081c50bc01dd88e5f5798b41a19516a17","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.49-renovate-typescript-4-x-cf2de1abf3966e5765a7a1afa66a9115b4a0de9e.tgz","fileCount":31,"integrity":"sha512-5ctYOi7ln0bftAlKdcYKOgPZwtCGKRpzVPV63rGdLuAqoIFwugDjMLWOGJ9WWGIRFQvmQJ43gm4dFfSSb/W9tg==","signatures":[{"sig":"MEUCIQD3eYc91rKd/k7qBM2O5I+YfKeh1YC1YNnx2qhJOjocoQIgeM4ypgyUgmjBho7RdlMkfkvk8tHPH9UrcmzgIJAgkuk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCwSyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrK6A//QCSUs9yra1r7Pvo9p7KAzM95U6rlVj9aJ7EvA9wxqu3XuGIG\r\nq8VXq/coTUSm1s8dHYXF7NEPv0TKl8CQ39v4ousEnX92Yfzn+F7Ak12lxLfS\r\nMW+0FQsGBKSbSUJ31YVlWyZ1U47oktVPzx5xXZ7Toohz+nDA6tlVPVPSDBD8\r\n0lrim2h0IiP3kq22lLJMW3rZyt4xuXLp8dBXPZyzdLn0GqhslY5KElh7A5rG\r\nN7/58sSnW6ISkoUldv4TVuicO9nLniYQH37NmlyYlmvDBR53aUeZB2lbWnTb\r\n8ZKSwzIIsGqV25H7lHVgv+jMeMtD+1h+yf84HuBQzTbv5k+NmnQkbjWWIfc2\r\nw51Sd3Eag89zLcihNE4SovH1VmvdB5nuoUnW1r/d2xzy0v4TSAPLfl0MdVYe\r\n4gZKLKMwc6ijrlrXCYG+kI43aCeZbhEAbA59XZwIFwyCo/jDdKqSaq9KY24c\r\nOWJGrnW13zjS1y3WkkIZ+N8Sh+Xa7S355M4peTv1U5vu7YOEC4858WtAZmYZ\r\nDhkbDyQIFYwU6WhchK2pDBxarxALP40Y9BivuBPSKVxbWBbnrwsd8/EUWZGy\r\nmsHcHUiBJDBB2/fCyc3zxOvN15kKrBmoo2KFE9V6NyCaNxmUk/Ld3ze481XR\r\nZnz7t2mfhFzDP/flJ1YBj3Wfl0gL4xnugFY=\r\n=/1yI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"cf2de1abf3966e5765a7a1afa66a9115b4a0de9e","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-28T05:58:20.569Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.11","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.49-renovate-typescript-4-x-cf2de1abf3966e5765a7a1afa66a9115b4a0de9e_1661666482172_0.1564104298797544","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.49":{"name":"@balena/jellyfish-client-sdk","version":"13.0.49","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.49","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"166afafa71eb329d1b6c6cab84696942a83b4dc8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.49.tgz","fileCount":31,"integrity":"sha512-nP38/C/wfGi0rFQhoOoIT/qpMJcZ9nTXIZyP6E50m8yF7u1p8vlH43rDLYaFXTujFOCqplWG1eTOi9ROYAMuEw==","signatures":[{"sig":"MEYCIQD73giR4dOUNoT1JO5lZm59Jn6cy3dYnLbrRYyBZjGtYAIhAOUXosMWcXWQuN/g/nfHv7wjFnRGfzEY0A00fjhZDY6t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCwWcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVcg//WPwa2FbKNmitlxbAtJZji//X4labIolWUa0su55wJDM9FrJ7\r\nj6zIyoWbuLVs4enQqJ1XgdicqA/4gAjaRcHdP6lQ9Kd7i0akoWr41t6Nrrkd\r\nFX5xHG3XBqoiStFPPACg6bcxp07f8k+hRUNh8UORoxzwnF3HBQq6wpv7xW38\r\nskhMXFWB71rGNq7GF1YBbPg01ywzNUu2/RXPAYei1JLvityfzwNByjNjyqyU\r\nqU0jzERWWBRx0cY4/I3A6xdDXmb0LwQNPKU10Yqt0Cj34tTisrrlJpRNnqXB\r\ntkURRUC1Sxl02HXc65VJQY3zGXXDqLBdqiUlQIRJ85CCmsVA4LPlK9VzEXQe\r\nLArKN53zxW7zy0g+U9wkTnjR5HEqAuadGyJUjQxf1NHJmOf0Af/DfmnddtIe\r\nMOG+9za29wRpDFIf4irPrv1bLNZST44m8rjmN6dYjiayR5NwiYYjkBrcoiOM\r\nttkwPlQ7mn1ZpZIXgnGz+GzzlMcO7tQmIpCDiitBk8WGRa+QFd9Oa2yPKCHS\r\nIWEnmH+HKkeEg2QrHeiGDeoLmgz4t1c26tp8XW0e4JA89UlncYLlERIB4dPk\r\nA0DM9s2/flW8yEzhmxUntiFvGf/Zdzsif4Q7bbtGEvDQXf2Xq7Wd+8sQINiM\r\n7tiqaDks+dr7pYXyjtH8TQHr8Djugz7kN4I=\r\n=eW68\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b62a7c17d2beee2cfa2ffdea8b9083d55ed88494","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-28T06:03:14.930Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.11","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.49_1661666716632_0.8127833316879092","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.50-renovate-typedoc-0-x-c5aba885622673f28902fddea5fea036a4c69558":{"name":"@balena/jellyfish-client-sdk","version":"13.0.50-renovate-typedoc-0-x-c5aba885622673f28902fddea5fea036a4c69558","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.50-renovate-typedoc-0-x-c5aba885622673f28902fddea5fea036a4c69558","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"48774c7a36820ec7a1091d5f6f7e0e96b8d4f5a7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.50-renovate-typedoc-0-x-c5aba885622673f28902fddea5fea036a4c69558.tgz","fileCount":31,"integrity":"sha512-6rL9NfLbu/t47+zdAsOQtbtY3JyoZOtGWY6hvx7JDjMlidCLaTCpeR18WeVxAx1uHRTr7qytaYR/uhN2F84cJw==","signatures":[{"sig":"MEUCIAqR/GsEo03gIj79QV75SenV4mP3MBGjZjZZTVFbXjsLAiEAzU1HI8sl5GRQhG0HZDYnXbxKxOXjquCdQspvlJiZvRE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDwyAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2Lw//fUO/a4aFaExGsnbMoCiGAz+re0CW6LdmqGrhVY5f1z7toc8C\r\npzTyf3ZW+jjG8AMoig2r4Vd+9aqV4O7u3RXgVnF6hdYCPaNawkF3q0viKvdC\r\nwKgeb5QWHIReD5bXphz/CulY6dXeCkg1yo1oezZiM3K4MWNT862wF8slrUPf\r\n6VgfUKs7BHs0RPLeXF7R5g4rz6ODkUW3VwPjLn63H7LqAwXq4nIC8C4/GIYB\r\nmEN7zqvmvFmSleEOPXGCARAb909fiCE9DH/b3joFobb5vfcLIvZ7B1ME1KnL\r\nacRRPIxT2uYzWSp+UZM722bzllmU0eC6reV13h5/LRBHJzC55MoBsVZnBF8Q\r\ns0pYUOPpBjmR3r/Y0baVnlcD1FI0++nsVU6/IvaKoxpL88WlV7wLC8bBj7Hu\r\nRjok+S8ckWyt2rs4t6DGWAqUNEh+YfopVNzVYJ7ttXjzEdfXG3u+a8hFM5dy\r\nsBJdvtiz51z3dLm9R+P0AEBtDKWXceyjCp+KuxUtbSDENrSVnZPJ1AP3PkWq\r\nVuiQd5cfGislSyjuLkRlMCjx8JwRtl+iMt0ToB+BBu7MYE+72gJcqErnuQLV\r\nR8reVWoNj9ATBMV5z1SOtZV+dgC7Bbq9bmECFYo9NAFCbZqmI5c+3ew31/j3\r\nW6OLqDB0sKYg8xnKhbfO4BpQjVQHZVBcJ44=\r\n=J+zm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"c5aba885622673f28902fddea5fea036a4c69558","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-31T07:20:32.725Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.12","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.50-renovate-typedoc-0-x-c5aba885622673f28902fddea5fea036a4c69558_1661930624665_0.4244285809189603","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.50":{"name":"@balena/jellyfish-client-sdk","version":"13.0.50","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.50","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cb449343c419ac6bd48500204ff5bcc18053fa1d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.50.tgz","fileCount":31,"integrity":"sha512-denODduBtQpsSR2ZatrsBIAiyzh2TKf5hNb3xqOMVDUndO35w0pbfVMhVU+Kz4PH59OO89jnbbck9kzIGYjtCg==","signatures":[{"sig":"MEUCIE7hzXzezJz1FUVcp9wrTk4AeLGuEoyRcFLoMpQMvF5WAiEAzZvkTCxbY4BKqaeqHeATwqiTaSNiHZnBcZ7pj0yEefo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDw0pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrrsA/7BNP0X6O9GYgxAlWLjRFwPXZfdtxuE8mYPSjNPmMoLVx14RsE\r\nkcKTQF2GY4oJh6mHNVldbGaZRNr30vCYDT83SUJLf8p13WZl6H5XeHPzck7B\r\nf1jz7C3V9y2ea5JsvzcjZCn+zpVTDt6lK42SJxODYBc8KHxWiwqEQYS6N4qG\r\nEJ1JAK1GTcPV6flNwJ0xtB5OgwTpPHsXgwFYX1BvRPw6Uwag9g8frfvMbVCt\r\neuH3lVU65id7ZR0CZQ/ZW6K/HHV3p2qn4eA64aDnLHLqCn5vrzd9HddBjllG\r\nAo1q7MpF2EteGDH957e6P21Rt0XiSE0zf0LSbnBmGKfNUuEf9iYTt4ZWsFgT\r\n633ovLqFqo0/PN7UdxhjvD1Z69ogPrsyoYtUQuN4Y8xGxEA3+FRijg0XEBXX\r\nsDqtm+2CKPzuXAc3z1miAttC8yYNLjIOUPryRd4sMf/FpuYOaCBQxtezFEuH\r\nVp9MIDZnYI6CKL9ngnPZ2Ec61muTVAFZmSSbCLvQ3zKqt6a0cffvLdrPlBuw\r\ns646r0Y+3KmpBqcok53czVlCW0dkejhagQxfcQ7JB7mSpuEM3hBVooiGlm2c\r\nA6gW/mm8sM78VlnKbdCRfl4yN2Sg2KU/QF+wXNYL/VO2GNuzY1qj3GD4bafE\r\nv+0WoeIqekutFbRVHcXv5MKmzbkvrRavb9g=\r\n=E5JM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6962cac0b8ec0f92b2329bbc783c18005ad3270b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-08-31T07:24:33.319Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.12","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.50_1661930793038_0.3259705429975621","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.51-renovate-typedoc-0-x-d2765175e3788ae2528cb38d6c21effcf3df04cb":{"name":"@balena/jellyfish-client-sdk","version":"13.0.51-renovate-typedoc-0-x-d2765175e3788ae2528cb38d6c21effcf3df04cb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.51-renovate-typedoc-0-x-d2765175e3788ae2528cb38d6c21effcf3df04cb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b87fc666078e304a57f43e158053f35d67ed2078","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.51-renovate-typedoc-0-x-d2765175e3788ae2528cb38d6c21effcf3df04cb.tgz","fileCount":31,"integrity":"sha512-stpdFK+hY0PP1P0ifMpRqe2SJilvuFWahh8srRXW8NT4h9BokAPoexlRLzmIo/ilTc9msBbVTlh87o7dwTudHQ==","signatures":[{"sig":"MEYCIQCkp1Qbx++NrJo9w89HTBn6OoV+V5rTGKrfl1BiT2VeVgIhAMAhAIGV4tazVcmO5E8ueBtvjVDpajEVWZsTgSDyk2q5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217381,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEBfpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmry8A//ZIUc7/+YWj+AaFlYn6rO31QG7lN398zfsopgD/52OXEB0ZBy\r\n0EPIjM4c79ndX+1o26IDbMG2Aq46c+F96BCZItHj0Byiiio1Y2HEFSg5yR31\r\nxZROphfZOlV/8CPQMdEj1dzppxukGk/gy1FjNVjXRPSO6mBA11Tmu/GYoNFJ\r\nYqwsEmBcp7CaEzBbWlEbqhiuD4uo7k2Sd0JVZGeaPh/pGX1MS87aRGj7z+S3\r\nbqyl+pFAOUChSkpmNE/9icEXjrkd1K5B+9Wztf3dRzMKnz2tt0j/KDTiq8G6\r\nZM2xG0RLgfv/US5+yJxTMc0wqQF39uPDJJd4Tkgq/292ZBYbcWLHHq4dgzIb\r\nVNURwzApf5ak7sHvM2uTf/J7ethboZD4fpXCdihduKsBlenCcXS8XYK+zNct\r\n0lVAfumUYUB6fXwiA0R8P70egvevq0ZshgXFJ8vYRM1k+U5fif+DmS6e6W69\r\nf7FKnIXv7h71dSAA3MkUXpAPitbfvJAgKb/yiginuvA/lQ+KCETtDF1+Ajv0\r\n2jSxOTLYZeBf+02LoWfNDot0sRycFcaJjY56vfs4wQAxhE1KerxQu7mXeDLm\r\n8qiGPazkaTqEDIlCH0CePeJz5sc9V7O4NoFunxzgFKnkAuWKzw53BQuZt1At\r\npzhu6qciJ/GopBEmGOHMvyf8Xzmps+udM4c=\r\n=Ymo5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d2765175e3788ae2528cb38d6c21effcf3df04cb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-01T02:22:02.480Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.13","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.51-renovate-typedoc-0-x-d2765175e3788ae2528cb38d6c21effcf3df04cb_1661999081723_0.1370589195065346","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.51":{"name":"@balena/jellyfish-client-sdk","version":"13.0.51","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.51","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"146750451ce17bcfbabff4ed88d9321b5f84f1f3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.51.tgz","fileCount":31,"integrity":"sha512-hDUv1SZjl4gUIepz4Ys2hrWjl7xFDWLvbHfZgVns8CI7IrMl++TRRtaG1PjgN2wy3h753GNXP1em7+mC2gdcgA==","signatures":[{"sig":"MEQCIEvEKAKosGHX61WBuauhbo6K3yG9v0xAsxQGI0zX5J61AiAp/kzNYfRndG1qaWUIHUTcV6XmWyE6jsUkhNfYyg6eOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEBi/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0Sw/9HopxNvPKJ7lm0w+wV4jZhnHsex+0kKw9brUC8acwNG3iE5J4\r\nEd+cO6RMs2LPi7nGzyLJupDvyELxcsjwrOUYgLxRMJHwlZ68KRZQLyuqJAep\r\nYQi2ssW+hy6mEOxo77MaZ7prwjxdkHySuLYyjCpa/Zk/jMSuEemaZn/zBnY3\r\npK9XJ3AnCuugj6RRe2gcofBHVBYRy4i4cy2kXTzg+nOThfTwoapkJAf0T7Xz\r\n3q94ExKhqjq3naUqz+NuDNEMo4ePAz5OS+GNeo9N8FSlnJXNNUrcCJO7tOkd\r\nckbmYiyKPkwOqp6rWKuRXIn5FRm727j59YSv5nV4tiFI2XPgOFg+GP/WfrP7\r\nec0W125zLpKjbJ6BJqubDUa1z9JgjPnDtKUFZ8UQCyuHPcWhUmlCVXrlwCvb\r\nKJMsz/dxybRarZF09zDr1xSSUExV8QbNONxp8bxf/kNhAKXxljWUK/muOPGX\r\nmAX2HJlmUUD91v1UD5anQByREvvrdJ4esKbeJhQRzdEtW0tEhQxFfYUv2Azk\r\n6Q2jDrTLDOecHzmMdNuMp6RGeSFAXy3rakWoezDSfJJQDW/mm0n1MMyLCw3j\r\nHE/uwt+MBQDMj9iFHN+lNKXQrJDpgfj3H01sC+ZINrMXW9FYL1d6ZywBOBh4\r\n7+d/+nB8SdJAZIUBaAR1MUxOXuPtKCxP2TE=\r\n=7H3N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"86b279d3080a57ba683fcb10550e4cc40a1766f2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-01T02:25:46.749Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.13","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.51_1661999295275_0.24291482812301268","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.52-renovate-socket-io-packages-4e3f71997f09a49b622d5a7e74abd48c000ead0f":{"name":"@balena/jellyfish-client-sdk","version":"13.0.52-renovate-socket-io-packages-4e3f71997f09a49b622d5a7e74abd48c000ead0f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.52-renovate-socket-io-packages-4e3f71997f09a49b622d5a7e74abd48c000ead0f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"92d70e55ff4f34ffe98ddf2efe6cf985eafa2bed","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.52-renovate-socket-io-packages-4e3f71997f09a49b622d5a7e74abd48c000ead0f.tgz","fileCount":31,"integrity":"sha512-LmkQM8DfnWjezWTHpY8x8kut7hsY8vIbczSetGqvnpTCANEOEMVxOYlLPVepcdR9Hp/lj5WnNnjWh6j2Nd0Hng==","signatures":[{"sig":"MEQCIFYYceHLOPNdgksyD5oQ3yFI+BQTmtLxhZ5M+gDdwqTUAiAj4lBWh8uY7nY0yyt6Hm6E6usTPZwhS+Y/52DS7QBCSA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEsQ9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpp2hAAg35CxGZgcxC5PSW6av1D0/7sIKEbULbX/NwA0j+GsZR+vTEB\r\nad4FO3Rnr99Un2FTD1Be5P7rupiZ+XJ/un+IWaAdp2Cz78f08Xi2C5WHbXvb\r\nMK3Ar2SHojpT2CPyYrsu95UcdQqS/O/boUPBre7Pi3LRVAs1whrG36GptoUO\r\nNb2RWjt1a2HFQlK2Tcs1zxZ+hILL67cv92i/yDA/+Qf1DOhO5CpADiAIofxP\r\nzKKy9wSHAJ6OwE47PkCDYwR6aXlHvfFLj7zH8peiAUypNnkSRGflOn77Xuv7\r\nmY+29iHcCDmZbajzH1LkStMysH4bXJYZ2cZpEEKnaSL0mlTu+wnS+cTYkxdO\r\nLDWXb8usoGAMJcQYglzHLCqdCDzBZ0vbthXZ7T8z/nhS80gEYtcXUwHfY+53\r\njO/k1jOxlzLXH1fv00SrzUnWGU25OMgYxsZgGGkpjQdiBs/d+J9pJMP1rIF8\r\nTAINjt9D0/A6WJTuUDGXhfR7ivCR37RMWqUSSlQaZ3D3/atk0exB6q/+m5hE\r\ntTYGM4AsvKgAK+GD99b0hBDLLJ6bvxvXnHmhzs5y3Yhc8TxSnToVyUduI31Z\r\nAG2niitU29RPW24ZD6JEIAHEDhhUzFC51KpIFQyMb1Eoo4rRduk/ri+QLGpo\r\nY/OYRfHMHd7GRulwhW6WurSbfvJvWRYft48=\r\n=Pdx2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"4e3f71997f09a49b622d5a7e74abd48c000ead0f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-03T03:00:55.369Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.13","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.52-renovate-socket-io-packages-4e3f71997f09a49b622d5a7e74abd48c000ead0f_1662174269227_0.08341102877939655","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.52":{"name":"@balena/jellyfish-client-sdk","version":"13.0.52","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.52","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e7b3c1c967dd18c995b62b547cdcf0ab7940a352","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.52.tgz","fileCount":31,"integrity":"sha512-4WxsyMT1DvFKKeW6SUGA1rf3cARhQngW+7Htn3Dw56mrxLsxAUNDmGn9EamIQEs9RqzvCxYY+Ci/HOzZqzjhTA==","signatures":[{"sig":"MEUCIQC83trSMCndBHGOWZIOqm8JlED4MbADTF7G/Qt+YWa9ugIgP06uKf6FTHWhg73xXQX0/KbE+cQDDtWVUZcMem0mpWo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjEsUhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpD3w//ZCZwDjL+SUe6hOZcFbUzPJNBooqk/XcwcNSRGIb9yJxgqn3x\r\noCbwcfMZSVN0mUg8akOuQZ84Ec9PeAaDOBVEruk7ESQ7V8v/sWyqUIRxhwkC\r\n8yIB8XDGKYiZITTnX8QOFDivQ0G7YZ37+7J0qVrpOBe6tnJ5G/i2B3TDjlNg\r\n+/0K7kR2qVCCvWBMv852Lsj4k4jsKreHCvG6AULoSj8zD+GsxMOtLtuRX4IG\r\nnJobedPhPIipp4TgNdgGgVDwGfJ+Dnr8S73m6oXMXqac+JRoBvNdHXLj9+Ws\r\nDWmQ3OulUKbx6biC5ISqkiMpTysap16wIoO34ssQ7SEqLppAr3Xb009JTpE4\r\nSbH2z+wZXRJW8TAIDFZc9yu6K4IryjvQ0guc62Pr2lbUOR5tnAQgvmNWZa9e\r\nXJqJWjCx5JcppvuBsYaAJVrrALshycQvONpKgo8KjmcJ/58RNrQ7WvXQLk8X\r\n3uq0IAdAVdKFLNxlaIuLV8aVqc4c4vEzzJ9yq2ZRLqOUZIlcBwwQAcXc3aaF\r\nAJU4crRN9HyBNEmsaxfaO2T2zgguMMxko3+FMaftSO7qZnvl4zSuuwdb3++m\r\nsp8xzRcYhgllTaFVrfGf8+0Ix5OLF2Jia5r4K5hJ/V9hxF+qQubs8L/UGPUF\r\n9AdYB8iNwvCVPEy+iKPd8u4fdGqBmCP7M0E=\r\n=SBOP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2a181b36eb0603c8c0e0daa398dbe7e28eb8ffe9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-03T03:06:09.284Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.13","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.52_1662174497511_0.9043476664587846","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.53-renovate-typedoc-0-x-82aa301e2c81e0e2dc075ba350aa8bc8c4c48a0b":{"name":"@balena/jellyfish-client-sdk","version":"13.0.53-renovate-typedoc-0-x-82aa301e2c81e0e2dc075ba350aa8bc8c4c48a0b","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.53-renovate-typedoc-0-x-82aa301e2c81e0e2dc075ba350aa8bc8c4c48a0b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b3bb76f2deac8d29424f781ffd3198d6d9797d33","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.53-renovate-typedoc-0-x-82aa301e2c81e0e2dc075ba350aa8bc8c4c48a0b.tgz","fileCount":31,"integrity":"sha512-bWEtv49HU3rOxvpsygpH+53oa1ra+FgQzQYTBuT10e6ZjLmV73BSZVORRxgDGwmGzwijZON0i9x7ViT+E7EYYw==","signatures":[{"sig":"MEQCIF/WyTAevbAdR+5YMoZYvF7tulqtBXa5SIHcbM9X/2/rAiAgYPZn+zTae7gVuF+56MkoCktODghafoHAvdW3e3z8Ag==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjE3kZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqdwg//Qpk8Q9kjpfJKNV9Kr+SGaU5fNALC4DaN7cOxFPqttLyTtbGl\r\nTvw6qSMIHc2G8v+01DGgPUCkN2GlPWpUaskl42Vid9cE8NiTKb8JW2R3cRj7\r\neZqOwgQ+4iQ1F6lLn4h4pQBFYudokIvy08eokr/s5BQfry/NWBIXVrqK4x+U\r\nCWKujcPx7eDhKmLZ6947nX0na/VxPm/X1oQylZp5tIYarDn9pgnfox1OI0y1\r\nodcHETV+JEtbAGmRxar7sG30IuepvL1/EdUuRyZuoY7dEGdCQ1JkC3qCSKE1\r\nU94Jkyq41s+IKvAHWxRVT5DiA0PUW9MJTVMtubXruhJ86GbFBG6PrMcBOOZD\r\nSqt77nrs4engCQsbW+0eoDo/tK5k3OINNb1n8eg8HA3wdOxpoA6f8QTG1rN9\r\nuiwTt1LWrwQkMj/nkG9vj65svHV/WclflII305pYMLiDgD69ZsabHAEEzofn\r\nC3OG+74EUTXoIhHfEsoLtISF4Z0qbt9q+Pf8xp/c6F+CtUOviW3FZSmNlbJi\r\nKrTiD8iB0TS+6E/8ZyOxkhCbiP92+O1sucnQq/GZMnSL/rYpC8WSf5jW/n1D\r\nvIpak8+gLUEMb9r/tOX9HDq8PMEj/KK/DaOccQigKPRR6RmGNHrfIVVIyGVA\r\nWqOUHxKnDsk/6+djPO2To+NXAgnmte0MgIg=\r\n=QLkM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"82aa301e2c81e0e2dc075ba350aa8bc8c4c48a0b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-03T15:53:04.567Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.14","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.53-renovate-typedoc-0-x-82aa301e2c81e0e2dc075ba350aa8bc8c4c48a0b_1662220569584_0.738069051466397","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.53":{"name":"@balena/jellyfish-client-sdk","version":"13.0.53","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.53","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1edef935c1cc1e6fccea6d7ee553d286e68189da","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.53.tgz","fileCount":31,"integrity":"sha512-ePj46KOGvFu2QgO1bByd/Z+SFlcx6seHuHoYuTfRsQHTqvZ+njKY1rxZ6kZNcxezTwNyNKl+b0kbnZG9iAeUmQ==","signatures":[{"sig":"MEQCIDOkq2UBZDKuKOCCuyY4EY+/5b9GPeTjyZowuiPWUCOyAiAl20O6qele5fzE8nsgr6C5/iiD4O23Jhy9knhLPXxTnA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjE3ngACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp2vhAAnTqDLUbr69wki5DGXrPju4iZEE8MY/Bd0RS2csN5c6u3Y4RG\r\n+BtIk3R7Bdx1xx/J2pRyXJTRgblODhDEWM+RHWwm7YoUcp94MH3pgKYyKN8o\r\nYt7Ffv19BNV1lEHNCSAyX0hO62hM17aEMRFLW83mcfFLiKAITZ/oH4UivX1h\r\nWC5KIcMbjvzKS3dL8o9eD9AA/hbHHSvxzu1HQt+wyZcwTUqcg1SFfoJLYvAb\r\nzpe3cbcRRHTZaCxl/cEmPX91HTYKLDcMUU4aZdC/tPaPIJwZUa5E4LwPuE/p\r\nur4+5WDwFSq5L2W8oGzsR3ISaavUTllo1WReW9UZm/qC5KKYP872WCyql87O\r\nrBjqsUSNS4KUHri1ZUYJRcn2AT1Dqyq06yb5POrHdv/DN9QGRSOufVQe7imP\r\n6xU3hP6UCHWLfLl7ZlzdlV3ger86ijsyid7qLMO9ugDCdBuvUgi4zwo2SIJM\r\nK9qKwJAV1MRGLbKKmn15IUhGCRa1fGj14trJOFPpzwHm+E13q5025nsUAszB\r\nZ20CuoWxUA+yZNej5/Fkjn+//Rq0bVB4XQ7QjVv6eMJ5SWZ7PNdOTysMQkBR\r\nZMWkqeuWSKTCzFrHNFAAS0PnFm567CdDi5ayBnKU7J6UXMmvsdYu8q+tA2kn\r\n2uQm4CmwVCLwmYqCtX4LfVibO/LM29aZYPE=\r\n=CnMk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b32e630ca7d3e58f0ccdf3d7b78bcbf51883d199","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-03T15:57:16.899Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.14","autumndb":"^22.1.28","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.53_1662220767905_0.5775570776986745","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.54-renovate-autumndb-22-x-dbf1a4886e1008c0eb822dfd420af4923d51414a":{"name":"@balena/jellyfish-client-sdk","version":"13.0.54-renovate-autumndb-22-x-dbf1a4886e1008c0eb822dfd420af4923d51414a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.54-renovate-autumndb-22-x-dbf1a4886e1008c0eb822dfd420af4923d51414a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3483b70a85aad8d92c5956085057a82b3144eb05","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.54-renovate-autumndb-22-x-dbf1a4886e1008c0eb822dfd420af4923d51414a.tgz","fileCount":31,"integrity":"sha512-11OZCkeMuYBywEVINhU7FmQtEh00P0uXbp4WiElANq5cjoWzDzQww/UnXRis3JI6GFzwSlHPeeCOOctIel4KxA==","signatures":[{"sig":"MEUCIQDkH1IfOqerm0W7gGFLZHz76CSgpIq6r/hNYazF/T/BeAIgDlLIwUExMeyORdqoYA/sHydJfELFKzUpu4zYOOkw84I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGJJ3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovYg/9EspIcdcYHGJOfEqxk1MALtRRfoKTZcs23aHwQjybACVrpDK1\r\nSlthSd69I5vq14RSa52u4aPiDEj6wLp9RA3uDqKbptjBDfnBEusE/WAi6X1y\r\n6X4HaxJ9U1/sbo1GsBw4F2mGYdFJAMgmRGz+oooVaQK1eJkL0bYH4gVWz96o\r\nynbEwZBBNltiogjgko1Zc+FkNlBVIFJe3gKYG3XqPOr6pZxfVbinQt9BaI1i\r\nqCB3KX3yJz0hBCus/eITcdJK1d7ia8mfCci+Amk+jGCDHm+OxQakjYgjMe7v\r\n1rAxIwukZzTOyKh/TJiTlpId8ROVdGXIFT5TKPTvr6jQFGyz+D9Fm1i2N2cw\r\naFojZ2dLdOtSKMg393Ag2IUZmtzx8HwvJ9FLOg5xQN1RjS0c8+V6VVsH8qLk\r\ndpa+bnXJrFZ0tsveelTgVLivHSB75T7IiG5T4GM7gGfEGhumRkvqovAdeYsC\r\nhL2bdpS0DYAs8tX/sZEJjJAvhBvhclDOaRY75gK6CSvHuoXwi7HqmhF072Ut\r\n4mtW4uwAMDmT6/dP3zRJDqA8Ls7BNZjNIkciGgnQlZkmAg0HrOdQ2qUILVtE\r\nWdR0mCYLuG/yaMPr/i4IeGJnXNfNBgLEJ6L/F3O9l/+ENo+/KlDSZ6koq1QQ\r\n/jZCzPrmUHGmzhfUlymgbCQX4XmdaoePbtE=\r\n=dKrR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"dbf1a4886e1008c0eb822dfd420af4923d51414a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-07T12:42:59.221Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.14","autumndb":"^22.2.5","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.54-renovate-autumndb-22-x-dbf1a4886e1008c0eb822dfd420af4923d51414a_1662554743723_0.3816172044340562","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.54":{"name":"@balena/jellyfish-client-sdk","version":"13.0.54","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.54","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d73e90382a68540d364683fc767ef7c1acf7a8b1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.54.tgz","fileCount":31,"integrity":"sha512-5YMszzfzocIPDj+kiD5OEc7HRsjol9WctNCpFeCYyfxJbZubccI/wfp4ngqbA2y4djjoL33ReIKxv1Zu7Lj/XQ==","signatures":[{"sig":"MEYCIQCDpZvUAbBELI5OKFgMMypG8dpRRJw/ICG9eRhGA3kcVAIhAOwPKpVgXX7WX/hJGzFpKO/TRSocBBKbwiI4+YxCzFYS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217572,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGJNBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIUg/5AWlfd3aukMcZD5V5wuzChNCk2WoKCzctN2JD+vwEiMgSJlSK\r\ndbf9UuYI8VwJhSbj4VyF1szi42lUE8TFYsApJQofbq7NI6arKZ7gqtlIrCqr\r\nS0UUucFfd5anH7D8PY3D/PY4qs53nEbPTyJbRdWtMwawm9syHpo1hbqmYwn8\r\nKFkhCGr5CL2tcaI5B93d29L9BfNuQIRu2EWcmOgpxisnM2iTctB4+JoEEYnn\r\nxHh2to4CJWf2vJLtkx5CHcbCirzPJXqc4dm0RxEPbdCKEvFqy+rDMqkLOTQW\r\nSHiPh2SJ45F9pImgDTfdjmW6YFPtJMnkjRebngLT4audYDLf3kSbaygAHSoy\r\nPziU4/xzpDIuyi/9/lG98WhlIYEu/+0++MWaasa8Q/RpwU5A2N3nfl37CGLI\r\nSU70G/Ok7i39cid62EmZd8BrG+31H9GbFq7wtEeA8bOGFVv4YD3r1uc/Qyjr\r\nUaBg1BqWDpdxECJML0BtEI/L10px5SkkvV0I7x4WrfC8A+jiqqwBZ80tlUlt\r\nmfxlIiR18OUeC8Uwoy9GaY7SMQAqrUIT+m0t3WHq3VXw0XTzQqdqAXZ8rU0I\r\njHGQy0AppAWEdLT1+GZOJ5/piTeVq1sSBAUteU+twJZYzePn42z+/j0GUOX+\r\nR7L/VtIVEr+oBifuynPjqZK7JTZbX/r7Sh8=\r\n=xwb/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b769b5fe6d2dee587caad88f4051c763cf6a84ef","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-07T12:47:11.076Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.14","autumndb":"^22.2.5","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.54_1662554945584_0.036433281581796484","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.55-renovate-autumndb-22-x-a1054e0375e60f08b47cf5801e127b73b80f6008":{"name":"@balena/jellyfish-client-sdk","version":"13.0.55-renovate-autumndb-22-x-a1054e0375e60f08b47cf5801e127b73b80f6008","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.55-renovate-autumndb-22-x-a1054e0375e60f08b47cf5801e127b73b80f6008","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b95895fdcbbe71d7d96734af7bd183eb39971912","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.55-renovate-autumndb-22-x-a1054e0375e60f08b47cf5801e127b73b80f6008.tgz","fileCount":31,"integrity":"sha512-+ILPwQrEHhPgN1iVMrJz4YyG5StvFZfGnhaLd2C6BTWYQSfo2kUnTgzKyw+vp8hCHLKcnUJSZteoafEaMnbkgw==","signatures":[{"sig":"MEUCICOEHbJN6JK+sviDvO89oPzdUvSA4kKmE7BXR83NqKG4AiEA42OagRiRAin8RlMYODacCCuLGtQsVPL//e5fMWzy2jM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG1CbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAPQ/7BDl9+oZpmmxjia7/qXo6WYr+mEzymfmLFXMYtMf8EXe/utSq\r\n3BzqYJoWCUYpFvgEtkGrQ8EhOmewNEo/OICZ3RosMc8egl9+vmxsx6mqJT6l\r\nAZzoXUMZgGR1UeTOYbR3798D3ZejpTg90CYe2uPXM80L/bIRKCIyt23wm8EP\r\nxSuRitWzOBT8OGjCQSf0S7DuWxLiOVFnq0fiseRYzxlpyRk27BNotf1EUO2V\r\nBEfde7zWcqrQp2/jjmT+GezYEeHzMhilHlpe4pcSHrzc6MiM0Y8JZuweak2u\r\nCKWGQki6tOklpfsxwhR8I/QmR6iambN27cZOlDPGuXqvInLSbtsR8tBOsZCy\r\nJxpK8rYHuU5j3Hnisu6P0KcqJq4m4GHedBYq3dKARDFyb7KqCgjjO/vlWbHN\r\numnE/LEoe0F02dM1bbXHKl0eG1GvjfYIQ9p3Dipp4rjyHPSiD3ElVp9Xsd2H\r\n8/kTuDq/Ku65IPdVjsOqDG3AMtsCvPTI+bahqnB2MN7fLPPQRZJgTazrIDLA\r\nTsm/qxfnj1tjzUQaIyBqeFoAh11dDkKyeT4I/XQN6RoEmIZxhFNpk+ujw6p+\r\nu3xykSniITbp6jY8paqbR85l0tR9PhtptZatXXgCreRmZBxpPqN2PcOLduB5\r\nNBfgO4lflPHNY/CYjv8S8a+ATk5TLPD1D/8=\r\n=bSNX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a1054e0375e60f08b47cf5801e127b73b80f6008","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-09T14:38:23.131Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.14","autumndb":"^22.2.6","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.55-renovate-autumndb-22-x-a1054e0375e60f08b47cf5801e127b73b80f6008_1662734491223_0.9588936052264092","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.55":{"name":"@balena/jellyfish-client-sdk","version":"13.0.55","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.55","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"151446f23ef7c8f2a6611e519e69134d3e0deeec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.55.tgz","fileCount":31,"integrity":"sha512-7BPhnqecOncxa0W7K7gJIt9a2fg8uMhJds25fOzARDb1mkkAxrsSRZVPGpoVsDO45xd8Cwufzx81no7Zq6o9dw==","signatures":[{"sig":"MEYCIQDMM/euDi7/XhRTZz2CUN2JgGrMg37d80UM8s8pqsPH9wIhAN54BNI1sx2eKLPYQCYXvNZxPw0W8B+YPpELAqS++txi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG1FDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpjXQ//ewLUwKZxO8HuOh0Lpui4MJhJWc6lJcNwgDZjf/zqv5fD/LN6\r\nGH2kxL7TlE0K3ybPxZMmrbinTsg/YPmSRjMwWTcdI5nyqRnDOt+ITuFosWzo\r\nW+4MDqBv5dSTh+NANNzoMtvYmSzsibUHeIX8H+DtM5VRamvFFgmVLoDdne05\r\nHmc7I+11K/1/8iO2UAIREt+ASD1GSsBxfjzKbkcnpBrkw9iWkKEshlhcSvFF\r\nYT1CL6PEhbuITiQt3b96TxCFgDl3PeqvLM+689ywxTNAmI6oKfY7o63NFS2Z\r\nLKcDXXQ21etyx/VnW9d34fy3qVsLGsYGTRtzKpkVntdNKeva0Ig9GNSvvesv\r\ntzxWsoOs77LP57A+J9AGDoQk4BVOyd1gnAyH4KtLH1gUVfTJp/FRrakxbZa3\r\nG0cWZfX2gUkCten+z4SS41/uTSmkzyH28Qvy+CtA3GpQCkvSe2q+9PPEg3Pn\r\nuGWG5FWI5tHH/NbXXWTFPT9Dtu8IkRrCJ2QzPlomGLN0eDyusGtndWHYd6li\r\n1YsVldIkfwtGWCH/V4x/kVejwmiaMhmLLB2Lm2mAwUatl4GgFI3ZFMU1r4ep\r\nVqB2JtYsp1BzsEejUXSP4rLdaiVIsX+WooPxCwmzKto9velXtGeOid8fLr0n\r\nJfAZ1M17iCnWfE3AanBQJo88s1dxfaCDEks=\r\n=HjAK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ec78876a5fd186241b4029ecaff4e0c5aa4ec2c0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-09T14:42:22.553Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.14","autumndb":"^22.2.6","typescript":"^4.8.2","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.55_1662734659073_0.6294234969460133","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.56-renovate-typescript-4-x-abc5647f9fc2ce2fc595c8e764a0b17c071032f5":{"name":"@balena/jellyfish-client-sdk","version":"13.0.56-renovate-typescript-4-x-abc5647f9fc2ce2fc595c8e764a0b17c071032f5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.56-renovate-typescript-4-x-abc5647f9fc2ce2fc595c8e764a0b17c071032f5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cea9e4ab2d67807e6e37f0aad0a9193c65fbef4c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.56-renovate-typescript-4-x-abc5647f9fc2ce2fc595c8e764a0b17c071032f5.tgz","fileCount":31,"integrity":"sha512-GkQ1zyinuwSyg/N1gBQh5YgAhYmIpEiBowouI1oq7cZoXFJjrubfY60pZCO209mlCD6Q6F80m2Jl7YONqlRu9A==","signatures":[{"sig":"MEQCIDqS90n5Sa74YFC3r9bMzi/3guGMW4y2EAU1tEQu2D2WAiBKCt0jy1pS9IcCHccP+7HmjLuQZfjS78cD2OHvQWwoEA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG9ifACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmuRAAnBRtWFZRUjJcUAawLCNd/xrQQRHC478JunA/LJoBPgTt5xBx\r\nWaGzD66LKKmc9++o8dI2qm0WZLmI1WUMh6bT4VG7k5Lg6ORnlcR8emp0ftLr\r\nXNYnnnlfCg5QbfGCZlUwoxzXEuk4WMjEj+gjo92+HmbFXWDiprKXVwoH9iEp\r\n2ZGe7HVItqcp/RwUY9zUfhGF9oDe5f8Jx/8SVMBfp9BfJZUCYex6+bll/raE\r\nUIyzvoabNAb4Pjn4krt+tY6nALId9fAKWqNOCJlnaK0Vw8k91T0voQCNFsAg\r\np6XNbWAMzWDIMA4ovdCdwo23LdS/m/kMp7AnSIFiu3sFezAPN/E//x7h9J+V\r\nBfdXf2w1sfVcJNR4qoz7IhN/4H/lYjmembDTKl8rTmOUKoOO4tc0E9Qii5DW\r\nCr6g6K++sawI8fYLU8WzqX0t8KrbiExRhvv9SK7TnHDyrrwVySz0KTzDyvX5\r\n23VfoZ4nOgIjt3f3eS8QvXmf9nCjrWRbVV7Qc5zcf+FGJhdhg1dQmLFpxxtj\r\nk6ZPOmWhB9w4S5U8fbkXLo2lSHoBux+3fRDiXf6EL6J9Aq1CN/UyIx0RrCnG\r\nygchf8ac3A4IEPIiwonDWMbDQ15L9vBymAvVETjP6pZEu6Q0nhvJQh77JhKw\r\n5JQemwGh29qxpyJQL8u9IJTWHZM0i+dDbMk=\r\n=v7Sn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"abc5647f9fc2ce2fc595c8e764a0b17c071032f5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T00:18:42.395Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.14","autumndb":"^22.2.6","typescript":"^4.8.3","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.56-renovate-typescript-4-x-abc5647f9fc2ce2fc595c8e764a0b17c071032f5_1662769311268_0.790018128604828","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.56":{"name":"@balena/jellyfish-client-sdk","version":"13.0.56","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.56","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d7f50be328c1f38c791e6038932fdcc337980219","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.56.tgz","fileCount":31,"integrity":"sha512-PnxSkZEbPRY8raX9tOWpUJt2neTm2GzeUQiEtBsh1fDqkkJw8G06pPY58ynB9snTIulxUa1etECzO8X1pJ8TFA==","signatures":[{"sig":"MEUCIQCXdgyN3MbrdfWGVTRKhQ16mSTQZ6pkPiAvornMGLbsVwIgOtXKa8jO8Qz/sDM+M2ICKWtys6j2apIo/6A2OO7xCeo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG9mLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqogQ//Uo2jyX2n5rCRv4/4HJsx7iUfykPk6sAxgWq71NNxweUSs7G+\r\n0xReCglbNFh/ewKXBWiV5exdBz1KMLaR1yJ6pqR7VgCps6e4Ks0C+Y/ul65p\r\nibVztY3S4iNKPC67jVx+FeUuYoCHhLskkmdkdhLFolFTS4hQMJcI6R4uM+9n\r\n/zKKPv71DC4O2pFG4e7DL7ujg3bo9N5NCJknEliYxgkZAHRIlJc676XgrWSM\r\nnPQP2KlzhkaQcZcsoXQ7a5YnYlmMpUy98/1UQC4JovYnZS7P+lmnd13HPyll\r\n6f3SYZ8B0OfdJECN+KEBdZkBfqwQ2gw7u2UgCdbUHcDpixiNbKFccHCE2L0V\r\niMEsl7ZbolR1AO3VFZoRwuR0vAKiEtMo7Qm73iuuHMFCqLja4CPD56ou15Ty\r\nJ9EUR0JrXzABLaQU6jE0Ietq8cO61KF4zh7RHbjsSwi8QJQZXYpHjqApDzRn\r\n8ddIzIOJaj3xch4+O/mh21n7d60zP3Wer5MpDOpkt/Ua/JzWVMbRKu59aDoZ\r\nH8tKBVUNv4Rdkuk3OmeHdjYDKaYa0zXaAXcjQQY6eADSYZegUmJZ9wOQ6T9Y\r\nboI2auWz5SW6mAOjgJtk8gqiTfJRwOKqAQVv+ZjgCOC94RiXvQs66g0k9ysj\r\nbYDHH4g16NLWbduznts2kxYl6uBhsvkOUp8=\r\n=4tYu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"39951a69803de0fe4f83f54226f5daeb9efa2a36","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T00:23:38.812Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","nock":"^13.2.9","sinon":"^14.0.0","deplint":"^1.1.3","ts-jest":"^28.0.8","typedoc":"^0.23.14","autumndb":"^22.2.6","typescript":"^4.8.3","@types/jest":"^28.1.8","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.56_1662769546922_0.6886994704212779","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.57-joshbwlng-update-jest-2fcc4ca4d11b08df186272a48da683f72593a067":{"name":"@balena/jellyfish-client-sdk","version":"13.0.57-joshbwlng-update-jest-2fcc4ca4d11b08df186272a48da683f72593a067","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.57-joshbwlng-update-jest-2fcc4ca4d11b08df186272a48da683f72593a067","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"40cf138897e6daaf21724f93b1c7a335af5206a0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.57-joshbwlng-update-jest-2fcc4ca4d11b08df186272a48da683f72593a067.tgz","fileCount":31,"integrity":"sha512-HocWPKWuFfJS11me5I8vJuXzN2IU3C/6hZEn0OiwbFaWAGlFSjk6K/gucoNUuroBR5bS9JFHeOug05Wu5YCz2g==","signatures":[{"sig":"MEYCIQClj8l2nIKZ+y1tDU7PCLEKakRU4CEwQeJ1wd1APUioxQIhAJllrnhyGbqs4Q8OZQHlLuqexON67uuuQEPL61b+OOz1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG/dyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVBBAAjFzg1JFv+P7y6O2kfFNZ/aL8Vy9DKXvG96DBaBE9Jx+L4zRA\r\nx6laRJFXCu/f4FCMkupmfHdbaS6loPP7bkYpvRWU1GIKC3EdNrMMPxY/gidH\r\nk/7Vhxg6hFT5tXp0buRvAtptL5p3v6Eme5qdQaqm2ACSKiF82xBWaeZEDTro\r\ndeycXj/EF6LDJ79LX0fSTyn0LPGM4Y/aBA1n19g0WtTNUqVzvuQn45Y+GkbS\r\nf62fn8xoIY/jBK1HBxpOWRtqmBJzyH2qh3ECitIvqGw2oS+MgHuh9PzrrC5Y\r\nFFwzpX7D22oeeRJBiZzNkgcFPIlOX+QNd0quedVdrV8tzcgemPRbeVLUL2/1\r\nfkOAw8agaq0mtLzXSqyu0+wMEhWE4u62GfH21hx3G7Hcy2oJUr5xxyaZ/VDr\r\nfQ9aMQIiroodJktt2mmHjpnIVuEa2rdxxfNs0WUlhLGMWlMzHOeQxWbGQiVZ\r\nSpKDz1FYZcHzZTj+nSpXc0LpcbJ2uVsUnUrSqZ0bISgg7915b+jnWFtja9Fm\r\nxGPcjdELWwR+7lhHaFyHkIwNkLwaFtF3osfvFjiStRWuN2wxLQKajbc/pXY9\r\nh6E33LyFDJP6TPtlYiD72K9uhP60TAh26m3tOfVgIhZflqhFQqHJYTfr/gCU\r\n7VWaouMw9LGhmI7okvYGoORc6NnYvsDuLlM=\r\n=ujxj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2fcc4ca4d11b08df186272a48da683f72593a067","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T02:28:55.916Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.6","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.57-joshbwlng-update-jest-2fcc4ca4d11b08df186272a48da683f72593a067_1662777202659_0.8828898154905873","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.57":{"name":"@balena/jellyfish-client-sdk","version":"13.0.57","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.57","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f0970f0e0f2983460ac209883a0cc000a2b3cd96","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.57.tgz","fileCount":31,"integrity":"sha512-FzTdaFQq6/5jc7LlQINfJX3JdtOYDtI5e9vezhJBIL5YwtUgYpZ0pRN+Xnguf+/U/tfBiWgFcgb3v/bQOTYKHg==","signatures":[{"sig":"MEQCIGMo65G1bLB3xcNat5Q66NatjE9KGwvu+ZJmiIr0WT0yAiAjMtZeTtLRtHyz9v/epxRDNAE7EacpaMKDGdl12ijNNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG/hpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoerhAAlgmtznTpeOFTKE4zALf2JghynUH0kZuzH37gye6w5uUYEhPC\r\nN0Ph7CdgAsJ85Q8H3gTAAOs3rZhRoxLAgzPVWibSOzP4Lkl6w8MkxNQKkqzQ\r\nX6y00uzKC58BttEFc260k+fxIqXl2OZNDfChkNDSIXJBi+iqMHGPMk4ZbkVt\r\nOmYn6g0cayobH/NMmfh47ATKiKPsG5O5cBpK2e7o2uTHNQeOslKPr4GiF3mx\r\noGgl+Dd7Z0HnV5PcnGW3ZywuBIip8/Eu5xgo4XdZVf1eLvrl8NALZqmVzIml\r\n2pJp/1EmFtMYgmcctgpHDdHRfIc6od2za/OaBu5eoL990IqpmFsCNcc6lm2G\r\nfEDjl6LHP/u/JMWpihztigf5RZW1OUtCeb+x9+vQ5VVhyaOKfv5+bEwU+P3L\r\nmr91izAiLYSGahHAHDcC/z+FtFGVSrZswCMJhu7on/ug0IcupfwhBnbNIoaa\r\n7mRxMK8DAC+0h6af2kSIS0UH4/o67UkxNExKW1Donfb4yaWLw9FfjzaUZhpD\r\nKlHQ9gDNXETqQ1QECAdu+hjChDMjz6FCXz9biCzTP+UR/3sUJtT8YwYFEtJ9\r\nTNYYZQe9WX8dhEHeXT0fkdmPh9IZWlYKMN6s8j63BDW5Xd3iX7SIv2aOdkJD\r\nyDtXodsSzSfunkRU0gAr24qeCbo2pmCuttM=\r\n=tPSz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"52ccc7f148e23e0844662d07839d4e4fc8b58735","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T02:35:04.619Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.6","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.57_1662777448916_0.7700106305759007","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.58-renovate-autumndb-22-x-de6bc5c9bab3670827fbf2163b27ac1cc4f0b0bb":{"name":"@balena/jellyfish-client-sdk","version":"13.0.58-renovate-autumndb-22-x-de6bc5c9bab3670827fbf2163b27ac1cc4f0b0bb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.58-renovate-autumndb-22-x-de6bc5c9bab3670827fbf2163b27ac1cc4f0b0bb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"561323dbfd1e7870ebb267304284852497cce7af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.58-renovate-autumndb-22-x-de6bc5c9bab3670827fbf2163b27ac1cc4f0b0bb.tgz","fileCount":31,"integrity":"sha512-mnVd8zjmu3R/SLnSeLoRVzuwOvIQDiv7jtgzQJquQH9hYlZHV7Hpmhv1sV3B4lhdONQm/vXiPjoZYdbmv1XSDw==","signatures":[{"sig":"MEUCIBABNMl3cTQD+tZ555eidr7XmrMYp2trQzQKNHupzhV/AiEApcY6SOPdr8uqkM/JtYfxA2X4BK/GimIA8fXF0ZHoJjw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217968,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG/l1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+KBAAhGt0C+XIlrvvDapinFBI/MLid4kA/SLPTITCcgywD+g6tZNY\r\nD4Ws8B2WD6HJuTmlS9eekvmysVDmx93Aw0UlqljrvBTIGuU3QGLHW36LIaDX\r\n00buxiWSMECR3k8e3xAr18RvsUEp47OMElAU6ppGYZply1JWYsgSchx9NLl3\r\nkxD3MVDozzcTsjzoM/MCsU51+FkyMh1u9FJuFQn0Pr/JHW5GzeHeQryJZ3vh\r\nftESDXLmJp1KiJHVsP8B6Q/giwPnuLUnZJrqxqWSO+5QTWRxcVmRqMQey6rt\r\nKT2xWUn9xYsBhTh+BWcVOqS62nZjPIe9iimc3tJaf7wPhEmrivtbhPwMMC4x\r\nAZ4GTJAwNXQtv7cdYRonshtAKEXgrNZvPbp8il7EPI3r2OF7wZsja5325vU8\r\njR0vmQNHzMmb3E9GHOT2Rg1wJwGq5CWPqapkgep6ohTeS5ZrrVzgojByvrr5\r\nz6KoordTw3boM/r/ZftSshitZlIGYFJJQuK9RFqvsn6gL0zh5y6uuwi8yx3j\r\nXO/TiM4KK/jYN4VKnhdxmf2QIXwRXuB9YlEPyyIFSdUeLI1Nj2YMNi2C+rPt\r\nCZgtR6qEJ7eGqQbtihy0FcUsyXhg3e6+k2j0v+mFfg3py/3FLBZOyMi/jOvj\r\n2d4RyB9X67MsvE9DMxxKvcZ5DbluCNtWMy4=\r\n=IiaI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"de6bc5c9bab3670827fbf2163b27ac1cc4f0b0bb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T02:37:42.378Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.8","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.58-renovate-autumndb-22-x-de6bc5c9bab3670827fbf2163b27ac1cc4f0b0bb_1662777717613_0.023962053940454586","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.58":{"name":"@balena/jellyfish-client-sdk","version":"13.0.58","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.58","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"90e0795e630960621423d3a8e2dd342c6f23cb09","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.58.tgz","fileCount":31,"integrity":"sha512-n/2H/sRxp2pfC++RkUo9GYFiEfiReYVuJz4MfDJneQ0kJM2F6e3SW4zhrnE0Rqx+YChoRRrFQdU8UhxXLZdP0w==","signatures":[{"sig":"MEQCIAKcnuuw5VJWdRmE6kqEQI18JYo9llptSqSX3AgOnGdxAiBFmOXgdk+0eqJqNX280XjrIdYZKMe6DY7BuWsXOSPeIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjG/rRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqF7g//eP6DHnLvNGV2WnX111HLAN4f/WHVDzQk7bvQh29Pwqvv8e55\r\nncsfjkxRNjC++uv6Ch47jkYiI0VFDsUu4oySktw99KBkWPBETIi+LwsYAQEW\r\nKsKPtiG1uGSQmVaik7djN7Zi/lrrB9o0SJan1lXsdRHpYfrIUWY+/uPOk2Y8\r\n8Bd7vskUFUO3cCljw1On8XLOKQ0SzFe73/VQfOM4N3AYzGipEXr4pH5e+cEs\r\nvZmT1KoWMvQjkJQQm0iyRdP5hcdSkZZiNnsWDS1zCLb8I2f1DMPBZVx3m5v9\r\nKiIuo+XYntA2MKQ3Uj+0ifRuI7zh0ebsSdQd9s9o6CMTKAKvQoIwn5FFQvFO\r\nqEy55rxVGe1rQFrBziRPMAvwPho7i6BdPVYcPu1I2FH1e/7pAvZxFNiiBfWK\r\n1ZSXNCa84p7z6fHzTb2pIg72nyC2c5BMokt7JB0P+fpITNIDGkuUOo3ojr3L\r\nHn7Jpr+qv/Tp8uE4reVsIFJqZhw74Tc8D+L4bKT4K2OmWwa0N2en8W5dKolY\r\nMSJwT9YEsLPn0ch7fAPmX7f95m70ABcG1lzYlp9LS6OJ0DZgXzlquj2YCWpc\r\nN6P5mATEtVf8Sb8Le3M4I1+ZXD9+tAAPZ8IDjKNILMbsKoz2TNPTJZrNABio\r\nuWxQO9icVpCqxatru+94ftQiwSLZjxibwjY=\r\n=rhn2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"be0e8cf0bb04d629bbb98661c78b3c05a49741bb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T02:44:12.573Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.8","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.58_1662778065124_0.22085350128981118","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.59-renovate-autumndb-22-x-afba4c0a6da48430007d91f52102842797c0551f":{"name":"@balena/jellyfish-client-sdk","version":"13.0.59-renovate-autumndb-22-x-afba4c0a6da48430007d91f52102842797c0551f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.59-renovate-autumndb-22-x-afba4c0a6da48430007d91f52102842797c0551f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c9b732aa0e3a51fe851a0a041cf4573a120789e0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.59-renovate-autumndb-22-x-afba4c0a6da48430007d91f52102842797c0551f.tgz","fileCount":31,"integrity":"sha512-vKedMer5BKs9DAjHMctHZa8fYYrlfE8nH/LeMwcyQVWO/SwnvOoZ5hskmA04SMLj4EOgAdbjAZ0d3JKXmeeXLw==","signatures":[{"sig":"MEUCIQDOQl0B1R4/RdtnJ/bhdNlgSOwWUWX4uYtOOtx7a5TD7gIge6bPU7xrMS6uu4Ef1iB3aTiuX7AYyU3D+cTyZVfJbZc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218052,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHCkOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2Uw//QHnV47BiQ+Kuu5ocDvsmgBCGoS2+ktKlqTWvPZ6U5zFjlY0k\r\nBEzN0kg5JpauXltfJXsiIRMmGWURK4Wb+dd9bZvgbbJWsJvDYMKfZhl20Zaw\r\n7iykQYgShetA1Ny1yI/KEWEAWQ8FLUgNOU44ZbI7zOGasoxa2reK4zni9JSf\r\ndytdf1Kk/EBoRHhU8k5y/bVCy1bdf5XOkewW7rQ7YAnUrVeZKOvDXwIcHZ04\r\n0zXc08dQ1GqXGhHaGvtSyhHSaH/ypUySBsgo4fdotT3TXgLkm46MEdkYZ/sY\r\n7RL2QA88zKDh8ZtHNu4YP7U05ygv1qbU8tGmPi3lsPfpTZHQ/JcgtriCN2Gn\r\nUHr/unQfgVojEpyCLnjov8erTtzemkhOd5+3ZuVCLJSZJ5mCL6IH7H3dPCIW\r\nxH2VKDhjZ32oV5hmKc2Zkkov0fEzNSRgiuTWmHDB1yhbOQdBVXWmQal8biyD\r\naxf5hi60hb4upniydgQi/oRjB2z+xoCjAQGBIB/cPffiiHNZ+32ucqCi5VMy\r\nSpohJKHQfQyDP/qN9e0frFk5vhaoJUDsOqh+mtCR6HHteOfhXds+u6hCOWLw\r\ndW4rwkg6G9oArlBfywx86pakUKin5I0ZkqUouq4rkKIkaAB0t6vPLISRIe3F\r\ndo4slONeGXkZMr8FVwh/g9TCkSzKGv5gzNw=\r\n=iYQd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"afba4c0a6da48430007d91f52102842797c0551f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T06:01:34.762Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.10","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.59-renovate-autumndb-22-x-afba4c0a6da48430007d91f52102842797c0551f_1662789901940_0.18731635598672014","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.59":{"name":"@balena/jellyfish-client-sdk","version":"13.0.59","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.59","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"39b952df2fc46af18db4d05eb420ac13bee6d8cf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.59.tgz","fileCount":31,"integrity":"sha512-VSj6m4kYMx2jKWlg5EjzxRbOmL2d5DbG0ElSg8pQR2qiGv08uEYo+BdBQQhnB9s1Qk9xkHjT4NsIUFL5TfOmUw==","signatures":[{"sig":"MEUCIBKzIkWT8Sd/B6Hj015gI1eoTZBXuaDPOM6zpjF6+LdqAiEAhwxGHCTMiDMUh9cxU5kmrOgXMjOVtIstk55GIg/p25s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":217988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHCntACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmojbA/7Blxk9w431rBvrGaTKCdAHVOgUh4b5MaQ1/xOyXeir4l++Epi\r\nQU7hhT2o5hur6SatavuxO/dwOHnv7aw1FekdjzuxtuQux6+Vkl66EfhUVPgd\r\nr/sCXxhtQEq9F4ce+3ROLfPXlu617SO/42dz8zEY9Sx3oGN3PDWRKPCtRJHa\r\nEa+PABrPkplgkEB6fzNVhMlaWCLxVuMe5d+i/8j8TQVZ6j1HZ0TdcnowlrcR\r\nazjHMehbmbUfmX92n02qLjOghl1SnOzbIq3eSf/Yrsm7bUcCJsGyHY9JkSH1\r\n6as97yoBnywO+V01OfKT8nEHi6D+uDdGNCNl5Epn6CihscGopdmaq2Vasumw\r\nFWuGUP2u8nm9aSJcWjtEgTGQvns1Qf1R0QqIaiyX7zieBqvgu802qKlngeA7\r\n9tXtEAtv54Cp7esQBpZl5fVu4B+Gaz9laXr2jUvfN/MYCMpYhpeLuewzW2Ab\r\nmmFfUicxNPTpvzd/FcSJ+c62p1/4CMSOLeSkto6LUDheIiW9M5gmElf2o/ro\r\n9F4yffeITpkFAMtnywTsLnB2973M61ttsnEK/8DdemyqLRzIHFUdnR2nz4kc\r\nnj2/pW+AnesPjaLa7oAEwkIL7A2cimvUc+XXqNqSakxWzdhrCJz46wT7Thgj\r\nN+PMR7S7/JOz47znq2JKYISYI0WFunQeANA=\r\n=5I9X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"92323cb20b78c7fdc8839399d32332fe3cadabcd","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T06:06:48.438Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.10","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.59_1662790124898_0.8431782823606233","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.60-renovate-autumndb-22-x-f5886f7109e8f2d4db1990e5386ca752c48c7eda":{"name":"@balena/jellyfish-client-sdk","version":"13.0.60-renovate-autumndb-22-x-f5886f7109e8f2d4db1990e5386ca752c48c7eda","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.60-renovate-autumndb-22-x-f5886f7109e8f2d4db1990e5386ca752c48c7eda","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"33405f5f566f4bd4d2aca5b9f9e0d17a0b56d579","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.60-renovate-autumndb-22-x-f5886f7109e8f2d4db1990e5386ca752c48c7eda.tgz","fileCount":31,"integrity":"sha512-SDZKluLrmsAtrLW5aA9ppkf5A+gcZSq5xUd2e65AYbPmpDNsrR9Mgogd88btEqPCGBzLl+Jh2ihYz5bcG9Ocfg==","signatures":[{"sig":"MEYCIQCCZvsQDSOAfp4tRiVFznOpXwx7u09MJlemreE4g43hQQIhAO2c+5eoH62+7+IkyBuU5JTfmSKHFSHQH2568aLdefht","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218136,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHHIpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZpQ/7BR52TJEsttENCe/M8lYUMsTw4hE74brMSKIPTmS0wXqbiGUG\r\nixyrUwN2VoxbFMmWillblVsPe1N+aNNc7ED7WuN37x1nAw/sjSZ2r3DBVgAT\r\nqwJStniQSnFNlifF4bOnsxZ2/Bik3TB1x6wqmYKi1mqeli04vGLFLkTqT840\r\n1eixkvs4vE3dAR7qqVmHxefps+v7bo3UqsFSWZ0CmRl0bhVmMahJ80cEsn/5\r\nbH76inPKeVAUMii+xrprBOCd3z/AvkJedbIhmQiV2Q6o/F2fR+EIdwmoNT76\r\nfExPI+9Ad+/jqmPHiGkYZDnpZ5OtIYARLK77EfU7TPce4MIRBm9tprBfvijf\r\nFu1UehBzamWLKhN7SoHsCBXRFSM4LGDKQA3Jsw/+Saipl0UjGfpFkP0x+5Un\r\naoweo1+Hm31ivs0mX5NSGf29QzA9w2ORfoM8WhgrWntvrE7Psqztfwsr+nXE\r\nitj8Hx/l0p7Dp+3V/yaWtp8a75T1HaKPYqoYVxdDdkLvt+Q3CpLy/oIXiwBs\r\nJFaxzpK+mZNOaFRPJz7ruurgkPkof2FMmZnqJ3fnYz5Z9QGOVniJsp2Y82E4\r\nQK3DkUZCV61BajQ3QWpf55a+XAOl5XyWdN2mLx7Rgb31U3vW6HB3PaeHALhj\r\nwjB0hJngqPHZXZJ/qHDOzHX++iCOTjNhKpY=\r\n=bVjG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f5886f7109e8f2d4db1990e5386ca752c48c7eda","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T11:14:09.102Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.18","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.60-renovate-autumndb-22-x-f5886f7109e8f2d4db1990e5386ca752c48c7eda_1662808617460_0.5626858676185575","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.60":{"name":"@balena/jellyfish-client-sdk","version":"13.0.60","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.60","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1ef677843de1b9dc277a9e434363fe2f3ebf7709","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.60.tgz","fileCount":31,"integrity":"sha512-FTNx40Uwx8KwX0v64yr6Br0Zqn3b+wibCFL8O/wHD3W0jKfApXPHjC2uDN2F9AHNxzLsAcjAaGH6zaw41bOvsA==","signatures":[{"sig":"MEUCIHMOYdw8q3Kepsd1Ez6QxbxPX8qXJzKRUpB/tm09gZX6AiEA0kjr2lSzJiONq4qy1ev7kl0+QgfBNz6wRdsPtvlyCF0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218072,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHHMIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpo6RAAj3Gh4bnwgdYJKLKZEWQlal2XGwlKJQVfx5CcuVhTtU32dY2x\r\nr6Yyd2tSLeoB/JoGxkpH9Ih9Fw6JL/3P1wxBK3yBeehWiXUXrFVEU2HQHS0S\r\nH1pSEnPVKxp6Wi/K/3j2/xxFoOuOw8mnsuflnDPpsCzI/6G4F3Ff7SWq8Y2a\r\nClhDpIvVmWft4YrtnFQfA31foWoyHAb1TVdkZBrF7FvUX2MH7B4cHZnp7+9o\r\nYkOjju5dMdJT7+yp1h/cxMMVdOQ4+yJABLP1HYbeiWPuq/DMbm+lIyiupd2Z\r\nehkfckmcU3T9Xnu0gQW30udw3Qyv7ovprIoVWzipEgyD2XmtVivL4O7oz6Zw\r\nkaTRooyIjks4l6dzC2K66jGSxojR4cFJ8Nug3IUzkdvfD8PrpGA2DEa0O+40\r\nTHWo5RYM1yLvWdOKJHxha+Ivt2HZ79mpbXuFZ8Q/uNbsjtNuTp3GTQCS6d/8\r\n0fd3M4Zw8khNbgqDxYyx4+mFL4bLRY+OFE4z9AYI7bqNl+9PHwXA2QKtIkMg\r\nCTgb+/tm+C2MUlnoXqN7BxR2R+kbSqQQQByUjt43QDfN1lXM4qhCsDQQqObf\r\n492Nc4Ye+t1Htb7yZz41QT/AF1EEVOV2WRg6+WaTx3NOgHOSLQH/kpAv7KG1\r\nmbzKvKyTCdXsLVLAaNg5044KU6B5Pq2IKIQ=\r\n=YqUv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d6fa14edb4572b153232de41e68293b58630cf8b","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T11:18:52.850Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.18","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.60_1662808840562_0.24101825085803474","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.61-renovate-autumndb-22-x-e982da114dab58239128c2e04eda87ca0c90fefa":{"name":"@balena/jellyfish-client-sdk","version":"13.0.61-renovate-autumndb-22-x-e982da114dab58239128c2e04eda87ca0c90fefa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.61-renovate-autumndb-22-x-e982da114dab58239128c2e04eda87ca0c90fefa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"96de38f7b3bfcabd66f0db9c9c054cdd13d978d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.61-renovate-autumndb-22-x-e982da114dab58239128c2e04eda87ca0c90fefa.tgz","fileCount":31,"integrity":"sha512-G5x1GqQIby5riMNA/mgowD3Ku9ThHeAZ9/GH2sVI82RmSerTqFhtYLWuna1tiCenFFl14WuFv73AghleN+hgxw==","signatures":[{"sig":"MEUCIEQ8P2v1qFJbH/u7c+SAkxsYTcBujhP+gEkbBuSUBvaWAiEA4HMSZvTH+NEZAu613CygErQse31mVsSuhZS3rG+Gfzg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHNOnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprdBAAnw9hV7pNIsjfhryQqwfUCYUP4HcFgrtPdaXyyUq+ZP3Nd/aD\r\nijXxLyHnYJceBhlc2X1YfuCcKwLABZTUIBmD5m4RdqkVleogxDynt8kIOIkn\r\nrje3fjcqjyi/znudUg9xeBWJCSb3W/+xOQNgXQwLfJr3ycNm3EPF3I81WCFp\r\ni/P64stWF31DQvrGE/CIwKmFpx/59eQXGxxhihdWRIa3giyrxnOkbSZ+ugZl\r\ne3z42F2zLWvOFOYbhreOVb59eUx/iGAjRBTkVXEdvUng3mLXURhE1sjlrgB6\r\nG+bEtJZBIlIhxdh+kIfsa2uo9tWIXrhjv8l2OvGKNuwKdf4qM35rqgQ7r4dB\r\nX1Z4Ptkqv7AwTKR6R5rWXopMZ9ipZvePI9+u/nyOHoG1/VnYwITHces7sff9\r\nvH29dtT5a/qwilJhPRhWtMVhVnvRxRMxUa2DJePZ8iuNYroQZ9iUx+Ysz9xE\r\n/NJ+ZUsN8L8XSYgnELak0KeKMshloszlPNd6g1XHH5NKAVuZ1pqaC39dixsm\r\nCdmADFWybEEBCI/HGjfFsYddiQMBUBEwAxeZOOFkpYywvLqChiGIN73BNFa6\r\nqDbD6pCtMW1X1OjqvPz7DAlYXOIuw4w602THAnGf+ZicNcbQekIcYUKAobLp\r\nhD6RuG8wKSdVTBOLIh+ajOAbKMxXAlzjKeo=\r\n=6YTy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"e982da114dab58239128c2e04eda87ca0c90fefa","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T18:10:20.723Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.19","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.61-renovate-autumndb-22-x-e982da114dab58239128c2e04eda87ca0c90fefa_1662833575559_0.9885234027845409","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.61":{"name":"@balena/jellyfish-client-sdk","version":"13.0.61","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.61","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"89b5592452c8213f75c754296544b3e30462d280","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.61.tgz","fileCount":31,"integrity":"sha512-cyxDuRAlAgaDa3SF6Po4NsLELINMvNN8PXDFnHsN48hBXTKY/Dilv44/YCOP5I4C6scjEk3x0LhufOATa48AUw==","signatures":[{"sig":"MEYCIQCiID6hhL8QOMq1frR+giqyKkigjYLES3vAFy5RfsoHewIhAJ5aOJ+KrsBzkmv26L0BVvIH34HWpGFaSL5y7Gke/1qC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHNSVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmowEg//Vt1VnCpnD/xR2qTQtB31cAVp6/gUgyRo38gapbLz6LhIZJ7Y\r\n84wClJ+46ellMKzCE7MitC05/UD2G3Fk9jHr5RYB+qgcWYXpvICHagnUkBMT\r\nHQkRcY5utbjPGDh4t1q+FBe2zHYYmakXuNnrhe8H5EC5Km88ly0ssgd+yiZe\r\n4VahoIcFee/4qv8tLGogDY5v7lLBCA1N8QNThWkHKh2SFxA9FgOaJUU468MM\r\nI4H/JPSsFt0LQ59Q8i2EjrRrAGYgA4gEj+iyGySOHdD1WgobZ334u36d8ynK\r\nMi9D2q6f/BxV4+oaBQqETuRHPJ08AZ3LUFiGC6TlOvLVeunxaA3XxnRLabAm\r\n5orn0zuoMkKTpQUHih1cAG4vQbf+nsVHK23AUOqb/l0X4WMefex/FNmuGGwy\r\nKpHyVvOsqGvi60MNTUzCNKSUrERAWY1phOicyWlGIeNFqzLf2XQ6tkJ1irTT\r\nMqRUoHwBRgXtlB2tDMEdN65pZj2ZP8SZwPOG2slSck9UaGbt+NNm6qTNLFI+\r\nOnfX1j8NNKoWcDjQpmbnN2i8iHB0aHks5qDttkeeRi/KCuF+ajziOpgfGKZG\r\nvCPH2v0ES0Z9khALcjmysGpKDvBU/RmN2F+hg6SqSFttbrEgM9J4s4ZbVaDw\r\nctpZ4UIOVT+7oB4NXBA2xkLeR9+kT4Hnrgs=\r\n=bnoy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"1c61ef1e0ad9eed8a12fd735937bd33a7bb94bb9","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T18:14:45.564Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.19","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.61_1662833813606_0.14887295905248843","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.61-renovate-jest-monorepo-a493f5442c0036a4e7540ee02d436494a39cdb74":{"name":"@balena/jellyfish-client-sdk","version":"13.0.61-renovate-jest-monorepo-a493f5442c0036a4e7540ee02d436494a39cdb74","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.61-renovate-jest-monorepo-a493f5442c0036a4e7540ee02d436494a39cdb74","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a8f040091c2ba9a3a8aeb5e509f8e6bca4804529","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.61-renovate-jest-monorepo-a493f5442c0036a4e7540ee02d436494a39cdb74.tgz","fileCount":31,"integrity":"sha512-vxBogdcTlcKWq2qsdZe9+zvFgnBYAxug22+6jK0NFlQ7QAvIAk+0xdOf09Sa3LYZiTi7BIHqpSFSxgTCcf241A==","signatures":[{"sig":"MEYCIQDRn19XYhPahNwvCFQpYTwDg8bWEVfvN4i8eargHrVBtgIhAMIWdWQ+0sLA525f6y5tv9+QDtrh0R6HEu0xLQJUTBD5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHNUKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo03g/8CkgUL7+lhYwHzuDfoo/ftlDB8SvRnf82iRo/z9sMGKMKa39l\r\n0GFGlBxOcMQzpwGQIJcgSqY6QmbK2MJv0zdgfmPEegn8YmnNtJ/Zh9aKZaIk\r\na0zD0dT4e1/EpiEZ+Zcsc8aY/xy01avkKIB5UVQA5Ta00Q70AUyhUG7rmHl7\r\n7rmH6GOf4z7+IU+cNHtuM5bysoSGXROcGRjTkoWPMdsIjh4Kr2QKwbm1MnBd\r\nIAVSb4Hd/lMnizhKUlF8L7NDQAGyi7aELEUWfHCy2k44XqEDfyK0+yIXKRI4\r\nKRrXsSO8361wDXdfOIK81QRQY40ontgLpS4byrH+Mw9dyWyuvOslpDfP0Y3U\r\nifWTP3IEy6nWx2h1dxjlEoKakB1RUSSJLwP2govBL0flzq6Y+zSjHthDvKHy\r\nPWaOgl0u8lkAGy154L6Zq1+7mtcqA21G49ZxAdCSkJV0S7bKGtCCttMj6Dgv\r\nmTDX8Pc7NjmmPj3KQUiCz2/1DNlLu+0qCXYyX7uTtcHYEvq3ERWxESZib6Ar\r\nInx5Durc0l8P2FCEen+pT8qlwvfn5zgxMhj40hILIOA/uZ8QXg+Nc0CM7QO0\r\nGOiSMh/cqithVTr/Vs0Pd+Gz1s7RXofLhpHoGX96WapvMbT+BvHZlYvVGcaa\r\nqhLsveBWpE82NPpF/HdRfAJcjhkYLGtCH+c=\r\n=bbZv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"a493f5442c0036a4e7540ee02d436494a39cdb74","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T18:15:38.741Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.19","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.61-renovate-jest-monorepo-a493f5442c0036a4e7540ee02d436494a39cdb74_1662833930558_0.06759099751201236","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.62-renovate-jest-monorepo-f27a2e08f222c5ae1ccd80798d3f07c943cfc5bb":{"name":"@balena/jellyfish-client-sdk","version":"13.0.62-renovate-jest-monorepo-f27a2e08f222c5ae1ccd80798d3f07c943cfc5bb","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.62-renovate-jest-monorepo-f27a2e08f222c5ae1ccd80798d3f07c943cfc5bb","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"38366220769897882563012dc4d7ead7f3f02580","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.62-renovate-jest-monorepo-f27a2e08f222c5ae1ccd80798d3f07c943cfc5bb.tgz","fileCount":31,"integrity":"sha512-Llgcq4Xgtc9imXD0UMf+JhZb/YlZ8UDYcWZDc1es5oEuBK5RDvbY9WL1TtkoF8SZY1Qkftx5TGhGI814tDD/Mg==","signatures":[{"sig":"MEUCIQClsSshCL+Jdq2Dm9thdkQk8QWNP2KzlTMII2Jf4L7E8AIgaDF88ppLd/4xjAMbVsQw1kjlf9qQIRHeLdBmYI92jMc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHNWfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/IBAAibYZwtBFyyXAfX/zynUZySSRVl/OZCiCB1SzzPehp4K65f7a\r\nm2zVR5iGaAx6FJ1MwwNdQeCZV6Fzok4xEpY9BeXdyPzZIYBqj2/7kdFQqP9V\r\nY4bo2HvM9YMUyQ72/5Z/PpT7xyToIcG7dA7oSFUMfd6E7qb7fxSxuFYJ0ptj\r\nhW3RAzjxevFOBN35KlNoOVPVkGHAEQ6Jq5h/juo6aTAcOSAdU1vLCHk7f4wJ\r\n/EwrYip2sfSjEcOddEY/AjFQECKBHg7Tqe95kIibfQOXeU0qRQd9Jv/FwycR\r\nnnQfUeClsLSb5HENQpMfVJ6STGaFX3yYkM6lMtJdL1I7iVD7tdR9jThzlZLu\r\nXuu7be3mJGVrt3R2OO/2JKlcNCeNTuNmqnEm853i0dlmiWqj5zhUrx0qLA33\r\n7ymwOc5S/lFFYvJctCavwLrXUS2sS37FYFi9m82j+I1Q7YpkobafSsguGNP/\r\nrkILwoYX2ipYha2+xq95EsBR+UobTWfjtZAbrpiBy9gpRQJB+LcpT5wfhCBf\r\nNUkh45fUmd5m8eFaa1QdyHfKmzW60o1GQomAkrA41EzAOk56iAqgUe6+zx9c\r\nBm0p0Nf9NHjyoQsyXLC7EOXWQ4x31I/HBug3BjvubMEqOoLnNjJNN2p8312Q\r\nTkAL43Okx4fhHQB/FajaayMtWRxEueTGp88=\r\n=T0qf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"f27a2e08f222c5ae1ccd80798d3f07c943cfc5bb","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T18:18:08.750Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.19","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.62-renovate-jest-monorepo-f27a2e08f222c5ae1ccd80798d3f07c943cfc5bb_1662834079596_0.11869606566813351","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.62":{"name":"@balena/jellyfish-client-sdk","version":"13.0.62","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.62","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4e9d4163eb9756d9f9ed19b8dd7e85fd802871f5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.62.tgz","fileCount":31,"integrity":"sha512-AiIz3wCXuKGHVIU4547zr8blvRM7uTkG32q3BrPaWUHP4/EGxRo7fchELYCqWnPQbYvbmvg0Luht8RAU3ukAkg==","signatures":[{"sig":"MEUCIFwqIXbsxXeziCTne8lW0ukexpf+kJ0V7is3KHx9SiZiAiEAmsXXq99Ohdv3NtalZ5QeCOmrfAAqlKQTb4+R5ko341A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHNaMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoewQ/8C6LFVVUTAxkVXkrcEeEECQebKuZQDKzDT23goIJRVsvIG+mL\r\nMM3HbihNejN9UKS6eJbTEKJiqDu/XA8adwuD5YiycbiJSfrr1f2qWtx+UkRB\r\nWGhQF6/P4UsqGFy7y2NZ0bcy2qgtXqdCRgbKNNRqbDRbEosNNChx+qKOPfDR\r\neocSH5jhrWBg24zNx9AD1AuEqmAuWW5gWRj+V+yGJ1QcqscFjbKOf09uzZKZ\r\nZliA6uAOOIMTIiQYWSgeO6HR6gAOjc9a8ITi+vDNjmGWD1esYXAAD7oD4t/M\r\nmuRty7prqjcBhnemW4cax3N7/TimW4OggwMX0ldZm0uDLkTA5TaEtDXpR7Su\r\nTm4lLF2l2OZu/ZEHqd0uqobqMyVPf4j6+yPwd1NH05seOmOW6JPG3PfcPi+d\r\nyH4msOIFcMB2k8jsgOQf1oogDTMoyV9NBo7AFcmZ4BkjBnIAnbuyfjtRQq65\r\ngMVZ1gP21BHWCUcw1TGBJfptf8tHjYIJGQf3fNCtvW8P42SGoC1wUIpaJc0l\r\nHJFesnK3OMLELSMHUfyDxGpegYgJfHk7dp/fIFvoGPWNMdv1IF4RScc++Qea\r\nxXWcFMshzUGK/W0bpe1h92wAzCPFx1v4eKtSfE5Pfxh+b5CZbIxS4UykE8kw\r\n6d07jIhSszokvcqX6Hm0Kw+93OyfhqtKM2I=\r\n=iI+h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ea18d43b40e7f80f2df0afca1d21baac61d6777a","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T18:23:21.457Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.19","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.62_1662834316379_0.42456033755471667","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.63-renovate-autumndb-22-x-d9637627fd8c01162841d2199aaba93718d288f2":{"name":"@balena/jellyfish-client-sdk","version":"13.0.63-renovate-autumndb-22-x-d9637627fd8c01162841d2199aaba93718d288f2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.63-renovate-autumndb-22-x-d9637627fd8c01162841d2199aaba93718d288f2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a2d984f823b39bc8858523b514ae7d438e1aa5df","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.63-renovate-autumndb-22-x-d9637627fd8c01162841d2199aaba93718d288f2.tgz","fileCount":31,"integrity":"sha512-CdDIWeJ0peN4AQ4hM0ltYzvNUtrKM2PzbXp/TNnEUpFa57JjMpFsIzNLSzA2z98q2ja++7791uhNbfGvi4LNhQ==","signatures":[{"sig":"MEUCIG+vmHInRt+Nd1sNlxOH1TvKygPsv9h0iCHnMFX34G18AiEAt7BK2nC00dYgi2briQrx8CTyQuE031yIyrYPW7woH9A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHQK0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAHg//TB1Y8EIOLF2Rp21wdPk6BGBhuvll7QryfR4Dpo+slfqroRT5\r\nOuMMT87okJZmrqVGapfHS0P7AUBKRaAMLGxcUVx6/ezV9tDKNOe4vmMer/4g\r\nxWiff++yQZmKKl6KaBWA3LaZYjcRTbf3s/HPs2csWxCdYcJTqxj749/jDkT2\r\n8LHyySrpQdPhKBLHikcXxMBGIPIjKeg0tuvMz7pvZK4doOJBRMoG26RMx+U9\r\ngLoRd0vvNAztvC1sK/3YyC026g36iSM3joys70gqbVoBYH4WRjLQj3h0L4i5\r\n3UcOnHRK9kgPUG6TeT9fimK/slcwxK54TsCJzW/gZeB0H6+VJxE8bRYBpGT0\r\n7mSzJRudx1cijz1FjJxizDcsjU4xzz1zSEnmmrj4fxaRplac6GXjQ6DeIEF9\r\nIPqe6ULqALL01McLknf4Dl9nX0ClJKcgHlBrTNBD5rF3kz+VMXKIo6oEnycl\r\n9HGKAXss6Bj38hD9ll/UpwYUiW28V9OcLlN5/HADTVcbtyT1EDvSfinrvfFv\r\njiLPgx4OQlbWHyrvkYCqAZNtxd1ftTeNGT4v03RLTke9gsgG1KuTohPbiGPV\r\nDcIc4dWl8D0dfKn7XiP4cDz+Y7vCGJof/GP6eUL8akHCaa0xXj6O6cON7jrj\r\nKg0yiRZtSBzNw1NVMO80XuCUK7vOLaoHEyU=\r\n=O3A6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"d9637627fd8c01162841d2199aaba93718d288f2","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T21:30:18.721Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.22","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.63-renovate-autumndb-22-x-d9637627fd8c01162841d2199aaba93718d288f2_1662845620220_0.03471183457574378","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.63":{"name":"@balena/jellyfish-client-sdk","version":"13.0.63","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.63","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3642299ce10aa2aa04df31ad510f90788c77701b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.63.tgz","fileCount":31,"integrity":"sha512-TLk1ZzZcs/QiSTcFy2A3v8HdgAawvW8XCYgC8j5EjmNNJWgqfiu+Ks1qQRWfM8Q6cq5EmYSFFBKiR5M2Zk34Kw==","signatures":[{"sig":"MEUCIQChy6ohhwcdHcYPPhKA7/6t8XwWUtDfkmYqFCa995VmsAIgc+lNy4yY01QIX8bBD2a+wtGnGC9w2sq5SIu+1JWzSgw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHQOkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1ZA//Q3+Biak4zfEjUubV/qDZvgAjC5ZqWXHqzzvXc1ZwoQX4KUxw\r\np3CcxcRzVqEI+pghgWjkEpf5FF2Eje5XECJvWUYEuXIGWiKmy89W1OEtbRu7\r\n0I6hq6jwSOLFAWNS/bv2vXIg8yQtbqwffEoyNHZh4a1Dam6xtJJHBu9K9/ww\r\nG9AMZeF50zC6jSasAdVmZ0xQU6R4Yixtz6GNDKzZYFxrOC6LuF5VJadvHKIc\r\nBzFrhhZHBv/rCR0EvF0iwRgELvvXqICXrEc6QfwILhbNrqIspFTDsLoXyuOy\r\nyQ7d4ksERwoGv7zhwHgiKlN12qK6l2JOSin6VtfqSqvKaNr+VO1Hop9c1gf5\r\npmYhIvoY+yMj6/mg7E3ujW3i/JM+cgto2k1naX7xdnnY9buKqpTu6JFju5Ze\r\nRWpN2Q8ZJVnIafnQvyLa2n0uFw2ZedPPdmo0RD1P3BQ2G+lmLPblSezX7s4e\r\nC335CUe6eBQzMD+1ZU/WsOscgYusyAt5bh3y8vPjfRCrsV5y0s8b7QoqNEEf\r\n4wNL5e9cvv2QvlzHFd/85PslfqtbHAm4nYN1icRwLkBCisSEELShAQC6VtEv\r\nvYexD3m58zjBIMNcFNIFHZllKg4ELXnXl1CM54ug8D04521olNDbiD1OkmnZ\r\nlmGdS27LjaldH5fb0ilQZdn4ArYSRcXdmwE=\r\n=VD7v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"15cd4dc72e064a49add965c8a567a37968cda55c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-10T21:35:24.382Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.22","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.63_1662845860122_0.031242340747304365","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.64-renovate-autumndb-22-x-ed45168a0f34d78ffbe0617c24242bf18c664b59":{"name":"@balena/jellyfish-client-sdk","version":"13.0.64-renovate-autumndb-22-x-ed45168a0f34d78ffbe0617c24242bf18c664b59","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.64-renovate-autumndb-22-x-ed45168a0f34d78ffbe0617c24242bf18c664b59","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1a61fa03f210e60b92ba872ad98db308deade483","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.64-renovate-autumndb-22-x-ed45168a0f34d78ffbe0617c24242bf18c664b59.tgz","fileCount":31,"integrity":"sha512-S8XWkaWmB8bWc75/Ig9lN7xhRQSZQIBzGGt0eCVYvO9Em7VuRRqpnmw+9vI8dTRtYEesNJqioOCbI08WsaKPQw==","signatures":[{"sig":"MEYCIQCMa+cZuKtcF2R3WyD2lamUabhXg4wG6S7XLTxGK5QWPQIhAOaXOLIFd57HnXGt1lbGU23ixD8fN8tTAIJ9K4DaV1vp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHVPUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqRLQ//YLpKCY4Z0vfAWb+m6hJWU0iMaRXdsmJyOw/g7SeSi6k5HC21\r\n+FknD3qENehXUuglJgVkTVTw46RYx/pPRhVigK50MvLQNsfgctjlNSjPgsiD\r\ntU6fV4qlCchTgarg/iFH/+s4bYCyQkfLgSX3pvil7nNNmKI+vm5/fsCEWBKt\r\n9INZA2Wdkp5baBvErDC2Yiu7jJCsvVG5dtAe4ahutE++h0DH0t+qAGFje068\r\nQi0JPdu4BwRkmlx9y2Ck6Riw8JKU7B5blfLpxg6zD48fixtqj09HwoI8aF9f\r\nn8ibE6+06lCjs+vvNZMnYhZk86xMZOocrljzTD1wUXy4BY5raCLxtFdJU11L\r\nCrQaVDTJgONWRW5cd5/uIW0EiztyABiPFxyN2CheNGJmc9G1OXK4Cg8IkhSY\r\n0EMx0Ui0+QHf/+JlfkkqgHDZ7l5yUsebnHZEY0HoHjPfQ+G0SJpZwJqYQt9e\r\n+S9k8xVhX0i6fsKkM4x8l1zp02lrNceIZZKk3qLOj6gk2rs6IQhOJmh8xiY1\r\nk5cM9e6XTj0781x7N3ud8KGlOlON6u+XKazxI0U6A7srjbw9gbrrFOqSuw/1\r\n24NLYkC9zfk22qEqT9BgCz67LegoPC/XD8ytMUERnb5o/GybYolp24k9zyQa\r\n9S8TRihxe1nEOsCBFxBsewK7KB4wFxqmPns=\r\n=7A2G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"ed45168a0f34d78ffbe0617c24242bf18c664b59","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T03:16:09.624Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.23","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.64-renovate-autumndb-22-x-ed45168a0f34d78ffbe0617c24242bf18c664b59_1662866387958_0.00325150781031347","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.64":{"name":"@balena/jellyfish-client-sdk","version":"13.0.64","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.64","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bc2242b5fa687c47f164e14b00566e6e88d5803f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.64.tgz","fileCount":31,"integrity":"sha512-u3uqJydf4Kt6nqaf2yDsGHkBPDgLw8EMGw7EgNiMjf7qhNqVE1f0pd8xVaWIYPCg88FcXte5RgpaT5+caQxBYA==","signatures":[{"sig":"MEUCIQDQoIrhE9PGrnZ4Md2qcLeGHZzxXtDw5yr+IU294ZC6jgIgRHXkPUmQdAiQTrotzixwbmcH+nxENxQNITYG/5UO+8o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHVVQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobhxAAirp0OIrzVNERlz9kWtVGbnr32OogTtoE1ZIAVyV+upPStWgO\r\nwxJwXHi6ukzyfNIRp7d4PV2ENawx6ZKpu1zCVi2eY0WVMdiCEXO2Sv0eoJg0\r\nPjg693YGpEBUREnaMSc9gWJBwhYHGpVmrN9ngEr2MLkdTVwjuWgMfxD8EXn7\r\nM7W+lQ1FJjgkPy2glyYckax8o0q+fS2vwgxo1LTir0xUVsFqXbsfuh9GJDOx\r\nzNjtDbyc5+zkHbGClMATTTw7XkXUr8sCp+JST/qrqBiNOrm1XvX0+6axytr8\r\nxAqFdI82UAipJNmxcpCmICFoHGYS3EmERiGKsDNwb3JWD+pCpZnyQ7k7un9B\r\nBg+zmSmeKGcpbcnmXqJeWTDPBp9tJEUxqJxuvrFL0CieNTcOp+UvuG+8xZkD\r\nm+UsRqGsSL1xJ8/kFX7sl2/XUZePFdJ5WMstiJhlj5ZOGpdzcr6OrtnKAbDl\r\ncEOE+qaNOvqB9eyuZGtj+Coclerjs7oXtNu41j7ZbT/879ADuejQ3jIJ1Oy5\r\ncHzCfKTjYVqs6YqNFxdVUx4a1nSyil29LFpiJMOy832K2M1OaQLYOC1/AizA\r\nSPqjR7wCKyVKlADtRZhAlFRJwq94L328xj6CgyPDVTdwmFLY+ZqDl+r5gd4x\r\njse0WNpTuRu6uaE0lExW3wNgeIKYF/ObNNM=\r\n=L7YO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6d8c407d5ed19b4ec7fb5e621b75cdcfc0ef71a0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T03:22:31.844Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.23","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.64_1662866768540_0.4561032154434217","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.64-renovate-autumndb-22-x-013ce55c9ee87a6d2a93861cdff27bfbe0d62442":{"name":"@balena/jellyfish-client-sdk","version":"13.0.64-renovate-autumndb-22-x-013ce55c9ee87a6d2a93861cdff27bfbe0d62442","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.64-renovate-autumndb-22-x-013ce55c9ee87a6d2a93861cdff27bfbe0d62442","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cc8927f059d768d78fab16acc7b53a293d2a3f27","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.64-renovate-autumndb-22-x-013ce55c9ee87a6d2a93861cdff27bfbe0d62442.tgz","fileCount":31,"integrity":"sha512-6JWo3xJYOh+fX0PpGAC4gHyLRc90JgtNsNAiD0Crp7sNep8uMj9s7Ejv4vKXSQLakpsPP1uPsOb7NLxlIDLv9A==","signatures":[{"sig":"MEQCIEpiXQejOGiqOcR6mN9FEhA3ubplFXH4PL4DnHJVcShrAiAedO5iwKbZu2bYr5NoVjcTOyvNRY9kTB2DSycVEqkl0Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHVYWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq5Vg/+NyCmhzW6PFe+E104NYJUNh/aq+xCW3dc019A9wmSZfPGQNsz\r\nvSNY9ZLWY9vioaelwrVO0yiw3hufULZeHodR3ALz3JIYFybLH5wSUaBhGhyS\r\na6CBjLbH+ivxjuPMI4e4L1LjMQZc40LSIFcNr785ARMn9oPe0ltvY75vSGS7\r\ntBBDOzH912hlUmBaL3bkY5U7x7T2BJpMUyabQpD4AxrerIUbQ873xrD/9Kv8\r\nJL6iHw3qzMNQwplVSXHqV03F/T8qX3Q1z66KHjt2xlOqMiv1MpBHLQl5L2CE\r\nbSyQTvAH+FRBNP8hNH50oP5FrmjuKJnBUtK1t+HdriVq0xA63UWRhIysB8ML\r\n7MLhWVpotVxQn4DhgwNpGGbUYqLYdk+SaJFsnvLhrnUr1FCeezGNVmWt+tqb\r\nF0HamTn7hfsTIdJPWl8yLXbBXxioDT2lJWZOn9xW69FRSn/ECqdXZwol9quE\r\nFbYNGP83u+xbxkW4tDnRvMvo7vof7sLv7kzCMNHQ2JKIESUdbIXc0QdjwXsk\r\njyzICHOPXGKCbbrP/0Q4IoUizgEhRaiSg2Or6vK6AsZJsYJhx7zehGqcCOW4\r\nGxS+FDL5SMqnKTMdTxBjtSHjyfFHsb56t7NAk317NQnUsUMcEIbjlworemmb\r\nNLL6MSTZR0iHDdxaV4RYmsXwFpqkzaaSGfM=\r\n=ipmA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"013ce55c9ee87a6d2a93861cdff27bfbe0d62442","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T03:24:18.317Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.24","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.64-renovate-autumndb-22-x-013ce55c9ee87a6d2a93861cdff27bfbe0d62442_1662866965944_0.08803327033618413","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.65-renovate-autumndb-22-x-b6ee2264a99434aaa2db7ca8534b904446f484f5":{"name":"@balena/jellyfish-client-sdk","version":"13.0.65-renovate-autumndb-22-x-b6ee2264a99434aaa2db7ca8534b904446f484f5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.65-renovate-autumndb-22-x-b6ee2264a99434aaa2db7ca8534b904446f484f5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1d5099fab54bb9d36d796b7c77385eab9bf1be65","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.65-renovate-autumndb-22-x-b6ee2264a99434aaa2db7ca8534b904446f484f5.tgz","fileCount":31,"integrity":"sha512-gzwchb9ER2tsb8r8t2CvuVpwfS8SWHCK2xOfFFoZKenOly7QBEYLr0Hqo7qOWR1dz19R39jhumKcGrjOTZ1/YA==","signatures":[{"sig":"MEUCIEI2k78qqGPj/vouI//g9NFbOXfMIeju8ydW/ti8W9rsAiEApusR9r9+JV0db9eK0WDN99AmXuBRlJdIb5aGPXTFFrs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHVaLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZixAAl09Qq5aCK39E+xVnp3bhqTQF/C47IqoEgXiQEzvXJDMtU5mS\r\nSN/RrWqDSLEI6K4PKkjUT5p58VqzmKKxkEAzPxd+6SW5R/qmH+RRJrqM4aZA\r\nbMhCJM4i4OOdY54JD0joqcijiqtJ9DihcMS5bK0lFSfD/EaRBJBjHR2lMKW+\r\nOSF+aashrPl1SH4T1Pjeg5wh+pmLBlg7JrKUBhB7JZKX6L1JbUNP84bKSJQU\r\nDs226zHp2JDMAGC36ajQ9BKIY1jyAgtKH2U4nZShBFvFZuQlZ4VDXNmfOMNN\r\ndB5E3NbvGlRHxAjlcUbXGfEQIiqYXikNGQcI/L6K0dF+/KuuxnZyV2ENDqP1\r\n3IwO6u3RbaS+QIiDNKjtbjSGg9YBH+S2gsFWdopukfkolKqsFbgb/ZEOsYxB\r\nlvR3NuJyMCVZKh0CusHOa/QK81od+TpN13BgtT1x2PVTE7KX46DuLuwV0qfi\r\nuEXXShtp1eyV2r6xhbi/YNv0vkNP3G7Prw1cyjak1J8OY6VttqvWey4GyQK6\r\nxMxHJYT/cVKon4sljJ0jnukwiUchqN62f1CGNnqTnLLCbCpaCXIii2jmzIlB\r\nRcfmmZFcrXclCNLbGkfDyf232vKgbPN2w0n3EtVSO8o2jwSVtVmu3cD20I3h\r\nqrcXIepIyxNyHrPZ5eJzO96zlE/4BdR30YE=\r\n=YsIo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b6ee2264a99434aaa2db7ca8534b904446f484f5","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T03:28:51.803Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.24","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.65-renovate-autumndb-22-x-b6ee2264a99434aaa2db7ca8534b904446f484f5_1662867083514_0.05152380284624147","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.65":{"name":"@balena/jellyfish-client-sdk","version":"13.0.65","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.65","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fcd6ea6e064177ae982224f1b6485d06800f75ac","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.65.tgz","fileCount":31,"integrity":"sha512-v4hf74u1JTcZbQauYelz8s1L159TWLabE970o/KzVHUODeNyEPnzcmjxO//dibBH06tp+Am0E17yOhXfc7CalQ==","signatures":[{"sig":"MEYCIQCJ6p2HKRhnAd/mISabxa2hM6CQm7bMIsS56WtO58hF2QIhAJD9g3DN5ZvcNHfDfb9zOL8wJt0ON5UZVr+YzNLJTlxV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHVd1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqi+w/+Jd2YJOxpXpuO98arq+dsNfDZBFksPXXv7AhqsTRgpRY//Cey\r\nHAgXWXr48Sjl8CDzxLvBQ/8tGozgEi1daOEHDW7IFrRa9ayKrUDpv9gb+HPQ\r\n+QYPMwICv3BkXpjZJECPlSJ0bGQmMz93pvwXFSEEkqKlFU4zZbPlYZzSIJJk\r\ntjTIq9zTEtDWBORh87w2ihZJbpH9yqbTHqZKWQtkGnIX7JknCxths165qTN0\r\nR46dEhdSryiO3V8oh0As910rP1rscyP7UTvJ6wdOWTZaPjbDVzqbyMEix4j4\r\nOmXN1D1ZPciZQBhN2wWQWOsSUIZa6tj/I9MlG8Hfq2eUR6gJZK+VHrMKtOGi\r\nMLa9nJEYuZ+kdrred3IVfw9qOLqgn92SQUxUkQymutMCd4yj057FI2EpK/90\r\n4C3408iPbXEnLM4UioczGnSaeSOykD2WU7pf8YosTrpDmF00GkTeQDFrldRl\r\nygDUrc1QonZRh7XiTRmSZuM01AupsOZaCozVVaLWcjumF/86r3Q464libN2L\r\nx2m19gIhO61uVf1iQjJUmgJZDSxy5pWwusK1M7CYwuABilsWlPGQ0DTnLWEu\r\nV14DcqTuZ6ADa+TxyQLK9eV/Vzi2aV4zAfmRsb7BNmJqn2aHJaiKjzDuuSeW\r\nxl4wFoF8/PbB8MxqC0rhLa+F40YqzBdV+6c=\r\n=ECuz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"26b64f011f8b48f5041cb4cc76beec7a006d6922","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T03:32:46.234Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.24","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.65_1662867317238_0.28241050283194946","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.66-renovate-autumndb-22-x-6b23ac3f570fc99ae096113903ac8e2b6faa04f0":{"name":"@balena/jellyfish-client-sdk","version":"13.0.66-renovate-autumndb-22-x-6b23ac3f570fc99ae096113903ac8e2b6faa04f0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.66-renovate-autumndb-22-x-6b23ac3f570fc99ae096113903ac8e2b6faa04f0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"786d196fd9994246ddf7f808ddcb069ee2908594","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.66-renovate-autumndb-22-x-6b23ac3f570fc99ae096113903ac8e2b6faa04f0.tgz","fileCount":31,"integrity":"sha512-Z+TBxAE3JRm1R0/KX/jTUQhU+R97TpvxHH2MtG2P9j+yhak7ljEV5bGBn1kDZj5e/w7zB39nnPQtAx7I4Yty4w==","signatures":[{"sig":"MEQCIF9xgZ1oq1YtoPX3mhQ+pYauNuEQysOjpwJ3/o/TWgQpAiB/vjLGg9ED6QDCrSH8d3cqlZNtK5id8TVVW1uB866kfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHX6OACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmphAAlb6AHieIP2Y05EJOO8PZRqrTtv870lBo5Me7/qn7MGM8ewo7\r\n5wdMOCc8dIGhpF95ogvHUN02iU6lWJvZUEPsCG7MMPNrkyMmRnlr//TEehrt\r\n7kuTjXO9Sv2gSZjTTt2bss5bK7E/jdXyiszXfwk5/Dd6PDA1AJE+sIb4CFR5\r\n8cfVXDatrJigMPCJToziauDZm/O6MAiBs9zORB1DTw4f+vRgDQ/0huSo0ni3\r\nIqua9AZUU7Ry2JWF8mDGj8A/I6qzGWeViE3p3QRQDGa8NZSjIFgYUGKtSMrN\r\nRW3xWFFyEq2DExV+w3YcL3d2CTAnlhebmDZaMDulmnh/G2ywb4FdTlD0WFZS\r\nH2YfZPsMdpWTcrVmBwpTW+8IViGEjRhfEzm4DemBi5O3A9X0UiNercHNcirT\r\nNgef7kfBR6pHL8XF7oAz6eu016t5QMifkp3eVfhAoGw8gnCVxr8sbuRb2OhR\r\nr5DFI6Sp6/VaKA53mEoQjNAyR6zVIn5aH0w3sx5sB26fDw7CqlRI0pMDJbGb\r\nLTpc5oRa0nxs8ofMjvoZ2cBobwnwJNfe0CXDTa0uD8sCct5bSlx0jAfNBwfJ\r\ne0MbKqpFcOPGGw2k1/X6P9WedqZzW9ko0QvKXglDfywuIp5lAGVhI81i1W6J\r\nSPUtgNBX4W/iwRZcQURf5bn0+VnBlByWSLs=\r\n=F9Av\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"6b23ac3f570fc99ae096113903ac8e2b6faa04f0","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T06:17:32.629Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.25","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.66-renovate-autumndb-22-x-6b23ac3f570fc99ae096113903ac8e2b6faa04f0_1662877326467_0.5859662452748753","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.66":{"name":"@balena/jellyfish-client-sdk","version":"13.0.66","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.66","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dc25a465a29830e9a7bbe0dec4722d70afc673b7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.66.tgz","fileCount":31,"integrity":"sha512-wUYR9+P+rKJwMxwxHvVwjzxaXspAbByA7B7QrEYSo7FSaRsnr19EU0edcpRkYQQF3RSwzG3Ls3UY3U/gSrWQoA==","signatures":[{"sig":"MEUCIQCU9ZjLL6d3ESxZnUAnU+mBZHFs7AtoIA6qiH/9h3UVWQIgSV7MrtJxmnEztTitF6nMSZznajQ88H56njxbO+qo440=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHX9cACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqddhAAk8GM1Eg39CjzhD3JY+LLF0kg5Hco5cCem2bIVFxrOe9OYxEA\r\nnaXM/ipNZud8xIR48O03cYCLc5JS9Xbt7QnH+QSu8wq1UQzm05r68U4gqFGp\r\nmoT/AEu++Qyjf+xXdyedu4hWh/tcDR8mPRTeMxwILJxgZY6+4ke44+rT1Knb\r\nmki7hUqcF9rLwN2AWHWmV9lQ2w5wpUa9bazxJkgZyNm4LPxyi2ha7qakNFGC\r\nJzeZZVNSldFTZ75hm53xutZjsQUsN/vBvARBUSgELIC1TcUTi3wmTI3bdTby\r\nb4/EnWoTNIvLf012ZUkchmhojBBHI15tLysbVLZsXt949e03hCIKYQ8BbZdx\r\n78TDIihL5XwQhYAdGW/R+Z9n3oawRAuB5L4b9nAtyzZQtZ9S0pjvoagKULXI\r\nLuwIYGh82jpnhzNEIwPrQACpap5IBfvRu0BkPI3teNj9sf+zdCknvrXVmtiJ\r\nZ4REN22RN6T5An9A79DFhdPYGqeM0UXNkpkVguNMm04CJmlpCTkkdXXPxldz\r\npKlKGzxbYjS/JCxQhM7IcfW2ZTmPpa5x6ElGSdpkulIYLtm6PciK6m63bd85\r\ntK6C6vYC7+3WGlx3mrYSPGYDO6StgH2H1tAPAhYIeVubPVyoIYnRiuqlj8PX\r\n5Fo5VqLdJcmnQTTn/5/nJatDq9m+4zGJX4I=\r\n=i+kZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3d4c82dc1fab52a6f91bf56681a90292a19e6f3c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T06:23:27.680Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.25","typescript":"^4.8.3","@types/jest":"^29.0.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.66_1662877532255_0.2886948433310159","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.67-renovate-jest-monorepo-3167e2b430449da1740b75c84144a73ed0653ac1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.67-renovate-jest-monorepo-3167e2b430449da1740b75c84144a73ed0653ac1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.67-renovate-jest-monorepo-3167e2b430449da1740b75c84144a73ed0653ac1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"93370b344aac14149a41fa764ad39caff280fc3c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.67-renovate-jest-monorepo-3167e2b430449da1740b75c84144a73ed0653ac1.tgz","fileCount":31,"integrity":"sha512-XCfeIb7FEQNYEtgXovXukbzgnP9lL/uv+HDCvVT1zfVGNNLmPd3WN52TKYUcewsxLGKLAxPfr1Vv3Shh9+lyug==","signatures":[{"sig":"MEYCIQCbaXDy+dz6tQ0V71U7qvZGUC+uDq3iDVP3U97H1f2hPwIhALTdawRPaMSPboIbhm5XSz2xXomOUl85q+b1nx0TzQcT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHcsiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp29g/+OrDwlZXMd1+XmwWgZ0HbJepFgDi5E/QnyjHREf7cNOHv54bH\r\nNMG3S0bC0rU+6M0hmrnKL4NgsLrpqGs1ZsUdLkdOvLi70/PncxsOtX6me14R\r\nHkNP/ZXb1Tt0TJLLWpyG8WtCWdZA7CpVKZGcC10WiF4CkmmKQ+ssEq26zYrL\r\n7cBHratNk4/fZm8gDjLBdEOI4QQplpTwhaKJRdtxUHei+2z06QU35hjeu71J\r\nex5gaKcI5pu0fBYIYqRf0G6R1ZGBdyoernjiF7bRQZAXBW6EeYA3S+V0nct6\r\ntVRCJ8ymu7fXTT5TYkF/1YlcmwRruPsSgVU8URGUS3zoJtYrqD9fs1Q6jLZy\r\n69KtK6oJLd3606+NoRFhORSmrhcORcgLBNO2SuICaof9ppD58tWD15NybZci\r\nvRmuHlNdRPiOYwkhBLRj6/WNcueIm/GDIr7mEhWqO4HjABz9g1z9RqtnrbqP\r\n/Uaib3U2Pb9/KIWBdH1A9TcIKUJV05SdGQiq3EBMlb5VxhP2PS3W5b7/R1n1\r\n6U5Uvz0muz0AR/ru/mOVtoO3ksN47vb1H7DOk2TRqzu7HerzqXYdtBAJZgOI\r\nM0bsTLi0OYrGNYWV/y54mPQin45nIRl3TKiYGC2u6vRpaczttqmfKGLIIvyh\r\nPIWkLkmLIvwcV6EmWZdRS0WhldAp0txTZnw=\r\n=U72f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3167e2b430449da1740b75c84144a73ed0653ac1","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T11:45:55.869Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.25","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.67-renovate-jest-monorepo-3167e2b430449da1740b75c84144a73ed0653ac1_1662896930281_0.5928835680583084","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.67":{"name":"@balena/jellyfish-client-sdk","version":"13.0.67","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.67","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1b8e20b626f30c583e557ce2cb603d9a396dd504","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.67.tgz","fileCount":31,"integrity":"sha512-CQ/ZRISQCwYmqAbxVs5KKT0bsyswkKXJCFI5+FqkaZ6QyCOPIdsuiclmQYHkQSVd/xqnVO0Da6BiFEodVJTN+w==","signatures":[{"sig":"MEYCIQDF+2Wm5E+jluoB8Q7b3x22sx+V/+l2Q9vGFFhr1P3i2AIhAI2cnNAtcIwU+2NfKpljNlA9QwOwuZ3aPVAN/tVIH9LE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHcwEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrs4Q//YMavzoX4FdeAES/llpH9pVYeHoqm6MEUODKgp8rclr8n/yxF\r\nFqRXzBC93M7O4VBqS0MQp6GXwdOe4HFSiiPSYtVKQTkNBfHVrcwj6/KGpqFF\r\ngicNPrTlnY8pbhCc/Vy8FAXD8jYW7TeHUczIWsSpwINDi0tbUEjwps76ITVD\r\n6MbDRLdseeaiR6xxdpCstmb3Bh9IcF6PfOKJXehIuMylDw/tHD+FVQbSi8d2\r\nrN9ShxA7Bg/17SbWkXbTEqsMnAeIdQ23cyinOw6G5gMXAydtKJ9m/irYmA1R\r\nFSLZZTV0NYblj6m7UtYHoZSlz6sEL3bceA/bdeALbQko4O1fYTbl3RhAcQg9\r\nxgL/JSZJ/X69p1H8QxbzRWuzMBaz+amcV4lcRpe69VuipbtqW13xg2NR2lH+\r\ndKK7Y58JBfPcl3wQpkNVwX8QBvj68zPvSt6N5I6zG3XRwCiAkZU0PEH9+M0r\r\nbwIw+ZNWu7Jgj7I1/PYgsvCTMVwKEYqPq5lhf+WNplhdFSAzxWiv7bF+8f2t\r\nGqIXrd25uwzts5cPElLefy87J/va55DY9AQUgjOwBUCmMhX0RFn6tBgX65/t\r\nMo7d+I0+3AokRd/issynUDj/TwkW3HBNJ+QsqnJzQ8eYKy2x5tx5eg5qlo3b\r\nGwN5DbX2nU6gwi1QAYH6edOQa7cnPqZLwtg=\r\n=Kvt5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7040b7ed9e84aacd74edb9977eca6a58e027df46","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T11:50:34.343Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.25","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.184","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.67_1662897156389_0.051195545100965356","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.68-renovate-lodash-4-x-8df31529e0e1f0cf99c75cc4e55ffac6af61d1da":{"name":"@balena/jellyfish-client-sdk","version":"13.0.68-renovate-lodash-4-x-8df31529e0e1f0cf99c75cc4e55ffac6af61d1da","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.68-renovate-lodash-4-x-8df31529e0e1f0cf99c75cc4e55ffac6af61d1da","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d44adcf61b2db1c59c0089ede1a651265df1c2ab","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.68-renovate-lodash-4-x-8df31529e0e1f0cf99c75cc4e55ffac6af61d1da.tgz","fileCount":31,"integrity":"sha512-PZK3np9AkV+SHNfsj25ZmAwJgoK2waVlWEutumoatn5r+5Zzizlmb3/aIvUVdUyINWWH2LJ5V+/gJPhpWA79lw==","signatures":[{"sig":"MEUCIAgoxyxKq3akQbRhsgo9mc+Tkrm+Cn6H5spawh94mDyIAiEA8uehHyPP9Fk6hTy22Jms1epqpipGk6oWzR3De88Qj9w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHcy0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAOQ/8CyeCmWzlKjtup/D6rEJlDP4qMEWD68macmI4uGEVd1E7EK1L\r\n8jQRpxiElASyY4sVOIDUjMqou11P95nH6/o2mObDS6uHOSoKD3G/J4ghNSqJ\r\nxKgWgQCUqD+iGKm4YY6fGX2x7iqcSF97azN0g6Fe1QWV58IeDqz+qL0e+sU0\r\nUuECxNEHg3+7Q/5bo877Bh+mdFb+VoTqzQRFXN8cxtCgCOTujvsO+y8oedOn\r\n2EZFGdDk8G1DjWFqMBWeR5IjOwyazCoQ43SrZDlGe59PFMtaKUvH4AJp7gl3\r\nUQc0yIAVlO3putrSh0AFtouBUW8CbnQsO98VBmdTm3CL+EjupEhvyZ+62TFx\r\nxRBkTR9zsOuvfkYs/2ETh6gn1xHsniYGl5MKT9npTdgwVfvZeSe+H8CQQNl3\r\niHWFHxMDcMfu8AmsSt3KzY3O40q8vFYkDVgO594CZv7166Lodck4UJLr1VXL\r\nbSHOJwYLhhe3DsA+l4GwRpRyozizG0DKYJhjamlwpZhYg5Fr3k/Lu/eX7mRa\r\nZ8H2DRNJ5F3hhChJgB5nvlQEYI5gxxEAu05HHlL0T8OZIwV29oYZ2Ioom2An\r\nJLAQ/g5OQUrIhvgYhxG6yG8Q+KBgc0ggGFIbIs97mIZ980qLJBFsPsh+sY3S\r\nL6Xhp0uXf0Zc6K23KRxTv1K71+7ISRMlrs0=\r\n=FDEY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"8df31529e0e1f0cf99c75cc4e55ffac6af61d1da","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T11:52:18.419Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.25","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.68-renovate-lodash-4-x-8df31529e0e1f0cf99c75cc4e55ffac6af61d1da_1662897332266_0.4124073180756471","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.68-renovate-autumndb-22-x-beb87e8a3d0285b4fa952232fcd60a9f22526371":{"name":"@balena/jellyfish-client-sdk","version":"13.0.68-renovate-autumndb-22-x-beb87e8a3d0285b4fa952232fcd60a9f22526371","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.68-renovate-autumndb-22-x-beb87e8a3d0285b4fa952232fcd60a9f22526371","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8fe5fd0630dbfaeb5252f1147b40b72716063aa4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.68-renovate-autumndb-22-x-beb87e8a3d0285b4fa952232fcd60a9f22526371.tgz","fileCount":31,"integrity":"sha512-ntKI0YxlF73hON6z68GmD1Lx3Ud20M0WNapjce/5nrG9gbGmw4ryNrROhLlUcvkJGQnViwkQnkP1oV2UJQcG8A==","signatures":[{"sig":"MEUCIAIl3CZfDoaW476f9jZ9OPn1zpYaPFqjVPmY+izoZ9YAAiEAhNLqYhKBfSBWEsIGaHMCkobiMYxP71pynYXz2EuS/P8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHmyZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHTA/+PQ84VPleumWIcguwCcEg+VAgD+Ozj2mFV1GT41AgrUSn0At/\r\nDUWugQDQFWk4JqyFZ4n77Zk55w3QRsQk2A80xBLdEJZbtTSru0mmD/3jAjUS\r\nmNUFYNxWZg6gUHwxnf2kYQ4qu+RV621yn/hclpHysAkmyKYL30YJnFahX7Ev\r\n/BJAub/SSzWPQh5v5kWDMZ0DvpB61twNgo2Xg4d+4gR6tve9L7wNqycBVMIe\r\nwXUSlu7UM0n/Q13eq7oJHaXG3c/Lib4UPD4zcixiFiiq0Nx+Fe1bKZIDcNVK\r\ncs2xosF2zGOtJq3yfLVbtKX88GlWEZ8SMbMLGm9XvnPQY7vRj+Ehr+hoQyqz\r\nn7pJbLk9QddJQOhfg+5THqLycGo5E/SUqyY4aBkZaiPMx9gYDCF0OIqTlP0F\r\nllboy7sXjBV0nXBOhYeR+voyAvkrALdGPqDg7r31MC6qd3lMGcuZtBEpu3U6\r\nvUwyh5x3vd75PkYXoRHevesUBzLY8syGsj7K4SfgZKSeu7GeaX6JTIfTevMG\r\n5lJpR9h45m02/1DCD37nPzw6ZfIJVzzQ42mqiWekl67j5t2xkxIo7iK1dFIY\r\nL2F2KX1udcTKt728N5yCsV11OVCg1Fr1iKNHHQyxLJA4d5IBtOGckAxrYeqX\r\nbxL9rUtj1o5IXHJJXECwOgNwuxggS2Z86QE=\r\n=4UoZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"beb87e8a3d0285b4fa952232fcd60a9f22526371","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T23:13:55.939Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.31","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.68-renovate-autumndb-22-x-beb87e8a3d0285b4fa952232fcd60a9f22526371_1662938265444_0.07008914466907168","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.68":{"name":"@balena/jellyfish-client-sdk","version":"13.0.68","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.68","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f9cbb36aedfc3a8cd0e14280f0067e52df9f1508","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.68.tgz","fileCount":31,"integrity":"sha512-6oBLZ1D8w3Oki1heFd5ODsOw7vtsHTrXt5lwDYyFmowb3NqhrZlRmSUsrztkM/oyjKaqrr0A0zArT9qhM/w8WQ==","signatures":[{"sig":"MEYCIQDZ2S0BXkJ0/YYcfpJK1luX6ay6bJXG1XBtEyfjkKwWmQIhAJONOqnLy3AmHfvDnxNXxYsAZtHJpdNrncUilWgFxwCu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHm2aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIow/9FBXJbdb/lPjGc3GOih5AMES6vz/qHhAcU9AcOf7+7Kgu+pxU\r\n87FLtpcKmEhTbdqegZeGWATPXbosaOhzKCvb2RI4ZMevyTInv94XlHNyc+5M\r\n8bBrAmIdKRBU4wqIE1TAwMcsSCy4ggIYKSVgITO5yb5p9kQcbfNRBZHk+PcJ\r\nLMsbmz4NPhQ7D7AHdD+zdlI76T2V1mSsfUI6iQE7zYmHpBpsIHDJKL7nuMIZ\r\nTMhmIF/YUz1oUGZEMso9FS0b8/t46bIkSmLzg+EDerK+O2W36bws7AZkGYuD\r\nNtpuevpYycVaYvxbN9brDBZh/R1ytDF6nV2n/zErvbX7k1PylSsJtXHbjH/6\r\nJKFs7wBB4KEFnttIiIJmnLA+QDJgOUWpybKN+vN32QEoYDH66sBg1vqE/O6M\r\n/SS397YBxcchPaGoaAwIZQvxvvIm/AyMKXrObYWlO8WxdWaozPX/yu8puv/y\r\nT0jyPCAySVpi+TupM08mFcTUGcS3fMQztaA2pXEqiVDA0kS/DH/jLSZ1GSxx\r\nKv18v8/3jA5H24x5rI3BFI8c1B+Bq2AZW0C9JbWkec4/lBda96/GgLJSu1WK\r\np7HhiRxnruxiJkzMGAW2eaE2Hgy4HV6Nglo8IDgR8IkDVdrSDW8jIQDeG+xt\r\nmqXmhkrW2eJhb5RIoRgksHPZQv9Fm7EYdxw=\r\n=aD8U\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"63b6c228cea09033d84624d8b4df6907f961e620","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-11T23:19:07.046Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.31","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.68_1662938522588_0.5357457694977885","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.69-renovate-autumndb-22-x-7a84d405bc942a9f48e6fe6a585a29b236a55c76":{"name":"@balena/jellyfish-client-sdk","version":"13.0.69-renovate-autumndb-22-x-7a84d405bc942a9f48e6fe6a585a29b236a55c76","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.69-renovate-autumndb-22-x-7a84d405bc942a9f48e6fe6a585a29b236a55c76","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c8c76d14c068b8dee4a6aecd9d6dd82d9820f23d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.69-renovate-autumndb-22-x-7a84d405bc942a9f48e6fe6a585a29b236a55c76.tgz","fileCount":31,"integrity":"sha512-KpkFkxvhKRcNX88LwsUKC84i7zN0isgchunBYat582UxJ9xl+UkRCtZptklV7rB7r9Q39DYNnFaggwGE4bvyBA==","signatures":[{"sig":"MEQCIFEpWrqrmpKP8Dbi579d4xol4Er1g1OaY7inPnWEwlrbAiBkiQ84mDQe+Tyb2EDsK5wwAAM1VZd7a+X1/LX+OtX0BQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHqlsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqbLA/6A3UYZeSbM3BbTp/1hBE6TJgp2TSLp2wuBYGx5+HavAJEVQis\r\nvLhRz6inTrlVNXpbbKLXKFFqDk3vMrBa5V9ql8KKjktSLrCx7q4lNu0Wf5NN\r\nmh5rOHyPjvB8O6zdBWikanH+5a6PD1AvDFbt7yyPUL2E44I0M9GXpm/llZok\r\nuDCTISxAFd+Oha13C3i8VSTvYGzvKL+W7UgotD/N3EHv3KXibWRJ/N6iG0HA\r\n3gskRJ8DdSHUtpaBFVMd0eqdxjIXeneVBqZB+iLQuKn7t+OnrbIajC6WTmo7\r\ng7gv2uPSL74sTTbSJ7gssSdKvgEhxo81fzw9AnVZvdr2O/LFOTouGlE6I61l\r\nTeDqusgAIAbAEtcTcTIjddotMBe6QLjRA7DGGBd3TDHyjQzFzBYs7fYojrVk\r\nAGpZo0uNne9IzdLlFYrPPPJzwgmzcx8sfIltbz5WAmtklKhFqTUlxW8J7ZmX\r\nvMD/wB2Zp7gPuh3/+1eiBs2fjAchUM5gw188E9w7hpnf2pO4CetJGk95h1pj\r\ncXTBmZYgvq0b9hxq+3f2MaLyU253vSd5/MbbnQQYQYg6tM5B0Lsx9kYkpqYD\r\nD7vqfGgq+/UBqaepRICnFq514DehZ5GDNtJ0kVxZDUb+QznTnkFvXpi+NrWW\r\nMyQ8ZENxu2wdOwjpdr5AKcbdaDQjQIFwvOU=\r\n=ZDg1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"7a84d405bc942a9f48e6fe6a585a29b236a55c76","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-12T03:34:28.618Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.34","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.69-renovate-autumndb-22-x-7a84d405bc942a9f48e6fe6a585a29b236a55c76_1662953836739_0.03529892172990112","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.69":{"name":"@balena/jellyfish-client-sdk","version":"13.0.69","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.69","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f8e2539abc15b5be9272ae265a502695ca572647","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.69.tgz","fileCount":31,"integrity":"sha512-vJ3qaF5g1txgC+nGojBaUCseuDWLrmt1VVbBcsT/cIl3hBq8PpuolbA0vZwVU87glTgBybeSHO5FgmZ57EyKXg==","signatures":[{"sig":"MEUCIB6xbpgewMa6mD7Vo0lGf7FGLR24raWFeYV+eC1KUXC2AiEAyOHaJ/jvGhBVWW1DHfAarFo0X0tsYboJViU0HbpYf7E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHqqpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbZw/+LES1BsB58jASL/nWzM6U/BOwRuBYOIL9kGNoeVAmkZ5utGZD\r\nCoXz6j5XEWkh/gIwdfabqJIhF5E1uqOdwrl7HySTaJjhjaNaF/BI33dpS3MS\r\njxeD5LnQIYfCz4h1lJjGwrbrOPleTFwdLe+RVkHFM0GK6D4LFFV9JWNDnKrJ\r\nMzBLEyGsgSnOlpEynhtYz7yzhV+C6Qu9CiytG3GAydsa4ZpKy+l/4CVL7MAO\r\nrt1eDCtjOvHMgK8+4CtPi2UWJDMJ6dFx7OXwSrFPhsrF4k6UPdJSLSvXH+rm\r\nFrnvAcqyzf2Z68Twzm0cH1Snrw1hw8hW3ksyAZIUk7d1CATbe7cAU5sJ9BHy\r\nFJQTa2p37ySE9fbGrjIDoB9G2vW3+5BgD/cxZkz3W3VYl+EO1xzSulu3QhV8\r\ndJWpdkSUZs1L33321wtKTipM4LXvlXNLcGuFUl3LbTW9DqrmIfvTJpZo8azd\r\nAtjATjGLfufaKvxolxtGI5udcMzj87mcQEJNvFxxNStm2pW5oIyErQ/V2fuT\r\nX8fHLOzQmKKJcLESnlIgwnqHq/jFFLUvezZLL6InSAuOUZaFuMynkymcZiz6\r\nyeSslxRklIw16zaVIc6b5rfGZ6fNYrXlK4b+GtdpvAUhwmE9xFBRRIINtuhj\r\nbowxkHowswyhG+4iIgu7n58kangkyIgOLfU=\r\n=6uE9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"3d3c70c49e5c30d481d1226120ed2255f13a891f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-12T03:39:28.774Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.34","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.69_1662954153481_0.322105909225038","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.70-renovate-autumndb-22-x-b5b292bce318c9a65a390b34dfad55e3f004ed42":{"name":"@balena/jellyfish-client-sdk","version":"13.0.70-renovate-autumndb-22-x-b5b292bce318c9a65a390b34dfad55e3f004ed42","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.70-renovate-autumndb-22-x-b5b292bce318c9a65a390b34dfad55e3f004ed42","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f769d96c1ec68b641e6e6d04420dc5972ce64895","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.70-renovate-autumndb-22-x-b5b292bce318c9a65a390b34dfad55e3f004ed42.tgz","fileCount":31,"integrity":"sha512-FB96hHMWtM/WUcqVUdRXQvZXVbhjsKAY22YdzS/OeBeVNj/B/ivh8xOuklz+fKKc1vo72oCJ/96LgJeyCDx9sA==","signatures":[{"sig":"MEQCIQDvuszHos0G5d3duW+Fs/flYW6WMzRKmUArZRYpB45XiQIfdbSYqMs9gWkq3WXn1jqLRw13RfI9XJHDP44lhmVzxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":219036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHuJjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp2sg/7BeOwmzqSir7UYqKWy3MbdlEsQLuZnNLiyxBvLJXDCb4EirKu\r\nMhGq1gGTHmwLRmeBOtueg32LNWuPTTCNylAQsbx9yGbbnAbw9kwtGfM1fVKe\r\ngi1knefstNILZFNFcwvRlxFa70cag2SvnRWdJUPdB1JLmKe4nxQZk0+Tm+05\r\nBUfS1ZJ3fl+6lmLu/wk2Q1WBMPs63RMQjBmaH5NwVp3e3KcH0Zp6NJERSlPE\r\ne0LHwseo2/ABTgL8ZLdpup+3mE/JRJUxAVN6vZtXAbNmF7ArvDkyYkhQZF7k\r\nTQZFr7q76NgoK768VDgAG6D5CukC1Pra79eybzqJTYeprhYVV0oqfCdx4C+h\r\nB40dpn4O+/wY6IJr8XL6LGrhyxI/zsKELq2yTHawAkAo5FOUP6Ho08bY8ly8\r\nKstM+DHzRH8ETf3+8GKbEEcsBb5LbeoAgEx4yEjiu+Av4p7e6FBbdCGpL/IN\r\nqQhKncP3boBVt/fGa67TDYbdqpysO+nyACQYmoye/MW+I+35e/+g0MNA4pva\r\nMEzqM/4AWs4CHoz9PgtslBWuxhkAgSQCB7Sq27xJKrB1lND+Mu+gj6/GimOy\r\n9webbosYA0YQxwYp6HpVCCMG8A3ofOhKMFFxqaqk9nefT0Y2Ui24I1Zn7cfJ\r\ng85rJGindm+gPr/CeL3pPTTNnbd67UD4wEs=\r\n=a26d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"b5b292bce318c9a65a390b34dfad55e3f004ed42","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-12T07:37:35.797Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.35","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.70-renovate-autumndb-22-x-b5b292bce318c9a65a390b34dfad55e3f004ed42_1662968419339_0.10855465932632336","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.70":{"name":"@balena/jellyfish-client-sdk","version":"13.0.70","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.70","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7029444e4caf1d090b0b6aa9925009f8298d33af","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.70.tgz","fileCount":31,"integrity":"sha512-aeWrNhy8VEA+LUjJ+Rh/DnQaJ7bSkEHyc5zadvyMUQHKQhNOzEJv+ZVpeqgNI7Lm6l1D1x9hlbrBLsBXYKg3Fw==","signatures":[{"sig":"MEUCIQDggbkUz2U8L65rJe2IfhUiBTg5QzobgYcA7X4yhKmf7AIgP+uC8u61S6TV7+w7CHvJGX+ozqURimB1z+lgKTO3avI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":218972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHuMpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolBA//QK2ihPgR7CM4hLBNLoyKxH0oX2RbRRJHPI4HCLtMXaZqCghz\r\nPXisfcqH2fDz4q6cDPL0Z2Xe/bWHsrhbscdyk695Pi1kS56fzNH8oCEYS2pz\r\nBBwcu0ZWC21y9EEmo8uMGFtcc/VnaHC2+1II0y45+/VWlmk6Sv7ltUR3sJKk\r\nxapXFGhE6jZbdM8iOJzkChcrfKGgm2bOVKP1oddALaOXK30qWNLJXR0BIGaG\r\ngoKeIUpEnnvnAtWtmUKIL0JRmvK8BMsuVUbtyTEPLJVHOQcqky+7UpvL5bLy\r\nUzcNFuHX6NwS7q1QKBvMMIPEnZ0AIo4fum+lRad6iQesIvnKQfwPzjUEPzJZ\r\n/JDlK8zsy97bo4lZTmpVF6Q6HmA11EU+RQJ9dW+EW1ZCO/pnG1FuSc7EqVON\r\nlW316YcVRta8vcOnxeH0+Fmonv3MiKCAUOcjQYKDYl1GBlD0OI9Po6o66N5y\r\namJ7whiQjOBZMvYLfmTrd6VFBxfNjgilz5JO/DP5Ufn4zZ8+P19WlCkIBHGd\r\nt7T/TSLpr81PGK2WDMMmQA0C3DmOGssda+d8aHYwotikbdSJeqEt07TTqGU4\r\nQmyoG7mlWKwZ86qxYXFG1oHJq48znikFyVLr0dG7lMabOcgrrk6jjAWe0HKL\r\nR7XONmo4fYnyphabppr6rUzse/JbI4DBgb0=\r\n=MjWl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"881f25784502735fbbc6d2ee12899f94209e289c","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-12T07:41:28.860Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.35","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.70_1662968617224_0.06993051955013274","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.71-renovate-autumndb-22-x-daf973423e73db3d556ee6eb4cefee99c550063f":{"name":"@balena/jellyfish-client-sdk","version":"13.0.71-renovate-autumndb-22-x-daf973423e73db3d556ee6eb4cefee99c550063f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.71-renovate-autumndb-22-x-daf973423e73db3d556ee6eb4cefee99c550063f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cfb8fae460ffdb74aeda978eb3614b170b09c1e7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.71-renovate-autumndb-22-x-daf973423e73db3d556ee6eb4cefee99c550063f.tgz","fileCount":31,"integrity":"sha512-ZVQGL7NIMpcmjxejDEStaocMvtbVTg77IKenZVn60Ypn5tGVQ4VPc2pEiClqIQ9pvx5BeFq9mrJmEGcBd5Q/9A==","signatures":[{"sig":"MEUCIQDBawy9pMu6QiZGHn8HGvp+RkLOQu77YvOXBL5hRdlnKAIgUPCR2pjcj1B5/E4De/eRlXSzPI1A4C/NJEoTQzYIesc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":219120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH5nXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpiNw//WwYal9iTwWCZ1pIygrZoWmdxQ6B7EfxLUDjtpl3ycfJ5E4NF\r\nbXz9Gku++coCTeCtVANiBwmWOGImREkc9WYCZe/t7bzcoBohfGsfPWw/fW+1\r\nWmg2jBfoZLKeRQ8pKfJPIiI4cwS4ukTz0Mykulk4KV+uVSgvhzCBlJkkko8c\r\nUqrs+XvQ19IHbQpgl8I/FKsX1qfNIyT9i+SHNavvpsMOcmsfe9YvZOYHOXeC\r\nsiDvttXVyHzh2MSMMpRytRmqH6isXpgxTyg7vhwFM0YeUPlYkf7UiiF4sw04\r\nMMxIB5KWIbrWftq+KnDI475rJlxiDs8PY1L6LUBx6sEVCXrZj04IUpPjNC+j\r\njqjmwoQ4DdAK6ZIfsDdCWc4etuwpHF5ba21mxCcj7DRdH1yLqQMggs7Idwkr\r\nbpy9b4YRPdWg3n9e00SHEx6E83NMzc+ATYjqG9/kWPLarw43LMVjQgReY+mY\r\n3/GXUfY6zCbZuPbc6CMKVRgmLIPon0L9HXBGmpR6YA9d5ZJCiGPljr1NblCD\r\nbdlaSQ7Q3Cx9xFwY/AqLnBxxSYyEZ91UBVp2rY3KQ8m/31TzLwAJDbGk9kB0\r\nFn2Tyk0nKfbpGkG67jqdgkMKYxpXbXH/MegO9Deh8WisaCDrInLkeW/8ueTC\r\npHFMKGuR/jYBtFddDjtkIv1hOpMq6kSz5dY=\r\n=ixcY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"daf973423e73db3d556ee6eb4cefee99c550063f","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-12T20:40:08.652Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.38","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.71-renovate-autumndb-22-x-daf973423e73db3d556ee6eb4cefee99c550063f_1663015383530_0.5004269820277181","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.71":{"name":"@balena/jellyfish-client-sdk","version":"13.0.71","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.71","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"67b8884da089eef58df7bc58b4a37eb0a69a9165","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.71.tgz","fileCount":31,"integrity":"sha512-R9Kji8LY6QYMcrOBk9mYdWS/xlPwK1h5DgO8UB1384SpyS2obVHtXvZRxJYk/O3TVM+C88kA1Pz8GKqDHZT+wQ==","signatures":[{"sig":"MEUCIQCFQTExA5rNLBFbcreVxBWE3izawhTOe9o16eycxwXmdQIgPysHc80URejp/QA9oXxSt/WkIFazILSUx0vz01Tximo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":219056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH5rRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRhhAAi3j+37gs6GY3ET4qGi18KR0sgdTR0g6QlM/6OKPWKDPu9a4N\r\nl37KIrZDEJIf/BWpwv5134126LB1+cOymgQqG2Lxs5MP0wbac4LEY+PmDG1H\r\nlnL3Y1giGAdVdKbCHDHt4ii0eT0v11PEdJGkSAEMJr1Glkmdxy3X54d5QVbm\r\ndKzR9cohaXAoIsxzcC+CvWOOBRR9JurnOrDYaheihwzmiXiEIBGpwGvDh3F/\r\n6Z25bAt+mz4c6pa4UNwMdUm1iewKMxn5s34V1YHoQrmQZ2fkO3qIO25QEKfA\r\nRtSrbgZViNQKYhU1MIPV9f10v72omsOVpQrN6qDf+8wQAy78Pi9vrutSV+Po\r\ntKaDpwg5uroFmUbgiH0BB0kxGttdNRBbCyGg4m57klvDEXaZ8rO5gp63aroz\r\nl6vx3EGqZ6FDkbQ955XMzVxp/HBPNB1IJTQ3mNt6Ykyq/IqB3S+kjsbqXfS8\r\nF211sDFA5q+NUorZNeBtQXa7Xv3oLII4c5ovpriU9nUtUof2ue+xFpc8gegA\r\nPkXXSYjgny/s3bTXM6nX3nWDjX3uuzVPr/eUqlMXmaYUXSPhln5x7L9xAoym\r\nb1x4LYGipqvxROlm6v2RjHuxAnRkpjsvj9MZOTOkrSwpyV9X4cTibnul30Ih\r\nfrM/Wy4G2znE8NuYMqFSL3kFAVIlbfmNqqI=\r\n=sJSL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=12.15.0"},"gitHead":"2983ce4786f6c9feb3786274bb90df5166b43226","scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-12T20:44:53.623Z"},"_npmVersion":"6.14.17","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"14.19.3","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.38","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.71_1663015633684_0.48034364669005747","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.72-joshbwlng-flowzone-1f26eec5baaad3f7803138cff123931102f837e9":{"name":"@balena/jellyfish-client-sdk","version":"13.0.72-joshbwlng-flowzone-1f26eec5baaad3f7803138cff123931102f837e9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.72-joshbwlng-flowzone-1f26eec5baaad3f7803138cff123931102f837e9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2aae41b086aef87bf5bf5b3827babec6fe3a1ecd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.72-joshbwlng-flowzone-1f26eec5baaad3f7803138cff123931102f837e9.tgz","fileCount":32,"integrity":"sha512-HhfTgUU4NGBMwDmXlP4MolpYn6uDJOes/s+0eNNt5c60vw1SS+PVZBGETWSjyXM2jkiYcl0xdFMers1VtWRttQ==","signatures":[{"sig":"MEQCIHX7lWkGP3CeJX40Lox6lZZsDhAn1EzbgOIADjLuONomAiAUck+kfbEuaXx3x8DYLKgtnVub2DsdBDu5MHnWTJW0+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH/LBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoY0A/+KLSMqpjo9l77+PJcMWS8xXIBUXDhGwoP4t+sSrIrfkZFFhMa\r\nu0GP1J5EENhuC5M/8vMP+NEuGXKL37fxbINuaDLEF9Ogwdu98FYa3uwsz+U4\r\nl4oIrWJj+XUOxXGNSbsSJ1af3psrs5dJJAAtWYiOJMHIqF78IevKh9JqbNat\r\njZA8y68NCS/1zSi8C5p1yD+NkBwpWcv/4DEMI7gnPCQhx9M6/6ELPm5EF/SW\r\nw0+HcmA93UOr7KZXlWmJ2q5WafMJybbPTQS/EORalpYZbdN7Ao+OxzBcCEN6\r\n1OsyIBNlxb62RRQavehIELys4Q8dR/SOSGjidGWazPiH4QydFhpoAoZAjEb5\r\nByfoxMbH3gwdD+o1tS1RO8GwNr+hOfMC22/23RHueIdVF6Chi/oyBhf7gfdm\r\n7V8FZJv3524XCWNBurnY9P5zz4AJjGp5D+m8YxXF/J1Jjjxo16pBiAygbqAK\r\nzNHKktE4dW9u2EFfZ0GaFzafV9Y9buosMGZULiQfGphcnftHLfcT04duxuls\r\nPbltzWyyn/zARGFxL3rqpj9sNLEi4qNzgrp4fLDrWKQGJU3q7k+FDcvcdceX\r\nm6hE1XRcjoi0WoOE6ga1KgddBguzVvbtpM5wOukxoGfqBCUU8ab86nEzjWTO\r\nCVm8huCRbbE76ndIXwmCFEa5h3F7qi+TtdI=\r\n=Qo8M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-1f26eec5baaad3f7803138cff123931102f837e9-16.x/balena-jellyfish-client-sdk-13.0.72.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-1f26eec5baaad3f7803138cff123931102f837e9-16.x/balena-jellyfish-client-sdk-13.0.72.tgz","_integrity":"sha512-HhfTgUU4NGBMwDmXlP4MolpYn6uDJOes/s+0eNNt5c60vw1SS+PVZBGETWSjyXM2jkiYcl0xdFMers1VtWRttQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-13T02:58:36.149Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.38","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.72-joshbwlng-flowzone-1f26eec5baaad3f7803138cff123931102f837e9_1663038145642_0.5532482953386004","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.72":{"name":"@balena/jellyfish-client-sdk","version":"13.0.72","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.72","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f6d45a51d4e752fe330a696a478fb8dc47464cef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.72.tgz","fileCount":30,"integrity":"sha512-3hjtriJWtfG2cSLlXAcr/GV0O2cc4UKOx+TOPyCZVaCQvDeWABabkciPcGBQwc2YuHJZffKmu5NYPl9yodDcVw==","signatures":[{"sig":"MEYCIQCMMSlgVXu68ej/DLnZ8Td0vuevsJ0AZPp4/VEPw6FtXwIhALFLDPPV+VOAKP48BeNZ5lrmoVWM7BZSN/YZwknilZ9z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH/NtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1Mw//YgchUtdb6xIS17UHfrdq0TWsjsRrFiXalPJm82HcMowan+jC\r\nUdYpapDKasQca7NVVvzMh2b/fdVGhAvHPIhp/qpPGOue67W0tqZpk7N6QFAa\r\n5Aei+YygaG93eTw4nFpGAhW/UvOuyb6vWJQWQCjEBBLgUGolTtArz5e4Q7hm\r\nJCogeWDdcuusDdtTzhKeMQPXwzntXP/OE5T0IdrHCB5BFKEHINXvEBQYDIDZ\r\nJhD/2/ynGvQK7uZbcWusSDQxtLO8K1sA/+ZOr5zlDAjlgiiYIJzoULhiQl2z\r\ndD3VvpwTV4hVxBG2miMDxTybHq7Fv/uFb/8A9RI6vqI/Ryrr1f+OpUwh/Moo\r\naRahOK2D6cGX3ANK5bsowaeWu4Ci9Np5wHhNzpCWZFk473wDWYRyKS8AUdK4\r\nV9oorikMAoW/WGNLVwMPfd4ICg1SoNSyblI/BQux9idSnNwkhPh/iWQOmxzi\r\n/gYoce66UFsp1x7NPGewzW8rO97KzBDwKOabN3P16nybA4ONS/lrS5ZmTBXg\r\nuYnrwlSCu4wLqBVu6DPkHqeyq487Ow38NJXcTFcAa2LHfH/xTHZqg2xfJAMo\r\nJdjTIH7cTIacjBSTc3TwxwczeV0MsB8OeN/rRMNIw+1gp/Y6JKNAkoVmP0L+\r\nsE3P/Pdau7PqnHYA0oqnZ+9mMlRyefrzyuo=\r\n=bw6J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-1f26eec5baaad3f7803138cff123931102f837e9-16.x/balena-jellyfish-client-sdk-13.0.72.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-1f26eec5baaad3f7803138cff123931102f837e9-16.x/balena-jellyfish-client-sdk-13.0.72.tgz","_integrity":"sha512-3hjtriJWtfG2cSLlXAcr/GV0O2cc4UKOx+TOPyCZVaCQvDeWABabkciPcGBQwc2YuHJZffKmu5NYPl9yodDcVw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-13T02:58:36.149Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.38","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.72_1663038316997_0.04421660031988739","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.73-renovate-autumndb-22-x-0f8c2dba01e3952d6becd972e3a6df8e1393cc25":{"name":"@balena/jellyfish-client-sdk","version":"13.0.73-renovate-autumndb-22-x-0f8c2dba01e3952d6becd972e3a6df8e1393cc25","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.73-renovate-autumndb-22-x-0f8c2dba01e3952d6becd972e3a6df8e1393cc25","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"48321f90e4485a7151c1c614522a4bc6bb2990d2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.73-renovate-autumndb-22-x-0f8c2dba01e3952d6becd972e3a6df8e1393cc25.tgz","fileCount":32,"integrity":"sha512-pvApzZONfsl/1Fv6V5xJWAgyS1eBWz00Vvher3JY+ScskK6II9l2TCiwSNPL07Udx6ZF0c+xlBw3jrio8HkRqQ==","signatures":[{"sig":"MEUCIQDD/hXgpPWZmtl1F4pH9ivC9+VzuhONfrUP32wwtOXIHwIgdLrD7pvlw8/jO96UswPGTTCSiizRCtR+v5ZIJVcWwlc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIJXXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOUQ/8Dlrww7+dWX9sT5u0UGgWReK+gUEbgFQZ52r0BcC+406Nsdv6\r\nbSTMIaYVVgeZuvBMVQX0VYHbqIHDDd558APpp9PD83PIvahdg6EFlFJVZNh6\r\nGonbuSEEE2epB2FD07ENd1yFH0r8OoX//MKE78z7645Q6fUn7nDFOAo3falU\r\nze3GLdIMqwm3OUD/b1BR4grs55rFF1yVN1DMPOQFaDuCtqanYNtqwf1I1/rf\r\nT8ng0Ij4klCCcAIJl099ZJBCKSQEfUf/iwKCiP/NBmwCDH1DigjXO0XrYcnV\r\nR+rs9OomTWvuvuIe/RaoMB/zekby7nQhW+2k7ZpmqXEoWLzdro3+yzwHVSAA\r\nBjjEek/2RW7KVxOJwFT60TbJ1CH65vTXxdMV7vcKTQdC0coTqL/Hy8C6wThj\r\n9xxirjnWesGMoBy/Sjr732Qn5lRLyRB8s5OinYTKkFs1tGYtys8kd4riUPA9\r\nUqr/wTlwBrF5kO02jNOwJGHnChi+8g0Uv3ZYxIZ+xgb75mOUgIrkSMk+rbMp\r\n2hzbDrvaXANAUl+D3e/6DjuQWDs6chpjjfzuXbq/s8WP37GQOBqQ7G/Lz4vt\r\niDQ2nAW3kCqmivClLMo1y2NLiq+xcPCmji1hxUikFIl+kOyE6Fu+LDQoSwNm\r\nBbOFM5b13TayqnUviSzjKHloyd2tTl18yww=\r\n=i51s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0f8c2dba01e3952d6becd972e3a6df8e1393cc25-16.x/balena-jellyfish-client-sdk-13.0.73.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0f8c2dba01e3952d6becd972e3a6df8e1393cc25-16.x/balena-jellyfish-client-sdk-13.0.73.tgz","_integrity":"sha512-pvApzZONfsl/1Fv6V5xJWAgyS1eBWz00Vvher3JY+ScskK6II9l2TCiwSNPL07Udx6ZF0c+xlBw3jrio8HkRqQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-13T14:36:21.872Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.39","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.73-renovate-autumndb-22-x-0f8c2dba01e3952d6becd972e3a6df8e1393cc25_1663079895611_0.6538649382268891","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.73":{"name":"@balena/jellyfish-client-sdk","version":"13.0.73","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.73","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"41d82e09b37c94ff5fc68fcc6a3f2b2710e51f31","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.73.tgz","fileCount":30,"integrity":"sha512-d4OCH1oQeVvEu3AXskh/VxMhmaWWuuqZNcjFMyt88BavOat4Q0iYTnLFGRgjPJfOYQC6FumKncQYhlCxjuRmJg==","signatures":[{"sig":"MEYCIQDorAHgiUSQL9qD626tRv/EI3M/Xdy5F9MocVWbtUJkLgIhAIquWmd/I1dzhTs4v82TNKCzLeKONZOzBfJjvPbIjVG4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIJZnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3RA/9FbGNj/bAPlWkWG1XiA8YZwNjKQ7muXvZL32xGHE6bCkLoLR6\r\ntiGQimUsn+Z7qWOO05CNcyxuqvvE0r+KKUEpd7HjUROj5YjXhdexgIJtqK+Q\r\nEqB6hkqUmxWEwLccYHcvSDaC+togPjiOryoyZJzzvdP1TsfT+C+z3RiFn10F\r\nSnQoOgKbF8vJsJYwm8lCuQ7hqjMyliUSfHMw1LbyhwKPBbCOhpS3VLAO2Vf/\r\ngLXAB0Z15/wpdrfCtV7klxvTMWplk88LQHwxurZoxZVKbKOliLXJOIF9nRqd\r\nSSR0fo7UIc9cjeFNv1ngug3AowHEfv+ovkQQT/3L4xDFonCu2kTx5e9YowyK\r\ncuyuiJTb+O56c9TaoLeoU1j0TlKFi7OHXoPdiMG3yUlbGYtyuRElNzHAy0jY\r\n5sd8917AO4goZelI9K1YEWxlb3SZCfie9QOJLnBzGUmrNFIs4feT38QHmEIc\r\nuYtheS5LpTV5VVcSHNG1ttAsarIhALr51uz5GkrknAqfZR5ZsVZeVxLTSn6b\r\n3gIAdkZXdiFWmVb+cp/Vccq5rPcNfWiheecqtPg05vBoqQgjS52mmPIUzwJW\r\n+F0c5XSrj5Y+aZRN0x8Y4kkt4Q0WjqfYTANcUk9sY/8t49me7u6cATkWrgbC\r\n4soG+UE6wavk1n7QQbh6DkKOOlf5viKzYvU=\r\n=3Hdy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0f8c2dba01e3952d6becd972e3a6df8e1393cc25-16.x/balena-jellyfish-client-sdk-13.0.73.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0f8c2dba01e3952d6becd972e3a6df8e1393cc25-16.x/balena-jellyfish-client-sdk-13.0.73.tgz","_integrity":"sha512-d4OCH1oQeVvEu3AXskh/VxMhmaWWuuqZNcjFMyt88BavOat4Q0iYTnLFGRgjPJfOYQC6FumKncQYhlCxjuRmJg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-13T14:36:21.872Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.39","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.73_1663080038886_0.511368521190422","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.74-renovate-autumndb-22-x-765e5de29577c426e4bba47cc63449aabf17414c":{"name":"@balena/jellyfish-client-sdk","version":"13.0.74-renovate-autumndb-22-x-765e5de29577c426e4bba47cc63449aabf17414c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.74-renovate-autumndb-22-x-765e5de29577c426e4bba47cc63449aabf17414c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0e8687f3814739cea008c936625072109bc47b36","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.74-renovate-autumndb-22-x-765e5de29577c426e4bba47cc63449aabf17414c.tgz","fileCount":32,"integrity":"sha512-lpEo3jckUbgSwowUhgQYUhNgHgCX6Nk6fB2Bbxo/JOAik9SashNLw8Sp/vbLeE75t+vJCTeZ5vTgex8tJcgUhQ==","signatures":[{"sig":"MEYCIQCdV3L5PJiwWGP1imrlWIYRKno0Cqas7HriK7O/sLkckwIhAI1bo5NxHgKCFr7lZWEov2yK30DT2lKHsb+B/CvD7nGd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIM1/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfcQ/9EX05Wvx1uMUZDFfdgswHdDbWKG7mKJ5l03s2y0muisl4J4+w\r\nmKd2yO4jOKdgNQxbNEQVdafv9t67LcfXnZtfkq3ib0rkWsnXBr2wScZDNMZT\r\nq/4EL+OOTuaeDe2IQrIo15SvFtd/ItmpHDvigKC/18tSgJ4NPUVX9HXpX4eL\r\n41UcgOzjFvOaZdnCC/PEbH+v1bNThOeNSGFPiQhWHUfUcEL3Ww7f4Pr73EFk\r\n9itJzJ3PZf6xeCN5veIUl4QSCWZVPMD2NCsO20LNPo3wbL4H9mH+yWOZBis/\r\nwlflMsohU23bBcBBsFKWqQjtkM5pee6hHu4pLPVVgFXmQ1KnqEGQ2bh2eKpl\r\nM35TXJ0mYqLDlJSg9Y3/5BwAmHXn3EbVuAiHiIw2FnQKN2clcIYwjSWJxXRZ\r\nJtss8h1k/ng43CpqI3BruT42LSfjkSrkwTnlVIM2stTsaNEpGhXdNZQrfiui\r\njRiBLB/aIR1KiGSL1cGWjuI39AwR15GWIvtOCVgAZETX09evv3LA+K7vkyWx\r\nvFI4ftTzcwxNYYauMNFDNVyjK3rrHZ+kOEnZos8pFpq+njh5yz94XH9z861P\r\nMhL5WPrACpu8lqbeCZuI6lysYRx95r0IJd0o42HTJSUj5U5ds4t0h+/NVP/I\r\nZ1aoHQB00QYO89TaMSDGaL/4GHkjJmteqbQ=\r\n=uQ6J\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-765e5de29577c426e4bba47cc63449aabf17414c-16.x/balena-jellyfish-client-sdk-13.0.74.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-765e5de29577c426e4bba47cc63449aabf17414c-16.x/balena-jellyfish-client-sdk-13.0.74.tgz","_integrity":"sha512-lpEo3jckUbgSwowUhgQYUhNgHgCX6Nk6fB2Bbxo/JOAik9SashNLw8Sp/vbLeE75t+vJCTeZ5vTgex8tJcgUhQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-13T18:34:23.212Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.44","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.74-renovate-autumndb-22-x-765e5de29577c426e4bba47cc63449aabf17414c_1663094143530_0.11858890441796732","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.74":{"name":"@balena/jellyfish-client-sdk","version":"13.0.74","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.74","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7c878af9b8a8ff9ba4cc0df9a3f69bf52e22cef5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.74.tgz","fileCount":30,"integrity":"sha512-3JjWZKCqRJsgbtGcrEe5ltCXEXQ0TTwxUsYg2YZ3w/tRXj5YypTk6HpKzhRVPdOIBLWpQCwb22fGTKA5Y0sprA==","signatures":[{"sig":"MEUCIQDetKxdgoteo++9e3cQIMYtQ2zxYyaMdvPjt5+TXrGcrwIgfMPEHbMGrrCV85BJubd78j1Jecn2xD1CqU4wExEsx4I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIM4jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdkQ//aOU9oMu6BhsBFGlQ2qUB5UX0XT8KG+0UxdBU2OeJ28Z3WGdv\r\nL/uiFobzKH6BnN68/MzxKcos1yAabEWWYHm/Xm/Yg4a3fz1Z6oFTTJTxMpUD\r\n1ciyqhxIrlq3IdELwvnvXphlyPk/HV/g2xYVSa1GG+V8kpOCIIypT8/n+XAl\r\nZh7CYRdAQmilCCVjKDuh+uDti8wHT3rxR9h+g+mMIPzu8lLeKszpsYpZqXli\r\n1XXOZSf8VBE5xKpwI4YXY+bzP130+A9StWLM5SJnO4d+A4teW2o+XhyjRWOx\r\nVIjYrXR5eDh+aVh0bGxb2f9vUub574pEU4WxGxTsaiqPv6H71TyLAx5ik1hv\r\nUoB+VCFTVASo5WCkIK39lEWl2nJlAZNgryGq/uuLmaqI/Pdnce7eFlIymuYq\r\nAVG94UpPTFiZYpzQMeDnkfX2XyOZudUIqMMKXzfawGullzR6UwuNewyZqPL4\r\nT3sJHVm8hk7cFhn0uKG0GVVEZeN+3T6KX058tanIEiVfNhdxNbiChG/axMrk\r\njzcqvgCxEfgvPODRWVzAZ/k9KSXkGuRvOAN4h7xuQx6vrw0v0OPEGVgBXFue\r\n6rc8G+KSbXCQLqp761CLOuiBeNnxMhSQgwDjEy8teW3gu5rHpgBbASx4tVvk\r\nJnwZEG7ArRfGzrJGLQxx4bRUy+6tpRKfBaE=\r\n=LQdF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-765e5de29577c426e4bba47cc63449aabf17414c-16.x/balena-jellyfish-client-sdk-13.0.74.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-765e5de29577c426e4bba47cc63449aabf17414c-16.x/balena-jellyfish-client-sdk-13.0.74.tgz","_integrity":"sha512-3JjWZKCqRJsgbtGcrEe5ltCXEXQ0TTwxUsYg2YZ3w/tRXj5YypTk6HpKzhRVPdOIBLWpQCwb22fGTKA5Y0sprA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-13T18:34:23.212Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.44","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.74_1663094307163_0.22768986604676766","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.75-renovate-autumndb-22-x-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7":{"name":"@balena/jellyfish-client-sdk","version":"13.0.75-renovate-autumndb-22-x-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.75-renovate-autumndb-22-x-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"95c40fd78a07abfc3fe45f383117b49c4ebe0bb7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.75-renovate-autumndb-22-x-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7.tgz","fileCount":32,"integrity":"sha512-uV5L/IL75b4oR25H3ZueNB0O+v6mHdvFtgOGoY1DRqLOxijnzD7eLXNIu/vy0jkN/qE1ZWOCw1yYt7ELcczwig==","signatures":[{"sig":"MEYCIQCr0IieYiFMz60vRKGVNecJiNUPhpnbc4RKRgtm530rvgIhAKGY/6gqSUWghGRZ+r+5HuPUcVx+E2LO1iEuSFv5cs8c","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjI/iZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq9lBAAogYNajujSpvDHZ7yzHF2w/jH26q744t/m+XbPjZGuypcXupn\r\nTZAAttxkYTMpSNNKjXMST+OrPxz9PlUAAYTh7393KVaMXmpqxF1NMjHfzJ1J\r\n/aRmPAYPi7x7E1KpSA4uThlYipED3qUbkw//ojdB127SEyxYk1h+b3OFLafY\r\nkhjzSNArB8vAenMqFe8uWL/BTUB4vT2z1aXJ84wVnjN+pRvpO8UPnX6RIgWK\r\nI4wvZ1rdUDlcaDge/Sd+j/X6AgATzLCN3py4kZUR9WAcP0QJ3o7/X/OSJHx8\r\n5NsrdgVqTLo+rl1/EGMv1dQzPt+Kdwqpi5GvcE9kphHATeSVRJrfEByW+I5R\r\n5s29p/gkLU70bCdUMnYR5jMZQooSA2hAHQELmoBz2x9E1xqfXdu2aAZR13N+\r\nU6GKVHZuaYi9DTzbRWiJiiJGHsjeMLtGoSNCA/H+UkLDa3/ivPobcSvEWzj4\r\nFiB2LkkpA+KaevkSSlXv1W32OQdIW/56B8k/ACLp0BFW3MIMgpIfoq4JB/IA\r\nrY67SQrQhHyktQkXQ61OOfefeSQQB/KK/SlKq3vHH5OWx4geVz01Kt8pJt9W\r\nNC09k8nKcAuRwzupfo7MeZTiW23QplB0+aVvX/6ihiRVlk9HVnmYQrejoF/X\r\nksgS0OMN6NakfsCheW+0ftr2NHYrdGbu6dU=\r\n=CXTW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7-16.x/balena-jellyfish-client-sdk-13.0.75.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7-16.x/balena-jellyfish-client-sdk-13.0.75.tgz","_integrity":"sha512-uV5L/IL75b4oR25H3ZueNB0O+v6mHdvFtgOGoY1DRqLOxijnzD7eLXNIu/vy0jkN/qE1ZWOCw1yYt7ELcczwig==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-16T04:13:29.964Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.45","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.75-renovate-autumndb-22-x-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7_1663301785557_0.12683189182005972","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.75":{"name":"@balena/jellyfish-client-sdk","version":"13.0.75","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.75","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9f7b0d64ac515de19efbee40057374933c21237e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.75.tgz","fileCount":30,"integrity":"sha512-PQjqZRHr7vdDYFvytmdwPO5MRxgUmgbDXrVzBo4NaDtatZ2685vNTf976r9r6YdextspJSeOn/L4gZzS0p+3Fw==","signatures":[{"sig":"MEQCIF0jMS2XslPhwWwkkuQW3Ha+pYfe8e5sE6oBuChw4UYpAiBwAGytMCOPU2fbkE53Dm7eU7zYd+vrqnMn6FMVexz58g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjI/keACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZ3BAAmFbC1oMsXzWdV18+6xxGNw4DcxTw02Xg22m4nsM6MMiAg+BX\r\nSXKWn3gr1WxmxiCvk2HHryclj/JNnWVRMU52bu7SJz8xpYmF9ehzetH2yTrD\r\nOQiY2gt4lwvmng99dIGxfhXPIleLEx8UuKOFN+wKracgpO3iXVTsLoy9lPY0\r\nvo3c1zORzb+JRWxPAkQtX2iUyKfoh8kwVw8jTRfK6dZFnIxzKkKt4jRLq+Hc\r\nC/ZYuNFyS2Ystg5J0qCmLhi12LeT6EgijyJ2LMBWyBx/xcF/9YPwt6JBYIae\r\ne5ureYkl09aaERO9Zu/hina7//2W7cH1wJC9F8lCfoG7kcQrBGzkENULtCNQ\r\nqmQcKOC3YrVXNhhPtmctmhMzWEefX3Eled2tYv7wItWHqLMXjlpORSquFzn1\r\nbqUOATsW0HWttuZNkjWQzNbz2pWpD0qkeozdfJ71gxp9O3SQK2k8GYfvVGWm\r\nHmxLjUV5xNG/Kv3M9wd/+CobiEW++moG3vVVJcqTDKTJQxJQSysYNV8EVBES\r\nl3ohf20kuE9YKTi0FDE1ExEShgetM1nVVMVNi+UpHynwp4UZIvV8/317qwN2\r\nM3MsUHvH/5RtERpJUHTotW0cDIcmP+7xDl/oKk7iUpJzjtnNwixFgO6NRZPy\r\nhlrewlFNPigXCmbAVGy/yP8juC7DL/YGQXg=\r\n=ER3t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7-16.x/balena-jellyfish-client-sdk-13.0.75.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7-16.x/balena-jellyfish-client-sdk-13.0.75.tgz","_integrity":"sha512-PQjqZRHr7vdDYFvytmdwPO5MRxgUmgbDXrVzBo4NaDtatZ2685vNTf976r9r6YdextspJSeOn/L4gZzS0p+3Fw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-16T04:13:29.964Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.45","typescript":"^4.8.3","@types/jest":"^29.0.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.75_1663301918098_0.13023510602423616","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.76-renovate-jest-monorepo-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08":{"name":"@balena/jellyfish-client-sdk","version":"13.0.76-renovate-jest-monorepo-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.76-renovate-jest-monorepo-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cd080a5fcf5b74deb45c9a4490e772bd0595a432","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.76-renovate-jest-monorepo-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08.tgz","fileCount":32,"integrity":"sha512-KBavvy3hYkLdW6qwsyU8CzJIKfGtv668Wkf2JwagYxOxn8mXg6q5NeOmjrjt/GI/UgRyDt3ahxCew4+74yr5cw==","signatures":[{"sig":"MEQCIHR/ysCq3cAD+wplYBBvYmsD2k9qPKqeZxNRvMMfbhfQAiAPzo/TQVm9F2gnsu4HeUvHi8DfkdD1CVvQ0982hKJZ4w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJSHZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmreAQ//YU8YgoXr8GIBcMdgvLLLD/oexeXqNhHse5DlxiiYwvw4xHB+\r\n9XN6nL3bhwJz0d9cfG8e7ynF5tlne4TQdpZgTmj0TSoCqOoV8kYdtm1lLGtK\r\nlHyZ7ijLL3n1MKkLjIfjAs25kLq+Tas5e+5KXYxqGlx6ol84fzYMhpY1/cz0\r\nFxzZuUAVNz77MWHvS3LovXKsumTYTDv7VFwa+MetCVkHxseHuE7xDciof5Qd\r\np+/vAA9pElkhsHqE+cpltcF7nClPl7ayOEstDo6xtTAbVMAcWh4ca3WNjG3D\r\nEKcVzzw11U4yUixdVtTbDH4mdyeWleOCTtMW4K+GEU5AVvmTYLzNCjkyfXKe\r\nNPa5/PBNZoIwidke1ektd7Y3wxUc6rAgbidoLl9kxiljC+KCScLHZjj2okiy\r\nj1orbB5yGiMKhBS/Q816lzyrSv9d2JwAM/Fi7LNSFXIVrLSFsjmLARcS7BLF\r\ng5j/Rn4nVCXiBALdUbGpgSpk+BK/fFm2qZbGyMvnHw3eCJ8Z5alRQ1X7/46N\r\nFHxo/F+OpB/XbJ0en3NJYrfazy+RGDU+/AaNGSyEA+VsNdoPGLYuJuVAH+G9\r\nBmhA3o7PYUGFygipdo6zoN8SdzJEMcZMP/yU0L7bgnyfW4vO7uJPR7bgzJ9U\r\nYlFFBhH0wwhdVEcZQhNf7OPBfLQqzYmKO5g=\r\n=JKzM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08-16.x/balena-jellyfish-client-sdk-13.0.76.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08-16.x/balena-jellyfish-client-sdk-13.0.76.tgz","_integrity":"sha512-KBavvy3hYkLdW6qwsyU8CzJIKfGtv668Wkf2JwagYxOxn8mXg6q5NeOmjrjt/GI/UgRyDt3ahxCew4+74yr5cw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T01:22:47.376Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.45","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.76-renovate-jest-monorepo-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08_1663377881259_0.5589264607665791","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.76":{"name":"@balena/jellyfish-client-sdk","version":"13.0.76","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.76","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"237c7c31ba96eca5b4135e2927e3236fd7e1f03a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.76.tgz","fileCount":30,"integrity":"sha512-uN42MJ7sqSJDhgkaZHHQLbzWjXL1RZrhpt77pj0t92ADzsUuAzumDwUwyo3g/roLjkbs/wIHAUgpo09WPcv0+Q==","signatures":[{"sig":"MEUCIQCbJItwEhNAw+YzGMqh2OXYaqv397qD8fIIA+e7EXEcAAIgeJusfTHg11MQjCfyPc4A1qxLRJOirtYsAjwm/MlYI+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJSJQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpsPRAAiTys41gsIEkJxVIGfO57lsX/ifGvR8HlSCcFEyLHxt+iqIeu\r\nAhBrAbU0Op8McGqoUNKFhEKfiQGUBumr6n918Jmbtlszc0/ktKfiEebyLN67\r\nlfg1awMM2TcvYf6OgC6oeE7ZCDSyBn3KW74NigDgvQ4BjzF2C7+wdaouxk2X\r\nO1KRIl0KKyNx1EbfAuxg6wJE9TpFfsvasPn1b6cHNB65bJhsgMyV2I/aHTz/\r\n5l/I4JTnoUHkE1PlDjlwFWsJN5o+jVE3/YKXeaowaBQ9DUuuyK4z82CihFC8\r\nMSpdTLX73tE1MoRkuT2EDwmFi0HIwTRLvkG+cZ9baqskX64IFgHhUR/xu/mj\r\naCragD0xbvVI8+wbERViZcBV6oyHKLSonn0K/MzT1qYQoSA8AScHaAdlbxhf\r\n79cnJgNPmSEyCL/Eek0nqkX14RRJaZnhwYRdbKRdq7r8UCRMrL+ygHo0t91h\r\nF1Nfae9HZ3Vf42CAg7J4vQxTpAB32ttbkXrC3jZrqTpnhWxZaYBnIFcy7q1p\r\nvR4uEaAe/O+DAxUAeneIeXIyFJS4VBuqs61iLQ8fbne+di91ggPfE9C1YiTn\r\nJdwa0Y2VKYy8gqxWUR3peZ28+ZWvN4dhoe+2HiZjYgiNVHZ1lyz3kldAL2Mq\r\nf9E6P1C/FwU3gCbuBTpg9f/gO5vHKAAvcXE=\r\n=ZN5K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08-16.x/balena-jellyfish-client-sdk-13.0.76.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08-16.x/balena-jellyfish-client-sdk-13.0.76.tgz","_integrity":"sha512-uN42MJ7sqSJDhgkaZHHQLbzWjXL1RZrhpt77pj0t92ADzsUuAzumDwUwyo3g/roLjkbs/wIHAUgpo09WPcv0+Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T01:22:47.376Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.0","typedoc":"^0.23.14","autumndb":"^22.2.45","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.76_1663378000256_0.5639255349890029","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.77-renovate-ts-jest-29-x-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845":{"name":"@balena/jellyfish-client-sdk","version":"13.0.77-renovate-ts-jest-29-x-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.77-renovate-ts-jest-29-x-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"424f7c0c7d012310a4fe56514e17790a7755b05c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.77-renovate-ts-jest-29-x-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845.tgz","fileCount":32,"integrity":"sha512-E+YtQuYay/AI1TO03YxSaU1hJMT8kWo2gz/kvX7hxnpzxkypPObfaoK71BlcajIxUmzNpW/dw0f8n3rHDmXKAg==","signatures":[{"sig":"MEUCIC1Acu0AvLH240t2lpnPFY/5905R0oymPQHEnYM4rIhhAiEA26k0ANAEo9RAZ67/tvqzAuhFhZosae3wB0h/lkQS77U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJSMNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+chAApGiZ0r56pVee+P0uikJ64EAqde0DMBtHMPb2Oy6P8mrNnaYH\r\nqP1k1GMtK5Hq4Ee2sauyJ8eo4EXBu5+L1Kc6gcpPBAUNOV8MDijwWakh8eHk\r\n6v0WPSht68uwSCepkLg8gFpD5sCmJROBJ1ietKXpBD4oCRLTrXk/CrbTIpb7\r\n95RKK50HrD+ZJ7Al8/V5bJLNBo5ndLtrpYe1UACg7FnwAJmGVGNkANwAv16u\r\nR9reGmJ75uTe17UNsSzLiRrJ3tKZxXq7jVCGeoXBKaabs4LiJPYjkNJuQI4W\r\nof7Mxi5DGYYx1xlD7V4eq6m4a2w8JLupceNm/Dvp6FjmuArnWiRb65VgQ3R8\r\nUsArjWShdyRIOIgBZQR5R6tYCcqVKTqlL/5JJpQeLF7Px9wV4ksDP0aDXcyi\r\nGlwz/HGAa5hmDoLiTErxGS/ID3q3Q9uL/A5Y5BlTXNx90IEwZhfFc44ULlUt\r\na1AUbCkR17sIqqPbusBFroJfKGpVJosNKISBAl/8IEXybDNRTn4T9XEaIThs\r\nizuJyLHUnzQaUeXFC7ATP+579Mndm647KcWKsOoEbp19mHR9ei8NJREbBOrK\r\n1Ywueezfbw27ZO0oxmSglxeRKAYlwabsV1tT+hlzspecAMUC8KqgVeS49da6\r\nsCuqs8TNxye1hAn4N8NV2SqfysBmvrwkA1c=\r\n=0UIM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845-16.x/balena-jellyfish-client-sdk-13.0.77.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845-16.x/balena-jellyfish-client-sdk-13.0.77.tgz","_integrity":"sha512-E+YtQuYay/AI1TO03YxSaU1hJMT8kWo2gz/kvX7hxnpzxkypPObfaoK71BlcajIxUmzNpW/dw0f8n3rHDmXKAg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T01:28:14.751Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.45","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.77-renovate-ts-jest-29-x-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845_1663378189669_0.3988301740699838","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.77":{"name":"@balena/jellyfish-client-sdk","version":"13.0.77","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.77","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fc89e5b5edd001bb17bef00845038aa8323baaad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.77.tgz","fileCount":30,"integrity":"sha512-FlMKQHwIw12r623eea8lINi+DCoIByxD5vr1W9JJFnDqzJDfgbXwR3tKg8PuMrxc5CUv9Z+5bq4Z7Vo7rVleQA==","signatures":[{"sig":"MEUCIQC/TvSu1SwGluqOAWH6t0nSzBYZfyLxfHXixNZ4F8vwCwIgHHw93n9+NUDeGJqTg04qrgTVHFoqcKFmFpXszedm/EM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJSOaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpnuRAAjiKu9ocqN6ltfx61vOd/mJMtWBRN+AHU/V8O+WM4qHGoRT7w\r\nXCi8GGx3JrJh3/tQr8fRaXTQ2YFtSNasIitxNct5OaFOmxWvpsSCIVGlClRf\r\nVh3rStboYWWIsOVTGLvKH7xT3ogeFfqig/iuUy1I6CbagUIjbvCebUi2Dk/I\r\n3/oAkIk/jLedbOrFZ3kM3goUGsxGhw3qOFqVKUTCEgmwuY524QSrFV6g661q\r\nYD2sIFIBVyjxXKX4GdiM8X0KMcNET5gIiVW7r3UnR5/70ehSsME/qL1biLbZ\r\nnebnUyxWJxRNaEeqsaBwQVdEDYCjXInJejj5OqMzINnmYJcoxB2t4EP3XZ3l\r\nL4wptep4WZKY5QiKLc2OGfWuYM+GpSJ3OfgKxdp4kYK5Tqm+K+f27cAEjgn2\r\ngEpZeTDOM3W0ptBZK/o2f/jRSnCfVb/XRwsuOmqh6LNFmVzsO8An2QBXUv4a\r\nLVfcUcpLhiAQpFKghKv9+uTlbLTZG5SGmNwlv6RDIwODPFHaNyx3IF9ByQCm\r\n711SVby4SgzPUQ0W35tVsJFrLEmDkvwbwT0fuMCYaTvLuha9p5AsZL0dms6A\r\nWGbZxtAMJoatZ79mVPydQEM/sFHWMHEGeVNsJR1fGsAoV+N2QUpwewJUNXsF\r\nA8/raxJGohW6GIUiALIMeQimf+bRhgHbbv4=\r\n=G6kO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845-16.x/balena-jellyfish-client-sdk-13.0.77.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845-16.x/balena-jellyfish-client-sdk-13.0.77.tgz","_integrity":"sha512-FlMKQHwIw12r623eea8lINi+DCoIByxD5vr1W9JJFnDqzJDfgbXwR3tKg8PuMrxc5CUv9Z+5bq4Z7Vo7rVleQA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T01:28:14.751Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.45","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.77_1663378329933_0.7922179604916495","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.78-renovate-autumndb-22-x-5a2f0e456f81874c018be43337d4607d45cc0bae":{"name":"@balena/jellyfish-client-sdk","version":"13.0.78-renovate-autumndb-22-x-5a2f0e456f81874c018be43337d4607d45cc0bae","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.78-renovate-autumndb-22-x-5a2f0e456f81874c018be43337d4607d45cc0bae","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b2c80e7acafaaa24e04f477acb7036d42871a8c4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.78-renovate-autumndb-22-x-5a2f0e456f81874c018be43337d4607d45cc0bae.tgz","fileCount":32,"integrity":"sha512-DVGmUpql4Bx6qkSv97vqPHk++3NmCMV/2HagfscLwmsWFtI7TLNFc4GCTQcVcdmUMjd0FfM2PFqMZNCHfgmm+A==","signatures":[{"sig":"MEYCIQDb3emnXSO/PJdf0XNHImaN9imGNG0nGvglq3vqJucTeAIhAJ/YbMwF8uK3kQU90zNsIvF3WV1Ikdm9nVHQMfO/LPBd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJaJAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqmfw/+NqHzxMHKMm/yOWulKCFFkvIbccQwZ+AZ7Zhk9D7r2B/0dRvw\r\nnwA16g1OB/O9MiZHwjEC40uvvAHkWjSwIqsh+Hi7o9rYU7NdxS0TgHKsueb9\r\nO05GpmBLtArX4eD+JoXCatVPdkxKrz0RV7F4AUmi5/VqdqcODaH/y4ngR/9f\r\nfF5J0QOLutDAAhokvSW0vQY/sUK8/tocgIfzrU34wJv+XyDbOJRtRVQLU6Ov\r\nNovoZjH/qQbNBYehasPCdMG2Y/JdtLdH5wQjFOgYaFzON7CxSA3cvi7qi4Eb\r\n9ZvWqkcoUS+EbggrLB+yXhXY88stfboqP4XvmJVkFBu+yayy/8DYUUTthoKi\r\nmoyIvGOzLd7cERCDvxZAmTiCTdKbFmS0njy1F8RBivmR7aJTrd17z9WBgvj2\r\nXfGCCagHIwV/aKdUsZ0n2vqcpxrXMpQgvNqOqTXerEXLcuikvs8C8N6tLT8q\r\nb4EPpMmxccW4Y9Ah1k60tF7JiN14epU+OfBsZndSa/h1V9P3wL9sRtzB56CA\r\nw/s4HL0dKajSSONKMZGpQk9Zh8uEBd9vrMx5qcj1EzbLo4a7FvfQ/elXY3re\r\nvy7Xm80mUim/jjR9q4CQOcVX1E87+qath1zJA/KK4SDuI1u8PcF85d/D0+sP\r\nOYBZc7mo35jZor6erDd89MA66J4BBnTCMQ4=\r\n=P5BW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-5a2f0e456f81874c018be43337d4607d45cc0bae-16.x/balena-jellyfish-client-sdk-13.0.78.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-5a2f0e456f81874c018be43337d4607d45cc0bae-16.x/balena-jellyfish-client-sdk-13.0.78.tgz","_integrity":"sha512-DVGmUpql4Bx6qkSv97vqPHk++3NmCMV/2HagfscLwmsWFtI7TLNFc4GCTQcVcdmUMjd0FfM2PFqMZNCHfgmm+A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T10:31:13.888Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.47","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.78-renovate-autumndb-22-x-5a2f0e456f81874c018be43337d4607d45cc0bae_1663410751856_0.07135237323616739","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.78":{"name":"@balena/jellyfish-client-sdk","version":"13.0.78","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.78","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1d816b8e1bb3ff5ef3ff169c3c041b217e0372b1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.78.tgz","fileCount":30,"integrity":"sha512-aV+oe191hWis6Pu/Uds2RXGFI1p6Zx12AwoQcHBSYm/yo2drnHUyYeBIzxjxlbfU7iKE83RUOr5lv2/DOEx1Pw==","signatures":[{"sig":"MEQCIA5BFPW+FIYtmWhwfVPJHHmTusYoTSP26rkOLmhyyRPVAiAxcG7Boa9hkYSNh6qnjNeh6A8Gz+PBXZdQfyCryyD2zQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJaK6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8Hg//YkpDBLFUHK3a6p8lRoc7JYiy+6WkCMtc79ALkH8R5BiVs5mc\r\nJD2Gv1Q14HeptO1su7IbUDcrejisNBoCc2Rt7GCOMZCakspAnm4UsiGkDozo\r\nWR1j5M2HdDetWW5u2oELSyuTPBKtT/zppDCMhpkA10SbGgsnapste2v+32KC\r\nIyUelrGENd5bMtJzdP3Z1ziPuGSMZwQa2HaVsCgei9y03tyGWw2ZF4dw2oHl\r\nAxu6dVRd83VtlmFxVjH2643e2LJwMbmIKYfe2kEGK9ftf1RCjntHbKH7qrjl\r\nRdiW39kN35x32LjdWvHVTMkogfPw4juakKzWheqdZ33aai5ErgA0/EvypNF3\r\nmBUA5purykeqt2ofyLC4uLsZksGeTsUeAonroaoLE2F9aPnSZbtZgswNNSPm\r\nIv2MiOn0K6GMagaEydwhtGlj9HnMCdi3zdT/FWAzkkicJKmEN8hKEQswiphC\r\nKQukwhldNaM/sNUk/Jni1NnZM+Qs5DP3To3vaEVYTCAMFikY3JZG5Zm2fVAG\r\n4yfeD2PxIvgss1LZr6EOBTQG6Xaboj/id0y6dQdbMFN39UQjAzLYXOzlRaRF\r\nVCQSeheuDsrB859VI4jZ6Tci09wW/Go9ORP6OdqQFMPMm3Ch2Tf9znDTKkzC\r\nOqfqma2JASOl8rMISKO87Fjy2BcpcsMz6Fo=\r\n=Efll\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-5a2f0e456f81874c018be43337d4607d45cc0bae-16.x/balena-jellyfish-client-sdk-13.0.78.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-5a2f0e456f81874c018be43337d4607d45cc0bae-16.x/balena-jellyfish-client-sdk-13.0.78.tgz","_integrity":"sha512-aV+oe191hWis6Pu/Uds2RXGFI1p6Zx12AwoQcHBSYm/yo2drnHUyYeBIzxjxlbfU7iKE83RUOr5lv2/DOEx1Pw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T10:31:13.888Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.47","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.78_1663410874147_0.9142056312461666","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.79-renovate-autumndb-22-x-2a7d5910fc1b2921283079966db50287dfd43124":{"name":"@balena/jellyfish-client-sdk","version":"13.0.79-renovate-autumndb-22-x-2a7d5910fc1b2921283079966db50287dfd43124","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.79-renovate-autumndb-22-x-2a7d5910fc1b2921283079966db50287dfd43124","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e3fe4d050dd2520440195223e91194941901bb22","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.79-renovate-autumndb-22-x-2a7d5910fc1b2921283079966db50287dfd43124.tgz","fileCount":32,"integrity":"sha512-TB8ARCoypaPH5G4/Sr5e7j/4+rNPW0CDqbCP4i5FaZO1rZdr66uOPOgxw5V+BIDC265Y/292ETKIeOxp67A0Kg==","signatures":[{"sig":"MEYCIQDiIomrkuKlCTm+L9IjRc23+Z3ah0n7c3jV5jg4dV1LVQIhAKZYFAKqb6Na/VYkonzhu4SN0wET+Ug6GPXSGgQwp+/2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJcR3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqGrQ//WLj1FzA764lz1CInwDbPKGdSpaFObEZEcqfwBilLKObmBeBB\r\nndihefCMwZ4b0odwRa3o7chCKqoy2mkvSeXRZT6ln+b+LfQv/s8SZdzYFJK0\r\nxTK4j2va2wNDcAWBAAzJo93BGSqvcaEDOKeSvshaOTOme3uhLDEfZ2tF0XY7\r\nlx7riD3gHmD8clDMmokrVvPNanvNNvjODMVxrLClwoxLK25IvFRMyRaS6wor\r\nYIypHs2QJPGeTuYcM4zrZI7F2dH7dyFCMcKG1bZa3zS/Wg1koBDZyJ8qAGSm\r\nkxW//xXF8DKhUf1V4odDnsOe1fUcfzCp0PCpW514gs18VKdhGlIUWn6ldcDH\r\noNulPyG4+iSBsc/noyLpaOUFkBZPtuk9zAXpWYpW/Qqv/aeSFHBigMkG16YR\r\n5XgWJClAxGQbg6xwmxa36IBmQgivxluMnS01KQfbltgLU5OV/Qnh4vjzM5ev\r\njBadUGCeOCExomq8ugVCzcyHB0kVMux6rsymtnFJiNI1Cfxc9NWrBl/gj5sq\r\niG9wlSdt8/o2RQ2P8OPreSC4xkNZZXBo5oyjv/G1/3UXXxd7M56m0jOV9HRW\r\nI37KA6rIUhCFxlJ2ygHs7Mlcx+qjAz5alcqZM3w8nbzp88Q4QbOdyZF2zQcN\r\n7tybcU7bheew8K4FtUM77uhqwhEfnJVtJkM=\r\n=/XFz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-2a7d5910fc1b2921283079966db50287dfd43124-16.x/balena-jellyfish-client-sdk-13.0.79.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-2a7d5910fc1b2921283079966db50287dfd43124-16.x/balena-jellyfish-client-sdk-13.0.79.tgz","_integrity":"sha512-TB8ARCoypaPH5G4/Sr5e7j/4+rNPW0CDqbCP4i5FaZO1rZdr66uOPOgxw5V+BIDC265Y/292ETKIeOxp67A0Kg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T12:57:16.573Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.49","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.79-renovate-autumndb-22-x-2a7d5910fc1b2921283079966db50287dfd43124_1663419511156_0.18848833490110306","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.79":{"name":"@balena/jellyfish-client-sdk","version":"13.0.79","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.79","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ed19cd2dd286b43e8f9b24ddd60eecfca3471a39","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.79.tgz","fileCount":30,"integrity":"sha512-/let63Iy1//pUotLnFI8fGvp30R+DpMcb1lcMCcWPt+PfXx9ZRarbGThxd7DqVoK6GpEkhwKCFnqA8CEABd3SQ==","signatures":[{"sig":"MEUCIHdPsffaYlvrmf5YIRcqUxc0CAItDBmL/EFiYB+KWqSqAiEA3yvSH03tgIEnc40AhD/f7G3FUltB5WGEpBKLwMf8BF4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJcUAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpojRAAgtI9WIA26xrRl66amTZ5SSZ8GYXGpdLD7sljB9MuAMhmXrF4\r\n1//j4u4pe0yTAHdE/JDCvOMgn4pmEgiYCZ/qClBvJdMq+rkQgF5BaQknS/0m\r\nJeESNeZrZeDcGwNQnAibABmU/YFXIIA0c0poZEqJFVDStjpVVfipssOwBCYV\r\nOCPGA43UDpnLo86pff3esRncUKbeq15RiA82K82r1pkfrmXVpIq5NHw/4IqX\r\nU71/ISSXGaAdhukOnOycmhM8VLS4m3i5xxSxY+2/9MQTHX1qYdoVYWTlQi6g\r\n43hkpApaqvtE9AjVuVwI3TXBYU7ut1MBQizUoliHsv6jEqMsmvGE8mxjsibi\r\niY5TGg9US8YDsd/0o5pr/aULru5xkjitVc+n/X9J1BcbIHlb/hPlDD6c5BRo\r\nzHiVeptHO+xS/m5FxFRz/sWEYSKm5qAsqJ51JcjL9Eu4BdmbqwIv4aS68VDG\r\nXXVHztc0/y7jVZnPOM+fIaJwwvoE6MG39zfc8+V3jN19qO3PWRcmT+FSkQI/\r\nRjJvs1bnOEjVPGZcTwLJNw+XuFcrTy/dC33xZ0QC/gQJ8rOfzZnCRZLQFfDn\r\njjHhibKL3kbcaKJnDTLQmvHtO4p7LmKOGv0Y1XHFb3pKuXduLinl4DRQKVHg\r\nI+hU8R40aFC9n5FBp7E+5I20Dunr3P/tw38=\r\n=ESRZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-2a7d5910fc1b2921283079966db50287dfd43124-16.x/balena-jellyfish-client-sdk-13.0.79.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-2a7d5910fc1b2921283079966db50287dfd43124-16.x/balena-jellyfish-client-sdk-13.0.79.tgz","_integrity":"sha512-/let63Iy1//pUotLnFI8fGvp30R+DpMcb1lcMCcWPt+PfXx9ZRarbGThxd7DqVoK6GpEkhwKCFnqA8CEABd3SQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T12:57:16.573Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.49","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.79_1663419648273_0.578153114248775","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.80-renovate-autumndb-22-x-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5":{"name":"@balena/jellyfish-client-sdk","version":"13.0.80-renovate-autumndb-22-x-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.80-renovate-autumndb-22-x-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c0d7877cf20bd09e1a1d0c8862ba6fcd28204d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.80-renovate-autumndb-22-x-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5.tgz","fileCount":32,"integrity":"sha512-Rpbv1u81EFqyeHGs6RwZgUTmU4u7nLWTz8nj5Vx2d+nvDwyfwUbriOB73TCivDW1/mEaT0+/IX2FDuI2Yg4/GA==","signatures":[{"sig":"MEQCIHoqMfHw9LH6gULPI+xL64KQeajP9TOzR1RxiYFYg9kYAiBZZSv2gR08vJTGlByV3JdHpYk8RtpqtR15gs77J3Up4Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJeVZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqY6A//QvoRvLA8WlLCJE3mt2hyCK6XbI0YXy0nHVCh1QAn58AcEzw/\r\nwl4zokqZQsxAgYvctXP7UYvlKxNnYqlHgiqfC7YIG+Zgx7N8vy2xOAc4heka\r\nwJOGJF+Ul4oItt/CCqDyNJCVsD4ks0mayEPllHJ+h9VskrWBDEBjV3uPoUZz\r\nhHFNsXXPdOTssYRbME3VVuGOttRi37vAZdqorp3aIvNZGgECUHmEthNyb/7J\r\njis1bXZxxrhPRVYdgf6iBqJOpRfhot9BB8JX3jwNv9FZ29bGYmuNckLhhIG9\r\nk/ykbLKWARu2uhXxcUw8+dq7MGc1mZz9lwNT7gNP8Ytw2XiVJWp2N7Ea5ir9\r\nvrTDRPLuvBQthsrnhQP8SDonZDAZ6UkBhpFXchPtzxVPXajCsKVtebRZFYi2\r\nvSGuHIm7XmO2R96x83PffHzm1LljtxmzgrXQI59tGo8LwkUqTVmU+FO5MSUT\r\nYy+4JWDzPDJMpa2QTbuguLhJ7NlE/l/Q69oqLdwog5b1zxqa81j3WQODmUWp\r\nBGyoJXjBhLClUVBoJfeHzwZZZP6TiS8al0njfl0Tsm72ZTWy2qEtObrZE0tR\r\nyE6NWX8kWahFv+jFMD+jufRkdt0/zxMpkqLyi31T3MbGSDkjS1ZTNUsPRa/o\r\na1IusPBtVHpPYGKdaiRYA7LlircpsTDJqkI=\r\n=A9Af\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5-16.x/balena-jellyfish-client-sdk-13.0.80.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```js\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n\tapiUrl: \"https://api.ly.fish\",\n\tapiPrefix: \"api/v2/\",\n});\n\n(async () => {\n\tconst sessionContract = await sdk.auth.login({\n\t\tusername: \"jellyfish\",\n\t\tpassword: \"jellyfish\",\n\t});\n\n\tconsole.info(sessionContract);\n\n\t/*\n\t * Outputs a session contract like below\n\t *\n\t * {\n\t *   id: 'b87f0946-b007-404e-92e6-ffa140cf8603',\n\t *   slug: 'session-user-jellyfish-1641815583367-e28bb035-3ed4-4aeb-b042-1a847a077cfe',\n\t *   type: 'session@1.0.0',\n\t *   version: '1.0.0'\n\t * }\n\t */\n\n\tif (sessionContract) {\n\t\tconst sessionId = sessionContract.id;\n\n\t\t// Authorise the SDK using an auth token\n\t\tsdk.setAuthToken(sessionId);\n\n\t\t// Retrieve a card by id, in this case,\n\t\tconst channelContracts = await sdk.card.getAllByType(\"channel@1.0.0\");\n\n\t\tconsole.info(channelContracts);\n\n\t\t/*\n\t\t * Outputs a list of matching channel contracts like below.\n\t\t *\n\t\t * [\n\t\t *   {\n\t\t *     id: '7f3b201c-9903-4c77-bd4c-84379fe12c01',\n\t\t *     data: { filter: [Object] },\n\t\t *     loop: null,\n\t\t *     name: 'User Feedback',\n\t\t *     slug: 'channel-user-feedback',\n\t\t *     tags: [],\n\t\t *     type: 'channel@1.0.0',\n\t\t *     links: {},\n\t\t *     active: true,\n\t\t *     markers: [ 'org-balena' ],\n\t\t *     version: '1.0.0',\n\t\t *     requires: [],\n\t\t *     linked_at: { 'has attached element': '2022-01-10T11:41:22.393Z' },\n\t\t *     created_at: '2022-01-10T11:41:16.039Z',\n\t\t *     updated_at: null,\n\t\t *     capabilities: []\n\t\t *   }\n\t\t * ]\n\t\t */\n\t}\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5-16.x/balena-jellyfish-client-sdk-13.0.80.tgz","_integrity":"sha512-Rpbv1u81EFqyeHGs6RwZgUTmU4u7nLWTz8nj5Vx2d+nvDwyfwUbriOB73TCivDW1/mEaT0+/IX2FDuI2Yg4/GA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T15:17:00.267Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.52","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.80-renovate-autumndb-22-x-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5_1663427929759_0.06876224717947532","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.80":{"name":"@balena/jellyfish-client-sdk","version":"13.0.80","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.80","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"43539889befd31e4c09d5b55a8a92d3c03179ad5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.80.tgz","fileCount":30,"integrity":"sha512-8FNgZzCuXwpGK18IxksTUkkvmY5h8Jgp4QwjuWlbaKFnxbJ8U2g7U5KFi28yF99WtNCWM9Pbdsp/ZDIUSgeptQ==","signatures":[{"sig":"MEUCIQDe9T9b5FoHLXbMkfSFfCA75Doj3cZn8fQxxbc48EQZVwIgUNTwLn4y5qVPA85d+Mz4NStPFYKJap3s3/xx1Yx+xg8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJeXiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVIQ/+PNk8VSHnaw5rTVQw24OLRMEflTADMEwIoUw9o/odxZqEXQFw\r\nhLktcQcSGS+CoYiek37UMYhPTR6tluuxxsDDKnswWl67zYCYcNfO/jlg/v46\r\nFxj8nKy+/DJDaAhl6z8u7Dm1T0eNV9efGTtO8DRI9Gs01bFITw7ttvxXhKlQ\r\n0xTvz7WFR4jraja/Cw5OUrmtH58VKk7VABlveNoI0ai+KU0smk5SiV4Mc09r\r\n4j4gGwSn+MYwEbBaasvFwQmfMxs05mQZ9UT0zqHCMpVaDWU3TA2AVCE6lkz3\r\nzUJYILIH/gjq8MDZEpfqTv3wEarNHn6VgI1HEiHYYbq40XbYN8g2ewmg5fuo\r\n+GnESu8FC62E1TzPjJhiIoklh4BXbCCQ1q2k8iLoZwe0xsVmVnTqNt+xNeaR\r\nKbsXMgHmQIoJG+uvZF0BWyBadmIg2ZuXYqfxnJNkc6aDCf4vyR49kNiiyffw\r\nGCvMau3sDm+ChsoAV5gcW1oBs+iVyF/FKs1/KfDvZTqvSVK2ApQnhgCtxWKV\r\nB1qwH+x2DHzKUpE5NrZ5GPd8zB7EjWi2jhqL1TUaEAk7SzoCoXUCgdncry7B\r\nFsEmW9Gix5/1CAO35qN8vV1RWaxuoyTnZTg0OjSr/iPbv995oA9BEwoNFq1z\r\ngMW1vbUdacOh8L4/pcZiQZf2Bwj+bmOLHMo=\r\n=e2NX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5-16.x/balena-jellyfish-client-sdk-13.0.80.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5-16.x/balena-jellyfish-client-sdk-13.0.80.tgz","_integrity":"sha512-8FNgZzCuXwpGK18IxksTUkkvmY5h8Jgp4QwjuWlbaKFnxbJ8U2g7U5KFi28yF99WtNCWM9Pbdsp/ZDIUSgeptQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-17T15:17:00.267Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.52","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.80_1663428066309_0.18575009467073045","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.81-joshbwlng-query-example-70325a729f668111168d773bcec44cb77c0474bc":{"name":"@balena/jellyfish-client-sdk","version":"13.0.81-joshbwlng-query-example-70325a729f668111168d773bcec44cb77c0474bc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.81-joshbwlng-query-example-70325a729f668111168d773bcec44cb77c0474bc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8bc3cc5f548565e9c8af52707e295df056bc4d2a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.81-joshbwlng-query-example-70325a729f668111168d773bcec44cb77c0474bc.tgz","fileCount":32,"integrity":"sha512-OZnzhxlcdj+kRhECgcSn8IFJrlYy1wcgF76HfreHyp2rF7FZ+Xq/rcBawLQovryGEqezy4ooyUtkAR2KzPX7Zg==","signatures":[{"sig":"MEQCIByEyFPaU/bRpxL1XNqEh0waJxFvap0ylomj7Aqag03HAiBTaBypIqYCDUWQs0Uwqr25I71yZFD8N/CbFMze/gaQiw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJnB1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFcg/+KcGvydow2AFarFKvsXG57hy0gHg+ztZF9WPKGtMcUM58r0wq\r\nqiBpvymzRByup7Jr+THl3LGo3cTYYtN1qAgBk9IIlfEdFyKYwulM1gEW5HB1\r\nJQts+ZMCocMl6S05NDMz1qL665j54ho1y6YCbQZYnhfzfIsf+qPGmbtQloqM\r\ndcGpu0UtEFIru0qYUa0e48c0KcT9NkxDwf12kZgK62+by8p2OfIgfIlNj8Rp\r\n7Fth/R6NEJPHdmYGbgEoFs4u6B9gJEhGPAEAJEh1AjLJZ4qZaOVoirBUDDE9\r\nq0zBpIJmoS+FUUP056h92VigKIUdLGrBcy8aXbK3sya4830cxye/DD59ZCSx\r\nIpNfZ9Vmfj02Ks7YRnFkpuJUuN39JFZA483OYz4PZbZU+y1cE00Ld0kKRiua\r\nLJFQTJ8/Yiq1FyXHjtbsVfHATfmOYO3KWrOhDB8NvUvjyLYKtSTiEH5up+z1\r\nKdhMQIsA/QsUthqU+D+swzUIPrbPbvdIzBn9UGejHfxfgyCKKywfGL9d/4r+\r\nmfMvk1YXj2gIZ4BakUVl0dOrNd7cW4gYK3+mrDvIgm7qfEDPymh9ZrOVmznw\r\nEEEU4/52vP7pTgZJV9gLTXXv/LadYZKDFkq8OwTE30AAtQLpfvfcqlBzZh6g\r\nrelw2B34GPINg6v+YvLmKPiwjEXEwZB6QTY=\r\n=fTtb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-70325a729f668111168d773bcec44cb77c0474bc-16.x/balena-jellyfish-client-sdk-13.0.81.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-70325a729f668111168d773bcec44cb77c0474bc-16.x/balena-jellyfish-client-sdk-13.0.81.tgz","_integrity":"sha512-OZnzhxlcdj+kRhECgcSn8IFJrlYy1wcgF76HfreHyp2rF7FZ+Xq/rcBawLQovryGEqezy4ooyUtkAR2KzPX7Zg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-18T01:10:50.272Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.52","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.81-joshbwlng-query-example-70325a729f668111168d773bcec44cb77c0474bc_1663463541146_0.07840535349486921","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.81":{"name":"@balena/jellyfish-client-sdk","version":"13.0.81","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.81","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"83ec001961ba8fac070162f5a1397d180a392bbc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.81.tgz","fileCount":30,"integrity":"sha512-luy4PPps5OoGLV/mIviM9KmnSQ+WV5OBEn5XDuASWKGy0FrwsvH8BbvfcVHkkblS16AgAIIZrsK3OxXuNmj0IA==","signatures":[{"sig":"MEUCIFqd4dWVHznN4XF8PNBn2UuzXdJOFgcijjGpsL3a884PAiEAsR6haUc6RMbK5tBke8UcMVXnGB1Uy8vbjnNZHUwaowA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJnDsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmplixAAk6IdnDpCd57by/Aj27Huxbf0sGgNMwhq6B68cwLSVzht38QC\r\nsC/iVBMI5PBHEqp8e2FsCwWRzvdfV+F2DX32VNtStOtlXFyf8zfzutxAnsyq\r\n/es7g6yC5gfPPnpgQ83yY9WXX9BaUWwkGZ6sQpw9CmqGtE2AGAi+LzT/sQDd\r\nafpwuVqgw/NPqqTa9Z3maEYAQFfIoS11z/U0co1ZbuvzH749Mp0cI0FJdlSO\r\nKWs4yoQbE9E1f53yTR6pGQ0Y3X+SIs7xdx4G8rzpfc2L3OXw9KoZBcdvTwLo\r\nohW2iltkLZhOBJ3D7SW9nT8GExHVgAHMDAOiOu3ofHHSOnNy4SAj/OL683jI\r\nfBf4NpXpDCRAxOqn0kMkHHkNbkvwS4Z5yL/MxsHbrCGd35c2xAsHNl0mZiN5\r\nUuUC89CD0b1THNDKDcWlWqoP/W9PJYDrCzTLU4z6YL9kp78S7LE8zOfFiLmc\r\n5G8yRIEZOBaPrWpFatTHZucK5WU8vEkqpXZg7h0MfmzmZ/8SWvcUqALgW9vA\r\nm1AV4QEPpXPSSAErcmISkTrpd2CPTcq7r1l1D8n0uMhjbxgJyqOTXuIE0AqS\r\n8ZQ545nZ1tmHdGEkP9kkbUWQLOY+ow/Q0K5B4Q/apD3fFf4m7hTPdl2Qq6mZ\r\nT7Szak9wcx/DlR1xC4yuOsO0xjpRzgpiwxM=\r\n=mI6M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-70325a729f668111168d773bcec44cb77c0474bc-16.x/balena-jellyfish-client-sdk-13.0.81.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-70325a729f668111168d773bcec44cb77c0474bc-16.x/balena-jellyfish-client-sdk-13.0.81.tgz","_integrity":"sha512-luy4PPps5OoGLV/mIviM9KmnSQ+WV5OBEn5XDuASWKGy0FrwsvH8BbvfcVHkkblS16AgAIIZrsK3OxXuNmj0IA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-18T01:10:50.272Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.52","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.81_1663463659820_0.9482840671287762","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.82-renovate-autumndb-22-x-94e78dea9219e43e5987eda4ef4d4fee70d1dc03":{"name":"@balena/jellyfish-client-sdk","version":"13.0.82-renovate-autumndb-22-x-94e78dea9219e43e5987eda4ef4d4fee70d1dc03","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.82-renovate-autumndb-22-x-94e78dea9219e43e5987eda4ef4d4fee70d1dc03","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dd833c14ce8e83a2014d60e0fde817ed2b31aead","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.82-renovate-autumndb-22-x-94e78dea9219e43e5987eda4ef4d4fee70d1dc03.tgz","fileCount":32,"integrity":"sha512-C5fSW7kVcEvDv8ZLrEwPEUcP0gjxeWPZiPdgpShQMUgVDqDZAKJdhDLY1sVgBYAkTcsIAjJ9Q3W/5bugI6Q9eQ==","signatures":[{"sig":"MEYCIQCjFVIjRNo1Dm4RPI8xiu7LiwAclRlCE6TYf+um5FqDlQIhAJ1N598wLEz+EF6sKKiiyF13D3rk8o8ZtXhEuYQxqod8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ1EzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmofig//QujFj9XetT1kdV0Mbiume+rm4djlA8T5yqM3R+NO9o+lDEmb\r\nxid4cRKPDm1tSxN2aG7sNk2aewyKKEMa5w5JufArh67oBDnZ+HhW9nBqGBuE\r\nkoP84fuztFy63clYVu4VbtcF8ZQwTAGIkfRfuuqLFmGnSPEHXeKfOO5kKwkN\r\n4fyixtO3tNhHEBsCZjBalOLra1nTJeXhB1f+oGqHS65M1C1cMZTeTMClyOUB\r\nLGLzil1SqC38Gv9xtAKXoCQOdqnq9SMatN8X6LrwRUq2RiYxvq9mpmSvYOll\r\nl8Gp00ZfopgfC/uzjL8nPupTzcbV4VusQOV1R5dI6lmILUJiTqrWZd0sYg/0\r\nhy0rqa4k3h7Vd45qQhjOW646rtwH8zB/LeZBPbQsjGU8ZEkKI9Z1XoV74kuF\r\n9ky6v/KgmTvRQRLtFX5Dyy3aQ0L8ET0D5ME659V54IjP6S8XNPxzo93RW9/i\r\nzgDyAcfC8GPWk1rHIrJTeixhgFMpLPJcmF3D0KA+vt28rPXXf1PS1g7I3P6A\r\nDL8t32WOGcI2d0x8wNO22VVWhFOjCiWBwhWkgHuOLcKzWgaNOGDJYx5pUKJV\r\nseugx8mluMo/jvvqpop9ecwNnRwxsNQHc8bnAeRKXR58T8lFjgW6TdsgvE5H\r\ng0Rh1BROCflrTGawliCmpVFsoKiN9B3jFIw=\r\n=qmT5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-94e78dea9219e43e5987eda4ef4d4fee70d1dc03-16.x/balena-jellyfish-client-sdk-13.0.82.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-94e78dea9219e43e5987eda4ef4d4fee70d1dc03-16.x/balena-jellyfish-client-sdk-13.0.82.tgz","_integrity":"sha512-C5fSW7kVcEvDv8ZLrEwPEUcP0gjxeWPZiPdgpShQMUgVDqDZAKJdhDLY1sVgBYAkTcsIAjJ9Q3W/5bugI6Q9eQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-18T17:09:43.202Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.53","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.82-renovate-autumndb-22-x-94e78dea9219e43e5987eda4ef4d4fee70d1dc03_1663521075376_0.04897716291642795","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.82":{"name":"@balena/jellyfish-client-sdk","version":"13.0.82","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.82","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0819e302c300b46625f13b96809edcb755888722","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.82.tgz","fileCount":30,"integrity":"sha512-gFkjeB9EojXDS45qGS083KcxH6SIKAyfxoKVTOJST1Ox0HMEzFr7Lif8xniHNtN37XTdh8fVrbykIefV2t0m8w==","signatures":[{"sig":"MEYCIQCYRX3XtP32GoQ3iQKAdnqc69DsMBdX2hA7yj46HbDoDwIhAJNQmNKRsZNsStscm5aDgWSF7RauGcPykrU8LwOKawlO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ1GqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmquYw/+JeV/rrJk3pXSCNFqa9ZH59JCrZ0zRIgTrIBTRgUu/akd9Tki\r\nWz+Jxb6jtkfV6CaqBOkyifZmfWeG+VTYDom4spqLHeKVy0vZrDRn/+dkNlcX\r\nLIDnupimMBSTvFWH3b4wJVlYIvPbfHle3Wa8gkKPZlCPzEylHGXjyOS2foX4\r\ndQ+zn/eqK+SD7nGyCEReQ4VT/ZLMr2o60fyFnquubgaxCu4P5PRmYHBaT2v+\r\nyt/+NLZAWnIxcfEQ64qjRpS0uk+50L+xgs8YdA23emDJzA2IUbSA/ITCM4ER\r\nXnQo9i/et43rQuTU7XD3DERU5o/DfENovz0qN3IEMLOzIpKbnV58SC2ByEXG\r\n2xRJWpaVtDJFcKnkdNOrNaTqVx8+r+l3uzgfSKjaeNppPqvjMpf2HVhbBRSF\r\nqAVSa41IZCcSTBpTCV+pBV6kgLIO5D2evpovCl+yFwQZNOtsYLFC2xmNC4fD\r\nJjnyd+OO3KeL035u0S+4Y8tp8EuN9A5D9OB70ZnHggMGaWs731siC80VL3pP\r\nUoS9X8Wf5NBSOleR+NopMqtbvomsq9a3UnpHg0/sVMphWO6wX0ultTKBSs6m\r\nCOxVnrZblCiL6u2I9wtmDBuu/HqVBLSRdHxRoMQWNV+EXeNX+rqmBi8ZJKk7\r\naN1Qwe1GXAz4pfXSMEM4cP6PnwjhEpITMUg=\r\n=21ru\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-94e78dea9219e43e5987eda4ef4d4fee70d1dc03-16.x/balena-jellyfish-client-sdk-13.0.82.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-94e78dea9219e43e5987eda4ef4d4fee70d1dc03-16.x/balena-jellyfish-client-sdk-13.0.82.tgz","_integrity":"sha512-gFkjeB9EojXDS45qGS083KcxH6SIKAyfxoKVTOJST1Ox0HMEzFr7Lif8xniHNtN37XTdh8fVrbykIefV2t0m8w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-18T17:09:43.202Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.14","autumndb":"^22.2.53","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.82_1663521194434_0.36786866027140785","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.83-renovate-typedoc-0-x-296fdec5991fb3d0832442339cd8acc39e0505e9":{"name":"@balena/jellyfish-client-sdk","version":"13.0.83-renovate-typedoc-0-x-296fdec5991fb3d0832442339cd8acc39e0505e9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.83-renovate-typedoc-0-x-296fdec5991fb3d0832442339cd8acc39e0505e9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea092a17fcdb66fea67171af46ec7a3b8099328c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.83-renovate-typedoc-0-x-296fdec5991fb3d0832442339cd8acc39e0505e9.tgz","fileCount":32,"integrity":"sha512-yx3tSUh23M0Z6TKOC4m8/5fu9pLm8voavtNh1aco4HpoINGIPSl9/0r0G7Kwt+4+3ZOfqMm+PWxATvpAeTS7Fg==","signatures":[{"sig":"MEYCIQCXQ9HVBsEbOajSH81f0BaU72WcSiOyuUxyFbdS96ia3AIhAIMWWO3UiXKbh5WXcoLCAjbN5q4zvtNJc6YMQg8pi4SI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160404,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ4FHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoxqhAAj0eN7sG2Nl6xif7nFUGbhjfP01E6LgQB6TYnIrkJTo1Pf4CB\r\nntDwy7c4ikRNqPcH3wdEGkfpqlI1hXs5XsHeANrVsoVX5LDmDC9SEOefAZBK\r\n6chtUgj027KDCf0cajZl7xo1aYRM4e/VpcSutdzTij855r6T0TW5CQ7AFvzs\r\nQa4tszPdTCKw4/Uz46/Ct0n9hvoG6yrLVq+X8CXagSBZnhYkgojRr0Gl3YCR\r\nsq2O8YwT8AQfsQRZQgG45MIhHEsNPueajIzBFq9PhWDXi61Im6EjMYTEuCC+\r\ne04yqnaQ1J72y98w9XvPGi+iBUpuVU+usZ8HCnCYTZnPKEToNKXkR9gl+053\r\nf9qznKsV1YYntJK4lAra8b9YSgZCtWWYAN8iFV3piSdRROX3icKLWoVks9tZ\r\noRsWWoqxggfXBrhhvDHy1g/SpmLn8cEFA02m7tKGX20rsGmIPRTpMk0IEziO\r\n3xeag07/Jf8OCReWmtcgYrPfW3zhUzKapRD50SegO4Ab95niUQKm6p3fUv83\r\n4Ag7FcigXCjjd6OqlaOlwZdyNumPk+vdcy8C2O3t/SKSXvZldimiIQSEY/Ht\r\nkMFOLAlnVqgmK2pOG2cLTqz9SA3WxraTGOfgldG9F1On889I1AYrxtfZoGWd\r\nwUXTBJ01GFsikIJ7r90LOYxqHRJEOd/u4GE=\r\n=ZAL5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-296fdec5991fb3d0832442339cd8acc39e0505e9-16.x/balena-jellyfish-client-sdk-13.0.83.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-296fdec5991fb3d0832442339cd8acc39e0505e9-16.x/balena-jellyfish-client-sdk-13.0.83.tgz","_integrity":"sha512-yx3tSUh23M0Z6TKOC4m8/5fu9pLm8voavtNh1aco4HpoINGIPSl9/0r0G7Kwt+4+3ZOfqMm+PWxATvpAeTS7Fg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-18T20:34:50.883Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.53","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.83-renovate-typedoc-0-x-296fdec5991fb3d0832442339cd8acc39e0505e9_1663533382883_0.8499735446030527","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.83":{"name":"@balena/jellyfish-client-sdk","version":"13.0.83","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.83","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"decaf36c53bbcc35830c34acfbfbea00e709dc54","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.83.tgz","fileCount":30,"integrity":"sha512-IxiWjm/0JF2COKgnnnAB6DcXon4GaWFd0RV5Sp5bQHwcjmcGruKv4DoDpzE3TXtzBLIFoKveEoDix23fW6+5GA==","signatures":[{"sig":"MEYCIQCeU6LEKG3NMyU2SOSV4a/XnDCNz/qRmKA8jME1CwWBtAIhAKfufCnfHzHSpfHYlJoVCs5s+QEcQErtWKcyWyhXf5kk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ4HSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDoBAAgwja0VS+VM9wyYeDro809NH0G5gfNrC77Rm8hwZxjIdNdj2L\r\n59vr4ElVXsLTVutRLtanZgLXKlBL3PYJMiN4uJIb9mqRy+pBYnWPt+vs6lMM\r\nB3KVxkRQjr31ItY7FdRjkIx5t08mn4/M/GvemUuS5h0xsTZNeDoUfai/WeTd\r\nr+xBF4rQfnkX/V0lKJ1iko8MOr+0uMptIjb7/pd8baxatF5zD0qoy36PikOM\r\nUsMHwzDjvqTvOSPVjwcIK9/UkPlwrKp1f32J08yjgSQglNyOqAw5cBjwA7Ug\r\naU09r1b12ooyua53T6s4Ot4ZAJJW4kkjleEAUf07iw9cXDiiM0d/f6s4WcnU\r\n0/LVSzltiFjn8+9lc0ARUiT3hEr/1ws30jzam/tALAiKaAqzjf221ylSZTWd\r\nPDAN1tSS+bpXBZtI1lHmeOc6mwFzgI3xoH9OnQVlOLcpfxdCbqYyHXadbMLJ\r\nGi6a+sctScDj3Dr64syKwzeD6rq5BTwRgNCUo4sN5D4+iOCXejG4xy/mLZA9\r\nXLYCvVupqN/oc2J638Lm41YdLLIT8MeUKtIDOme4htwwkx+cNtGkRodsYWh6\r\n+Wo89dVGOrm7mLLlSjZOqGWoYc9b6MQLiNkOAcaqc63Dco6YE80WMfJb+0G3\r\nt9vP5IzHJ8jWP38XNyMQvaQtj2Z2zirPXUA=\r\n=E0fD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-296fdec5991fb3d0832442339cd8acc39e0505e9-16.x/balena-jellyfish-client-sdk-13.0.83.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-296fdec5991fb3d0832442339cd8acc39e0505e9-16.x/balena-jellyfish-client-sdk-13.0.83.tgz","_integrity":"sha512-IxiWjm/0JF2COKgnnnAB6DcXon4GaWFd0RV5Sp5bQHwcjmcGruKv4DoDpzE3TXtzBLIFoKveEoDix23fW6+5GA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-18T20:34:50.883Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.53","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.83_1663533522525_0.3834743158199674","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.84-renovate-autumndb-22-x-addabfc96c7f7fb2aac033bca8716c1739bbafa5":{"name":"@balena/jellyfish-client-sdk","version":"13.0.84-renovate-autumndb-22-x-addabfc96c7f7fb2aac033bca8716c1739bbafa5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.84-renovate-autumndb-22-x-addabfc96c7f7fb2aac033bca8716c1739bbafa5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f4e818c5f94fb3a8c42db402c1fc138953492020","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.84-renovate-autumndb-22-x-addabfc96c7f7fb2aac033bca8716c1739bbafa5.tgz","fileCount":32,"integrity":"sha512-5hrZUNzViz6hjuj2sPNSFglm4wrNrEJHFu4O4oPm2yMkB4Ub8JH8lmA0bybf+Z+tNVdqFUOwXzOdaCE7hReaRA==","signatures":[{"sig":"MEUCIHU+wgJ7+MfEpVHUaZwxK4CZCJtbM2DXeA+jYgrq7oD1AiEAqD9ikiaicc5Esis3G1WZ6BxXtWVfjEkOtWY8dIPktds=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ6WPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriRw//dj+KLs+RiN/muDdPjo4JqjVf+8d2P8D4wS1kZCMH6MqA11us\r\nuWJIXyEsugMd6UaejbAXTf9yA6YN33qsKFZ0eaPzCEnBn7VHplK5bWKaDHag\r\nJXUkbuA4RarQ3M1RW2wv4PG2jfODF3MfRTigcUGvzfhl34QIYEax1LU6cqH4\r\nVQm/mk5beqqYInLpa6vg1Sjwg3Kp8gRAhKGEB/vuwl+ZfKMy2hrLkOOyuqQM\r\n6pA11Nskd9J7XQYezQ7jR5K8bB+ks1BumFMi5sPpo10HLWmhQIugCYg4repb\r\nxSn/hzqVBXPCB7FHKTlQX9R8Xw2cpvJp70pz0cinWj9U1RitYmCKTMyMGxKB\r\nHjEN1FW78Vk+j/fa7GZEoKbxAu+APJpVEFr19WSrPwR0RDuqzo2GGyQAQlDK\r\nhciv7M/OEGHOkwOR/C65dGPnIhzlsiiMU/q3KfGFEYhUywsDElHP6MaFLHGC\r\nytcaiL14ylauYmxXXaJOUeHAgyAz61dBNYLfbfgW52CDIM5zf7+aSCIDPJWL\r\nZW23tZB2YCxKID2/pkFrCBF+B1UHVe8PEpJ/xyKD6GzSXKbUp9pjjmfsWwh+\r\nN94bXTCHARU7BeQy5VNNVolhWtUXcpalyO3oDlkX5jNwpwVCihCcmUZeuFio\r\nAWxBsXNtl/VWrYyaGp+ykxWaVygWZ2kQ4Qc=\r\n=XSvw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-addabfc96c7f7fb2aac033bca8716c1739bbafa5-16.x/balena-jellyfish-client-sdk-13.0.84.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-addabfc96c7f7fb2aac033bca8716c1739bbafa5-16.x/balena-jellyfish-client-sdk-13.0.84.tgz","_integrity":"sha512-5hrZUNzViz6hjuj2sPNSFglm4wrNrEJHFu4O4oPm2yMkB4Ub8JH8lmA0bybf+Z+tNVdqFUOwXzOdaCE7hReaRA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-18T23:09:42.893Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.55","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.84-renovate-autumndb-22-x-addabfc96c7f7fb2aac033bca8716c1739bbafa5_1663542671220_0.7545267197390528","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.84":{"name":"@balena/jellyfish-client-sdk","version":"13.0.84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b7dc1effe93e5868a15ab8d0cb6010d13fa81713","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.84.tgz","fileCount":30,"integrity":"sha512-UmKKjzWUYQ6+ztP9v2A7YqALpCYTgGJB685dIABXVrt5rlzCRVOr0MKfdP3zx9lMLtr18xDCUoCPACHc1IPBHQ==","signatures":[{"sig":"MEYCIQCFnNvQIeEpD27GOa6UlJaDXE7EOplvd/qx+zWROWBSSgIhALZCPqJhrJb8xDYYYxsjgw9lxxKgGqBlo8pe1r1Bk0EJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ6YPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQwxAAkn3Fb/t21Sw5YpdfIQhdf9rIoDLwBv6U51wTl5eRtleJ/7+O\r\nHnUMfdQmCj35PvuMkbP/xg5ztmfvaVkca2AcvAfQ1hQqLlJQhIK2NGd+L/xi\r\ngkjngshPYsnlQl1jZtF3YS62NeecYOtBeJZEqMYtGXwVta3WTBUMlp+X6+8o\r\nNeMgBUkQ1T2LwWwBHmURzheD1hGW6bwEdbs0OUqJekLYs+rCHvdwv9R7w/uS\r\nCdSO/nlrQ5WZsTtRklaUYv8xhOjjCFBB+xU7Pyw5GJI/kUGXUJLEDPNKkOxC\r\nq6STnYVISN37o00bskUqfWUp28Ekym3zhxLTcJmQVcrciBjk2knfWGaHWwxZ\r\n4CLIUrCLGJD+O1Z7eJ8sjh/IEdRj8hXFE5qZw1sJcJNwcky6PB4ySHLE1/Pa\r\n0S6IJ8f9qqZFYdAY86lvC+84vFjXU0wEMMfp3h+qyUPnM9ynKAKjGvF8xavB\r\nqQGbsBdohRI2cx4wzaTEpX3M3A8qzi7ggUXklo9Plj+ooSxMWTb//ljEDZZ/\r\n7zc1jEVtzoiFnudOYLblhQLP6voPwAls7oJ2CNimJlBCNiASlGojr6dO7zmM\r\nZns3hK87tVDyKmJgPJ8NIuI/Rm+DCMajbqFMRL5Woi8UU4KKAC97M2jfS1hv\r\nV6HQkWYcxGYywN3qrzZgKXml5q7VEgOezmA=\r\n=rj88\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-addabfc96c7f7fb2aac033bca8716c1739bbafa5-16.x/balena-jellyfish-client-sdk-13.0.84.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-addabfc96c7f7fb2aac033bca8716c1739bbafa5-16.x/balena-jellyfish-client-sdk-13.0.84.tgz","_integrity":"sha512-UmKKjzWUYQ6+ztP9v2A7YqALpCYTgGJB685dIABXVrt5rlzCRVOr0MKfdP3zx9lMLtr18xDCUoCPACHc1IPBHQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-18T23:09:42.893Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.55","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.84_1663542798737_0.9507062382839244","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.85-renovate-autumndb-22-x-002d0a957f75392c7b54d54b525f1b8cdd226e1d":{"name":"@balena/jellyfish-client-sdk","version":"13.0.85-renovate-autumndb-22-x-002d0a957f75392c7b54d54b525f1b8cdd226e1d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.85-renovate-autumndb-22-x-002d0a957f75392c7b54d54b525f1b8cdd226e1d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"03ca8e31875634ac177cc035a66b9f4e7441d41d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.85-renovate-autumndb-22-x-002d0a957f75392c7b54d54b525f1b8cdd226e1d.tgz","fileCount":32,"integrity":"sha512-pHF6hP969iRj2ckLpBKsXX1oNB9uVSAX5ANBN8vdkDdOZKoQBsGMCYcegymxUtIzdElGyU9uHVuwsiOYhuY+qA==","signatures":[{"sig":"MEQCICJ+cdMY8261e7vlYgAb+m3xIDUa9BNSFI8mMny+TiKbAiA4688QH1jepGK+o0d81SfwrB4Xxe4V5F9dhf0/qMw1Zg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ9JOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6OQ/6AiyrBIiz2L6d5e7w10XwYaAAI83PseVsv97M70/l6sULD3vn\r\nzbTvhEvSAimIpbM7YBQhzffYxn9AgnEsKY2DRD8ug4gdK5dPTxB2JLS5+a5o\r\nzKWYeJF0TlczQ61z5EIR+aLULAuovir0NYmPlXtAh/LSpQvjnJY+KUAKkUXn\r\ngcYeCUiqOVulXf+zOQefxH1OCV5El16RhTxoioKrVYJbd7LKD5pWxo6Hx3/N\r\ngADggSczWvh/wIgzzczNB6eySQHihP69uYRlzVHbgyAzyr5FMZV8BfdABKpn\r\noc7tVz1gkx8aEHSSR5zsC9uJxPQkPnjMUCV388IWwo7n+3zeSD/UZsiVV5or\r\niLjqiIiKRd+9Cx4H1cppgVR7AXTNyDpSROBdnpuefSFGz37nIqDuvEzkVSIK\r\nU1o+eW5o1kfFCI0y7enbHIEGX8/6SEGjsjTFjwVuAbeezou5awekCC7NRaR4\r\n516tKHYDle7PXd43jaaIN5WtOm2P8DS6COyJAaiQNXd19eY1B7f3TJLtbhA0\r\nMqrF2Jm9ThkVd1QsxLfaXekjf3oR85IrAhY6zqz+TIG+h7ofOpX0tjMVYNYV\r\nry1EDLQmGMj9RhYUK5pdHUuUCAGnbdfJ5YV912jh37ohVnfWAu/36UO0o1CF\r\nsWwQHYBSYAEOzZr3pqJeEJXYv9YQ5uTn8/A=\r\n=2x6h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-002d0a957f75392c7b54d54b525f1b8cdd226e1d-16.x/balena-jellyfish-client-sdk-13.0.85.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-002d0a957f75392c7b54d54b525f1b8cdd226e1d-16.x/balena-jellyfish-client-sdk-13.0.85.tgz","_integrity":"sha512-pHF6hP969iRj2ckLpBKsXX1oNB9uVSAX5ANBN8vdkDdOZKoQBsGMCYcegymxUtIzdElGyU9uHVuwsiOYhuY+qA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T02:20:33.931Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.57","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.85-renovate-autumndb-22-x-002d0a957f75392c7b54d54b525f1b8cdd226e1d_1663554125940_0.08637928344498436","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.85":{"name":"@balena/jellyfish-client-sdk","version":"13.0.85","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.85","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"66763e484be8bdc50a4bdfcfef1f51bd0aea2536","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.85.tgz","fileCount":30,"integrity":"sha512-+gvkmJ5W/qaTqYLPoeSOH0XrR3JfBJrpoXmPIGBPc+gg7aZENSDhS9nIyVPqohH/Kqqd8TyOTVyp3eeJJFNkbQ==","signatures":[{"sig":"MEUCIHeSUO9XlRzyPUtz2Tj1iusv3//s9vnmL1LtHaVHVXKWAiEA79E7Q/x0y9iTRYiJTed2QboFA5YHg97ys3JQI41juF8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ9LOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVeg/8DVzUlRLVS1FnqgwnCXX+RC0QafeDZuD8eoLZO+gUZ3u/2enn\r\nVpUcT6FLjVTcpHU89pINsTsHEzhzqBInOhX/nYX9K8oh2yi48DOTPqzojLLZ\r\nMnq+iR3YZTyOgUmCO+OAHQgt9l11v+CXnXA1eXq2vow3JoNK5v9K1oh1Ftyu\r\n4fhQOQcI1uYo4v212KhfqBdcYplmEwX00eQyNGxWspzmA/GH2hhwGfT348PU\r\njZu/IPFBN1+rzHT7mXC0mgJd+0S5NjNRf3g763BropfQrG2MuZtjNbNCf/b2\r\nrZZOj8bqtKPbjrVa0/yKAoHNDqA9yRhOafDwQuteN0MRZ3kaU3xTa/O9L0Em\r\nsjufeCArnyCC17LIzI6+ABNdWBTghcVYxFL4wp6rbZ2OOIeFTqep4xTz1KpF\r\nXdAQp8+ZMs1g2dmAoK0ZrVqYRnIIgc91I2l2um/EtKCFr217HCV78ZgfodlO\r\nuEw/gsWvz1wBX5hzUcupz1lqTJovBfzzieQgJrVao2PiZo75pp0mDqBgVyab\r\nKNFgiNLkMLcI3XcQZJQUgZ/Ya3+98ScU81qY73CM8TXVNvkTkJCFkt/Aplzc\r\nZn8nutc0tnzld/nWY9NYezAVBMGYGFiHUw8AtePci3ChCqJH9CQTpc2vdxWd\r\nEDlNcGjfxkp0Bo1d7G2FOAxh1ymI41ctu7Q=\r\n=MUPP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-002d0a957f75392c7b54d54b525f1b8cdd226e1d-16.x/balena-jellyfish-client-sdk-13.0.85.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-002d0a957f75392c7b54d54b525f1b8cdd226e1d-16.x/balena-jellyfish-client-sdk-13.0.85.tgz","_integrity":"sha512-+gvkmJ5W/qaTqYLPoeSOH0XrR3JfBJrpoXmPIGBPc+gg7aZENSDhS9nIyVPqohH/Kqqd8TyOTVyp3eeJJFNkbQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T02:20:33.931Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.57","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.85_1663554254054_0.7652700706530053","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.86-joshbwlng-nvmrc-f67ee66328120ab07c2d4558bb97fe313be84407":{"name":"@balena/jellyfish-client-sdk","version":"13.0.86-joshbwlng-nvmrc-f67ee66328120ab07c2d4558bb97fe313be84407","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.86-joshbwlng-nvmrc-f67ee66328120ab07c2d4558bb97fe313be84407","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"deeef4584f3e06759df65708b30a12dd505331b2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.86-joshbwlng-nvmrc-f67ee66328120ab07c2d4558bb97fe313be84407.tgz","fileCount":32,"integrity":"sha512-8bSpOsx6yimLHrNhoY3DAjgHWLcQ9bC7A1zQFlmknj+9oWbco+RSm1DXEuHxwy8orx0psFEYi+ilHI7t5ymO4g==","signatures":[{"sig":"MEUCIQDUY94e/6Kg4+asTFTqmBPOhqrKdyc0AD78Ty8bQGOZiQIgXtv8MYqpljULTVw6UkBk/J1ho0KMBVSe5wgKL+oROMM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ+95ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp8kQ/9EwXmd5r8Vxfhetk6XUn/LAd2pTfrSWp+2jBcLKxJfFwIowG3\r\n93UbRlC5UMD5r0+DvqrQe+CFqfxzUfjvR+oeFVbvHv9Ky3J2s1Dv744of3r1\r\ncEDqqnPXYTrYm3G0FyJQqTqFCUu2PLl6eH7wwD7srZzjB+IE2ah78yFBnFdd\r\nHLEZJDzE3usfKMuumSc55XIoZnDfhjCuurcMvbee0fMXEb4NAPkRdqoLyWqE\r\nzVKnsqMlabw0EAIwsF3P/7/816m3ufM8iPTrZJ9LSdfF1+ZXAJpiRlYK9uy1\r\ne83ewigoUhrhu+YS7DuDDhC3NszwfmW/p9aGkdGyCaeOB0Df3aazxEJ2mj/S\r\n6RKRhBsOWUDmwMEtxSCPJ2V0jZsIskfEc2ZmY8PLEISpxYxAHLiLCQjFNOUS\r\nfBhhN1qACNatxhsP0HW8RIHjc7ZrVYRFHuH6EDNirI1487nd3tg9YSy/fCw1\r\nE/2E0k4L3ey2VDMntBpgZ0UrxTGDwLLpjJigzWkESdtyA5ehbK2kYydj6UI6\r\net5Ua6m/jRB4Csa8S9czfbavFo+QH/PaR3aZiqsjBMZcbivbZ0R3KslCUSw9\r\nLQlVTkFxLTM18/yBSlgQc0thzvmNNhZqdXMNxF8lhG/ED0YKaQV9M/jJC+Mv\r\nLFfE8SewqF1PRLxCsGsL2TUQjRz8mDAlC6E=\r\n=Yp+/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-f67ee66328120ab07c2d4558bb97fe313be84407-16.x/balena-jellyfish-client-sdk-13.0.86.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-f67ee66328120ab07c2d4558bb97fe313be84407-16.x/balena-jellyfish-client-sdk-13.0.86.tgz","_integrity":"sha512-8bSpOsx6yimLHrNhoY3DAjgHWLcQ9bC7A1zQFlmknj+9oWbco+RSm1DXEuHxwy8orx0psFEYi+ilHI7t5ymO4g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T04:25:01.632Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.57","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.86-joshbwlng-nvmrc-f67ee66328120ab07c2d4558bb97fe313be84407_1663561593549_0.30123477395161746","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.86":{"name":"@balena/jellyfish-client-sdk","version":"13.0.86","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.86","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c50ce4929ffc46be723cd54b909e22f3a45e7ab4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.86.tgz","fileCount":30,"integrity":"sha512-SCz5MLSr4ueHj2OERWNBAap5bCoxGA58DCZq0fFrf9vUf0KhNNfQ0Jui2iqy/b6rp/m40jLVZtb4FdtPEprrKg==","signatures":[{"sig":"MEUCICEx19eAYYGFQQnPaV7MPmK2i4wkj9/arh/7eSHzkc0kAiEAldcrIIgf74EWk1TgKzGGmynmZyg1sqiE42w237ZFXow=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ+/1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoICw//XaLnWIj9tZw1p+sWV2k+spkfqIN6cxBOPwXaSj37FLdGePhG\r\nvVFWVOY8t/Da4cruclEUn11S/tYmkG7phag6hXSc+yC7P8hqHnu7TIm7DJYD\r\nAepjNChTUUrhhDNC474E/TBqUl/zc+h4T6lNLPLK+i8fG65psEJiEAruO8Cp\r\ntJrht5wOtPHyCKUmTvLxlO8GF98+QgcVkH/n/7m4yQOytXcJQWHvYtGB0SL5\r\ntU60zwCsuejwWK2q1Is7X+2ws9Ee0w1jJs9FO/lG3fdTb1Jz8bOJ17s5voVM\r\nOmAWFHirbT5HqTYpyAba/PGVnzNfsFuPMQz8QHPRRo2xt67gm9r5wExnG5qq\r\n+nRUPCfoDuojvzqptPS4h9wloROJhC6qDmeOGYK9b091AkOmMD+u4VFWC9Ds\r\nTECW5wo9pNyxM2xKz8D4GR6DEJJ3azObtzsVtT+h0zs2Pzd4tnTxbbLtUw5r\r\nuwCdGmCkvcb/DPnTVQPBPqdxjQ1Y6CwNz0uVYPEVQgOLJWW4IhuDmBCQ5Y1r\r\nf/Y+hnNh6ERrFypa0zDF8NWZ9x4C2FuRnFlu6PEbdMRrblxTP8YT1t0to/pU\r\nI66I0TPvkYsenXKRwOlOiUOP9btwuDI44MfNfT+NcKx+MkzcAzxksvMWztXr\r\nNAuWLkS72FftN5jEAOwWrV3IMUgS1gwvJ6k=\r\n=3r6F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-f67ee66328120ab07c2d4558bb97fe313be84407-16.x/balena-jellyfish-client-sdk-13.0.86.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-f67ee66328120ab07c2d4558bb97fe313be84407-16.x/balena-jellyfish-client-sdk-13.0.86.tgz","_integrity":"sha512-SCz5MLSr4ueHj2OERWNBAap5bCoxGA58DCZq0fFrf9vUf0KhNNfQ0Jui2iqy/b6rp/m40jLVZtb4FdtPEprrKg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T04:25:01.632Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.57","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.86_1663561717557_0.591354355988529","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.87-renovate-autumndb-22-x-7f8122d627824d6de26beb96634083c9a4d51007":{"name":"@balena/jellyfish-client-sdk","version":"13.0.87-renovate-autumndb-22-x-7f8122d627824d6de26beb96634083c9a4d51007","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.87-renovate-autumndb-22-x-7f8122d627824d6de26beb96634083c9a4d51007","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2b2763fb541befbc1735ba1d10a3868f8fac3a8b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.87-renovate-autumndb-22-x-7f8122d627824d6de26beb96634083c9a4d51007.tgz","fileCount":32,"integrity":"sha512-jHSn68+5EN5bOV7TQPo6PeOkEROjj0qAIKgEVTWrZB7AXw3nGNXSonP8qA7WVnGSbnR4PGzStZ9VYS5tO+2L6A==","signatures":[{"sig":"MEQCIH7pDes/8ds0jXb7W9U+lvLA1UorpAtgXh3ylgdPCLu0AiAJDG+Am3nz15h/0S8Svi1Sc2IiN77VcNi6GmAs5MCgXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ/CSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrYIg/+NCuIJnPCmvyjl1o9xsqK6IVDNnNEFvEA8A8D+lno+QLqvhqr\r\nuULEovcfCY9FSjL7hvNuFNgN9IwzCPnchzRr8+2XAz1Hw3NOIv0TJTcGmIsO\r\nWEtCO0DH4ggDPgY3BX4TVbbu2QF3QrTxjQvaVijBn6CRbOHGw9mTW0bY6NF3\r\nGLYVbn1tDEEP9f4zTB/AYkUQU3Jm1H39U0g3r3NR6SPEfG1K5NZn3jpvhI5S\r\nGnDTbeWSsBj53gcWbFcix1c+n8fm/FC0zCc20kj1IOewL5+UTF+yJANXjRSO\r\nzKdGaBvO9/Pu641fG1EkTApteTmx+xJBnNfPZndTCrG7rB9VRoowm2KgNIfR\r\nYApHZjUN99FIxoO/iqeIl/NyORmnnACjcb6lHRyLSQ/oK3b9JT9ZmWXQlbVe\r\nG5cftSJSb0q2SoUY9bES07clbvz8bCPDxQSZ7C8G++F+pg4G6XUR9CzPoVnD\r\neG0bTbwvh3Y/0nv5Gg+/yLUm0hGgrmm5K4fvr040pFFKPC4tTSe2nJAw3gdL\r\nLQdYRVwsZv76tPowYURch5pUvYbt7fcf1+k70gEfqvj2MieQOC2qYHdmhLLr\r\nBrTApbP59wUV60bSj8DygYQljQsNVaqwU9w7xjMk2exVI+g48SqgUqHpBYPy\r\n0H2jXlDkWCn77U0xvPhHnCF/zNK+2TjzlQ0=\r\n=ppLA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-7f8122d627824d6de26beb96634083c9a4d51007-16.x/balena-jellyfish-client-sdk-13.0.87.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-7f8122d627824d6de26beb96634083c9a4d51007-16.x/balena-jellyfish-client-sdk-13.0.87.tgz","_integrity":"sha512-jHSn68+5EN5bOV7TQPo6PeOkEROjj0qAIKgEVTWrZB7AXw3nGNXSonP8qA7WVnGSbnR4PGzStZ9VYS5tO+2L6A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T04:29:52.271Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.59","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.87-renovate-autumndb-22-x-7f8122d627824d6de26beb96634083c9a4d51007_1663561874721_0.636316295242858","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.87":{"name":"@balena/jellyfish-client-sdk","version":"13.0.87","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.87","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"446bd41f7e5d5d1669ee38a25a347525d6e9e13d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.87.tgz","fileCount":30,"integrity":"sha512-PaRIvjubYCZtmHzV3qIu9+y2d5liPO7pWil5oZQtdMibN3ds3k8j0naUbWGRNDCKp8AK3La3TLthPi0R+w7p4g==","signatures":[{"sig":"MEQCIEC25z16978+skzrROx9Xt+hsngskGSkeVB+74dur1WdAiAmDV0kZyrPWTJGLugf/OmM4ZSAqkPcg7PuU/5WgAQ0cA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJ/EWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhPw//afcSz9FE2gjR0SCNWVKTdzQ/jn4EwJaa+Vx1Iv8Bc/3L11Tm\r\nsB1WNki1c5CH5uwyzP0EIbZhAYTAuiJ3CBCVlRc7E2mQ1mo2AYrjeQ1zs41R\r\n43vvxGJfU1Cberf0q67a6fjxKLLK8dJlHdNW9pk/mXyrwd8VkL/IwpPzFOyr\r\neuGI1eKEa6Gzvx8zM+/EWMtsNk93w69btkygjoWJF2wdbC8AHR33zWifTpSC\r\nvHRPH2KmSfjgB0gOoaNkhkOmSWxGySsWNpBnuMZ5NQu0zmzl9/m6eT9zhurj\r\n5RtAHey+l4JDKkl4Ya/dhOJiVVkkRk3InNa3ATm5hRw1HCs+canGNqbkw9Q8\r\nkdS8PhVmFX/pHQkaqsJiAGIQgV4ipTUv9zvBrp/GclYIAFpA5QDN1dysa5cX\r\ndBQojuXU8g0NJ6JR6bMp39pYU3axU8yk+7kz2OU54Gyw+Dkzs2ChfABowJB9\r\nLKUnVkL7F2sFFWLPfXwY9CzPNIKiLibUnLNvP61STry4X7Vna2RAynM7GzkD\r\nkQolt7RvRk9YHOgEd84ZRegJJcG+B/pQPnc08oMMvQxTqtOabJ0MDUp3JOhI\r\nepuweA0nu2a93i4+Olew3pV9l0od0GIWXS1SI6+AX8/cvCBTYlUGYNeVtezG\r\njm6b4oCis2zUEkCgoPrCbO4gtkCYdQ/6bwY=\r\n=qqaH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-7f8122d627824d6de26beb96634083c9a4d51007-16.x/balena-jellyfish-client-sdk-13.0.87.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-7f8122d627824d6de26beb96634083c9a4d51007-16.x/balena-jellyfish-client-sdk-13.0.87.tgz","_integrity":"sha512-PaRIvjubYCZtmHzV3qIu9+y2d5liPO7pWil5oZQtdMibN3ds3k8j0naUbWGRNDCKp8AK3La3TLthPi0R+w7p4g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T04:29:52.271Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.59","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.87_1663562006383_0.6773654228721946","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.88-joshbwlng-codeql-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0":{"name":"@balena/jellyfish-client-sdk","version":"13.0.88-joshbwlng-codeql-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.88-joshbwlng-codeql-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3cf2065497f7cf318b1f248496315e8ba078e724","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.88-joshbwlng-codeql-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0.tgz","fileCount":32,"integrity":"sha512-VzsfOmMPro4DFLKWCyKIIZW3dKZ3KhZr02hc5XaFHsJRocas3E4Gvol+nIobbO5SqmlWZHlWd5VGCGhinDnF0g==","signatures":[{"sig":"MEYCIQDy4IuNh/3KWYRHR/yPu2CUfIMizNHLl4AoD2nbp0ChQAIhAIL6Ce4FdSenq4JZ6s5Y+YDl/mBdT3f86aV+j2oD4Xh2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKBV2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNoBAAmkkplHbmtjCFSd7c5ZbtjbxK75w71zFD3WKkyGaQlElvnAfr\r\nTOGlOhW9CuYI7O6iw3oTGEWHDS4sOsukUS31GaLdOhxp3Lzk7BBJAquhebpw\r\nlK1NQtZC5gmeITy5Rrw9DaL7C1LDxTLx6ovrWvUPjejcI2c+lAhC7Jw/ilHA\r\nEC55FQ1R0bl8xUqcNiSp1Z+DNcUcReX0DyeS4IqpjfZ1OavVbQuiPzqHhxTc\r\nSR/A0wuQfGlqa1Fgi9jyBrBzb1sRQu/s5exhyZYs5s6HkSM/J2EwYirDz7uI\r\n0rtH070XabnnWnyX40JOWiKVb6nrAGz1RygZyt+FmqVyzb789gX3b0ReuKDV\r\nTn+9QERMcM4LsImjWKYl0OGVEkYRTVUUoyERKu0kzi4MSTgvjJWcSQT40ay3\r\nkjRVP/nblyOma/xGbM01L1nk8v0BSXyYMhJXQqM4JnwYyIqedy9iQ245KZaQ\r\noc2nAX2uo9imnSlK2UxGsq85rKAg3w2BQ7h2qn08sb/u8VJ+zObgw5PfXJf9\r\ntw8jXXQjXDZSBxtGxHeJoE+BMEXduoFRZ8EgHvLZxOSFkjFr6DAs/PDWZKQb\r\n5XAVOP9pujPuW4QeGmskYoW83GwIUMWTSm0qsniahr5WN3Ooou8oTPYI3gOj\r\n5MZHveFZcul0CLg7tXJLaeyphuKbhuR6N5k=\r\n=Mst9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0-16.x/balena-jellyfish-client-sdk-13.0.88.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0-16.x/balena-jellyfish-client-sdk-13.0.88.tgz","_integrity":"sha512-VzsfOmMPro4DFLKWCyKIIZW3dKZ3KhZr02hc5XaFHsJRocas3E4Gvol+nIobbO5SqmlWZHlWd5VGCGhinDnF0g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T07:07:13.150Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.59","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.88-joshbwlng-codeql-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0_1663571318776_0.3600229226223368","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.88":{"name":"@balena/jellyfish-client-sdk","version":"13.0.88","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.88","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cb80bfccbf3e96060d436b5f176157133c482a5b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.88.tgz","fileCount":30,"integrity":"sha512-iPO0Xk4r84RRK6MSxkG1xPQte5soBGNqvgksWkjhle/qrZRPixMbdd+9jHrEwrHz6/pYwW7tZSTyWry/0jGL7A==","signatures":[{"sig":"MEUCIHmsOOWC3B8933KOvBI12MVl1udMP3LiCyB6hu2rS/95AiEAgrVcRksm2DfgPetarof8n+pkTrHlayOAQKlQJnSbVv8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKBYHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQvw//QMk3gfyp7Q7iqRDcbZ4LcxOU+ij94vnDGsUFBStN0DX9SJSN\r\nzBn67XSsWGQM8DCOnmLX2SAK/3gndKXeE5c9i6VX6hh2dHZB/M8bGeGd4jpa\r\nAUOHD9CcShmVKSh9/ebTLaahgSr5HDZOH7q3pquRGg5KWupz2Q15Z149Z/Yv\r\nO+9Z/EOIt2Hu18li/IiKTeMQdqvWfovHzPBmGSitnNwTfyAYE+ADKeLrDY0T\r\ngCJQx35kMY34w9ye1J4d2PlTrd0pe7TSB7sJfGuEQGG4e/PGi+a8H94hHcHk\r\nH9sEzUAZdzfFrk8PMdlRVcVcH1NJaCv+Kdst1wxUjobWnCWPu0DVDIXM0EEI\r\nVh9gJjOrbxggMv/3L1ogOGbconVh3OeC0hvrE6j6JOCMpTDj9tPB3xv7mN/P\r\nqTn0hKSd65WzB9XbBiVhQ3B/wVHdq+UBD8oiqI0LnjBXWhGTWaNPKNUFay5g\r\n5v8a4GYEm09VsjT05Sa/NgyRkWuJrVSuHrihbif75d4rrxJeF1kq22Bf2O1O\r\nUwU9XzhZM0AD6/bj8A8DEomJ65viBIOxvCN9AIP556I374UnGRDZv5r5hAul\r\nwfV8v/BckbGDsm2mI5wmIGPogrBgr9kAnJE70OkI/J/9grA2YEora7OtChSC\r\nfjil2vl/cKT8kanSKK059JVk3DNY5zDuNuo=\r\n=EtY3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0-16.x/balena-jellyfish-client-sdk-13.0.88.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0-16.x/balena-jellyfish-client-sdk-13.0.88.tgz","_integrity":"sha512-iPO0Xk4r84RRK6MSxkG1xPQte5soBGNqvgksWkjhle/qrZRPixMbdd+9jHrEwrHz6/pYwW7tZSTyWry/0jGL7A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T07:07:13.150Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.59","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.88_1663571463518_0.572523270065213","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.89-renovate-autumndb-22-x-8adb8b2068385684869b00af8d09768a1d2eefa7":{"name":"@balena/jellyfish-client-sdk","version":"13.0.89-renovate-autumndb-22-x-8adb8b2068385684869b00af8d09768a1d2eefa7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.89-renovate-autumndb-22-x-8adb8b2068385684869b00af8d09768a1d2eefa7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c7b9e9aa655af9b6aed52814d67b47010e3a99d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.89-renovate-autumndb-22-x-8adb8b2068385684869b00af8d09768a1d2eefa7.tgz","fileCount":32,"integrity":"sha512-vrMW2Z4d5vpCXy1Ld8ZEDQQwaspDJ6Gwf1WnjJOttjAlyjT+xVziXk7AswLFpMC+6OVLqMVsLPXPNfA7h91WsQ==","signatures":[{"sig":"MEYCIQCMmIn90uulL0IOCsGXL5xfL+dTyXqEc2a6C8qaAIQBMAIhANr3cxdCEhD2CmM/RCTxgvqNeVix8sgBMi2xrwusUDBg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKBaqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPCw/6Albxyaap7vmAr51eQ0icW5AnU1szoRtm8Fgd/IRzdwOzFhId\r\nNMcu6fprQHmiyCXF5CQajjDzKawrEkSgsUzmLoHpTY3YAQGlikdh0TdaG+uN\r\nL2G48cUECY4p3X5w+nXzgTbNXcwyJhAnfF1Bfmh59Zpp+F22hRgtIrYkH2hX\r\n7QCUiqA/SDamQSno0qog/KblpRoT8P8ESRurJLt/V9brPd7s43ogYbSoWNUF\r\n0nYi3w0VN5mtjX7uIUO0vZus7WM/vJKfjwx8mPpw5c7NgA0RL8myqofWl/0c\r\nTLOyxpYJAkP3ogFfmdlTYCTmnsP5+J+sOeIaNn4C5HkcMPWsDfSG4IPZsm0W\r\nexZot557WsmD1XCqwfIPMDVZ4jurhSpZxOw65JWGB/zKNvYhH10r9REvZmHf\r\n1jN8us4iituSwwkys2mM4yIS7NG80snR715GknMdhW92KEG0EqR7a2o7nLXy\r\nH4d3PdfCwqUEqJzkVlnkVwESR6s/GGOhWx1+vzMUypdkWUB8OFo+rKIZvrZF\r\ngQTScL7fsnFxPp0MfskgCJfz7yTeoRHFOqzxtVSUtcU9x9LeB5isVwSaSN28\r\n/KLdES+8AEiYQFO7sDVEODfh2yR0JbxsIoYjuBm3Y63M5UpY8Di7O/uucsOQ\r\nb3M8DePF0PQDlerDXr5xG5isA901u8LJ3nI=\r\n=6wew\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-8adb8b2068385684869b00af8d09768a1d2eefa7-16.x/balena-jellyfish-client-sdk-13.0.89.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-8adb8b2068385684869b00af8d09768a1d2eefa7-16.x/balena-jellyfish-client-sdk-13.0.89.tgz","_integrity":"sha512-vrMW2Z4d5vpCXy1Ld8ZEDQQwaspDJ6Gwf1WnjJOttjAlyjT+xVziXk7AswLFpMC+6OVLqMVsLPXPNfA7h91WsQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T07:12:18.664Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.62","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.89-renovate-autumndb-22-x-8adb8b2068385684869b00af8d09768a1d2eefa7_1663571626157_0.5162224946162124","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.89":{"name":"@balena/jellyfish-client-sdk","version":"13.0.89","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.89","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"980bc2f3ecd74ca834f71baeb846f8d70a9a8fec","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.89.tgz","fileCount":30,"integrity":"sha512-mlGBD7om6N2EQPdQrBnQ8guvNEEXQZmCeTdkq6kthKsMMPDJYc/90g1yNkesh4hNLY6Oc4VUr1Luv/t2fa5paw==","signatures":[{"sig":"MEQCIDljon5Jqcik/nRTaZAuTp42RRgARGKVwhD1KGFcuRZWAiB/hPwCdZ3i+cX+0rbSr35Gnikp9igzwKozr0eMR6lKCA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKBcoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrtzw//Yho62MZiSutxQ0Zy/Ag1nN6FoWMLdN4oBtS6E8WbjRxlrHEu\r\nciPBPnwd+bTcUwrI//VQVhwHS+P5sr5lp6wE29Pqamb8ovmt0cCceQ+O9kbp\r\nVVh1uCC41s/za+fS9htvUOxiRRef7aCXmuFLqQhfcT+zpRvVslRal2DVag6O\r\ntHZp0BAb+pEj8hvqbhHuPVzfvQNT9bNHq/R09KOmtKE5oG8R6O5S+l7YC2RP\r\nq94a6eJM+zg0j60vXOAU0cwN5xMpimq4a04gJOkhSabQNwpDWxxtP8WvRoaz\r\nS+OG523yVvry2vJD86ZPGLHvtJ8//gA/+AG0OU6yea67g0yR44d1A6H7UFYS\r\nttoQYAeAuPQ13eeWf7hVAb1yJGcBH/CMur7ktGoEqOPlipft4IYqM8G6D3RL\r\n12DUfiYc8QzFO1jOTnPgZKOeOf9NsiS2VEw8ohnTcr1XG4XW2wD0uk/OWSAA\r\nT6po+o6A4HhhXjE1JbFht1R11FNmC41/luWFih+mKr0DQ2YM9bf7+BpNNOGI\r\nLC7nWT0jN8JJyT6xHd2Z2pPSWpLgI58/YJFAv67kZ4zkf7UEm4A3nwBLZFtW\r\nNiEpA1K7+gdb/nrzKwdXYMPcHU/wYJu9VrAB2ZrWnxdNPEdL2sW/hFAcr4tv\r\n7p95FA36DOziDhV7Yh8aE5NME0o7w/iJRYM=\r\n=lqIq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-8adb8b2068385684869b00af8d09768a1d2eefa7-16.x/balena-jellyfish-client-sdk-13.0.89.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-8adb8b2068385684869b00af8d09768a1d2eefa7-16.x/balena-jellyfish-client-sdk-13.0.89.tgz","_integrity":"sha512-mlGBD7om6N2EQPdQrBnQ8guvNEEXQZmCeTdkq6kthKsMMPDJYc/90g1yNkesh4hNLY6Oc4VUr1Luv/t2fa5paw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T07:12:18.664Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.62","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.89_1663571751816_0.006706701255309033","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.90-joshbwlng-move-codeql-04f8015d3407afc961889e607b24ac4620ad5eb3":{"name":"@balena/jellyfish-client-sdk","version":"13.0.90-joshbwlng-move-codeql-04f8015d3407afc961889e607b24ac4620ad5eb3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.90-joshbwlng-move-codeql-04f8015d3407afc961889e607b24ac4620ad5eb3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e6678bd186f6bc279b15203d1a89650f8b60e40b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.90-joshbwlng-move-codeql-04f8015d3407afc961889e607b24ac4620ad5eb3.tgz","fileCount":32,"integrity":"sha512-U39zRzswlOjD+E9sVMj3LRVOAtWlWIamg49b+umFbEtqOXHcs7rFg2zYDBYyO7nLei1Iq0s2/C5zUSX7EjChjg==","signatures":[{"sig":"MEUCIQDqiZsRQTr8fR1G7xtVDxNCJzLvGz6cXWU17tYLvlwvHwIgeImKpMIxyptMf6jUyRyJmsKOQui8sqQUtXrIfsmspLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKCTxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovSw//fYHuCxgC+JFKzH/mj9nlSSAfgxkuyQlsiowcNUUpg1qdWyMS\r\npqkDhovH3YXiNw5RVMDPL3+qGmZh0bP0yvd7tRCjIkTf0Raj1WgHY790fHod\r\nti++6NXwxVB8/luqfhQodCRc0MOtDOGtDbF43r6pLrDw0xAwtJeFzDC0fgJP\r\nxQHIGEhrw1pScXBpSqCE38uOKfX+nOvij+XXEbmBVVlQXbt9Upj7RFN8ezpt\r\nH07AXrGGjhzJlCgWHz/hdJ6BFxCeLIksLdZP0XZeMdyyIyRMpv89/fL3JcPT\r\negQycTS9gw5ATpnDQhZvMWc6X0g+GEdpLLT6PcFlCJLMzhOsmyVcr1eSo361\r\niNqcVjL9k9oyoqYAT9n9osotsnC1IhEtku/Nv8bqS5h008wvhXdi8Yd1WRiS\r\nCVOI89z2e3tlx61mubiHWGVdq97Jb6FJDCAsWCjHcyS0rNpdF3MqNATecKSb\r\nk+/v22vMkr0JhmENtT4jTO0UsfVy6KGzTP9qZsSdyxSPzxoXvCkQqZO5pA+9\r\nuuUFDlmljXeCmwq4nGZ5TYoS8HMBujeHEq/i3ECTc8NlCnvNSEJenzzJHqPG\r\ngrV/VTDTArU99WFhqXCtuIdICB4ZJQFm4iH5aNeuZjwhXR+c3t1J64IyLyiM\r\nscyeNjP50783qnWu4w576nVJHofjNl77VJI=\r\n=wfDf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-04f8015d3407afc961889e607b24ac4620ad5eb3-16.x/balena-jellyfish-client-sdk-13.0.90.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-04f8015d3407afc961889e607b24ac4620ad5eb3-16.x/balena-jellyfish-client-sdk-13.0.90.tgz","_integrity":"sha512-U39zRzswlOjD+E9sVMj3LRVOAtWlWIamg49b+umFbEtqOXHcs7rFg2zYDBYyO7nLei1Iq0s2/C5zUSX7EjChjg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T08:13:18.564Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.62","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.90-joshbwlng-move-codeql-04f8015d3407afc961889e607b24ac4620ad5eb3_1663575280959_0.6486314405863605","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.90":{"name":"@balena/jellyfish-client-sdk","version":"13.0.90","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.90","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"50cc9731e619197df6c58ad002e53578e655e438","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.90.tgz","fileCount":30,"integrity":"sha512-RekcBqtHNM5Kyafh3BJaiAZhfmahale74nuyO7d+Dr1P8drM8eQmUbP5buxbC0hYFGoS/yfXeyjhdYYSdY5oXw==","signatures":[{"sig":"MEUCIQCbcdmYJNRd3DJUZaov32KqoBnCdzoy0tp2kUJxqF4qrAIgal5ldd1k//xNBObDM8xh3sEJmuEEAsseR8zgSVvUFBg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKCV/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoY5hAAkZbxnkbzpqRPr3j61M3kTwzUFUVZzotUY0q9aI4l3DYiLzAx\r\n9LfWxifHhPFtpg+t5aAzk1lE02Bnoqf0xu8hBFK6KlUW0WdFYTbEjz8wgXxg\r\nXYQJp+Hx6/pMZy7j7EvAHovWorbaKtJuzKL7PdU91QOj1v7Y0qDDFoQCXz5e\r\nTf0YZoYaEpWai9hcOFl1JhprQew5kTNQSjtMSuK9JPyI2RjDQLNfcqXrVqVz\r\n22bPgGqJunJ5HHAe6cCbkUflHVsoMxJIexRh2gKmwpr07oFiv6ytSwfk7jnl\r\nV88KYv1kSW16reqa3q1PsW296Ejs5Rh/MB4JGcN3xoxmG10a1poFm6XdfKBB\r\nb8qTQfGoCbLuZ4tXy5VVObNl30clfCy77KTR7SsisDo+h4NbR1F5q+Ecf1TF\r\ne3a/RlveunNuy73ScMtT6iHd8YHNVn73c76c7poL8brBUdR6Oojm4nyflvLU\r\nXW00wcdcW4rSvjJaEqXf2+Si/cjsrLva3oFZCzjgfiBQYRNRT68d/QsTIzWe\r\nbHmXx5PQSeDgqx7jbqr/JDupKZnBh54OYhQLnWJSWKRuKPt+oMTSDO0APlGP\r\nMD6DPgoOVKVANmNip+4Sj3mH+EN2X5npzhWJcr5bFNDRMNg4W2Scooz7OsgC\r\njtxpMwYSvUnMBNV8AYA4PB5quxFRQ+lctII=\r\n=uw/h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-04f8015d3407afc961889e607b24ac4620ad5eb3-16.x/balena-jellyfish-client-sdk-13.0.90.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-04f8015d3407afc961889e607b24ac4620ad5eb3-16.x/balena-jellyfish-client-sdk-13.0.90.tgz","_integrity":"sha512-RekcBqtHNM5Kyafh3BJaiAZhfmahale74nuyO7d+Dr1P8drM8eQmUbP5buxbC0hYFGoS/yfXeyjhdYYSdY5oXw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T08:13:18.564Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.62","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.90_1663575423563_0.4529026026643841","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.91-renovate-autumndb-22-x-76797850b5dad2ac080acb7f27aec33219384177":{"name":"@balena/jellyfish-client-sdk","version":"13.0.91-renovate-autumndb-22-x-76797850b5dad2ac080acb7f27aec33219384177","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.91-renovate-autumndb-22-x-76797850b5dad2ac080acb7f27aec33219384177","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"363744e96d4b27538ecdac7697092c6976333275","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.91-renovate-autumndb-22-x-76797850b5dad2ac080acb7f27aec33219384177.tgz","fileCount":32,"integrity":"sha512-mo4Rylb1RMVIFNIwibAm9jVAJKoj6weGR3ZZWY8/PKgGjwC5jGQYaBfoAm0mSSitV7R3EIVhWit0x8u7HflrJw==","signatures":[{"sig":"MEQCIEUpE304gx4Lt1RegZo1ea3RwpLVBA1cTrrCA663ZsqKAiBd/pZM9oNbeQR9OztwHdFxDO/eppOb2B3A+PUjjPBIDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKCYKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5GQ//fqBqEIlcyoyejtlAqSR/cJjqNiCzBFvQpme2BrdNHLaUdSOr\r\nfK3Lrvt0tmXz2R0x70jdqcG6ccjGrWASidDQnMMrnSGiz8GA8d6BGUYaG+6G\r\nzLXxAeBnhCRuHZGKI/gcBgHDkJX5b4OyqVTCb9JE46cjwMWUs6m8BzI1oIb7\r\napdBjRTw4XzmeS8pTYk3hZhimJLn9V3QwUG+aWSpy1rYCX5CoxEIHe63KD92\r\nyxVddU3oqwgckmZPBL9Uhol00w9dY8fViDoqoNclVF9j5C7iy8mBtPO6Nw5W\r\noT0cSr94VlcM6DudpWY9yi5Wz+p6nNVQ96UlLYvhp1ClA8H6NwjIiM9aaNyG\r\nrRLI1liokgh6yt2llTPKyzxZ5cZZ6flugVzXtf5f5PNugN7qCiPhxz2iitND\r\nOqM48JimZat0Yo8L94g7JuVLzJy3fvbVNjinDCowgav92/V+cCIVLIIjzM4n\r\nAkOTDv7DmtzP9dCQsS39WQf6tFWBbMEiMirOvOGpuZKsRtBKTCn/xMHBpY4I\r\ngR9bJ4tzfeGE3YRMb6QAGuSlyyvk23Mi/oVfjn4EeDUk5Je/gH/1/MMxKvfg\r\nFRV/Idzr6gcNlChz8Dw6JrrvwyGeXRhqP0Btl9RwjJGcK81BV9Ad20IpW1bX\r\nWyOJcHE4mZhsADQfyEIYj6AaMUwz+9GugTw=\r\n=iOKM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-76797850b5dad2ac080acb7f27aec33219384177-16.x/balena-jellyfish-client-sdk-13.0.91.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-76797850b5dad2ac080acb7f27aec33219384177-16.x/balena-jellyfish-client-sdk-13.0.91.tgz","_integrity":"sha512-mo4Rylb1RMVIFNIwibAm9jVAJKoj6weGR3ZZWY8/PKgGjwC5jGQYaBfoAm0mSSitV7R3EIVhWit0x8u7HflrJw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T08:18:01.247Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.65","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.91-renovate-autumndb-22-x-76797850b5dad2ac080acb7f27aec33219384177_1663575562792_0.5698634672213532","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.91":{"name":"@balena/jellyfish-client-sdk","version":"13.0.91","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.91","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6ffe07ccd93dd474bfb4bc21ab16069d431cecae","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.91.tgz","fileCount":30,"integrity":"sha512-otCU3SkF5jQyHGN4Ix/YdBvT7RPdjzlm/oWdsHfded/Yk0vvqxYrk80XuIY//IvmKvv1zZ7TpQzt6GibHogsUQ==","signatures":[{"sig":"MEQCIAQaf5S7sd1Egmh47kUpnpcfv9vL/mzCfLgG3aYI+i7kAiAy5c3LVU2rF+PuSK9CuNTh/wmp34YuQCXHFplX1iCGqQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKCazACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDRw/9Fibg4JAJPcZZ0Lw3GwhW54CziHvcXJTP8V/QnVZS002YKSq8\r\nKjYu3CeQd9/SO9OLU8XWzpNXKhyrSSe2l6MNOSxFPZVrOWFZ3wBWZ8vNaUG4\r\nSRqJ0MC/zRw8qSRcZ7IryV8ssMoR4yLciUpXDNZU1+x5PPRNVlzZxV05PMb3\r\ntjOBbDboJQmy6+J0tc2nVfaYHJ23xLrTrZGQi5DnDfrZheVieyziNuIuCnGa\r\nJrhNDtNG0LTHsBA9Oqy+R7wekYUTixwbDZwEeIThpsFXgadpeEO7m4URBzCm\r\nDYOYgKvk1B6MhPDiWG6pAO+z3Kf9Um8BoMsIprHi5Yonck6X2FQ43wi73/Ml\r\nWFBOcnT1EFn3hFVmuv8ufCnu4MjxDrsXK7m6R6b5ReLyQxC+7ogAcivYAMBW\r\nZbtXLknajYC52aMk1Z7MPppykeskPpugXmpDLXUsKL/2l8/L/Iaec5/pIiNh\r\nPEEnRN/a/wKcJsiZkRrOo1swhNS+a3GhjUTfoQJEHdLAr4YRZha2fwvd9aoH\r\n7hNk/aIeiLbZ1sqgE0CTnKQoCLmsrYZG0FWtXWEricT1e3Xfd2nZGB65TyYp\r\nBtJ3JzsJ+AIAD5An93M4aO1rS3EvBbvPiPCROmyvg77fTlYEY77PVqBHnEq6\r\no+NEkMCE6cR+sLRvevE+4Wb/nY1zIfeaPvE=\r\n=G2mY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-76797850b5dad2ac080acb7f27aec33219384177-16.x/balena-jellyfish-client-sdk-13.0.91.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-76797850b5dad2ac080acb7f27aec33219384177-16.x/balena-jellyfish-client-sdk-13.0.91.tgz","_integrity":"sha512-otCU3SkF5jQyHGN4Ix/YdBvT7RPdjzlm/oWdsHfded/Yk0vvqxYrk80XuIY//IvmKvv1zZ7TpQzt6GibHogsUQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T08:18:01.247Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.65","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.91_1663575730834_0.04410743907290682","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.92-renovate-autumndb-22-x-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.92-renovate-autumndb-22-x-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.92-renovate-autumndb-22-x-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"68ff99ee573956b6d35abc6043688551a13367c1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.92-renovate-autumndb-22-x-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1.tgz","fileCount":32,"integrity":"sha512-Gs6KDEYHXD0VKnCLPB+uUoFHCHgL/avN4ONewSBoK3KTTqa8yjHSrK/o3bNqEF9o+0NuvEv5VvkIXx+1rXQyIQ==","signatures":[{"sig":"MEUCIFXJXvGUem1qajCmZQx/CgCDhpR3coCSxqtUArEwA1d9AiEA8fBhFdBegMIIZC5vmLBKfq57lkKbWzwcSTMG5FCirY0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKGhmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpgcg//QlcF3WmVQmV2THaHUceCtai+534R52QO4zeNhXw1lSvlUE+q\r\nygwc826zRfZlLyEsb8jNIH+Gej30PerKRnJYGLlf49fYbPiIWpnyCw/ttmww\r\nuU08ZwPl/2m2+vlM7Br0chM3d3EfFHGBczGqu4Rk1aQqk/sGzjNLbvQvp8kM\r\nwuDgRpeKXPMTQXBoeVBSkD5O25hSHqUQ83YHdnmnYJSM/I6uZrrieDBEc48Y\r\nn8tc4rmIm+fc+LrOW142lADnQH/HgktT0dPDQnf6pPYnLEsErc3FU/PGc+n/\r\nZLBJZ965L8JWcA9+DXz5p8ctVBg/diYM1a3CgQehueeyVf+kpCm0wsctQWH0\r\n+ub5bntWe3yogf02emi8TH2hfbB3PMDCcHsJ29rRJfw9qtwTz8UiNEM5MSk1\r\nyEi+Mwp4sYWwtBhVGbw1hj1KAqm7Hj6Br12I3YL77iHHlpjew2nlkbgWs/qs\r\n4zUz3MK8s3o7CZ54LmRwKnzcjH0/bGQH546qGBdegJptgxitU9b7QGqC3mSt\r\nlwuu6/3BVk//NI0ITFiqigIC7y3M+dDZ6tlT+vG2Su3M3n6f376xRvHrmGNM\r\ntuhD6b8VzAyVsNCodEcJ7DSJIRdDso569s2regqToMVrvQlJUbQfNcYKFnLZ\r\nIeMb0r6TUtkVX8R16+CTyd4Uwku1DU7wBH4=\r\n=JAWe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1-16.x/balena-jellyfish-client-sdk-13.0.92.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1-16.x/balena-jellyfish-client-sdk-13.0.92.tgz","_integrity":"sha512-Gs6KDEYHXD0VKnCLPB+uUoFHCHgL/avN4ONewSBoK3KTTqa8yjHSrK/o3bNqEF9o+0NuvEv5VvkIXx+1rXQyIQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T13:01:00.040Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.71","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.92-renovate-autumndb-22-x-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1_1663592550431_0.4004720535607058","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.92":{"name":"@balena/jellyfish-client-sdk","version":"13.0.92","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.92","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"385cee8848d8c6d31bb21379a6d93908c7e3ff40","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.92.tgz","fileCount":30,"integrity":"sha512-Cqo4oKQoyGEdoFI0kQAkY+k/JD2Z17VLxRRRkKJFsM627ue4fGut6t192kZ3ECLTA4wsyaDugPPxDN2Ng9vuWw==","signatures":[{"sig":"MEQCIFiiIujswXmp2n8ZTNrYOqiKn/ftQn3ntDVAwp83tGZLAiByuuiCxdKWebrT73tntV6/AAiqhxRn6ptgs6wepOLrTA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKGjnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrUiQ/+OBkBOKe2qvh4/CPj46IuXHTR6GrD3qHcE2OXtNGvdC8croWT\r\nPxSeRSrxcj69N39sp0vxpLQj3pnvKjlXM6Wqbk7U6PhoA6FDpwyxpNizE2yk\r\nFKeWhVO8dRCA3s8fPmE2dUQEYVZNoa/fz/U1VNL6yEaov6auH3u6aC6W/dA9\r\nC8rgsfqD3BUDYNRbmM6ZgjLRkN+XIAsSQnw8wiqAMAs4Ws7g/CNx9o1AVkWP\r\ndNn/iD9hwnmSvBQdP1hJ1w9t7pVphMHN5hFCuEja5DzaLlhOEetJJIx6RDgq\r\nuQ6ZwgMJTs98ar3A+ugPopic0s6vqeaObGLlzmgwfOW9gtM+n2AppC5HAa63\r\n1aYlMO0TPDRHHu2gy3Ez2HKZMNQKkh9mTFRImBXF9pQ7KzNh/ty2RoXFLZST\r\nL5XuKPj99J9Pwd7mX4z2QLheTTpWHEnbreHVdcru5xK5zzQPiWfc+ueS6K+E\r\nZ+76jxDERCZASmwB/Z2ifgDCgqPVe4Y/LA+5bD7uBjsHVyMVy+h1PsNAd7IU\r\nQ9/XpH2fF7/cliAVza+tx/AJb+DKt0nR+9EAjUZr12H6NTEt/3YqxULuiY7V\r\ndC4eBJLDehiM2yP39b/tQvzqVGXTwnfNqgCPTZtLhb+noqniCJV24MgnBMkp\r\ns9YN82+UjIsSLUlfaiG4wibqUCud8vgPoA4=\r\n=goVN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1-16.x/balena-jellyfish-client-sdk-13.0.92.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1-16.x/balena-jellyfish-client-sdk-13.0.92.tgz","_integrity":"sha512-Cqo4oKQoyGEdoFI0kQAkY+k/JD2Z17VLxRRRkKJFsM627ue4fGut6t192kZ3ECLTA4wsyaDugPPxDN2Ng9vuWw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T13:01:00.040Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.71","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.92_1663592679661_0.5559587908588417","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.93-renovate-autumndb-22-x-10c9975c3e7694913e9ff82f201cb5364c38a576":{"name":"@balena/jellyfish-client-sdk","version":"13.0.93-renovate-autumndb-22-x-10c9975c3e7694913e9ff82f201cb5364c38a576","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.93-renovate-autumndb-22-x-10c9975c3e7694913e9ff82f201cb5364c38a576","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"50b7a242cefc892f17c4bbdb08b6f4c72907a472","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.93-renovate-autumndb-22-x-10c9975c3e7694913e9ff82f201cb5364c38a576.tgz","fileCount":32,"integrity":"sha512-5twqJDcCvhsAbII2JoMyZ+ddZ2g3A0C3lSRebwdc+xJoC63/wHSOpunJYDQ39uRs5vLgGuWVkuEijRh6f1nKtQ==","signatures":[{"sig":"MEUCIFflTC6O7QRUfJZGsDwq6s09DQ43QuWBa8UNldaQ7w3XAiEA2cp9lfLWYbIV7nCZw/GjrCFeXWRUYpvVV0aYs6RaHs0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKJmEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgCw//TZ891SGFW1zkQYEAgFI0J8aCnKycSkwV4gSW2HvIL3iYOPCl\r\nYpNw+tFeniylim5n4c29latqL4IdfOylL0JZQIfWWLMZ6+tEMpg5coJuhvNV\r\njMKb0LWk9/f2HzBtDiHoqLoxPTL6rgw4VgMfBU7vf4kiyz0dX1yAu6US/v/l\r\nwr21qVP4FRCccI/Iru3P+9luY2z3trEcIsiA6Gu6ZbJBPKTXyRPnn4WtvP6B\r\nx+YH+iHRVk9kCTB/Z0oSD2sutMhuO5X4vWXMDc1Iv/oP8xx/W6XBNKTfxw6v\r\nHRX2xG0N5mw1Y+V26g0hVgEtA9WcWxRO7yxCNuHV+r1fcXiVUqzLvWotF5rg\r\n/UoZUg3Cw36NbgIWj+nnpi8U3EOLLLJM5KodHqSUSiJx7ngkwV+bFBffmW1u\r\nXyMnNbAtAynWVQ8OqZEtVIrFeVStV9o8sObatcfGS09UBp8oPzedcdthiUNY\r\n+UYkPRwJEf/4KxxDl6piEwJtnuU2gq5FD6/vNrqT0941Q0yJL73otu61UBsm\r\nybpMNvzTb8eWUqkypqRsawGJVq16Z6J7aLmgzRfipHhXD3C1kBjTyrqjoOo0\r\nlRmKtcjguo/XSTIzUpnt61TXIb6NUyARyL/afM3k8KKfW+cWFprAvXFSDtJy\r\nOW1aipIJrvnBBvzR9vO/7T2D13GTFVGnOlo=\r\n=SpHR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-10c9975c3e7694913e9ff82f201cb5364c38a576-16.x/balena-jellyfish-client-sdk-13.0.93.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-10c9975c3e7694913e9ff82f201cb5364c38a576-16.x/balena-jellyfish-client-sdk-13.0.93.tgz","_integrity":"sha512-5twqJDcCvhsAbII2JoMyZ+ddZ2g3A0C3lSRebwdc+xJoC63/wHSOpunJYDQ39uRs5vLgGuWVkuEijRh6f1nKtQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T16:30:38.090Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.72","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.93-renovate-autumndb-22-x-10c9975c3e7694913e9ff82f201cb5364c38a576_1663605123865_0.810114965373512","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.93":{"name":"@balena/jellyfish-client-sdk","version":"13.0.93","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.93","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7db9e3594697cfff82d509db4776053b04417898","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.93.tgz","fileCount":30,"integrity":"sha512-C+fnjuWZ0jPAqgmCu9zK0hrX6o1Ct8FrdttzaeDkS/+in2b9HjR/KEP2d8eP0XD2ieBznNQ8Gr7TLHQGHoNFmQ==","signatures":[{"sig":"MEUCIGE90EHarrzOe4Qu/TkG214JNxy03GeKP5UIwj4fKoS1AiEA4VW30+OUwb7ZkHO45LmZJPm6RwCkBxQKsr8SxLa9N9g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKJoNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnzA/6AiHlKIx4lZB+2wjuG8MsLAn0idanIpN8QJZylTQZc8QB8gDi\r\nWs/srtO8Ipn+eqre0XSvuNLotKtpMcxGaMNBE47TXDoyeexItDDrcfPZJqWG\r\nJz/HZGxyw9NiMzm1sJLIPv4Ou1Na+5C6KoAn299TevGb+8eZF8CdfEG/Q4LB\r\nmnqXTo6ilxSsm7aik2+TMCcBAwNXDCOQIhaXzlbKfy6F+iZXSTVnp3h7TB51\r\nOyEz7sSoY7ybZyiQ7/GGd1W8oHo236HJKmS0etcyYOnSCkZfJ+iwwVkGgIZj\r\nfEdV58JZ9p1w2Pb3U2RdsQVkdKnAYdhzoT3EyXGBj+jh+adfgj0asuZxN+Tv\r\ndCbGjTRWj8ftMN9CRRE6xJTVBUMqJBHWY0siQDB+3q5ElaQbrCxCKJar8cHX\r\nrmG/L3gqBIbnzGc6SKil+uTXW0lnuZJ5dexxamiWawaNtPGiAyp3HN4uQ3Ct\r\nMnZXNnYy5pSfWWkVbsUg4QiWobXGD1M7++Nw5kjqHYujDDUIdn8yLvSXvj15\r\nKbdpJdPDZ89wnnufS92MDAbu+QGIa4AOrtTLs+kLQtu483/QFPx4E4yWrFaK\r\nYDXJQJ+pAY5WTpfz7AQn4YoGhi3Beh//VQcYXQX7rf1wl74SW6WJjhrBi/mH\r\nHKAlhEwLxjyEmIL2kbU38fzWJl+sraI5WS0=\r\n=ttti\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-10c9975c3e7694913e9ff82f201cb5364c38a576-16.x/balena-jellyfish-client-sdk-13.0.93.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-10c9975c3e7694913e9ff82f201cb5364c38a576-16.x/balena-jellyfish-client-sdk-13.0.93.tgz","_integrity":"sha512-C+fnjuWZ0jPAqgmCu9zK0hrX6o1Ct8FrdttzaeDkS/+in2b9HjR/KEP2d8eP0XD2ieBznNQ8Gr7TLHQGHoNFmQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-19T16:30:38.090Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.72","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.93_1663605261350_0.19151508142046625","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.94-renovate-autumndb-22-x-4250313dbea42dbc7a633aa9e520ffddba1d1d90":{"name":"@balena/jellyfish-client-sdk","version":"13.0.94-renovate-autumndb-22-x-4250313dbea42dbc7a633aa9e520ffddba1d1d90","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.94-renovate-autumndb-22-x-4250313dbea42dbc7a633aa9e520ffddba1d1d90","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"46165161f6d6c7368b9b05647294d4dce2e1a18d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.94-renovate-autumndb-22-x-4250313dbea42dbc7a633aa9e520ffddba1d1d90.tgz","fileCount":32,"integrity":"sha512-T2mOC28YyuPxyjOy9EHPgSp6FDuxaB+e8dHNC3nBRvN2yBBPwSQigraLviOGMXgLOarIgpCW3N0iP7KpeJYOow==","signatures":[{"sig":"MEUCIQD01yIlZqFse6L0R67q7PWJ5gA0zH99d7MH0npYYQVnpwIgdPoYCiDkIJhuoiIosUq01N6piJku7dbcJtdeAhuk71o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKb3DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTPw/8Cy1bDe+7Jl+6d8JsOo5SEgam/bRbupxx0QgBuPdBA3VKdTrb\r\nCM7OK7K9GxpbLQSirPE215vGz4p/0wMHUDUelzTh+CJpdxEbK+lP31jXbpp2\r\nxKuyZ4tU5qGQ51Nk9KWFblwCMqtNl0+Nel8ujVlEjz6+sEGBeowpzvRMeaqt\r\nv0zGeeoZilKwjcUGhuAfiQeCVViRkGw4Tui39qm+lQ60glFVUET5Kh8ElNNG\r\newATq3DDVcqXtC8VNyw4F9Whm03nK+NYiUQ7TF30CVnR+snAd105mv8BRbEe\r\nF8q8q4UhI97mIOhwnugcPoiPwG8/Xftv5PYrOQYN6gS5I2AToX7d5iW+gJKW\r\nV/67zm9JLxihjnkVxkUM/h6jw94PbaRDC39uypiF5cFBxdrf5oTt12xlqB2h\r\nfJeSx8sejbGUzgNP2dhH8E3WXd5k9e0ueAc54LyT2iJy1CP8oZD0og8QvMMC\r\n+4EOGfF6ru0T+LD+E1toTgzcJ6y8EiKm2v1D2Eo7pIa/t+46fmouw1JDo3sS\r\nKOMPL0zENd70Gm76rpuy2+Ukg88p1F8W0bpiKI7E5Q6ncEc13pdQw+PYtAzY\r\nfU8jztZ7qbHSRiPWqPknW5P086JPgT30zpocaHDlAHsu+y2fw4+dW0Xp7M37\r\npt1XWKwBPCSofE9/6MTlE+vTm3q7G8MyIkc=\r\n=BrCr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-4250313dbea42dbc7a633aa9e520ffddba1d1d90-16.x/balena-jellyfish-client-sdk-13.0.94.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-4250313dbea42dbc7a633aa9e520ffddba1d1d90-16.x/balena-jellyfish-client-sdk-13.0.94.tgz","_integrity":"sha512-T2mOC28YyuPxyjOy9EHPgSp6FDuxaB+e8dHNC3nBRvN2yBBPwSQigraLviOGMXgLOarIgpCW3N0iP7KpeJYOow==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-20T13:17:22.639Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.73","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.94-renovate-autumndb-22-x-4250313dbea42dbc7a633aa9e520ffddba1d1d90_1663679939036_0.35001883293748626","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.94":{"name":"@balena/jellyfish-client-sdk","version":"13.0.94","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.94","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9b3d9e7e249d5e6dfb8650cc3c9a8622e51dc287","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.94.tgz","fileCount":30,"integrity":"sha512-lRVHNDqlOkQg5Cb6QgRcanRbXcZmWFtGJXSUNfA2YWcprMQXgc5xws2oX/Be8/ZbFImhQ2IYbQXDmKldZWPOgQ==","signatures":[{"sig":"MEUCIAW10etEQtrdBVVn+vNd8pr8HIjBLA1Kf5CDOG+VeSNpAiEAq5gcWZuHnefapBOzIsILBC3E7wCU7F/rTtRE407Oa7g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKb5WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWyw/+KJ3R+IgksOTMM1wmdWBrqWcVkbG8JlgaI4XFW8C5VpjyGhNu\r\nOk6tF2h/Aif4vxPeazO3aiNzloelFi+UnDX63RqHpRcg0K+mI3gVZlo9gqkw\r\nx88iRYaYs/eNZ6LcM7BXc3YjaO1kgVvHGjx5a4RNIfNrYvcO46hXBZb3a+qH\r\nEFkRRjUXjYawBm9izOGDGjXKcu5KrK2Etzfcr9QOokpyw3oUrPKbfJj38sp2\r\n9+8qd78PUGO6as+SaCSMsjo1eJ4NEPBVKputD/L99NJz9d+FIDiCW/EYDPv+\r\nYENO1F4S+MWD3v/cUYGTKGxhprt7Lp/BYk/ECd9ihVmnRq/lsJYyua9kTHxS\r\njdMn9gprgxSD2+tA3TsVHfbNnFMnWrI9ajLFUvxId0Z5SUOIfXm/dCRD2UA/\r\n83xRddCFFO2Ypistt9xCp8mXeqHhcd7qDGsvfTqoXxndJycPJJgmq9Ic1AdE\r\ndmsUYbFI49NDB13sMFvWj7uI7ew+ko1Mi7+cmgsWLTewovmoTo/SuDoUh2qi\r\ncG6S+mzkSBxNyAex5n1+3i/iDsxdyRppxeBtGXjxONc/sQ+DR1VOT6cYibCv\r\nGSdhauOg7gucmJKFQWoLcq98Iiog3p8gqVvQutkZ2C/Q/Ne9qjksb6qEgdZP\r\nX6m6CI13rnEOWf2tIGSqV9Ak2Ii9hTSiO/0=\r\n=X+oa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-4250313dbea42dbc7a633aa9e520ffddba1d1d90-16.x/balena-jellyfish-client-sdk-13.0.94.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-4250313dbea42dbc7a633aa9e520ffddba1d1d90-16.x/balena-jellyfish-client-sdk-13.0.94.tgz","_integrity":"sha512-lRVHNDqlOkQg5Cb6QgRcanRbXcZmWFtGJXSUNfA2YWcprMQXgc5xws2oX/Be8/ZbFImhQ2IYbQXDmKldZWPOgQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-20T13:17:22.639Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.73","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.94_1663680086553_0.8577435367080335","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.95-renovate-autumndb-22-x-a3c787312705e14ffbb7196ff64161981c6c6ddf":{"name":"@balena/jellyfish-client-sdk","version":"13.0.95-renovate-autumndb-22-x-a3c787312705e14ffbb7196ff64161981c6c6ddf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.95-renovate-autumndb-22-x-a3c787312705e14ffbb7196ff64161981c6c6ddf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b8262fbc8b525ed1e7df02e786371866005a03ad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.95-renovate-autumndb-22-x-a3c787312705e14ffbb7196ff64161981c6c6ddf.tgz","fileCount":32,"integrity":"sha512-uyLZyCv9qGDE5axhNKviXRRXOEGGkmCnD8PJcKOysQOzRbnvRzQ/ItmpWKMC5giUCNd3AKEEfuagcen6lMYG2Q==","signatures":[{"sig":"MEQCIFQP3RVmyVqLVhR+2HUq9qJLe2sjaU8FAW6IoYs3TRAdAiBqeWfe48xKPUjRWC9pA8zwDR7njcxkx1ipRv3FtoyTaA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLby+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZ9Q/8C/eq6OzQPGXKujvaLRykfNZzC6A1rCRvumVAQRqlbdXXs2vv\r\nGwX0J4DYsA9gEAmg06t4Sg/hNSsbDzYSnvZaIPjLmgcBUDmPzfCk+FepKimJ\r\nvEYA93d/H9cTTyFnyIns5g0E65SyW/Ze0a7k8aB6e3jFfAXyEv3AqktJaQJb\r\ntQWCuc+IGjS8S5NozwHzwp17I2cGXry1ZGz+K+wHt06EYf/+u1uh0LIBQWpD\r\n5pLMCFks6GGMMmNhdxZJlUPkCtCwlETM4CB5Qk/946ZzIfG+/csUAaMdDFF7\r\nd4SoUNJhwAPTu4+sOrcnbDz8LXGSX/4FiWhThnZi9k8111M1Zq1RxvB+53q2\r\nhaH8Fd8Go2CTmJuzB8ebpF/pFIwu8XIB7KWAJut/rIgHOt6e3In4gf3MdqM9\r\ndzU21kuEtVCGXXdkJ4gVshZXaaizZO9/IPVo/j4rccl6kQlWr+kmBnTCFRcp\r\nM3X0hVM8/HFdR16FjEx4u7471eLNcCzZFMovhlnyRxvD9abn3Lpy0qJciMHB\r\nmIiqn1LvLJGX+fA30+6GtCqJREnYyWK1c6V3ROGcKO9CALVIH+3a/fyRUnfO\r\nrn4CrVE9o8y+DpvRR9vftB496iRM79QKufFWlzEmJUwgn0DcmfgH5LSOWD88\r\nHsL2W/bu0/V9keIw++6clGwKNgRTu0yD15g=\r\n=rvmg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-a3c787312705e14ffbb7196ff64161981c6c6ddf-16.x/balena-jellyfish-client-sdk-13.0.95.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-a3c787312705e14ffbb7196ff64161981c6c6ddf-16.x/balena-jellyfish-client-sdk-13.0.95.tgz","_integrity":"sha512-uyLZyCv9qGDE5axhNKviXRRXOEGGkmCnD8PJcKOysQOzRbnvRzQ/ItmpWKMC5giUCNd3AKEEfuagcen6lMYG2Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-23T14:02:09.546Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.75","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.95-renovate-autumndb-22-x-a3c787312705e14ffbb7196ff64161981c6c6ddf_1663941821810_0.3738399830395276","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.95":{"name":"@balena/jellyfish-client-sdk","version":"13.0.95","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.95","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df3c2b103e9e070555b9a74ea985f600b5319e59","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.95.tgz","fileCount":30,"integrity":"sha512-zHaaPRRG1jexlGm0g4lcAnD1BJyfugt0GH6B9YcNDZ9smOl15SGi3XS8SsvBMm6lAhYpkDs0P6eef8vGQQU23Q==","signatures":[{"sig":"MEUCICAanqwpXk0hyU0BHRpggG77XXbRJ2bcUafdRQN1iyHzAiEAx0cI16hHnsX/nIOxqCTCNfvcC/lSFhkwT8/R6jeJ8es=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLb1LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpcnA/+P+gLircnqgXJeUjuTZPXXbaE6PBrDu9U5tbyUY88subaD7lg\r\npWmsO0kzIY+HN/ZkGtI3J1/cvXplHVbDVfC6sqq9Cb+HwIi6P6bu8Rbbladr\r\nOxUbMb+oSRhU7RfL5IaHqx2zwqFc1rDnGSuQyEOKfWYDuDysoGaT0a+rhIXp\r\ncNozIPSgmTCCr/Q3ftbOCMiLWnXiD9+dgdcQR75o5YNXzzsZuAehf+qwUxZZ\r\np5he3b61t197N7m85I/jP5hD2hT5o2QMr9r6MFbWT01rFTwhHjrbqECTGY93\r\n4xfNfN6SlSTmOrYjER4SHKc7EoRkjMs9K0D4nAJCCF+Util9sLN5xscPXxT8\r\noW9MWhx3CqglK86s7lzN/QofiYEk6vQejpxd36mD0GTE2PMUKpb5oYlUsJhz\r\nljrkq0TujEwFHoE50WkypUEt+j84nylwVYTg2NDyD/b++rtPLvTY8b4DFhR8\r\nKUy8rJV+VZcg9QayqCBlqCB+qTgDomBAdFlAUBjcT0iN4Y2uW7khGpiXH0Ry\r\nSGh6+37ci3mCybTXlIVj4YPr/GU9mdrMfAm5YEYyL9C9MN2IGFf7yNe29hoN\r\n0LO2ZCVuIiZwcht0ljftLptpZTiLI0wth9FeG+mJdXEtAZC6Yd0ORyMvbLMS\r\nDDrlrM5E3S2d/cWvKCxVjnx1aSD6aUbWJbM=\r\n=bdtp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-a3c787312705e14ffbb7196ff64161981c6c6ddf-16.x/balena-jellyfish-client-sdk-13.0.95.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-a3c787312705e14ffbb7196ff64161981c6c6ddf-16.x/balena-jellyfish-client-sdk-13.0.95.tgz","_integrity":"sha512-zHaaPRRG1jexlGm0g4lcAnD1BJyfugt0GH6B9YcNDZ9smOl15SGi3XS8SsvBMm6lAhYpkDs0P6eef8vGQQU23Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-23T14:02:09.546Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.75","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.95_1663941962810_0.5586400880261888","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.96-renovate-autumndb-22-x-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767":{"name":"@balena/jellyfish-client-sdk","version":"13.0.96-renovate-autumndb-22-x-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.96-renovate-autumndb-22-x-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2b49d0411933016ae21434d22769aed893efb73e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.96-renovate-autumndb-22-x-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767.tgz","fileCount":32,"integrity":"sha512-bDwN9lzjLa/NTy1W/R3VKm9MdJXXgi8obsv7KU3pJvlt2+Lqkodd849o5XSlG71a2DFCMj3p3sex28b3abG0QA==","signatures":[{"sig":"MEUCIQC61K21angk2rjN62LmXmqJyChpm9sNWP2aOoOIzvkltAIgN/FWMZOsV/Vu4ft5MGy/4YwxXAzwsN7uELl1bGxwGGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLee2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHgg//cUqlpGndNJBLgNl69IherRXpY7vn77KYNyhRc1d/DZcSsPk/\r\nQbQMA3uv8pqY3JJytocz8XA8PMv32yY4SdBrqFmu5V/KniHz/Zx6xrOhc6ID\r\n7WK9layZn77i9Sf7IAX1By7wXfKbVapsmngfrPW15h3uTzfnHpVgOJ3I4Teu\r\nLQdUkGaMfPnEG4I9OsuXRbnoE8vdVl6MidO8LZklpm95QesMEzSNIWERP1B6\r\nzoboHuaUVfCYYj48dxV2h+aI5PQjImG3st0zxQNgRB6E3SFO7wKKtdfeIX57\r\nrj78J+bCNMvwlmGmS+0C6Rp4h7wTC+5/+mmEebBDoTvN6G2GG2mjs/twAc7L\r\n369e0AGQRajTMl38LUjAUca6d6luWjPStx/ZtXQpqNNY9GywQx9AK7NG8Mfc\r\nVF0LodQ6XvKc+oUOYJFQtq2nxngtHZ6Ud0ohXOo9xU79SXksDwBwxKrhPVuq\r\nJoUSRj63TGhjnCev7QfFB7j3EqZPazJP5UK0U2wC+yoUINxI6qgIsL7RvO/v\r\nV3CGlEPhKS7sRxKEDS4hB5gmdkYPPIhppFzgPheM2VCSTd0bgxUdtpbUul0y\r\nqVdacUjBJitG0jgmaIPpANMPzV1pY+Qy2EEt9bHQqARPJ+0iO/Wk+C3uk7Vr\r\noCKROgZuiUoGWlWosCaZuuzXUBUQzR1BYX4=\r\n=GGlH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767-16.x/balena-jellyfish-client-sdk-13.0.96.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767-16.x/balena-jellyfish-client-sdk-13.0.96.tgz","_integrity":"sha512-bDwN9lzjLa/NTy1W/R3VKm9MdJXXgi8obsv7KU3pJvlt2+Lqkodd849o5XSlG71a2DFCMj3p3sex28b3abG0QA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-23T17:05:26.088Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.76","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.96-renovate-autumndb-22-x-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767_1663952822013_0.07725344048593907","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.96":{"name":"@balena/jellyfish-client-sdk","version":"13.0.96","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.96","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c97e6be32147b556072a8a7690055e4cae9b4ac8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.96.tgz","fileCount":30,"integrity":"sha512-byUKe9KTj0AZBf21MpARE7W3s1jO3SbeROyJ8OaIW4qm6U06n397ACC1EI/VxPpVAg4YqqwmiXrWMywqq31GMw==","signatures":[{"sig":"MEUCIEXcq8qjK7BQRNq9JrnM3Xn/n/itY+9P5eryZ3BqJz6jAiEA7kAbxe1Ve2lHlAbqaBaq15QYeAOP1MSYUV0QW0YRSxk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLehDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4JA//Ss0TNso9eNB9A8mZ7eXWiWld7wk/Fg0h13u/30sCoHAPg55S\r\nCl7fLgqoIE+m/mgMiVPYhgwEV0H7PkT5IAo9jL8kzVVemk49B68BtNTlT2mU\r\n6ocDzz70cP1yJ1zg5va0+KXBZ/kRG7ExKpNJ1L+NroWHWHJsatpMpPlF97mc\r\nqCiYmXcIjROhGjmUoCwY04vveW+CSSJBRz5334HisDKX2s4LgtQllamgXNlP\r\ngBjC1IjFh83G5v+dYq+gd+kelHnuSnZZ22zf0WcSt7neZzOp4MCJbzNJsQwg\r\n4mR1kMVXTiTeuv6UCh+iAf2FshmKAnHJeyRcIjD5nPCa3Ztq9f9qg5jNnPsL\r\nKeEYfnRHc1ZpL27HbfETKH5eHA3YT8U4oOP7bVvtpvV5zcYlLnOR5h9gJhQj\r\nlruo3MYe8BjRE02ZqVPFtDsTtKIorXjcBtvmE5/Dmz4jHa+Un+LAg85hgEgS\r\nqz7o+ubG86VCxQJ5sDFBveryNeC1kllKvNfOt/SEV/c3dnnckr6VA/J3pDYe\r\nL5TJoEDALXNctewj6aajugcuhi1Ae4Qjj3xwZU9O7GlCbcQtW/guc8YxsK4A\r\n9YXEIxoAz4sVF2SUvzZ4ZUYPJ7RaI3fR2xxnPPzvlYE4EZx0uXgheObQHSD1\r\nOn4lJUS7MZ7vT3YK1MsERYgVlAP/yPuETjY=\r\n=oQYv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767-16.x/balena-jellyfish-client-sdk-13.0.96.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767-16.x/balena-jellyfish-client-sdk-13.0.96.tgz","_integrity":"sha512-byUKe9KTj0AZBf21MpARE7W3s1jO3SbeROyJ8OaIW4qm6U06n397ACC1EI/VxPpVAg4YqqwmiXrWMywqq31GMw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-23T17:05:26.088Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.76","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.96_1663952963066_0.048969386611686705","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.97-renovate-autumndb-22-x-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf":{"name":"@balena/jellyfish-client-sdk","version":"13.0.97-renovate-autumndb-22-x-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.97-renovate-autumndb-22-x-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"924368d768221aedbf6fec5bb0322431c53ec131","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.97-renovate-autumndb-22-x-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf.tgz","fileCount":32,"integrity":"sha512-h1S1KijQaZaNc8F3O9giP/nCovbjtWPJ4ER1s7r8uuW0+Rq+lPbilWpnQpHI/yvjQjZovlsX9FPr/bklcf2bNQ==","signatures":[{"sig":"MEQCIFhanqb+Y+ytls9pKzEBEnPy9cy63wRn1Qdlxf08aDv8AiAc+leFHrwLz5d3ouOoqTiXAh0RAegdUz/zH/Yr/PpRgA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLpknACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqpqhAAgn99ZxS9ahndG0xQ0uyVh+DjeyIlsh4GwM+Q+lDuf90RelyS\r\nmQDH2AEuC+5f5DQn4OS0K03pA7ln+AOrJ4ALcBiv0h18++hkSV3GJCUlAZhv\r\nEjEkMQebynbF5B+nZRbWucHGkRq2a+PE11D9Kqog0uajaimGXE8v7RCh9dAi\r\nm8tmVSr2WGVA6Xju4Eip5/F9VQ5ZdgNzUITqhqecbQJm3DhfLvzetibPTI07\r\nm41aaSFqHQax9kJdoYV9brC6lYG2GDfEHiMs56IlnE9J4AokeTJyvcnr0zkG\r\nsJsVaIjdJ1W8zPTNIrQXC5ctVuv6KpZbru7+1sPqlxxh4QFX5+Dy7zJ2tn4w\r\n1saFLTHcWarYaJbM+1rAzxV+MDWnWaYnevT6plkIHZ0/OnVGScZUTArqFcFR\r\nKBMMQ3PBvZ2GX0pe9trVMlx6Cf/3GNwXIra49NdkAtbdFxFGj83/ExQB9K/U\r\n1BedFixQiWCWU6yFJjV5SgjFRYNZY8yRDOUNY4/S7IGiWn0F+IXI9Jz50d7e\r\nouX4HmX1REYjoBUyyO1NOkM5iwSoygybhCq/PRWtZr7uTm4ukVT45fAG++ev\r\nv/KevV5P1P8bkpxraXvRyBVtjYfMhK1K8/A4LbIu1Qz1xpcZT94nWkXyW+wd\r\nyQp0b8N6D09m0ChiqYRomzGR18OC3Dfb0+Q=\r\n=M0/Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf-16.x/balena-jellyfish-client-sdk-13.0.97.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf-16.x/balena-jellyfish-client-sdk-13.0.97.tgz","_integrity":"sha512-h1S1KijQaZaNc8F3O9giP/nCovbjtWPJ4ER1s7r8uuW0+Rq+lPbilWpnQpHI/yvjQjZovlsX9FPr/bklcf2bNQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T05:42:01.221Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.78","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.97-renovate-autumndb-22-x-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf_1663998247496_0.6867706965534686","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.97":{"name":"@balena/jellyfish-client-sdk","version":"13.0.97","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.97","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f12ecf09e02deb2ba7c888a0ecdb5a80e79feb86","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.97.tgz","fileCount":30,"integrity":"sha512-KpM90qdbn2fzDldBhvr6V+yC2f7KBx4w+IEAdQBhkLAJ3WC7pyVN1SfraUHleGpMLl2zhH48PWkZL9LUxwWTcw==","signatures":[{"sig":"MEYCIQCxuS/e0ljKrEaoXDfqW9eW0Nz339awKoub/1Dw1ur8KQIhAL0rb+6yrGn/X0ZcHHcKFcU3fAYUMPg4zxAFjLkFTaH0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLpmwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmptQw//e3p4PALzUrqSU0ckNIm2YL4FT+ZvDhh8VBvPutCQ7wxAIYqI\r\nL1/0rbW9Q5+RdcgK48/VpCSeGH1c0gdGDUmxrt90S58Hn9JoiaMDxPMIVW+p\r\nog9P19FkZN6PC0LJgBd8SbgqVFYGyFioDLDquufmbTiXIXtoHBoRAnuPSvzw\r\ngArVqqhtgqua0tRotFSQ9hkGum7WgMqHpesgn/2egMoyNYwovfjwQg33gxzN\r\nuuwE73qsR/Hqmtz/p76QSBRmgQ4pFyrr2v+dTbAwsvyvadGyXPpcqBOSIjzi\r\nFxhCBLzoEtQCGhjlbaU73tIFABmLoHiPdRrzFDhFEWylwffjZ37kBGhmPsg6\r\nlsrBEDe9qBduP1DdHaqmZQpkJgx2K6dG1Pn03o2whGtniIBYyUL+hgkNNolP\r\nD/bM1WXcLnB+1YkTFaBhi11EI5DtV/rsMSK7uGbrfea3fFhLGUcm+veyWDfL\r\nF4/6NsyWgkAZ/lQ81nnIOECqtZyUQB7HeRKRoQ3EL3dgpJlDA0xAUVbI4dbJ\r\nuoxJ+loiskvnhI6a+CYBRE7gjnMXdWbCSa66g3TMAllaXyL89XPrjbLJOQyq\r\nksCSW2uAVaPFhoKcS+7O1qqUVEAB2HwQxF1bPp6zNgnvgkuow0Fi/A07VhCN\r\nXzt4jX2cFQuX2Bd22irtNy8OIXq6j+wUqE4=\r\n=YaQe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf-16.x/balena-jellyfish-client-sdk-13.0.97.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf-16.x/balena-jellyfish-client-sdk-13.0.97.tgz","_integrity":"sha512-KpM90qdbn2fzDldBhvr6V+yC2f7KBx4w+IEAdQBhkLAJ3WC7pyVN1SfraUHleGpMLl2zhH48PWkZL9LUxwWTcw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T05:42:01.221Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.1","typedoc":"^0.23.15","autumndb":"^22.2.78","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.97_1663998384712_0.3346676619897657","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.98-renovate-ts-jest-29-x-9346f8b1361869f444c495da1b05ec5edfe70107":{"name":"@balena/jellyfish-client-sdk","version":"13.0.98-renovate-ts-jest-29-x-9346f8b1361869f444c495da1b05ec5edfe70107","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.98-renovate-ts-jest-29-x-9346f8b1361869f444c495da1b05ec5edfe70107","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5bd104767b5a6c7773aba5aaf44a603119808105","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.98-renovate-ts-jest-29-x-9346f8b1361869f444c495da1b05ec5edfe70107.tgz","fileCount":32,"integrity":"sha512-lZE1xeW618T158/H+m31mADomMkUnt9HR7cM8yWPoxcl+QkWAbOB0Ae8rrjYiMIwJt4fmOgjSss8fa6PzFbOdA==","signatures":[{"sig":"MEUCIQD1XOK0lMTAu355X2X4xH08SLKHBi3jJBt0j3saeD6J/QIgfiR+dp2qJhUWgmUSiXKCjK8AH7JF+0q0cmGmoeABymY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLubgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpsgBAAmvbLgSsHXZV56NGG/Snn+WGo034RiQiToW1e1eZ4Ed6ooTEu\r\nMPLOBUVxo8q8o5GNSkRXHaBRewHyUoMTgifjq/ycuviiDmdap4dhzeBQh3+H\r\nfQ4+hWEoeowMXmqdIANi9z5RJ6+syi+Boelv4jMwtOFRnIHCDkpusBGXJKFt\r\n5NaRhFNaQdJZp0a8xrR2WC9AzogOeR4M0udAvMyYyuS2HCf9gF9D+6wZE2ap\r\nzXl02x8KlvoKHOZQmnYv9rD8hIeclKJ7rBPDSoWE5UK0GpOD9iNRpoE8DumG\r\nJiuv2G7QCmYSD+mAulJkeajDUUCoHdA/Rs4Qo79waz8dUT42PRLiuM5/RQWX\r\nQCDMWTpDq73qa12tdOFqwslSeXqyXYgcSqrA35o3rwduidkhw1bgPYZxzZUy\r\nbMJiRNKnL5Bg4MzVgM+s1edxmCcJgsyBK1/guMA/WSTfid3PFJfrwNh69GEU\r\nbtwcGlRGRrlIFpl8oxZ5pJHkZULg08DUo4/MIecVAvdil5aSiSv6cEho5qzP\r\nDGpmewmfJ6ea0fcSgH8rPpbHQPN9aDVfoejLz55QUKf5xkCDpFbOd0rtohW6\r\n5xzSEvl68Uxh0md0M5RRjU/R2TmKS/1NJFChHTUmlS2CX8QDq6EhH5Ij0Dlo\r\nSwGlf9How7oxtengqlKRLetjt8RezRoiZhY=\r\n=TbL7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-9346f8b1361869f444c495da1b05ec5edfe70107-16.x/balena-jellyfish-client-sdk-13.0.98.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-9346f8b1361869f444c495da1b05ec5edfe70107-16.x/balena-jellyfish-client-sdk-13.0.98.tgz","_integrity":"sha512-lZE1xeW618T158/H+m31mADomMkUnt9HR7cM8yWPoxcl+QkWAbOB0Ae8rrjYiMIwJt4fmOgjSss8fa6PzFbOdA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T11:14:27.206Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.78","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.98-renovate-ts-jest-29-x-9346f8b1361869f444c495da1b05ec5edfe70107_1664018144219_0.5039104030475554","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.98":{"name":"@balena/jellyfish-client-sdk","version":"13.0.98","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.98","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ca3c8f67235f0b30349e7b4e1d7ea3e8a176230d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.98.tgz","fileCount":30,"integrity":"sha512-/qOFmdHMNook01qot/i6dA18dm1scDikASPokGkbL7zAg1A1XqO5ph6ycJ907FU8fC0yIhXBckZgnHX23r5YfA==","signatures":[{"sig":"MEYCIQDsbSdKk1xfRHxXgBP90XTNdR3Sdfn5JUNQxHPwXwFRNgIhAKhsOKI8GpgFOuhWehWUrP6kIunv+/HOZyJNoUNcYCg2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLudXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqpLA//fSJsijdunRklZ73O/KR1I0bD0Tr8KYooMcZMjbsd6cyewSqu\r\n2tRX0CAYIdbUg4WivaxRoU6EsB4xZFx5dL4qwai7ZOjs0TKucaJbkk2VDJTP\r\ntyDqxLxYMvGucL59o8h/ApfNJezk+lPiUozBLxOfm5L1EVIfNShx0OUDUgBY\r\nkTUCtWbwbo6yq1DKKm/LADbwmJ/pYm6qiVjt6rJXs8Z6odfKwp7MW5Ur+K3C\r\nrQUwjYcBkHUecVj1ASy3FKkb+h/05dF1Gu/5vxs0HzedmSQw1CJq9ckf6fdG\r\n6WinnnFuU3XK+ziZWnPgyaPwjy0/af+JvjktAkPmbj/qgrBJPNhmUbk7epL5\r\n1Izu63addkB3sYiBc2w3VttAok1DSVhBMSbUSAinoJDSK6SMCsfn0lJnv2wJ\r\nC0KNgYk/eoKJOZbH+ui8SRWvFbpqlnvS5V419Xr3zmY+ZD6XU3H3KHBw1Ijs\r\nnUUvF+Bz9pPgGFtO/Oig1x6+rHO/HT9SMHkpkzV/QZ7/LMdqNA+Ou0tvyZBZ\r\n4TEVDKfazaQihWykA+Dsl5spy2suxDkDKLp3uQQU+i5rDB1drp69kTlj1dmP\r\nHdTuWah9dZbQIgV37IzLD+s87Z1ZYFpi2aKHGt4y98mL9w0KLV/Ec02M0m//\r\nNAt/pZNT8IEpgoTNkQfbcH612Tw3qHLnsNU=\r\n=B0Va\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-9346f8b1361869f444c495da1b05ec5edfe70107-16.x/balena-jellyfish-client-sdk-13.0.98.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-9346f8b1361869f444c495da1b05ec5edfe70107-16.x/balena-jellyfish-client-sdk-13.0.98.tgz","_integrity":"sha512-/qOFmdHMNook01qot/i6dA18dm1scDikASPokGkbL7zAg1A1XqO5ph6ycJ907FU8fC0yIhXBckZgnHX23r5YfA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T11:14:27.206Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.78","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.98_1664018262827_0.2770951347660373","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.99-renovate-autumndb-22-x-1acd3f2303df9a8465a0ef8a0075a364f7b4c447":{"name":"@balena/jellyfish-client-sdk","version":"13.0.99-renovate-autumndb-22-x-1acd3f2303df9a8465a0ef8a0075a364f7b4c447","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.99-renovate-autumndb-22-x-1acd3f2303df9a8465a0ef8a0075a364f7b4c447","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"80a94df885e51a6cbaf929cc2a4a15fc842e3f47","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.99-renovate-autumndb-22-x-1acd3f2303df9a8465a0ef8a0075a364f7b4c447.tgz","fileCount":32,"integrity":"sha512-kzRPiYbJ9+bEO10BcVMJCC+G1JWbKKBG/TqIFo91YyuNA2R2PZxV2rpZzzB1LmJlWVBAZInseMTWmGfntuV4+g==","signatures":[{"sig":"MEUCIFZOsp2Q+ssLNtrHqPhqA5XW84q0QMM0+pmIVDHxOgVZAiEAsq3DbzTG1lOX2EhPgdWByxUt/5AjxR9n8lIkrmoZ3gY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLxn8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryXhAAolFq9umlEqG+KgWo/WBq76lkDMeJkgZ9gGbS2fSPMaiFsYHA\r\nmA78zR3m4WaQieHrMRvCQwrrgaWqlGUGNRvei0pQC9aqrmdxLNXshlsIlHA6\r\nBWEhJ0ColJ92VK3dJiU54WVwbn4ucTu/O0gG3GuV9t1SED1e05qZvH/t+O7X\r\n4+wn7NobAglLRUnDjuIa9Pf2sPt01GwLqVR5pUt4tIV6a2iwohA//Fxwm1/V\r\naqOnHiWwWWW5BkyOkPeLXgSR2i/Ihd5tGW4zzClTaFWtE/jYtDr/aQc3UZnp\r\nK4Kd8t5gqyd4a8e+jH8Mj8NBi/HP/z9o09aRZA9wE3TfrZ/BnWYxouNRevPK\r\neAjT3uM2AEndmNqWP4DnIDNe6jMWsLIcZi+rCuKl6ZDEcWU/PwUO65vZ7gM4\r\nOO67PWQtD8LlHvVjDR3lxr2Yl+F1FcgCF/rgM5MIADh94W408tSEnLxV7t1S\r\nCtmO3FIMYozpq6Q4oz2RgjuatehxaZ/l2dbVhF5hMPXxqw9hZy6Z89PHEO4k\r\n7hXbCyHLdhzgb+kRME9gjx9cOva3hQESDU43LniSaxfbxRhi/ASX4t/JQV4F\r\nK2FZq0DpnoRqWrsv/LNnHXGB7BL9gSyni3Vjxiyq2jxLooU/1jTpq89jZequ\r\n9HADMlfxDr8CEr4Xs2MC7oAOv7TWaXSHcHw=\r\n=4Cto\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-1acd3f2303df9a8465a0ef8a0075a364f7b4c447-16.x/balena-jellyfish-client-sdk-13.0.99.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-1acd3f2303df9a8465a0ef8a0075a364f7b4c447-16.x/balena-jellyfish-client-sdk-13.0.99.tgz","_integrity":"sha512-kzRPiYbJ9+bEO10BcVMJCC+G1JWbKKBG/TqIFo91YyuNA2R2PZxV2rpZzzB1LmJlWVBAZInseMTWmGfntuV4+g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T14:52:12.307Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.80","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.99-renovate-autumndb-22-x-1acd3f2303df9a8465a0ef8a0075a364f7b4c447_1664031228717_0.6846225031426183","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.99":{"name":"@balena/jellyfish-client-sdk","version":"13.0.99","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.99","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"194bc4a4f739344deaf9d29da58a38a0a186fdb6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.99.tgz","fileCount":30,"integrity":"sha512-kf4fCuvzwherDWw9rOJ4nJjnbdkt0OGU66CcEfbz289hQ/8MZtT6ASJLZM988TVr0pJ/VOOdFGMFq4JlnmyVXA==","signatures":[{"sig":"MEYCIQCH58xvM/iBPBImsfdymHG4ApjmPemWSigTiX0q/HalkwIhAOJDvxKQmk9MwQIQtcbrquSFMIq/Ub5+dM1gcgdS8VmX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLxqCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzEA//YnbhvEJ2FS/IOIXC4ZUM4mlR6aZpvbdhpo9KcihJQ04O37KK\r\nmXAfiEy9NfWVukAUGnO87PDK5S8XbLNtKmgCREqgM3zV0g4Gn5RLhnt0ZB1w\r\n0VpfXsjJr3NVE6sO2uXfxswJ0pa+0hGnSiu4FkPr85uTPAWX8yxE7bSOZIbY\r\n9D51jFm/4vQ4ro8haRgczRC5aRMz/a68hoGJw41NlSTYcJHETqn73+Ec+fac\r\nKOH9vbnBpzHWen1G2ixPsqinnkBTg9/tFXqMEmKjhYtHwXPVQQqgYbKhK1rH\r\nfyK94NoiIPtGerfWdG7wHnEA9U8bfc8ROswta8qpFOs/ii1QYDjwE9HnhdMq\r\nSr1f9d/gn3ZWDb2khhgMYbQyvJ8XnCDhuRC5JBAPvaOu/N2tkKcuThmOylj9\r\nRIp5r4t29gf0EfbKPNUNdbwdFviSTp+sCpnU+uXr6oX2Qd+cSF+KqS82lTNU\r\nnNpUwa4Qo413qVgSFdt2eK1EYQvKrnm8H3LrEwBl44KY4+Iwq/Wg3pse69hs\r\ncIcDhJX7S5PWpAWa7TPRm9NYHnAYSb2dxCBe0PGKLnS7wMHMQYwb9yNxirA6\r\nD+CB6N4gCaYjX8hHfpB+GQynyVwsxGBLKXe/0IQIcM4UGkZIKaFq62ATr1R9\r\nKQj4wLcDTfOqxK35pe72P33mXJrGXODRfCM=\r\n=KgfY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-1acd3f2303df9a8465a0ef8a0075a364f7b4c447-16.x/balena-jellyfish-client-sdk-13.0.99.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-1acd3f2303df9a8465a0ef8a0075a364f7b4c447-16.x/balena-jellyfish-client-sdk-13.0.99.tgz","_integrity":"sha512-kf4fCuvzwherDWw9rOJ4nJjnbdkt0OGU66CcEfbz289hQ/8MZtT6ASJLZM988TVr0pJ/VOOdFGMFq4JlnmyVXA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T14:52:12.307Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.80","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.99_1664031362425_0.2163210419585515","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.100-renovate-autumndb-22-x-c405278b01ec0601e856f89b2231f96d47dc87dc":{"name":"@balena/jellyfish-client-sdk","version":"13.0.100-renovate-autumndb-22-x-c405278b01ec0601e856f89b2231f96d47dc87dc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.100-renovate-autumndb-22-x-c405278b01ec0601e856f89b2231f96d47dc87dc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4947860bccfb3ae7582df728019394442da4ca8b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.100-renovate-autumndb-22-x-c405278b01ec0601e856f89b2231f96d47dc87dc.tgz","fileCount":32,"integrity":"sha512-mWcgi33fxlzo3XYNuapKceZqTFTun+mTnxjj4ZghwVYtVZo6kAOB0/qSZL+MR8JE8d+fPEIBUMgR6mgFto2Htg==","signatures":[{"sig":"MEQCIAagX3yFQoz6RlINUp7f/DRb4CcBS66Iwdu4HWKophZ1AiBBoxaGV+ty7AxZR5OJDcutUlaSnim5XENxaOl05e0OEA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLzmeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIKQ//XjKRdcEeq4fxlxEcWos57S1Ykl1AqO70fYJgKpUAslmBAAkC\r\ninr7ICcqpHnNJx09K64tqtzQsyTg+VLXbPKpGqER7vXMdB3im5VWf6M3JJl3\r\nwkUiedw0eYFNGzN1h9UmbZRIAwMSA5qDIMOGaiuLmdrNonikG5YK03kNzr3F\r\nBxkVYB+M5HapkaYxVi6ikLaSM36PQ9g9CCxBi1CMgu6NG8aR+Rc+IH70Ovt+\r\nonXOwNUHU/4eCtu8h00dpwDJsaZiqw0+C/KcEnBMeyjh2CHKequkWiVBuscC\r\nzeimFT4cVtIcUWAC/Ow00cwfZ6h120R0glOEqpXwcb7F5v1i286k8Pm4uKX+\r\nY2ozYWZqToxxb4sbeGiEXl5Ir+qI4bqY6bD7WvFTaCuqHo0ms73u2lPdCv6c\r\ne2B2znyKQYoqm4yEb4UItJZ4OU/mNII7S0lQ5Rk4jQuPNHlhtmE6qsLEfLDA\r\ndV1VplTtBFtQbVqC5z6CQhr+be1hf84GdgjpBp56y8zJSEBgCT/0P0RoFXvI\r\noZsy8mWAwtwO5iUpp6H1FsqiBxuQrDuMm72r6CPK5PJ6J3Kb52eBpu09g2H6\r\n1jKQOC8r10EcvYCrSF21u1s9sme2tdz0vMmppxTdxHX6NabSttYTIrwJaOya\r\nLNoY0mlCZG8Pwidn78LOlZVb5zygJBhQFQo=\r\n=/xdo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c405278b01ec0601e856f89b2231f96d47dc87dc-16.x/balena-jellyfish-client-sdk-13.0.100.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c405278b01ec0601e856f89b2231f96d47dc87dc-16.x/balena-jellyfish-client-sdk-13.0.100.tgz","_integrity":"sha512-mWcgi33fxlzo3XYNuapKceZqTFTun+mTnxjj4ZghwVYtVZo6kAOB0/qSZL+MR8JE8d+fPEIBUMgR6mgFto2Htg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T17:07:29.917Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.84","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.100-renovate-autumndb-22-x-c405278b01ec0601e856f89b2231f96d47dc87dc_1664039326141_0.7483056403369559","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.100":{"name":"@balena/jellyfish-client-sdk","version":"13.0.100","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.100","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4378563c57141882dddc7e62cefef534d602364d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.100.tgz","fileCount":30,"integrity":"sha512-2Tn7fABD3jZno24J45EA/KFbw1Eq5hc2WpL9AF9xpbcI3rs78k9umzb1gG8dxpnrsVur0V1TVMWvUjAtgknhgg==","signatures":[{"sig":"MEUCIGzwH5k9q/NnyKeaIu1nntSGgxF9wvUVhAIx+MX1pGyTAiEAyluKlolv3vuvSMcoZH3NSW/JdwaCCc2MDSFzW5Jsiz8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLzotACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAlg/+JOApzPXj/JB7DYFUU3iwXu6Iy7TUWHp49JSeYb13Sr4SZLCq\r\n1Zv58zFE7la5LhtOgZCL3PTlkMYIyu76S7l9ms+Mp2k2gu7YnlEL0VD2/VSf\r\naH6vfEEIqCrGXc68E/iuaR1n4lNvR/vj1BKw9vA+8FprVDEOkqY0ZOSAa9AN\r\nRM7yAmhyckasshn3GiXqm9zHIt95yqEfxOn9jX1Irggf5SA1FsjvB5gcEgX+\r\nmM/0YjnkxeOjtkMAWu+cc7BZ90qsTNtC/Um0R64+w4jMhN1yliBJ2X0i4p2x\r\nRRmMuKaLOgXtEMUwiY9ladHWY8GWvdXHOBo02pbxDwAcyZNWFz7R/9BXGVYN\r\nJBjDZ7t6m0bPfFRCNDIsyFz1WxIGOYM8qOHXdYRb77LZF6kdoQppQi7jjNpk\r\n/tW2ghIUTogsBsAZ5aqw6D2JkELT2uIclD3erUReqneyYsDTqdWrBuOwnm+L\r\nuV610R5xG3ZPlsX5wk28Z6kTR3UY2P0RNNsMgLXrhPHY5+5fwrQXh1hkJTSn\r\nVI7036MEULx8ORAtAXYWa0UVwoU2u0tlKu7Gz6Ls6g+YjNIPt7AqcRr2Sht3\r\nmRMJwmOOPbAtUniD+jO3hjp66i25CDrC+tV1uqEnpWjvG+CChOeZ16hwWC+o\r\n2yqvWIg1fHwJfS1lnm2++dhwfgD0MaJiqiA=\r\n=eSBU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c405278b01ec0601e856f89b2231f96d47dc87dc-16.x/balena-jellyfish-client-sdk-13.0.100.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c405278b01ec0601e856f89b2231f96d47dc87dc-16.x/balena-jellyfish-client-sdk-13.0.100.tgz","_integrity":"sha512-2Tn7fABD3jZno24J45EA/KFbw1Eq5hc2WpL9AF9xpbcI3rs78k9umzb1gG8dxpnrsVur0V1TVMWvUjAtgknhgg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T17:07:29.917Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.84","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.100_1664039469427_0.405876885735704","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.101-renovate-autumndb-22-x-dcc9a3f905e21e32beeb1e79ce0722777d17ea92":{"name":"@balena/jellyfish-client-sdk","version":"13.0.101-renovate-autumndb-22-x-dcc9a3f905e21e32beeb1e79ce0722777d17ea92","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.101-renovate-autumndb-22-x-dcc9a3f905e21e32beeb1e79ce0722777d17ea92","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d90c783de746516d63ca0cb70e0ddad7205020fc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.101-renovate-autumndb-22-x-dcc9a3f905e21e32beeb1e79ce0722777d17ea92.tgz","fileCount":32,"integrity":"sha512-CEfarq7o046P0Q+jpyGOY0wIapp19Mv4aGMgsCtEBlY8II61LROA32+tEaXanbmZxqGpLTMRYQXIu5/+vhMWLg==","signatures":[{"sig":"MEYCIQCtz3HbVrZecMKTsxPwutX5Eg52slixpIuZuDhW/M1KYwIhAJvpKYauEA8Hi2CfCF4ujQRAoq7IbV3kDSHslvBLlVTW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjL2u+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhTg/6Ahb/M8nAFJ7lQU79phh0BpQy5tJ0x/p2LD34CVLlzNEswaKf\r\ncPIKT0oRWCv5r2Lt7tv2sXtcfncN98onbkTmG5cQUxEqwdKUs7TvVWVLtGz0\r\n93FoTYtdp9WN+0gQ5ay5d6KWaDPQ4xHQvJp2cyrZeMSlVpLRhzaw/rDCJXS8\r\n2sReWuXV2ISe8XgUOBK7pLKDsI/qDl7KDXgpvfE8ZoBDTfEYVs+FUEqhmbng\r\nlg+VIxD3gI3rynTrE/cknSLwqR5EMp7T2GZ75v1K7i+zo/Ky3Ryx1sUfh25t\r\n6lnwzxqZXbnZe0ue3xCVJ/Rg4ZXPbn3FNOuIS3Gf6z5BZG64pas0aG9vf8jk\r\nloO8BKhpmNfNnhyYlngKTz9cFp2o4X5rrPMnyRH6vZFuR10b5ZvUnp+mBDt7\r\n6SrmZE9ixoNsAFkprfn2RG8ySXk86EH6Su5qhT+U7Fgy2GEBuvNyVzqjejX9\r\nKbv7ax4vvl+tmzy5oSkrL1gbKZaGcFeKGbkLADR0Kp7mWlGEi7F3ybNNfd9Y\r\nrdIRUaO7Ll5U8zsqbntXBkVix234TrkvbIO8sByO+Q1gWG8f8R5LQfpfL1nG\r\nzpB3yU4dRdq3HxE/tDNbI8x39TvOn+gCy2R5kX1wDDZ2sLi1inav+w+iNUwc\r\nWjwls8igQLKo7PLA+Jgu8J2+5GhDeKUbdi4=\r\n=Leo5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-dcc9a3f905e21e32beeb1e79ce0722777d17ea92-16.x/balena-jellyfish-client-sdk-13.0.101.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-dcc9a3f905e21e32beeb1e79ce0722777d17ea92-16.x/balena-jellyfish-client-sdk-13.0.101.tgz","_integrity":"sha512-CEfarq7o046P0Q+jpyGOY0wIapp19Mv4aGMgsCtEBlY8II61LROA32+tEaXanbmZxqGpLTMRYQXIu5/+vhMWLg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T20:41:03.040Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.85","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.101-renovate-autumndb-22-x-dcc9a3f905e21e32beeb1e79ce0722777d17ea92_1664052158387_0.27215677298231333","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.101":{"name":"@balena/jellyfish-client-sdk","version":"13.0.101","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.101","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0cac3358df9fa6e333a99eef0c678d10cd477621","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.101.tgz","fileCount":30,"integrity":"sha512-OHrTxI9/w4oOdSEdGWYK/wu1C1tikXvCYed0FUDLsA4/+lrdAsWhuUlrL9FxjAMgAnRlTVk0mMr+zxbz6eAMPw==","signatures":[{"sig":"MEQCIChmxIitBJrEYumS8OD+/ut3hxOD/qrouRf/7ucXvBn0AiBGl76IgpPpx10mz91M3PTJEUxL8ElD2MV3V7TsNkjkwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjL2w6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbcQ/8Dp8vYiq9tuoOX++nAqOYS/J6gm72jLdEQSP1kiAv48A209c0\r\nCHpAhX2FgyFAp4RJrr+26AhmQNXPY2jHj4x4jU4OCQ8N1nCE+ujBYz+sgwYD\r\nVxpWNhKJbES+U0y/Ve0sdC5Dx6bZNNhaD2qlJEzF/EXnjtRBwttcveF5w2A/\r\n+WxjwK9wtbJHjvs2gPBpqp9EHVBri9R4YRAaZtjqRwZC0iGm81/f0s+Eh89V\r\nOpPUJYXsp0SYGy0Ct6x/N8setZQU73+ooF3irqLre9GNF0q950YNp75eQww7\r\nsVO8F7NgXxJwC3BAwdeoUNYpWCN0zJIFfWX+KJrutnqr0aZehqIm80a2VRcH\r\nw67GC51eEBOPpEmI0V09dvmvv8uMLq+d0qiaOWIOHclfV+3hzITgPzFV8iKj\r\ne9wY+0ElQc4Str+YI6UP/twvILhtEaotD9lGzcpsm/gZeTegkQQGEDUpffSj\r\nTPGtG0997lOBQqv//tHuHVTwP0alqLpOeiHy/yZhNYopo6AUoQon/+Tlye3l\r\nknFvejCt8FXgNq0kAj64v5Fcm6meFOzdAN7PBubWp5RGvx0nW5PMS6B+9zc+\r\nUmKJ03wdUitJo+0JVS9uWV5aLEP6pw7ZVwSiN0uc5T4LFEcm/tskCtUkTUpu\r\n0QoNuuztIZ44Vc+vXxe5eig2tAQeptTTrNA=\r\n=I5PS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-dcc9a3f905e21e32beeb1e79ce0722777d17ea92-16.x/balena-jellyfish-client-sdk-13.0.101.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-dcc9a3f905e21e32beeb1e79ce0722777d17ea92-16.x/balena-jellyfish-client-sdk-13.0.101.tgz","_integrity":"sha512-OHrTxI9/w4oOdSEdGWYK/wu1C1tikXvCYed0FUDLsA4/+lrdAsWhuUlrL9FxjAMgAnRlTVk0mMr+zxbz6eAMPw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-24T20:41:03.040Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.85","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.101_1664052282219_0.05926067106672672","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.102-flowzone-docs-f14dbf6c4acd864673ae182002a2abed23773377":{"name":"@balena/jellyfish-client-sdk","version":"13.0.102-flowzone-docs-f14dbf6c4acd864673ae182002a2abed23773377","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.102-flowzone-docs-f14dbf6c4acd864673ae182002a2abed23773377","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1faf05f5c2549dec32c9c4380d30e615bb0ae669","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.102-flowzone-docs-f14dbf6c4acd864673ae182002a2abed23773377.tgz","fileCount":32,"integrity":"sha512-Ke97Z9c478Lzk2SJ3l3vKl3yXsRyW5I0864hYIRHoJmtivDP/zO1N4L16DA0jZYhaAck//vcGroi5X+OeTDk9w==","signatures":[{"sig":"MEYCIQDhbrY+xGfzR3G4NtWGOK/RI+DDZKTFSvYaZ1CR3fqBPQIhAKxavQk4YRQFqobu0bx/4+Fhe+u/qxz+ZW5Bf/2q5D6d","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMteEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYTQ//Yia36iutKbcYwrKwvnUKYLyYvoG6OMHXmHnLvXDbAHCvKug/\r\ncUONPkX6f8H8DTfy2y1bs4OfE390dbKvRh9L2cDvmQYuq6QSLefQYYf5sg98\r\n52JQ5tEoAKO8ILs3Gpm5Wjuiv48UFfke2SRz2TT4n8JGqTcvEQshH6PA0pwu\r\nme9fCSYgB7TJD5JsYbB98rpxzNnkWiuUrOSEYOuSjSq5S4nO/J4tE3pxlqX/\r\n7B5z6idi/nZ9IBJ266xKqbigGbDSwqVK4tUrPr2S3/9gPYW36/0awVE9SesG\r\nwjVfRXayLiHM3VBaeIyoTtUdcdpz4lfUbstYUPSlECAhZhJqGoX4seQKlV2g\r\nhaGRGDg9R3BZcwRZgGcXZfwuFbNSmOSexy6t+br2o03ZdwCsi1B+3GiKnYNH\r\no2hk0CaNU7HeFZpmLxDoDyXPZpKvAsBfdfMDJ32S6TlRJC8CN1/OGrUaUeoS\r\njdmLgE5BIF1qYIu12dned5Oikn9ek124drepS9laLBQdV0dS1asLnGW4mQq1\r\na/ML3EjKmlbWM6UtmpGQo3DxI5bKzNd587TKd1CmWfAC+wQ5jmtY5JksT+xU\r\nagU4RrH3uJqphrwrHxb51ckxjcL9RaOADu3Yji2FFe23BHbSvk2IxOshCHFi\r\n8YLzkyQQGKG08E8jAlN+/dEjCYRXozOR7ZA=\r\n=1Ozg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-f14dbf6c4acd864673ae182002a2abed23773377-16.x/balena-jellyfish-client-sdk-13.0.102.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-f14dbf6c4acd864673ae182002a2abed23773377-16.x/balena-jellyfish-client-sdk-13.0.102.tgz","_integrity":"sha512-Ke97Z9c478Lzk2SJ3l3vKl3yXsRyW5I0864hYIRHoJmtivDP/zO1N4L16DA0jZYhaAck//vcGroi5X+OeTDk9w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T10:57:42.447Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.85","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.102-flowzone-docs-f14dbf6c4acd864673ae182002a2abed23773377_1664276355911_0.6227307454795996","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.102-flowzone-docs-e100295bcaa0261ce5a886b519eafa641f651697":{"name":"@balena/jellyfish-client-sdk","version":"13.0.102-flowzone-docs-e100295bcaa0261ce5a886b519eafa641f651697","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.102-flowzone-docs-e100295bcaa0261ce5a886b519eafa641f651697","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4d3cf702a342f859c0ab472a9890be1e99f2ef36","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.102-flowzone-docs-e100295bcaa0261ce5a886b519eafa641f651697.tgz","fileCount":32,"integrity":"sha512-ms3dM3K0z9elUQrDox42qurgPVpxV9FSxRQHpAxApCTCyfTZajguoWg7UErjSvSELy+rieC7Zyq2iYia10KxCg==","signatures":[{"sig":"MEUCIEOsIN7TcTYcrGnMMiHsWx/qny7qAkjU8DloyV5sQYW9AiEA6W3sQ7TLBHjUXfb2T2lB4mv+soF8WyEq4kCYJLtloCg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMtigACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5exAAgntVd4xo3Vi0NENbwGv7duxvkSxZwwlfJfe2zeNVQyhTv8Zz\r\nNllLqViyBdwfrRuLgLH1D3rWeNDaRzMgE9CXvQo0m2Wm3L711UUQSAeZTh+6\r\nxoGZjjJZ79diF39gyddvOAIG2ZADjIJcDArzHiPhbyhxx4rnSr2zdvC7yHFB\r\nsO8uYzcU8Cwg8AV1RxquEo58se/aO6HroonURSpm8AcYbv905GmeSvuM1AHS\r\ns+JDosbT4jvmjirjGF0YSElT0oNVt4yZNompm21qVbt0BuQW54/cjW6Byepg\r\nttegSSU+n2DxRcqIN3DLM5i7xtJU3J8SV4GJSyzKyN5pHh/+HUQBZ/P5F3lE\r\nhUJLm7SN+VgQj5nqs6M88A9UBcYx5uR5L0Le8yNTRPSNv8J0T2HfqTP5XI54\r\nI14pWEpgyG21W/uhycre3+hZwm8Dbff+rwN25Yv4+FuJo483xRDSsOdI9+H5\r\nBv4pJ7L6HvsRzdYsCRE5ufjVz1IlV7b1Y5NEbSyHY6DtdUAZ2pjgBCVE7Cmi\r\n5u7VZxLW4us2xFKF/v+PRRIuxb12aOaRtBf4kIsQ51AVT3qEoN4Et3Xb2+E+\r\nLg02mcl01So1AR+EZVcrux1owBoVEvzLeKYfvZebHePO4pn2KokLmWAlbU5k\r\nTlEFdQiWhzrDLet9mI14dgNiGstSC/H/mzA=\r\n=Eiec\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e100295bcaa0261ce5a886b519eafa641f651697-16.x/balena-jellyfish-client-sdk-13.0.102.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e100295bcaa0261ce5a886b519eafa641f651697-16.x/balena-jellyfish-client-sdk-13.0.102.tgz","_integrity":"sha512-ms3dM3K0z9elUQrDox42qurgPVpxV9FSxRQHpAxApCTCyfTZajguoWg7UErjSvSELy+rieC7Zyq2iYia10KxCg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T11:02:42.974Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.85","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.102-flowzone-docs-e100295bcaa0261ce5a886b519eafa641f651697_1664276640576_0.574650484683632","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.102-flowzone-docs-05bb81e547cb1992fef9631dd423040b98fc2280":{"name":"@balena/jellyfish-client-sdk","version":"13.0.102-flowzone-docs-05bb81e547cb1992fef9631dd423040b98fc2280","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.102-flowzone-docs-05bb81e547cb1992fef9631dd423040b98fc2280","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24581bfcaa4ca0c647dd6fde10bafa626d8bb83a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.102-flowzone-docs-05bb81e547cb1992fef9631dd423040b98fc2280.tgz","fileCount":32,"integrity":"sha512-cz8jcZirdDj4ka4FhvB+a10H7/cvE4OLBcLgnhfDtQSw3ArfghwvK+Lz7W4CbgAuqX44RrrsghFu/iwvym1mBQ==","signatures":[{"sig":"MEUCIGAiE3KTxtSwJ7LwBdkq1vg3tu9ibYfJ/zjXiiWukzQoAiEA0J96nQn4fxpzq4zldd3QzT0al/C4oO5A8yhmBC4guSw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMtndACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrvuQ//TC8Vyu8VLKRwMJQt7mibR7l86hbMiBrOrAEEbUd+9FRgchoq\r\nSddqvInDQr/2Hd9cYGe5BIhfbAQECYFjbbJcXVI4u5YHZxEGAvU/tQ0YAVwR\r\nvnjjzJDowfNJu02x33cQKuR96DBSDAr8tlzQC0f7KBxC1w4qmqFbVh0Eno3m\r\nUiHFmKVrPrb1KryRlcBsVWpElBpJ1b2gB3ynlZ3Lb+j/hfmMYkrFoytH6JOy\r\nxR1IiWJEYTzFEk8W57copgRtD8vJVgoS/asial5OReWVHPPcTwIbLVYKG7GF\r\nsToP26PeiG39BcMiKUCGiKteF/6obmRA9bprrPpDj4x98lSm/krZEhpUv9CT\r\n9GjNodC+CALfO38lMrHkhDKDuFucUKN+X/jDPqnHYHxfbTWGLH0BW+nJGUPY\r\nlMT9py60Aa8vCH8mNa1UAS9YrzimIzFU1OjZFk/Uta3PEDvuoZv2FptGhH6B\r\n6EInheyQoDjLZEe/Z6ojpAsI3jOYYfuRnMTJ8eCFByn6Nij6rfD+mW2FoaRv\r\nDLtHQG8gRa87BO+vsiQKVLKchhnRBWetZ6l/kdbsy/O9oRroaiuCr20kNqKb\r\nQqXv3lBASB9EqbibnvIh2V00Sn99478DDzE53CL83uA/hmN4cTGm8O3ivaVW\r\nLFnrcyacrb9xAQ/DoyBR5EwAavphbqrzUbU=\r\n=bMZx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-05bb81e547cb1992fef9631dd423040b98fc2280-16.x/balena-jellyfish-client-sdk-13.0.102.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-05bb81e547cb1992fef9631dd423040b98fc2280-16.x/balena-jellyfish-client-sdk-13.0.102.tgz","_integrity":"sha512-cz8jcZirdDj4ka4FhvB+a10H7/cvE4OLBcLgnhfDtQSw3ArfghwvK+Lz7W4CbgAuqX44RrrsghFu/iwvym1mBQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T11:07:45.481Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.85","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.102-flowzone-docs-05bb81e547cb1992fef9631dd423040b98fc2280_1664276957239_0.7281850955437688","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.102":{"name":"@balena/jellyfish-client-sdk","version":"13.0.102","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.102","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8e61c204bf9f9bb788a4c63416c476ab531ebfeb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.102.tgz","fileCount":30,"integrity":"sha512-ZDwn/GYentDeboCd21CT+wS6bTU/9JoBkYnISPwcTSBEop75RY4GawcMYpAGaqt/rEyJW/oN1wab1Zfm3l36Nw==","signatures":[{"sig":"MEUCIQCzm72/9aiqeKGvsiyk4IJ8S14BUaEAtlsSlHEicy7snAIgE4jZTW3CGua9r5i3GzS3KYXAM+9p8AmOAzxdzn58APk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMtp3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoyww//QmUllhYK4q6A+dzKpr78ccvrMoa/cfcMJ4lwaX/AundB30qg\r\nnOXRZN3FGKFvcw6t9uy0jy5bragIWoXSQnb62s+qHLPXom9b1llTfbDABS1T\r\nxDwk4j7xI1dyeG8u0iQFAReREW6f5kA8yd+lvGKP5HHzOSYN2wcysMTPSOk3\r\nkiwhw7NApDGIYeAzjZlYKzVVPhpTqX3OFkW5NiPciGgvw4shni7i13ziAlnr\r\nyGRbCe3HHxy712ixUnva3JeuU6gVAgXO2vzvgVrpcSjSNYg36k+vBdID2esP\r\ncoBOvsgOpkJ9TypgMNt+fOC1tvd8w3rAy9awAdgl4EaGuGFY3F2c1zyFTQhc\r\nyGhL76uPGt+roIvpcUaxKo5UlLhzst0Edkdv3ViWQLfvB+IWzad24ILtYaCe\r\ne6EMpuyYGhQJBNmxRsB6xiyvbDQhZhE5AGN1Nw1rwcpkqblh00ubK71HjA9c\r\n9I/4MdWIJGykZVNqUO8ZFHoGA6P+eLTY0ij/MPkJ9c/gJWPDiZ/HlTzPq1L+\r\nzG6j2dJe2AAAJatdVbAHqmaHXR72k26hkA8jNhlC8Dh01oH1ju8aOdUHVO6K\r\nuFJQ4qr1bH1m4R4oxouiDMRS6gwOTohOjxeuGlJyZXFTwYhGGOaTO+lbNugi\r\n+nrNxCYOikggOJYeM+9UOP64amC7wDqIpuk=\r\n=rlyI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-05bb81e547cb1992fef9631dd423040b98fc2280-16.x/balena-jellyfish-client-sdk-13.0.102.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-05bb81e547cb1992fef9631dd423040b98fc2280-16.x/balena-jellyfish-client-sdk-13.0.102.tgz","_integrity":"sha512-ZDwn/GYentDeboCd21CT+wS6bTU/9JoBkYnISPwcTSBEop75RY4GawcMYpAGaqt/rEyJW/oN1wab1Zfm3l36Nw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T11:07:45.481Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.85","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.102_1664277111603_0.043077823130577064","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.103-renovate-autumndb-22-x-6aad02e7070318ac602c1abee45d8bee5d0f8642":{"name":"@balena/jellyfish-client-sdk","version":"13.0.103-renovate-autumndb-22-x-6aad02e7070318ac602c1abee45d8bee5d0f8642","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.103-renovate-autumndb-22-x-6aad02e7070318ac602c1abee45d8bee5d0f8642","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df59d8e6a500c04a3a19734e0692b2659b077b8b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.103-renovate-autumndb-22-x-6aad02e7070318ac602c1abee45d8bee5d0f8642.tgz","fileCount":32,"integrity":"sha512-QmaRXcKK/XO9XsIkTh0/mIEvRi9or84F22wEgW80vxnXSBbmP7X768TaT0uMgZhuDWo6U7OI3kstTjuKCApzlg==","signatures":[{"sig":"MEQCIH/xI4v1Ygk5hxmz6LNiQh4OuBhOZWpTCYVspFlkFvG3AiAby3EQylEqMcGDJx55iZsLpk+Y3/n0iyrhps4ziFdIkQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMwkpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaNw/8Dmg9eRiQ9qHjPnKqmDSn8JHMXxhAIBx5JD0pXi1sq+5cOxzX\r\nDLzKeFH3k9T1tIMHYQY2PkraDtBkCrQ+DGWymua08gVX8tctibDZWdALzlGH\r\nI04haJBhTszLU9WLEAM1Gl7zvGj6lhc8s5VPCNfvkOy2A3YqelmWrubk+0LV\r\nfqwBagrJD7edXPM57aHlOEUcI9V1dmWqNZIj2Kk7teiyxUzurdgLlK5+XtQP\r\nzDO4Kyo2sliJwHCcjnkjXEcrOqDLeCfBDGCNO92JjGeqJmL8XS5XN3GIOqJ8\r\nVAr0rOZCGroCkv/hQ9ZsbpmXi9nzjAgyiIy/+/L+xn5pUlt5VcXpKhz9H9tB\r\nQyBNHcXCSZggKoxLbKzkYyVpkUFHaP8VtPdVY0fMggeCRDvCldejqJKq3B3G\r\nbTuM6RYd+5YAGMsHlm1GL7o8a986TthO5kWDmakuxQ/yqcf5CeMSgiiP6X2o\r\n8CH+U3oJn7KJi1dXuznMNQfhy7ZcTH2yfjXSmClGSEdma6hXX+cI0PqBxqYg\r\naY2q8pmH0FZP4TxL3EccGohBS2Ab/D5Qt33GZZ+4iTfjFJjDdeZHQogrnHuq\r\nNY4yH7GFULFDgxZAtS8kiN7xstDj/Us3pizkrlzXSoSmDOU866y4CSAzj9AG\r\nG/XsPhF+6rFYh9wdfTHzOflIfxPH//FO5+E=\r\n=wpSL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-6aad02e7070318ac602c1abee45d8bee5d0f8642-16.x/balena-jellyfish-client-sdk-13.0.103.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-6aad02e7070318ac602c1abee45d8bee5d0f8642-16.x/balena-jellyfish-client-sdk-13.0.103.tgz","_integrity":"sha512-QmaRXcKK/XO9XsIkTh0/mIEvRi9or84F22wEgW80vxnXSBbmP7X768TaT0uMgZhuDWo6U7OI3kstTjuKCApzlg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T14:29:32.100Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.87","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.103-renovate-autumndb-22-x-6aad02e7070318ac602c1abee45d8bee5d0f8642_1664289065452_0.9097430981473369","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.103":{"name":"@balena/jellyfish-client-sdk","version":"13.0.103","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.103","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ae84841fa83fb3f38dc901d3c7fa35626165d269","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.103.tgz","fileCount":30,"integrity":"sha512-nTOA0LVL8xBTRIbqlsQI6Sem+gLmCF4JvlkwUcZJrDqHvEYC3z5e9/H7zkHijCBlEfV0gdtlheQCIlFKkmcBlw==","signatures":[{"sig":"MEUCIQCVeK/gLorePOlhu3FrTks5A2ax0dmwQGIcdNTrW7nx1gIgGx5kd70o2MmWbKGSQTW4h2BmK1ULzMWnQF6vlDAI18o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMwodACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrU1g//UBBN2XIcOJAkN7Tl2565Z9K8SUp/8LUN74Z2k3RNZtEjXsCI\r\nir2yz6MXKA0N4c9CRSPsAQE8Zcjj6rHYatennkHJ6hNZS8jBt7mDqFC0n9+W\r\n9wfnZm7E0Q0fAv3l221xmrzxi2EDiTjuUhzksje7ThoK91uGdnDBd0I9oQvU\r\n/WtPdGwFBRCGT8vSg+0xyaoVelRHfovLS89fulgH7yON2JxFMiAP7rSlt0sG\r\nHLgnB/E4Jv99WeQa35ZMfPAMIKVVGNQkR1Qmfu5kOhv0brH6NZxFVyGPiny+\r\ngw8UiSs1VqylAwl/gPLMudMDdDoTkI56m455MSXUEHxaP522PHaWgmhnN/IA\r\ntL1i811sJBw4g5ht5Rk8z768SKQ/1nNIW3Eln+rfI8ABfjfdsXXKHdifkFr9\r\nMSMCLDR+1wdh6u6z/WXQ3mbE1CYYqcTnTiJv57pD0b40GjIjBcOW/IveLVnK\r\nm5BJ6hVqn3tMEm1aTXCpfHR9qMg08FhoU4mwyh8be8bFMAFejTLF1QSftBLz\r\nRkco9QR8te/AK7rpG5bOI6SBq+eoWdfa19T0OyYN1I3z8K6445wIHKstNAQz\r\nxByvNPD8FSc1SsCen7kw0iBYbALXIMjKcgUETRjEhMkYVgSDisSt64bgsuWl\r\nR/aAam+9z4e35VP+dOOl3qe/cCy/WJAy3CI=\r\n=M6q6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-6aad02e7070318ac602c1abee45d8bee5d0f8642-16.x/balena-jellyfish-client-sdk-13.0.103.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-6aad02e7070318ac602c1abee45d8bee5d0f8642-16.x/balena-jellyfish-client-sdk-13.0.103.tgz","_integrity":"sha512-nTOA0LVL8xBTRIbqlsQI6Sem+gLmCF4JvlkwUcZJrDqHvEYC3z5e9/H7zkHijCBlEfV0gdtlheQCIlFKkmcBlw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T14:29:32.100Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.87","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.103_1664289309095_0.3182146867290434","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.104-renovate-autumndb-22-x-88ea5af313af3b7ecc7e12b7fd71656df72c694f":{"name":"@balena/jellyfish-client-sdk","version":"13.0.104-renovate-autumndb-22-x-88ea5af313af3b7ecc7e12b7fd71656df72c694f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.104-renovate-autumndb-22-x-88ea5af313af3b7ecc7e12b7fd71656df72c694f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f33aab5248dedb80e0867463f486ed6d9a3f1cdf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.104-renovate-autumndb-22-x-88ea5af313af3b7ecc7e12b7fd71656df72c694f.tgz","fileCount":32,"integrity":"sha512-FHqXh2RCbmpR1c8V1DSkQlEiH2QeYzLD5qNsyP0U6ilg0IYKXzxNJJWJbC+1+3VcdEKtfLhGjECcn+xJdXn4tA==","signatures":[{"sig":"MEUCIDZMOI97gCRQOaQu7SS7H1HrVxk+ZeMRS42tEPgG25rRAiEA8XpZNvi1r7P5g++EMYMs8L4DORMtfzUAJsVh2EyUY1k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM0QsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnRg/9FNrqYdgnB/clvy67QQBAvNdBkH/RymZuxHZ8ust8VG2wEZF+\r\nCfpQIBJMmtCjuF+C9WADOsJj1y+YabwR16VuLX+1V8d4bUHWKjS8kjOAi8eg\r\nHVHwzh/UJs1BOxOvTKqt728HR02jsPDDneItNCzGO3WNfxbxrti43XnD9M5L\r\nQg9MJ/9P0tKfK4HZrNUU6xHo68jxi09urWw6C23KNTkGSMqUAki7mxzHUfdn\r\nzk27fv3EH5rPTAyjomQ3Qj4M2V01ydiwpWi30RZwOT6NMCOKRLx6p8FU947M\r\n27NNfdmwozzsQHRjBTBVSN45HoRFVsQjQZvLMKN953C4hCxWM82FeNA3KMfS\r\nQGQYfad5UiG+XIc7PYHBlEzwF9YNNs4SiMraCSHGRLiDoZ+/AZ6DRd4Okgjp\r\nKNObpsd3YiyzgU0KU7607qrV2OaJ0/oHkRf+xBQPhDYGtJVEztbbDc2r7njR\r\nVPSZXOO8jcMWZ1O+KZfLuz7JyC8IujT86TNUTeVSAV4fimwyKq2YZ6COHeGO\r\nhSiJC7uBP3SslWPAhGuXwyZS2+3Q2yweQ6KO9fs819GqNLtVxTrsipggbTaN\r\n1OH8QJWYzFjyF9S3g5RlBNLUXpIcKVN57xnOZhs3G6Q2XRDsDB+vUIADLnwj\r\nbWqDEHHP6dLE7oAVpuuTh1pkDi6U+Td5Oy0=\r\n=pOW8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-88ea5af313af3b7ecc7e12b7fd71656df72c694f-16.x/balena-jellyfish-client-sdk-13.0.104.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-88ea5af313af3b7ecc7e12b7fd71656df72c694f-16.x/balena-jellyfish-client-sdk-13.0.104.tgz","_integrity":"sha512-FHqXh2RCbmpR1c8V1DSkQlEiH2QeYzLD5qNsyP0U6ilg0IYKXzxNJJWJbC+1+3VcdEKtfLhGjECcn+xJdXn4tA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T18:41:27.171Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.92","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.104-renovate-autumndb-22-x-88ea5af313af3b7ecc7e12b7fd71656df72c694f_1664304172528_0.5711734924742575","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.104":{"name":"@balena/jellyfish-client-sdk","version":"13.0.104","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.104","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"444db4e2bd61d4a2e75c9fe27fef89403edf0600","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.104.tgz","fileCount":30,"integrity":"sha512-t48lMMhBnqsE5Ck/3SJ168W9sgbzhiF1YMkUV9ThKXQPBkk24l849YL5/E7ZwD7BW9NRfWMZgRC8FmMNpc49Hg==","signatures":[{"sig":"MEYCIQDcd7z/dsDh1yPe+6Z0UmpkRBC/s6MgFtg5DmCVtWkkugIhAP+onm2RcBoaqx2nl7oDFPlkUsAno6ORF63JOK+uygpr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM0S6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQehAAi0sMrnaC6/Q0W8nevBxXtgx5g3T8fBqNJjpG7E0guqFQ70s2\r\nB0L9H8jgKtjkYEq9qTw6EkCQfV9tqpy6r3RUnpFhJFKaDqSW6slKH/5p5rSL\r\nsjVpyn0QtJrPE0QAXMBDWHqG2QGCv/lj1JIy3WZfFoeONBbU4Wiv+BiSeoow\r\nYfavuHYgepMyAvIR7yDpMYR9aGyQfBgH1bL0rE9b82m6sKAyvGQ1i8MeUCqn\r\nzSl0g48B25LY0DHbNn42isqD1MiZ/3RoVlwoEKJbYazM69mKsMXaOQBawqrU\r\nezuBwe1VnrSr43Osp9dzn+c7Rh3FLDOInSurWib0WeLnrnnTC0DXaQ4xoy1a\r\nNDeAmJjdIWPXrobiiiihM/XckIrr08DmxfO9j/OF4ryfm7iEAwjDKXd11T09\r\ndN4nCuDW60PVi7As1YHRyqd7P+njpAQwA+NanZdqrfoW/CNUytxrDegL02IR\r\nPywByl/c3rx4nQLvQH3tGZXOW9zFBGVpkRPuxY25FCdwvH/GFU0eFMswk4/J\r\nE5YSIrx4/F6nCN+OQIGWwYyBF/T9FRz0cAgnYvKai9st5Wof9gG7qjwGIfkx\r\nqgtkI1MPZQ5JMx18hZYiWo3sCYi96aTfmF6AwthW0T0ZDSdL40e9Cte4PdnV\r\npjLN7zr1fGyCgWMoam0glPm/WY0zdelyywg=\r\n=jsJd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-88ea5af313af3b7ecc7e12b7fd71656df72c694f-16.x/balena-jellyfish-client-sdk-13.0.104.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-88ea5af313af3b7ecc7e12b7fd71656df72c694f-16.x/balena-jellyfish-client-sdk-13.0.104.tgz","_integrity":"sha512-t48lMMhBnqsE5Ck/3SJ168W9sgbzhiF1YMkUV9ThKXQPBkk24l849YL5/E7ZwD7BW9NRfWMZgRC8FmMNpc49Hg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T18:41:27.171Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.92","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.104_1664304314365_0.9855482073784829","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.105-renovate-autumndb-22-x-19aae73f4d257bfc2fd118592184ae594466b387":{"name":"@balena/jellyfish-client-sdk","version":"13.0.105-renovate-autumndb-22-x-19aae73f4d257bfc2fd118592184ae594466b387","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.105-renovate-autumndb-22-x-19aae73f4d257bfc2fd118592184ae594466b387","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6d311d7db549ed5907ca71259786f9377277477c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.105-renovate-autumndb-22-x-19aae73f4d257bfc2fd118592184ae594466b387.tgz","fileCount":32,"integrity":"sha512-LCAAlW38D29tUSiwpuEOGJSZ6wgfeihThIBoCTBbWIqNL+CI+I2p/6Sm3F+pOUWkYBhKWh+EBMdcaLsz2AEuOA==","signatures":[{"sig":"MEYCIQCAzrOlYUyHBNILpgoWbl0mDQuclgY2vXD2ReTujV48pgIhAKhsIog1h6LyklICKrCwOiQGGCxl+nEKAIK3SO/TfnbM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM3qWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrD4hAAhwNUU7Na/a1WbquLF+9Sxt/pqD4IERlE1w+H/E3SDxy1Z3GU\r\neyixsrXts07kGXzccjvg1cb1eTOV9D416fMzCoG1I8Bcucr97x4DOoAn5DjW\r\n8Ix6V1kJPieA+86M/GVCTsCSXoRZmruXkmxfxPBCd3Azi2RbS3s5UWr1TzWm\r\n6WFZeCvRjXnYVs0/TFjzSg3mRyl9bvjaoTM6p8/ehx0hY1WB6kScgKmRasv8\r\n6JL21t/kUDiUX+IVmbmpFj0OKtcNcGwXnqOhamksXpGxmMgXkLfFYe7IV9U/\r\nb6KVlXkNnpFUt8Qu3F8ieXLsUmH+VxIyPndGkaHhTEtnD3lfO+nmk/0BuFlH\r\n2xoX+VnVxsu2MkiA14zvBTd732OWiZq6r7nqwkmIC+A6mnCpQYehITMHPp/n\r\n0yYXkt6xQCzMTQR2yoOa3ZefVxTkXw8VOWW+QsSkP39fDBXTno2P8DyoLVzp\r\nifSB3CNO/5n2Zzl5sJJZcZwYlYumOCiIR4W6LeAg2MQZBr0+DMZHPTNCYymV\r\nJ2p7U78ME7C3PpS07Bp97U2ZZ41UIbxapQEBsL/eRCoPbKcXab4+1z42JcRD\r\npUGCNz7cWrabqaF4/VMxafn3U9uQgd5IPeq00iphGD1zZFjN1DBvtIS2XEdy\r\naJBpyr8OeUVYnaGroQph00vE/3/joBToGTs=\r\n=ij1p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-19aae73f4d257bfc2fd118592184ae594466b387-16.x/balena-jellyfish-client-sdk-13.0.105.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-19aae73f4d257bfc2fd118592184ae594466b387-16.x/balena-jellyfish-client-sdk-13.0.105.tgz","_integrity":"sha512-LCAAlW38D29tUSiwpuEOGJSZ6wgfeihThIBoCTBbWIqNL+CI+I2p/6Sm3F+pOUWkYBhKWh+EBMdcaLsz2AEuOA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T22:33:38.473Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.93","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.105-renovate-autumndb-22-x-19aae73f4d257bfc2fd118592184ae594466b387_1664318102364_0.5536360794646347","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.105":{"name":"@balena/jellyfish-client-sdk","version":"13.0.105","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.105","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0e87cae6db09bb74a2ef4b3a8170327fb0af667a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.105.tgz","fileCount":30,"integrity":"sha512-QV9VpfAQm06TbjQfImRtihOqWaSGF0q/Q13WUazBGRGhVDT3imuq0vJ9a+w5g6Td1f19DGN9veYwuTmxIm46Aw==","signatures":[{"sig":"MEYCIQClsU9w+NU6xFiTP0fh7nGIZPGbkjOd38NmBxX0wlofbwIhALdAdDhHqFurYGMOLDpY6e5kBR+uXX8gOF15K6ToRnjj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM3skACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOXw/9ExMiWOJp25UN9CaMPk8yPJnKWXR4F2i6NBn4SeZsL8d4NCGh\r\nrMNx1TOyxJH+0JjdX09PsttdcDKuo4dQNi3G06ogGDFGnd6IWtHzkeF6Cjyx\r\nkaKcPPWUNoyLKqgxqpH+SVDjIm9yPRQQg4KZZ2bFGrAgKjSpVl4BVYLkJ5tF\r\nzjb9k49yMjyLV9cPgod8uDN6NIOrX2hBazeZ+2jJMKcQst/hVzNukk2rd1Hy\r\njnwdlJca37b5gAidnhCSOCMDZWK0BgJlYG4wBpPvXoylSrjZo8Hi01D6i9yd\r\nsjHA0ZMlXvFJg2VTRHrq2BITT+4BaYtGGQilVU8ahvryRGjd28K1RVELZ+WK\r\nackVcWjFQj/UMp1nY8QuHlhNoT1helNsFqFVsxLHHWQFN66m5NKpE/U1p3B2\r\nYEo8uAPz2porSvIriT0H5i+TuSDTxPwsBURXLC/gWEQPPrMnMw3icZO4WEWS\r\nYEQW2h3mLsw1LjHtAnl8n8oQPy7cp1D/3MLXFEjPpq4NLlBLIBaoqavHWK0H\r\nqYuwvRiKgCnzzBRfyKOb2P9vUrl9fFJBewFGYFtWFEDsAmLeRfyONfuHTDHO\r\nIaKDAkiCJLUbloltDI+LLm4+c50DP88dGPQIC7NShCloDntv5t0kbYGrxYoY\r\n1LrQX9n5AsswzlmkAUBR9aNBw9ZfL7S4Gfg=\r\n=qrwr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-19aae73f4d257bfc2fd118592184ae594466b387-16.x/balena-jellyfish-client-sdk-13.0.105.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-19aae73f4d257bfc2fd118592184ae594466b387-16.x/balena-jellyfish-client-sdk-13.0.105.tgz","_integrity":"sha512-QV9VpfAQm06TbjQfImRtihOqWaSGF0q/Q13WUazBGRGhVDT3imuq0vJ9a+w5g6Td1f19DGN9veYwuTmxIm46Aw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-27T22:33:38.473Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.93","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.105_1664318243892_0.30332726945347854","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.106-renovate-autumndb-22-x-bacc32515d00b7f4247c055463f9f09fcfd39584":{"name":"@balena/jellyfish-client-sdk","version":"13.0.106-renovate-autumndb-22-x-bacc32515d00b7f4247c055463f9f09fcfd39584","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.106-renovate-autumndb-22-x-bacc32515d00b7f4247c055463f9f09fcfd39584","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"45c1d1b8187fa80431cdaa5fab6ce39c92a3981d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.106-renovate-autumndb-22-x-bacc32515d00b7f4247c055463f9f09fcfd39584.tgz","fileCount":32,"integrity":"sha512-b1j8CL8zJmImCYW2HtQy7d7JMSCDxgX/u8ZZw8wWCyE6blFJcVdQ4isnuYn1SWATay373T7LqaBMLcr5tmPw6A==","signatures":[{"sig":"MEQCHzA4i8M1ANqwvnG22wYBE5bk8sqQtabxlClqrBEeaLgCIQCJv3Ch/WW1aZi7Iw7OJXZC7mfyB3o7WBsGET0E/HRk2g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM7gLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7FA//bDiicdeQ/KUS2wyvl7T6wqbM2pY2sfnNhXWVFGfvPH+LTrWp\r\n2iwVdwP+b6Y55qI2cA1tso34l3mO2yyw3DyCkQ3au38HZfKzTyx5Zl3GhoVU\r\n9cDhjz3AqQ4XJtCAx1mAhCl7CfjGbWyquqeTkxVCrGVTqjWpRYSSlKBa6QeS\r\npCloC8XIMgpKlVMCgGljqz8rlBaqfAgoKDd9tAKlN4w2Tj/cQ+DxXxieBeAE\r\n+mMhQj2Zf1k7JSrezzFT1dBQCXJM8IBQlDnN0fTXbkcqSSdjqH87m3gPORtz\r\n1VonlVNJMG0CnGXNejHNr8CvxuaNybPTVLRr0zGWnhS085r2sSqeoTH9SO6e\r\nZiePxYTn/eqoHIZO/1qd1n+k2LCClfRaqAw4sw+0/2FhpmlTR+4f0jZt/mHh\r\n3fcKpTkqYDbYLoPmj96gNAxsIeSpY2YxWot85X2JpgEmzchICNWrbIDTMd4v\r\nE80fTM03rG/0rUKcXLf6J32Jos1CGhXcvR5t1wwWlfRdS1HpahKapC1FUuaZ\r\nktKnvpm5wQKCqguPhAbWDSLjgP2VS9TLyMIg5WKJ/d9SearQr7mtZoKkUswD\r\njNh+GTMeGtFISrLpcwnKlZTkKSYQoZdZvcjrAFY9vAK7Y+RlOnAmmMip7Gss\r\nM3IvhQ5DJImIrUBXQQQHfreHWw5d5FAP3Aw=\r\n=kvT+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-bacc32515d00b7f4247c055463f9f09fcfd39584-16.x/balena-jellyfish-client-sdk-13.0.106.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-bacc32515d00b7f4247c055463f9f09fcfd39584-16.x/balena-jellyfish-client-sdk-13.0.106.tgz","_integrity":"sha512-b1j8CL8zJmImCYW2HtQy7d7JMSCDxgX/u8ZZw8wWCyE6blFJcVdQ4isnuYn1SWATay373T7LqaBMLcr5tmPw6A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-28T02:55:43.423Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.95","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.106-renovate-autumndb-22-x-bacc32515d00b7f4247c055463f9f09fcfd39584_1664333834845_0.6661275502827129","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.106":{"name":"@balena/jellyfish-client-sdk","version":"13.0.106","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.106","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b9a9a947aa0f49614656945fab5946510846809d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.106.tgz","fileCount":30,"integrity":"sha512-Z+0EV3Vso7eDrOydjdlq+X6MYtXZJ62Ts8AwrTx7o4SezNvVhaUB+3ZBBPT8kurLxAAOF+WGhGKPMphsgEqTIA==","signatures":[{"sig":"MEYCIQCqeSJPIsnSIpzWSt8F9OgLP/Isbqakt8lPwLNtagDn6AIhANokOkVyTCjtVYNkCw5aVnEnrdBrFs3/4V8PVPnA8oJS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjM7iHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpp0g//d4RJwxnBhJVb8vQN0oNz4sI/07t+edKuQIKV4aIvoO9CPtoJ\r\nRC/YlqGDsQeXZERrL/+xmegiBn8V6TZud4vC2j7vEcoyLXfAD5sy5NPRsw+q\r\n2KkmgESaq0pHRVAIF0E++95g8hOXGZECk3APUvi+NS7ictasbyTEPo0qPbYE\r\nKfPX3kPiN1DrSrOAJ38WfMmfSrIV9xRUKcAFhnODX7kn86LZAdu7qzClwkVn\r\nR4Yf2LjE6Q305c2xG6cZj+RWUWa4pQyny2ANRiugIbQOu7fWyDKyGSdFxAPw\r\nWXKUgDSU5rgcdgJYacEM0q6lRh/tztEbjwWToOxttIagEL/GsqncslsODESk\r\nyTtfhLKQj5xB2hmx+YVez6bKPnc3BbQ5gwZqZE106pZ/1oYaLJyg4NCvBJDY\r\nQPZnAifRxt3ymQFK2CSYobnnQTksiCpSnOvGKd25kEYZ6+LOX4bzzvCC3LoK\r\nXDmGofLZ6V/VieqGomv4BUZPuYfIMxK+p9IFGrBOp2TLatWd0j5Eq3Xz6kEz\r\n2qnnDdPdO9O31bckUTULQq4aDi96vu/xF+PkU3C5wuPaapJcj0qt30swemTy\r\ne5S+/dds01aRhNAa11Yfg2MXSqIBrrbzlMOLto6ka331w8Q4wzoJjeylrvBb\r\nzsb5SJaULnSa3KvHNbfFBSfpoKy7CoVDLOg=\r\n=VS/Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-bacc32515d00b7f4247c055463f9f09fcfd39584-16.x/balena-jellyfish-client-sdk-13.0.106.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":"^16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-bacc32515d00b7f4247c055463f9f09fcfd39584-16.x/balena-jellyfish-client-sdk-13.0.106.tgz","_integrity":"sha512-Z+0EV3Vso7eDrOydjdlq+X6MYtXZJ62Ts8AwrTx7o4SezNvVhaUB+3ZBBPT8kurLxAAOF+WGhGKPMphsgEqTIA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-28T02:55:43.423Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.95","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.106_1664333958928_0.8402714610912438","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.107-node-18-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63":{"name":"@balena/jellyfish-client-sdk","version":"13.0.107-node-18-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.107-node-18-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fa01a5bebd86609a265ba04c944bc518d61fc74b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.107-node-18-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63.tgz","fileCount":32,"integrity":"sha512-CKG2ANs2Nwl2E1VZqbfd7YWQmJ8LqNMWzVoqvXXHFajXJIH8JsmS6K7RdAZyFbGKvgXb+qjs8Xa7LsSGThZ+fA==","signatures":[{"sig":"MEUCIQDuvLwGEHkb9UvLLLlt8WongO8JXPMYdFCUiDz+Ikm+bQIgPGGvBCfufPRQtWuOuLm3krVEw4w8Bem2A4M4CuRvacQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNAlGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrE6hAAmJsfsZ4mKntYM/ZnxQBGVUV0aS+jKz6cGHIHtwvI/PUfUJrJ\r\n+PVA8xJNtsj6stnF1Zk5vkSmsuQlVX8gzwWEW4GpspWauWnf7iW/VkKqwXVe\r\nJct9OB3B+uLCcMjMcCO2U77umE/0tJ5AHDeAN1guzrUEAZDVKb9Ah93Qduvb\r\n69GOb4KxWyAQ+vwzzySQh6mAwcAds2cvcA1Wh+M5VJl+Rf28DRqgHKPSGU1U\r\nhNBzvOINWi1IUmk2xAjbHfY2Z2peougPqWM028PZnNbcbssVn/8AGBg6o+94\r\nUs9iSHYLj63VDQsWSO/suldiw7y4U/DIBxTnmggANqHrkuHYW0sqWr02NuxN\r\nO3RXeBKDcnXq/zwiCYhap1z9OGQC8J60+0saiO/T74REoEE+z2d8WYYfAddt\r\nQ1TCc/rloin0b+nK1zVXq3DL0/hP/DxSWx2yQ8lIZtByu2o/zHntQMlMmwC8\r\n/WevgvIAwcFWIzNjkbWLIXGk6gD+qgGPZvYY7dy+yQQ9TFi/m/Lek0preNHB\r\nVvkWSQiUDZlZfUWqyqpztJFdZl3RQ7N7h3QZI20oUmIxIYBd330F0gcO6X+9\r\nccu9uOhoXeGO07RUA9wQjiGnNM+pE5KkhrE6YrT+q3OvweD8u2Axsi35mt3z\r\ny1XRabN495YdA99g8Cb5fQ6AAQAfy6xThsA=\r\n=bM20\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63-18.x/balena-jellyfish-client-sdk-13.0.107.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63-18.x/balena-jellyfish-client-sdk-13.0.107.tgz","_integrity":"sha512-CKG2ANs2Nwl2E1VZqbfd7YWQmJ8LqNMWzVoqvXXHFajXJIH8JsmS6K7RdAZyFbGKvgXb+qjs8Xa7LsSGThZ+fA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-28T08:42:03.710Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.95","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.107-node-18-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63_1664354629784_0.2724467305598468","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.107":{"name":"@balena/jellyfish-client-sdk","version":"13.0.107","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.107","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c7fb7fa7205f3ce29bfa30c6b9c3b9f9c36702ff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.107.tgz","fileCount":30,"integrity":"sha512-p5u91ve402eMjjCPhUCbt4WU3WAQId7jIfdX48wDYhdIB7casdAw96UyOQ+z6Y4ESzO8HuN2vw2UV9Eyacyhzw==","signatures":[{"sig":"MEUCIHcXen3OX5zrlpL7crKTCtqnXuQ8fo908CvEwQz1tKVhAiEAkSFOu5L9HpoUPnAGGFm04oQlY1C0QebmFsZqunW81c0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNAnVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWQRAAjqRXN0r6pUVL8X++9fxtHTVZW6H2gYF3eIpbznRSH8xJdi0M\r\nGHOExiTN+pUdvxIjuVuyIBOgu09eoSBWhA0OZOfzrKFM+cPYhVAJQsMMFKNS\r\n9TBKzUCX+HF+zX5P2R5KyLH00hQ8Y12KC9DGEMpgDaMsYKbK6SVcgTIgk+f4\r\n6wRjazuKUXI9YlkhiCBbBVKiPKtGG+D/tN60HkaUZTPAuz6cw9RlUt3mFbJw\r\n/Az20WlYp2CNv0ETsr8gwiHfWaJHdZEyK9apR7pKVVM26ujbNVxxBYEeuxSH\r\nZeoCHqs2O+CTtQzY6a8BnKR5Ov1NJ7shn4lnc1I2UewE5Fmz2wOKjJDdsIfA\r\nv2/PQG3HloomePZTIUHk2FC4RmAJRzan194Srej4HZLuF91JISaEF925W9wI\r\ns6YGXh/9UlGfbSRrOkbcDdIVx7rwUOa0b2w/Glw3y+NSq+6fchjGOxeJ+F1V\r\nQUQE54W9hwn7Kv2eje3tm3uWXRLPt7OvzRXroGSQKlpScNdDxNa0NGUipU8M\r\nUfAorBQXFMasaHUvFsWN0O5amQvOM9LsGel0s1zMSQB8eVrRx5UHDyij197Y\r\nnEsfhkcxayE6FiVdc2baoHMFdcCM9NkOFKb3oHsNnPwxmBzmcBMmoxatlWja\r\n8n/F8swmco1o4J9rB0HREbJt4maoN0xrIE0=\r\n=g+m2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63-18.x/balena-jellyfish-client-sdk-13.0.107.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63-18.x/balena-jellyfish-client-sdk-13.0.107.tgz","_integrity":"sha512-p5u91ve402eMjjCPhUCbt4WU3WAQId7jIfdX48wDYhdIB7casdAw96UyOQ+z6Y4ESzO8HuN2vw2UV9Eyacyhzw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-28T08:42:03.710Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.95","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.107_1664354772783_0.8737876483517895","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.108-renovate-autumndb-22-x-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e":{"name":"@balena/jellyfish-client-sdk","version":"13.0.108-renovate-autumndb-22-x-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.108-renovate-autumndb-22-x-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"daf5122ad230f91ac174a1cd21593ef0949c256c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.108-renovate-autumndb-22-x-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e.tgz","fileCount":32,"integrity":"sha512-hrafXFq2ucMa8T4V6QORXh7qsGfpLg0os1YLqqnqj3Rk3n87oJuUbSWq5dY86ETjg/mXO/Uas4SsHfPERud0qg==","signatures":[{"sig":"MEQCIG6B7kJws6hxDOqueMyYZd1QsedpiQRXNNPrs7/Dne6sAiBIzbTnyf+EiniPVTF8Ga4Ml/uDfjhz5IEgS4AQpF7mqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNDs6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQYw//aX6Tak4T08+PMtzEyR5JX+ddOp191qXoWI51U79pE2oYNcma\r\n9JqJ7PMnqB9Hf/wyWIh/1Br+DoHIClxTgRqL7uf43eNd9ux6FUSyPnNNJ5lN\r\nRMBr7Bez/x1skIykxFQGPbyD9aLvP1Wgs9ELhElRWpyeFXMwZVmkieSWB8jU\r\n5cI8JKDbdzFT1bbkraAPQ9uW3YvJVlbMd1Foy6msTmgClxRlbRMNVs1H7TSv\r\n9I1dy/bxV6KLzsZHLyAkoJbPzHwFBpT6ZcLSyhHIcqVhe4AM4GwviHw8Zmtv\r\nh2ADApmy6p3kj5pAlqGuUOvkWTU4t28pwfQ6Mv4wsCaAAX6e98pKNp4MI6PC\r\nqGb3Soe5Z7bf0ZtINH2bYQj2dHdGSoFzLvdn8rU6DQ+lOwygZS/zvB/VIGkb\r\nqh/kqCyI+OfGeA9H2mIJzQ7vCzCJNUZo7T6QmdugLspaK8tdcgj2teOH9mp5\r\nMI85cnrv3DHjaQGVBSnM/O6LwIpX9bxlPLjSVDDPlYvI57EIsNpQjgkyQZRy\r\nm7SnPn6B6FJbckqbs9kYAMkSHbMLH1FdOH2jNdA5oycRQJUEGVYjaXdXhZhi\r\n36EcmUuqmzOAJqmqUb+AQB8LPPswJNmbCY0fxrcvlh5s8H+qlWb7xy15nxka\r\n4K+UBgCe13Q9D8nnk/xJjDZwLmlYM2pLBok=\r\n=wSmO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e-18.x/balena-jellyfish-client-sdk-13.0.108.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e-18.x/balena-jellyfish-client-sdk-13.0.108.tgz","_integrity":"sha512-hrafXFq2ucMa8T4V6QORXh7qsGfpLg0os1YLqqnqj3Rk3n87oJuUbSWq5dY86ETjg/mXO/Uas4SsHfPERud0qg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-28T12:15:27.558Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.98","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.108-renovate-autumndb-22-x-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e_1664367418369_0.9078181162004482","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.108":{"name":"@balena/jellyfish-client-sdk","version":"13.0.108","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.108","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"688b05b77ad70146a7feafa2d18267b1b1bf1295","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.108.tgz","fileCount":30,"integrity":"sha512-PmvY0miGRk4T9TF2akRim0pP6ZlnX4FmOJrOGVNWXpVPsMtuuaYAsMhkOPMq0J6KJPZaU43kvL6NP8hSovSBYw==","signatures":[{"sig":"MEUCICxkgh+cJQgyBuZehedQrPKRrN0/vJ45N1rffOszUc/qAiEAoM0rP78HtnexScWWxt9ARWsUmyKBZaiwdcBGuIG0GDU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNDvQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0RxAAjiHCFN0vA5iFHPuojq0HacRPaD61MvohiiRqT37nwr+0gkIx\r\nTFUO2UCwoFF4pPk93q8fawrRx8FmmEPJiFfzm4svK+q4gdBWMZR0Oz+/363d\r\nHwc046BE2ovXAuJBhdkzJ52w5MfBbTncGh5shZhfe6G3NUt9WObXE6KS0+q4\r\n2mC0aQm6NqhvHxNXvVf1Sbml3pBFQznSm6YmiuO3iF8uYzmf1XcYEHBsm2xS\r\nzGS/7Qt1dSysCYrCqcQgCGRqNweQN6H715Ev2nxlCnYSdl5ZzoFH4khRC5jv\r\nW7ownT86FIg+vfCiWdLEQAF2JXsvGAWOLLkh5a5U2fC1ZN76WhpK2UMh4zm6\r\nqwHlKf3bZ7TFxO74LsDuJiYnjtjW/OlvJiQxyD46z+1IVoDdw7k56S03scAi\r\nzN00pEKSXko8+kjXpnXZTF4VKawE4pxLnJ42bObnLHBCwdQi0/ppXFAi7LAM\r\nUS5+AwO74Z4VfCmrij2vA34jLjLt9EAImFJVChUAP1PjYHayqxNEQ2gh7pI/\r\nKHFxM5Oyaai5au5hnO1fGyN/EeDWcPClvKu0YRbWtrT0G12qn2iaLvrkIfxu\r\nWUamH9zzhAPBZd/+R5vmBikSzuUF/+jtDR1s1mxuzeUav0pgcfVFAITmVItN\r\ng4U6C4MqZ7KZRn8wzuit1KZFEY3iYB9wqmw=\r\n=n7Dr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e-18.x/balena-jellyfish-client-sdk-13.0.108.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e-18.x/balena-jellyfish-client-sdk-13.0.108.tgz","_integrity":"sha512-PmvY0miGRk4T9TF2akRim0pP6ZlnX4FmOJrOGVNWXpVPsMtuuaYAsMhkOPMq0J6KJPZaU43kvL6NP8hSovSBYw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-28T12:15:27.558Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.98","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.108_1664367568457_0.3261145753337096","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.109-renovate-autumndb-22-x-534696cac9146ed7bc00ae79e874582715532167":{"name":"@balena/jellyfish-client-sdk","version":"13.0.109-renovate-autumndb-22-x-534696cac9146ed7bc00ae79e874582715532167","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.109-renovate-autumndb-22-x-534696cac9146ed7bc00ae79e874582715532167","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"77365f3ea93a5b4e3a099783bcf92b53115426f1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.109-renovate-autumndb-22-x-534696cac9146ed7bc00ae79e874582715532167.tgz","fileCount":32,"integrity":"sha512-wbBya94snpunYReQFEAVZ7i2QE/hkZJUjr9CrWQ2WSLaRIwtKsfXSev8uEu1sNFJGku1DAMQXQAoKmMci+6h/Q==","signatures":[{"sig":"MEUCIQD53Fxr0r3/eaFshduV6qQVIfyQVvBCbMhNnRWPz6aIwQIgTLEE9Zkk2ve5q29xr/IxjA4qaBR6l6zGJ6VnnSimc18=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNHqXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIQhAAk+SO2F4B3auevN0K90RRD8MNsANQAY1zzDUaRdtL9/FI3aoE\r\n5+FgphTgyybl3GZAS1evhoMwDu6kAubht0xwYGzG5nEbtqFXtzBEyZaBOCBu\r\nL8TMw468okiet70oOzOcMbxaxhwCCDF8kwWYFKdmTE4py1hkP4Kmy+nXrQzD\r\nYvILP2Wzdg/M0+y37sHCdOnm70ATzokEhrYwYYC3RJ5dmHQOtOYiQk5190mA\r\nVIeUdhJcaLQCmwgd0OtSLWBmzR3QDX8RohzXOEPk+g6lry6rwcUIdVfhFYlQ\r\nlf4Wfk7N2eJ+q9Vi5/Dby6KYWNSOw7U97nUMITrKQBd1bKxcMsAEZAaAj+MJ\r\nm0f+YmhNiGDGfHzfC2yAVloh/eNK+AQyoRFG6UCMI+BMnu8X7QLCG87U2buH\r\nkTBDQrP0oQSweTZ0KapeyZv4zdMJ5rJRwEht0femIAG8CbcVJZf7zWkaw1yx\r\neqSkuEeW8RSZMj2RAwg3zAfibWd89ZLWTu3FOUxfaFtqF2VkH1P3RabMl5xs\r\nj71+cZ96XVW9Y7ROP79XTi1AyWc4WIC1GWUu9b8ijWzoE7HYl//MrXBCdzZ6\r\nqlLXPJI5sx4LWp4HR3BsblefVjxjUSentOO+h1Je94lemqvSLXS2Lk9HdOfC\r\n/zzjlfiJeR7Un0vDp0gl+gFFCh33HMa0XCI=\r\n=HVTG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-534696cac9146ed7bc00ae79e874582715532167-18.x/balena-jellyfish-client-sdk-13.0.109.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-534696cac9146ed7bc00ae79e874582715532167-18.x/balena-jellyfish-client-sdk-13.0.109.tgz","_integrity":"sha512-wbBya94snpunYReQFEAVZ7i2QE/hkZJUjr9CrWQ2WSLaRIwtKsfXSev8uEu1sNFJGku1DAMQXQAoKmMci+6h/Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-28T16:45:46.219Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.99","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.109-renovate-autumndb-22-x-534696cac9146ed7bc00ae79e874582715532167_1664383639406_0.8850594257364182","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.109":{"name":"@balena/jellyfish-client-sdk","version":"13.0.109","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.109","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d31f5497c106531adb9eae8d67e9bcf39dcd7ec7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.109.tgz","fileCount":30,"integrity":"sha512-XGLWLPW8pSK0/SGR//Zrkx4JARy/Lw+tZpfj91Z2iToz7qFRW/IOvm/8ZV0VzjtNWTILQMfhg9+EWHKF8WXH3g==","signatures":[{"sig":"MEUCIBOQQW7rCUo7Q0qmj/FUZ7y7aWF3jCTR4MWH4MDLDZX4AiEAle3mnLTGUx5eeMTX8oHwIQLPiSC0n2nVFpPcE5gQCME=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNHsZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpt3A//c3hbdFvpD56+8+0M8qrvYbvATckej2ZmWVrpwxC9L8gl+gb7\r\ncOFh2a27fc8/dFNsUgoVsZHiPVHWCQLFz4XSaqukTzmcQ2oPyhMYyi39lnqr\r\nZoeT/R2oMWGAGOBCRa0196Nf/AeGak6u+Lb45JulMNXZPykXtF/hYQCa0nCa\r\nxb5LTMJvJasfXIuiKQgr7i+uCc6lX8eMjWN+ATY/APAxJ55wx8cp0dZm/i64\r\nUyb4dsdNIQ49QfSk1/abx+q0w00xC5mQI13h93sv1XqUTVFotzYkA13SfPzL\r\nnbcm/PsoxseQHACCoahJsDyDHazIq0VvRBmPl4v1yvQyKSnqiIPq/XbmEHgn\r\nED8PgP2rDNZaHCdu3TPIXycRMQ4fjQiPWApiqsmVsJpSq+ICugjxIpa/ytVw\r\ntkaiw2xzNfgUcOYBCOv2c0bpVmpQEzK9CmwlriCiimI0d5ushb/EokZ9+SIy\r\ns/HMtFfXghTwdV2JtVumFQWC5fhy7Keqj6uNr+UAPTpYewByYQrOMQsDCId8\r\n8DFkGWk0Af3iA2M+6hK0LIVQyodFrm3TtnMR6BvtiLXr44w4dc4u4f3sfkUP\r\nYK9HLIDA2LARwG4desubNhMjr6ds87YuVZiMoUMLg4yJ6Pk+nGuQ12zrpDrI\r\njro+4RzXbO+OnKPN5Vh4O88T/Rfe/sXa7OQ=\r\n=2RVk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-534696cac9146ed7bc00ae79e874582715532167-18.x/balena-jellyfish-client-sdk-13.0.109.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-534696cac9146ed7bc00ae79e874582715532167-18.x/balena-jellyfish-client-sdk-13.0.109.tgz","_integrity":"sha512-XGLWLPW8pSK0/SGR//Zrkx4JARy/Lw+tZpfj91Z2iToz7qFRW/IOvm/8ZV0VzjtNWTILQMfhg9+EWHKF8WXH3g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-09-28T16:45:46.219Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.99","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.185","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.109_1664383769026_0.31957602969707843","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.110-renovate-lodash-4-x-012985a1c16b2a4c314f89ee605e1ab8e33110ec":{"name":"@balena/jellyfish-client-sdk","version":"13.0.110-renovate-lodash-4-x-012985a1c16b2a4c314f89ee605e1ab8e33110ec","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.110-renovate-lodash-4-x-012985a1c16b2a4c314f89ee605e1ab8e33110ec","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"914648ff8fe32ea8a3ba73c2671409b30c7c34c2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.110-renovate-lodash-4-x-012985a1c16b2a4c314f89ee605e1ab8e33110ec.tgz","fileCount":32,"integrity":"sha512-ZmfkZz3DWpR4JwVNDNluSCp1M4b8A5FRtkTFSRnsbW4Hsb7hIGey/Vdv0uwmlP2b2jemSlJnGoioC+2X7i+Pfg==","signatures":[{"sig":"MEUCIQC35Qxl1tONqCYQ4B+b2+cb0wZSXYd2OKwZEs1H4sdCvwIgN0rL3YJV4HXH5Rq8op0ETd+CmJNG8+FzONm1GUkjKKU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN4VbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLug//TvLuJTzLXtfMQ9CGboAkil+BqBHN8i4qPIU1IzDY8olAea/e\r\nDgVhDtD7Ygwg3P/Wnyv/h9EKFMJQuhxUtcENrBVaNFTzYKAgsQRcxctHF4R8\r\nOFr6Q34jpExujtuLrJvnXn7iUYedy8A9RAnByZCOcTYy7Ht1HG90iXPB7C42\r\nZT4K0BN6BsNcB42J0DvBz0EGSliUjaG8JfSvBvgOIVVQ+VLfLe/vb9uCWMta\r\n5C09XNp0Kfny7MbO4lcl+rIOXva2arv3khs8wzq6DoDCzXS328HH6JsWyRLm\r\nehrEkJzmQsTqkwNah9KJPp6SsYOJsP+JGoanCdSEEhufAhBJYB91cSLrRvxM\r\nexL8doToucLHJ8wDs0JNvTApl35XddDJRMA1H+BVmIPh3LBGO6eYqJ8XoEF1\r\nZ64L9LtnRx4D+Uyd5DMI6neXftV4C6/sHufq9sFBTX74FDf3bLdVkDjqco+A\r\nKjJifDrXTlqmDIcidNjZYr/e5ZvKZiGf7RVdTrOB0kLxhfsfZ42RbVnep3X1\r\nBhGyLzXEYDRWremfjJHYeSSLmD1+8+H8zE7fFTHP028RPszrcbJGKMLt6Y5t\r\nh1v+Iab9n3ckunXwhqK+l/MgukPiynwlc7jpCDkQzldqoKVAozjBu1VO3Z0g\r\n1Scxla1scsFiqzQUaYvyZCkXvldl99fxGY8=\r\n=q/7t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-012985a1c16b2a4c314f89ee605e1ab8e33110ec-18.x/balena-jellyfish-client-sdk-13.0.110.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-012985a1c16b2a4c314f89ee605e1ab8e33110ec-18.x/balena-jellyfish-client-sdk-13.0.110.tgz","_integrity":"sha512-ZmfkZz3DWpR4JwVNDNluSCp1M4b8A5FRtkTFSRnsbW4Hsb7hIGey/Vdv0uwmlP2b2jemSlJnGoioC+2X7i+Pfg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T00:08:30.090Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.99","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.110-renovate-lodash-4-x-012985a1c16b2a4c314f89ee605e1ab8e33110ec_1664583003681_0.2214637479155963","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.110":{"name":"@balena/jellyfish-client-sdk","version":"13.0.110","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.110","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c5603b7bb9133584a939a94950056796d04f900b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.110.tgz","fileCount":30,"integrity":"sha512-tzMwAv60PxKgs6a0Pudi22gsYaXkOY1bT0WOwbH0IWLqMkyWF977kPUTZ5cw4GKPXfL2cZ0DlGD3bmnCN2s1bg==","signatures":[{"sig":"MEYCIQDKZIR3ln3lN9g/LoYA2+OvM2myuaRMpJMDsHpKI3yHLgIhAKAELAc1pH01Vsu0YAQmifc1zNS5LQmOEayI/W3CifhG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN6UTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNaA/+POsfpiaFJsrKFHPgq23BvuZCQlt/m3/5jRAuPOrvGhWs87g1\r\nESdQt+Js86W3MAgtuCH497yaq+LsgqWL0StpXFbSap/jgW8PoCxAmQs+1zzw\r\nRGAIoPXoRqOEQ3OdMhHb/eCj9mWq8vfSnL8nzH7ahfkOgeHwTK5iuGUcm5QW\r\nb5XVyxFWr1HaS6f1k2vPykowZXmkozxIfRh2Psz/IDtb+5nQk+A+anZ/iJ39\r\nDw09ldwUY1fv1OGzf2Iy2kMKniZBNYXJ1tK6CwABWVXRG/oYJy3JvMyy9cDN\r\nnaf4Thd47mTMLbZuhBhQ6lAc0jJy+TYM2NdbDno05VXiD9pqvWdKDxSbTIlw\r\nB6J8ZEB4bcDQR/Mo7N54xquGaVJpn+mIERxYpLtRvDGICGvJWH+mpazhx+N5\r\nnaRu10h8jexuj516TXFU5RShmPUYugngMNtqb0g61eTtQt95qrJXr0t1b+5u\r\n57aSThCHMuk/t3gf4LSOj43eEEB/P2r8Y3GJGNDtKe7mZn+tz8Uwe8ZXRFXv\r\nc388kV5mvmR5ZQaTysvBMGqNLcCFhWYj2DBWYfS+bc0+dcFUhWDvys4KB/vV\r\nrcLP3fYbZw0clF1zoeTNjsT3y9xMhz2yiHnnxrlTmJOxs7MA7F2Qwmm3XIBW\r\nN1S8gHH5Bg2/RKTozBygdlfneDcnPRKRrrA=\r\n=owt3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-012985a1c16b2a4c314f89ee605e1ab8e33110ec-18.x/balena-jellyfish-client-sdk-13.0.110.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-012985a1c16b2a4c314f89ee605e1ab8e33110ec-18.x/balena-jellyfish-client-sdk-13.0.110.tgz","_integrity":"sha512-tzMwAv60PxKgs6a0Pudi22gsYaXkOY1bT0WOwbH0IWLqMkyWF977kPUTZ5cw4GKPXfL2cZ0DlGD3bmnCN2s1bg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T00:08:30.090Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.2","typedoc":"^0.23.15","autumndb":"^22.2.99","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.110_1664591123412_0.22862993646966","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.111-renovate-ts-jest-29-x-383a26ed69bbaea5630308661e0b4bc96fe92fd8":{"name":"@balena/jellyfish-client-sdk","version":"13.0.111-renovate-ts-jest-29-x-383a26ed69bbaea5630308661e0b4bc96fe92fd8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.111-renovate-ts-jest-29-x-383a26ed69bbaea5630308661e0b4bc96fe92fd8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bd2ef28b2f8fc4add7b05303d47590608bf610d3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.111-renovate-ts-jest-29-x-383a26ed69bbaea5630308661e0b4bc96fe92fd8.tgz","fileCount":32,"integrity":"sha512-Oba1b3lf/Ev0LQyuX0AOxkJd3J6OZbJWJRk3GKfuCYVItssO0Z7UKdktTbVnw/UWWYvtdQc5Lb8eQ1B7iimOYw==","signatures":[{"sig":"MEQCIFTbqIei8HI7LpXGHq7Iywy8V0TGy1jW14Duqva2xBw7AiAWF/G6DMNjeIfGF5MvW2ukF2pdvSfskto/Z5GLxg3UhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN6XMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZnA//QYYSgRptHGXzNnLjwCSmxHi6CCmzmfV5oLffiUE9qrEiwvWN\r\n1+eTN/SvXl8GDJ5vb+OueiolDA2ZlhijBop9ZecrSGYmUiGTb5TFDUt01dbx\r\nkePbs5mwfPzUYLhj3fBkpXShBfBLRP6Qiad3lWEB/86B7+bscgkGolUFcdb1\r\nL3Tevb1Q2OtsQFc1U9twoDGTWz/QGMPA2s1jS5pDGWroxkljCG8/iwHCSPY2\r\n5nYuLQsSLWrhngonpzKs+qTG7WKeC/Y5cACjWdn+M/2lPZEcE+w1PtFAunNf\r\ntnZ3GRtot2doTyXoIfcNe/0W118aEGgOPSUJmyfuihADypgudVV+wsjyv+qa\r\n3skxGoUgTq9rcZbKMlOm5miExPd+bv/7G5O6HpkK7uauEasDMAJfMfiuR4bK\r\nWt1qQJ2d9Uwc3c7chkRZu1DBvhhHuv1CCBaXpXGUA5St3y1PJW34o3HXdiJs\r\nB8IY1mCja7fCWJ6fcJgNblFXCTXxH8chkwFzBGSlMQIYzG+wTTycklbHurlK\r\nt+EXLYGvKF0gu+kSHILx8AtmQ3kzr4hZdPxuOuD0KDwp6FdcB874Fq2f6GCB\r\nMdbsrzIP+uEuq8WePu7grggqo60AFl8BBVbm4nZJEHlZoNAkMuAUt1ut8Yp9\r\nGiyL8ukvcaB1fpOVM87Q+F6+newLWP54VUg=\r\n=yXMx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-383a26ed69bbaea5630308661e0b4bc96fe92fd8-18.x/balena-jellyfish-client-sdk-13.0.111.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-383a26ed69bbaea5630308661e0b4bc96fe92fd8-18.x/balena-jellyfish-client-sdk-13.0.111.tgz","_integrity":"sha512-Oba1b3lf/Ev0LQyuX0AOxkJd3J6OZbJWJRk3GKfuCYVItssO0Z7UKdktTbVnw/UWWYvtdQc5Lb8eQ1B7iimOYw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T02:26:51.739Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.99","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.111-renovate-ts-jest-29-x-383a26ed69bbaea5630308661e0b4bc96fe92fd8_1664591307868_0.3342591560032955","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.112-renovate-typescript-4-x-e831f4caf0460c065d37d95457a01554c71024a0":{"name":"@balena/jellyfish-client-sdk","version":"13.0.112-renovate-typescript-4-x-e831f4caf0460c065d37d95457a01554c71024a0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.112-renovate-typescript-4-x-e831f4caf0460c065d37d95457a01554c71024a0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"48b1a3e8896c6c00e333c1307f98438c4cf072b4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.112-renovate-typescript-4-x-e831f4caf0460c065d37d95457a01554c71024a0.tgz","fileCount":32,"integrity":"sha512-tGW1m7vnN0VW/VuiuWZ7/sZwTsZ4wgQ8WqQ8Z3+dngi/1kH+qWK/dutgcPmnyR+oncL9t87QWU2AqEVFwS9aQQ==","signatures":[{"sig":"MEQCIAz4yM7KOn4sxmNbtr37jiztrrnzfbxU+SN+Cyyfs4diAiB9muWcGRTMovGCge0o7nuv0Mvl6s5ZoQ1Y9JAjgnhcYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN6cRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqqpw/+KyEQLBzS+eTIIPX3stvrF8xY6mtMo5Zm93as6n9qUvRH8MTi\r\nxB3Nw+ewA8uHkNhWnvUEtUO82dRAczuus8WYpBUcHmxgtP3mGbSCgEXZQrvh\r\nXiSjr2CupiBAVJIujUuZf9V/W9z7gSA3bEyepLYOVCywPVZ7lrHkeHBBzcjN\r\nuTPSX9X6m0T+qhCh3LhqG1oh45u7gUulWcFF7hbbnD9jkJupgc4Z+jBrhJEQ\r\nl/kYdytsCDIu3abPktLgZqJHwWSa0QPCCXXcAkBk09Tva0ZlAAsZcZuDto31\r\na4jW+krV5Jgh9rjZn2En0jW8pDAqcNaJk2G38IFqEjWD8W9U2nPWrFhN4kZd\r\nCGnAJtK3KpqX5Ml+g6x2Vyzdb+W6SE00/tYM0SFv3Bvb+hR4X82MNNZE6DYY\r\n4VqenSJuRt6+cs4abPYxa5ARrkGi5S/PmJJDK3xeNrZO2rQ/rOhDOll3RFGO\r\nOeNl2kRZEioLE3cUG3R9dtUbhpXuMbqLDJnIAw9X/6GLg3DMCCCAO5unsmjZ\r\nzR49AJxfDlaxhczMr4scivcr0cUnNvgtr36RF9qV/syMu/oMJ76Tq3oRSz5m\r\nFQqPd8EKtHG9Zj9vFq7Cjht6meWLtdOVIAarf8ZewiY18v/Xu9S8q6tu+MPD\r\nNwdz7+Npunnf9Rkl+B5SWJQ1/ktS9o8ao2E=\r\n=RU4I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e831f4caf0460c065d37d95457a01554c71024a0-18.x/balena-jellyfish-client-sdk-13.0.112.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e831f4caf0460c065d37d95457a01554c71024a0-18.x/balena-jellyfish-client-sdk-13.0.112.tgz","_integrity":"sha512-tGW1m7vnN0VW/VuiuWZ7/sZwTsZ4wgQ8WqQ8Z3+dngi/1kH+qWK/dutgcPmnyR+oncL9t87QWU2AqEVFwS9aQQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T02:32:14.579Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.99","typescript":"^4.8.4","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.112-renovate-typescript-4-x-e831f4caf0460c065d37d95457a01554c71024a0_1664591632691_0.11875991681709164","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.112":{"name":"@balena/jellyfish-client-sdk","version":"13.0.112","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.112","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e418789ee055b7c7c46fd399b26cfee8037dc995","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.112.tgz","fileCount":30,"integrity":"sha512-Y86K+kr+Dg556tMOspu7VlgIyFldCWbjo383m8eKTHYtvefbuaw9Ce5h3462NI95Us3cJXJBOuxNPIFO7VxKvw==","signatures":[{"sig":"MEUCIQCnNF5yNrWzirvBHL1mutARsBRgyQzRRTaB/zwgiDH+YQIgeP5/lUOAo6bpEqEaXtdFMzVbcXSGLRgMC4qPqpPEdFI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN6eIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqG5w//dnzH+IqpwT5bVpt38Xdb2pSWSHu6S73XGK8b694c7LIUGiR6\r\n0WOU24r50l44VRp79YE0cKu+BIPyJ6DdHh77GCK2kJ51Im6bck5NjTSEoOFo\r\njyA+buXlxV6VfspCDzTZFtu9+f4vob6ULfGc5Pi8QQg6umTE/LX5+5/sffYZ\r\nMK+5X/yHZkhZADi9OR9aGtjtapJkeg2YK5zxlFJBv2pfv+YFb833H/leryWU\r\ntJzbm/Mu0I+wNct2wvGERq/DtphNG5/lcCbkZvybxcO6OIS5rHcOl411wlTM\r\n1Kmk2y4f282F7buLAwpF3wOSZITj/L8zA+SDjR+4WEanswPDRWGdoARKgxkj\r\nitjnPjN/a9C9hzVkSxUq82TnqbyoC/k4Zix+xxTiIcCCmMfx9CHiNGXMbEuv\r\ncxlgWI/GYI5hEzQEJ2HhdEYG9zZY1bQNwiK/DOW5o4adeYwo8ZOBWPM/wggg\r\nx4ReMGaLAGJgND5SzYpjjTMYMnxVT34vLuLbfDmQt6l7+hwm86jSSpyt5ggv\r\nh/axPxkL2kZqjJKVnGtW5RR2NMA2CWI6RmVU4LgIy/IXUv+JCDJ153BDHDTu\r\nWiEutvAyUNHV5gw06bxTS3oHYfD6z+ipx8dd70zeF9MaE6dL3PMGanholO2U\r\nu2yuYk1HrekVxd07PKMUCzEGfbZOhmhzBbc=\r\n=k6Oh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e831f4caf0460c065d37d95457a01554c71024a0-18.x/balena-jellyfish-client-sdk-13.0.112.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e831f4caf0460c065d37d95457a01554c71024a0-18.x/balena-jellyfish-client-sdk-13.0.112.tgz","_integrity":"sha512-Y86K+kr+Dg556tMOspu7VlgIyFldCWbjo383m8eKTHYtvefbuaw9Ce5h3462NI95Us3cJXJBOuxNPIFO7VxKvw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T02:32:14.579Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.99","typescript":"^4.8.4","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.112_1664591752790_0.2790557822234241","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.113-renovate-autumndb-22-x-4adaee79ac5add726cdaeebb34dea7a4e79ff637":{"name":"@balena/jellyfish-client-sdk","version":"13.0.113-renovate-autumndb-22-x-4adaee79ac5add726cdaeebb34dea7a4e79ff637","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.113-renovate-autumndb-22-x-4adaee79ac5add726cdaeebb34dea7a4e79ff637","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1e7a8d04c472697cf927e8187eb0f3051afef851","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.113-renovate-autumndb-22-x-4adaee79ac5add726cdaeebb34dea7a4e79ff637.tgz","fileCount":32,"integrity":"sha512-/f4kfAKjZ6ozm5NYCtS4J0V/4Hq4l5V4tWubpomx/lQPVJh68qxfOl+ZjVXbju7Ua1MuxpY/GnaE/MSRpDvXDQ==","signatures":[{"sig":"MEQCIGCkmHR0/riRNVmy3q1uSJaASApgzFrKKNHn0kzCmqHhAiAJd+KzRn43qWajHey2M0Uxs1j2f213ihyfQB+/f7ALxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN9nFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpaGxAAhNA9b+5jLugTgtCQg1nCYvjb4jEvBiigf3uqLDRJQxoVfRGY\r\nC5oCnLbp+R8urzm3W8EBIp6nwFMpktPwV8tYanoULejiDHjY0hYWrUQcVIcH\r\nzVwnayXy1/sBrEz45c2ifxAGgEzKUz49CbfXdSuyVgtayCrOZOaiPiqaIAev\r\nTtKCgUPUWJYoLGH43oj98J+RNRz3gilC54XRwPk5a0hjuvQcrK66l0k1z+Op\r\nc4R4V4Dt3VntLOsJpPyeT2jzwEUCpVCDaR7rSamEBYXq6GL14jDtXYf/W4+d\r\n2yhAYU0E4evQ480MglRnv0qC6lgy9Hdz85ZE3YwGBfNUpISDlkNDlho1+xi6\r\n/E2CHcVgkk+mB+EypvsM3kvvsOwCse2mzXWOU+qrsyhuK8AN0PM3a3ruhLDq\r\nkYIr3ExSydninh4man+2Aa0djLHMEaOR1Od6W3N8o6EW+HYu9VE/wb5qu+c5\r\nURKTquVWnXK182dTf90CHDE+WO3HxkzuYx0jWZ9epNnE8QbCz4Shx+Lw+63v\r\nJJLyYGdrnZM+C3xO7JaEHBaQxXL3ZKndYdds5v2TwcayThYmx9veRf8jcx3D\r\n1YrxFLV5lM01bUOgdT6QJ9pdmNvYWO3X6k0ZUxkt/FdYehqETdGOL2qWGrKt\r\nTi/HA083N7jOIXcLTOLNjEXtEMOHIAR3DJM=\r\n=oPIi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-4adaee79ac5add726cdaeebb34dea7a4e79ff637-18.x/balena-jellyfish-client-sdk-13.0.113.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-4adaee79ac5add726cdaeebb34dea7a4e79ff637-18.x/balena-jellyfish-client-sdk-13.0.113.tgz","_integrity":"sha512-/f4kfAKjZ6ozm5NYCtS4J0V/4Hq4l5V4tWubpomx/lQPVJh68qxfOl+ZjVXbju7Ua1MuxpY/GnaE/MSRpDvXDQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T06:08:47.663Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.102","typescript":"^4.8.4","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.113-renovate-autumndb-22-x-4adaee79ac5add726cdaeebb34dea7a4e79ff637_1664604613583_0.2737725355303937","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.113":{"name":"@balena/jellyfish-client-sdk","version":"13.0.113","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.113","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0a93be71d66c4117e3b4d24ebbf123bb0c46ee60","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.113.tgz","fileCount":30,"integrity":"sha512-tX8KMk/kE8UEjQLkFEMtNM7ARx7iN/eSrDZALCuLgwtj4z/rYByhMthAP6gYJ5coPVdlLjam/e8jmWdtL7Og8w==","signatures":[{"sig":"MEQCIAmJk/bRo7QZxba1L6eIlLGV+YL6Q3eiNoBxStymf1fxAiBW4ALZGC0+6w/pwQ2PqQvmuqKDQmnacY+lmd20otfjYg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN9pVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrsHA//dV2JNMrNTLEaw2HznQPgHp8SGPtUNUCn8GKD9joX7LEbbUD+\r\nTOQRtnOewW9tJ1W2Ie78LXBtnwNcSICiK6cTwaCc2rm48EiUTKhAV8PheD9A\r\n3oscYlD6bNaQI6tW9leEOSOa3U5xDCV3NXmK80lu4Jf1VFtzEv+msjuM5rW8\r\nOqRyJkf50WSEudTYBueMC8H142u+yIkMnWeTuoFPDIc80SoVdoCMPyDoSdQz\r\nlvsVJ9DbiwmckWI96oIbg5ysUifeU8R8WjYuUV4TZh5qlvO4lyR6rIcqol1d\r\nkPNEqsAFbXondm02Euvj9PKDsfAsq8aglubxNiGdepDB3RiB+w49PLO8Uf/P\r\nvLnwFHx7GYcisfji/+jaa7F+kUrB1yJyqzXfNrf14XetFzhoJnoUoM9xZOCC\r\nmVvqJVMES678MCSyL3fQgy6Wwdnnr5xXU8hkw3tOYuqPfBg8Hh2Z/BF0lmcg\r\naYFS9eKf5hyAmaY95gl6bl/U4UvppiTZ+ILajLJnndZEIZJX7Pj43YXyh4ZH\r\n39ze1Ar/c05qV2Rz9tkpsCgOLPd8PXphAMtXGT/fP5dFy5aW8FuDahMFeQzq\r\nS3e37zBPDvddx2BCWlTPGhsC0cG6CQGTpa+McZEMoQNd+BCzWbNY8ikFR26u\r\nY5hAeqsGem36r/BSqhuj1Wb+tqbIb28jTGg=\r\n=V4VY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-4adaee79ac5add726cdaeebb34dea7a4e79ff637-18.x/balena-jellyfish-client-sdk-13.0.113.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-4adaee79ac5add726cdaeebb34dea7a4e79ff637-18.x/balena-jellyfish-client-sdk-13.0.113.tgz","_integrity":"sha512-tX8KMk/kE8UEjQLkFEMtNM7ARx7iN/eSrDZALCuLgwtj4z/rYByhMthAP6gYJ5coPVdlLjam/e8jmWdtL7Og8w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T06:08:47.663Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.102","typescript":"^4.8.4","@types/jest":"^29.0.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.113_1664604757591_0.787071339748574","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.114-renovate-jest-monorepo-4e553addef5733205ab4d39e9362cbeaf8df450c":{"name":"@balena/jellyfish-client-sdk","version":"13.0.114-renovate-jest-monorepo-4e553addef5733205ab4d39e9362cbeaf8df450c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.114-renovate-jest-monorepo-4e553addef5733205ab4d39e9362cbeaf8df450c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dc6da3a3a7ce7d7eb3f2145283d8f8c9deae20a7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.114-renovate-jest-monorepo-4e553addef5733205ab4d39e9362cbeaf8df450c.tgz","fileCount":32,"integrity":"sha512-ZStEIUS1Kba29CnUS+kOdhz93LKnJYgQ3tppCTANpvOTAQ8WXc2uOy+RDxrwSBTUtC/ikMhWuN9Ct+V8v2fY6Q==","signatures":[{"sig":"MEUCIDux0ky0lXENU6mpINwWWw9PbUHop3sNhA4T+9rLx6FtAiEAhCfakE6cvg5hMHlocOycsUhx0SsM8G1V/MZnEt57Wrg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN9sZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqD6xAAlCuvPDubiyr7ndfArJP1UJLcfsOspjU0FFcQP5GWOpIK/6ri\r\n2ZsfomLKgPt4zBzTZRLRujPdyiTQ63KbBLZ/v1xkHsVDyVzuiP9v4cHzdJF/\r\nZXL155KH0oXhMqq0EyeKHgh4SOdii5G+d3VADRH/q64L21E5b0tE5JsCGnGu\r\nvhTt11fcC9C/4MCMoHewPHLDJgWo2QV5KN8AEh1vQvfz+nLN3YxJI/6PHYhh\r\n2unx6L55eJ902tLsY3WKGaDP6LgaxB8LxuPHhszDRon0UDO7PBFS+nDKZfcL\r\n4/z/s24SiWt+YnuKTijlZJMjMrP2sUlY09uxOhDpAZm6dGXfJuRvk1CsmlIP\r\nFtl/qwEcrq3cS/5UazFShl1hgCzZ2J3YNCZ7sV+5BKnJmwjvhgTG26pIg1Ur\r\nfb+gaxkbf1zkmEYrsBYi5aHjqqGyeA88/fAhMHmHYTACNmkacdhzQc683ozm\r\nzoZOQjqhWIRbthh756QkAjQb0fJAbDXb+Yt1p2pQgOygNcT3ADgKB5pmIn4m\r\nscFY+LM4u2W9Ke4J2B5lDz6eiam9iyF9n55/Lu76nTEko/cVJdbDCXVy9Z9Z\r\nUZNbGsvE8C6kPukaDO908WnlsRXkZYOrGhQxo+OvfZZBRCrK791GMpTLhuzu\r\nWCSv1lZYa2fHMX0E8JPCJsI3A9eN7PYUXjY=\r\n=FjP/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-4e553addef5733205ab4d39e9362cbeaf8df450c-18.x/balena-jellyfish-client-sdk-13.0.114.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-4e553addef5733205ab4d39e9362cbeaf8df450c-18.x/balena-jellyfish-client-sdk-13.0.114.tgz","_integrity":"sha512-ZStEIUS1Kba29CnUS+kOdhz93LKnJYgQ3tppCTANpvOTAQ8WXc2uOy+RDxrwSBTUtC/ikMhWuN9Ct+V8v2fY6Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T06:14:11.493Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.102","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.114-renovate-jest-monorepo-4e553addef5733205ab4d39e9362cbeaf8df450c_1664604953654_0.15445599392847909","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.114":{"name":"@balena/jellyfish-client-sdk","version":"13.0.114","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.114","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"32214b0d2cd10dea999dfd438ff3928834279f75","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.114.tgz","fileCount":30,"integrity":"sha512-Om6eJv7H/pAIxIweT0umuUPM+oJD2QIIW4yEvqLUiJKpBopJ4FHSQr5JJElpHOGeWq6daQjOgHGOM9ormq8e+A==","signatures":[{"sig":"MEQCIEMFpzgk+zF264gpV5cAMQP+pk5caKScl/5kENaisgFaAiAbmCvMe+N2agpz7tA9I7Mvp7U51ZA10piWpy6SxbU6Ew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjN9ueACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqm6g//QBIMOgQWKZ4nEICSIHWOW4N/IuqmYdbh7cWj/mGpINfGVDic\r\niJ3vEgaLAYqLTMkoaaen+7sS6ABCHEHE+3b/ENGtym70q6eHW40a6HsQ+AFr\r\n1XQAAWKqxRERZfq2T/zlfR9QgQLkYEu+Gyx9OZnUVPofbugSHz40rVjtggja\r\nyMgNpMzDu6u7S8nQNUfG/V36JswDWy8qhRalKl9Q6VHdCkYYhfplguyr7lA8\r\nKcs2KC6d16ClYICrpwy9plbwLdx5TlhJZUQ0+s1n3qrs57MSYN1DvHU2X03d\r\nR9LKPob58vYF2QK0JsI+TXPZjs7ZfPlZLh4H6PHVYX9KXVFK9eJtqf+arRX3\r\noOzv91bqP0CU9/sBhAp/IK2WKQ3EiGSZ8uK7iP9c3hnKINkJCom6KLCIKZnV\r\n0TdADiAjSh1ouq9+H+AapWvjP8lNFzHNj49RwdnhwlR0Yw7h5Y7qo5HbgdJo\r\nj2R5ettD8uEAe1kNAA7aHaEpOwFxglcX8lxpySgnF9OaKbLU67tytOiOOUdz\r\n37GmV2Fh+9JrkH8EI0cm14rdjW4l9HUrqbZK0zB2NecPx1TNFqImmMBT8dQY\r\npOXp4YVhfS1Ynzj9Uli1eeAVb8WZP1HA0nRA1obbHqwQ1UQpCFz2QmMXScj7\r\naBmELFs2G1G5Ci6HL0+dik5CXHlJlbgHB5s=\r\n=fiXO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-4e553addef5733205ab4d39e9362cbeaf8df450c-18.x/balena-jellyfish-client-sdk-13.0.114.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-4e553addef5733205ab4d39e9362cbeaf8df450c-18.x/balena-jellyfish-client-sdk-13.0.114.tgz","_integrity":"sha512-Om6eJv7H/pAIxIweT0umuUPM+oJD2QIIW4yEvqLUiJKpBopJ4FHSQr5JJElpHOGeWq6daQjOgHGOM9ormq8e+A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T06:14:11.493Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.102","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.114_1664605086433_0.2640874326137639","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.115-renovate-autumndb-22-x-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.115-renovate-autumndb-22-x-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.115-renovate-autumndb-22-x-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6ce234432b0767eaf5a1e3df5aaf8bb7260acf13","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.115-renovate-autumndb-22-x-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1.tgz","fileCount":32,"integrity":"sha512-ySOTliVa72Yv5VC3JOgA6UVtPjt8fK2vDmHby9QhcJRlg0dtX/RWLjdXwZgDVUR1qylaCC8tVLhfu2Y9unUxig==","signatures":[{"sig":"MEYCIQDbbWv+6wW5YrQoQhYciuL+W82HTvqskyJEzbFzpHu1/QIhAP92Jm9wD+bO2ZCvOKmwtoSSlPadV0Ak4aXb70mkVIY7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOA4lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmorsg//eu9kM7oT6GjGhBgi0vBV3iaYSWcwOk8iviO2MgNffS655HOD\r\n+kNK1erl8YpOhrCdriR7f5KCE1sRLzbJleFAxn4xHRxIpZf60gfl9SAR5eeI\r\nafDNY+ogCe1h7mlpcgO82zKbbd5z0s9aM/1X/G3RYa1CM07gF5wd+l3We1ly\r\nU10VwkX4MpMh02VMC6QCyDNAbvrbj3nSKUNfh5owm7AOk4CMbPggY0BYn3Lu\r\nHMheNlb+YkfIOxs7qcbcON5gbr0DMzxfx1a5JDFtGIuAwA2Q0kQmcP8kviM9\r\nMUDq1MxoR3SLK71lzBZZhDIsQ5j+qoQz3dZFts2lvKZZsqBDlHwJZFEooT20\r\nk3tj4j8qJpMjBaHhOZv/ahu7SUShaIzUIHKgaFc8mMmtwhKvEv+HEstofN1Q\r\nXGcC13lgSHbH+wt+m6F9nqzN/gNhWltVx5oHDMaitn7g+8n3LHkOsCZL6Bs1\r\nNZQfhZDyDz5k3I6SxiUQ2PQxN1/4sta8xJa3DEywtWTr+8gnYjjr31dYW+tT\r\nkepq/V+jJ5YcFUBDXjzDOMVLT06HJiaIVxNM8OAnlTCINuldDelDW9pf5sRV\r\noVFkR2JzJ1eeaf5dqVdIoT1u8C9kZ0S+RDZIQNBwCe0PJjGqu5Ftu0PcLws4\r\nTJ9O2irYRLbNpNtf0JgELs9t5Mbojgse9dg=\r\n=sj/L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1-18.x/balena-jellyfish-client-sdk-13.0.115.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1-18.x/balena-jellyfish-client-sdk-13.0.115.tgz","_integrity":"sha512-ySOTliVa72Yv5VC3JOgA6UVtPjt8fK2vDmHby9QhcJRlg0dtX/RWLjdXwZgDVUR1qylaCC8tVLhfu2Y9unUxig==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T09:51:52.284Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.105","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.115-renovate-autumndb-22-x-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1_1664618020791_0.66385064669818","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.115":{"name":"@balena/jellyfish-client-sdk","version":"13.0.115","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.115","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"219b2ff80f75e5f76fcde6e944a3153f9f03b267","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.115.tgz","fileCount":30,"integrity":"sha512-3yBsMrkPDTsLyC3t9yqb/DTu1QMJ6DIt24GMQQ6Cn5Xya+Lmp1l0QLWpKIdhcpFQa+uhA/Rp6sHNMEBAOERwmg==","signatures":[{"sig":"MEUCIQCFy6A9HsQ98LvtHKoDkF22NQXIuQBVrKCCBgITwN3r2wIgUYDuDjZGyXwyEc+gZyHB16sO0GkHQaGnootRluHjK9g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOA6nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDtg//TPrDB7GzHb15GIiD0Ifhfu6IdENWZX3SiaPnLAv+rXGhQex7\r\nF6wr3Bmtzd7nfqzIGIaedsslAiRle+m3c6w4sc0V8c4wPXR1k7Otw7Srepc4\r\n/VYqsODQzDD6HtOnzFseAGyjjRKzbcdQUcxb2iAImdhcXuB5uY3WcMCfmlyg\r\nPQTt/pk5MxIZmbgAe7PPPkkqo6RkCgfGbGkserdqeemQLNoHgQYnoBpp9+1t\r\nPY6QOgIUpOh5q0fP4KX44UnebJx74SZz/3faJMBLO4gHux2wJovbhHdx9ROP\r\nGEiNCvT+2xU/AxqdfYWJA0PVoQ+P6kfajGjqREG2LWNg+5qMFZOMKIVHSm11\r\n7DIDp32ur3Wf4ns1cG6yICqsiOIeiBlz23F4aR7gynyGR/hNtnzjt+ibCvgo\r\n3bND/EpDFQLS3TRYA8QBaEVQArKKxYwT5XqTqIUMkgSE+f0TIO8CwkePxJ66\r\nKIfV/b/zXlXOSjUj7blnSrmWAlGvouMJaoURWYwOCADJgcTjreC6N/eBZQi4\r\nXdfIKKKtHuvP4UszUfDmMHoXPsQPDPdBIddwy3EW0Bk77wI7yU8rSrNHvXZE\r\nXyqr5DD7rBvd/yc9hFHYVNWUujaimB/2g//WCadOCxnq3v9bA5lRBllPABMh\r\ngHsOdrzB0+j09W/mK5HM0Ob1ZAu+y4OZ9HM=\r\n=0KsS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1-18.x/balena-jellyfish-client-sdk-13.0.115.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1-18.x/balena-jellyfish-client-sdk-13.0.115.tgz","_integrity":"sha512-3yBsMrkPDTsLyC3t9yqb/DTu1QMJ6DIt24GMQQ6Cn5Xya+Lmp1l0QLWpKIdhcpFQa+uhA/Rp6sHNMEBAOERwmg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T09:51:52.284Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.105","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.115_1664618151054_0.3620340338331258","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.116-renovate-autumndb-22-x-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e":{"name":"@balena/jellyfish-client-sdk","version":"13.0.116-renovate-autumndb-22-x-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.116-renovate-autumndb-22-x-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"93dbb920c0bafe33cc0b1af9b7d73fb7f15b621d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.116-renovate-autumndb-22-x-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e.tgz","fileCount":32,"integrity":"sha512-hG3N1+RfBBgnsajwuAWIDDAiyklgpmqqrfl1081ovUcq5ABlmcOzYrUr5BZPlDEnZH/sbatyxp4+vyMA1V5wdQ==","signatures":[{"sig":"MEUCIQDSEGRKs/VczRUr+pm0h7Wc+KyJ/zwlao2voW3fcUQAwAIgM0s+UEpUzk6pfbfZoVaeJyhUMmkQafS70RL6O96gaRc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOA9FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtthAAopzy5qyUj3GwAoXO/Y5XWpYlOpCu1vjCrr7t1pd8OH7n/xmD\r\nVOziT1puhZ0zFL0h/t2CwIpgruES2bKkFtttTsFD53k9Qsd6yDfuyD2SuBGT\r\nzZCFPA9qgwONv5vfpyZG8iscTIrT1KpmIbL7Ul2oqk5YnTDAL3uCSUVsTZ0b\r\nM2kF2C+2YQKwSArWvZuZcn6NucNZV1UwYPio92F1SI3H5SQ3ghzaYvGqEY5I\r\nu4trXEYYaxfJSmYgnhRwx87cVRD3B//i7K2lr7xu2qyNIekpmR9IXCzIeti5\r\ntaQqSXKy7/bK9XBoouRMyGd0OJIVOtc0Ddfj2HS5LZuM38O1XSlwqA18K7u8\r\n3SCAlZEBlpy0Ge5g8B5Vo0WveOmR6xk1PTJyol+HFTxhLYjqv4qFfnPjY3Hn\r\nn5UuVfB/04JSU+0TpdL7jJNl7sXckjp8QrjllLq7mOV0+5xhm8aQPbwx7lHH\r\nnD/QDfph9F/C8wb7HV/W+uGe0gD/JZm0f45SBIlrbfpvgjlY6yENn+Y8rcjm\r\n/uh2sB5mfyrT4ljmYS8ARcZY+rgqKXFm2GuXgZWLIvTQERmkTM3dfsgTA9YE\r\n5Ok5pnzYDVPuStRTKU1CAfzLMCeMFeYkYaGeZUTJaaJAfZ9nhORb3ey4OpFm\r\nZdPhXot5XCXhwe3W1MIWspNT8wC5iyo1AFU=\r\n=HVkA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e-18.x/balena-jellyfish-client-sdk-13.0.116.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e-18.x/balena-jellyfish-client-sdk-13.0.116.tgz","_integrity":"sha512-hG3N1+RfBBgnsajwuAWIDDAiyklgpmqqrfl1081ovUcq5ABlmcOzYrUr5BZPlDEnZH/sbatyxp4+vyMA1V5wdQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T09:57:06.508Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.106","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.116-renovate-autumndb-22-x-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e_1664618309091_0.5858359560872666","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.116":{"name":"@balena/jellyfish-client-sdk","version":"13.0.116","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.116","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a5f9377d04d0df5f207684f36670d3380be886bc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.116.tgz","fileCount":30,"integrity":"sha512-1luxsKFR+rMHS9aadIAah3dhJWLD1tci6KKtEeeCluWu0flZrXN0LI7O9ZrkQhfi3CHOYpXpWvenMN0KoLp/hA==","signatures":[{"sig":"MEQCIFsL0mhdq0MK2WvKvdXpF8WEd1BhfJzBJl4IQf6T/6KjAiAjWx0FaXep76Ky+N52md9MvtcUsak+7GocSK85jtVsUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOA/HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3sQ/8D4Ktj8tBXVDMa6XHkKoaOPal4ZXh+HiALLfmcyH+1MDwN0ZB\r\n6QT0lpeU3A3ag3Pe6WsMSfClxDSlEeTXcz+uykHbKaB53831CAli7nRZCJWv\r\nRUI7GjJyv/JT8WP2DLbdYXvRBi+l1DLTXuOQxjxk0jDMKNlXiOC1FRR2O8GL\r\nhHyv2WpT6Fs82gxXBLF+B1nbecrJe5UWtHonC6vhykK/YOsA/34aXYZtA6m2\r\n6p+J47n2qMbhRBwjcLy57LIfn14PdvfnTHZ541GZ8Kge70cEIVZ9KsN2Hxda\r\nmdYT5e7HG3XhdkBOog9GzF116YUL+UABTQFtytiuyv4uUUcZ2jHucYQK0Cg+\r\nHeRKqn4oxKhYzbzWfQ4XO/1hrTjBlkjxUKi+qRNo/zrd8rDo2qdCefDJA6oo\r\n02pJg99JPs5Wdp2z1O7yQ5ezeitHRRMuLV7+cM11HhR0tQKHX8k7WgxaZaxr\r\netVpm6suxfNnUc3I8I1i1I8LCiQTAr8zAfLkUMxvmq4Qj85qwtdXgZpiKL+e\r\ngXmlIuGlHQR3Iec5/tAVYL6Uakvp/ScoARe0EEewG+mpy/UtsgZFkLsCDWK0\r\nBveXXiQ5z4qmSWRMZQnZie+tNtjHrjmGp57vmSGFYlgUK0CaNCgxPnLfC5Ep\r\n08hFECtbNeXmeKm3oK9qr+Mvj5PCh6XA6QI=\r\n=/vAT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e-18.x/balena-jellyfish-client-sdk-13.0.116.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e-18.x/balena-jellyfish-client-sdk-13.0.116.tgz","_integrity":"sha512-1luxsKFR+rMHS9aadIAah3dhJWLD1tci6KKtEeeCluWu0flZrXN0LI7O9ZrkQhfi3CHOYpXpWvenMN0KoLp/hA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T09:57:06.508Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.106","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.116_1664618439372_0.5198410171884194","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.117-renovate-autumndb-22-x-b5fe0541a2f28aed0e533885c47df2e7dabc9a50":{"name":"@balena/jellyfish-client-sdk","version":"13.0.117-renovate-autumndb-22-x-b5fe0541a2f28aed0e533885c47df2e7dabc9a50","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.117-renovate-autumndb-22-x-b5fe0541a2f28aed0e533885c47df2e7dabc9a50","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cf9903ceaf8b2d898706701ec543c933cc72597d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.117-renovate-autumndb-22-x-b5fe0541a2f28aed0e533885c47df2e7dabc9a50.tgz","fileCount":32,"integrity":"sha512-tAdon6ofP8oY8XBL0hyUhT4KSNMGw/KCidQNvejH/jwpiirhqZLjVTDH+74s1eokrtiY1aXRF1K67RpUtMCvRg==","signatures":[{"sig":"MEYCIQCVDi2M26SF8jJ0NjUx/6gIF0dYIVpgnLBUPF+NcUx9jAIhAKAWTdFLdy1gaZqK68WVdl08WJu4IDqmkOdRhtOQ+3UD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOGN3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/1g//VsAWPWZmy3m1cf9UaUr2YLruyq+MRm7zUlUZxCNNTGHCfhdi\r\n2p8YggcYT6troN7mQadCXqx5R7jHRwYyao9BRyl+cLsU1IFQ3RNh5SXwTAw8\r\ntZD6Xbg+nsWC8BRUTqwM1e2hmqAJCYFYr45BZYBRj3GQ9DO11DRDOAHitR99\r\neV3Rpj04GR1MH+GwWMtDvJJX1rF+g3NGL+C2JD4OTEmg7hRIlC4EGodsf5Sl\r\nFPz5Yoe+CGvIg5Wi/8VMKx3bru1OdA5yjzVfCSNm7aC1vyJtu64txJt2NtAd\r\nItWZ2LxhbQ6lsekjL74jjpgwzUpHTlhAqrvn961kRPJGMfBFosQpSEvA1W9D\r\nxzEP9Mhu3A5SOCQQva4EjI2brAvw++aMz8urMZhaCRBcDXbYIZEN8tW8gjOk\r\n5HqEp5+aGBKozAifv6+IFMovxX2aBIHigd4kSLfjmOMxOxBMBBsz89+1WIKm\r\n4Bem7rv8V5VaUPQp2FOXkq+UcZVEr3IagqWjRRbZTm6/ISH0MUAZH1QOYjUR\r\nEkkUINzXaOX2XoNlVzz3gSJKvVhsOF6BFydWUKx1obrnyeFYIBwgQpzVT4DW\r\niQ3JBBlkRZUGt9fmjbv4t6S1V2pBBCwm+oerPon0ndP/W1ODlNx6vHB1IXT4\r\n8Q0CI2hy04HCxmS7hAMfFT1ZqQoDctCTaJ0=\r\n=rJAy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-b5fe0541a2f28aed0e533885c47df2e7dabc9a50-18.x/balena-jellyfish-client-sdk-13.0.117.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-b5fe0541a2f28aed0e533885c47df2e7dabc9a50-18.x/balena-jellyfish-client-sdk-13.0.117.tgz","_integrity":"sha512-tAdon6ofP8oY8XBL0hyUhT4KSNMGw/KCidQNvejH/jwpiirhqZLjVTDH+74s1eokrtiY1aXRF1K67RpUtMCvRg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T15:56:03.402Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.109","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.117-renovate-autumndb-22-x-b5fe0541a2f28aed0e533885c47df2e7dabc9a50_1664639863536_0.41412219965370345","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.117":{"name":"@balena/jellyfish-client-sdk","version":"13.0.117","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.117","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"794095fe2f88fda7e4761e61c5abc11beed55878","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.117.tgz","fileCount":30,"integrity":"sha512-zrpLVAf8XGnjN4a2xd3D/+WL/YaFhhWYEA/j2D6aPkcZHNLCOjG+Wbj89cfQUj9HmjauT0zYeiqkfPvu/0o9jw==","signatures":[{"sig":"MEYCIQCLIbpZ3sKfyctdJyQ9yC/hGxStAB8eP2l7sNcIlx5uhgIhAOsXfMNvs31rWxyAOa5WpIIactWrB8+Xyqzdx9TUtZjD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOGPwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrNfxAAmMO/SgSg4pIuJFA44xG+9nnlrP9b6k2GlB6wn7ln4J9a7Erg\r\nOey4C8qZYBDHUsXW6vuTs+QW2gU/u006OBCbmRL4sxYnVIRzvET2zfygmCkt\r\nfIwTI/QvfPp2Dp7lF+6F6xcvQGW5NY8ujmAUJ339224Zh3PTnqqsuXh4h/GT\r\nVTHSs8ff52uROQ383zNxU9SxFfQolGcd4budieRNSEETWszfMj3QIoqsQh6e\r\nPV2PPQmfjumPJ13eEn8TCsFnq+hdT7sqItalO7ZqPEtiTqmOzhN+u2yMOtNN\r\nAT7g9IIZf4+mtonANQlQrcZEgCDNdktN6BOXiMCmx2ISx8SL0n95Cfz0ky6M\r\n1KLZuvO5Aj9HEfDOk7IAXXRo9IpijPYjg8HidmPkYMbrUn3LuHQ/pPQnEXh7\r\nV0Y39fxFCFV5vLEg50+ycpd4CtlvYspzYCtyBdE4WT4YYk9Ze2ZwnhuT0iK2\r\njRlmXic8BBAUf+R+dDac5hKU8QERcH98u9nO30kpZgxwYW4xTTt2vfRSdfZ2\r\nK3RQjhJy92muggKTU8LUHPDrYZE+gHVcUrh+eL9k7neOxZzSM2cPAqg4VYJI\r\nyVZMBZzqX7a1CfnflXNs33dkkVFi7j4p8KecY7dhT8O+SNLNIyR1iF90v6EW\r\nBdVgWuZyR3SHRXr7ku16e9hJtjudRIlGTQI=\r\n=GCJf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-b5fe0541a2f28aed0e533885c47df2e7dabc9a50-18.x/balena-jellyfish-client-sdk-13.0.117.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-b5fe0541a2f28aed0e533885c47df2e7dabc9a50-18.x/balena-jellyfish-client-sdk-13.0.117.tgz","_integrity":"sha512-zrpLVAf8XGnjN4a2xd3D/+WL/YaFhhWYEA/j2D6aPkcZHNLCOjG+Wbj89cfQUj9HmjauT0zYeiqkfPvu/0o9jw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T15:56:03.402Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.109","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.117_1664639984050_0.7261611258252065","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.118-renovate-autumndb-22-x-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8":{"name":"@balena/jellyfish-client-sdk","version":"13.0.118-renovate-autumndb-22-x-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.118-renovate-autumndb-22-x-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c88c726e1b43d3120699a3684816b325d9b31aed","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.118-renovate-autumndb-22-x-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8.tgz","fileCount":32,"integrity":"sha512-jFDXnDdrUaEccB4+Ec0JcCE4eL6jQ45eG8OXeg5AooN+OS1JU4cg6P0riTqC/uoOlsBvyRt1o5KnKfKSFA1dVQ==","signatures":[{"sig":"MEUCIQCgGcGTJj0I7ofv5aDn5oWhOGwQpx/5il9bI842CuiJYgIgQ4JkuI9N+FwTo9Jp40vEBVUqlW9UmmA2p57Ebk2uwjU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOIlhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqrRRAApE8xgtK5wFeITBGNtxCPWCS+laN7Xz4kdCaoro6xwWnA2STT\r\nYrpxze4nO5PwqFQLMGKHKE52VTG4rqfQDeI1Tpzf5sN/CfhAWto4VYwM6Jxt\r\nUMne9trLFntdgJdCgUJ8AhaOYUjr8evR87uJHY4k2OuUzsQWchkE/Pezr2p5\r\nhwZar8nnEi9veHdkDUg/C1gOocfdGZa5OOxqNpxkrctDl7mWr2Up3/WRs0K9\r\nE41hFQOLceSnvsy79BnsG5UjyQ2ffG0OPZezkoGoeqDu2EqRAxwOJsXNSJuw\r\nMLPMCvXe1RYQTZCAv9ZvCU4HbFsxnHZIveiFyg4OX5rJQ6msH3DPPHpqk8Pb\r\ns8XK8FpC9d1GKcLrZ7TvwAPWNkZI+TFwGEmkcjy2FIdL3sLZ5fg35mr0xVRu\r\nD+Z3qKZFMyFrPzN9IASFshkryGkh05AjX0CnduPwV39qCXjDRD5f7i2qgdxG\r\nlFvw9eYX2qk4J0UJgAHZcewLiiE4MW+iEUJxQNtf01n3xQpYczv6NvtEnFaI\r\ngq4viMmZ2n0U4/EZb8dAEqZQtJMP4DuwCY2M0YxZKu83hPBU4YsEbqKuEe5+\r\nss9a8MQD9JodlOASXXYTBolbCmMqEJdpgwrvzfu7DBv69M9u+TRwFKPtsflU\r\nkrt3ehjOlktpnLmQD8v26QE1ggBiHLT4CCo=\r\n=NVgA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8-18.x/balena-jellyfish-client-sdk-13.0.118.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8-18.x/balena-jellyfish-client-sdk-13.0.118.tgz","_integrity":"sha512-jFDXnDdrUaEccB4+Ec0JcCE4eL6jQ45eG8OXeg5AooN+OS1JU4cg6P0riTqC/uoOlsBvyRt1o5KnKfKSFA1dVQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T18:37:59.551Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.111","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.118-renovate-autumndb-22-x-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8_1664649569054_0.9700967764043598","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.118":{"name":"@balena/jellyfish-client-sdk","version":"13.0.118","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.118","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7498f00557adf034d1b4dcf11be2345d05aea743","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.118.tgz","fileCount":30,"integrity":"sha512-/u6WA/hNyioTXwX2L/rUzpTlJcYrblWic8kAaOK5208TWrp9i0Mk8XCzs7GUrcZWSCDqnAGyx4jXpgoPSBmvIg==","signatures":[{"sig":"MEQCIH5xShp5UDm43HBMLguL03aTuaVnT+LzvxRpp56IWyqtAiAqOuPTqIGP7uciOqqdAicBYWJT6kOZgaZQrUmhcwW7Hw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOInkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpt7g/+Oyb6zwvA8nTEZkKvHKgwWWilUxLrGdoCYpI4FYpQsYaTRdDi\r\nIeeuBZ6Ovp2UJWxKNde8cfy1JUxRT7e4mokd2NFbIzZG22hx7jjZUgLBYN6U\r\nMX254dUNAazgizQpYRR0YINQQuNAF8Dv34nduUw+QODIh0RIZdgSkOI1TAYu\r\nxictlTpXII8XNJV0ASRHf/A1nMCHjAhPY+yfKIoOGL0J1pkXUEYx9XymcGXm\r\n/0mdG07ucU2xEmXFBRrkgeHpsXBiFUb/QmbspdWrtXDih1bxmHLcSB3D33JN\r\ny6rFKdjVhT7yiVKEFocds89/niyRhdV60OmmQ6Hx3E0+ULpKacwclDWbAiqK\r\nhAbio0s3e0gLHrNz39RNVtitskLlWBOWpHr1JJWW2gxir+7ce5bF67JNBP4x\r\n0dPJiqv1fHeBV3zaPCv1HSQmQYGPuf9k0zPI4ZArsaH4ZfiZ78mwNcxrWRsg\r\nnPuLafhr1L0br1OyqgeraxoK0oi+vnX65ljVWZREXI49A3nAHlUBVaNFJiyH\r\nuskdJGFlf5rnE2WyOcuQZk32zucXR3h21oFhsvj/Bm3UtR33SqYpfwwjEesU\r\nOITFcSknm+4kvhMpRg67T+sjtlq/0ucIRHDKu95Jsk+KORYOBL+n60YMAzMW\r\nTq8BjtohrJBScQrkAVWwM+Z088JJ3sdsTcM=\r\n=n5hK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8-18.x/balena-jellyfish-client-sdk-13.0.118.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8-18.x/balena-jellyfish-client-sdk-13.0.118.tgz","_integrity":"sha512-/u6WA/hNyioTXwX2L/rUzpTlJcYrblWic8kAaOK5208TWrp9i0Mk8XCzs7GUrcZWSCDqnAGyx4jXpgoPSBmvIg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T18:37:59.551Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.111","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.118_1664649700402_0.2738930683692027","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.119-renovate-autumndb-22-x-827ce02944b1a5a3e57aa4e6af645bd233a980da":{"name":"@balena/jellyfish-client-sdk","version":"13.0.119-renovate-autumndb-22-x-827ce02944b1a5a3e57aa4e6af645bd233a980da","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.119-renovate-autumndb-22-x-827ce02944b1a5a3e57aa4e6af645bd233a980da","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"74d51dd99237995edff296e163e534f7c34dd987","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.119-renovate-autumndb-22-x-827ce02944b1a5a3e57aa4e6af645bd233a980da.tgz","fileCount":32,"integrity":"sha512-qauexQlupnHcCbUDfQk0r5DNf/u7qVzGtlmcXzvVItuS0L4JKQAEQW/FhUdoDEFBlXR2gMEKE8y0R28ttK+RuQ==","signatures":[{"sig":"MEQCID9iElEaCwkQ68XgKM176j03u+jH3e9IEc2Pxd9MDqR1AiAm00NCLRZLvtyoC7n661fw6m/CTnR7+tWTLynRb9ozHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOK6UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoatg//ZiFw867wNobWVFoSg5I9OD9Dz72CqFRGVKJTaW64IuRu0ukG\r\noKZFupaSZS9jWp9K5+O+Qyoa4wciX7nk27qdDdeM/UMpHOeM19waWIOGLdZt\r\n5zwYERqVGZWkg6Bw/0sf0YRDJbtZJxVnWlUU4pakniDMpNnZdyEDma40XRpp\r\n1qQaPzHmXsVSCsawds6WmupIOcC/+KiXO77uHDqNpY1eMpj2Ap1zF4GkLEp2\r\n7HYDSSThLN7TRzM+gKYl8MyA6iHoOdnX+JwTv7Tshx+HABiazCpAzy4fh8A7\r\nZyvUwQpGkkjeH2SJC2+EnzsfByHRNgp+PjG3KLrhsydCy3Vv/+YQmJFCTuRr\r\nDHsSMo57OuvQtsIg/OSZZIc4aL+HJDcXTmXR1e2SCZ6Ts6nMXEepqq0un3rr\r\nJgUUw3JgajLkhRdaukjRR04uVjCnoIptlQVIol1xTaDlkdAHE2MRQ7mu5sJv\r\nG/xcGtNISy0jhysZe6rTjTLAY4MhhiuCXxjIMKfqfeT9Y0NiaZDEll3WX8fB\r\nruRBoDq24D6HHvqfMiTCs2y9OZ4WCvy8SJNi1cc1h+Bg6M/8ihUmGlk2AEcG\r\npRIyJv3RosSG4EJUij+h6iASEhQ0+8DoyYW2X3IWIYLTMyFTMlTRhvr/Sj2j\r\n6c5WIqnVMg1ajTiCy/RP5TvETwqhCVLtxio=\r\n=xRp2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-827ce02944b1a5a3e57aa4e6af645bd233a980da-18.x/balena-jellyfish-client-sdk-13.0.119.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-827ce02944b1a5a3e57aa4e6af645bd233a980da-18.x/balena-jellyfish-client-sdk-13.0.119.tgz","_integrity":"sha512-qauexQlupnHcCbUDfQk0r5DNf/u7qVzGtlmcXzvVItuS0L4JKQAEQW/FhUdoDEFBlXR2gMEKE8y0R28ttK+RuQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T21:16:36.435Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.112","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.119-renovate-autumndb-22-x-827ce02944b1a5a3e57aa4e6af645bd233a980da_1664659092019_0.7593072473166749","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.119":{"name":"@balena/jellyfish-client-sdk","version":"13.0.119","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.119","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4493fbcb3f46ea112be397afcba3593a1eafa68f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.119.tgz","fileCount":30,"integrity":"sha512-zMhWB3WMuFxNMvuTQfdSYmLUxakfknLp0D1AIxwjJxVowmZgjUCiYnlhCZV94ZVnbBeT13S/JCSaXrSqxLCg+w==","signatures":[{"sig":"MEUCIHyXbGZArLpoGkX29RfFQYJakCJz9/P8j8wvrq7tG9W8AiEA5EFcgvGlrgVceR0FMahe1uVGebx0mqRoPSn/saVeGNU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOK8ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWSA//SLTMgXYAxSiyNsrgRIEjiuAxcmhadaU8MffmpHgmR3vZeF4P\r\nYNLBS9tvIAI0ewZRKkC5/CsKJdIrVHTrnWOI13hXkymnL0cw9qa0NesKdqwR\r\nj/E6m+dtA+cg3SQX7OhIVB8JJHJrLIiAzw/WoymJYT+KJVEOdxl6JIoCV/Sq\r\n1U0aIfTVrV1NHNUMCkj0im9jtfBafZtdQh/iI3ITsD7uENMB/gGyZTo404XG\r\nS12qqRzXfNlYI+e/i0roZzjjAwBw3+rgQtNk358aGtIpua9ZgfEE7NFMiX0C\r\ntaLPwIaOWdZN0BpSc/ksP3i1asR07jtBvAoR2iWnDB/o7x933m7QqHl5xGfA\r\nuOuQy6n7pjkPboM2GvYnY6ki/a6t14U+eVDfqHvL+0AS4302cWYfDwzW/ZM0\r\nTbqB2gZeB8jdqlyPip2xdxKS+IkZuk49jtNGiC1vnxjMuTctONtcx/3kWuxm\r\n3ewZVurH3+hr2SDFNCr/EAbhz97Tp41F+DSWNA4oZAEJxsxi4aJFdTqyeCeu\r\n2J4YqhODsmYi66h7tmMwRzzRJgeLOCm1Se7GDszfryLbU8tD0YMtdmx+9th7\r\nunCLO92hMKjo0oNq4V0Rln+gzVB57gWwIoIxkqSppMwKDlM65f8HRdNkCREV\r\nobCPMFcYkK7Y6WMXRzbkZSd7kYWtph2z+zg=\r\n=4col\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-827ce02944b1a5a3e57aa4e6af645bd233a980da-18.x/balena-jellyfish-client-sdk-13.0.119.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-827ce02944b1a5a3e57aa4e6af645bd233a980da-18.x/balena-jellyfish-client-sdk-13.0.119.tgz","_integrity":"sha512-zMhWB3WMuFxNMvuTQfdSYmLUxakfknLp0D1AIxwjJxVowmZgjUCiYnlhCZV94ZVnbBeT13S/JCSaXrSqxLCg+w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-01T21:16:36.435Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.112","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.119_1664659224916_0.49710466080776006","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.120-renovate-autumndb-22-x-0d0ee4023a411f5455700f4fbab5da18a2e58ffc":{"name":"@balena/jellyfish-client-sdk","version":"13.0.120-renovate-autumndb-22-x-0d0ee4023a411f5455700f4fbab5da18a2e58ffc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.120-renovate-autumndb-22-x-0d0ee4023a411f5455700f4fbab5da18a2e58ffc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e7821234060b74145aca5d3de23c7343f59a7839","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.120-renovate-autumndb-22-x-0d0ee4023a411f5455700f4fbab5da18a2e58ffc.tgz","fileCount":32,"integrity":"sha512-PqRvtFur8IQl689R/en3X7Lmc+UmjFS9SbUfon7avfsSVPNuRCsxZiKICHspxTue2ZXl+TFzuFdVRjajxJ189Q==","signatures":[{"sig":"MEQCIBo8UXkzbC/h8MHAMLYD6Q49MqHB6TrHXv2DkVQd6pevAiAx8RTdUs+2lTxbh3v+iuRZs4Ctgfgt0diYspQsymeqog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjONgBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnLA/6Au0ksLaHywBAcUPT4aP3Ea7fNU+xplzR7OsJJQ8uznBNIhaG\r\nq05kEs5L8Gm11picRMwzhxIURGuAi3cNp0mGZQpa/BGFOLWUOASw/MCfptrh\r\ne8EmYMFHI2IlkcBB6AHxd3EBplvE6luOWknK+qSUXDVD8LEnzjoB37Bfq6Pn\r\naIFl5Fb6P2TjU346sDdQARRu0vp2HWO8GYYLu5iTwDPrX/ateJ8JmcVKtX60\r\nTRBqIs8cmj/3Fs2aT810sZlG816F2svPuiQEHEKgVv1DEyUNTLBfTZKuY8kD\r\nktGxQQRjVB0ofDlVqHUFbQ4ND53P47mYe6WYXwoUEIMsQ5O7u8wzm7G1Xf2A\r\ncmMLk8WFori+oLOoG6B5uhq+/j0NSKeOsEMHixQ6l1ekX9iFBdDkn1cKGNim\r\n+Dk3uOY6IDkweSxgioPGhIXldZ5cQUIyPOnunFY9jTRN0VBzVAf65IETyNiv\r\n5csyzZ68/5eSaoqAiQ6Hm1FHqv2VLuUTQCZrXAOwRQ6oOcIuuiFhJEzC9Fw0\r\ng2NxChNl3zRP3hLau8f0oCcsozjqYORlEoz4ULA8GCPht1uqBWcFQmQuPfVr\r\nZ+22P/k4xJyiSBUa/fBu/zI85Py7vlVUaSWAIsjmdv7hVKnOKo8Y0ObCdB3q\r\npqGGr4jv7r7xQrtQVvAFlPnTIZ/eey7HkXs=\r\n=uTWT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0d0ee4023a411f5455700f4fbab5da18a2e58ffc-18.x/balena-jellyfish-client-sdk-13.0.120.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0d0ee4023a411f5455700f4fbab5da18a2e58ffc-18.x/balena-jellyfish-client-sdk-13.0.120.tgz","_integrity":"sha512-PqRvtFur8IQl689R/en3X7Lmc+UmjFS9SbUfon7avfsSVPNuRCsxZiKICHspxTue2ZXl+TFzuFdVRjajxJ189Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-02T00:13:24.940Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.114","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.120-renovate-autumndb-22-x-0d0ee4023a411f5455700f4fbab5da18a2e58ffc_1664669696891_0.36623592716012543","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.120":{"name":"@balena/jellyfish-client-sdk","version":"13.0.120","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.120","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b5a5761e6222950951920e80b2608e3c76383822","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.120.tgz","fileCount":30,"integrity":"sha512-h6K7NX1ibVqWOs0qiTRw2QZmtXeGKH+RTpb3/mG6xyEHks/KxDpGKIw1Gb77GKCzaq+NKCr5WT3dVbbqPzQPdw==","signatures":[{"sig":"MEUCIQCkiBYc8qjE3zBorMbSHXfH+xFqeZto7egNQLIV+082nAIgctz6lsZuxfpizlMB9wCZ+BbuRqtArPoBmnW+rKbx7ZM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjONicACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqpkg//cHPU2Y0RGs5aYoxQwXK8SgljdKm06jQ7S5C5SHUMi554D8tx\r\nbPfH3q68qQvFEP79tpKvrxdVxfTuF2r/vXeWOsVoXsCXv8qrw2lnnR+QrP5u\r\n5xuuH9fcNWnOXuJ2C0iF2FaWh/aAvHXCD+FYmxN5Bi5/xVaODpgBQ2tkYhlS\r\n0mJ5aZpjcinPN68n86Pwz17r8qf68gitvPsIbFgyL0GQ9fTGKN9SrSYgHOQ4\r\nbvVb0bzmQS7XLlEO1YHgYcGc4gXx3fKB20e/OFXE4lsuK972DxdyNs8sTnlz\r\n+V8vkD2+p1Hp3s7hCfvXsxlPwwp6AW4My2JJvzerPvu5OhKMA/XfZVItt+ps\r\ntW8+icdyONm/OSnOF7G29A7W5XvjaAyukAhPsQ86h2+GjXoDz/e6+U/gg3F9\r\nUj1mkOxyAaJ/tWhExAeqwkWhqpoZZXiUdCtdLeMys+/+tvaJGh0NaaWbFcla\r\nVwPb0ZoHf+l66jmREvOxFil3j5Ml+/TQKvWeZeqX5ApHpIH+zCpxuqFjDz2t\r\nTHkgoeayJK1tMZckboKKEILnP4KXbG/VE+y9rm9YEgGTfROESQekb4LFvykc\r\nK7mPcA+5qpzfR5eMIZ8hOo5Sxnuyn3HuERkKTOgsb0STNLxoT2EDfTAuLYI5\r\nlB5C0NxaBFI/mdtrW6NfdmNzb0OO82xP2ds=\r\n=s/EF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0d0ee4023a411f5455700f4fbab5da18a2e58ffc-18.x/balena-jellyfish-client-sdk-13.0.120.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0d0ee4023a411f5455700f4fbab5da18a2e58ffc-18.x/balena-jellyfish-client-sdk-13.0.120.tgz","_integrity":"sha512-h6K7NX1ibVqWOs0qiTRw2QZmtXeGKH+RTpb3/mG6xyEHks/KxDpGKIw1Gb77GKCzaq+NKCr5WT3dVbbqPzQPdw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-02T00:13:24.940Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.114","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.120_1664669851848_0.23765695964909495","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.121-renovate-autumndb-22-x-e61875274f0898d25c459c728ea2e3343b4c7200":{"name":"@balena/jellyfish-client-sdk","version":"13.0.121-renovate-autumndb-22-x-e61875274f0898d25c459c728ea2e3343b4c7200","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.121-renovate-autumndb-22-x-e61875274f0898d25c459c728ea2e3343b4c7200","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e041cf5c602aba3e1fa4f92d1fdebdd51b80675c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.121-renovate-autumndb-22-x-e61875274f0898d25c459c728ea2e3343b4c7200.tgz","fileCount":32,"integrity":"sha512-nLm9W4ewzHB5iQRhIjWgSHqgRnjUEWAWDkiUXpWQMx6pj5IKatck2+DF4C7IPLCUbBRalRCX+bhJoQ6obex8LQ==","signatures":[{"sig":"MEQCIAOkqFrODdlNOHuFFaPhMyBFSb015YeiQLy23r9HQUzJAiBkP/CfILAyJNXDytUoV/aB+fk4S7f1+32hDjq4hIB15Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOhmEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqGg//cpJD49PJt/QklkGtGtkqndX53K06rIHn1TPgCdKN6lWDb54x\r\nmimC3NaEYz5EjIpxnqin329KGfSFCenxYXwq1n+nJJRTIPl7YZNZHpqLVTn9\r\nVhcQ2t+bbWxB1kq2oeDnsdBvUt1+wqhOeJ+YSn5eKphUhcxIXSnkVbIdG1At\r\n2vSSeyuA+wsVKJ6uB/mcHQ1f6S0FnkcScl1BVxRTWVUDgsMxbu5/T32jINm1\r\nHcu+4kbc5si5j4gSh1pcNK1Ly7j1zdsoWk20VKGLeKjie8YPWi1gyBl82KWi\r\nXyDpIuDswrrP46RVf4oZIaCOeJBl13Or4vM1VcGPt9BjaIwXRFfAnGGbo+5P\r\nEXBLesmPrzFH1B3JSTSHkIhrR/LqRCI40USbRxwcL8NQewfZVTOiEKmEvGCX\r\nTo+LaezyeYR5z0x0sUiSsiA6IIYH5ccIFWkG9+AM3+VExWAAqJ6g5i/WPMAd\r\ntCh9spXGZBLClrXOWOF8nDRFjmMMpoP5WK09+yDrpCEIfqOnDXhzZba1XUKT\r\nAaxPLwIVMoz4g9XbutMUGGvJkj4K5Y8dclUE+O406l0eqKlbkwckUcHTVujE\r\nGQtk6h5cc47t7a0/10kb8BOg1XCjTqq0MdEXx6fyB2IgJxrTmcviaB84JauG\r\niH42Oh+OU9P+M5kddUcWWLZYixhEAZ2YAYU=\r\n=/Lus\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e61875274f0898d25c459c728ea2e3343b4c7200-18.x/balena-jellyfish-client-sdk-13.0.121.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e61875274f0898d25c459c728ea2e3343b4c7200-18.x/balena-jellyfish-client-sdk-13.0.121.tgz","_integrity":"sha512-nLm9W4ewzHB5iQRhIjWgSHqgRnjUEWAWDkiUXpWQMx6pj5IKatck2+DF4C7IPLCUbBRalRCX+bhJoQ6obex8LQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-02T23:05:03.457Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.115","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.121-renovate-autumndb-22-x-e61875274f0898d25c459c728ea2e3343b4c7200_1664752003797_0.08026386560853904","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.121":{"name":"@balena/jellyfish-client-sdk","version":"13.0.121","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.121","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9ae8f38600cb0aee5c0e7420d7c87772207a6441","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.121.tgz","fileCount":30,"integrity":"sha512-S6BIadSMNUbLof+AOzTC34e1UKhIUC6WJjjxXrBqaX5BQXSKvD1BWPTY7sEn7NVsBaONp8Oz++oAfRtuzOyVHQ==","signatures":[{"sig":"MEUCIDdgbhRGQhmxXWDrgpjB8TZgyn5sFK9gL5OxOLO5yLAqAiEA9mlK30ZAb/A2+5CsKYaQpuVpnADwg5sU3ADSUv55fkA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOhoPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhMA//Rvt8NOwRi77x1JZoiwBC02DXe7qsbAmyj1g9p07f2BaNN87t\r\nbD/gG1DAGU3X1KM1SWUOa9t/JgZBYVz5jacn1jOoXK7NnVJDtgFMcUCgVw/E\r\nzui1J+i0FH8vrPzr43cxa5hut7VbRbmxj3WDM7zTaHK9QgOAdTUB0DFdLP6h\r\nqRuVWeTY4h/LqidiCwzzVe+cqk7JDi5stib6wI/lknnTWxL7v0kgoUq8KTMK\r\nPWrOERup4wCvNBhNrVR/UYx8FjdScKQYmedXTsPZaFlz/DCm1iX8guI/L+QB\r\nIuqpgbO3uILaMqQe2vJl1pUmsnpdRZoMqCMNhPuJITfn4Ho+3Q15adXtgpDT\r\nfvyMF06K/EGd2rwJzAnYSFwbj+QryJr9LLmiuSJbGSCQ4eOOUeYVw8qlhL3L\r\nLpOlZJIlQpaM7fXMPX979kwO7HzkEKnHS/S7yffqE3xL7dzKFzuNIWtWe91i\r\nf0G+Rh8msc86NiuXOg3+C9P2dkxqc0/btJdvssBuHzgF8Gpt/2B8FBB/T3UR\r\n0GgmzAv5kWVQIY7mVHDW73eGDh//IaPLVFkUVpQdpUsz6dLQe8lJeWvtt9tm\r\nLClfRQ9+4pzLUVqwJEy2qxog31W20jUgDoStwSXf8Rbd+vLfDZhElGUSyP5Z\r\nQgrfSAPZ1avvebLoBDmGchiGj94+U+/ZUHk=\r\n=Kial\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e61875274f0898d25c459c728ea2e3343b4c7200-18.x/balena-jellyfish-client-sdk-13.0.121.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e61875274f0898d25c459c728ea2e3343b4c7200-18.x/balena-jellyfish-client-sdk-13.0.121.tgz","_integrity":"sha512-S6BIadSMNUbLof+AOzTC34e1UKhIUC6WJjjxXrBqaX5BQXSKvD1BWPTY7sEn7NVsBaONp8Oz++oAfRtuzOyVHQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-02T23:05:03.457Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.115","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.121_1664752143214_0.1504776561011547","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.122-joshbwlng-move-tests-edd0183db8517a958f3c7f482f7d6404e8428dfc":{"name":"@balena/jellyfish-client-sdk","version":"13.0.122-joshbwlng-move-tests-edd0183db8517a958f3c7f482f7d6404e8428dfc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.122-joshbwlng-move-tests-edd0183db8517a958f3c7f482f7d6404e8428dfc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"10552b05ba798a5d118e9357ab7332dfb8546380","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.122-joshbwlng-move-tests-edd0183db8517a958f3c7f482f7d6404e8428dfc.tgz","fileCount":32,"integrity":"sha512-bDIvOmQnG2Y1fLbyYfBSNqk/YJJuCL4XDhyLU1wizJbJjYLQHyk3bo9+SqUlVcKqSEa8ukeeu1bU2xfAj5nbtg==","signatures":[{"sig":"MEUCIH60gmlzYv9BY+up+CYtrSycQw6NclbNwYqh4PptMUDEAiEA3xG0fb/CMK4/nRn3ZiL6A2D3WuhuCKNr0OsYyBgQXnk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOu2MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrDkBAAnfExky4xn6BbaGp7r4XyyiwFNBa0cpQSpCAXZNWzjWF3udUc\r\ndwa/tFe4/E3LLCUrg3EYyKMXH5xTMrwWRqGLKjKc8aNzr9KqdQ8TV6PGp6nz\r\nuNGQ9d2uE5h7fv9HTuL8TozYmsJe+cYdJYqdLoBSSbiN9UlIXDVh8DmKb1QQ\r\nLe8Le0WQgK4nPL2AYHmEUu+1RlU4dBC4BS4Zj8xiW7HwR7GvCaTlg1M3qXgY\r\nu4fbmly6E8CPrYAO/8+J0NRf1+f7Q2TWP0v7Dvr4X3d7VrtfCS302sm37yxu\r\n1k9NouHvb2poSUC/vQZy1OaFA8fx5BBJ4EXNVA4LHxUEto0+F7FRBEAWz8RH\r\nK2je5x3JOCJ6uoQ3d7a1ku8ObqQqj4G1Y3wvw3QrR+Adrl/lDqTc4pGNsIr6\r\nBQbDn4V/MoEPGiHZFCFjuUeZpJEL7wPW6/B44OuF6nAtP8t+CCawQBAt7qvf\r\ngr9dC7eYEBUN3HLl8+B4LlwFabbWamCjsnZqymlxZ6KYBKxypwyjZ5LcLZY8\r\n3/JY4D7cZiO6uCMjGQq1KljX0IM0IRmCzU8qQhTJ85Z+sT+Y/IAYyAHBy0ou\r\nW1fzyg0AmzjqOxS7x9QkmGbayVv9PzIPdZgD7tecIPPUbwgYtbe9esLa8LpD\r\nhNHBqjssXRZX4h1cAJLWafbuhfOy9d1F0Z0=\r\n=8GlX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-edd0183db8517a958f3c7f482f7d6404e8428dfc-18.x/balena-jellyfish-client-sdk-13.0.122.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-edd0183db8517a958f3c7f482f7d6404e8428dfc-18.x/balena-jellyfish-client-sdk-13.0.122.tgz","_integrity":"sha512-bDIvOmQnG2Y1fLbyYfBSNqk/YJJuCL4XDhyLU1wizJbJjYLQHyk3bo9+SqUlVcKqSEa8ukeeu1bU2xfAj5nbtg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-03T14:09:33.390Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.115","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.122-joshbwlng-move-tests-edd0183db8517a958f3c7f482f7d6404e8428dfc_1664806284167_0.18221997557520186","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.122":{"name":"@balena/jellyfish-client-sdk","version":"13.0.122","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.122","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9906f54778a6bc8b51367163199bf6dd1a68e5e9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.122.tgz","fileCount":30,"integrity":"sha512-XTyMCpCIe+sYdYw1YNdM3Vb05D96Xx5Ri3ONQ9IxD5tZKKqqtsgDREg+MVC6Rfxs24XAtKivuaMYB+O7PHwVjA==","signatures":[{"sig":"MEUCIQCsIRjWBRehALMWy6fUvg5E3mMO5EXjM0iZy3IOXVt2ZgIgDnzBIYDOKWPkmAhxL6FzDc26b8iFTvcutQz+aXxkYUk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOu4oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKEA/5ASjocIl7cnb4pTbk3fk9gvtbHF/Jysbk7bpXiCFSf3lElJhC\r\n8YlHJUysyzYfcxYWEtk1h0YgEPkKZ7IYPfisXdlFKlAdjNNsgsaIpn9Owc/t\r\nQgkPVNjcxLo2k7+d6rfE2lCycvTnZLYCAQ+wk/TZfMS4cPOBZAt0wH7Z+7tC\r\nvS47Ar9G91E+MfdkD1xY8noUL0Z/B6PvgW2F6h8xwqhnsNeHzSvbX0TQNUYZ\r\n4NNX6cFQXVUEqdmAChxurxF4YW1GoxzLXrW4UVNqgSOr9XlX8tZHPRZf6HYG\r\n3oQ2H/iJBx6E0kJjHhHveKcZ16NCIiCm+WNxfrasTKnkIUKvrYLibPNnRzJU\r\nCBHsZRWgrcSE78LjOgLFPCCCrC2zvMoJY0UHuUYEnDdwubY6GhNHtRTT4xPF\r\nos1uWX3c5RW2Oly0BYIz9Gjh2iWFbC5on3tR5OLju24PMFkhAV71/yYh4mJS\r\nRmLvMP5LHcqNGHT2fD063A5xMB2fMIZGD5e92+pgqt0388pYb4Bk6v98ggZv\r\nSh0yv0T2CH/WSCQqaU9R1HqZJHiXEd/n4xXBUoTyIw8Jr6lbUFUBSiRyzGaY\r\np/pZJhgAUmXpK84wJPHz7+S8xP9Yyckd7RqJa9N4lJRSvoULJHG2fxMydbNM\r\nr/lLE27sH9ZONwpTQm3muH8pdsoY4iTadtE=\r\n=2k/3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-edd0183db8517a958f3c7f482f7d6404e8428dfc-18.x/balena-jellyfish-client-sdk-13.0.122.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-edd0183db8517a958f3c7f482f7d6404e8428dfc-18.x/balena-jellyfish-client-sdk-13.0.122.tgz","_integrity":"sha512-XTyMCpCIe+sYdYw1YNdM3Vb05D96Xx5Ri3ONQ9IxD5tZKKqqtsgDREg+MVC6Rfxs24XAtKivuaMYB+O7PHwVjA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-03T14:09:33.390Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.115","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.122_1664806440730_0.3701310779941629","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.123-renovate-autumndb-22-x-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f":{"name":"@balena/jellyfish-client-sdk","version":"13.0.123-renovate-autumndb-22-x-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.123-renovate-autumndb-22-x-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"35a84181c8c822e8703ddf3003406149581db4bd","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.123-renovate-autumndb-22-x-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f.tgz","fileCount":32,"integrity":"sha512-mn/uomGVMQ8luVOwGLsk8USmnFsUQRG4gm/WH1brHBj0M4B7hE5bNL2PH7UzY+aMGd58qeeez4FjRb3p+3KOaA==","signatures":[{"sig":"MEQCIAEN+KvqwlayWDiNX7AA6utEpNNU3StQjzYX/ltswmaAAiArNQW6Hw0ER7Hd4zbl8lFVIQ9nv7IsvsLq7R6S+GddDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOu7fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrziA//eiGTTILVQkKk5jp3QVxLaVaxgNlQxph/KDsJTUO8moKtQ1te\r\nkQzwUejfSr9t9lsiBZb9iSUFI4V8s0avYZUK+F86iE7P5Hy0Sjtv6NAij5Ii\r\nznwdV6Tyrq35Xri+fGmZF8QxzeD1C3CceJ7GjceUchVg1a6WyW3RdCdzO1Ev\r\nSgK8UCgQFuXGkb0wln/I3wwQnBsm3HQKmdQoe170r6aI8EYrhP+iFlol+q7u\r\no+IKukUaZpMNkcSRowq1/YWKDXCw3HmOrRAsbaM1xUV/RYs4K6eGkuwYV/dJ\r\nV5mPk2yAXyYHAPegofRWKuxdtgEqL0iUpkHi6tZ1mrrY113C6eH9KniKJScg\r\nlYUghZbfn4fCcvY0E3QzSLrKnHRQPDcP3iAoVhVD27bH4XUrDBgysM/+A6eB\r\na1DLDiaC/JjyZuRcZ2B+CPShcW+puwAPRKjg2AV2bSIG8lulFdflDt3q9jyE\r\nffIY4wsEI7SSaVITfRsK39aTZUIgLXq3v5tGR7SWXfvryuyzOM8VqjSI+og+\r\nG3xLYveS5INif6lusDuzatP4IrFQkdsh2kMGELD71iw1a+lGjdPMHPfwc/Qt\r\nfsBexxKh0oZkuEZFiMtsQxXavIRoI1b0Fbw23ef+uxEfVnAlrIiAuQwf6oJA\r\nSDrZPBGZZz9MxbapSGW6dZw499WKpp6K88o=\r\n=8TTC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f-18.x/balena-jellyfish-client-sdk-13.0.123.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f-18.x/balena-jellyfish-client-sdk-13.0.123.tgz","_integrity":"sha512-mn/uomGVMQ8luVOwGLsk8USmnFsUQRG4gm/WH1brHBj0M4B7hE5bNL2PH7UzY+aMGd58qeeez4FjRb3p+3KOaA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-03T14:15:28.361Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.117","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.123-renovate-autumndb-22-x-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f_1664806623438_0.42417985449404605","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.123":{"name":"@balena/jellyfish-client-sdk","version":"13.0.123","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.123","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aa7ce6c3b44767f4797256ab9f822cbc3687dea8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.123.tgz","fileCount":30,"integrity":"sha512-Vblf/V9xn0V9RL9ShN2b3ycRmAfOxvrnDsiXuUQyGs7lKh8eb/vDhtfoGMtUk26OAwayWyPsVTegsyuxFFEkKw==","signatures":[{"sig":"MEQCIEd8doH7Eeh3Ixe34yAMDAbLAVa1RU4NAsXdf5HM3ANeAiBJv9G2sUhYtXYghP3Ia6WYjO4xBmS7fz9sHe4s36Pctw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOu+AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBpA/+MfhxIc5w8cBOa9vh1ucMHtpr/RalKyhKGrUY29Si2Ckm2D3O\r\nPVqDS2u59WjiSwRzJbup3dMgMKMBnpZkKSZPyRxTmm5P/UYex+9KJdtED+sS\r\nVSifHYOwSPFQr1zVvBnRtthwfp+NM9ZJVsjfFB+rOtvSemWGkg0Wk1Bnh1h4\r\nIVfMzqr03Ix6h3ZOP1kQShS4uZSpsDmhv0NCjuwkCzs/6sfx0J/V4kEZ3RXh\r\nHWlcdgzcTV8hjWdQPsny+5f2H45cTmpGF3h8po0RFFjmOwafqDE5Jmjxdiho\r\nos/kqbX7eziZYPfPMx0Nu6WQtJw6hA48lDMfhfQ+OdnerOZlkcQDTrFq0VPA\r\nwUVEopjxIeaz5wZj5PwfxuMc0POEKuz3lg0YKIJ6OZXP1xuzzPAg0PhImH5Y\r\nvw9dL4o+6W7JufYeoB3eDs4qwl0YWtGtnj0dsr4nmtqSyx8V0Uj1suF3JFDH\r\noXpgFexRE+P3gt8UxFDXYQcW422SuykO+5+Y7d/ZAUdNMcIhlgVCn9n8rFtn\r\nV5yRwd9pnAzCsfMU19rP6R1OYIKsoKXjuf9zNd27e9N6kyhc8FjDJPsfHZ+g\r\nATHIBnojfmvLbR9cLUJfHQujQTjclVhsB30xQHSYqTGldt4w/0/mZSHkyeMA\r\nbUFR2rcbyCfPWHl/E5k7wK+YSq/8fuYmJMs=\r\n=VLnn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f-18.x/balena-jellyfish-client-sdk-13.0.123.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f-18.x/balena-jellyfish-client-sdk-13.0.123.tgz","_integrity":"sha512-Vblf/V9xn0V9RL9ShN2b3ycRmAfOxvrnDsiXuUQyGs7lKh8eb/vDhtfoGMtUk26OAwayWyPsVTegsyuxFFEkKw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-03T14:15:28.361Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.117","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.123_1664806784056_0.9632618385602147","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.124-renovate-autumndb-22-x-6c022a9f5f2c7394da475ce67bbf4af3cf789c84":{"name":"@balena/jellyfish-client-sdk","version":"13.0.124-renovate-autumndb-22-x-6c022a9f5f2c7394da475ce67bbf4af3cf789c84","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.124-renovate-autumndb-22-x-6c022a9f5f2c7394da475ce67bbf4af3cf789c84","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f1100bf8b5d807c8383b7dae9d928b93be666abb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.124-renovate-autumndb-22-x-6c022a9f5f2c7394da475ce67bbf4af3cf789c84.tgz","fileCount":32,"integrity":"sha512-hgFLkqlMZqXwcKA1+MdalIswrAFPN4GYlUnE0Eqpo94LjG0BwraHFPT1F3VcsrAMZ68iRw2kP5n2lyV+uWJgaA==","signatures":[{"sig":"MEQCIHIsRk2w1jaQa7eXiryG2Q0SDmlmi8kThvyiSTjMPzsiAiBw4Tc7FuuyP3TT+ySReD4hOv7G7VqvLqeSrax5VMVH9w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOy78ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9/w/+NwTzC2yY1gTaNgMHwqfl9N1HFWBAw1LzOmD8GWiMsBjdp3ra\r\n3hK+QnHaS4hJZDwYLcgYymKl2w0EaP47NeyvzfPFzxLRfqnjl/UeDJGoxywU\r\n+fl2mYhMaPg7r+BnTcdHsP0edzxPEqnug13Jp0CHpt6fqSPcNi/n0pHdFOM0\r\nIPmyUUQ3q2ZsT+tfMnraMeByFhSGrxCm9BRwTIi6NOdkqW/OIwxvxdsOx5q9\r\n/6CdW9Z2iAqM1czMxFtbFRjoNJxzhGCTFRowqIxPm6Vvqo7r3kNkkm5vIHbM\r\n8V6cOe8FlzUvZw5tyC7DgGwtWG0AJgFo943nWFin2Kr+QjTNCW7xpvRawjkW\r\n5zy1ojMl+v0QrLF2zrZa1GWF1azD5moTfGOE3eSmzUhbWX/UFFiv7dYRK08W\r\n3uYxW96EhL+Gs+KEn1OoSCQI2P6eVYjqaQQfsSh+kNhUP7zLz2K+o9MjNVEu\r\ndlfVCb/iXkVY8Z6lGWlOgSRS3jzShweKas6WbBZ6PdjcgDG8sGfOEO9/0RhN\r\nfIxf92aLKkppROfHnbT+zrWyQ+b+5S3sFzfCooUPvk3ym8QxpOxKIkfYseJq\r\nnqeMNGlY5KjMjnTMwTOsFmmzWMUj3ba/mHLDF+z73Qy8H31lr8ccb+9RZT93\r\npQYpPx+Z7wnyyELIiDsX3gXoOYPtMPF5aPk=\r\n=ppqR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-6c022a9f5f2c7394da475ce67bbf4af3cf789c84-18.x/balena-jellyfish-client-sdk-13.0.124.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-6c022a9f5f2c7394da475ce67bbf4af3cf789c84-18.x/balena-jellyfish-client-sdk-13.0.124.tgz","_integrity":"sha512-hgFLkqlMZqXwcKA1+MdalIswrAFPN4GYlUnE0Eqpo94LjG0BwraHFPT1F3VcsrAMZ68iRw2kP5n2lyV+uWJgaA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-03T18:49:05.849Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.119","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.124-renovate-autumndb-22-x-6c022a9f5f2c7394da475ce67bbf4af3cf789c84_1664823035788_0.3451620831788693","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.124":{"name":"@balena/jellyfish-client-sdk","version":"13.0.124","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.124","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ed9550ff18c00a84d7c996ffa4fde260354df467","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.124.tgz","fileCount":30,"integrity":"sha512-noHWsP7GYOPIPjW5A8El6GPcBPbiiCnwzq4oZ+IWN7UsE6aJWXVhYji4VTl36enzSN7BpzfGMoWanBKv07TgKA==","signatures":[{"sig":"MEYCIQDL4lBwqeA7W6UKXvYQ1BvQitgmpmuJWWVD5nwa4icaRQIhAPDp6Hnzbh1gazIF4AgyJy9vFVaKWfajtxms3f0nM1Zu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOy+EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryRA//VwOjf5DMTjIHZTGc0tZH0p2BDHQMP9wS8P4oKqDIXiMMHaPF\r\nc0WTNoujA4310NgCRDkIjavkTwwMuJoEPCaFsDCleCvvktFgtrsw3PVcb1aX\r\n88hzPwZUV3Ifm8kNmZteJyQcEsZ50n1uzH0FAhVTj8tsJr+GEXPg/uy+AHjg\r\nls7L39vN+hN7DPlV+HYQ3hU1LCnzb96vx7hyjQcj7F4+nQtsglak5SbWDSCo\r\n+3hZl3KzHZfyPWq3llXv/cvUADXfSDAswykVCFpzy39ZZHpfaSZaJcmG8snJ\r\nopc+eMaokOhfm1JxxOS6NlVDl9MVcsVLWgsWdllTjQQOpMxr0xr/m3b2BfQx\r\nBFS2Fvu1xGAkvTc2K2J7yU6NhKhTtGL164OQsGV/YEz4HaYeXDJq3FT13vg5\r\nr88IRJ6vHsld5jZt8pP1nY2bNb2MgdFH0yrKh3fzSnF932Rtlk/cKDUSC0zt\r\nYNmp3BB7p62EEfepS3AstyelTURS2kT5NStVgoqaPS+L0afOuCkmqeNwGO/D\r\ncykkX5/plV1Bs1WOJtLJdYXJi4k9NKajskTjDzsOxh/CCk6eZAKKXJAe5o7F\r\nf8t5mR6uSuENlq9Zt//IHqBYgN/4BWfjUo0ugUaiUFFYjxIk3YIqyMh5eOXB\r\nOnfN9uqx8vyZhWFO/LeQihxp/dXfehnWe/M=\r\n=uG02\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-6c022a9f5f2c7394da475ce67bbf4af3cf789c84-18.x/balena-jellyfish-client-sdk-13.0.124.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-6c022a9f5f2c7394da475ce67bbf4af3cf789c84-18.x/balena-jellyfish-client-sdk-13.0.124.tgz","_integrity":"sha512-noHWsP7GYOPIPjW5A8El6GPcBPbiiCnwzq4oZ+IWN7UsE6aJWXVhYji4VTl36enzSN7BpzfGMoWanBKv07TgKA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-03T18:49:05.849Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.119","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.124_1664823172548_0.39941365697876163","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.125-renovate-autumndb-22-x-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d":{"name":"@balena/jellyfish-client-sdk","version":"13.0.125-renovate-autumndb-22-x-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.125-renovate-autumndb-22-x-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9240154132491d71d883389209750fdb65dad76c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.125-renovate-autumndb-22-x-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d.tgz","fileCount":32,"integrity":"sha512-BPYmvHjlq9yKXCc2RILCRYrNCcv6ybHkYxGuOdmIOQ//MRFwyT2CxrIDepmvn5lyll58iuo8dmT6HLmILLcboQ==","signatures":[{"sig":"MEUCIHD7Uk5B6wk+C0un41h+aaq7nZHOMijPFcEmxod1hI+tAiEAttc1EFJH3RbUvB2n3VUsuRaT3Q+DcduHZpcTU4tONJs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjO8ltACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4Nw/9ELLrsNATkzSPlO/PSsbP+bmnTeSPL6dj5M09sRh+jZK9HHC/\r\n6KolyiHLHHQqbH6xHFXcnBMHS0S/aYsnlZtNRFQ0LZXCUiiiijssBmeOqZG+\r\n0YsjB4gNRXDVOtrm3sU2C+CBukNGTXf+FztGfClCsM9ZtgAQSENxj9HRQtN8\r\n/WKGjud9Xwom/qt4U+BkvOp/yDVQTeVfkgp/IzV5PzGFZ/y5qsSvXS2h1Nil\r\n0l9wANoCU+SH5hByOEjDeOL/y7VrSTLkk+ZlA4TWZTbydW/yaTXdvtd26/B+\r\nXviK72R6CHSLaMb4653qekOl//KuXt1m2d4I1wOn40bWHtGe/JvcztPH3vjM\r\nbJ2zaQrYohdMW3CckyrPiBe9EyKpDHmEQBg7RUqzle28V0ItohBTY+UNl9zk\r\nqNMUb/q3FMpRePoUL9seG6Rfm5DwcUbmWqDZccCw1fc3VE4ceeKUguLybV1k\r\nrKv5cFapaRLOUIkuSQ5vbxaRaNYeqFs3p88OCb1eWUvoOZcatgcTxMrgExRV\r\nwn8wN3/5oeQTuEuh5u2QA7N2NUoZRTdr34DDcP3xOU+9hDCfB8h9r/TStXqE\r\nklL4Os14b+cTlRQ1oflH+RLSXFb1ke0dZj06lyhaA6xaz7dy8At5I616DB4k\r\n4Q+aRTbyvBs3dMKRgqJSF3ZcPqE6Tua1K0k=\r\n=Teu9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d-18.x/balena-jellyfish-client-sdk-13.0.125.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d-18.x/balena-jellyfish-client-sdk-13.0.125.tgz","_integrity":"sha512-BPYmvHjlq9yKXCc2RILCRYrNCcv6ybHkYxGuOdmIOQ//MRFwyT2CxrIDepmvn5lyll58iuo8dmT6HLmILLcboQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-04T05:47:53.686Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.121","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.125-renovate-autumndb-22-x-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d_1664862573351_0.852830225706906","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.125":{"name":"@balena/jellyfish-client-sdk","version":"13.0.125","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.125","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"af305c89c3a5c70ca19ed1b92c068c15c1d81970","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.125.tgz","fileCount":30,"integrity":"sha512-rxRCQRYq4dELzsOfEmShTNiLbXejUk1kv0Ezpkhl2DvPByhZZ1UCBIi5YpMTIpUhJevUqJQdVUfIUGONCwpyiQ==","signatures":[{"sig":"MEUCIAnMu9fkuiDDNWJJwh7O0NmR0+74zHLXrT/o30toJDiPAiEAwIX1Zz/jzqHHvPHSDy32H7LTTYYzNKqYlXxGbK4t+RM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjO8n6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0GQ/+NY/U3cXlVUx+qPYYTBBzbNFXYdm375ooqP5iATeDhxS0iT1V\r\n3uZ3xFFYXItvJK1rUjLa29PDIsjcNt7Fn2imr16wD4gsnH/Q+9ge8hYhrDYM\r\n7HtleMOLK3idnAtV216Tlb6dYwgi9gCrMcrgGqLvACKfwiLiKcq5cYoBjMs3\r\nr0V1Znf38IoZAJSOpMA7bZBdMvcXwweW+feU6h0zezAkr+lAKAsxObwqvNLb\r\nayX4h7Gu9/lrGMDlF8f1TTvS0ipDw8lvM7C5FlvNIhDyvj12jxmySNGkRoSF\r\noYM3Gwyz6Xqowi5GK4KSw2KUcc48X/23nEhumtrY5MzEVsm04l7aNIK4BVHs\r\nGu3YGM8tPwym3pRWp75C8l4p/EbcnLt7I2VB60V9Mb8V8w0ST1IpaFMF7FGj\r\n27mjAF48PrYlzQhF0lQck3rM6Xt5wJx11OE30seHoFexIFWa6lgeAGy7ixFn\r\n1dVUZT7DYaACczYOW8mUkIowPczpv059SQaE6ArfTnj1QLn9bpMKZo/CNYou\r\n/QEO0xAMMcBMDZH3j056GgGSj2pvnW6Or2KRWo2lFpEpQvJZqAWuVPWLfGEV\r\nXZJytPhSFQfvjv0vpLXy4PgvXdvYzGryjk89O/dm2AbRwsZXHOjcKtOmhCFX\r\nqd7QOUFgwtU/fao9V+xC1YSFjbNQYpCE98M=\r\n=eR0L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d-18.x/balena-jellyfish-client-sdk-13.0.125.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d-18.x/balena-jellyfish-client-sdk-13.0.125.tgz","_integrity":"sha512-rxRCQRYq4dELzsOfEmShTNiLbXejUk1kv0Ezpkhl2DvPByhZZ1UCBIi5YpMTIpUhJevUqJQdVUfIUGONCwpyiQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-04T05:47:53.686Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.121","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.125_1664862714489_0.7312758416426524","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.126-renovate-autumndb-22-x-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d":{"name":"@balena/jellyfish-client-sdk","version":"13.0.126-renovate-autumndb-22-x-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.126-renovate-autumndb-22-x-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7d0a5abab9a9fdbf50728c8e9544c0187e307925","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.126-renovate-autumndb-22-x-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d.tgz","fileCount":32,"integrity":"sha512-2SnBmSQkNtoHEn+dyzj6Qfnw5R0LBfQrNsAWI7XXTujTF54bjAa9nLfwUaR297o1XURKGcjjII62dGyiPgcL/g==","signatures":[{"sig":"MEUCIQCUuyHatdnqlxuDbP15FZANJAowmGPSn9hG0ipiSDfvcgIgCucmXEby2Bf+bciNHWfAKxEaNlgt2Xj7HZZI5/momCw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjO/vQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXqg//W3kmTUo8+LyYDZ2cLhvDp2RzGWnzQq+uWmXDHxGpMy4AM8R6\r\nYHRsfCOTIle228vrUEI13mLFPENqfuGjTDap6kgfyXT9H0UdySyAJXSjXh7k\r\nutiQdnY4CfnbnfK1M90zpr++X245gF/qNkt1Gw/4AYwa1nzIUzekCGVbj/JW\r\nUPNG0h+dVsu7k6xwvl+eDI6ZH0tiInPBDIuCx9j/whK8gqd7JYFZWLEH6Ha0\r\nuX72Q+Pr+TXHcwyu1xjgKBv6xX2ZG4gYWntoFPcrl10BFojLHPovGDpepg4T\r\nKETvZFokgrr5EcukCJv87XGPOyWq6HNbt7LVTERffrQTMKrLZCv2Yzmr/q55\r\nLaDvZnhPKDKoZTGkS2JvBJzxR2J87bN6tEg2++g1eQSxVNqpvcfYXcDVCbSS\r\noGtpRB9JnJhjw+UQZ/oG+Gr3TaIBekOs4DBJaXYAH2F6pXG5Ro++lsfsP7l9\r\npdjcLKOui8FAL5sL3o8Hd91Ae5t3JHa2CvUPMop4prQWwLi9buJAN9MUMbod\r\n5sKNhFdXcbhyGYFk81s2ju9Ws8VeKfXKptqUuP8rIVjbwX+pfObkiho04+FU\r\nePPySchxdKGDtgla3ybsKlYM3TvqeQ+ECnoKMrk2uV+OWqwVVhpCt8GeKnkM\r\nsNDdrnnDBvcPhWqBlrxcARAnut31U2s6htY=\r\n=9JnB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d-18.x/balena-jellyfish-client-sdk-13.0.126.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d-18.x/balena-jellyfish-client-sdk-13.0.126.tgz","_integrity":"sha512-2SnBmSQkNtoHEn+dyzj6Qfnw5R0LBfQrNsAWI7XXTujTF54bjAa9nLfwUaR297o1XURKGcjjII62dGyiPgcL/g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-04T09:22:48.502Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.122","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.126-renovate-autumndb-22-x-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d_1664875472310_0.3231529555760364","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.126":{"name":"@balena/jellyfish-client-sdk","version":"13.0.126","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.126","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d0d32f12417e717c126daa9a69c38d123ed86746","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.126.tgz","fileCount":30,"integrity":"sha512-xqoO8mmcbA1zlzM7rXYO0ACx9bKlyPTKNG34EeMmTNSD5fOjb/zmjw6M5gNXrKq8oJodEFTAHktYQ7LifsST4A==","signatures":[{"sig":"MEUCIDCKLf0xz0F8SwjXeFrLuJy4IJtkWTaLCm+LWWXAX4XoAiEAhFi2XZe3Q/iMVsJTymyMuq6WDnWSNUy98Jc5wKPUQeA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjO/xXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmobag/+NePu79riUiBf7o6pQrIqewSzH2P+VGIj0hT8rhwB0Z/Qfmaj\r\nFmozZ2UNXVfiTgYJEtAeoBGEyHI23kZLfhVC2l22NluOu0quandnCAA74T3R\r\nEvnDKA97gEdKttbCmblUcLD6lnSoMDHOqX3FqhLc7rr/8baXg+B2cGSXd6AV\r\nBYnOVT0OF6Z+eky9gLne1bUuAViBNbFUANeBYbv9zzT6FCSvG4AO/YmM5QCz\r\nli873KJ9LP0ZtNMzm3Jz7sGlySlMQxLqFCcohfkAAr7C7xcheadkefjttVdU\r\nLfBdKsRR5xIDhvpm5dUOOwQhpFEHdaJr/DmbEP+7J0m5PK13Vhv3FqGD0Zi1\r\nSwkrLRJMKkaXVArShKQrOX6n20Zu0JFu/e/ldrANga5rMvDnZX6GyOXX7MOg\r\nmyq8KCofPGRQZ6e2AExDh1/6mH1/+W8GRYX/ODATDKCnhYZJoZR5Yhk84Ywv\r\nepEi39xOPlyPDEt7Zz/w+ApFq6pRCAm1mTpU3mgUm7RVr30Ye9bX02UVmZXs\r\ncKT8791+nBj5a0EE7yknlhrou954m2bYVdvo940MY0g4o63/ECXBy9w6i+v8\r\nAE8PvJTStKfMNqxWChW5ugYdPFhTmgl6XA5u4igZcmnCnJCsBYwgYCGDtBWv\r\nLmrS5CJRGlU5f9v3hAXseL5UnpJByilMBmQ=\r\n=445g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d-18.x/balena-jellyfish-client-sdk-13.0.126.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d-18.x/balena-jellyfish-client-sdk-13.0.126.tgz","_integrity":"sha512-xqoO8mmcbA1zlzM7rXYO0ACx9bKlyPTKNG34EeMmTNSD5fOjb/zmjw6M5gNXrKq8oJodEFTAHktYQ7LifsST4A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-04T09:22:48.502Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.122","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.126_1664875607371_0.7823381085204937","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.127-renovate-autumndb-22-x-39f52293feb5c39218edd4cbcd616c50bafbfa33":{"name":"@balena/jellyfish-client-sdk","version":"13.0.127-renovate-autumndb-22-x-39f52293feb5c39218edd4cbcd616c50bafbfa33","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.127-renovate-autumndb-22-x-39f52293feb5c39218edd4cbcd616c50bafbfa33","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"330bd252dd39cd711eea73857e7ab450222fcad3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.127-renovate-autumndb-22-x-39f52293feb5c39218edd4cbcd616c50bafbfa33.tgz","fileCount":32,"integrity":"sha512-3DyuZ08JgphnscHM1o22jZbdBPb7m7YcfMDXZZ6SdRY2fIcQWUCtBBhB5L8Cr+wYt7c930BpeBHf1OnW9xb7Vg==","signatures":[{"sig":"MEUCIH2zA3TYOzyNClkPOJLm9vp4P8qBOytpZZScs3Ghq6xlAiEA1WM27ZHOYVD7FrmpbeDTvJSH81WHxTjh7qha5kzpVK4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPmV9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTPA/+ImmiNM+Jmn0wY1owmjdh/n4HRsd8N2A+XihQnGJ1N0IH/5Zv\r\nnU2s2g1wKMhOardA+LhRAFv1C2CiUA5RdyHmxTaDxLA2xrBvNPViB1Fb5Ame\r\nfq0ZQKcmFp84TupidL0YiP6qRTxHBFZD+GqsWOOzaPFec37/7u+g7kzqtYjr\r\nf/hLPK4wH4n07DvRrydAc/hcZZuQHtK5PS7cZpyVl4jUKm+7mgg+opjfDdO9\r\nW86ROSwdhL0uCvcDmFLgVLunY/oDlIT1qBfYVH0WDIjo9sPAhnNkTFOthfRf\r\ndi9DicZ1SC+smEdPPlObWgkbavzCQJmiA5uL84lJsc86rSHIbUNTsWZ3ak//\r\nCvfkX+m4HiiULt9+hU+8Q0PrmB5aHyhg12Nurmj6nNCn3/Qhsknb5ez00zhH\r\nnTRxM5vQvEM8kX3vcPB6rcygBu6WGARs6CC+VafrI2bBJWsAhJWeP3+dtlK0\r\n9gu2ddP7ux81mlwihGg201VTRREObC4MxK5R0VeNpNZ9a9peUTkZc3ZCej7A\r\neGlbT2e5EPPs8b/A3WVIJ2SpaGEaEX2JMkQfR7Z65ltvFNBHzPMolv81xe8/\r\nz2eHcIc9a/yqtRtgKLl0cvFIEnm/n/DF1IqJO/LqCKFkCdra133orSoY1Dpz\r\n12RmR4BqhpacwqoKzZTEMaXb7NWQlVMdWIU=\r\n=EGDY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-39f52293feb5c39218edd4cbcd616c50bafbfa33-18.x/balena-jellyfish-client-sdk-13.0.127.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-39f52293feb5c39218edd4cbcd616c50bafbfa33-18.x/balena-jellyfish-client-sdk-13.0.127.tgz","_integrity":"sha512-3DyuZ08JgphnscHM1o22jZbdBPb7m7YcfMDXZZ6SdRY2fIcQWUCtBBhB5L8Cr+wYt7c930BpeBHf1OnW9xb7Vg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-06T05:18:28.315Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.123","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.127-renovate-autumndb-22-x-39f52293feb5c39218edd4cbcd616c50bafbfa33_1665033597079_0.8786563449023763","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.127":{"name":"@balena/jellyfish-client-sdk","version":"13.0.127","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.127","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0be245f8840fbac5de2dd13660a76eaa6202bb4c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.127.tgz","fileCount":30,"integrity":"sha512-jbP56puIFo/yBfQ3jhkTcS5Y05UbcfKqnHwqA3goPXGh+fuX+n/XgT6FfnqLwXMtAMdORQEDpX3zXT0lKvKj2w==","signatures":[{"sig":"MEUCIQCBynZ2xE0aIN0FpnVX/7u8ljn4OiyhjyHVwQBhg0LoQwIgfa9nTzm4Lms7sFXstURKcoNBxXsrzTCfySgzchgetak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPmYYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoxiA//Xm73BptTEpGqNCaMACpXGXrP/PxglRd0ofYXxTQ0pdOozhLo\r\n4NRpTZCPA3Dlzzrxy8njA7061DPgNBFlUVbnwc8aaday3uZWJTgAeum3Ufql\r\nPHVSo+moSY0DGa0iaU/+vXN0u13teoT9uqFhXWEKKC/gtuKZu9yoDT08RwsE\r\neOW3DudlYsw4f4ygvrpZtlAc/KIE6hRs9v4nMzMEIuZYfFBE/PichBapZ6q/\r\nUdJRDzXyFLy7fVnqKZ22NVUUby+3QLGzNwEIpZ6dZreNtwZnwrJDVqudvENp\r\nseH9XtFRUAGP2Le08zkWvYrsxxpF8NXiF7J9KQXSyprIQ6MNDU6aP0vfdd+d\r\nDKwO/m9+9TWZGS3Hhcz3ZJlmH8D5vVheUoqm9GrVaEehsXP1XwgDd4mO8KP+\r\nruOKSuQyJp5O5DJAMitbq8YCvD9Iw9EBXLmaVakO3eKZKn/4P/tFtxquMTV1\r\nUt7HS06ECBVh5CUJCSWYc4I5CxZPm0S+Lyl7BSP/ooK5JsChrKJ6JR8jpVaU\r\nB+j/ZrhM0s0lHVj2uR8/8JdDI5F2HqNQg4Z9WbldNM0yI5/on1C8cwP99f43\r\nH6IoqpHgWmr7jAnXEwZgmYLJhwY0yc9TSR6wxIUiFafBC28SGN7qv0O4d3iA\r\n1nNgZaQiuTZ6zMyoRhdZ6M6eN9DxnLWRJOE=\r\n=imsL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-39f52293feb5c39218edd4cbcd616c50bafbfa33-18.x/balena-jellyfish-client-sdk-13.0.127.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-39f52293feb5c39218edd4cbcd616c50bafbfa33-18.x/balena-jellyfish-client-sdk-13.0.127.tgz","_integrity":"sha512-jbP56puIFo/yBfQ3jhkTcS5Y05UbcfKqnHwqA3goPXGh+fuX+n/XgT6FfnqLwXMtAMdORQEDpX3zXT0lKvKj2w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-06T05:18:28.315Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.123","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.127_1665033752546_0.428292017456513","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.128-renovate-autumndb-22-x-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162":{"name":"@balena/jellyfish-client-sdk","version":"13.0.128-renovate-autumndb-22-x-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.128-renovate-autumndb-22-x-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"227dd01f8214aa7465117637e58d0c259a6af05f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.128-renovate-autumndb-22-x-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162.tgz","fileCount":32,"integrity":"sha512-0Pfw/6CHqf/4nngnNzRBfjbI7330sBkuEDUdiER31H3PUVAtESYzW4zbMWRhRR1utRac/IH8qX4vxy6EgKOeKQ==","signatures":[{"sig":"MEUCIFiBMY8zJ2K501icPfp9iTydFmg6Fpu4y3vZ/H+1wmPPAiEAvHyosexQc41bvtwWcgX9Px5LbJksSZFjOSH7I60e7jA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjP8l3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmod1BAAlvYWQipNUMtgdBIOADaTTSNZ2X3kjeZD/M+no4BoBcnolfRi\r\nQqBQfm1efHZIywIOdejhUh/zDmfeS3HWAkMSh9qQi5QDBWl5GpK6qOXQb714\r\n2i7MiOk56v9pGi9dj2E7DsaQ+Hu+qNwplZZSfvpE3mfZVbVdHWeetv5KcdGx\r\neVFNhujey729UtseEPc5Rt1vU93OeddhEYRDi9VdwvYul3NrSML/t0cm/DqK\r\nxs/tj9atUwYNlIoJGSiOrcqYQbbvMffUoJinCxfpJUeGXtXHcfqWjvLXyLhK\r\nRdojLtnGQrJqr/EY/OniJ7x1LvrhH+hXbhXgir7PG/fe5BF5ofqCQvYadGCz\r\n+BBbHx+JppFYaInKIxKLVnPaSJngmAwXzXflldB9TUcjUw7BBxyBK4hHhtlk\r\nDWlqkyjidJZ+0iPnJsZyO29tKatyxRDx5NqAu2aEWZF4+b90BzsRqMGtTOhf\r\nLAo9c9lIpEBSqIiojE9888GRWkjwGlsaAFeCDx4883sNB3NPuy8FTYohuVAI\r\nZ/mUSTHYsu5uc8MKKRLEY0Be0+Ci+LTh9pZtCzXX3Mc4aleIQ5nWLb/cYpye\r\n2mZfvqFBIHwodTaahc5zwxXorTxRLHd5onTlUTsFTp/WkVpUHPNmLIRdvqux\r\nT0UL5TVxpaoIfDoBa8cxrkg+994zBtpw3aM=\r\n=xjjW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162-18.x/balena-jellyfish-client-sdk-13.0.128.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162-18.x/balena-jellyfish-client-sdk-13.0.128.tgz","_integrity":"sha512-0Pfw/6CHqf/4nngnNzRBfjbI7330sBkuEDUdiER31H3PUVAtESYzW4zbMWRhRR1utRac/IH8qX4vxy6EgKOeKQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-07T06:37:22.070Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.128-renovate-autumndb-22-x-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162_1665124726900_0.5915343962251067","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.128":{"name":"@balena/jellyfish-client-sdk","version":"13.0.128","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.128","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a9f00abc5435ebab545fafa2597540d4896f8a0c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.128.tgz","fileCount":30,"integrity":"sha512-T2MAFP6O2Lfd76c+54MoLw48PdA/jNhKGY6Sgo77oxtYtPvo9KvGOgyI2Q17qj2ch9T8HKoNjU9l1nEB7oAZ/g==","signatures":[{"sig":"MEUCIA+VeO9c3mKIK5JgkrJm//Ws5k+sWu1zxyhN/1YJ7YKIAiEAqF90IVsXBeZApqSjvfzJqQkN3KhHSJ8/b7LseBOEDNc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjP8ocACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQshAAlBV/bWGFL2N0jsgqSIPuhAU+ieRyUxdFdr4sj0LB2pp1Eun1\r\nOxhjzIOEMeh55661nZeIfzxgZmErRa9+WPsKXKGVzJAA5WiuW1Tf3wz02Cq9\r\n/IFkxEQNZJlKUcWYmOkp8D5K4jkru1VGvMDX+Bp+R5I9jTH0dSPAdA0VSKoI\r\n8tkfdGjv3x0hq56FpXOXnJSXC9cwdcaipDG026fQHhd26IA29Spt1SuTOu8P\r\nr5sFSwTSTaw6R5EBYwypdUA9ktbOaIdiJQBZ6SloJlCa8HkuraQbQmt6UxOH\r\nCQF9Cwg3Sg2lLCp9sgvqRqM2rl7atkT2t55Ryedy7c3oVJh3jy4+MM5lLwsA\r\n01a3Ns5uLSszpkH4d2xJ54uMsMSP4Gg16uji4KHMLTOI7vouJ4ni0k3KRgfG\r\ne2kMKXYiZupx8Lp4aeaGy0FYHeS4ALX5Wh8RT4c57XdnO4xxML0GCuD7qe6V\r\nRda+0KV+odoWQRyu8drRe7uwb7lp83AKXlZ5uKdCC78RmQef84lAxG9AMyfS\r\nI1ZMEJyQk7e2RCqfxQztWM3JnpzdJkI++Lh2woKdrO/LMB2gD0DuMMoZgzrx\r\n0nY1pQQTOHoYx6/26bY5bHTeKoRUjaWG488Jz2V57U5nANRagGNDz1V7tIlP\r\nd8d5Y/YVCBemQDOzRSwfSjq52UhTbiV/418=\r\n=yu3v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162-18.x/balena-jellyfish-client-sdk-13.0.128.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162-18.x/balena-jellyfish-client-sdk-13.0.128.tgz","_integrity":"sha512-T2MAFP6O2Lfd76c+54MoLw48PdA/jNhKGY6Sgo77oxtYtPvo9KvGOgyI2Q17qj2ch9T8HKoNjU9l1nEB7oAZ/g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-07T06:37:22.070Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","typescript":"^4.8.4","@types/jest":"^29.1.1","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.128_1665124891963_0.5044361210088426","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.129-renovate-jest-monorepo-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0":{"name":"@balena/jellyfish-client-sdk","version":"13.0.129-renovate-jest-monorepo-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.129-renovate-jest-monorepo-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c01771ecef523dd70af14782b08c73c0a67e5a5a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.129-renovate-jest-monorepo-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0.tgz","fileCount":32,"integrity":"sha512-paBPCDjythJ5ZG8HRl5569uB7PdxlV5/3r7aKxd262pOk7dOsrppwi10e7UGZFwAerJ9I4Kgdvc7qoKeYeqpRg==","signatures":[{"sig":"MEQCIDypjDLRyguLbAG9I7UFsVzkn3L4ThRacu2THUv8woOWAiAcnbfwwzMxQEbn3KUnHDYfvSASlBsqW7avoMZFzdJl6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQOUlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIpA/+Jd7x8bieuQsTfXLiU/q0qS+ynBTPD99XeuC6UyAreYX4XYUy\r\ndD5S53fG5xHGP2BniFJ6nphvu2L+NC4mlqqfeKh93eFzPR1XdjSMY2PE4SHm\r\n7mfWv0USENGWyg4YHA5zS98cgKfXccYrcTTi4Sz+Laoo5gssKFQ+dm0AKSev\r\nzg3NAbMB3wIVar6tlHVz9jn+A6I/bvua/ctMHuPoWD4MAlIsxgHzN7dqDlfb\r\n36/Dxtw4cQfGFZai2veKcYLMhQaJz+Cmtv+KNKk/wDebhvKvgW9oBdBO5cft\r\noyNmZP5Ydru9kPhPYA6W6D7MI23pW31E/YwGqMnj6lFvnQazs540+GHckQeG\r\n8lrTt+ctLgrrj3F6jMHizJxCD3uMM+N1nDnO99Y+hA58FQPNp9RnQaSXP/y/\r\ndlsjxwgnC4pfqmSGZJWgRiA2gbHrOxQgBEjcC3+6CWTdbJaoi7tzz4Wm28Do\r\ndi+W9jfYuqOja6pBlr3HEy4TDGX5TvD5wXe+/UQLcJd68cQOh/meVk+UJof5\r\nsGk+E6NhFkGELjuOIXr8NY7Cc97y8wMOZrWRpA70h88izn1AbCo7D7oCtR6+\r\nEqKkQf5QzmC2dSevIpC9rcVLRkCOf5422Nb8nd0mPgif6FMeSyEGPb2GPutC\r\nFHkiZM5EiVVStVNLPakkpRWuXs6KXYWY634=\r\n=pFYK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0-18.x/balena-jellyfish-client-sdk-13.0.129.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0-18.x/balena-jellyfish-client-sdk-13.0.129.tgz","_integrity":"sha512-paBPCDjythJ5ZG8HRl5569uB7PdxlV5/3r7aKxd262pOk7dOsrppwi10e7UGZFwAerJ9I4Kgdvc7qoKeYeqpRg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-08T02:47:38.652Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.129-renovate-jest-monorepo-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0_1665197348964_0.3251717392354392","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.129":{"name":"@balena/jellyfish-client-sdk","version":"13.0.129","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.129","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9eebe3b1ea77844b35a627586cb7fe01b95431e6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.129.tgz","fileCount":30,"integrity":"sha512-kfvmUzli3bL6Qy4Zs3mlEZ9Pui34z4iTVqT6DR3Qswvt2wgT70LgzDYtw3qiut5iGjUtdefvLlbUGJSY7CQG3g==","signatures":[{"sig":"MEUCICmGNue+4VH8MKxUh/yJwY3stUEGbiz3JJbQRiKGKjZAAiEAsuCdciPJHZwie47ZyqNk54Pxs/3CpRsOlplVzlOyLhs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQOW4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoo6g//c8j7GWb6nyEB2vKEb++WHjA9NIj/5tOiiHPSS8gIp1T/TM2C\r\nzfjtlbI2wFo8akvyaUQS2jhsezfGbUqs1CWjdvI1iS5UUFC+MdJ9sQChLNpJ\r\n17130RP9W038pISQH0susB78PUBLXdwNTTayWaKmt3g0oFFEm9+BONPSh98F\r\nFhuBFh9KZ6u+u16wN69Vp6Npw1r+VIef7q9GQG9+qaEgL4TNeDZ+d7y9CWcx\r\nP9Y7621FGVyVeZwX/M2X3y7CV56l+I12GrVmv7Pn0Jwb6Uma/n+Qp4/UAwJI\r\nJVBkp059zfLER7n7mLgHfEvr3PnGagWWQNfwj4xv+NWNWYUAYAEE5IH5Fh0v\r\ntYbLS0VsqL7/BW5NdSDwNSjQ57JUurGbxA5JbNEpQn4lT60osxUxzezZA13j\r\nwe+b4g9Aj2Icu2SL6XbLUhasBBGMqE3mVE/DT62Ef+tpIyR933T9fIVfVtUN\r\nztE1f4LmJdoQ3zew/34hcwEqU4UxoLCCtcXiLVi7eZJIerLCUxJxpFf96iJD\r\nZypodPVL+AHfRF0xX6bEM+ui1l4zxzfzWEcn1teQhufsPwlzhYRSyGvcWvMq\r\ny1iixqoRBF5IpVW+HL5ppGmH93jNs+7IqbMJfXrB4C4hvFUiOswlu0J1Tlze\r\nlXAUdTsBh76KQDqbPnavdlmKH4/WZIj2Wbg=\r\n=ZpXG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0-18.x/balena-jellyfish-client-sdk-13.0.129.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0-18.x/balena-jellyfish-client-sdk-13.0.129.tgz","_integrity":"sha512-kfvmUzli3bL6Qy4Zs3mlEZ9Pui34z4iTVqT6DR3Qswvt2wgT70LgzDYtw3qiut5iGjUtdefvLlbUGJSY7CQG3g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-08T02:47:38.652Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.129_1665197496524_0.5524948139298433","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.130-renovate-sinon-14-x-368029300d1a9cbbc542ecbe67975d5ff2ec76fa":{"name":"@balena/jellyfish-client-sdk","version":"13.0.130-renovate-sinon-14-x-368029300d1a9cbbc542ecbe67975d5ff2ec76fa","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.130-renovate-sinon-14-x-368029300d1a9cbbc542ecbe67975d5ff2ec76fa","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d94b2807431216ee1ba2ab808b21cd96ac198f45","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.130-renovate-sinon-14-x-368029300d1a9cbbc542ecbe67975d5ff2ec76fa.tgz","fileCount":32,"integrity":"sha512-RTy9YKJjM7bF5pO56tyDf33VNGfc9LtRiwLNd9g/luQlabm4dO+WyMbx0zb7VdQNC6c96q0nf2fHBB7rnGawPg==","signatures":[{"sig":"MEUCICXRwGHti/R61BwuvMIC2fn3j9FI8YjxTFZLl+NWWHVlAiEAjWLf9zOzTdh2W7JdKR99rXoaNOq6z1/01oQf+CGvAM4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160232,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQOaWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp67A//VnzEAIK6MrOtgPXxXeqQcUHeIjGbPQx3C2CdpdmiGEB5wWmY\r\nOoogWXyeYqzDmGk9z8MFzX2XFM1ydoL3u5tsGOy30MI9GtfBHGzi9qq+6luj\r\nDcFL9ZiwYmcsJFhAEJFvtf0woWuNwVGcBQ+JZUkEESfTEkU58oOKmQW9Hops\r\nfQffrSlDLQNDoDIAQxWQIZpBwd5Pz/EBYQGq5EDI6LJB8wFBlUQQcV0btwTC\r\n1Ot6fTZNTaVtCrwP7bLwIhS+2Q6R0H6Wz3adw/TSCK3uHn/OnjqGzbmejdjn\r\nxl2W3I1mwUqtDt8FY4Q283X97qYSjsvK6EnvVMLzyuK9g4m+fHN1wKUrE0/S\r\nC2mWS5OqdyzJQQrPCW17ClLhl62d1wl7TgUVomFPB5+o0APnHzmsfiCX1vSw\r\nIQE2pTchDkBE5Ens4a3bjUqnO7hYi0MQXM0/BljHnHm6Y1Gqj9ea4dM479AB\r\nyDLtbRyM6aaEtpVvVem0ltHQBRH66FYkOY6NjrXMDvCCyfrGjWmcOWRJ7ZJ0\r\nHIjRfOVw9i4dDg4GdORegD7AWWKBQgVTM4is5uvr3yxTo+B4I3XFd3KVxyZF\r\nrZitR8A5UJYYa9fcqhqwr5LVvVs/eKpqofwnqM0ycycmb8G2phLlNXTeZwI8\r\ndN6oSgFemxyjiUfJbJzxJtUDrlQ8q0eU1+E=\r\n=TA/R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-368029300d1a9cbbc542ecbe67975d5ff2ec76fa-18.x/balena-jellyfish-client-sdk-13.0.130.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-368029300d1a9cbbc542ecbe67975d5ff2ec76fa-18.x/balena-jellyfish-client-sdk-13.0.130.tgz","_integrity":"sha512-RTy9YKJjM7bF5pO56tyDf33VNGfc9LtRiwLNd9g/luQlabm4dO+WyMbx0zb7VdQNC6c96q0nf2fHBB7rnGawPg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-08T02:53:38.982Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.130-renovate-sinon-14-x-368029300d1a9cbbc542ecbe67975d5ff2ec76fa_1665197717978_0.9765254867036324","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.130":{"name":"@balena/jellyfish-client-sdk","version":"13.0.130","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.130","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a80d781f2db7c1556aaab259e73fa7caa477ac9d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.130.tgz","fileCount":30,"integrity":"sha512-QhBmBdkm59WrzWYnWjXb5v/w4WwyGuyHcZjw+n/m0s+OCx4vYRS3x1USh6uPuI5SwiFuf6CoKjs97ozImAVzYA==","signatures":[{"sig":"MEUCIQDq1AyCiDg9FxZZesmlL5zFNKnwzGId/rnjpG8Si2W3OQIgVnBPWLHwQ27722RI+7gzwmgRcNxgWILkryed4YBN/zw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQOczACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKXA//V/DqaGX+WByPDPwjd5eUuRpg+1EtxK9UTAnHcKI7pMO9zZ+B\r\n1yios99GgztyTyNKvph9lgm6rhRwgt3a/JvfKymflgEoDS/QGDpayzgTB3vG\r\nA5woXrtRagS9iO3dwFJB4RHQunfC/mN9ZlT029fm2YWiGnA43LrgLP5kD19e\r\nBaJ4hwHuCwpL7L90/rLdsiIwPoNXy/tKyQAnFXLaP4ZD/ne60gwt4+z3L4Pq\r\nt3n9obae6230lNsmMN9JXvWyOe8A5jgNyeNU9wQInxL4fdF2vButQdQ/ITq/\r\n7DmUOi8yPfW1kPLEpBthhamw+3WemgO762yBARmqBBrC113jtKtKHcOkRQcZ\r\nSGMnAyuxqHoHr8vSeRPtF+K/xtJYSVSUo65tLF1jJnGzWJjZ4a/gNITMSaRO\r\n9c2hbl7MGWFwJRDRXwT4smAuM057SQ+dedRKaTDgu2BH7fsiHDK4AJ4OAecb\r\nFXomPweo+hHd7czxJKJXbV6u9U12eUEswBHBzQQQbJmx01nMW3axh/Jy4cIs\r\nTjQ9r6/ULMBCdyv2uhzMHYu5UT3obKCkLXTsAj9Ur2rqQCwQYuEZLO6M0KEL\r\nezcAYZ6MS+0fcLEbyij7tZL7fbiA3INCn0LriQgRbpoSeYBJE0yQT2WKcFs1\r\nTTot0OyZFUby7pMFvCrbjBTMESK/4xJfbfQ=\r\n=+X9f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-368029300d1a9cbbc542ecbe67975d5ff2ec76fa-18.x/balena-jellyfish-client-sdk-13.0.130.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-368029300d1a9cbbc542ecbe67975d5ff2ec76fa-18.x/balena-jellyfish-client-sdk-13.0.130.tgz","_integrity":"sha512-QhBmBdkm59WrzWYnWjXb5v/w4WwyGuyHcZjw+n/m0s+OCx4vYRS3x1USh6uPuI5SwiFuf6CoKjs97ozImAVzYA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-08T02:53:38.982Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.130_1665197875671_0.8233193010220123","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.131-joshbwlng-prettier-fc6b38d89c6a40d143ef8d10402928ab13372cec":{"name":"@balena/jellyfish-client-sdk","version":"13.0.131-joshbwlng-prettier-fc6b38d89c6a40d143ef8d10402928ab13372cec","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.131-joshbwlng-prettier-fc6b38d89c6a40d143ef8d10402928ab13372cec","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"53bf6816e3bd76ce50ab7f1be6179e61ba04e554","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.131-joshbwlng-prettier-fc6b38d89c6a40d143ef8d10402928ab13372cec.tgz","fileCount":32,"integrity":"sha512-aIFSrr2RiEYXpfFntZ4gYoL4aWWYckbW+5UGGb0w0EeB7u5CI9F8YZsyzBc6NjLnFwt+D2ud3D207RYhMc8T9w==","signatures":[{"sig":"MEUCIQDlhx+QkiMJBjGAJ1D09/TbX1NRB/ftj8kaiLrFN+SZMgIgF+JDlD+O1fxTi2vcYo2XcReNfZ740PXgz52tXIH6WEk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQVQpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEjxAAoTCh3xyxedCuLl+yDRVSM1qPhOp5sFd8gHw6NzhfMzBBxxBs\r\nvOxh+zKKMEjeTioCzCxV8eiXWfFy48Mw2quyQI9TZ9yb9HMLcDrjSx2Zt95f\r\n0nIj7j1Wd1NoSSRf+2/ci3ZkRFhwuvm7HFBiWU1Cq+wWrhkYDSx+pPn95W4U\r\n0ThHxWS+6J8ZWE8TF4zZ9ryVrRxMEJi9jW8PER4ov0KaJc0TGGnJ+V0Tihmi\r\nBv3o+DG3IczsM8iOLaZYqXCkyvzUWM8wGeqj+GFPqXws8Raj1F0oQHD3JwJc\r\nCrDqCkVL+z38kPDiKVTAvgQ0wbXjimiSrH+BCCON0f+ktyvvwwXUCvW6q7OI\r\nVpqHKgQwy/R1ato61zPO8n7H5WfXr8KfkR8s8n2OXpEIY6gTeYPKlPriG5o0\r\njryfMjTg675/6TNYDus+HKv71QkOhVVlRmYp639l16XeA2qabFiHrzIsMGwJ\r\nLUPtP9meK4kQb6jj3FU5PRxL38Gd8pYi693/GXAJQ9obFRhKeQkHqEtiAKaC\r\nield+Xsx3kdXwpEA4iWwhF8dFbYpsGOiPyK6LTecC2EnzeDiXOUjYTx1DdVF\r\nUsOl77LOADd1XnX3lWa58XUdZFC6OjZwcSJe7zQF8mXluhgVsUY24iC3gAqu\r\ndDc2N8ZU4wyt5sCkn22mqMkJqkII0g5CYj8=\r\n=DL5w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-fc6b38d89c6a40d143ef8d10402928ab13372cec-18.x/balena-jellyfish-client-sdk-13.0.131.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-fc6b38d89c6a40d143ef8d10402928ab13372cec-18.x/balena-jellyfish-client-sdk-13.0.131.tgz","_integrity":"sha512-aIFSrr2RiEYXpfFntZ4gYoL4aWWYckbW+5UGGb0w0EeB7u5CI9F8YZsyzBc6NjLnFwt+D2ud3D207RYhMc8T9w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-08T10:41:05.845Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.131-joshbwlng-prettier-fc6b38d89c6a40d143ef8d10402928ab13372cec_1665225769569_0.3115619775185732","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.131":{"name":"@balena/jellyfish-client-sdk","version":"13.0.131","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.131","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3f4a195e65988b4e2680beaaac9a3f4c398ec183","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.131.tgz","fileCount":30,"integrity":"sha512-sFNYYy6et3bO7idPhwnOGtIlVSKxxUX2wJzvQ1YiSZkc7174JzuaTgB39+/V7K4aVQFbuVJ2cRn5ZH6gmoMfkg==","signatures":[{"sig":"MEYCIQDuK0hmoyPdvZ8/LmzLiIQbdxZ3VKk4y53njezwLQdm9QIhAJlS+bXajxUGEtsuNDmL0u+o7WjFHwkKCts/Pna7cviS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160319,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQVSiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeTg/+OOOjgMtdAcCMkz9XphB9uZNjYsEXdqIbO+a3uyZwpOUwSPU3\r\nfeRm7Eij6DqUFzArk9hBQd3447Ms1NHoLcN07hI4a9qgmPegroYmY5RKqi/z\r\nT9Y75JieOF+UATcHDHrNT69Q31nNaoM8yfQzQpzrdtYNjovBTyJKlIzUIrng\r\nmkL4GAJoFsSt+0jttb0LCZ/UUAriSu2W6zbGZgENCkF1ETKgotIiU+BK5d4q\r\nCeFn/ywt6YJ3uA+beH/o1E+JcMFnSGvpe947iaayIcYOXYI4Q19HpMky7Jct\r\nMjFoN225calVdr1/t8EU7ciG4CzPYz3GB3vaMCgKRHHx8UMaLQZ2ROtzt2nD\r\nbIeopKrXOCwqMPlXLkBIeP4PDsTk8OGL6FeF9wpmOR8L98ugwPEL64PKR7x+\r\noAk0vuPyQnVY0xWzZvlzE8Qp5gUL14R8aodllxtHHklND5EiwhNhmLm9oEnR\r\nBi3f/b1vh/fBLUlIUI6LXJObqpSu0wzTtsA6T9dvsIEQIC8eXyGv7nLQfCIl\r\nkO0qun19RLkN0UZCPeSSl4pdS5ZDPx+XrBKQ7gf/Kzx1INNekcsqsxPX66Iq\r\nMR3yTL4JgfYFH6babeOSQW5wqXci29ghwMjNeFdhvQoJyFVcEmxIRXr1zoRs\r\nqd1Lc9Ni+C5J4LLuYtzRafqpwXo0vBVXev0=\r\n=kgL/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-fc6b38d89c6a40d143ef8d10402928ab13372cec-18.x/balena-jellyfish-client-sdk-13.0.131.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-fc6b38d89c6a40d143ef8d10402928ab13372cec-18.x/balena-jellyfish-client-sdk-13.0.131.tgz","_integrity":"sha512-sFNYYy6et3bO7idPhwnOGtIlVSKxxUX2wJzvQ1YiSZkc7174JzuaTgB39+/V7K4aVQFbuVJ2cRn5ZH6gmoMfkg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-08T10:41:05.845Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.{ts,tsx}":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.131_1665225890263_0.12575206511252168","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.132-joshbwlng-update-lint-staged-9556dd6f7d7df046c8972d1e010d7662db334f25":{"name":"@balena/jellyfish-client-sdk","version":"13.0.132-joshbwlng-update-lint-staged-9556dd6f7d7df046c8972d1e010d7662db334f25","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.132-joshbwlng-update-lint-staged-9556dd6f7d7df046c8972d1e010d7662db334f25","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"95e59883df1e62b6518bd79662675154354c2695","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.132-joshbwlng-update-lint-staged-9556dd6f7d7df046c8972d1e010d7662db334f25.tgz","fileCount":32,"integrity":"sha512-tFlLl/okoYsuRtTqu8SOt2FJm/XgIazMfSrVGyb9rHbH9WCMZZh5XOL29hDTnHmVEkO0bRazIxBYx4RUgy6/bA==","signatures":[{"sig":"MEQCIHMKQ9IgWl3h/P3ayWXKmjMJV77PY5REUhaWI5DEnqsoAiAJXiUHQ33mheDjqHlSdzI3nnpp8VDjY3x/2V9W6hRSIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQXp7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofzQ//QFdGUWa+xXKdawbm60A9Z2njHGNsWZ0+H4xQ/6GWy+WlKayf\r\n8r60drRwsONqpqwbou5uZDQhvUcEdZ+L1uoCOtnAxxZZ9Rl/5YhtYXWlFTcp\r\nB5bUv+mGCdWjJrfiP10UdUDwyTbLfpaD2dxuf52Wsb4cbeBy+3ngCobCuUTJ\r\nF2XGREGxGqxV9IQvTVfvKzSeHTf+uY1gX/5zEPNkKrI/edZKRoWA9O4WLs7R\r\njagkSGbhU9ZHGUi71wB/Ar1anbsIkUyAOg4S8F7Qd1Cqhya3FMdq9DhqaFvU\r\n84Fot7/kuF0TzOAoA+WUDzxCI23lZI6tiNqlByUQYoGl8BuLQbyVctwQJC26\r\nxfWSt9Z+9t4wHANcSbihVApt7rMt9iBUVPbXWPnoQ7v5+oT9RvKcRtS7phXa\r\ny5Ya5fC0ff+FS4Or+CydnnIxL0SKDaUHSKkMZ2X7zWKmF4QRNJ5ipb8Oxu93\r\n9YInneuepqS8JOS6C39fN9/DTHYo9uALXDd4CMl+r12yvHO4wy3ldRUIYb7i\r\nzH/Iyrt6pifwv16iUznoxPYBM0+nj9w4SyxbIbybm3sC+iutij0Uyw3cMHqc\r\nLq+8eOFtjreADauaPpWNiihySdoFCEKXDu0b5uCk+FWDyqiIoQqf8aD2AD8x\r\n8+PnQcPtwW+06ZVL+N224GN4ha9vQKnMieE=\r\n=6UgH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-9556dd6f7d7df046c8972d1e010d7662db334f25-18.x/balena-jellyfish-client-sdk-13.0.132.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-9556dd6f7d7df046c8972d1e010d7662db334f25-18.x/balena-jellyfish-client-sdk-13.0.132.tgz","_integrity":"sha512-tFlLl/okoYsuRtTqu8SOt2FJm/XgIazMfSrVGyb9rHbH9WCMZZh5XOL29hDTnHmVEkO0bRazIxBYx4RUgy6/bA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-08T13:24:23.084Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.132-joshbwlng-update-lint-staged-9556dd6f7d7df046c8972d1e010d7662db334f25_1665235579326_0.28382648935866084","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.132":{"name":"@balena/jellyfish-client-sdk","version":"13.0.132","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.132","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8c962be55edc926b2941113a07b951d6941b8063","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.132.tgz","fileCount":30,"integrity":"sha512-FQz6o7NMrlFuRzKAlJusdBaUF/jyRJFfWBg5QbQ+pCZU6K9lObxdDeN4hmyrp32NaP0ZjfBo+TplxtWavV4S2g==","signatures":[{"sig":"MEYCIQCY5kbrPN/sYGO4n3AM3moElahH2B3FnvR7Zj+S8GpY1QIhAIodxmTkbMqsOya+kucU0LRhl3ktdQ7ZgtZrpkR7/jip","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQXsjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+ghAAnAsvsSFLNhtr+4JGSR8IiZhAfeM11YaXQ4ippkA9RG3AinPR\r\nurvhkUAp1CJZs5jid5dJ56VlD+R1feXZ7rP3VNp3OoW+R553IomyeBvQ+++L\r\ndZJP/eZUF7Rs/s5/7eo8/y6O41vSZKkgSG+AxBhXkyHpsWn/WtPkzwYMUYx2\r\nSZMowNdwYaEp5Us7XMBoVxEwSNjQBORIyC2Ygugx2L6I+HaHhg9ViZowJqqR\r\nDJXzhyg4FxxBs51/EMJ52HRgpRGoD8Y1ru4kYnH2FeYYulXkppJmylVmUZdK\r\n463DhE4rMKxWcPQbcj7UwxvVF3A+wi7DR+woCAvHoRhpRdNtDvRahfNkMD01\r\nUsZJNg/Z6AZuKV4m2NEJSACJiOLvDyPVvEiPW3iomCC2NRUWPrro1tkhQMx7\r\nbmotQ6WDdTVvPECjrQJLqD6JNAODGOAN0bYYqf1DxCGO5RIq8c++2SpDysGt\r\nU1qoNGvXITVe5UXgcp5LPZzk+XIaWUUIpUQRwGOeEjgYV+CTB6QM/fRy1S8p\r\ninPX7q4JcEYrGDqWoDFzRHQIo5ddn7Ait6nsqxRD8II9wnmNSJqD65iU6ZXN\r\np6Gf2IZvfFgrRHvNER8YnWf8uW/ZKlgTpWpuOiUzlGN9ZAw1Bcm/shayP1gF\r\nS1DVclr+OTQ3x67jelVkAMtNiyQwbm7EQDA=\r\n=+QT0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-9556dd6f7d7df046c8972d1e010d7662db334f25-18.x/balena-jellyfish-client-sdk-13.0.132.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-9556dd6f7d7df046c8972d1e010d7662db334f25-18.x/balena-jellyfish-client-sdk-13.0.132.tgz","_integrity":"sha512-FQz6o7NMrlFuRzKAlJusdBaUF/jyRJFfWBg5QbQ+pCZU6K9lObxdDeN4hmyrp32NaP0ZjfBo+TplxtWavV4S2g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-08T13:24:23.084Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.124","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.132_1665235747288_0.39854369787396204","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.133-renovate-autumndb-22-x-5e24c93740be69b362e61cc18f583bea9ef53ad7":{"name":"@balena/jellyfish-client-sdk","version":"13.0.133-renovate-autumndb-22-x-5e24c93740be69b362e61cc18f583bea9ef53ad7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.133-renovate-autumndb-22-x-5e24c93740be69b362e61cc18f583bea9ef53ad7","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c777b91d39863225145777e1f98f621e60d1d695","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.133-renovate-autumndb-22-x-5e24c93740be69b362e61cc18f583bea9ef53ad7.tgz","fileCount":32,"integrity":"sha512-Pij30ELl1C0qIkc6892SIzR6e7RyxWgsLl7qk61KtgNFDT3kASZ5OADOQ2lDcISxs5KNDXkiA5qXGPTQlRkkKw==","signatures":[{"sig":"MEQCIApiVBueqezcYNB6GHeV1JJUMAe0Fco/uY7spO4is2H2AiBLDOF0l6X4uD4WUcy0zd0arFcpHFk+1+UrT+0dQRrldw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQjk4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrscg/8DJgoAW0mclL96NNVNr0stnUC81vqpOeotsObpaFnBtZPd/ak\r\n+YmxpUyZQIiEf5v9X5rQoWm3FOPVAKAqr+78KUKO9KQSV7WJPkM15tZwQjYf\r\nVThBDdW5Lrplsnzvzfdayk9c6QIwTFCimxdzZo711likG8uxwe2sOVJe/qug\r\nC/Gdpm8NYXngSSMTwN4NQDOEgd4uqT8YDpU6K74du+VG6pSKrUFh09SinbhU\r\ngwFHhyeIoQf31BtGCqIjK4Yj40njvW8nTTUZ73uZpytvQF8hg4++wp75VYmr\r\nhUdQojodu9kwNv8XM3FKLEup2Oi+ZAiSZwGG10zDjZ7cxiIXBbuYMQgc/mC7\r\nudG2FcwEzURndiuYDc6+D7C7DrM0UT5qrur6xBfNYFUVZ3FlfUQYhQU2BN/U\r\nGjt5wcSw+XcpOwaOa6P/UEB4ehfgpkhnQ6yB4MnxnqVUvhgQbvEAcKPGcXEc\r\nDBCVl8K5e/zSXLncNsKMQvbSxl2qvm64/xKDFA7KUwV8VyH2P4MKPcP5ZPtj\r\nRrUQHqB2BiQXBGcKkEZBY6zqjIqKPaSWwNU4/9pPZ4H4+JzlEZKPvodSOrBy\r\nLFuUVgr8+eDZZ8IUxFOqRUu2/RBnHZbuK5gJlCdsIRZgEndcyR1c4rrFjzAh\r\n4QPPoTd+iLLH1csMXsgpkY1Do6yoKx78IpI=\r\n=GyQz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-5e24c93740be69b362e61cc18f583bea9ef53ad7-18.x/balena-jellyfish-client-sdk-13.0.133.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-5e24c93740be69b362e61cc18f583bea9ef53ad7-18.x/balena-jellyfish-client-sdk-13.0.133.tgz","_integrity":"sha512-Pij30ELl1C0qIkc6892SIzR6e7RyxWgsLl7qk61KtgNFDT3kASZ5OADOQ2lDcISxs5KNDXkiA5qXGPTQlRkkKw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T02:58:26.745Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.129","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.133-renovate-autumndb-22-x-5e24c93740be69b362e61cc18f583bea9ef53ad7_1665284408649_0.5547360001846084","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.133":{"name":"@balena/jellyfish-client-sdk","version":"13.0.133","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.133","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a6fb09a9a77674e7cac8b90784932ccaad68038e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.133.tgz","fileCount":30,"integrity":"sha512-CrHeMq241HFUoJYSmWEFA12DFcsZUYrHfG8BSzIoZvLdDSRJG0w8LPCHYquY80ADJ4eja0fML52QgcQHVowngw==","signatures":[{"sig":"MEYCIQCPqbOrL1yu292c2b+ooK+mcg0I9dvIuYad9E8SGSyYuwIhAL4d5LxUimSGhzBLbT+TjtNoYU5MkgdJ/avZxObGrdmM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQjnHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/Dw//WZOvW2thKYIpkvwFMOKORWliHxNZRk34UdovamaYOmcrSIiq\r\n1YrOK5+Pexm8z9zLiKUwdZb27i4FNDEle+dbsoPAgCOMaUK7q9Wh8jNrJCFY\r\n/9cLfi5FUbvYpATVsbpYLuZepj9her28+CG++OQ2xmix9zGxj/q8kGyKWzX8\r\nmlN/uEZc+37dgKUh3uudx30+1QE/hHgKr5zr9BBf6uE4C7zVEernif5EORAS\r\nA3qxnLiWZ43fezknEvxnaf/S5oj4L+uCiOsigzsfU4iqbr7JpJvaPt8550pj\r\n7avx+ILuIZ1AJGMOzmgI+q/ak6pFUEnc2iB5IJ37H4KeLafA/8SFKeoUzONF\r\n4KsdOV2Es62QbG4od/jsEC20FMuVCGzAmIUSsm9itYhuBe3KHzwW7vOgi279\r\nkOKTWuswB4rbSkDnZ0Y/XJaYG4hdGxx1unA27B6sR5aKa0nhEuBqru5uS9ru\r\n+J710IkIev2pGAtp1V+jA+DlARu33MPz4Ogppgz3zQKN+q0yDFCJkRiBthY/\r\nfIGz1GOCw9+9D4KIvXfL2W+lGYMxLX58USsvY6FxvLmYJwYYbAJdmG7GdmbG\r\nhK2rDDj7gghl3F0iC/JgNiovu7qoH7sKgodL17sOGy8WYDkCW/iQ36xI0jVJ\r\nN+gKLyL532v4W7/zCun7xWTT/sOeUYQrveI=\r\n=AzKS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-5e24c93740be69b362e61cc18f583bea9ef53ad7-18.x/balena-jellyfish-client-sdk-13.0.133.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-5e24c93740be69b362e61cc18f583bea9ef53ad7-18.x/balena-jellyfish-client-sdk-13.0.133.tgz","_integrity":"sha512-CrHeMq241HFUoJYSmWEFA12DFcsZUYrHfG8BSzIoZvLdDSRJG0w8LPCHYquY80ADJ4eja0fML52QgcQHVowngw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T02:58:26.745Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.129","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.133_1665284551096_0.16434319076319448","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.134-renovate-autumndb-22-x-8446507e56f4c67a460b3eed439d0efb200d1cd8":{"name":"@balena/jellyfish-client-sdk","version":"13.0.134-renovate-autumndb-22-x-8446507e56f4c67a460b3eed439d0efb200d1cd8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.134-renovate-autumndb-22-x-8446507e56f4c67a460b3eed439d0efb200d1cd8","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0feb677da237de4f9d239830c2c49d5569779cf4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.134-renovate-autumndb-22-x-8446507e56f4c67a460b3eed439d0efb200d1cd8.tgz","fileCount":32,"integrity":"sha512-ld3QNLNzeXivkkCdb/E0HTkxuOxa3xYRYxQBAxvqFkZBW+3J94iafMKeoXuUNQzM9+ae2eT0dopNeU4CvyY4bQ==","signatures":[{"sig":"MEUCIQCIwAA45DRMf0Bb6oUZSdsN1t21bO1hEGAZ7j8cUPxuawIgDQLhrYKOd101/gtiZPh/ovU3F9bP2U19UHjMDrtUyZ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQk93ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzVA//a/PHoxhTGbVGFHUgh9sVvJBKfnPPNLrNfE3pP2/Cd9EwwJyV\r\ngHPiWpOFCikwD07L69pggDC0OHNQPkAliBb81rvS7NoC1MWVb5CSHvKqgHyi\r\nMDEu57Msvp7LbntOkmjfMrJMxY2E1LJgQ+VVnSZPxdTEYnKRDja8k5mca6Gk\r\nFc6FUjWa2Zx7lZWiftwNFn2Iw321GIxuJCKN1hKrDEHBB1M4tIpiqKwH5Ar6\r\n9tARc0sEJn428T7PkmPMZsCE4TVKOjpO4IiN3v6SDcbmL9Fm0dfgxyw4YnHo\r\nH/Z3zgGkJQ/h//AI/pD5rEVtGTI+4/1L0iqdfwZ5U1SeNFOlb0+le7YbdFPZ\r\nGypfLX6bVKliSbN4tU7cvs/MMKWKLOABwYjPHt0U5pIcMoi484KU809g/QLa\r\nQlPLbANegwn3u/z2XINSw5Tv8ruQI0+gFaASrwnRGlje/g9ng4Gk1wYhqvQd\r\nXDjuLIkH181oQBaSZuG/w0v0nKJOkwiuRoZs7MX3gzykFO+Blv5bHo6MUPKw\r\nF8UZJCTTcgjrEE0DPynMdXUErC1rUuZscKEjCwyseQnNrdq1xDI1H+ob9Hxq\r\nw5AAYpy/+P6q6UZNh+qM3CrdTGI1whnyvia+Mxucsdb53930XKkKBshEiFKv\r\nM418OLYOCvmB3ezv1M2WKYUd/lt/O5qNRdw=\r\n=p46l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-8446507e56f4c67a460b3eed439d0efb200d1cd8-18.x/balena-jellyfish-client-sdk-13.0.134.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-8446507e56f4c67a460b3eed439d0efb200d1cd8-18.x/balena-jellyfish-client-sdk-13.0.134.tgz","_integrity":"sha512-ld3QNLNzeXivkkCdb/E0HTkxuOxa3xYRYxQBAxvqFkZBW+3J94iafMKeoXuUNQzM9+ae2eT0dopNeU4CvyY4bQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T04:33:01.172Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.130","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.134-renovate-autumndb-22-x-8446507e56f4c67a460b3eed439d0efb200d1cd8_1665290103187_0.5337944092646119","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.134":{"name":"@balena/jellyfish-client-sdk","version":"13.0.134","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.134","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b034962281de6c941b3f000c0ff3de2932674c11","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.134.tgz","fileCount":30,"integrity":"sha512-NmqiL8jO6y3q9+9bAW07ZBlydDOGHRABMKnenUaKj+S0NwG+cvYMB2b40/q1onN6Kh7DYLcrgEiwZZ8fjmBT+A==","signatures":[{"sig":"MEUCIDYED3UtuoWIJtiniWBlWw8UXAW3qPn/CxPP/FPGjFjrAiEAuYNjTTy9eTeeKlFfbHCXiusjDsbWO+jRr1OWHMyKtCs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQk/9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpoFw//XiH9N87GQz/cmgxWmOPA/7GkD+4b47b5uTPmFlxV0U8aW5Gm\r\nJ+hqVsSpFz03PdH58q5tChoszA5+UcqKN7gFG58prIvmPWvq4fANvg5ujd1Z\r\nV2eDouguMLXwV//AhYhTwUf400y/lKSRduxH67LnIOhEs9eu2rLShEBF3Wvt\r\nglmzubQ+YVA5pLmpMgZa6YCP2Y1UBXN0fmGnXdT1gD/PeJ7nR6CIrHknm/fc\r\n+tXEEvRs9T5O2IgpJemXe6Lw8vKt/GIMFNkAjUkaABCHdPUFiPdGAXt9oeVW\r\nFln82N8Cgg3GEJ2EXOe/Fd6xDafyM/PBc8imVWL81OHlAXJJbGfcv5S1pMY2\r\nDCzZ2waFCExt3hTcoKhMn07bHKPcsLy3Q06OcJ/wyZErZP0SSKNKM5sMyG36\r\nmi1I3LIR5GOg4bnjIPB7krWA8KSPB7eq0ctR4alM6SO4wzSd80us2Vl41uv7\r\n8gGgt2gUDs8/dkyqXflegOWAjzoSOxubv5JL2QD2LKUue0ust1OBNOTTcVih\r\n9wSABzrIoSZGh2bI493cJuK2cMkRVRSAhVBSuRC6agfiptdg1xAEUX2cq5Zb\r\nZcpyuGeObh4pPNgAWBpthS+v//qYt+UsaaJXjY1AATGLPXAVKifCkTn8beFo\r\nsEHgG+a7ShLeRKZ61RfaO3/qRA0QIVl8cL0=\r\n=RCsp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-8446507e56f4c67a460b3eed439d0efb200d1cd8-18.x/balena-jellyfish-client-sdk-13.0.134.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-8446507e56f4c67a460b3eed439d0efb200d1cd8-18.x/balena-jellyfish-client-sdk-13.0.134.tgz","_integrity":"sha512-NmqiL8jO6y3q9+9bAW07ZBlydDOGHRABMKnenUaKj+S0NwG+cvYMB2b40/q1onN6Kh7DYLcrgEiwZZ8fjmBT+A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T04:33:01.172Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.130","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.134_1665290237052_0.16357916390570137","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.135-renovate-autumndb-22-x-df4c989691c4e4e11db18a431f8652e08d33fe37":{"name":"@balena/jellyfish-client-sdk","version":"13.0.135-renovate-autumndb-22-x-df4c989691c4e4e11db18a431f8652e08d33fe37","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.135-renovate-autumndb-22-x-df4c989691c4e4e11db18a431f8652e08d33fe37","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"426db6981db01f7a7b13dd0ddbb796d3c67c926a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.135-renovate-autumndb-22-x-df4c989691c4e4e11db18a431f8652e08d33fe37.tgz","fileCount":32,"integrity":"sha512-vCjtNTJfJfNQy4qC7STvxOd/OCuFvPVYYysh64tZOZDpe/BhQl8K2u5nGu1TX8hgrIKPivK/5Wp1D77AyFGywQ==","signatures":[{"sig":"MEUCIDi0NvtsAFTL3dLjB8Q5KkHMLYRx3bC4RPmm3DlrEp+0AiEAj7eQAjvVtjGM0q4EvIz9aa+h87E5u9GQXybAFxZSc0M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQsqzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo59A//cm+3aQ8/xIZzxu89pFEF2zxb8ombPfI4Rk1fGtEILVan8LXq\r\nkD2/SSR0z5KigaiEbMyulKHm1fAabRPNdDTQT1zBfhrU6XlsfGQ/lTpjpXaX\r\nzGRutt/WWcVJxDW003bIKL2ASZ9LNgg8ipyObBV0kD+Xxc49BMSsbtU5TL9C\r\ns4OosXaohK1n/EUQCA74JGzoHtk+htpUv6tDsDdsLenTHB+DYZie38UMuOd5\r\nHBVLftK6fvUTC8bKyjvdiyaRi4sgaZUByzrB7mFgEtiSmcwZMZhjE6kD7ljM\r\nIvJqYM7mRlK1HTJ/sqvHtqb8Lf2fmXNdOREtbNqgtloQ9fQP6FQNOXxlvU8N\r\n5HrtIoJ3WZzwYnh4o1FD7htKLMC7ZUHUM52XLtGkKmWfYOlmPSpicgAajuOE\r\nNnj3+95B/2sFdprK0ZsLaNiVifjTq6VtByn78pGb6TSR5vVn2IWVW0doh2Sk\r\nnx9K9X9ZeAmik95JQRSTqVlZOdHYYSi70pS/Se6p+NxMTxCTM9vMrLkS+Nz0\r\nOWH5IHrFl/XmUgsvMpW/KyNK2Qr+KMOstt8fZncxpaxijiSnEBAHm9ELg9je\r\nDX4wMMYTd+1YfRCRzLWUohhHxfRQLVYNOyRqrmXl/VCTliKHb3QWb+Q9Fryt\r\n0rUS/p0hCkFq3wpNWu+NGQfR8Fg+3ovUsrk=\r\n=XvtW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-df4c989691c4e4e11db18a431f8652e08d33fe37-18.x/balena-jellyfish-client-sdk-13.0.135.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-df4c989691c4e4e11db18a431f8652e08d33fe37-18.x/balena-jellyfish-client-sdk-13.0.135.tgz","_integrity":"sha512-vCjtNTJfJfNQy4qC7STvxOd/OCuFvPVYYysh64tZOZDpe/BhQl8K2u5nGu1TX8hgrIKPivK/5Wp1D77AyFGywQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T13:19:19.070Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.132","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.135-renovate-autumndb-22-x-df4c989691c4e4e11db18a431f8652e08d33fe37_1665321651497_0.9618611552165057","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.135":{"name":"@balena/jellyfish-client-sdk","version":"13.0.135","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.135","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dd0462adb4cbcdcd6a0660a2f8c3f1a531335956","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.135.tgz","fileCount":30,"integrity":"sha512-5J3S17MV7Z8buRHSwnxEOnlkne3BV3z7evOxsnZzmhdO8utT/viU4ZRgQH2KOHYrx1h260rxFrS15JeUpm0tIg==","signatures":[{"sig":"MEUCIQDp18XkmHm4GssmGy6gFlkTXiGpwXegThDz4bALE3YkDQIgbyeS+VqjT+jlkVfTJ3Pe9PCV/1Ds7pmfVoN7KuinXZk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQstDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrV1xAAgQwXQUYLYXDFseIexsakaF6O9P/GyAacUpjbjwtAS8y4UAJ/\r\nKZ1AnvRnHzUf3YWvqZYezngqspNufBY8c1YaEqEM5+7bQrP3IQVpeSpt4Bl9\r\ns88kTEFdxCyNSt/g1UytN+bOBhZ2a1yvXm8BujErd1WLsHOtTmSgnU8ekiMT\r\nGGPYvm/ZsRYzdCon2LyncS04QfryhIQ2Z+8i12N9ZnhcQCxy7XMaLBDywQzH\r\nomxPobgh9Qq3nsgjr0QcoEvHO6Zi656tEx8QjitDP9Zyncv7IAUX+M3ffikp\r\nbLh58YrcgMZML1ESujWvMxfM2d8kUy8ZiUNQiQrz8TDrLX/EsQ8uiuaXGpFm\r\niOauuejoy4Q+37k2QAKjUpV+mTIpwCC1Jq+HmnnMyhZU9vaKOFy1hUKWnPCZ\r\nIQOI0MJSB2Vynfq6BYpqKM8cEAY3DgRlJj36U8A0f9Z90UnqT1Wf3brtTqMu\r\nn+CpjnREbfnwMCZJIuwnblK6samR/YhJQdLn9UewcBGVnKKo0Cg2Dko2F1Lw\r\n0yFQWjka+up51qtzzxTPNOlvtx+JMyNJlO0XK3O77Scqf2t77+mTrq9grTsO\r\n5NNsO6a9RjcZ7drttXyqvu32JlzbE9LD0QHa7Ss3X2wDKyArpUEHzXzcd9ad\r\n5rcN0MsMtsWazdnQHKZYImVvIhc6jkTKCtI=\r\n=JPMO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-df4c989691c4e4e11db18a431f8652e08d33fe37-18.x/balena-jellyfish-client-sdk-13.0.135.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-df4c989691c4e4e11db18a431f8652e08d33fe37-18.x/balena-jellyfish-client-sdk-13.0.135.tgz","_integrity":"sha512-5J3S17MV7Z8buRHSwnxEOnlkne3BV3z7evOxsnZzmhdO8utT/viU4ZRgQH2KOHYrx1h260rxFrS15JeUpm0tIg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T13:19:19.070Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.132","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.135_1665321795264_0.8930184250623323","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.136-renovate-autumndb-22-x-460571af96324bb6c7a065f9081a3f479d0c7ad5":{"name":"@balena/jellyfish-client-sdk","version":"13.0.136-renovate-autumndb-22-x-460571af96324bb6c7a065f9081a3f479d0c7ad5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.136-renovate-autumndb-22-x-460571af96324bb6c7a065f9081a3f479d0c7ad5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"20946011f99f353ddcd56d59f9a00f6e41633fe5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.136-renovate-autumndb-22-x-460571af96324bb6c7a065f9081a3f479d0c7ad5.tgz","fileCount":32,"integrity":"sha512-iGo0rN9ssI8mVCjnFQG38SnLtjGRcn2SAQ7ozqfp92nu2ACHW307FxO/CMYXOoQdk9fOBNRfLZy6VWbY0sAsLA==","signatures":[{"sig":"MEUCIQDuC6/ehknkNC0MF0jvw6YP5HAdz7ClZBKzkX2sEbn2lgIgUmtXZKfOYFQXjnW7iuV/gKFP8xD0WEfY2EK9hir6AM8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQvElACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWtA/5ADhnVRpvOWmae2nY0CQft00eG9cKF2bj7V3Yqwxa5lYrCCjY\r\nhF6D3RH5LbcMWrbrFdSFjlKA0z/VxKBajKDOKnPOPgUlu2dgcix3bfUFtPdt\r\nV/1B7YK5W9cQmxsmVllVjHc7AvxuGvOOdNhoYGrNXLiAGmPcW/tIGX38Ewlv\r\nffZnfB96LlRJ+IrRjT/dIzwKauwvtvSOGGz8rspoaFkqRKSh1spXFhuwk0aE\r\nFpTCDLOybs4RNy5wo5fkCQNrpImtG0qRxgZCtB4AacHE22OMrx/M1Ca+vafG\r\njHsYXfJM8YMB+A+Yku9OK5++QBBqqPpF9FLqjxcUfcah54OhSKpxM3gP2dK0\r\n7SaRclZW2iKjuhiM/BexNfM2KWTH+u/vh+af5wNglAlh4qQtGq+gko3c2+RC\r\nSq253N6kxkMe0BeVTYxiOOK3bV3OhUtXES07MlFMWMuoGxN0f74VCzbl9wL1\r\nrtJ45Fy36qgPENVIcd7NxXirVoFPR9olf4ganUA1CqdqdfFkrejsRrBS9++X\r\n1z/7Cpj8WIfhH4uqjQreLDZOVPNeqOi5/269ES+MrGJtJTumHzmtRlc1AiLI\r\n3wDXaIOIDX7oqaoFap3UnDazyVE05MVExadctKJ9p0K6koxhA0b71XuyyBUB\r\nUGP1LGNGfoadpoi0j8bLdRk+uQPzGTYwD5o=\r\n=uYVe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-460571af96324bb6c7a065f9081a3f479d0c7ad5-18.x/balena-jellyfish-client-sdk-13.0.136.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-460571af96324bb6c7a065f9081a3f479d0c7ad5-18.x/balena-jellyfish-client-sdk-13.0.136.tgz","_integrity":"sha512-iGo0rN9ssI8mVCjnFQG38SnLtjGRcn2SAQ7ozqfp92nu2ACHW307FxO/CMYXOoQdk9fOBNRfLZy6VWbY0sAsLA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T16:03:10.680Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.133","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.136-renovate-autumndb-22-x-460571af96324bb6c7a065f9081a3f479d0c7ad5_1665331492747_0.9458544599922285","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.136":{"name":"@balena/jellyfish-client-sdk","version":"13.0.136","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.136","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1018aa54880418b234999edc8a26ff4a02760dfa","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.136.tgz","fileCount":30,"integrity":"sha512-PZzEU9d3iAo2an8xMLpxYwQR0PPNDQZ2De9r20FzTb4Ye5MMwPwqKGm9GIUFZ9N5shyJl5jqAxywlXDKlhvHxg==","signatures":[{"sig":"MEQCIGAFBS27LHKuuy+oVK6oXMikR3hfs0hH7RqtR93IxuYEAiAjzetmtXsosPllFzYSPDhYovYyw+VXv6dhtAPn35u6sg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQvG1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAWg//W/tGUIami71RwcC3BDWIGvmEJOizpGKTwPHntQ+x6gibTGOc\r\nlfeDsoHs/7/c9X+sJZXmuVjQtKNG7mAQB8BVqtP88wNaZ7eWZLRaQAjaWwua\r\n0aHb/dT/U/q5ic5cok+FJbyvQapyE0iddlPdFrC4twXm4fDtBPKKYWJtEXgH\r\nlNX1T2YX1FTFNj7tcBM6Ou9fTeVinWFdMJyiCtZxyAbOdenrBmsCrbd+T6tP\r\nFVbuyRiqpNPQiNyCmzVgdHNZqFvas4Pi/CgBQp4JTCfs7B/KZ+WYdG5P64YW\r\nYCzXsA9gcmX+LMEI3g4Iusz4c8kE0qPbGPCUQAI6rXCQRWvyNIKdGOFn6kLB\r\na6ChOhD/lB2yyXiV+jbEhrTMvGZ49NdXpA1Gw4Cf8yiDz+IBX6lc94hw25Ae\r\n/WDf2V7z6/uQeIAuTDRY+6VFxy87VugwRgqGbTI6na5s4Jmq0lRkwI7IVUSu\r\n4xIpFSeQ2uI1aOJTKz1pSmGOblYSNwBWu4L8Vrb8GZuF2ffz2n+pl5JB9iCZ\r\nZoDi9DIN/RrBycVD/FTYEI6bzJ/Nsvh9TdaDh5YqSUtsJ73EZy58D5aHqZE8\r\n5oHqBlSkk16WDn8kYOSmXzGo9/Np3jB3gqh2I/5lfaJe02P14Qz6ajuqtOT1\r\nf701lfEeYGCd38YRjWTAuyvOVl2Yow2bWrc=\r\n=DIKq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-460571af96324bb6c7a065f9081a3f479d0c7ad5-18.x/balena-jellyfish-client-sdk-13.0.136.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-460571af96324bb6c7a065f9081a3f479d0c7ad5-18.x/balena-jellyfish-client-sdk-13.0.136.tgz","_integrity":"sha512-PZzEU9d3iAo2an8xMLpxYwQR0PPNDQZ2De9r20FzTb4Ye5MMwPwqKGm9GIUFZ9N5shyJl5jqAxywlXDKlhvHxg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T16:03:10.680Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.133","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.136_1665331636938_0.43484080782153334","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.137-renovate-autumndb-22-x-c4775dd2d152c09842f85c5be6f497407a230691":{"name":"@balena/jellyfish-client-sdk","version":"13.0.137-renovate-autumndb-22-x-c4775dd2d152c09842f85c5be6f497407a230691","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.137-renovate-autumndb-22-x-c4775dd2d152c09842f85c5be6f497407a230691","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a9c9ccbc987892d677e85e0e31e915faec66881b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.137-renovate-autumndb-22-x-c4775dd2d152c09842f85c5be6f497407a230691.tgz","fileCount":32,"integrity":"sha512-LoD7/fyfwdsvlSMczJ8AvVnZZxeBgG9nPxva+NdADkUYAA/cQCd5R7iPD362Al7yUaHsRy++hyIsIkEjfZtYsQ==","signatures":[{"sig":"MEQCIGQWtDN1MrRW1hSs73M2dMfLcqvG8GA2+vB/vNt5QrilAiBCU273+7IVtR5fgXh8hcdbaXb3WP1CYAzl1mNtERs3JA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQyYPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEZw/9HxZh8FCWULuJ9SsZq/Fu/Jk8G3eHqNYehQKKvpbselp5vPRe\r\npvY8DkZNqrGFcySH4MBdvT24fWxeBci+0M5cmIxV7ZhLv0nYiHIedhKHHGOR\r\nKMggGhLeFbjbw6yUUh07sW/ta8eBDGJzzbHtAWLM5e7JJgeGHdWIbCDBsenZ\r\nmdmdwBXyapVISLTr4q6qoSoB6U/SoTS9gfthJ05RzMOuQ4pNi6WggU7a1y8E\r\nLOTdxw5u4TV9iukafp2kODyXEVRE1XMpYbAja+QcWvQsTiOHyRD8HTTcdkBa\r\nH5s4C7gc7lqrcUuwUMTWMk9ODyH7EKEKPPwgV5NkndSDJl9ESn1QyPcy15Nd\r\noXNhjoiud5zto97mMu81WMnB5AsWqj9Z6aEmxkrF3UuUorBo/doHmJ6cjXv7\r\nZuGTpUp+hkDYyoS7yZlQBoXl/cgb1VyqBiqsPqfVazj5V3n0NIN4gWnwiPoc\r\nXozXWcypzKXA1vRnDb+uPoEpr7P3xo2rOLv2U+oWGuP7hPZ8gIIf0aOYnPJn\r\nq+Z+pckno4pl2OVnWyHj+HAg5tIai5G219OEN5alPzLkKhtwVZ8jAeVjuVyF\r\n2ofSVG0Zjhe/LZIjG98GGewMZ7lpmLGA3FoszpWPvt/iYweKOHMyQwIAe4/f\r\n6r1gJR/DwxOkxwrkiNijzHixE+rRvWcElvI=\r\n=mmWI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c4775dd2d152c09842f85c5be6f497407a230691-18.x/balena-jellyfish-client-sdk-13.0.137.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c4775dd2d152c09842f85c5be6f497407a230691-18.x/balena-jellyfish-client-sdk-13.0.137.tgz","_integrity":"sha512-LoD7/fyfwdsvlSMczJ8AvVnZZxeBgG9nPxva+NdADkUYAA/cQCd5R7iPD362Al7yUaHsRy++hyIsIkEjfZtYsQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T19:49:02.504Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.134","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.137-renovate-autumndb-22-x-c4775dd2d152c09842f85c5be6f497407a230691_1665345039133_0.2408690605532906","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.137":{"name":"@balena/jellyfish-client-sdk","version":"13.0.137","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.137","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0e0efdfd3ebdb0d7516aa75dbcc6fa92cdc7b995","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.137.tgz","fileCount":30,"integrity":"sha512-Gt8gexBjvmFoiyZAD5OEjeTd7tLSJYZk8r5MwExNJIVYsjwrR9Y0mvarOfeLVIccAytE9beBFu9caqhAp3URRQ==","signatures":[{"sig":"MEYCIQD2H0RpB0t/7uxr1QaGoy16kBxDprkJpNo+ebhSeGyiQAIhAO2ouFAE2sp70SNGGYeQaTxtaofKNnnwhwJwo+poTCtu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQyaNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPCA//RSzJeYLluipdPKdept8A+YyqvHx0LUDP8XGN/EXtNnWwNNJw\r\njZijbqUQo/V/6i0cb4XDh0eo/Xr4w3CPtqN3l0z3/L6zTvj0U/nGTEu7NXHz\r\nTHW7x20fJ3+fuY1IHIobljb0YtUqdeP76HxQSJu1qxOiItCGMKfEq++7r3Yk\r\ng8fJSBAX2k2pUbzewyYUtI+3mvw6+MykG4n6boa7uouxHkjdb1gEfL1rkfc1\r\naP35z1L1SIrMMtG4f7L1OBb2EbvrkpI2LQ30my8se4NDdKVIWsbDrUqjm70Y\r\nrpxozqdaYKIgZLxfaDCk6II5ZT++G/mbmG5BlG4yfQGwrnfPREnz2spmTA7F\r\n+UU9vA+LHA8p5cmN4RhUQkkT2jn/Xtu6ELJzPhgB3dM3H/QuH35WYzWQ7gN3\r\n7CIoEmXeJLoPxD0W0P+lBkEROwZGy3ixhOHbnWyGqVd/ZB5I9sHqES2CexxM\r\nwO+Lwag8LsMYhVDVD8FOpsnzIXIDhzGcv7lm4JhbdD6gOkK4YwMKnPeYOrP0\r\njPdylHGLd4TYx0vDNcnFYgsnPq73wxIScr2j6N2jdRvXPB2fvfMAvxV0KBpH\r\ngCDgk0vYJk7ed0dCjKLA17TV3QeSiV17enOteQNHFAwSl+jlGM3WHC3pAtVT\r\nSAJTBP5MrprefzZW//GOKLszYZoI0sNOl0U=\r\n=Fln1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c4775dd2d152c09842f85c5be6f497407a230691-18.x/balena-jellyfish-client-sdk-13.0.137.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c4775dd2d152c09842f85c5be6f497407a230691-18.x/balena-jellyfish-client-sdk-13.0.137.tgz","_integrity":"sha512-Gt8gexBjvmFoiyZAD5OEjeTd7tLSJYZk8r5MwExNJIVYsjwrR9Y0mvarOfeLVIccAytE9beBFu9caqhAp3URRQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T19:49:02.504Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.134","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.137_1665345165621_0.9855955071446976","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.138-renovate-autumndb-22-x-e8d1269222234f413edbf2fe29cfc8108853429c":{"name":"@balena/jellyfish-client-sdk","version":"13.0.138-renovate-autumndb-22-x-e8d1269222234f413edbf2fe29cfc8108853429c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.138-renovate-autumndb-22-x-e8d1269222234f413edbf2fe29cfc8108853429c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d939c8aba13c77461f47856acdddc85c1c5ef448","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.138-renovate-autumndb-22-x-e8d1269222234f413edbf2fe29cfc8108853429c.tgz","fileCount":32,"integrity":"sha512-pwkpFLeQPXj3y3fflwKxM/nje74vUfxl9aDIbvjY4XieY6UBp7rCq40lptN/zVrZbCUZp5VujMhFInfXbrpKMg==","signatures":[{"sig":"MEYCIQC+leonX7PdjRMDgF1P6ZZJubpLJRYzia2ItLxHFlxhaAIhAMund2kXs4qbfjIucwqm6prxjFVh6LMOkZTPJX7n+DgZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ0b9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhFA/+O2AVoJ723GhLM0MvMn+EJ0SvVOLVeRxAUWGiFgczy0KtLeiN\r\nE1Ysc6gAv9CGLMHYCjgHxbqQA4/KP9c2fH+Cre5UgmWR+YHTspr68j7LZeNw\r\no0TfFbaCTrJ768Vf/6G47DKPcRAw7lV7MWNRmxcYoAWB5B+jfD/3BpbRV9Qi\r\nV/mcyja26x/7ratc5Zxi56zHVwZSXM6hEs6Ct73jUVvDSSdpQeqBZe7mIxVY\r\nXyOtYkDWu1dHXsPllqnB6Hnr9/N6JPJwTVOGr6b/leJu/4RQDuDg0xOm+4AY\r\ny/uVPcHySNkb9RG+1t0NkDddDPidWHKeD5d2QPswn2XvtQBUe2dxgPOSlN2j\r\nBfmBSRnV6aR3rT2VF8NVYA/BA/g2mCP5jS2Hr0IReEmT1kTDnORNCILKETf5\r\nseZ/y1IJtsbmlEfybYMIE4Did9FR6gz69spPqDysjJB93nEr0jHIRr5ARYVo\r\nz44XI8rjaZHPnO1cu3uDDlzH09/yjLcR04oJsRNTqA4boKD6DdGB5xYrTODz\r\nbN/190KIBIhz8zp6TFvoEazd5AtrdN4uszBWOwduC93igkcI+sa9rZLT89ot\r\ndvVKS3wnUNBNT/KoCWQhkTcGj+0FaL1rKUVUVEIIN12biYh866MpiaDN82eP\r\n8rmfydFLoR3IqQoJExqR5P85nphjK7GtrMM=\r\n=R74r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e8d1269222234f413edbf2fe29cfc8108853429c-18.x/balena-jellyfish-client-sdk-13.0.138.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e8d1269222234f413edbf2fe29cfc8108853429c-18.x/balena-jellyfish-client-sdk-13.0.138.tgz","_integrity":"sha512-pwkpFLeQPXj3y3fflwKxM/nje74vUfxl9aDIbvjY4XieY6UBp7rCq40lptN/zVrZbCUZp5VujMhFInfXbrpKMg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T22:09:13.402Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.135","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.138-renovate-autumndb-22-x-e8d1269222234f413edbf2fe29cfc8108853429c_1665353469313_0.014923995874360552","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.138":{"name":"@balena/jellyfish-client-sdk","version":"13.0.138","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.138","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"62185e4df80a131a915c4dd11459ca6024f70c34","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.138.tgz","fileCount":30,"integrity":"sha512-kRqcBInHQaCKK8zPYqcfEqCuY0uZxJRo3q5Lh5FbvI0PkpvXx/mpyDd9SK9U0iaGUyERTNExpRhSO3hbkKfRYw==","signatures":[{"sig":"MEUCIQCkIIWyhtKoqjOg/y5PE8ZO2R6x4nC+0hXzVY14tTDpEQIgTHwaURcXK5S5vNPeq0M+ckHDSFfv2qH37ExwzMaX8wU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ0eFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmowsg/8DVq/yFGs/kRPw1L0VEjeLcaB+uUqIaB/MaxqGtV2DbUDyIEq\r\nV3Q3HihhXTjZ3eHzze+5HinPBgmJDN2aROS4yO1GlK15FhCNQ0pi9bbSdri1\r\n+o6pcDkGzzffxb4acJyO7akW9dEm2AGxsbOBUDJnGTmhnSl7NeHqND4C1Cpe\r\nzlXxufOftD9L2/KzLffYRpZNSqy/Cdvvd6UL8tp8Hk2Ar9n6YUJ2YnLRPM6O\r\nO5yoRyxhwXb6CLTs4k4PoHLfG16VF8yUDWpUDCu1A7bnWocrZCYdO7Nc9HmS\r\nW1t4ryzAR1bhIP/1zeTHCVnSoZr1bU8exPLVh4q46dDyyLU/G61A+i1j3xav\r\nv50mz7jEXI/iOxL704ZkTZK2NNvz3tBSfr6pMlKmgaBrtR1gbx3Eg6RLTqB0\r\nYwxAMTYrE2lVWArFwi4DiKaOFOOopqi080eCrGwZUZzFXVmRy9ZrQ7XgES/U\r\nJddED1PYDzOcIzkG9cxudtxJxuQKcxC1UnDkyCzx88LRs8BwjM/KBRAV4SDk\r\ncXVZ2bxduYBZXuaZHNW6NMaY/Sb2692g5JIwfvNTmPWOX5qRIz+MUnkCT+F/\r\n5krs/VDHgq5m+4Kuuejow5nwl9o6elRlB1lwfUCF8ZRW/vMEen63kczhCyFH\r\ndXXf0AJjJbJ9uzyKafzfq/iOwZaerzxV5vI=\r\n=kd9n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e8d1269222234f413edbf2fe29cfc8108853429c-18.x/balena-jellyfish-client-sdk-13.0.138.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e8d1269222234f413edbf2fe29cfc8108853429c-18.x/balena-jellyfish-client-sdk-13.0.138.tgz","_integrity":"sha512-kRqcBInHQaCKK8zPYqcfEqCuY0uZxJRo3q5Lh5FbvI0PkpvXx/mpyDd9SK9U0iaGUyERTNExpRhSO3hbkKfRYw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-09T22:09:13.402Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.135","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.138_1665353604975_0.29961789320610377","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.139-renovate-autumndb-22-x-b8fe01f053fbd17f10478fbeb1ff53cd2c596375":{"name":"@balena/jellyfish-client-sdk","version":"13.0.139-renovate-autumndb-22-x-b8fe01f053fbd17f10478fbeb1ff53cd2c596375","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.139-renovate-autumndb-22-x-b8fe01f053fbd17f10478fbeb1ff53cd2c596375","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e24ea7f5e45df912a8287cc6c823df84c6b5e3cc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.139-renovate-autumndb-22-x-b8fe01f053fbd17f10478fbeb1ff53cd2c596375.tgz","fileCount":32,"integrity":"sha512-w1o4VTPdNsQpyo5/Y7NyVzHR5UEagZZ7zO+FmTlOpaWDK5cnXkmBPLw/SrbXWRHOpLK38BkzxCPDMc0gQfuoUg==","signatures":[{"sig":"MEUCIQDnQy1S3GMPQaGbgmrx7CQWlsNLSLLIzv7bbsUdDWSxPwIgMbuZz+sDfs2C4JBx3V2uqXabUPDyQwTpT/Fa0BZaRFk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ561ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmopwg//RIWskm0TUZ/w4KLwZTW2TTMBV1R9o9V2VwG655Smm9rJZ2bb\r\nQuaKOO5+g7p+76J4ahc02ACURzTdPm+oCYXY32h/MiUoKCckGC+SR47MLIBo\r\nk8yI71GvJbArrakI3I/A7lUnf3D8I5YQeAtWOENdZj3rdYwTQXgHV+bBkLbw\r\n4xuTzh4wXrecA+cI4ZnuKTq9VawQl5W7PB94b3xq6fefxoaYTdq2AMcL+HiQ\r\nxX463C4yJhFwAo+WqbmDEeH97MlJX04iisLVNjkqTzCE+e/qTSVmxN4y+/VB\r\npgFA9DC3HIs3955PsTcrbGQaFCydp5PE1xkNeyVHTMq4oQaXgkXlRbPp0WA5\r\no13Hf2euUc42lv04dqcLv+xBofsp8slsbumWCD4z8CdlowSycPimmEK/LR76\r\nWnGfmDLZXiAZd5WSRQrStRG6a7OtcKWdAN7h04VAadVoLv6+TiMSjs3s173t\r\nQraAq473FQ5HAFnduv64jHsgJl//GQRC/IkZipND0tOz7GJa0+NHH4OoOpaJ\r\nKWVrHad466Ge0Afe/LlDmwGrkxIqxwIzCBkSF4yoF4vTPFVE92mg8FQzyZ1y\r\nLheN03PJ8HnyL0N4ssDvMp5iR+EhHM8Q8hlT2BhKxMe+r2oH3FsBejrCZxez\r\nI4OMGdIgPz/RixY/c7Sg8KMAbyG294yvcAE=\r\n=ftLi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-b8fe01f053fbd17f10478fbeb1ff53cd2c596375-18.x/balena-jellyfish-client-sdk-13.0.139.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-b8fe01f053fbd17f10478fbeb1ff53cd2c596375-18.x/balena-jellyfish-client-sdk-13.0.139.tgz","_integrity":"sha512-w1o4VTPdNsQpyo5/Y7NyVzHR5UEagZZ7zO+FmTlOpaWDK5cnXkmBPLw/SrbXWRHOpLK38BkzxCPDMc0gQfuoUg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T04:23:44.997Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.136","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.139-renovate-autumndb-22-x-b8fe01f053fbd17f10478fbeb1ff53cd2c596375_1665375925011_0.8504721404510818","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.139":{"name":"@balena/jellyfish-client-sdk","version":"13.0.139","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.139","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1eb2768f50e827233ff28ee33749431cfdaba48a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.139.tgz","fileCount":30,"integrity":"sha512-I3I1FVyHH7br0U2cjRsfuj5TlmvAOE7EUWcIXecOc2/2INTCJSzFG7Inva7BgaZHpuy7eDXh3+KtPxcOl3Jzlw==","signatures":[{"sig":"MEQCIARL2xDAUAtqPu18GCU3EEJeZpaq9zuoiT92gB/KcTdBAiAsBdh0Lm8Birwx+C5/0P6g0Sd5Cr7T+KfIcuAS2eP3JA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ589ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqWkw//WkzHyZ09OvrWdn9sn0N9nQJFgNiZLNa0OkxEMkL6fKN3Zub1\r\nkcihno0kcvJaKSnNA2H8Y9zeee900pzTW1IyD9e2sQ5nJ+KE5D0gm+sKe3dS\r\nXw+rk/Lkkfxd57DD89FIIeGUsCS4VClqB05oEaMwxxn1SBcasUBEMGG3Zeak\r\n4PuAbJz/giXuaDXAK6BscOG77LXeD5ham0yMj0rZfJOe7epG2RH9OlfG+G7p\r\nMcennFy35RJSnrCSDbKQvcZ8LjDmzlaVn4YVEFJCJEgg4pGCLKBCf+9FbD5H\r\n62Z9n01IEfq8d/4u71X/kcXcEhkbopzkxQI+chj+Ygfte6m0UecKKJZvjIkD\r\nHdwJfq8A9KmMZrgNGfDur3aX5iNwbJpyQhMZ1YG0dPmCUgetAhzSss+aIA1I\r\n2f9+rJOwuafl9PlaPYjCN7HbW1WSvR6fsCv3++TfqUdRkq3p0mYRnxUixJg6\r\nTFrFKMeMi0Okwl/QJwaz4Bkyz8MHzB9ZE2rS9owf4kVrrnN9u46GbEyDvBnp\r\nFQ/21OphLOzIUKf8ED1xaPg92pAdkIfaiKa6r4D0YEInnn+p/25uLgrLOMXx\r\noVLhkeupMlVZ+IJeAUKq5WAiEXKx+YapdT0fh4NrxDTu63tKzmPrYYR/tcFw\r\nQm+Vpm23Jsqwf6zQ24uf4q5oAlkQMDrhUSA=\r\n=A4Yh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-b8fe01f053fbd17f10478fbeb1ff53cd2c596375-18.x/balena-jellyfish-client-sdk-13.0.139.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-b8fe01f053fbd17f10478fbeb1ff53cd2c596375-18.x/balena-jellyfish-client-sdk-13.0.139.tgz","_integrity":"sha512-I3I1FVyHH7br0U2cjRsfuj5TlmvAOE7EUWcIXecOc2/2INTCJSzFG7Inva7BgaZHpuy7eDXh3+KtPxcOl3Jzlw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T04:23:44.997Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.136","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.139_1665376060815_0.9973007496466293","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.140-renovate-autumndb-22-x-c95b569a412e4b54ae41a2172c290fa00cecee23":{"name":"@balena/jellyfish-client-sdk","version":"13.0.140-renovate-autumndb-22-x-c95b569a412e4b54ae41a2172c290fa00cecee23","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.140-renovate-autumndb-22-x-c95b569a412e4b54ae41a2172c290fa00cecee23","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e97f275ecab98f585163a9a04ed0d06788efd6b4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.140-renovate-autumndb-22-x-c95b569a412e4b54ae41a2172c290fa00cecee23.tgz","fileCount":32,"integrity":"sha512-+aNQvZfTxegAAxzxpiIe2OCOZ07ZWEMlD5Jc5tOp3K7S2lXmhFzEYzEjHr1Eg+DqFWdpXv+Y/OTxcKTmExKI8Q==","signatures":[{"sig":"MEQCIE4Qpt5zH+slUBZaji4HeabDuL9mM82OvlOZAlgH6mCtAiBtdxx4JzC7DlflvePM9DzkS/8R8953qE3ESmlLq8v7Zw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ8jzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocnA/+J214ISe+i4Bh+DSU20MdDRsAaz+IV+07gLv9iWQcel/JoDTl\r\ns/7SzInOWpJj5ART6k6gaSQEYC9DrR6GGhai9sHrP3VFce3ANHYYlUlLAbUc\r\nci9shKLUguYHK0qrG7QPAkox3NAvgE12cPkqZBnxI0clZTBIa6DWoP7nIXgx\r\nsVoR4wD3PtQ0ghfCumCqX+l83+7cNdosa/iU8LgoAATol1zcJf/V35MMs8vB\r\nlCOKk+YlqgWcgoTzzUQ3nRYOYZldPORgGuJ9b5fbbGDl+ikcYs0TtkJg9PfN\r\nyd05Ae3aNaM7BFJEUxfmsTW9yfBY33PhkpOXnZzPysVaTzd5oS2FdPXoUNgd\r\n+79qfR+XhgI2n22ohen7KEdn74DoRL8P8Fxa5ZX0lzXGACbBkOu3z/i8Ldrx\r\nqmR15DR2ePA7vdhIZWaTvfxBDT8pP0P6WBmperMxTKJNyPVWeFUsP5DDdTrE\r\nZXvnRiTEOxcCoOiOBEToSUViPy2MHppdangj86BYk/iBMO2EemL03EvGvw2N\r\n7EYvKh2p4D0p+6bS9naN54mYz4/qyh56gPwNxMwE8lqsaUqX5MnixwiliZBu\r\nW6JDFr75IMoXfwFqn+anrOfk84jH2gksnjbMyrHkCTZoDNJcEEUwV3F693cD\r\nvbkXsQeaObde+XEiTGKcOike8k2+wu/7nko=\r\n=nNXB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c95b569a412e4b54ae41a2172c290fa00cecee23-18.x/balena-jellyfish-client-sdk-13.0.140.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c95b569a412e4b54ae41a2172c290fa00cecee23-18.x/balena-jellyfish-client-sdk-13.0.140.tgz","_integrity":"sha512-+aNQvZfTxegAAxzxpiIe2OCOZ07ZWEMlD5Jc5tOp3K7S2lXmhFzEYzEjHr1Eg+DqFWdpXv+Y/OTxcKTmExKI8Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T07:24:03.078Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.138","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.140-renovate-autumndb-22-x-c95b569a412e4b54ae41a2172c290fa00cecee23_1665386739455_0.543371092089028","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.140":{"name":"@balena/jellyfish-client-sdk","version":"13.0.140","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.140","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"da797dc3788cc61d746d3dc4d541cd300b1f7925","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.140.tgz","fileCount":30,"integrity":"sha512-k8dsT5KiCja2/FUEN492oqMkg/xbrVDtAe2EZHTq3yV5B/uZQT2Qzkv9OXIXW97esQMu45XyZBcuHmhD/ycprw==","signatures":[{"sig":"MEUCIA6acuSrdyqRPueWnRqOIjCovO+E07S0ruP84liGlB0ZAiEAnmnwhwUi8TIWwDy0mEEbCTP0R7/Fd9T32CpRsbnUZ2w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ8l1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6JQ/+KWXoXUFTQxEth3Dtf0p+YcJxjzD9zZyg0vPo6y9a2DlF4yus\r\ncWYNHsts3CoLOrOsvWNjkn2f6APjXy+YQY0xnKh2f/A6ZcjnBxx7zZRkcPSO\r\n7QFNdpy2oOIygiBI7hN+EDtdY86qrcEpZSA/II9WIbpiwtt2Bdc1fiazUvYg\r\no0y0Yffv+zstT3p3qlUxwte4tFz2Q0r+qSRtSRk5Q4Q1om4WghnPW3mGulnZ\r\n7txY4OCCGZm/OfR9ARRT6NKCmvWf8oABEFWCUAmW+/CttJ4I4ezf6lpUirwE\r\nkLykpS7taQ+P3M1QzoLe33j75F88psHnVbA8eLt7/qb8mQ+gEF8rNLVg6N4a\r\n0rmCokNYK3fsuJvhdQ3LjttZsHFtikm3c/8jJ4pOH/mScRNX0WA825nxWt6B\r\nqpnsfK8SgKhyPcZGoiFUzqoOH/anX0moRW4eiHGnDjeMx46FVJIO8mmcZra7\r\nzhnmK1/WVvsEB+DmJDUsRnxOKguz1u9PDnx4sZvsZ+pkVRC1auhczELbiBPG\r\ngu2h0jrt+rYQjaawOV2Dn92i21thdUpXCg8qG4G7nx0EkfiGs8Wpxqwmmz6t\r\nKfUaC3gcj7XUm+0g6x8Oo/Q2savlxFp8GbUL5ujSYKuDuZ/cdYNOFu/UwZOe\r\nyk7vB/OKCgHZY7izQrKa1dpdw1iNMv480TY=\r\n=UKE7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c95b569a412e4b54ae41a2172c290fa00cecee23-18.x/balena-jellyfish-client-sdk-13.0.140.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c95b569a412e4b54ae41a2172c290fa00cecee23-18.x/balena-jellyfish-client-sdk-13.0.140.tgz","_integrity":"sha512-k8dsT5KiCja2/FUEN492oqMkg/xbrVDtAe2EZHTq3yV5B/uZQT2Qzkv9OXIXW97esQMu45XyZBcuHmhD/ycprw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T07:24:03.078Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.138","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.140_1665386869722_0.752756588548271","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.141-joshbwlng-jest-config-2dcd04d377d82efbed4811fe32ab40b1f40e034d":{"name":"@balena/jellyfish-client-sdk","version":"13.0.141-joshbwlng-jest-config-2dcd04d377d82efbed4811fe32ab40b1f40e034d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.141-joshbwlng-jest-config-2dcd04d377d82efbed4811fe32ab40b1f40e034d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"39f022ac69f7c2d7f8f6a13ae0317f458e446ec5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.141-joshbwlng-jest-config-2dcd04d377d82efbed4811fe32ab40b1f40e034d.tgz","fileCount":32,"integrity":"sha512-2c+0/X1KMehpOqUREsmevQUEC6I67Q3rRajvFPY3oeC1HMcC+A7DJz3QXsnc56qlBwK/GRLoz9TcNhr1sMKOdQ==","signatures":[{"sig":"MEUCIQDOHBjvStk4zXzc9LI30qZR2tX1LnqKAaDQ7QpYC57/cQIgREDw0vi7M13psBZou+X7ICwxfTVhBzyqzTO/lH5R4kE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ+CFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCJw/8DQDbybk6VORoYLaSZOasZECfQ/diSvWjoZWZHS0HqrKuHIlZ\r\nY8W9mbmhINdm0SRDRaQFD1HNuQrWfPZZ1NAU05wSIwAy9W65KmJbEhopnICc\r\nRmdJ3DyrNCOmSjgQMb2jn3RYYMVGbh7CO3kdnzS2xEe7XMslIhutorsjKwar\r\nmxv3CHs24rWcpyzfSZHZanqsWVZT363O3L0IPPF7CCEOz9ASyYuCc/dIK6wt\r\necd24S5VMZqrhXrVJ0K5pEl0XqfRb5hNxXfqrqnTbGIaY4DCiaREtggQFhX3\r\nm75ebeqYqKjtWCz3FqeH1tpZSiTKndpbK9Upl5j4lWH/jc/mSdV4alGAFrOV\r\nzqvUJkPBtf4Rp3X2CfRiDfOc2LgXGIZmwi+hacJcHXBZsTgFyA/zHatcilE2\r\nylsx8ApgYw7qaVPcFFZkWsixTfOGTAseudckzIrmuCQOVrqBEMFNTaXiFNwm\r\nJBlLsmqHt2rg8b5NQBfkW+NZOF9yaJZlfSJMs5xOTswVUmdJN7kszRCcpuJO\r\nk64pDjbokCgsU0rS46gzvqZDqJUGBq4/jMQeDGkT1IP85PDwwopJu8yn1h/m\r\nOTniLJ1w1e20JCkeW3Td3JEH5anOrb46V5irvdFMYMG/SHkGalkegA4ACRxY\r\neSaK6F4mAH4AQM8cKZbIk4d0iXaTOKfwep4=\r\n=WQqs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-2dcd04d377d82efbed4811fe32ab40b1f40e034d-18.x/balena-jellyfish-client-sdk-13.0.141.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-2dcd04d377d82efbed4811fe32ab40b1f40e034d-18.x/balena-jellyfish-client-sdk-13.0.141.tgz","_integrity":"sha512-2c+0/X1KMehpOqUREsmevQUEC6I67Q3rRajvFPY3oeC1HMcC+A7DJz3QXsnc56qlBwK/GRLoz9TcNhr1sMKOdQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T09:04:39.454Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.138","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.141-joshbwlng-jest-config-2dcd04d377d82efbed4811fe32ab40b1f40e034d_1665392773475_0.7927647946020009","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.141":{"name":"@balena/jellyfish-client-sdk","version":"13.0.141","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.141","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0a8818b0cf6496f92ee469c01f0e6c117919e35e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.141.tgz","fileCount":30,"integrity":"sha512-+tpgNcBUrq/pWEtl2azZxcOdlpO6GeqSjBQocow7DV/boh6t9T/NpxpsjGTcDg+YAIcK6mcJEAP508TvYv8I9w==","signatures":[{"sig":"MEUCIQCYLrVO/Wc94JCw4N5FO+vNQsc0Q78dYTWEIpq3s79/KwIgcsKx2fWFJ1JtcWrm3e6XM1iJbOzdGZA0Q84C9f0W5HY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQ+EHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoApA/+NiMGLCv9eVu24k4cBpEmyN7ZI9lx8yMyLmHgUdAHBF6SfNgM\r\n/BBv0+RxNfsmqp/ZQkBdZVl0GgIadgBqS4bEQDTrlAlYibvkNLYiVeZuaE4u\r\nRWGDRvbb95rjNLXN0ae2ziMeDdgFJZaN0jdesXimF/y7OThi6kyoUrIXeOcC\r\nLfqHlWrbKl00j4zwzpbGzET0KiM8U9/72OWPgRi0nI75q8U8UgkyP8xttm+J\r\nBsVl61bquM2VQhfEyA8QsO7MdV4HH+Tvg4m6Aiz9UhamY/2zJ2kRuD3qXSvT\r\nwRqKI/QoYHijIgigCW0GUdBOpEVpqIFqnCpnpaohBVMgb+1PeS93askg5QFT\r\n2IgogncYg546lP0y9q4Qyi1arZ6awvuQyl5kHAQjT+p4UN7Wi1u06WUcKj2L\r\n+mvSkJHIFSlQmKWH/vL2SiLlcL/aJb0s3anJfnPF1QrjF2iMHdFYF01z//Jm\r\nSa1SRLEW49xREttiucb6TwkuThqsHnXK1rVANRlG3/J+/GjqqIMxbJ1VlkyN\r\nCCjyzupL+IXg+oxiLS55K1P45CR4Hzih2s0gootsqPdydXh2J0Zd0W1u/5cO\r\nP5mr/+FS+/j5MO9QqjPqt0bVdU5iyFfcXf+o/74UrryLw2GnmBdoW5s/ZwuS\r\nuzBgaOdeQ6KzJaUBzPMcZBXPW4H2uwuQSGo=\r\n=2Rsa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-2dcd04d377d82efbed4811fe32ab40b1f40e034d-18.x/balena-jellyfish-client-sdk-13.0.141.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-2dcd04d377d82efbed4811fe32ab40b1f40e034d-18.x/balena-jellyfish-client-sdk-13.0.141.tgz","_integrity":"sha512-+tpgNcBUrq/pWEtl2azZxcOdlpO6GeqSjBQocow7DV/boh6t9T/NpxpsjGTcDg+YAIcK6mcJEAP508TvYv8I9w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T09:04:39.454Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.138","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.141_1665392903335_0.8148815007568941","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.142-renovate-autumndb-22-x-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4":{"name":"@balena/jellyfish-client-sdk","version":"13.0.142-renovate-autumndb-22-x-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.142-renovate-autumndb-22-x-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1b5dac1983ac30ce66f2a555f1381057bfd80c86","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.142-renovate-autumndb-22-x-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4.tgz","fileCount":32,"integrity":"sha512-u5V0THxtAP2NfJL33GwyUDtxLv1NyBDYCw1YwhRyeq38sBCAdLkWZcqOA0Ffi/eSMTP0Xkb59Hy5vPYoujNcOA==","signatures":[{"sig":"MEYCIQD2IFTNl3Uu3TI0CuGQkKBKcxiayR2SsLyn+AlYF5OiYgIhAKg3xBI7YIiC09VI8Pk/fwuxrERHK7Yck2JoYrWL14Gt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRAq/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHlxAAm3wZVQZZSrBmpCEEWn8h/kv3BdtCJqGl1aNuscJD5Zfp1ZEp\r\nntS9RDj2JJfCT18c/pKQBk9oNHGzlmkF93mfqtjALMQFsjJzyEGprFYLdswN\r\n2sveoEeymOEec+tZHbFEdo9eSDjEKqBFVRwMKqN4NRfw+BNWdE06B0JbxAfA\r\nlxOphztu4AKIiwLKuwiKkoI0/xN4HvVkmlYGHpzoyMltGhsZSL7rTqVh+rl9\r\nIxgkvvO6csDi4dXrxNhKRc0lLONr9q89u84TC55okv/tltM2ZGOOWVqUMQFj\r\nvv5IczXxUoj0c3sDOW+QSumtFnpRft65i0TSP/dDNpTmvW4oTnkXGT2Lduy5\r\ng/QB2Og0DC1jTb70u+Rd+nNb/BMmqJeJPiszKMn9a5g0gVn03+JJoXgd/IG2\r\nkJ6H3KyYmU20uOPlw+6eOCuPfcs1JmELiVd4qwkJbfCOSWutzsSoE6VB6hcZ\r\nL6s8W1WUOvCbNhaZCL7AdPV/OKUlbUIfeoawWIWuRFtJj9SBap744q1NiG7r\r\nsZjWNtoU6BS/M/YnOVJwPVfUT95xCAT+dbwwzcmEzTjwvvyqLUcvdSap2EaE\r\neLyogCm5UtYFvrAZ2k3YLJIQeNTQVfGLn0yES1jQ8vLSjs4SFsMiTu091+We\r\nMauHDrNovjvbdqbdf2E0Z1QGrZhiqKgy+3Q=\r\n=sNd6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4-18.x/balena-jellyfish-client-sdk-13.0.142.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4-18.x/balena-jellyfish-client-sdk-13.0.142.tgz","_integrity":"sha512-u5V0THxtAP2NfJL33GwyUDtxLv1NyBDYCw1YwhRyeq38sBCAdLkWZcqOA0Ffi/eSMTP0Xkb59Hy5vPYoujNcOA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T12:04:55.941Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.139","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.142-renovate-autumndb-22-x-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4_1665403582925_0.4808862024854905","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.142":{"name":"@balena/jellyfish-client-sdk","version":"13.0.142","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.142","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d048cd311ee493e5489648ecc1681d32d7993673","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.142.tgz","fileCount":30,"integrity":"sha512-Z1HxX8zuWMn/iSQLcBOL7i4PwI4HRoaDk8Pi9MhCCOnFqTcW2jS0CFeLG7tuNKQ70RMIx0sKq6xiDaLjOO7xpA==","signatures":[{"sig":"MEYCIQDC76FGrOSSRBEYwSmIxlN3wigO3O+XqP1yjapgYEA6WwIhAM4j4Ro2kak5Hr7hlWtzlOU4QCVNYC1sU2lfKqSTIGFi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRAtAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqn1w//S4hPx51iaeLaXb4HyV1zEEQBddC9nlAFvDGOOGFmpa0uWznh\r\n5ag/7IaGy+K4/WeO7Usp+LCf8ZcTJ5kfPJu3vmbusMURr/v9Dc4my2mgSKjt\r\njBwGGERkKqb76Kc+URV5bk6kxqhirKxRz7/iOqsnuYpgLaMs/6AEY5q8fTot\r\n42EU+f7EDi043o5PE0GbwlkbMU/9GLuCjiEOnIXrIAYOCO0fJkyAPlwTAD2L\r\nE6byZ9Uvo5HyTZR5CpOlqqgz2Jxz7jm46wcWMLPHKnBWLFBAb9mtWOurWJLe\r\nT+ryFZRw/1FLj+5CjQxSNxP+NjKe/2VmiSnRkDJ3dpjzX0mN0Sf8zBJEboNz\r\n3Zmu9XxVnvJv0ajKkUHXWkC6kNiWzqyczzXW1aGsMsb71i/jM/xmTcfvGvQu\r\nDdFPGTomMurDGXCWMuw9iLuu7jWZMVZqLXUEpPRDdh/2ARAAeGJzE9xfeC+x\r\ntXYuNocpeHNkjbBE2i3Rsdc3huCvghEI2c/DGGZDIC0T6Q4q37pPyZMgwJOe\r\nrbPURDKWz05sVNnrD8gU+eWjphLEKALVBuifNddPgSnDXK1uwWbpCBF173RM\r\n6PtS54vrGBJITmifnbfOX8XXrjM2YYugyoQaQdSSSpx10mnl6qgGwXiLUje7\r\nfApjSHOZ3kFFGgL0jDoe1Yaxjo9dS4dMgpM=\r\n=beXQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4-18.x/balena-jellyfish-client-sdk-13.0.142.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4-18.x/balena-jellyfish-client-sdk-13.0.142.tgz","_integrity":"sha512-Z1HxX8zuWMn/iSQLcBOL7i4PwI4HRoaDk8Pi9MhCCOnFqTcW2jS0CFeLG7tuNKQ70RMIx0sKq6xiDaLjOO7xpA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T12:04:55.941Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.139","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.142_1665403712608_0.7529654574846916","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.143-renovate-autumndb-22-x-1ff248a45be4513de607a8ca37d1de8b02f95c9f":{"name":"@balena/jellyfish-client-sdk","version":"13.0.143-renovate-autumndb-22-x-1ff248a45be4513de607a8ca37d1de8b02f95c9f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.143-renovate-autumndb-22-x-1ff248a45be4513de607a8ca37d1de8b02f95c9f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a2ae73c26531c1dd4d18f41cc8aa5258bb2189b6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.143-renovate-autumndb-22-x-1ff248a45be4513de607a8ca37d1de8b02f95c9f.tgz","fileCount":32,"integrity":"sha512-lW46dh1Ac5cV5aPC9sP/+MBkABg8Um5FjNxLQ+eNfvv81NDTnq7sJYXMh0Hm83N3xjsMItmFnL62LFGxn8dc+Q==","signatures":[{"sig":"MEUCIAejg0Zbq2SkSk+fXXmvU1ddBz41HI9BFqE0L0FmciIhAiEAq6BgSDH0E8bK2zGVXaqQgFC4gEGh0fHyjpPxQ8z8OZs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRKuSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmomkBAAoM3m0TNFuNaOub+DjddmQBhAlgPIlT0f9LlgwgBXvLJGoe3n\r\n498gG2LO2qif4d8omjJ+R2lEdJs8pHRT+KwEA+W5UUK0Y/blZZpy8bI5Po0g\r\nibEmql5suJOdprGEbaSP2JKrRnNtGd4nWuWSKNn7kH2iih62tJ58ClPlKrlv\r\nGW6V5+zH0GyO7IYi2LuFggkcjmk+0DSpJb8hhLNY1Z8wBle/u8vINL8dmPvn\r\nrUOkorH4HA9t5ywI+CVamToQQuOMu/uKfVKtnlkkYGiX4wV8280DK5penRvh\r\nKSLXIabg9wGkY+Whlbrr8gVaou77RAMpc9hDcWMnw46ADuLtreSxXUe1IAHE\r\nyPjw26tTJeiI0DI4wFJgFkwKdG61Sy7+AOZvIrYljz0ifK5h6oZK21aX0m/c\r\nKo2PdpqzVw3Vgt2HnqMfpIl2/KeZyYkziHf/9eZuAKXrJrlcjYgp2Jgpe5e0\r\nWtpncEK7WJctGR9y0kmRTFJOr89kkN0AN1/KVDoMsDn7SJ+hodkRTPJfiwtE\r\n6yxlfA0gRo5hc+vs87dc2lkSX/rqx3ph6SLFZ0qRUycD8sc54/kNJJX2CjmG\r\n7ebRkpq1aHvZm51A99+Q6I3L+b3zMpYRRTYKvizr9ZFDfyugKbcjqCnhpSoc\r\nFodhqewJbz03hf1GafGapFSiqzSxIDQARss=\r\n=JrV6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-1ff248a45be4513de607a8ca37d1de8b02f95c9f-18.x/balena-jellyfish-client-sdk-13.0.143.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-1ff248a45be4513de607a8ca37d1de8b02f95c9f-18.x/balena-jellyfish-client-sdk-13.0.143.tgz","_integrity":"sha512-lW46dh1Ac5cV5aPC9sP/+MBkABg8Um5FjNxLQ+eNfvv81NDTnq7sJYXMh0Hm83N3xjsMItmFnL62LFGxn8dc+Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T23:30:59.051Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.141","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.143-renovate-autumndb-22-x-1ff248a45be4513de607a8ca37d1de8b02f95c9f_1665444754372_0.3144939351667886","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.143":{"name":"@balena/jellyfish-client-sdk","version":"13.0.143","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.143","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"63414b90775db0548fc1631f0747e6119dbb1806","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.143.tgz","fileCount":30,"integrity":"sha512-bi+iynOwLCL8qwcf9R4wOh0u+xVbNnbd8z/2EV3fjEhzgRHzHnsWdBGOm3I7KZe6IQf8YgbVjSKSZr62hipkvQ==","signatures":[{"sig":"MEUCIAhfgVZTbBKg5eCJ6+n/P6LC8GcJoeZ3cq2ytS+H7Z7JAiEAt8zLS6e8aQUqMxqO5mr+Mx5JOQMhy51pbUnEMUZUVno=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRKwRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoBfQ/+PjmU0yVaQODoheW0dlZxSGXy/e1bPjhm2OFuRH+aZEKmbtKT\r\nblp4SywehmVIPtNXGQwwxUs6B6IeG4Xvi/PbHQkXJQ7Il6d/ERxDlzyYwR3m\r\nC4P0xeZfHeqy1ZeA4Py062J5W4bMusLyJXe46vOPKhRpF+JrTsls2gs5o10H\r\n97rDQ+bHjAvConVczpRQsjaNE7uAFALTUFjmC4B70x//hGvDoHv/hI2co4z5\r\nz6ji0IJlHg3aBALs/RKWXgnn7Cdfupa/XVFt2rNDHrPkysSuVI3ciLV2fu9z\r\nlySEu8MO4ICdFSal1evrEzOs9a44McGBr5jXolb/PBJMTqOWtjTFy/81Dhq1\r\nHTVYp7dopwB6l+C+t3kx8WnsmPZ8O24jkkVeUSzUA2ld+aIuHjGunagOr82v\r\nfH2WSx7GGg0Upbgoh3vFDwz+mDp0A2hlO1DHXyv0m1V5WtuOML1ZQYU9JFIB\r\n6Ex2vBSuY5+3W/fxBRqIGZ9w4sscTbX84AX+pnLBlTYUQ1wrJGbfRmqkTVaL\r\n1YOarpj74EwgCSI9uyYg5SAlfSEmLPXqPIwSgryinuOMl8zRypjzUwOYWVSY\r\ntSANmdtSQRnuFIPpphxHnGRftyHjIwtyPTwgeCNHKgKNxfbMIQ///wgKILRR\r\nzYgf1OfwAneVCAb61noy6eM0kV/InTbgZt4=\r\n=G/+H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-1ff248a45be4513de607a8ca37d1de8b02f95c9f-18.x/balena-jellyfish-client-sdk-13.0.143.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-1ff248a45be4513de607a8ca37d1de8b02f95c9f-18.x/balena-jellyfish-client-sdk-13.0.143.tgz","_integrity":"sha512-bi+iynOwLCL8qwcf9R4wOh0u+xVbNnbd8z/2EV3fjEhzgRHzHnsWdBGOm3I7KZe6IQf8YgbVjSKSZr62hipkvQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T23:30:59.051Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.15","autumndb":"^22.2.141","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.143_1665444881514_0.6798187794724269","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.144-renovate-typedoc-0-x-e2f8c44b449faf335cc4986a513eab63b6279734":{"name":"@balena/jellyfish-client-sdk","version":"13.0.144-renovate-typedoc-0-x-e2f8c44b449faf335cc4986a513eab63b6279734","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.144-renovate-typedoc-0-x-e2f8c44b449faf335cc4986a513eab63b6279734","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"376b023237c535378f9a990091d9418ef7d198c5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.144-renovate-typedoc-0-x-e2f8c44b449faf335cc4986a513eab63b6279734.tgz","fileCount":32,"integrity":"sha512-xPUf6B3ex6U2oNhPsqpvysOor98xJAtQcB8bKUpB3IZEc0HllJIreuOxqy6cYWBOLpLqgd+ApAtcHcS96se0zA==","signatures":[{"sig":"MEYCIQCu7/kPmB6A0+P9aj4P8Qw2hRZWZ8Xhvo1oclMkq9IKlgIhAJdxvIBz6LMPLjaWxnAM5hz7GGMdHPT0Y9oXDMq2Sofl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRKzZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqD4xAAm7oUw5yCi8PDTcX1EV2KnxM3lOGQYUNYwXaVA0fXUzYfEyjt\r\nILnNt8AaD87g0K06nrLxtamayr08CfFXWoEfzvC/W0jq5uED1o1lMM4SO8E2\r\n+cK27ScXI5rX2TqHIhYtUx0z2zN9iAbKuEhU83ochh9kQ4V0TvVmtUOZKK25\r\nnnHnkBPph5gJsRtpJ7NCx0z/jQlQSOxEcrMT2BTYY2DNw32mweQFR5OunM42\r\nPQWmRr/UvR8h045wHho2FAzbLx4oi1tFNYWdvd0Lty3B8q41MobvqZF3dZ0x\r\nAheGxSU3sOqOKdyQE4JD6I+BZAeN8g2NU4CYYW4Vs40kQTz7BTOFkGKGWbTO\r\nTiiz6ZYF0gWP2PPPInf4hjcNzIHUiLgwi7gYoJruvGltsh5QL4Xl9aFInRjU\r\n/9yeAta403PzIxFOMwLHKf2UZnTI1QQVsYBZ5qPsCVmazV+LVRCXZaevzT2T\r\nT/RHnGSDn308rjXpZ5Zuwf4jZJ6oJ0JBJzw7FExg2zMg8KZNNsypwl6C0K5r\r\nS7FwYj+mp+ZZRifsg+9LN86g9LphHygOymsroFZ5s3ocxxmw3gVJbdlM67ds\r\nsUi6q8sLV92fec8R+TOKP2XnSSq73rPc/xVQVf1uhZilHmSuqha8eYg27+1u\r\nhNe4oCDmDBnKeG65sUXxPTCRD761u6YVb80=\r\n=MRfX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e2f8c44b449faf335cc4986a513eab63b6279734-18.x/balena-jellyfish-client-sdk-13.0.144.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e2f8c44b449faf335cc4986a513eab63b6279734-18.x/balena-jellyfish-client-sdk-13.0.144.tgz","_integrity":"sha512-xPUf6B3ex6U2oNhPsqpvysOor98xJAtQcB8bKUpB3IZEc0HllJIreuOxqy6cYWBOLpLqgd+ApAtcHcS96se0zA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T23:36:15.984Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.141","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.144-renovate-typedoc-0-x-e2f8c44b449faf335cc4986a513eab63b6279734_1665445081733_0.1512349899763783","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.144":{"name":"@balena/jellyfish-client-sdk","version":"13.0.144","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.144","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"21746a0dfa24a12a4a8db9e3d3093e770da46235","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.144.tgz","fileCount":30,"integrity":"sha512-UVZtOq+1vX9GEfGUCRvlNi0nounElKJPbvXikqxKeIJjdonqZoj7dZZIzPNZB8H1lgJ2hp6wY7AodrvtFTJL2g==","signatures":[{"sig":"MEUCIQCP3fccRpaSOjSc55OlSubA2un6nQ2mPYFfvjiI2fL01gIgDc63J8X6zUKBblYTIlEPgv0e1QhFqJXQXgURZMuUkLg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRK1vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrF9w//WsMTnYt4/zVaYKBpFFFkLOBrm1cUy5fxwk/ewnxzhtsd06lS\r\n+d0f2FMkdVTS9y982Oe551F2Q12a5SOVzWvEtAzo2IvygfBNM38DVnBLljag\r\nhAh2swvi7HTcy+HZT1TkrcXsjyYQYxSsnDopKZr1uOQLcQc2J/yQuBUZzu8f\r\nWiH9N1zkG/IsBMnVFpwD9WNu0XvVks143VM1OLk/Kvd6qtfcoiErV7VJ1bOF\r\npgo4+1oYOnheBKV6fgDUL629cmf5P1lZ6HKVkoqioES31hcAAXMwL25EWNAQ\r\nLkKMrB/0H/a1yWpkvKr8lNtVu46D47TTharxCqGdzjbOFXm6m1H/J6Xs5nnn\r\nL2iSTLy7hfFKKhUGAeAEhjsOc3ImyUSfGtLyhDXaIzeaRSfrEgBHamkx5wjx\r\n2BYggjzbBHHg8l9Co1YfR3C2iaCtKlSDPg80bGulpztycae0oXDxKEuLUVPK\r\nHCXbFNjEEFIjVNUYNpclRbvGE470yddvfBVE5fVDXFL1ioIz9a9R7fnguIfW\r\nz4Zvd67oCncXpd4o5yOgnwSt9PT+4x58Bs+zSzj/br/X1yzC6JzJzeWxEZQe\r\nFmMT5nl3GKOAmEM2syfiV2shz2swJUJgrn51epZEVq78Ht1m6mGIbliqqQrZ\r\n+V4GjmspALRzAOcMOOEHBlsfso87RGlSZZs=\r\n=XLzO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-e2f8c44b449faf335cc4986a513eab63b6279734-18.x/balena-jellyfish-client-sdk-13.0.144.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-e2f8c44b449faf335cc4986a513eab63b6279734-18.x/balena-jellyfish-client-sdk-13.0.144.tgz","_integrity":"sha512-UVZtOq+1vX9GEfGUCRvlNi0nounElKJPbvXikqxKeIJjdonqZoj7dZZIzPNZB8H1lgJ2hp6wY7AodrvtFTJL2g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-10T23:36:15.984Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.141","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.144_1665445231403_0.5259211473982148","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.145-renovate-autumndb-22-x-2d19af5479b5d22c0f28868e21694e561e8abee1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.145-renovate-autumndb-22-x-2d19af5479b5d22c0f28868e21694e561e8abee1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.145-renovate-autumndb-22-x-2d19af5479b5d22c0f28868e21694e561e8abee1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0e68d7b4b457936ed6d82484c17eb97a2cbd3864","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.145-renovate-autumndb-22-x-2d19af5479b5d22c0f28868e21694e561e8abee1.tgz","fileCount":32,"integrity":"sha512-FQi/bD1lcsKfJaUeQYGOe2pYe8jrHin89ZNWWWeC/8R1qdOTJEeoaTrowB9BMldKq9n7ttDpC1W0Hih3r9oQTA==","signatures":[{"sig":"MEUCIQCDQjFSHDegV6UdHa0hfM2AjCjuWzmcz5XyDONMrdcuwwIgRYKfFTO8GwEuV9grvpik5mGK4vutcIvAPv9O/nN/OOM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRNWdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYGg/+PTqqoXbFxBInGx9fXnEjXVpKG3zXmJyqS9YCh1YGCFvlH+Ux\r\nFCghkob3wiLSXaR6UKMM9vyQjrE6kDab+mAojnQLbFWTbfKS3cE+68IZCrGU\r\naAPam5W1K6c1Qrea27OMIfuDeyYmWod+kSWeDc4GQSptkFR1m7DSl0Mdhfz1\r\n1AavNwt3kU9CNe4aUkdKb5CirJMapiRnRRjV7W1vi76t0GNTUffqJjH/v7/G\r\nr12/zr6J49cu3xjJWqTnHrBQBooHbgZxRGB2LzTwaR+lvCzyut33EzPU/UTC\r\nECX+kEX+OQqINM4tJU7UIkxhnYbk6mjVSLx2jcEQAelD48de6JLthfQJ095o\r\n+kMZBNftPedwEFLXABCIJ+vBjncdcKgxQkNSjRDEwI0rVgofyG8o57fIhAQV\r\n6QWj4aEolOyduDQqenQbxd/iXzzAa9KVwN8CkNBZVX4nNGSZNPjqGn0daPeu\r\n0ci0KZ3vnfbk5HfYfxE2nJdArRvzEP0sw9o0KIFeBpLDYe3xrN0YPXR+hJIH\r\nAfsowW+3+5Uvn89imaWmNEwMXoYYuHquZUeKhmfIJCtKO/lWmj95X/ffIQgH\r\nwf/nGG4B7UQRRM1acpRMVuiWZQy4Ps1Yvv5F0c0U0lpdaTnefNoE0i4WTer5\r\naJnZG4Tw6J441g0/2FQIRGhJXdEordjoCQU=\r\n=llvh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-2d19af5479b5d22c0f28868e21694e561e8abee1-18.x/balena-jellyfish-client-sdk-13.0.145.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-2d19af5479b5d22c0f28868e21694e561e8abee1-18.x/balena-jellyfish-client-sdk-13.0.145.tgz","_integrity":"sha512-FQi/bD1lcsKfJaUeQYGOe2pYe8jrHin89ZNWWWeC/8R1qdOTJEeoaTrowB9BMldKq9n7ttDpC1W0Hih3r9oQTA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-11T02:30:30.421Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.143","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.145-renovate-autumndb-22-x-2d19af5479b5d22c0f28868e21694e561e8abee1_1665455517405_0.4784841107627975","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.145":{"name":"@balena/jellyfish-client-sdk","version":"13.0.145","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.145","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0d3ae4e7436313abddf903f227dcfa870d6eb2a2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.145.tgz","fileCount":30,"integrity":"sha512-AYaF/YhK8+zTn+GvDe1ygNq+kRg9aFvAQXgL07H9/+dCUM9OMgHuBHOSIcnDUs/Jr7LHlZyElIRUNiGbcbvzBA==","signatures":[{"sig":"MEYCIQCDclchpjZEYuxvulysVrc45n7wLjfLiNGHhIww+TVcMAIhALMvQEz4YOREKudCuX5DbEf6JFNL56bbF/KxlgUVj4B/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRNY0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrO6A//UMYOEjPziR4TvXL/fJtS/hU7qdtGvhsrQ7IaCdTYA9SpiER7\r\nnP3DjeLLtJdAFAysK6I32Yq9BzJlH84ABIBU3XJzfGKqBTEPA6EghrxdD4UK\r\n9u+PM2Ip6AJpuTiqGPW/wjgqhPGR9fEuA21bBkgDh6h6HiQC8krBpJihDx+Z\r\nIKnIzmIs2D0Nsx/b+kmMIyc6t3FBXfj3h6vBgfHI6QAoczesXzZvfejjeFx6\r\n0CsI1K5POTkr9+ITqwPuP8/yGOivWx7tsWk5PDQxTKprzcf9HFgS9izmU3mQ\r\nbcISYCv/i7J18hFq2eFNfBViVq/U9s2cqAgDX4qdJ75Nl0gKDMPtp2ORZEMy\r\nXNuXWM5KJ7X718KWkyxB56WQwsJ/xjYtRBm9M1vs/yTfX3O/BdgAcCCVsszl\r\nth1BPKdCaZztUcMqT/Y/dbjc0w8kkwpR0jyH77U+Xdjtll+YZL4x4FOU6HdU\r\nUfMQMEhKiknAKoV3Lzpiq0RX7IJPgA2ixRdbcAfNiGWZ9dM1Nn0wnXQm5MJk\r\nOOAvCok1oCVZopisNNMIqb24p9Dv2MrXTJ50IkwxJi88EW4AL+2J9Oric1HB\r\nfGyRO753oodMNXWc/VevWkfLCk6Um4DSVtnemChs5jwClFSEJRN3VO6eEyUJ\r\nyF5xAgYU2W+aaZtmbTxk+SzQXrQ5ku/CUB4=\r\n=NjH6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-2d19af5479b5d22c0f28868e21694e561e8abee1-18.x/balena-jellyfish-client-sdk-13.0.145.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-2d19af5479b5d22c0f28868e21694e561e8abee1-18.x/balena-jellyfish-client-sdk-13.0.145.tgz","_integrity":"sha512-AYaF/YhK8+zTn+GvDe1ygNq+kRg9aFvAQXgL07H9/+dCUM9OMgHuBHOSIcnDUs/Jr7LHlZyElIRUNiGbcbvzBA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-11T02:30:30.421Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.143","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.145_1665455668679_0.14374271795093052","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.146-renovate-autumndb-22-x-87808cabc1b091235b4770f6585f56d2a3072cb9":{"name":"@balena/jellyfish-client-sdk","version":"13.0.146-renovate-autumndb-22-x-87808cabc1b091235b4770f6585f56d2a3072cb9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.146-renovate-autumndb-22-x-87808cabc1b091235b4770f6585f56d2a3072cb9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8bba7bc0857516b746c8a55067c77f193893521c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.146-renovate-autumndb-22-x-87808cabc1b091235b4770f6585f56d2a3072cb9.tgz","fileCount":32,"integrity":"sha512-SDxWbS7v2yvj+HUSEqM8VLXuEtnKJpwC8i+/WzAjfpebUhQMF4SWW7MARQuKDIWs0GLH+B62rUmmRzVR1Okrig==","signatures":[{"sig":"MEQCIBotZa8FrGkxSK2q1TkiYyfrZMGPC8ATZDL4HUeePlfhAiBk88UDyL9yTeytmr3+pKyB2C8jRpkxPXYM7qcP236bOg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRQK3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmptcw//fdparohm4VkBovn28k2CX/kWz3Oji+eA4ig4aSOIPHpQwyL+\r\nn/kEHd7uWjbJ/BiCDSuu///JxK1Lu5+j69q+/I8q0C2v5mum6TNHYR2sNM2u\r\n9DM8f1JUhTbKkQT4+/baRFeGXU00epaiQ4oVX2vaTf40cYJDPUAso3+TKXKG\r\nOmqh+QCK+MZnWBaEdCsOWhBwotJvPyKUl8stgNLl7/6zm1uarue4pIVsz8Xk\r\n65f9KIJNYfk9l18xgAAUa/BcVe4mlK57PUsZHN27CgmvT9z94TJwmnjSl4I2\r\nT9HxZmwGB/OA25DiIpale52hmbDQS4I5IOGTl5wkiIOB/aCsdV9ohLpkeL3y\r\ns5KSBDVJ4cCMzrB6oSJ+1bdAo0ybqW6PJKQy4ZfqWRTFhyEPLB4mZtVLHjOx\r\nb9+OQpMrMfGuOrhoZ2l5cisRMDeCHVXNahjkg82TjSsoIlbwrwqPr/DZ97kW\r\nTjwAJYbeveP8qhL7gJjlJrMKfdRLOHbMSnG5OaQOTuY6+DF9wNEraCfDUmFT\r\nbkkj3x0mbcqJSMjOVTWzYhs/wXvK6JudeoSZQsxrKDx5t/i70uC/KyBVTZcw\r\nmRM43/JdcN7xJkRDZqLemka6BMaPU1b8VedASgz1NYlnu0Ya8yoL8qU22n3U\r\nGTRknABjPyOCMSuXP3KIwSkpg+teW+6Mc04=\r\n=W+uy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-87808cabc1b091235b4770f6585f56d2a3072cb9-18.x/balena-jellyfish-client-sdk-13.0.146.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-87808cabc1b091235b4770f6585f56d2a3072cb9-18.x/balena-jellyfish-client-sdk-13.0.146.tgz","_integrity":"sha512-SDxWbS7v2yvj+HUSEqM8VLXuEtnKJpwC8i+/WzAjfpebUhQMF4SWW7MARQuKDIWs0GLH+B62rUmmRzVR1Okrig==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-11T05:42:53.621Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.145","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.146-renovate-autumndb-22-x-87808cabc1b091235b4770f6585f56d2a3072cb9_1665467062818_0.7686266669455475","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.146":{"name":"@balena/jellyfish-client-sdk","version":"13.0.146","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.146","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"15ba9b791df8646d39ece837baf777d117ca6169","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.146.tgz","fileCount":30,"integrity":"sha512-xwiNmQipN8WI+xHyHlHEISPaot+SWoDKYJZCAJjQg5hrNjgxGX+HZG5+9PmekXKHvJIePldrMNnuSDS+1DK1rg==","signatures":[{"sig":"MEQCICidhE7xRDQng9QRfX2uc4kJwRMz5MME0csTiYXw9YV7AiBqCOmpCtENvZModiYHHnn/+oAYkX1AB9272l8EWixohw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRQNMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+YQ//fc8H5UT7KUKmW3u+VRTiYthPaRC/ypwKHoiVS71mRgd+0CUj\r\nbzXCCb2vjAjqod7F7jG7OU0JC3Gte6WocJJpP8iTizarRvqG+fr7kP1DkWYT\r\n4tW4f1kNbnWlLDiWK1aP9JVakfXwb8ZihUtBXIdoM4sEsWQCE/TzQvevVtx4\r\n7i4XadZsu4d52m3Pyvl7qiz5zK8DLCVUNkecQXsbWaVNfhN0hu8cs8vrPag+\r\njnLxzcb+4MUB+9EbjOe6OhxCFcBpF3XSjsLXKybPq0qJURUgR8jnsL7/oSR9\r\nQBjf3FU1JYU+OVd6qpOFeg6ofSCBFDtC8kPx27xEFQ4hNsE7JoUX+XiVPeCv\r\nMac9+iDMTWoRmaP6ztLFHs9u1QTt8MH8IXCZtxJPmSvM0DMKZ0ox3HPxAlQf\r\nxn3ia4k74cE/sI7QWrHc78GQrt/ydsAz2ScZ2NfJG4e81c5RElR5igZJpflB\r\nL8JXVvpxpL0uFwWUCGhNA/e+IspKT+SkrMtvyD+T2rfyyZpulj7WVyYFhNwz\r\n0Je+865hlNtUeHIXMWkI8IVl3OewHPPvy7Gf/qQI9ljhZqif8FATgyP5WR3E\r\nLgjS//lWyA+xMxrqQiJkyzRyl/8zpdYayxk6WQ+o3WPdvltQjx8YiUxwOgev\r\nVNJhozHX8BzScvg2q2BSK7zJKUSJn2i3IiU=\r\n=+RmO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-87808cabc1b091235b4770f6585f56d2a3072cb9-18.x/balena-jellyfish-client-sdk-13.0.146.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-87808cabc1b091235b4770f6585f56d2a3072cb9-18.x/balena-jellyfish-client-sdk-13.0.146.tgz","_integrity":"sha512-xwiNmQipN8WI+xHyHlHEISPaot+SWoDKYJZCAJjQg5hrNjgxGX+HZG5+9PmekXKHvJIePldrMNnuSDS+1DK1rg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-11T05:42:53.621Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.145","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.146_1665467212163_0.2428272172697259","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.147-renovate-autumndb-22-x-77abe569d05ba16837228dd6e756bcf013d7b87a":{"name":"@balena/jellyfish-client-sdk","version":"13.0.147-renovate-autumndb-22-x-77abe569d05ba16837228dd6e756bcf013d7b87a","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.147-renovate-autumndb-22-x-77abe569d05ba16837228dd6e756bcf013d7b87a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a8be7a0758f198eeb894a88c41065e623c6d2e3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.147-renovate-autumndb-22-x-77abe569d05ba16837228dd6e756bcf013d7b87a.tgz","fileCount":32,"integrity":"sha512-U1l/iR4pgqAOZAEJuZtZPEOpQSjErBWAB8XO1dWvLqrtsezjgZITAjwaL7+94y7iTr0ANcHeJt719EqybyUW0w==","signatures":[{"sig":"MEYCIQDwJaSouNqMcp6T/QFaBXTwvxqJTTfW69wborJlySuMmwIhAPd9taDJwJYu8Y8gH3AaAJGtap061RJGl/McSpEkTzms","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRSS0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriiRAAhiwYQI3gdUgTTuvdR+XwvpAIUIJcRv06bseUPuK6rnUf3ug1\r\n7j2E0dSbwAIRWGolNlXydQpA4H6wQd4BLTMShJ4fnDFyne+qOd7CFWpHbmPl\r\n+n7ANPJqfwwQZ2OdOpFixw71DxRXFS28bb2YU2PHSll64ethm0pjw2cv4u7V\r\nGj91Aj/k9cVE6lr5o0gVKTnC5+PY5M7R61UVh49sFCyIJ5VhyJukDxdHTEmw\r\naQU5YjBmh0bkAwnAMl2VxoXDR8Q1DOw+KEHlPzx1fLfxLiYrnxFwKb35Yitt\r\nJiNqd86ZPdlURHFmoaKxZiMaBhuOYf6dFjsC03UA0uZO57inxIc/+aG7nez6\r\n8yUnqXRQoDHu9I8083dgug5rwSE4dawoGZKUcPlZ6iiO4GxDcS48mBlPOPNg\r\nnZ7oeF55Bk/VQga9sKJdY6ryoQ79gVzSW6ccAdYRuW2ag2zWeaScRic2HV1W\r\n9qthOU8kJMoNf4P0HHmC8C8kD+ivoGi/PZ69b727kbn9dQ3ULTUKCQf2XPPq\r\noRvdXiMII4YYcHDnLqsERaQQh7u3pXYzHDwvBTIhs5ZA9JyZNrk6ddtThRYX\r\nmey5sO2A6s1qWdhQA6p8IZ7LCBYobTeVLVhvldTzIJcACtrb0IFJGJKEymU2\r\nsk4KZe0x4GBceso1m3tbpXIueZlDzX7jLlQ=\r\n=TGl7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-77abe569d05ba16837228dd6e756bcf013d7b87a-18.x/balena-jellyfish-client-sdk-13.0.147.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-77abe569d05ba16837228dd6e756bcf013d7b87a-18.x/balena-jellyfish-client-sdk-13.0.147.tgz","_integrity":"sha512-U1l/iR4pgqAOZAEJuZtZPEOpQSjErBWAB8XO1dWvLqrtsezjgZITAjwaL7+94y7iTr0ANcHeJt719EqybyUW0w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-11T08:07:56.364Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.146","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.147-renovate-autumndb-22-x-77abe569d05ba16837228dd6e756bcf013d7b87a_1665475764254_0.4134973673443987","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.147":{"name":"@balena/jellyfish-client-sdk","version":"13.0.147","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.147","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ba5e0bc9162a99e3e85c138e1fb5aacb2f98ee74","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.147.tgz","fileCount":30,"integrity":"sha512-v1mXHJqzZVJVJHfO3/Rp7tVdZ8Ce4C4B4VAQEGUZs5TTAnhNSGrsgwZf6o9bNRg2WqrhxOHcBwQnpTlsRS0VWw==","signatures":[{"sig":"MEQCIBSq69X0sUMjEGBXV/vsHqd7GUapVBht6Xj6JdO4sBB3AiAtkmNqmkLOu66m9GZdd+MD6oTg/m7whfjYWqXcMnornQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRSU2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQyA//ckrmIkUV4a5BJVTcZKqikLsSCE+pqdu/D7E7ofQj2Ld81yu5\r\nOJf1ed6SPEUqXy/uxIqze1vgRz+oKCA9Vmmf3r+tqvKC3cK4KsaSrQdHQAdz\r\n6B+KYlONl5jMv4kq2uouAOMH6Qe/N+qZpmMDxOvIucIxEvxqN9WtlEDxmyjQ\r\n36XJ6AlUyZP5nTzQ2WcVgk+H0IuhFXdLzB47aME2QLGc2lEg78EnuwXSRLPN\r\nbAGrYdDdEEJOT+FErWxP+WjCTdEN1Pw0KDLI3QCho/x8LDMc2zEVWuTT4D3K\r\n0Hj/pe0RKqoq/XqDF2LLtvX7dnkZmwSZgl/x2GKGBvxwSl/JGk86T/SMLLgc\r\nT4xs3s2v0YpTbs120Ep9MepAuA9BhED31OcLWkB1IzSa8+pSSiGdSW+vY2h7\r\n+dtCQR4wZIGP4shUZ6vPjbJzYEXGNwfd1JgCORQy6bJv58XavbvBmFM0muup\r\ndKZ3K2PybvKIcYCU43oaRtzDbba7L72MMvPV9MbRZ96jTjfAeiJSqxQnqpSY\r\ngdKXAHe8mQIAFZmaztFfvJMcR2A/pmSm/zRnT45scs2AE2nhQJ+30Zvi1QXy\r\n74JprzYrq4aObPViw9/4Vb4ao6GWx+a8cQ55Oksnb3WdjkrBZ6v9zwnMkrlM\r\n9jgPy18Y2uVeDWNi9Ke4wZUO7MI0lEhRGVM=\r\n=X0hV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-77abe569d05ba16837228dd6e756bcf013d7b87a-18.x/balena-jellyfish-client-sdk-13.0.147.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-77abe569d05ba16837228dd6e756bcf013d7b87a-18.x/balena-jellyfish-client-sdk-13.0.147.tgz","_integrity":"sha512-v1mXHJqzZVJVJHfO3/Rp7tVdZ8Ce4C4B4VAQEGUZs5TTAnhNSGrsgwZf6o9bNRg2WqrhxOHcBwQnpTlsRS0VWw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-11T08:07:56.364Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.1.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.146","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.147_1665475894305_0.8433519453645624","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.148-renovate-jest-monorepo-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc":{"name":"@balena/jellyfish-client-sdk","version":"13.0.148-renovate-jest-monorepo-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.148-renovate-jest-monorepo-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c2cdcf882a767fc8bae80ca3163095fcdd6cf800","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.148-renovate-jest-monorepo-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc.tgz","fileCount":32,"integrity":"sha512-TVpOYdwROxO4DIKCH8vQcg0xGMu2CkmTc9hU1l2acoIJ9e47W1PkKb1lJmi6FIdjzCBAmekf56dT2Nb+Ja1REA==","signatures":[{"sig":"MEUCIQDG65Cys/pVYfR1Q2k0mmxvFNH+a8pD1C3hid1IULFs4wIgcpuwYegyOHI3sFfImWhpiVWrWhVXAYvnkDGZjpa9EpY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSgkQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqs7Q//cqx9ziS7L91zwU76pw+KxtMDiB4Ha+Ae/u4cXibXDNfdtLD8\r\nAKgIttT4EqZt6XXGNCDXtaBgZJy4RYYOyTRVbvb+s5JIeEyy8zz3ctM0bJ2e\r\n+VHRK4yomz58+8cPWERMJMqiQpc6I9uyWNuWY0FDKcV3nn1w3CMziQrzNzQG\r\nsPKNtHsyJHFHXv3VYF0Ec6WnHDWeufg5mG3mY/AGQaK5iutYdGcBKfMvtReq\r\nhmCNJ1pVj3y4T0st6bO36OHjSjgnYW1q9G89swtMDE5kWi9y189L0/+VJoBv\r\nc+N5DjOOjNbSZMp2yxuGcMKhoGDamZp2RVN83AKCDB98ohHtuNiNSzdwD0z7\r\nSTOQ+SugzgnM8Kvi3NoNibqK2ZCgwfeObN7pNRwZdfsDB4YCE/zmiL9TI6mz\r\nrcoXO0aXsAXiZ8HbAjHYBGU/Nq1gXlwcasau4UUiTr+sphzUrdjgtEKPsiVR\r\nKPcEGUc8p0jQaJishpTulw6aI2WWNDGQ+I1QAlHtFvEUbVfTuMnu9T9yrdnV\r\nCqUnqYnU2ipiIulH3dRQcCWkP1sI38Fsi6Q4xzwLDhBMLf3jDdWEu2DQMVB2\r\ntzuNZhHV8xImWELS9YHjC8vq0SuwMLSm6wvbe/ZXqJM4om4zHKxz/v5fQLoH\r\nk9NZttILwQfA3aqmjHvgll0D1AsXxNnPbk4=\r\n=jZZw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc-18.x/balena-jellyfish-client-sdk-13.0.148.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc-18.x/balena-jellyfish-client-sdk-13.0.148.tgz","_integrity":"sha512-TVpOYdwROxO4DIKCH8vQcg0xGMu2CkmTc9hU1l2acoIJ9e47W1PkKb1lJmi6FIdjzCBAmekf56dT2Nb+Ja1REA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-15T01:10:58.989Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.146","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.148-renovate-jest-monorepo-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc_1665796368105_0.9142144311193476","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.148":{"name":"@balena/jellyfish-client-sdk","version":"13.0.148","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.148","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9bc273bf54def0e6826e3723775ce9cca1c50881","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.148.tgz","fileCount":30,"integrity":"sha512-c/RUloUt3RjZ2cIyjfi2eHJOZMOgtq2EYa2O82kfRzCqf5kIZTfncHYgJMIRcQnZcSbgiQeVWDev9oAW+mMpxw==","signatures":[{"sig":"MEQCIGCiDokklptRrQq5HtvhF12/n7j2JsuTZDft1GdePefvAiBnOIgH3n1+6Syq+0X8ukSD9GjE3kwYWTKUsP49tz2ftw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSgmTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqK7w/8C7fHWZHW1+FYM6FOCT8Utm0SEed+vitfTyd+T7BvM9LiW0HK\r\n/IFJ8YWJiZjAM94fazGU7G01/vYmqDQcYTTyjX4apkFWsdNPl6dRv0P1lKdm\r\nMnyDWEuOaeYHJXhrUNCBC8FpopkWa5ZQ7nRJnizHDzchoU3A8gn0EBninp9J\r\nTbDAU9f1Wli8rZnOgUWIuGWNo+i+GGT2FJAgeG034RTCsNwPF/cRL5NsazQj\r\nQYjGVQ8eTqFyYHnuTCdXTTh4seDYt44/huCMh+nv5/4+zJqgp/vNkb63dthC\r\n7NJdYTZW7vr0hwDM/1ITHghrAz+4q/f9Jbcbb/Z1NjmJ+2wL2qtdckGIRBQ+\r\nWt4MmZ3KivBzCPVP34G6WU9rZid28F7Sa7CRXOcMnJJbbe+tbfWBatgfPubf\r\n5fw+UxPSYoLvPbg/sCkvR/i0c00RB6kVPXNxTiNw0hmAmU/Gd5MyjWz7Gaos\r\nUpllrcQKy2WnSCB310hfAkk4LJYwFMSnDoopPb9Az2sQn/loksPhzk3E566b\r\n/48Sph6Jmn1rc2D1hW4BgWoqMrng7iSkfqcHn2ulW6rJzeASvAPI+NBzeMpD\r\nMfaxbBUVoyyskSwxhdzMnwvKcLkPfluQh0pNJtIjXj3G5Ho6IZeSpsxBmn0e\r\nthET2fn6V4ZhdYPaS+tm7eSVbtNgPTosSfc=\r\n=CEEx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc-18.x/balena-jellyfish-client-sdk-13.0.148.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc-18.x/balena-jellyfish-client-sdk-13.0.148.tgz","_integrity":"sha512-c/RUloUt3RjZ2cIyjfi2eHJOZMOgtq2EYa2O82kfRzCqf5kIZTfncHYgJMIRcQnZcSbgiQeVWDev9oAW+mMpxw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-15T01:10:58.989Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.146","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.148_1665796499512_0.37211563265796754","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.149-renovate-socket-io-packages-364416a85c06c7fde0abf202dcd3319c33eef37f":{"name":"@balena/jellyfish-client-sdk","version":"13.0.149-renovate-socket-io-packages-364416a85c06c7fde0abf202dcd3319c33eef37f","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.149-renovate-socket-io-packages-364416a85c06c7fde0abf202dcd3319c33eef37f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f43d1fdd1fb1961409672493c46d26399e646c2d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.149-renovate-socket-io-packages-364416a85c06c7fde0abf202dcd3319c33eef37f.tgz","fileCount":32,"integrity":"sha512-YBYdXm4u+Um3GMB5F5RiNxdCtL4NRWNkAxi5Og58g8gmMhefNER96qYT4pRcN/eoPOqkvvpYNFS79NYpm2bMCw==","signatures":[{"sig":"MEYCIQD7DqLqTR1A2kdVM0nNjWq65XCbaIXDtrodyCgL/WLr+gIhAJi4moOiX6iv1vlQH4IOBgBE8zdqntjBf2pUZPLLs5Y6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSmDyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIWg/9G4H2q1EXqTWgHMlltGyGvpdrjQp0eGWY7nwUCWaiJ6RExRUj\r\nT7ZAqo06DpAB8DzwTzbamR12NNkqKJ95XLIUXxp3eMgY5FHcHCRs1ZNx51s3\r\nKYPBgd+rwDxfb8uulw11WmWwN+XFxbwQERTjNySU+/x1xt7J07TBqzOJt+K+\r\n8O6D7HSImTvkEkVW1Qhquf0BDiMYvT86BSSwd3hgeMLyKzu+ntgjyKSxORBd\r\nfbRX3avVC/A2FyA/jC+aE5HIS3/hphCe2niRMu6zJMk5jYRFyvBy8c2p56KR\r\nH/T5kCjiUn74g3LVwhV0tRjG6XCy3zUpwp9yY3lDt/GLft7fvGMTJtagvRW5\r\nUxwf9AfASSJW8cv3wFUVdk1FRTkS9SiZt4Z+fd4NZVl5cLv3GDYcBsJpF4ko\r\nTm75fiHezAH2xD92Sq4qPZMth0AQbcxF61ZZ82a+N0gdtKLKA1IpX6kHCi0S\r\nBJHSDf/tEVSrDLQ0kSSjV/jcG4V3qCJJUK/sAsYVsEtexfHyfuSuf5jj8FFM\r\nEiQLufgC/VZmrSFf9hQEjxe4g1ju3ZX1auE2hZyHjTJfG9ViydNlcvVxVboG\r\n6FvcFrSz9Xl+dk1+IxO/VtHWtmCjhMwWNMTdEy26oRc5oCcqXyLlWAuOqqSc\r\n80ra6O6qrgD9h9StfNHk7p2aVowpklpFK7I=\r\n=womc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-364416a85c06c7fde0abf202dcd3319c33eef37f-18.x/balena-jellyfish-client-sdk-13.0.149.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-364416a85c06c7fde0abf202dcd3319c33eef37f-18.x/balena-jellyfish-client-sdk-13.0.149.tgz","_integrity":"sha512-YBYdXm4u+Um3GMB5F5RiNxdCtL4NRWNkAxi5Og58g8gmMhefNER96qYT4pRcN/eoPOqkvvpYNFS79NYpm2bMCw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-15T07:26:11.473Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.146","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.149-renovate-socket-io-packages-364416a85c06c7fde0abf202dcd3319c33eef37f_1665818866682_0.4215160776703122","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.149":{"name":"@balena/jellyfish-client-sdk","version":"13.0.149","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.149","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8cfe4b65cb5465d1a89fbd4efadcc5c738b08653","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.149.tgz","fileCount":30,"integrity":"sha512-CVpY0mFxm9zVDWQEQdigLjxO4TVof51XBMHVyamtRBvXnsinO9Zr83wb/uJA/OopRNP3IFbdklf+Z2TTT3toiA==","signatures":[{"sig":"MEUCIQDWyWT9Z3nM/6EF1PmBOXm7SdmXargAJkOVPTV94sqCqQIgBVcvS0vImUGLPxRmxxzrwbk1i0rL9UXMhHP9z65yYF0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSmFjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1FA/8D1V8XIxYg1/7+hzRrY7Vsp6msJvGl+kWXItD985jSTh4kbtW\r\nF0QpbefUoFFIY406yXCWIlK5RDF3TffnYMSk6Vxcmx/eigfJR9PbK1QAm/0N\r\nNGSluKUDG11ve8cRF+0I6CxOktru/4BynbOMjOUpPK/cepNk3z0qsqOfrfD7\r\n1E0cIj//MEo6/J1lqhKnp/Bg91TBRkXficP1OMjMG6wtca+WvSMcXfXoWcki\r\nNe+qRRTleOoJMEyXWEQ7OZpk3OAebv0qfOQIcMuk0WmUdjpWcXifcf9/Y1vb\r\nwUncIGNgNXm5NlwD6nZPjg/ZFn0+0Jy7cHwEdi1fa+jmt8t/mb0U31h5oLvF\r\nEBB1gSE0XqOHGqli2fZj+nbZO0L6OJkAdmansmT0L5MQ4TF2OvNslcZ2itw1\r\n7lxvQ9b2xkMP4gwITk4LbOy1RUf35HcTB8BMrHFOzyuxY1VUs6E+ZhMJ0I+D\r\nqNKJhsasnrvMtivpz/aJi+j2f3ADOxSdomA1XMtTXdDUQUG7g7jx0KNqmqNv\r\nB+rCCu0kYL5ebMaBQXZ7HomJFoIP+8F4t3+a3VGr+2rQmRnohLYhbf7uj6IX\r\nP5XjGZjX9xoz74UlGjBe1rjO9hS2dSQV+ZGeJCRXrTw3SL5MBr2TLgmPs3mi\r\nv+9wF7jtje5CJYASwpxqu9vQSpFWAfBfrp8=\r\n=t3f3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-364416a85c06c7fde0abf202dcd3319c33eef37f-18.x/balena-jellyfish-client-sdk-13.0.149.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-364416a85c06c7fde0abf202dcd3319c33eef37f-18.x/balena-jellyfish-client-sdk-13.0.149.tgz","_integrity":"sha512-CVpY0mFxm9zVDWQEQdigLjxO4TVof51XBMHVyamtRBvXnsinO9Zr83wb/uJA/OopRNP3IFbdklf+Z2TTT3toiA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-15T07:26:11.473Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.16","autumndb":"^22.2.146","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.149_1665818979302_0.49820412020100036","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.150-renovate-typedoc-0-x-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0":{"name":"@balena/jellyfish-client-sdk","version":"13.0.150-renovate-typedoc-0-x-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.150-renovate-typedoc-0-x-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2e3425feac49ff82045d278bdb5a56aebe3a618c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.150-renovate-typedoc-0-x-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0.tgz","fileCount":32,"integrity":"sha512-X5ZMW4rhixOOZivBT8z3NnudJE4dB204QgFTF6lby05Li1zc8SKC2qLkjP4io7Ybfs/W+Rp56lI7+lLNe4Js4w==","signatures":[{"sig":"MEYCIQC5hY3r5fZqCEMGGlVoKLQFCqyej8gb1+HQ63HsfktF5wIhAL5LxDVg3HlDhgjZBoAK7mFE35ti/vRN0ooLLXZvVnea","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTidAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIgw/+JR7nlzGJqzGZReduH2yDIfSAQmKXVTWelaFf9eyDTzkKlluF\r\nRMsKWaXbo70CL79daBFVykSuS8MxgD4MCV3d/9eQDLNcVzlUggVaCuFSIzQN\r\nBnaAWumryxUUIzA/O6EBmv9D4wTc0J6u+qSwMD7DQcvICj+FW48bOwNggO4k\r\nU9J+k09yo7KEFIclh21CsCwL8loWAuvqtohwA6MsRLjPcw6OrmQoi1z9k7Kc\r\nnAZB4MoAQeHwQY6/ktIq/GYBrPPlqLCpR8vpTNbkEI8qogkXKScaMI49SA2W\r\nRierGQOJNvSJsPCQqiANcM3b9aMeiRqEcPHUlzLX3vJ8eZJ6RRa+6CEW7rqu\r\n4kei8v7XayybB85vt4W8EZdQjRGrlmfyiuE85dEZm8xI4VvkYjyANo8DPj1A\r\nZmYyQF80VGOe4RmxF+fBliJTY+n7jjF8i2tLx3pNS7rwxgucF5gAe0SJ41Tr\r\n3M85LdjrLpsgy2dBzQhfAn+UTc70AnziEWe8qqEBv0phGKL8Xz7dSMgbKrB1\r\n7r+GqJbfWaEY3PnLzAuSprYh8BgXgLdncFn/RBew+Mj8l8MIH+vutenYTxWI\r\nA0x6effNxbhJeSy8PK2h1XZ0GUqfYGOVOquD2JkUJ3nYpVH9UbphNfTKy5Ur\r\n3SnZG2861PlKRuPbavkuiaN3wbT3BKR5eg8=\r\n=EWAy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0-18.x/balena-jellyfish-client-sdk-13.0.150.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0-18.x/balena-jellyfish-client-sdk-13.0.150.tgz","_integrity":"sha512-X5ZMW4rhixOOZivBT8z3NnudJE4dB204QgFTF6lby05Li1zc8SKC2qLkjP4io7Ybfs/W+Rp56lI7+lLNe4Js4w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-18T04:08:52.327Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.146","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.150-renovate-typedoc-0-x-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0_1666066240239_0.3694060006240041","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.150":{"name":"@balena/jellyfish-client-sdk","version":"13.0.150","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.150","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"753f1a89e9372026ee0041e92525e494ecba83cc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.150.tgz","fileCount":30,"integrity":"sha512-pxLmgSanweaty1NvntEisGVRKOxgRYeZ1eb7v2lHgV8eZXtrxWALC0gLNkgHDmEsoGrAcf6JuQbeiivUDVh2jA==","signatures":[{"sig":"MEUCIQDkia+nTjioHRnWFMUy2yWmdTwDiqP1uxEwOymfU1g3+wIgRa1RrClMahhk7MOvqzLLFfaanl/llcS58Nged7J7zIo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTie5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoitxAAhivfjV98u6lVw/gIb5g2SulGp3P1gq/sCZH/84npLBZLhKe1\r\njT57myrVdoTkcnFSAYxXaVYHwD8deJLjZemPZnxyomvIG/bWW/4BVEX36HbL\r\npU7z63DKo5fcovfGDJF22obxANTd8FbxKCmuZAVDbj/1b0NiomsdeZQy+NJE\r\nJjx2dXb/tttlFvDEb/qfF3LvxlLl9hUPRzKWHit8Qmiik1c7Aw6ypKD8RAEO\r\nnk+z34krthcPc7OiCzpw6PxONAPrjsgwUNWnN7u+Svr1EiOJ5jD2YpaNqdvA\r\nQEUNEC//hb+zG0GBaI4tuBgVSnXlbohnLYz/gFpgTRxY2glMFxKTOeafcOyX\r\nO/kYjDFYn3JZ0C6Dh9sUKvTMhNEbI3GF+etepDq8bqZ5UXlCUSkidcOCM/Sc\r\nKn8pJ2vViRqi+syVjvLVVEKmSO1fIbJk/nRuLj+2ShPx/IgfByYPanBqDt2j\r\nLLwW//FmY9FQHRmBT7dN7h5Rfh73PBKWe8WFn6fF6E6RlLd+i/lNPxmWLeG5\r\nMCjm0zV33Mnpbubxa4fmpBYaOMQX5euX+na7lYV/hosdRAfFESz5nPyBIDuc\r\nD+MpD39g2CvkqsOPD27YMVvmAuNyvjx7JeH/8dsi945EcPr+mu7H3GhG23yK\r\nG50bHmnQBxIyWCW6Vh43yaz64o9Fbyh6wrg=\r\n=Wo0E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0-18.x/balena-jellyfish-client-sdk-13.0.150.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0-18.x/balena-jellyfish-client-sdk-13.0.150.tgz","_integrity":"sha512-pxLmgSanweaty1NvntEisGVRKOxgRYeZ1eb7v2lHgV8eZXtrxWALC0gLNkgHDmEsoGrAcf6JuQbeiivUDVh2jA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-18T04:08:52.327Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.146","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.150_1666066361147_0.363485855059416","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.151-renovate-autumndb-22-x-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.151-renovate-autumndb-22-x-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.151-renovate-autumndb-22-x-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b6209b61352ebce063a2da0f2a794c36364b3cb8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.151-renovate-autumndb-22-x-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1.tgz","fileCount":32,"integrity":"sha512-8Rpurvs75aD4robHQMT++hXxD9BtgNJ2+CC1Cw2k+NcpbQKZZbJJX3hxxcqUJL31va5Y+mkq48u8TsU8Af5fwA==","signatures":[{"sig":"MEUCIQCtXK3+/jtt0+eniZwAhGKIZDESqnCfTz7EME6kFYL8kAIgbLOGenzQ/wLcX4ExtDhozJnir71Z7I5BH78DXji+3LU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTlhDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpgcA//ZW2Y61meXN9eH+gJpfThoX/NbfXMGGIRKwfVJxguJFMPWgAx\r\nOZkWjPvqF8OJbgIdG9RkT66I/W/92B0ubijU852BdujxtJ8E46d9CsQgfKbL\r\nMjyWktS4JWHeJMs+K6lUlpIc9CxSCJBo9NQSOlqMPmLjr7BXK67AKZZUrOdG\r\nONCIffN0pz/8ENSG6GG5fVEFv19mMJbs0VAkYFoZcHbjpkLfMwBOPeBAAJ4/\r\nbp603cT+4YC3Xgf1r+fER0PryIYi6d+I40xLtuaI8Jbywg/AEIEYrgERvzyT\r\ncPNtDc2k4U11Mhbws+98FInmEG8mNsAwWUvoAI7Nv5k4Tb0cT/bcGIMmEKXG\r\nkQ5zN5J43i8sPdgA6chr3JcgDR11pKuBQwLLetLRlrAlHvaqukmKokHAo7SZ\r\n41zkCu+IvPh3z9X6s4WqPFuWGx9dPXExRM9B4ESZHfq4VR68JCx1q/+wt1MM\r\navGQpPF7ARRQVZEokuuK/MzTiiUjj6K3UIko9OJuNo/KyCwWlV+z5nMWSj3p\r\nrI0sBxeve1SQXJA5sJjaiUaaaG861s1SoNqpV6Vax+CJXpetJFO2HP6znc6m\r\n7MR0qcBJ9HIAsFVZtLcSBFao2gaqEjAMixIOJGMp3GeAsA0E9FtJY3VOpZlu\r\nUsD3vX1Jb/VNPH6/JJIx2XVJoLGljcqfXsg=\r\n=eKEO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1-18.x/balena-jellyfish-client-sdk-13.0.151.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1-18.x/balena-jellyfish-client-sdk-13.0.151.tgz","_integrity":"sha512-8Rpurvs75aD4robHQMT++hXxD9BtgNJ2+CC1Cw2k+NcpbQKZZbJJX3hxxcqUJL31va5Y+mkq48u8TsU8Af5fwA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-18T07:38:12.625Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.151","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.151-renovate-autumndb-22-x-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1_1666078787083_0.6356137408039957","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.151":{"name":"@balena/jellyfish-client-sdk","version":"13.0.151","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.151","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"002f283fbedcd1bc3d0c9a91e5d80f7a3166dae9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.151.tgz","fileCount":30,"integrity":"sha512-DAEmU/mhLTETcZa1JjKclk56PwdRakHgcgqdU/21mZY9emkka1jsTOQLqyFzGL4Qx0+NoCVvseGqwhxjeO//sg==","signatures":[{"sig":"MEYCIQCxY9z3hOc2Du70/ocFQPfGeSarzR9B54B4mGRWA4/8JwIhALwuTycFCAHUzVZplwsiWQgYrDClS8KFNPMJU1E9K4U7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTljSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXOQ//dxXnStLu4EcHUxyoVWFVFjj739bwq0gal0/fmvkHS5S7ciOU\r\nUtSrqpPg6K2p4o3+HqX6hXll8HVINuLWAPiYe77tjJPIHJdY0CfTs5MdqAs3\r\n/pR1OpomoDSaHPd5LppIFRt5Ak/AG0eZJ7ncRyV9pAlVYXDTg3wd1vzj4Dfm\r\nLU+5/jjiLNkqLSqPBOea+38+VJz361sNxLSAqxpPmj0GCcLvz3CoTvmwMCQ2\r\nw9xvKjRBFhGuT/bRXY2YsmxXINY2ZDowi5/SiSgLt00yG/bUjSPxX3sY+4Da\r\n/bK5RsHSqItRxB8I7Fpgi7CtRqlspYKI83r9Rpjximi2NZFiXywv1yQePB92\r\n6WsczwD1FEgyfG5zRSZ7HkoKiBiNxKmTbAqVWMI4pQq6Mff+mTJ6T3WrlqdG\r\nnwdqZdfl2iMwCJKpb/NlOdVWfYqgtSGm5quwEmlgFJ2LSNL+DjMpZT2h3+Da\r\nQuNJVSrhIBwEf/q9bxLdH1AFWqRqRZFx3ukpah1tjDhCgu7napQ3+opJKr7G\r\ntdZBdoeZBnBaNxgV74X2qWsBMFqyQIz7Iz1SxJwN7MiP6GYtCX7fUFOVdK59\r\n1KNa6yYCjf8XNUvIOlthvti7LREVOqyIGaIWznOam01Zi9YlGKGFVOJbyLMg\r\n4p3e+VVBs2DZcTqz1h1G4NnjXQRJw3Jgitw=\r\n=ckjc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1-18.x/balena-jellyfish-client-sdk-13.0.151.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1-18.x/balena-jellyfish-client-sdk-13.0.151.tgz","_integrity":"sha512-DAEmU/mhLTETcZa1JjKclk56PwdRakHgcgqdU/21mZY9emkka1jsTOQLqyFzGL4Qx0+NoCVvseGqwhxjeO//sg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-18T07:38:12.625Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.151","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.151_1666078930147_0.682428100409008","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.152-renovate-autumndb-22-x-fe472d5366bec8c2c463efdf8cd717e064c69a00":{"name":"@balena/jellyfish-client-sdk","version":"13.0.152-renovate-autumndb-22-x-fe472d5366bec8c2c463efdf8cd717e064c69a00","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.152-renovate-autumndb-22-x-fe472d5366bec8c2c463efdf8cd717e064c69a00","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"49c750fd4da094dfed1a49d872ed7dfbf7978092","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.152-renovate-autumndb-22-x-fe472d5366bec8c2c463efdf8cd717e064c69a00.tgz","fileCount":32,"integrity":"sha512-azVb4MI3xNuLJ3YrHHalxkcLbVzs1A3R9GzpuzQ9f1LmD/NZRbP6AfQ8LIPpUMnLR1i52n5AKWcY/sIYQG0DFQ==","signatures":[{"sig":"MEQCIBMBG1yoXRm7c196Ixah2gqHrT/+2heFwyy0q9K+Z3ezAiBNM55ba5wj/BVXZcdZ9ORzKQelugcl9DY4391qV17ICw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTomBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZKg/+Ic9IYjnqEwTxkUxZQAJ8H+7XZMvYOcERtj+RohfKAePl5vmE\r\ntEEr0yKgvzwrtk/lY2MjmH5j+wVLlVVEfI/ydvA1dwMfFS6OWr7+AVo210fY\r\nBfCc/XoDkdfUCR/UErdsdcih69v5tHNiuFwH7aqI50RhHOCe0lTaY3uYXuHG\r\n391KAJOcimHTClJJ235DVwpYBK5hic2yMQkBRYpUy4erA5skWxp1Ke20Y6hu\r\n6eC2aaThyHhUOO4eKQ46vEILsKN8DUkYUNIo7ZwLQcoZC9vRQjPAurmVqcGs\r\nml3cS2nsCYJSgJkgczmAS83nE8yTzEJbPpN9LafqpIS/ZV6XAxQou1PSyUi7\r\nbk+aDJ1z9kRPF2XlJI8FqYiVa9ROMGm9P2n1+UvNUZXF2JwVoxhs9rXqmRpT\r\ne6oJM7HLUpktu3Jea1O0tGfO3mDX84aQ4+xySTviVFxu5SBcXxb1F9vSHJTa\r\nEbUP4d9ZNuAZlctxHTBO1B83AqCFmJ1sEMvJHaqbLHiR0lrndxJ5cqr2JXhW\r\n+W0IovcZblPmY0M3ikr1VK2d4jQ8vrI1SnAGsQg9L9D9jPeF61ZVLtgivWKP\r\n+eiRVVfKlrHuJWkOycK/9Q2fYVyblj+QkqV1p+6W2wRbCLnko1ZQmXHbg3X/\r\n0hnADFTOmrtP1/BoPwL6mGXIL4fatM5CsV4=\r\n=URtN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-fe472d5366bec8c2c463efdf8cd717e064c69a00-18.x/balena-jellyfish-client-sdk-13.0.152.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-fe472d5366bec8c2c463efdf8cd717e064c69a00-18.x/balena-jellyfish-client-sdk-13.0.152.tgz","_integrity":"sha512-azVb4MI3xNuLJ3YrHHalxkcLbVzs1A3R9GzpuzQ9f1LmD/NZRbP6AfQ8LIPpUMnLR1i52n5AKWcY/sIYQG0DFQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-18T11:08:15.743Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.153","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.152-renovate-autumndb-22-x-fe472d5366bec8c2c463efdf8cd717e064c69a00_1666091393751_0.8053168471559113","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.152":{"name":"@balena/jellyfish-client-sdk","version":"13.0.152","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.152","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4c5ec12c995aba2f12f55b1b546e71a84e5105b1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.152.tgz","fileCount":30,"integrity":"sha512-wJ5yeDSVUCWjuvCqnJ8Qzqd2zepLBBzMYGtznbKdKwHGdactCb3lv3USaikO6HSoINa5bz6mnj6oAZSSxFCdOA==","signatures":[{"sig":"MEUCIQCTXrBSYSP5BUqB2uG/XVMXrqzRBnoOAqQpd4+daJLKpgIgfNmcEXAgQ9Jsoaru7y6a4/C2XCDyRoBRASuiPKSk6To=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTooKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrmaw/9HvUQSAc25CWbxnOgQKCHqWmHAxUu5a3K5GXcv9RH4J7kpIb6\r\nSR0b9pH71zO5W2pxef+3pcfM4bSJsEbIELBpRhWpL1tyN9eG+Mnxce3GQBIx\r\nezziv7BoprNs6AX3WaK5ef4gd7Khpiv3uEcgDShhx2jyuoeQv8T1n4V82who\r\nFOqC3oBL9OchZOjUZXp9j7ezjDX7BfSVig+5dY/ni8av77TOf1REWTUyo1a+\r\nEh03scF/CBHvzfPmrhY1dmgMuPulzQCRCEd/TIi9BKm3oIQ3oa8T2gR3qq4C\r\nezY3BE0fi9EYZnpqziT0SfhlFaOO4LKKlMpxE/xmUMjPnrCAZWEvQzLmWxoR\r\n8ZNGO3T5oHMEVL6N1VrMYRXJzqZ0PNYWwFz0c1+UL15xanlAhzXuik+N5SoL\r\nib/Vbq72u0MzuGUrSWNURN+2UDXhS8I7hTqnaVEnzzeGO9r4ggfTTVxt24uP\r\nSAr6isisM1OiM2hxGorpiiYV+Qb55QQ7T+2fttCSHx34lqza6BNvtJv5VHzI\r\nTnVLqpLPnyiWpajOuU+oEA7utisp4ec2fh1VkQlRTsA9AWcFnLfEFqTV8iyy\r\n+ILfNvKd0zElXDsUVXOtHPMXPNdc+/psCdyOl6icpPbsK7J/Fw3VZj1o0DMs\r\nYARXsDLKvaUlmwK8ae+4oBpg5ljW7yyiJXk=\r\n=pEpK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-fe472d5366bec8c2c463efdf8cd717e064c69a00-18.x/balena-jellyfish-client-sdk-13.0.152.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-fe472d5366bec8c2c463efdf8cd717e064c69a00-18.x/balena-jellyfish-client-sdk-13.0.152.tgz","_integrity":"sha512-wJ5yeDSVUCWjuvCqnJ8Qzqd2zepLBBzMYGtznbKdKwHGdactCb3lv3USaikO6HSoINa5bz6mnj6oAZSSxFCdOA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-18T11:08:15.743Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.153","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.152_1666091529767_0.5742573502941053","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.153-renovate-autumndb-22-x-6adf891abfb631431de7448600e858ef1789fb8c":{"name":"@balena/jellyfish-client-sdk","version":"13.0.153-renovate-autumndb-22-x-6adf891abfb631431de7448600e858ef1789fb8c","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.153-renovate-autumndb-22-x-6adf891abfb631431de7448600e858ef1789fb8c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d5b2fb918e890e01a0d2928923b5a3c7ad119053","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.153-renovate-autumndb-22-x-6adf891abfb631431de7448600e858ef1789fb8c.tgz","fileCount":32,"integrity":"sha512-qQiRXmRE+cbdwa2U685Oharfs7WlQWd1WVjKp3VkCSO2mWydIcRnPN44mpmiq6Xo3yT1BomAd2jtehypa81UKQ==","signatures":[{"sig":"MEYCIQDRnE1FJQe1QeXdoMFT9rXXjefMwA8soJlAKQ4/K2zzqQIhAI27VtrKW4yZ/PPWoietCfqnJGkcE5b7YMSJi+UzkKg6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTrw2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriAw//fYjN+ewEoYeRO2z89ml/3HAx4smkUKwqAZQD7CtorBdAbtDW\r\nJQBvG0uYvhsZtZmCa0EfaikC6uDCGKbEDf86D8NabWNtahYlFvdZb/wogAHS\r\n3eTzlQQ5ICjpuNaDzuCXozpoX7sXcUbQqo/H/4kMFW7Q3C4iijjSklG7WQwc\r\n9jshNEFA/2ghgR9hGCMEc/huu+N5SFPksuQOQRg3UazcuJDQZX6prp24v0nu\r\nHymwu41k6kmoSDrNNgaIe9X/DvVgqrGX5eWYD+C+ASjh2pkXdcBbfmw31qem\r\n/6Ga4Yfbh3n+kIMy1FBxqTX2TzQcHx04tDXEfHr+qbYVVBnXseRJsZ7S+6kI\r\n3qiOX6NFw4GApAoQH0pWK5dt3Dho2DmpbcSrxyHusUJoWOPS3jPX3NhOPAVz\r\n8uVjY7SUrwcxQE0UW8GawtNDJzsyuFwHAOZQw6MSn+i1riSNo3dCHpVgKr4J\r\nfuNPbzroXPRFOrhSjqy3E2+mf8+GEnBjIcZ5AMJLXSvYVliEo9kcW0ueZxH/\r\nGTVQBlV1BRJxAXRUdpAi5TPJKqzNF+eXTVnVNwV59u4AhvIeKDVHGvbUW3zL\r\nw778PLzcC8RnQ4DXIMF5FT0Wqr1wAkc5/YHU+WQV01cBYrP+tjBnpDcFZO8W\r\nyRWYFtGK9XXqm0/JwVk1As3QcaW16WbFxZM=\r\n=Mrcf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-6adf891abfb631431de7448600e858ef1789fb8c-18.x/balena-jellyfish-client-sdk-13.0.153.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-6adf891abfb631431de7448600e858ef1789fb8c-18.x/balena-jellyfish-client-sdk-13.0.153.tgz","_integrity":"sha512-qQiRXmRE+cbdwa2U685Oharfs7WlQWd1WVjKp3VkCSO2mWydIcRnPN44mpmiq6Xo3yT1BomAd2jtehypa81UKQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-18T14:44:43.308Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.154","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.153-renovate-autumndb-22-x-6adf891abfb631431de7448600e858ef1789fb8c_1666104373854_0.9782977557202903","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.153":{"name":"@balena/jellyfish-client-sdk","version":"13.0.153","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.153","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"da76571cf8b2ddb6d6444fb9dbd60b371ce559c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.153.tgz","fileCount":30,"integrity":"sha512-fW7TzhBN2P7Eb631GU1i0AFnk8ZvQzIrKgWTk0uLi4dyfu9+gzYlRUlGa2zN8AYoN+KFb46pUGk+eST6pkoWEg==","signatures":[{"sig":"MEQCIBOZNIDAF8pL27Si+jjfIOb3H7YwsALrtvg9/ECwFWtnAiBzJR5KS2FT2QRD3a+llIiyVvM/KJCJvQvH72Gxtak71Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTrzCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFzA/+OJk/m+GhKsr3zd8Wgdfeu2Ftl7qRXaAj7Qar2t3lSRAt9LDS\r\na0b1gnuos9yVC5IT5JM1Tg1zz36bBngSVrVTLBl3cXfm/NrleG9OtjLBHtF9\r\nbeL2td4CrrvG/Bca5AYseKL5Rz26gRuIIiJ8ZqOor/0WCjzYHYfxkOPEzb7A\r\nAHjPqOsvm3KOSAo5njvqBgb6QYajOS/k/wU9mC7Bdmd0Plow5NciMRWUVDru\r\n1pSYE9SZjljJEzTLYzth7ZoO2/pON6HNPG4SuyHwGzs5PUIsvgayR/EzE4Tr\r\nALMyiPHolb/FI6uXgk9u25gBRsnzPorGRXxz8HtMYS7jk66gsPcjc4kSnB3f\r\nv/kce55jCyd1bZEgYfsU5EV2cTCHVL7xk6bHbCXbPrE1YO1PnEtTKHKZING1\r\ngKH3S1R0Kj3DnNPiP28xIgKXDkXMfubUKqqJPADzN6IAGiXkE/sl6qvElj9r\r\nJuijzio+OO2LMtJrY1yBRE67YXtBgYeaafMj9daAnxckHHZXX8S7nCIehxVH\r\nEt+ECBmCYHtiHQsJOUkR9qd0mj7pKHicFWfI0m3xjVFj/S/A3a6665KEA2zh\r\nJJm1pwh5/YY2INsvTxRg9BUsSjIIq8R21qUTOSpYAQEQjeSyBQVztxZ45ZBG\r\nuMlZ23/3e5PcpvBHK2MNv6xqHMNQPzDUs3w=\r\n=b9n8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-6adf891abfb631431de7448600e858ef1789fb8c-18.x/balena-jellyfish-client-sdk-13.0.153.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-6adf891abfb631431de7448600e858ef1789fb8c-18.x/balena-jellyfish-client-sdk-13.0.153.tgz","_integrity":"sha512-fW7TzhBN2P7Eb631GU1i0AFnk8ZvQzIrKgWTk0uLi4dyfu9+gzYlRUlGa2zN8AYoN+KFb46pUGk+eST6pkoWEg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-18T14:44:43.308Z"},"_npmVersion":"8.15.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.17.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.154","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.153_1666104513795_0.4359178079721977","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.154-renovate-autumndb-22-x-a5d48f3eb27d8427e8734a4e482594cc9d539a60":{"name":"@balena/jellyfish-client-sdk","version":"13.0.154-renovate-autumndb-22-x-a5d48f3eb27d8427e8734a4e482594cc9d539a60","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.154-renovate-autumndb-22-x-a5d48f3eb27d8427e8734a4e482594cc9d539a60","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8d06e156cd8454390260b1aa65adf413b938378e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.154-renovate-autumndb-22-x-a5d48f3eb27d8427e8734a4e482594cc9d539a60.tgz","fileCount":32,"integrity":"sha512-fIB4moplO0N+cYZupeAuMR679pKwWDQEPI9dObtMkKf/jZeEtT5OeH1aIIS24ij8gyIu5H3FwX3knYWM/GkR2g==","signatures":[{"sig":"MEYCIQCO5UApHGO/2r6JzQQJ4pv8mIrOEtH0XS4beOgoUidJQgIhALoAFRZ3/zrq8LFD5gP6s0c2LPEubrK2O5kCWm0oZNyS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU18yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoxBQ/6AkPDw1mM3iesqdxibOoi0Booc9hxvjXyYWIDuzYzdyDp5CXG\r\npZJEChi/LGbTFf6lbOTCg2CKrDlIPH13q/FCYu4D5+3/Rebt5H+dXm/wZb9N\r\nX73JwZVrMGLG7sI1Lg6SQUi1uBBepJCNkQHIYQeUthpx1iItlvfvlpcMRM6a\r\n7y6vjvDupM3N1x75+uXR/Jy+gqDAMncAFB+j008VYH5iCOPGXMkdEHlGckq7\r\nZCFBs4aeUy4Ys1VktKPKZEciIZGSKBr8UpRlOGxqu14gb4MSH1PP6AZ32xZE\r\n5LvBH/tUPWzE7XVdlN3kYv3cPoHYhDrIakLQE3W5J3TZrRQ1Pdk6nX++/5Tn\r\nwbfmlthn46PDv26kkqrf9PXePyaY4KLg/G4ECcP5qTljor9g7nIF6TeRAZIa\r\nNz+fVRT2Dc9bu+wTEhOnmIudrsDzUSok0u4PaZfJDv+sW7lHk6RrByu0WQnk\r\noan0HNyiGIchZuMDlGn9iD4aUosTHrNjFqMkQbzYSFCjIpjtmhPZBcX0OURe\r\nSnriZ+V+93HMfKlHdjK7nYDn0Pqp4VtTOWctvNgmWyKtxN61F5LI3Cvsjf7k\r\nRtL/v2nNHAl00jCuLlw5cN+ep/7yw6C4nVKFEJRpqBW6U5t78WBoKmPX7ueZ\r\nz/Twv+LkptbO+z8weO330xz/WkmgSJ1DGbE=\r\n=DE9/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-a5d48f3eb27d8427e8734a4e482594cc9d539a60-18.x/balena-jellyfish-client-sdk-13.0.154.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-a5d48f3eb27d8427e8734a4e482594cc9d539a60-18.x/balena-jellyfish-client-sdk-13.0.154.tgz","_integrity":"sha512-fIB4moplO0N+cYZupeAuMR679pKwWDQEPI9dObtMkKf/jZeEtT5OeH1aIIS24ij8gyIu5H3FwX3knYWM/GkR2g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-22T03:08:58.960Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.154-renovate-autumndb-22-x-a5d48f3eb27d8427e8734a4e482594cc9d539a60_1666408241973_0.2940270204981015","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.154":{"name":"@balena/jellyfish-client-sdk","version":"13.0.154","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.154","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8c6a3f09648108d8b9a0466bb8b5d21bd5adfbc1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.154.tgz","fileCount":30,"integrity":"sha512-w92DWqidXMFYBRfoqblDVl0Vt+q6dqLbvfttgsxakbKxCSp63XbvatJSgi604vOgPhlqodAaii6g+ttOf1urTA==","signatures":[{"sig":"MEUCIDXMQRsU2rr1z59TRG9s5/FF9Llkey8BEVbnarKxdp/pAiEA7rAGYqsI0B6wXcC2HPIX0RPQB2lyk2+yAbKboUiRyBo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU1+wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqF3Q/+I2cJ8npXhG3ed6GnVdHCcSKJDZQjzVTNXGfXF0c4Fwpn/NNU\r\nY5ovI+mRnrw93ko6Kn7kixcoQXJL69mAZPTfnN7KgmaPARIEEzDb90NpLsVe\r\nGR5miHj95O0pQpE9aLzrEoTvhv63TaINuOLcBSPrjPam86jmr9JjK/9XAyhR\r\n6uqsScGDd5aNsiQnr4ovyG/y4eAdrWzxR3pfIy98fTm0lclJDsxdh2M8oURn\r\nn8LTb+4NaOeq7miGaaztkCmQScpI8ggpksu47yP0D6somTi6SogxDjWEFSkk\r\nA/wZXHOugkQj5kv7b8cM55gK6ev8AQgjNO11NsowcU92lDgbY1UPeXizp9Vp\r\nHPAphbv8bfC1YQEIs2Y9x4FHRvq6uspm2kVFOJD9cT54XBJxih7tqT0Xgho4\r\nLcOKH+M4Kdnl7RmqvcqB8edDA7OlBzpPeSG+WArS4dXZsVYTizXaJ4Uq86wD\r\nBG1632yHZIJsENZlhgkX1AVqUgTRHGwQVDIjaMV5B0x7SBzNY8pkkloyW/Tc\r\nCsFIt1/gz2+Yfg9rfBDVGM7Mfy8Kqfn5vTqsfPPeTeZhhOiW2b61TY2z3Iz3\r\nY1PRrfYw3eVzwp8gnFrNjeeU/VXQMHrbAHuULwZ3totGhs5IWD3CTTN9GN3x\r\noXdtxk+wCBauNoyaSKonGt/EroUsgiErF30=\r\n=A6kN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-a5d48f3eb27d8427e8734a4e482594cc9d539a60-18.x/balena-jellyfish-client-sdk-13.0.154.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-a5d48f3eb27d8427e8734a4e482594cc9d539a60-18.x/balena-jellyfish-client-sdk-13.0.154.tgz","_integrity":"sha512-w92DWqidXMFYBRfoqblDVl0Vt+q6dqLbvfttgsxakbKxCSp63XbvatJSgi604vOgPhlqodAaii6g+ttOf1urTA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-22T03:08:58.960Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.154_1666408368728_0.7675238351165059","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.155-renovate-simple-git-hooks-2-x-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94":{"name":"@balena/jellyfish-client-sdk","version":"13.0.155-renovate-simple-git-hooks-2-x-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.155-renovate-simple-git-hooks-2-x-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f36d6bc30d3c4efa5b31e52c4c005e95ad7e308e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.155-renovate-simple-git-hooks-2-x-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94.tgz","fileCount":32,"integrity":"sha512-1salmxdpM2/MgUFUanRl2BxIB70S5Ek4q/MyDy6Fee1ELKg375AyMKo6XP4Qbeq2i7tj8U7EEpZVVJj5Vb8scg==","signatures":[{"sig":"MEYCIQCZd2DJ/9/cw2epdJz7nXRn0Hf+MzkZPpK73bThi71YlgIhAI13HWtkqTf3oLfkjozapLvKz+JboUjYTrTYH28A67vN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU2BOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYYQ//T9T4PUI2ob4bqLsi/J5yXTLbgJ6ADJLRgjcIeCbYuWceij35\r\ndfmy0umC9m9T+Lxk3HCM15CQi5iiIF1KJ+2mKovNCE7I/WiBAGArY1MWLNZK\r\nnVQPge3Rzt7wu6vFzfLr0M5W/lQTmSJ48gPRQ4yekWQJGsdhwp8dSr+CFOsT\r\nn48GHEMOjcnD8Fndb4NphwrGK5FOpBxs92ThHQM3TCHJg6sEdIXPu0Hyk2WP\r\nqez/8xXL4XCJdQx1JWTQxhxjRPEazNxJfkvLtV3F7qzi1DOZXz9seVvKRGOt\r\ntFS31lAz5R2PV+6r+P2ZxBdtzTLYicVEfFnPR9cWicB2MZKjQWquYH17e2nw\r\ndADOMC3IbDFioz/EqqtOXqQ3eaIAz8vjoo28K1lVn4roAOm1SyVM7AUb5L9C\r\nhv09fr/8eADqtSBXDvX9eTs7VPTdGLwMSVU/x3EbwpMYVap64wJJ+XZByl+I\r\nNpeCekDPL870A2ddu4FNP21Yw/qGs5NI+nI6hzLslXj77S0FW6SV1gttm+tp\r\nb/4I887EtuTbNex7mVeiCw03wzKFTk2NnaVJnQRXwtemCZb37ppu1FmHdE4T\r\n60ACM4FzV7q7EvhrvY22XpRXu37LB7CU4JY5BIJdG9zAFP8qD1YlwpJJ9iwf\r\nssbVNgLT7IZkxkeNZavW4TRlx+YrE52e2WI=\r\n=4WP1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94-18.x/balena-jellyfish-client-sdk-13.0.155.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94-18.x/balena-jellyfish-client-sdk-13.0.155.tgz","_integrity":"sha512-1salmxdpM2/MgUFUanRl2BxIB70S5Ek4q/MyDy6Fee1ELKg375AyMKo6XP4Qbeq2i7tj8U7EEpZVVJj5Vb8scg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-22T03:14:02.764Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.155-renovate-simple-git-hooks-2-x-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94_1666408526549_0.6373086647511308","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.155":{"name":"@balena/jellyfish-client-sdk","version":"13.0.155","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.155","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e4084856f7a922d846869fa1f544cacaac6e1123","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.155.tgz","fileCount":30,"integrity":"sha512-zZ9Gw2e3c79huPwLMmTpZuA12Xmom4x3tRR3QwgVbP3nFzefYPKzA1FpkhzJ3BgyHb+I1o515YCrA1tgHkGqNg==","signatures":[{"sig":"MEMCH0scKIT3ZzD+iQZ7ft6/9fK+rcbmlELi9Vrj0dRZcNACIGKrKTFlX2t7FApfaLRCsx2/DJJHPOCreCwmda6KjWjF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU2DIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogtRAAhaVfrEzgPfakUiZ8a2LGo0lIaSofypvZgViiKcskVn9s51o7\r\n4D/Wu3Tawt3UQAdY+oF2Dp2gMC46FWLr0mSLLO4O7zb3Mx3HiSu8gwXkVIJu\r\nLkRAh7U/bmUzi8w7gi8dK0CVnbwkAkMyutj46yn/BprDLyD6jn1GV22Fgeiw\r\nIQlILQe1/kT0yeW+N59zPrtAvOUDW73BHiIwmXnx4ANfNvtlHEGfc90C4NL2\r\niQMgaWL7S0fuV4bsrsqXI0lCRQKLLDIwqTqdUamHjI/YaKb45W/OGsHMnNQC\r\n6qCfjpOBEpl9Jb9QFRDwS20dyECCsU95G2172BxLO8t1uj4VpwVCcXOEv2W8\r\n7Ws5CQAvDKJr4aeyFxKlYKVoJCYTvayG8kSdarSduKUIMWV9QeMV/9lQh1DY\r\n7SbYlu/lGQsc3qVUme5o+RyebEcerpjqRFcbDBIGnPW22UmAS54LIIL9OEwk\r\nDr8GksFMUXapV8WJUqNPwIdOZgoHku91zBr0n+xKET9WULTV2p4Q1iZoDtpN\r\ng23s2Dz0u6b/S38VgEiZfhXkdgrc5ys8AEhTHnp2g3h7+rRPAf2unrZEIWW8\r\nbWTVuzLpEAZg74eEOc4TiWWVWHsg8WIRz6rV7o6/r/l7uN87P1D7pSJzP5lC\r\nmNmW+LkfuoBFdsPcLfuvrDmbt+Q3tLsNg+o=\r\n=uip3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94-18.x/balena-jellyfish-client-sdk-13.0.155.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94-18.x/balena-jellyfish-client-sdk-13.0.155.tgz","_integrity":"sha512-zZ9Gw2e3c79huPwLMmTpZuA12Xmom4x3tRR3QwgVbP3nFzefYPKzA1FpkhzJ3BgyHb+I1o515YCrA1tgHkGqNg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-22T03:14:02.764Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.0","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.1.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.155_1666408648100_0.03719699040824498","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.156-renovate-jest-monorepo-7d7d56779d48733341cd09741d92afe50f046cf9":{"name":"@balena/jellyfish-client-sdk","version":"13.0.156-renovate-jest-monorepo-7d7d56779d48733341cd09741d92afe50f046cf9","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.156-renovate-jest-monorepo-7d7d56779d48733341cd09741d92afe50f046cf9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a2e0ca30bae0fd67f5839b53edc7fdac07092aa5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.156-renovate-jest-monorepo-7d7d56779d48733341cd09741d92afe50f046cf9.tgz","fileCount":32,"integrity":"sha512-f5XE6dbH7e33s2HhBtfZ7IeQgNO1YlZ2s6Fnftux1jBVhDWMOo+KaQXc62DQHFsndSI9nHQgq9KfyIgMEAA6og==","signatures":[{"sig":"MEQCIH62Yht4U1mYDcOOl1jb/YXSa7eb6B7X1BZID1mWmTAeAiAXWNNQ0oKE4+kAvkWlSdkf2LWdmZPH6T3Zk9pxNe1E+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU5AxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHmhAAghcw60ECjQQVb4/pf0Bl13Go9KS004hVvdtc7VHdOK+QjqHY\r\nmtElvvkCg7NEd1Vf03R39GU9UyrpviIIL/hK7ApCMO9R08FWigz4YsKfHcz8\r\nRuqVHfcWfX6t85agfn5zf40mw/KJYL/1ydjZS9hXNUxbUXMVGeQdrKI+hzNX\r\nJxt6AbJs29svVo9zZgcboqEa3BqsZMmMlhfwFdw3kcb0yeADZLldccz/uR7M\r\nlKAnC9tKlUsVCm3rAdmn1DDWOnPR//AScYOY45E8/zj2Wjke8ttFEILQ4iwy\r\n2PP4Ry7kEdTb19bwMN2sJDQ7xiWvHRxqa4Lt96PvGU1iH4MqzVuHSUmIkEoL\r\nn1sGbbdS+8x3Fkll6782CFmr4rRiwmviH5y82hdtDjkYiThZTyUKzVUxZy/Q\r\njailBZoon8cRPkibz1CZJkkoGX57mdaP+krEzUnyqms23VSIRjCMB5NXqPT6\r\nuIkC8kdIFzMSGPOl5wE/k8FklnwebWNpf/V01DBVhISGOh9jvJKBBtIvRbmv\r\ne8wNN2TzIBn3X8h8qk17GTfsEr/e2kFNnCxKkDvoJiPvVYD+drsOhrRd54F7\r\nMzkkZhv08S7UmjicCQ6QzhMd3lrVCca7cj9CGK6m4C06tCNw/VsAVD9JDw7k\r\nRYaN1ICBqqG8HWNf/Cv6yj2Pt/raC5LfvCw=\r\n=BJ2B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-7d7d56779d48733341cd09741d92afe50f046cf9-18.x/balena-jellyfish-client-sdk-13.0.156.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-7d7d56779d48733341cd09741d92afe50f046cf9-18.x/balena-jellyfish-client-sdk-13.0.156.tgz","_integrity":"sha512-f5XE6dbH7e33s2HhBtfZ7IeQgNO1YlZ2s6Fnftux1jBVhDWMOo+KaQXc62DQHFsndSI9nHQgq9KfyIgMEAA6og==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-22T06:38:12.925Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.156-renovate-jest-monorepo-7d7d56779d48733341cd09741d92afe50f046cf9_1666420784921_0.8455588385034609","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.156":{"name":"@balena/jellyfish-client-sdk","version":"13.0.156","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.156","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ff41729f15d6629ddd4154fb7d472984f84a2e23","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.156.tgz","fileCount":30,"integrity":"sha512-UUIh5ce+FTbBvUwzVJkWqNwWEMd1xz+GCsf5OQJWG9TcRQnzrTOwUi7Vpf33dCBzvN21WSYKkjSatDurgZ5uiQ==","signatures":[{"sig":"MEQCIAQ7PRiJi9YgL+EP6EDHRs8wqXiStclndXhmeGNOdoRvAiAM/nG0fDJ79l52LZmrFzFQkfEMHTC5qCbvwgFcroGCHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjU5CqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkTg//QiAgBwpmzhMamPmU1VztRw4mcC6oXK5iG8zIegYOiuE8qnXY\r\nhA4ottJ0KWQqosJAZ0kZKAs9MjE7qmhJhiBt6Frx/u3t2cQSDnv5ABqvbhy/\r\nOiVfCVQTH1Jpoxbd2Z4fhp4Q4dmt1wSoyhKY+/sdis2EJbNE0bPsFGQ/EFOe\r\noc2aluoJi8H8/2qiVOlTuYdUblyAcd+84LQ/MpuSPoO4dxM1/Iuo9qDduOEy\r\nUfulfhADs+2XV7RtbV+e7fhR/q8t7W7oDBmW2jW4ehyp7pQSNOwBPquAQqdf\r\n+kzTqxntyOBY41qh2++lsO2ryk5AFG5adukzhBeWegnhHY4wMlbimJdGSb0r\r\n+DM9xBwcypm4UpKTlM+zm2huVXOO2VcwXzX7dpToGLlmOw4M4IFO6/Hdf8O2\r\nv9jktmit5PZLVO/Xue3GKiRe8zqpSAxt9eBec6fLD0VcxeomqJDNVPl7e2U3\r\nzgEEBZKukHRAlf+hdanTQEi02/f9KzyEHYgOyPIVCXefLYo61zblT0q9vVlq\r\nGlKnOmUsAz3qwK6ciIv+ipsA4PvUuJO0i3U8NKNjOAKaujtLwqOvK1ffhz+m\r\n5wGbbKuKfJSIJiYJMJNAG0oxKnSEN5wtCdLt2xuFyQFXqrM77DnemeXzWFBA\r\nwrKQccTYrx7t1z0siMM9F4uVC/0S0JDtvCw=\r\n=XUjh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-7d7d56779d48733341cd09741d92afe50f046cf9-18.x/balena-jellyfish-client-sdk-13.0.156.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-7d7d56779d48733341cd09741d92afe50f046cf9-18.x/balena-jellyfish-client-sdk-13.0.156.tgz","_integrity":"sha512-UUIh5ce+FTbBvUwzVJkWqNwWEMd1xz+GCsf5OQJWG9TcRQnzrTOwUi7Vpf33dCBzvN21WSYKkjSatDurgZ5uiQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-22T06:38:12.925Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.17","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.156_1666420905828_0.6446452771356734","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.157-renovate-typedoc-0-x-80f781883d5a068b88c852df967601da04e5b88d":{"name":"@balena/jellyfish-client-sdk","version":"13.0.157-renovate-typedoc-0-x-80f781883d5a068b88c852df967601da04e5b88d","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.157-renovate-typedoc-0-x-80f781883d5a068b88c852df967601da04e5b88d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1810792ad44e61b74185acbf3b79c4cebf62811f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.157-renovate-typedoc-0-x-80f781883d5a068b88c852df967601da04e5b88d.tgz","fileCount":32,"integrity":"sha512-lWxc+sxhjRGgsGxhJyNe2QfP9uoq0ASN4lfsQ+LItoOjMckZ1fVfovkNNj3qhvdYs1fcs+vvrdHhJFaPnMp0Lw==","signatures":[{"sig":"MEQCIBCE/EzOTp7Y7azXWoB26yErTepkp3Hw6aQU7QnSE1t3AiAuW90+zsWLql7oSz7xjdmoyRAR2ZR1AaE2x0ug9K+HFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVbwnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoicw/+JTgqvbcaezKAjTQGJrtu8uMzQ//1VvWnZXXiSoEYNGpCsk1q\r\nmRsx0zWLwFyKr4i04rYijz7mpknmJJDYGo7TJZktAid0VQVr5tvdOIdZCpRF\r\n2TiD1Nt90f/B8waOmCpiFOdlufMLhzeGmW6YqzUW5xa8iAk+3jaflo4zi+qf\r\nWX/2bTEbyCBIBcu1Yl8xZRbY1K5ksxNcew6CLYMBxqWZlbPDkwgdA93yVhAO\r\nTfTAqy9J3Sgv+kBkilgerfHU0Nj4uTQLfYL1BXJQo0o1899Bf5vS6uIEyKEl\r\neDstmzv3Kkf86Ji9y6AP1tqfXUNYl3WtycBUgdXBx2DBXxAF8SwFKxAldkFf\r\nCucJi+JyK8zT48fxFQbFxPRzFXH2qZmeyW0SFFCqB2LA+EOOCY1El9JVtocA\r\nN8jaB61puMKn+jJ4km64+SSCJsIcPPRNPO9cmK8oruRjwuEC0yYf+xusFASZ\r\n5JRzQTH0iH6m00LkMPhHVtuFkzl5mShjFMgwLrsi+SzrgAsrFKYMREf9ZVol\r\nqz16r/vEifnjF/XN8Yiqyi9iVizkf0IfDeKAcSkwpB9BbBOtaa1fqwrqPxul\r\nl50LZeq9qhfNW3UBs4YakaxxhGxnHJDsv20rzoGUdAFmGyImzH9h4xn92Btk\r\nBL4hhJK3huJLa5Oetu+cBW+F64BIFya8E1E=\r\n=rFJ+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-80f781883d5a068b88c852df967601da04e5b88d-18.x/balena-jellyfish-client-sdk-13.0.157.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\n[![Publish Documentation](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/product-os/jellyfish-client-sdk/actions/workflows/publish-docs.yml)\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-80f781883d5a068b88c852df967601da04e5b88d-18.x/balena-jellyfish-client-sdk-13.0.157.tgz","_integrity":"sha512-lWxc+sxhjRGgsGxhJyNe2QfP9uoq0ASN4lfsQ+LItoOjMckZ1fVfovkNNj3qhvdYs1fcs+vvrdHhJFaPnMp0Lw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-23T22:10:15.917Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.157-renovate-typedoc-0-x-80f781883d5a068b88c852df967601da04e5b88d_1666563111387_0.021395442563703293","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.157":{"name":"@balena/jellyfish-client-sdk","version":"13.0.157","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.157","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"57151b3e1dce1f44d245ffec359636196c6cedc3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.157.tgz","fileCount":30,"integrity":"sha512-5ikDNLjY83SWrpnGhIWr96re4C1NKWsP9IsnbiwzQ2HHZ37rJHoeGJOShpnUxnktzn3pGkDRruFzXd+no19FnQ==","signatures":[{"sig":"MEUCIDqrLMrFO67jSGqoG5X2SijCMIj3/W/qOMpttq9EdEzkAiEA2ZiRoHsF5eOd0TJ8sfe51MJpyFEcNNLHqS7J502ritE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVbyjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoglQ/9GcLy+00cukBD38NC/tV6MIlz/+6UJdHQuJZDYeUJeHnadHw4\r\nTPOb5L7+FhwW6fKf3B5OsbJeokOlCF9P0zk48QV56ybGYQ/xGH3/AHK/y7VV\r\nc5Wv6tCaP+4TbfUv82WGiZKCmzK0JU18gDdjx6woIMaoLAr9uxjxkcDRq2OA\r\np/6actbUv2qtqSOQh3wPhLPY0phCyCe5nZZ2Ez3KE/GLtl9T9lqrJLaS0Z5y\r\n14+Rpp9RVSdrEbK2OBF/q2Wx+WFoEadSGL7jr8a7YPTrUooORJOptvLy41Dq\r\n2gk8jUr/i5EAEFUrYXofpNmqAH1Qjwmbk6unE8ztUkqmvzjjV62t2KTbI/pa\r\nUweuk90EWwAT7KURskkbmeibnkgJS7b6GmBdqt/cv85p80kHXNA5eRKOQTkD\r\nM23qjNQH+4+sgbEKa/IJJl42h8SuEDjCk8itf3UUA9o9LgkwNFEldXPBn2Ow\r\nCGj7zDdKgsQlzNdmFlRJayA/2V9++SwGf+KGCO2qNendOyA98Kd5UHIyq9hW\r\n/+bQoPpxXcenhrczcfrLUjC8GZ/t+KnV+ggdzS2X9VFWVFR4+P0x/k4HRBph\r\nT6I19ThvmJmV1DKCtRlzN/vB2GJjHeU0jqhb5l7YZp8YfhqWD4M2G/XAwACF\r\npR5ldBaqB76hid32kNFxEL3dPfVKaFBJcVs=\r\n=OsQM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-80f781883d5a068b88c852df967601da04e5b88d-18.x/balena-jellyfish-client-sdk-13.0.157.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-80f781883d5a068b88c852df967601da04e5b88d-18.x/balena-jellyfish-client-sdk-13.0.157.tgz","_integrity":"sha512-5ikDNLjY83SWrpnGhIWr96re4C1NKWsP9IsnbiwzQ2HHZ37rJHoeGJOShpnUxnktzn3pGkDRruFzXd+no19FnQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-23T22:10:15.917Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.157_1666563235193_0.45420012827169365","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.158-joshbwlng-readme-c80ae307103d0f2b6e953ef4605cfc33c1340842":{"name":"@balena/jellyfish-client-sdk","version":"13.0.158-joshbwlng-readme-c80ae307103d0f2b6e953ef4605cfc33c1340842","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.158-joshbwlng-readme-c80ae307103d0f2b6e953ef4605cfc33c1340842","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"030ef362f20885322ee93326d0efc4b60b3e947a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.158-joshbwlng-readme-c80ae307103d0f2b6e953ef4605cfc33c1340842.tgz","fileCount":32,"integrity":"sha512-I2Lvx0WRwGIsNdWAcfypPQ7zV9VcVINYf7u8I1sA8G5de35Q/OJw7i1pTTY6+xGNtE9y32RbzSo6AaEUOKZ3EA==","signatures":[{"sig":"MEQCIDVCwRpPQItvMQdTADUOGpVlX3CJ0o6c8QgWbIF+I7LmAiAiY4kjy7p7dw02g5FSBGopba0al6vf48eJkde62Zu17w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVe8fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPXg//XPppBikWUFkCd7zwlvd2vWQ4A7i59m47DYidH8cyc5X4HAch\r\n1CXZZg84C7vjPlN+ZscIublCHOVdriDPfQkELp0QtC07cZL/qMPvyjJkzp4U\r\ntZugb2Eww8ydHNRztElsLc0BpN4EJ8FiHJZAGIteSzqZxnMfmKKXx5GhnXf3\r\nIZmyGpOWA0aXe5qq8X0JwKVeR9jZr+xQDez8yC3xXPJrX+qVFjS6OJOc6Nv8\r\n3rn1ygB3OaTqhSOqNFkgDoG9N+Y6yEA1jpdDaf/0rsIx/Dq96GbRw6UkiymS\r\nqpgj5Qcz5QI2a1iqdGBg6eEGCI6N2cKRTyScWAP8LwVdh8Cx/YXn1N11RAYr\r\n01BvRfKsERiKjayUCJ+Malav9uVF3WxTFEOhecJlTYIXvfEJJuCoe8BbP5wg\r\n2ovZrwU9RF05FSzxb9gao9adFWm03G4uopI1GvplwQE7DwRDoU2pAR280DWe\r\nuqHori6ejrjUnPIPWpMpWmQtrW4UtRAYWDfdX2cPNEckwBz4KbRkpIYISgpx\r\nRC9efIhRzzrUn1n34LX+KZ8HPvfrRxnBml06akYLjfGkLAzFVuHwGsjQf5wR\r\n6mb6zdomsDO4JCMGt090swdNjDv2DO/bHMj+ucArXOgsFfpTXQZK2eEtrUT2\r\nI4Mau6JN712BRUBz5E2H/CbS8MmLZpmNZR0=\r\n=qYZa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c80ae307103d0f2b6e953ef4605cfc33c1340842-18.x/balena-jellyfish-client-sdk-13.0.158.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c80ae307103d0f2b6e953ef4605cfc33c1340842-18.x/balena-jellyfish-client-sdk-13.0.158.tgz","_integrity":"sha512-I2Lvx0WRwGIsNdWAcfypPQ7zV9VcVINYf7u8I1sA8G5de35Q/OJw7i1pTTY6+xGNtE9y32RbzSo6AaEUOKZ3EA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T01:47:39.948Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.158-joshbwlng-readme-c80ae307103d0f2b6e953ef4605cfc33c1340842_1666576159481_0.7855428381625207","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.158":{"name":"@balena/jellyfish-client-sdk","version":"13.0.158","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.158","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"01e1e84d7e8e0bfcb5b3dd5c7f319834c6fd911f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.158.tgz","fileCount":30,"integrity":"sha512-6i1qbp7GERT+yb8xlfu3jPzh9HJlB8KM8iRDRMTcZM8jhIMFnBUoB5Hkfk4MbeHwRU3YW0wlcNdXY+kJejkWNg==","signatures":[{"sig":"MEUCIE4ESmt/YHSLeXNnfgDRh8zg7FQ+DCC4KgonOUs53gSRAiEAgDjNMD7ZHgHaHa8YB8fJrYRxN7jk2zakyLzzy5CtIIM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVe+jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBKA//Zqwqo3y30HD6R8yUaPk0GJa4qYvaRcIU7IsH1bPAt7PCir+k\r\nV5pZPK84bGi7P0O6ElDGKGGru3Etm2zLUnzhjFYuPSeJfYMTV3tmeRQ/f3Ib\r\neTwXhE4tEAiij3YuNl8HyFCP9wRIJXaB3QxSaEOIUiauyMXOO4MNb7ohh4Rm\r\n1kl2gCVellXmkPVfqbkZ7JXYOK+OcXCUd0DyeJLjk6JX+Pa3BjLwI0G6C8ts\r\nppUbs5X8WW12VWuh9wKFUPD/2Eh28PhLGT3+7id+l8sw1cSwLCfOhFsm7HYe\r\neGhfPAD4cDddDP6rVbeUgNlNGa/kUcQ2pr/eOp8ILLkcPdJMXX71kf38GYq0\r\nHFDGJkgZJkXSxhuQJ8LyZTmRfDmMrjsw9Bj49CuAn7672ETvx4NOZkvYO0mJ\r\n+QuVSbR8EC2pEMlbfwjXAa0M84Yta/Imz7ibzJhFVTZBZ3+nRdw4kn/pmObJ\r\nn964od5dRulzIZmHKrXprbHuGV5PbH2vlrNsACWWDSNmkLA63KTEUjxFSZHZ\r\nJouZA7P7sxyFSXqBnr3u1zGvjPz/Yhh0BX8Ouq6Wa0FHdPde4YWPQPIezt2z\r\nc7TTI0vJTxxzemFKjsxT3C/LiRTCheVqhlZHUhAz/SdtBNMUAJVqMmLf6+w7\r\nJOStKBGjPwUTyPgSb60iaxPCPrNIc/2h83Y=\r\n=TNJo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c80ae307103d0f2b6e953ef4605cfc33c1340842-18.x/balena-jellyfish-client-sdk-13.0.158.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c80ae307103d0f2b6e953ef4605cfc33c1340842-18.x/balena-jellyfish-client-sdk-13.0.158.tgz","_integrity":"sha512-6i1qbp7GERT+yb8xlfu3jPzh9HJlB8KM8iRDRMTcZM8jhIMFnBUoB5Hkfk4MbeHwRU3YW0wlcNdXY+kJejkWNg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T01:47:39.948Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.158","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.158_1666576291006_0.7466719826718422","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.159-renovate-autumndb-22-x-0484b7c603240fcb9d89aaf3f8bad98a0434b8af":{"name":"@balena/jellyfish-client-sdk","version":"13.0.159-renovate-autumndb-22-x-0484b7c603240fcb9d89aaf3f8bad98a0434b8af","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.159-renovate-autumndb-22-x-0484b7c603240fcb9d89aaf3f8bad98a0434b8af","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"45c2df71fa583c417d0cdfa89854d3324452c0fc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.159-renovate-autumndb-22-x-0484b7c603240fcb9d89aaf3f8bad98a0434b8af.tgz","fileCount":32,"integrity":"sha512-W3vcMb8D5G8kFodOtELcHsNQ+oskqDQWggqW/9oNXRONHLuTMf8jY+toYMf9rB9yYDYDlkYq4E/LD3D/OFxHpQ==","signatures":[{"sig":"MEUCIQDq2GLgyc7PfZcPhm8O1ZmTMVBxN8+jfucOuwvRqBZcUAIgHQb8lkCin165Crkf5JC/nddu8u/MyFkvwCR0xLgM2Hk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVfBcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmouhg/+NWAF+R9cXvap0RvWWFDJD2GAMFZ7U4zWDRqC2Z3VlaEbq5Bx\r\nwx5vw9nnT/OK6GVmuj77O5NpkfwUu5ohaCGOhAVdZAcvaUR89w1jcUtNtviv\r\nNw+9qPgK+2Ak4vCHQWLB4qx496LTxnNoiB87uWEoQCDJWeVFUj3pdLRR6PAL\r\nUPQHcg/znQuEccKOoXKyIl0a4GAczWBVHMu4dzJ6w69UHiGqo6k2q1sesHlz\r\n0z3Lga6FrqAkI/RiX6dfiNeGHO0mweDhu01wQv9LZsqWe5eu2FO3cOXfuncg\r\nNhtLMhWy2bpQa4UWhpn87vS28jx8nSKvshhzadfoWcXR7ETBr4AzuGOVdPgU\r\nbVCg1GsGvp4hUhO3hsC4sdIx0uxupQhayhZTiwkykWiTV5QwdBNuhExG8m0z\r\n5Px4e+3ufh0UNphvOVcifGq/pvuA7u9sbKZJk4NcQQr8Vi58hoE86eJFRwEw\r\nYx3RPkp0Xr3VFKVc4qTucJekVo1wW50waV82ANQo3nwtPr3k+BKzjXaWI7ch\r\nP2Wdf7iFubBfREvpsNtSXWnk9XaDyIa0EZMLmduvzjkoTpeQOz6fgnyL5s1b\r\nWb1+17lc6G8v7bGgIYk7WXbQ7lXRBCNV1B/MVqnQwi9rWrequQO3BSDwNPft\r\nDIAUZuZIokmW7lAgrbZ265K8pNyQ6Lb3yKE=\r\n=j4ap\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0484b7c603240fcb9d89aaf3f8bad98a0434b8af-18.x/balena-jellyfish-client-sdk-13.0.159.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0484b7c603240fcb9d89aaf3f8bad98a0434b8af-18.x/balena-jellyfish-client-sdk-13.0.159.tgz","_integrity":"sha512-W3vcMb8D5G8kFodOtELcHsNQ+oskqDQWggqW/9oNXRONHLuTMf8jY+toYMf9rB9yYDYDlkYq4E/LD3D/OFxHpQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T01:52:45.703Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.159","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.159-renovate-autumndb-22-x-0484b7c603240fcb9d89aaf3f8bad98a0434b8af_1666576476287_0.9832786237885884","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.159":{"name":"@balena/jellyfish-client-sdk","version":"13.0.159","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.159","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"aa8a0a1fff32cdcc09821c07d929aadf2243701f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.159.tgz","fileCount":30,"integrity":"sha512-f5BIZwX5NgOU9KLZ7QHS3uTBPu8T1541hbIpK/NBdjKXbAnaHCriAYv9g/SwXdzPYVWnUx2/ri9nbM4mOd58iw==","signatures":[{"sig":"MEQCIGlho0/2rUVSLrmTAYict5unj1ebMSN/5bYrpxsVVzHBAiAYL1iPXn66n4PomT5QyP7CSlq3V6Kr+UIxgXGvKclqaw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVfDMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9EQ/+O2se5UHMCXvwEdFog9ZKxiigGXTEt1DTr/pJipiRT6erc5Qd\r\nNQhJ4XcKpIvCRyNadmscCjRptCXLRBKV1ZwLEJaAwv83XrQ0RYHVPKWXptIi\r\nTXj1Fp/ICN2d09Cbbj6tJB1gIE1QYcNcZpEmQjkq162YoWPYyikzVTRgibUl\r\nDp/Mv6enyTQ7BsCkHaPKSisKGEFkRcbrSLJkW+9qWTX6XrSVmkqoiQiHtT+E\r\n9FQx9BIwvvzY4UXNF3Iz+6r7ZLeRmtUcaMoI7wPx107wbGCWHm4vtiuUoJdv\r\nhNh6G48vEEgBoLmpW98uKlrUPatdSIJ4h3QlBqutTv+pp5wwsW/TqKUZhIpg\r\nHvuPVCS4u9he5YQOZiESHsChjbyP/6gz654MhgXzFyySmcB0z2zMQCNl+VXd\r\niVtoIObf2b5GohwD4tlJrJKQqwSTEULPols07CtLZNMyk0fRXV0CyNVjfzmN\r\n3OCNIwUZJwQ6LG5IRO45X7bynvwQtSsAhH8wrqzNG/zMzD98KGMBXj5d6MGy\r\nrIKG5WR93by4jiR0aeZcFxNaxfOx+USr8XMrXb2I7jTqacmSXLcEl/BkQOMv\r\nxTMN4ipL2unMpIP+8lT4VsHmfavyHrlvIWXUOQWaEd47y45WcLp4DppxrmSE\r\nZyyETeaTLbF6uZO3qaO+ByoYNArRzrpPQ2Q=\r\n=mInk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0484b7c603240fcb9d89aaf3f8bad98a0434b8af-18.x/balena-jellyfish-client-sdk-13.0.159.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0484b7c603240fcb9d89aaf3f8bad98a0434b8af-18.x/balena-jellyfish-client-sdk-13.0.159.tgz","_integrity":"sha512-f5BIZwX5NgOU9KLZ7QHS3uTBPu8T1541hbIpK/NBdjKXbAnaHCriAYv9g/SwXdzPYVWnUx2/ri9nbM4mOd58iw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T01:52:45.703Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.159","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.159_1666576588292_0.4664415103567494","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.160-renovate-autumndb-22-x-07d74a39c8b4479d93746c1a593b18bb2413d0ad":{"name":"@balena/jellyfish-client-sdk","version":"13.0.160-renovate-autumndb-22-x-07d74a39c8b4479d93746c1a593b18bb2413d0ad","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.160-renovate-autumndb-22-x-07d74a39c8b4479d93746c1a593b18bb2413d0ad","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a51b4ea3f057cec593a52ec45d553b88bb4898ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.160-renovate-autumndb-22-x-07d74a39c8b4479d93746c1a593b18bb2413d0ad.tgz","fileCount":32,"integrity":"sha512-Cp55vfIM1IatWEcw2tb9tGYtplxZy5/wGX+mBhrtmjzbkGm6FoMBFnaGJJ1Vl2dczWNMacGNdkjZijRp47MIVA==","signatures":[{"sig":"MEUCIQCYJkbgQheZAMhmGlC4CNeGC3BIDheoZorFc8Ya8a/IlQIgd3zzrIjadoePLbtJiCcTJE0zxg66MOp+v9+KAHpwGcg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVhirACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmolqw/+IUVBhil7B1iKFpyGQEraUJQ1X20wa0C5x8Dr4vuqtysGwy50\r\nmKSdIR5HuLFsHnrqjK8boSBMZawTvAVJYOdgDXdn4n6zvWO+hq3BnJc76otO\r\nscP9atCCqIZRgsRqGFo3FgDOss+6zD31RZHCnsX4Puw4LWU+JQMK+epkC1YN\r\ngminvApmWKX1DdEnD66mSVlUgu0zAclCSu7uolg5qXzzydY1Z69nzYdLaMVd\r\niy2owCW/Xfx9NEwlQZX2hG5nZgzsmWWjZeG3NwkoRc4GR5BRdNdUvSsPP30K\r\n+qKcqjrz+pVajhDzsWb9ECrNXspZ8qM3LPyBYCL5dTvCgjxqpQmF2TiLEQsy\r\nLe6zmlL/ZqYoQdhQYG5Jn+cJaN6IreaCSKDlFskLdpHlQpqzcvvzJhMe7ujp\r\n1ZYfxVBOXvjtWQiQ8Ltw8ZFOqfm9OvzXvmqTyRdVT8H3mz/GtOEw5MJnaJAz\r\n9hFGISHslCMbOJDHxYtKL0Nx65L3wQAAg8yyrNMsD0W899Pa6nQlDHIUXTeF\r\nuyCGISYuGqMyo7QGqZUe7s889HDQvluQwU0B+AE0je72k1GiCMB2uqZIkfn3\r\nO2uBcn0NBFDC60ogWXm5VnkTjAXL6HT+CwKgXuCdjh5uIgmhvGmj6TheejJn\r\nEMXmxPbfACY2lO23WLeb/Hyz1Y934xNoAYw=\r\n=zKGC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-07d74a39c8b4479d93746c1a593b18bb2413d0ad-18.x/balena-jellyfish-client-sdk-13.0.160.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-07d74a39c8b4479d93746c1a593b18bb2413d0ad-18.x/balena-jellyfish-client-sdk-13.0.160.tgz","_integrity":"sha512-Cp55vfIM1IatWEcw2tb9tGYtplxZy5/wGX+mBhrtmjzbkGm6FoMBFnaGJJ1Vl2dczWNMacGNdkjZijRp47MIVA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T04:44:47.202Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.160","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.160-renovate-autumndb-22-x-07d74a39c8b4479d93746c1a593b18bb2413d0ad_1666586795763_0.1531626013249463","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.160":{"name":"@balena/jellyfish-client-sdk","version":"13.0.160","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.160","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b4bfc591ee2a4ed34059a912bae9f2b4e8fa0c2c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.160.tgz","fileCount":30,"integrity":"sha512-mjKXsd0OEwRpSbjyfddUSjrGL9SAR2wsw+5JdCSf+Fju/OzrygIhsXrLKDkHwRLbSNwzcqI3wWuA1psTtFx1qQ==","signatures":[{"sig":"MEUCIQCAFjPUlQHWyPAIO1X+fXJI/pkPenCOKSFmQldPfFDa2QIgevdEx60Jzld36j8fFijlt6otbCZa3xTLH6iYTNmnxlg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVhkyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopTw//f0vU2ogoKMeRissgpgQ1gu0StREkxm614bhW0anJuWxWAfSR\r\nYiF8VBT7VccOIf+uKGDyZz7yQCnm9Y+OQyi+Ih7iCu2WaE9LIXZXQHa/KIuj\r\nia7KdjVBs6onlekdxwHbSZMCoh+CZFg/CwqAIza3RVulidV7QVAhArbWTQJX\r\nSecrbXr+MHwQt+vZJvYJIGVb2sVBSj2ZPNkVEuapINj5RlqLEBQG78zyWLed\r\n8BKGMgxTmFULdSH9q4Gq8Ulkv8ylFW8mZJS7ChSJTMzE5f0rNUb4D+lsq499\r\njAhWAzkneFn0tP53yEYx3k9k1/YQDWRyLXkvUZE6uJJKLpg+mqxi6pZfw635\r\nokvKdxtwNT+h0NAral4NZcqlrDGwCvGG3yHsKmvua8Pnp11ldPkRF3Fo681A\r\nKqALo9J7QUKSh9njEYVEiCLuxIAWAiIU55zs4wJ6AxQ+3mBwj+Ba01ElkBwt\r\n+MNjWrnivEC0ny2eX7ncwK8ZQsbF6tCJjL71SdhswEPf+p41e7ifgWcCUU0K\r\nsRXbl4AbXkVVWzFyL+olvGnJB35MWVS3B+cxwnnryZF9GQHfZNslOODLsrxP\r\nwlLvi87JEdJRVg8YK7L0wnDU+FP7U/6teJcm/+R0sc4vTuhO+P685kPwiDkA\r\n7UvW0wenKdBEo2+z4wSjKEPmvzKtGphuv6k=\r\n=Q2Q9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-07d74a39c8b4479d93746c1a593b18bb2413d0ad-18.x/balena-jellyfish-client-sdk-13.0.160.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-07d74a39c8b4479d93746c1a593b18bb2413d0ad-18.x/balena-jellyfish-client-sdk-13.0.160.tgz","_integrity":"sha512-mjKXsd0OEwRpSbjyfddUSjrGL9SAR2wsw+5JdCSf+Fju/OzrygIhsXrLKDkHwRLbSNwzcqI3wWuA1psTtFx1qQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T04:44:47.202Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.160","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.160_1666586930035_0.13877427014444765","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.161-renovate-autumndb-22-x-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0":{"name":"@balena/jellyfish-client-sdk","version":"13.0.161-renovate-autumndb-22-x-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.161-renovate-autumndb-22-x-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df4e33aef25c59fc857f27e4adba136fda30a814","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.161-renovate-autumndb-22-x-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0.tgz","fileCount":32,"integrity":"sha512-cOr44Qna3EGVmEpPreqC1T+CT0BaZ6AMQvY0AfI+iXIhckXQb4k9m87uhhJKpU8orWgeZF+9ud+rdfUNJfao2w==","signatures":[{"sig":"MEQCIEkvkVJU0lmnKQY/tKXhcr7wq2yfGfyCdUGfgim/0A9QAiBBOwcRe6Vx/Ledz9JXA3sRERinmzWrCw8nl13dMKhRoA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVhnSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5wQ//Vv5ijJ2IXV/7ECNsavsIif6/aqir+5eNruVK8GURP1QMrAHr\r\nStLI3kfdM5HBOEzM7DUmbScPl577OV0EDF1n58zAXJrvMA/38ADyQvE89wHE\r\nHdOEjPxdTeSxWfIbilKkyegRl1S/aJ/j+jsbrb+cnUSviFRHZAbUOj2DryZH\r\nBljvQq/bkQIi7+2/2QK6MXI0hWoTC7gT4tV/HYEmmoHGn1mylDaAeBTPbVmS\r\n30SxwuJqvFxxzlzyYYGMTxVq3gTBVJ5i9ologs2nZefaC8ZnEoLj4gdCEOn8\r\nfL7vLNXgIr0ATKYPPzGntDeZNDNrCC0tqEvetFbyhHTcPaeoTHfvu3WkxuAG\r\nXYAHGM1kdBk27qvlIQIshAeTMjJjU6jNscT7UashtxbcMfqEFZ+P759QHF1R\r\nozRD+nSULskbFtyXsvu44Korm/GN8fZWLyKKOYY+gitUfi/KSZU4nG8roxzV\r\n2h9el5Pz5TrypfuiJShhMjYfdzp9HcOiH3eYeJzNwPlbesfDCwUHu/2A2yZZ\r\nWZu6ciyT0oY5oHZ4PFDIvymIyahYLrJZhwK6A04noMYq6xIuWa2pJ5anq8rq\r\nxZYzGFBjq4Tt1SH9GnvMZzmVm9lh0upZ6rbF6bVhIRsA/xD950k945YzukPR\r\naggs6ejx7TyjKUSRGJ2Vwg/BrvtiC9LgldA=\r\n=iuAl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0-18.x/balena-jellyfish-client-sdk-13.0.161.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0-18.x/balena-jellyfish-client-sdk-13.0.161.tgz","_integrity":"sha512-cOr44Qna3EGVmEpPreqC1T+CT0BaZ6AMQvY0AfI+iXIhckXQb4k9m87uhhJKpU8orWgeZF+9ud+rdfUNJfao2w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T04:50:00.038Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.162","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.161-renovate-autumndb-22-x-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0_1666587090393_0.1922704866743774","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.161":{"name":"@balena/jellyfish-client-sdk","version":"13.0.161","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.161","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f5aacf61861ab764c292c8e2624c9620b9b57aa6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.161.tgz","fileCount":30,"integrity":"sha512-ZS6ntS5+95rFp7YGsQdDn6/9OAWKxUnGQY79/i+gE6y8iE15M7O0ECuFj94Mw0yLOtDCgshIL9gWYmQO1tM28A==","signatures":[{"sig":"MEUCIQCZkbYkTbpAMX/oIC8635S2VJkNK93r+9jNPeY0jIjPQwIgGyTGHT6miOIuTW2Z8YJnqBONWnMUujMh3CK9l6E0EiQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVhpeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7ixAApQ1PWSB1Mu+k8QEWXMYM1GQ5EvRnepDSSaXCI+eKL6TnYEPK\r\nkgB/v23tAuI4K3gj4nNosxrLTsAH/ydJodFDXmAIpQbi7meYO7YutwwtAfRD\r\nCmnATnaF84IzYVhGG00W0viq/t9Ik7EWBAwicm9lA4gSmqU7V3CcwO2VMODl\r\nIRTMDshh27oKRokJ+fZnWZnnbZdy5Jse9xKNOo2TbvzWDBDHRMQ3oeAe0ouG\r\nua7JW+1Hkpx1NRixE4gCZm6JFh5InIY7X5+Z0TMs4DmHCAOwLHPReEv0txEP\r\ne/dn/2RtcQ7g5r77a/ZrzLXIHgQGJokqwmnj94vBAjsdAYOpoIzkXkQMWGhc\r\n/67ERou2qCBiYUSX+nMVZeb7U+huCcbhwlVZN/GOIa65CuMIH0yNFp9RGsLe\r\nzUEp6eVI/acSzbFyx0GPbX7KpsKEMSVMkRg0Lo9QKpgqyYDTnZf5Edt+8nra\r\nNzH6ZWSLqvb+sBG4bOSLzbqst8WcHpAc81Un+fu8RxLPLCC/vYpWZE7c9jeL\r\n4JW5hvcTe305O+9Xzcn739eb86vL7ZAWhG8+8+yt9TV5LDh6GABognDGWcvE\r\nkPS304TLrJj0DLVgTInVg69ZGtdwmWSn2dmtYapgvyXbtj/teBEcEY/fHkaN\r\nIwKkdnTKhWWuRBHE4rGnoxG9u46cYuAM4PE=\r\n=OGfi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0-18.x/balena-jellyfish-client-sdk-13.0.161.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0-18.x/balena-jellyfish-client-sdk-13.0.161.tgz","_integrity":"sha512-ZS6ntS5+95rFp7YGsQdDn6/9OAWKxUnGQY79/i+gE6y8iE15M7O0ECuFj94Mw0yLOtDCgshIL9gWYmQO1tM28A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T04:50:00.038Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.162","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.161_1666587230750_0.1562524465052917","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.162-renovate-autumndb-22-x-c5b1c9d61417bb909d0683bf826eff124d0ec546":{"name":"@balena/jellyfish-client-sdk","version":"13.0.162-renovate-autumndb-22-x-c5b1c9d61417bb909d0683bf826eff124d0ec546","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.162-renovate-autumndb-22-x-c5b1c9d61417bb909d0683bf826eff124d0ec546","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"917be58e17c014b3737faed9a023860e8111bd26","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.162-renovate-autumndb-22-x-c5b1c9d61417bb909d0683bf826eff124d0ec546.tgz","fileCount":32,"integrity":"sha512-d7sYTZfoY9mNDBw+O7Zzb20ojYHigV1Q6GsqcLFV657Xs/Cr5rXeLcUI78S2AHpn+lkSatxQK2RjxijEuLUu4g==","signatures":[{"sig":"MEUCIHziEOYG8CbvJ+4F2PYjUfu8ZRtl/JGklCinDVpitOvqAiEA7T62SSgAdr8dRq7lXEdBZqdLMqX5qaBDwFis5HwJs/U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVnR1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHxA/+KYxV3CqC6fnRYU6LhUboJslg4SJ0R5euozRmoEa4bGrUe0fS\r\nZLrCliTqQmcX3yqutBAK0xbh4GtKgi0v1FIZI0bxbaxWKkgLvtdpHlnpGMHn\r\nQuO9Vh2Cds3lcxQItjTN41bhNsnTrYb+xWBZ3jMtAHa/rAPlvx9E/LVkzRan\r\nUpUEqw18wlrFU1O7E7q1sqto0ceYiQ7Hlg4mox7PqpCfawwQBYAz94dYoiVn\r\nqAH430afB3Pqll6KTTURdoHeUCXPwOcHJrnDiwGP+TF6yhmSjGfT+nkO2HvK\r\nI5N3xSy3L+dd1CDCDJHRXVpV8C2SWHg8tJkYAoUWQSQpf/5wYUrjCgu3FoSi\r\nKW2Jg5z+yyjZf12w9LMzn2nbDAyue4W/UqYBkYTO1xoEPor6ov2ghA+swy0P\r\noVxwayHjylWIiprDCf7yMi3eOn0tyiNcPN6ujT9wW/4pQdnrhevWjyZUqYvS\r\npYFKyxpzGD0Uee3UkwXicsRV6Es3+Hxpsmql0GDxLJYQmVpUk+O0JL7EP8QZ\r\nn9z5JZB2fEg8myOohHN3rMu7F6CpiX3hnrlt2vKL+Yc7T3L9qd533F85BjtI\r\ng3JGvLnjPLm5bR6O/QYj24RPJHuMeL7nlJc3L/BVk8K5QrJiSCKiG7pJkQng\r\n/ZQHWXtBo7ceDINj2hluPBGxAZlwhVPRMpo=\r\n=UAjQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c5b1c9d61417bb909d0683bf826eff124d0ec546-18.x/balena-jellyfish-client-sdk-13.0.162.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c5b1c9d61417bb909d0683bf826eff124d0ec546-18.x/balena-jellyfish-client-sdk-13.0.162.tgz","_integrity":"sha512-d7sYTZfoY9mNDBw+O7Zzb20ojYHigV1Q6GsqcLFV657Xs/Cr5rXeLcUI78S2AHpn+lkSatxQK2RjxijEuLUu4g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T11:16:34.042Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.165","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.162-renovate-autumndb-22-x-c5b1c9d61417bb909d0683bf826eff124d0ec546_1666610293110_0.33865085970504505","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.162":{"name":"@balena/jellyfish-client-sdk","version":"13.0.162","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.162","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a3020a78cd37f558cfb457be0e15e42807d45545","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.162.tgz","fileCount":30,"integrity":"sha512-1PihLresxwtydVbqu6mxQpBXv5pFhpYq+DgstXVLh8RFlXhAQnRUOgBShHc89l84+nfS7lmShbpdG+DzZUyQLg==","signatures":[{"sig":"MEYCIQCp+mdubsIqTrmRVZPFbuxd2BUsffa+CgOCrK9+Aou6aAIhAO1kr4WpUid0qyd4fiRXWkob+EjYe9WnIXP1p2BHKFNt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVnTzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqqtA/9F55nd+5nNJHNj/QIySvUbuX4Qhl7zpNEdB/oHaASj48MS7Px\r\n1Z9KHXWtFd1im+B18Olpm/Z4PD6io4km5NjfgiFRCot/557CHy3lxUQFoboN\r\nq2YaJWm5v0R3WspbgzqXlxpHbidm8KqHA/o2OFKystn3wqQq53sPi/EpZqPc\r\n+zdAkSUu0aJ3Q/PJMPN66V4rycqMux0EXd3IWVD/LS6/Y+oEW46WJKAM76mY\r\n78v6t4fXV9r+0sA2K4K+9v9jb7mFcv7kWtTpR+lxJpTsYVx4S/jqChMo1bZ+\r\nuHdSTaSVNtQdYlz+ihWVPPKTaFXEBwuIgm7E8O3VeVGJfw79QPAQEWRWiAad\r\nUrZtfJEcg5ZoWh9CFc/ywNZmy2qWPaN8iegbloa6l2PDuwUpdzi06Twi0AuE\r\nnipT29cXWVwCQ7K3EQCsk0CqFH+GyDRDilwFPaZM8DhOa/tP/KbFMz/DAHZL\r\no3Aoti8z+vf0SSyRtxZeLusvRvMLAYX+6J305E9Jk/Jz9NJFVoUsK3UiaAxd\r\nMVmslrx/wahg61FM68D+qVdEA/BzdhzeWHoZFm9bqL4RDJ1oktWA5AjVaEHn\r\nHFIgzwncuQCQ1YINyLHWJHku+QeM2Xl2xXS0teE31czSzs6VDlYj50fLpJf+\r\nQuzWfCVKTgE9gf9HpmB7oyzvndh5RsWhfcs=\r\n=pflw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-c5b1c9d61417bb909d0683bf826eff124d0ec546-18.x/balena-jellyfish-client-sdk-13.0.162.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-c5b1c9d61417bb909d0683bf826eff124d0ec546-18.x/balena-jellyfish-client-sdk-13.0.162.tgz","_integrity":"sha512-1PihLresxwtydVbqu6mxQpBXv5pFhpYq+DgstXVLh8RFlXhAQnRUOgBShHc89l84+nfS7lmShbpdG+DzZUyQLg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-24T11:16:34.042Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.165","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.162_1666610419658_0.26889722239773506","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.163-renovate-autumndb-22-x-d15b58705aadaf117c3eb58622358e8d93b6f8ef":{"name":"@balena/jellyfish-client-sdk","version":"13.0.163-renovate-autumndb-22-x-d15b58705aadaf117c3eb58622358e8d93b6f8ef","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.163-renovate-autumndb-22-x-d15b58705aadaf117c3eb58622358e8d93b6f8ef","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2f903530b3325a0e2001d5be8ee1a7b901288c06","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.163-renovate-autumndb-22-x-d15b58705aadaf117c3eb58622358e8d93b6f8ef.tgz","fileCount":32,"integrity":"sha512-380c7TJLwBF6YBpxFI4xU4h+2LK+NvTPcEhCN1wCdw4UtfDJmtIHHZCBqbZArmBxco/sD7Crgev9DhtcWVh1IQ==","signatures":[{"sig":"MEYCIQDTSNFu5vxVcZz4FRlKrknm/9aVw1PokPNVCNVkxeWLtQIhAM5bxRM8brggwyc7DdBPLr8VCkHV/A2SWjfx8xpl95r7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV3EaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmou3g//Z0fYdrj/ka+CNglypazpwxiO65vwwZdJpvsQDgMtu4hjjkx5\r\nxgiQHQN5gc8B1zg+sX6Lt66NjRJ9K/NoZxN1hu/uPXtQ3SEHqdlp8Lu2n+22\r\n73DRRab3ER9GxzQTEKvHZYKuxxt6Am2oxuQzP4EDVDRv8VuA232VGEj3nv/v\r\nKHBBU4Lq0vEjLlMuHl3hNFlSpcn/Hk+NKmUkqy+iYag1Va88U/GiHCRIhdJN\r\ntVe9QKm869B4Rx5vHD4haG6Mho0u2QWWA7fEMdaCP7Rouw+QS4V7REC2YAC+\r\ncCrZMLoYy/cjVL7h3tIciIcpnCbG5MIJYlWvjCqmY8pc1iFvZDVhegPbtE6r\r\nLy3vEFyc3XwhwiIOYBKxg+qgEBc0XfB1xuLX9Ft2ZJZUDj4vaoLxKXOQG9Jt\r\nGINr7pqu3/00O4M8vbjN+P1Pkgn/xJoL863/TP84/uZ622ihCfyFK9XVo3el\r\nVOhY+YIpsWyC+pylOis3PVJ17oec9fcwaEA28sGqLwbU1I/nVR4lG6xrNekj\r\nCtS0VKRUI8cZa36bUEC678fGYZJgrP7hML4LnKM0UXgAy9Ewv55kDimKOKHy\r\n1TpPo3V747mHHTmWrOn8LzCV9dSkJcA+p/kL+gWq2N9l+FLmwhgDkkQ4V4Bf\r\n9g9zA7KieXHzMXiLLUb20TjgybzrBMUkAuU=\r\n=71cM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-d15b58705aadaf117c3eb58622358e8d93b6f8ef-18.x/balena-jellyfish-client-sdk-13.0.163.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-d15b58705aadaf117c3eb58622358e8d93b6f8ef-18.x/balena-jellyfish-client-sdk-13.0.163.tgz","_integrity":"sha512-380c7TJLwBF6YBpxFI4xU4h+2LK+NvTPcEhCN1wCdw4UtfDJmtIHHZCBqbZArmBxco/sD7Crgev9DhtcWVh1IQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-25T05:14:25.161Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.163-renovate-autumndb-22-x-d15b58705aadaf117c3eb58622358e8d93b6f8ef_1666674970369_0.005558231186963969","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.163":{"name":"@balena/jellyfish-client-sdk","version":"13.0.163","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.163","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7835a26de5d2c641f21e49f4c5b8910cc970dedb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.163.tgz","fileCount":30,"integrity":"sha512-jPoEArteyUXycPOPXwm73myon2ERkd39RpspT21rNe/qF9m3XWYsT/I16Rq20R0ja7GfjDO4YIAajpuok9fJfA==","signatures":[{"sig":"MEYCIQDAjG6w4O+MKJ4f6FmDjNhaJOeKBRTdk6ZKqA91I3RGQQIhALQvQV10+nABxnHAeGcb4XuXYlAN+9krhXTyqdp2R/8i","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjV3GnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmobbg/+PBN3JaZTSiw0x39IDgQCEm9qwaEa7j1O5YQPP/rwBMlh/b4V\r\nCGlau5kCt5dovkFRA9FMfAbrRNG8uB3kkmqcMq+1F3mIVIeFOw7h+s/L4nwN\r\nEAI4nA01ZitYpXSpOqwo0QaYFmh0r9w1vgcpA7Uk3WSlDhA5tRWRSk5Id0Zp\r\ns0BHUl1lb28yjQSRkA6XVL/p5sWUy76JL8y3ZBJ/tJalxc184ZE3j/TgD3kI\r\nHpNeoJJj8HQiOJr1CPyVYm20HodZ7GQMLP5QIv01JPrOwvtz/YVkrNr4Or3H\r\nzlWldEcPf5UDsk/1GoSTk10BI4SydfpUUfBexYcCaZ//YVMZXYOpaiwqTqJo\r\n9ePZ4mJ6rHBP2xTghoJ3DTfybBhgxH5HSJUd3iq0Yy1eUHn99JLdJuUDWTHB\r\nKiIb75fkB7gcNn2UTS7Rc9mqfaw5L2jBb0RA7s0mc2S51hELf1SBfimMyu97\r\niGwkW6lku9/1bM0mp4I571pGEZOETDo1OtNnElRnasLYC0FOSyGtFSr6xKD5\r\npdwB30/irXaBqV1S51c2QLQ7wekbTQZURDzOblcku+21rNmuRU5I70hsn2Kh\r\nrzuzttn5L8xI2C2d7uCQvFQIdGNW6JYTA4QwNiqSTauxxgH+8gczSGerevhy\r\nUwnwobIixVdqIx6moC/qcNo+YGdMNI0VNm8=\r\n=zgNV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-d15b58705aadaf117c3eb58622358e8d93b6f8ef-18.x/balena-jellyfish-client-sdk-13.0.163.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-d15b58705aadaf117c3eb58622358e8d93b6f8ef-18.x/balena-jellyfish-client-sdk-13.0.163.tgz","_integrity":"sha512-jPoEArteyUXycPOPXwm73myon2ERkd39RpspT21rNe/qF9m3XWYsT/I16Rq20R0ja7GfjDO4YIAajpuok9fJfA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-25T05:14:25.161Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.18","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.163_1666675110867_0.25621932154441596","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.164-renovate-typedoc-0-x-bdb827a29fcee6e75a059e8a623d11f643e3751c-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.164-renovate-typedoc-0-x-bdb827a29fcee6e75a059e8a623d11f643e3751c-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.164-renovate-typedoc-0-x-bdb827a29fcee6e75a059e8a623d11f643e3751c-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"05e8188ab182b89c0fda8625f3a195671896f006","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.164-renovate-typedoc-0-x-bdb827a29fcee6e75a059e8a623d11f643e3751c-1.tgz","fileCount":32,"integrity":"sha512-qnCihC0GTl6ecDBpgLlRjqK99okgm4fJvGo9ecnz9/q4ThB6N4ePNuFy8VsROmsCj5L08f1+ryF5yBnmw8XA8w==","signatures":[{"sig":"MEUCIHSUZYIcrfPYs8QSqH9y5j8KTvIBDo+Z35SQkbgATQkqAiEA4ikCL3dJtJzvu0e0fUqts8KgoagkMk7ziwVRq70MXbM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW1U6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVDxAAicHDQQPum5M4IXrfvxPrf+KUQKuZk58XOpm98hc04AJ4O38u\r\n8rqiZ8zoyucewqD+4BIQb/BEZWkMnKg1mYeLz6m+2OgRGHDpdUoVLpkK7YKd\r\nE2FHS8FZtUrV9Q8QiiospnJcZ5xcm7MfJXIK9qbrlgLgzJhx4HHXqz512Rx5\r\nf5jTFTTShN/dje8VH5h31GoxKv4G57wbkt4FRtu1imJWYvBl3qMAfWCS1fwg\r\nB+4bYd1nbRHyupXCCszkVj27kzt2inVXMxGdKwP4JRpzp6KeYLjREMLi8OmG\r\nVL8zK1Aw5uC5zvkqlFJzpamaGlGy8ljnwHwe5Jvzu/leNTtYdsngsO78vQcJ\r\nBkgXt2yolEhN9PoRiLWMoctm1b5YUsXRtfSVYwLzax9Fdno5NMzpRv6KDtTJ\r\nbhCn2PQRV1gaZiHtlxSuEAlbgH0TiefnEdzc/T5jcKtNoI7ZiGoF58Dvv6o4\r\nEP47cDGD3i2G6xQ6Bap53UyisxS5t7J/TJLblTmfADsqu8InznAz6Qcvgefh\r\nqSXvqtqYO4JhTxw6+9mSrAkI6b36NZmYedp3Rm/43MUgfn7sFXebmV1YYmUw\r\nZft7pzkIHIa1980aLLcD/yVjYnyZedx4y75nSh0RcsOZE4jUTejRNhW8wSrg\r\npLNhID6oIuFV6zkSvqto25kUn0fOkGtnlU0=\r\n=7S21\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-bdb827a29fcee6e75a059e8a623d11f643e3751c-18.x/balena-jellyfish-client-sdk-13.0.164.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-bdb827a29fcee6e75a059e8a623d11f643e3751c-18.x/balena-jellyfish-client-sdk-13.0.164.tgz","_integrity":"sha512-qnCihC0GTl6ecDBpgLlRjqK99okgm4fJvGo9ecnz9/q4ThB6N4ePNuFy8VsROmsCj5L08f1+ryF5yBnmw8XA8w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-28T03:59:34.669Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.19","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.164-renovate-typedoc-0-x-bdb827a29fcee6e75a059e8a623d11f643e3751c-1_1666929978248_0.03783206076131851","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.164":{"name":"@balena/jellyfish-client-sdk","version":"13.0.164","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.164","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0a4a68bb91e4307351b9c5ad34d47e58dec7ff76","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.164.tgz","fileCount":30,"integrity":"sha512-krA47Lyl8eXy4yND8DBfXzQktOPtOMj8AsKvaclSVIEZ7XN21vcAMTtXiqoBIkNoZcDZdm05H1Mm6u8Wx87L2g==","signatures":[{"sig":"MEYCIQCAJz2pCXFEbwjD0TvRfFebaw+rrDAx7bmsz2rGMAaYtwIhAJGidovVFbbCqxFHGigNzF1XF2i2szprtUNoLTilVjr7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW1W+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmGg/6Aw7Q9+SCwBDW7CBnENk89DD+ktSmCTLm9UR8CgNlOU0lWtJs\r\nogZu9PZCCWmodc9zIzQ7jO7FuZehX5IaIJTb6LERjhUEVSar9O/Sj/K8tVNQ\r\nC2Ok6qOkdlrraMwWMFo6/87haZKo1IG04bQUnCtPnkFLAW0Dtybl/eSMYoWS\r\nerCwSW9IvOjxBkZhBuWBqpCpPz+nihdZIwDC3p94obmX9ijuGypaU0DssJ3O\r\nwVIA4Iw+YUCpMl4JTyuhUBXb0LtwOkyS4WlIANVhUFXFYp48EfUz7iof6rxw\r\nyawCHbDNbcCbbaaJArHLZaxVQlpGdY+fWjS5zuAxnoLz2kk6LCoghF6Ai200\r\nq13vhriehy4aiVsl2CwYSd86sP7GPM8UeGVjyccV0opFiueUrFcp0Jo6hzH3\r\nBpe6BHosaE5SKr4SJxzBaJ1f9mHLLYvf4ZiOxdyJdXw9y1DEx+s1ZvSEj5tE\r\nYVVKLbtirhijMzAO3c1DCI3Ws1rGywGX8IlLIO+GAf0GCUOz8Jg76lVMgvMb\r\nHdVw+uMXLfC9rbDCB2m1CfJYORZcKWk6eU/lBminW7U9dqkywMyQvCW3j/II\r\nBfpKrg3iRphehJIR7anV+hgt3Bwz/qsjueWrenHQibU0OMysNVBrZodxVNda\r\nKJXEevSokvvjJxWdvTOKcT+IB4e3RzdstJw=\r\n=IZa9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-bdb827a29fcee6e75a059e8a623d11f643e3751c-18.x/balena-jellyfish-client-sdk-13.0.164.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-bdb827a29fcee6e75a059e8a623d11f643e3751c-18.x/balena-jellyfish-client-sdk-13.0.164.tgz","_integrity":"sha512-krA47Lyl8eXy4yND8DBfXzQktOPtOMj8AsKvaclSVIEZ7XN21vcAMTtXiqoBIkNoZcDZdm05H1Mm6u8Wx87L2g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-28T03:59:34.669Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.1","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.19","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.164_1666930109807_0.6606972705085212","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.165-renovate-jest-monorepo-91f25f47598744d1db7da89c6e8c45ba3be84006-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.165-renovate-jest-monorepo-91f25f47598744d1db7da89c6e8c45ba3be84006-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.165-renovate-jest-monorepo-91f25f47598744d1db7da89c6e8c45ba3be84006-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a145d9635f34ecbb051fa1e9fb5be93928c3989","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.165-renovate-jest-monorepo-91f25f47598744d1db7da89c6e8c45ba3be84006-1.tgz","fileCount":32,"integrity":"sha512-jl35ga5xcNPdUrlDTQjWoWBt6wXgmYjhUukoqe11KnIi1z6hjoU6z1Czx6a48jc0PAi0f/POK34Ag9lFUUXzqA==","signatures":[{"sig":"MEYCIQCfzBrVHJ5Ux5d3G+FhbrgdRQonJUVlabwOeovuD49eEgIhAKPamNFXGjJ6TWn8v4w9v94dL+tT/fpf14NxibvXZFUi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXG7eACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpi+A//SqTJCON3GPY1+1WEgVEVb8V01ncYi9wjB5XZhzmtmLbQh7k8\r\nySW2v9RaGU3AWAROfyQw1iyZWXmQzucV1lRtDpu+xL0GK164Zkrfj6Ceqb0n\r\n7RPoUWh9XbE1+jqs2xtBSVHEOtsC34UhCOMx3bA3L2pcOWXPs/Fk99rrVb6d\r\ntQc0jSikaLOI1Q7vycgz5c27hI8tfGkivcEITQhMN7+sbv2xRe/i5M49qBtW\r\nirTrob+9gcInUWIt29eeLSDyO1Hu1BDPt8yzwPWxFBrP24BGoFHmkcCuS2dF\r\njAaltl/kqY3MQayeOv+sTi6C94Mwz1pQ/zBtat6Jj88kfoY75y2+OXEP5KHY\r\nMuLZmtXo2xxYjt3K6jrAFcSfI41vHeFDp4T6m5xgXL3Csv8UEGP9SsqVxJBe\r\nJIicgGqbANg57aNnoc5Ceviain0yC9gDDxw8MQORCMLrkFAnJGwHIm1/k1lb\r\nRcSL1jG5eeoa+5PBHwO7hrFuVUFVstDSoCS3S3c2xnJBQ6neB05lr5PhyWrU\r\nZf14nB9JuJsgITPyT+uXaQshmIFsYlCmT9ds70y8vbkFtFgu9VauWzAZOuob\r\nBXUNHcYlXX1AycgQyAHBA2M0PxnfBGv+tGC4fQD5iyFcpc+1eGASrcxDdazI\r\nNNCPasOnjJh6kKELkOvE0bSx1ZpPVJXuzxs=\r\n=ds2c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-91f25f47598744d1db7da89c6e8c45ba3be84006-18.x/balena-jellyfish-client-sdk-13.0.165.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-91f25f47598744d1db7da89c6e8c45ba3be84006-18.x/balena-jellyfish-client-sdk-13.0.165.tgz","_integrity":"sha512-jl35ga5xcNPdUrlDTQjWoWBt6wXgmYjhUukoqe11KnIi1z6hjoU6z1Czx6a48jc0PAi0f/POK34Ag9lFUUXzqA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-29T00:06:31.420Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.19","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.165-renovate-jest-monorepo-91f25f47598744d1db7da89c6e8c45ba3be84006-1_1667002078344_0.2771090291309344","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.165":{"name":"@balena/jellyfish-client-sdk","version":"13.0.165","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.165","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7a155b3f503212dab47ce0f82edcaeb547e47072","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.165.tgz","fileCount":30,"integrity":"sha512-veGxuzMdHZ5Y1rjhptvPUNqYcVEqVQJh842SIGJ+ZDLK3ti2EaHVKZdg7pf9KFe9IONJkhLijv/k30U+COxzlw==","signatures":[{"sig":"MEUCIQDLsMzA5cHefOnSDIcE4AxyyEK/fnuS56XYHtQdKEZZNAIgCCi++8mSM/fSMruXktbrj4Lz3ISiDPfKy9ELC/EW2uo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXG9nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpdnw/9Eyt6dqAUjMJnzL+wVh82O/Z2NpSSe1bPUPETtguH4WJLqvAt\r\nA8BJj6U4+sjXW+M4dsJbQGzgmqwkXdj5+4/JtDbzmqg9KhlOEY19b07+a5v4\r\nulb20z7pOpm2g4S3Ag435BquvNwcTgPxcSY9wS+9238aV/Aqy3x0IIPqh+rl\r\n0iwiH/xkn2M8ZadX8bcq4iKO2xXQKbthXTvf+VN3omd/etSoWfGzOKtbk6Vd\r\nHBAR25QJrVh67ndjXfUIueBSWAx4zp8H1ZCQwuFVugOe3kO3vjwl/2qEnd5p\r\nY6IesSvC3Z70sD9xxVr+snV6CtMXdV2AwsiaFo1hS3eMO2O3wszbjzQs8mJR\r\nfx+OTMECFtE8wHhhtxn7RRi7oK1vtIssjKM2Aim4Lvw2gWFyDwmml26QVQwU\r\nCqMjxjxtOHXb82Ts6X8S1P6F2Xm+QzrB/7f3TfHxJED5puufu8dy0a5oQRu4\r\nDuLG+e7/ORJwLacTN2ydELeQwne3WTugImBlQ86tnl5/JMjgmgtEGEWqCM6w\r\n9bRyp7vpKPI6/ntgqmlk+JicWAfnkMiJHEUOknplJDiXPCrdcPlmU2456/il\r\nQNHZkTsWcDlheSygc8htTXJZfzl1YTg4XclSyApcJKhopl2We9rb/9f2oYNT\r\nnLRu9xM0xvG92HsgkgP7EeMg/lAhP//Cxj0=\r\n=gBBL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-91f25f47598744d1db7da89c6e8c45ba3be84006-18.x/balena-jellyfish-client-sdk-13.0.165.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-91f25f47598744d1db7da89c6e8c45ba3be84006-18.x/balena-jellyfish-client-sdk-13.0.165.tgz","_integrity":"sha512-veGxuzMdHZ5Y1rjhptvPUNqYcVEqVQJh842SIGJ+ZDLK3ti2EaHVKZdg7pf9KFe9IONJkhLijv/k30U+COxzlw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-10-29T00:06:31.420Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.19","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.165_1667002215034_0.376567003468226","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.166-renovate-typedoc-0-x-9eac8fbdb8aab17b68dc703726af3b1cece8b689-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.166-renovate-typedoc-0-x-9eac8fbdb8aab17b68dc703726af3b1cece8b689-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.166-renovate-typedoc-0-x-9eac8fbdb8aab17b68dc703726af3b1cece8b689-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a3ad6005a03ec93bbd910a9051f7cf555443ea4c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.166-renovate-typedoc-0-x-9eac8fbdb8aab17b68dc703726af3b1cece8b689-1.tgz","fileCount":32,"integrity":"sha512-fVk9isczfEsM5UEwstoUPy1rGBu5vdN+ZsaEPHSkaRzVdAc74CQsFC/34iqsE1cPhYh2Qidxgsa7kGGRXjD+wg==","signatures":[{"sig":"MEYCIQC6XDjXEHkVGV/Pwkh3Wi6zfEWGiQOIrSrY0yl/vruZlAIhAOfw8uTxH54cSxEfE7M31aV325UMXosz4BdHdmyslWpu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjY0xgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0BQ/9Hpf/AZqwCH5T3k8FTVtB0d4B+A9Phsvx16AEdYYm5ymj5i6V\r\nUdkoH/LaIAYT66cWqM3WLr/Dqq8oonJu2vAu/rS14CJXkICVyKOMFkeb0qMG\r\nhs+jwP+HqIAdDkqbts06M1qfS2/HtbOWlJdTeoVXF+uxv1ZKe7HDcBpvLk+C\r\nYeIKaBbEj+NWBRjI9OREyc9Ozae5c/V56O4iWs1eDuCEvcL/u8ygdzHbWCYR\r\nD/vkxNCss3T2VvKuXmqg4kB4OwvmHN51dp/orBdUB2XdbNkrhpMvf865rwT8\r\nwIYcY1aJv3TpggMBIN9IIneC/omYwssm14PxBvnxAugFjUU6B+4rEYLI37h3\r\n8bBIjiMcuY8frHnOWq1LsS45KSlDJV+zvHOpce3RIf1LFlALGGKF+MWgCXNv\r\nfLCqqSKZGBK37fOAET93Q6TxmWA8/m1mQjd0Xuzd6bB662FltFA/isGVley/\r\nfnxZTFYBokUj2qGnZ7jv7xWc10TfQAFiUanQMgVg4cAtFH8Qqw7uP30Wv5zG\r\nqTTHsNSnN269JMw4e+HNLN4nWElPsW+TCZZbHyuxDAWURMmn+xtC/WawjHRC\r\nXTdN4xviAq4jMBNqOoOsA+B3mW0p5XLXZwSJ8cGVBLvjR12t1SAGkUXoXt7A\r\n67PiiJEy012Z00CYASxXXnmGJvIo+HxZriU=\r\n=Rhpy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-9eac8fbdb8aab17b68dc703726af3b1cece8b689-18.x/balena-jellyfish-client-sdk-13.0.166.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-9eac8fbdb8aab17b68dc703726af3b1cece8b689-18.x/balena-jellyfish-client-sdk-13.0.166.tgz","_integrity":"sha512-fVk9isczfEsM5UEwstoUPy1rGBu5vdN+ZsaEPHSkaRzVdAc74CQsFC/34iqsE1cPhYh2Qidxgsa7kGGRXjD+wg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-03T05:04:57.068Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.166-renovate-typedoc-0-x-9eac8fbdb8aab17b68dc703726af3b1cece8b689-1_1667452000546_0.6885504229994015","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.166":{"name":"@balena/jellyfish-client-sdk","version":"13.0.166","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.166","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"16c7e8c224ac4538bf47787838abe2d24106786b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.166.tgz","fileCount":30,"integrity":"sha512-Xm9P5AUND8/Y1yStRsfL69eToWhMIk/jqbffef6sN0tbA2P92J8jTwPGROhFbJMyABQ2Xaq804ZMUTGivbthXw==","signatures":[{"sig":"MEQCIF5R98fK2nUcL4u0CpiKKLl5JE5kTra8LkQpSWBVqupcAiBUToCb7H+TNMMMAAwOY4CEyagW0AkgzvCIB2k7ZmPCkA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjY0zlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRRQ//Vu/xgIF1e+53Kg1NXqYj9VbTW0v0uE9DvGHQZUQAy63IV27q\r\nRzdVebQ7mpLpYNNfYMBuwh33Q+kvxwLB9foGu0D2DErqtNIaDiHIoG+dGNFu\r\nZO3/vWpuhgwVIKYRrvUwk3iTMn+Ces1hZOqNJ6datencZNdH10bQ+ZIx0tfd\r\n3KKC/LyH6Ou3lWPT44UinnNxlYRF7r2QEj13rT7Tpb5AXF91kSk6NVh+CEAU\r\n7Z3Vt0nol/aUopfR1bMiO04eY5CzsHJSBj5LZaNnNRdkAyETwIN2TwkWh6L5\r\niHeVO6we5caTbznSy9t02xx//XZYbuKM1BZKKiApHQb1kA8DdhaRhqmISQJb\r\nJaq3mMq4talYPbEPyJB3AIYSpr9NNNzzendPp39Gi3sCN+tElsT825JbZqeF\r\nPyxcH5Srn4Y+Vj5+mZJ2QOUkYZ4pzOMQi5Nm2X4bZ7Qqd2MI/3x+mVtTUkW+\r\nim43HcSaxZRp/oiqLzJBfosQ3I+HWaccITWGTNg4O4ibPRClxv0DK0GNlLOf\r\n+l5HhW0UiyXywzURZvugm6X84ubwHIZOd/fUCjoiJ9FW1nKRwf5zgm3Luqb5\r\njOgDt3l1ppjdfQY1sxhjBhE7pl+u3sg522N7xRneGT1RSqghoMhu2bBsPxzX\r\nEfmZVsie6KoUYFPDhb2mwTOuIFbfN5OLWXw=\r\n=ZngK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-9eac8fbdb8aab17b68dc703726af3b1cece8b689-18.x/balena-jellyfish-client-sdk-13.0.166.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-9eac8fbdb8aab17b68dc703726af3b1cece8b689-18.x/balena-jellyfish-client-sdk-13.0.166.tgz","_integrity":"sha512-Xm9P5AUND8/Y1yStRsfL69eToWhMIk/jqbffef6sN0tbA2P92J8jTwPGROhFbJMyABQ2Xaq804ZMUTGivbthXw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-03T05:04:57.068Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.0","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.166_1667452133032_0.5981800988365336","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.167-renovate-jest-monorepo-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.167-renovate-jest-monorepo-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.167-renovate-jest-monorepo-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"74c9e8daae2eb8183e06b113b515098036b0746e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.167-renovate-jest-monorepo-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-1.tgz","fileCount":32,"integrity":"sha512-SPO1shycgip11IGTfqLfMhSiHwBcku0PAjKT1LgShZnPomh5AMa1sjfoQS6OsgmEyh8IGlAnJTvECnWGEIt3cw==","signatures":[{"sig":"MEYCIQC7YjR+VZ25WJ3RTpKszaXNyGKGc2h8IjzIqgXDfhed6AIhAPA6quRwE+ta7oTvAoaG6xuSYccl43299rTU1DTtdC6N","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZa0gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrtzA/9EjFSaZSuY4lA6O/2uUVDlqVU14tm5zzIflke4vvhkP7gRFFv\r\nxNqAIWfcwq57YYtFS4YA5XX5QI9YLAyXBCPSkkbmx2S2j4yWSlmc0c5kX+HJ\r\nxTnWW48RmXIeEXXuUQWM41bPwCjsUuw9vkOD5BldY4p33t1gLUHSSx7zwLIk\r\ndCExvm5CgcPoyQSxZHnpfNSd1eiFwUhTWaMMX/ZGEZr/7sognyiYWEHTuwt8\r\nW4C3rAkOCrHwwGdF4Ya875Y4nZWrFzcVY3DzHZ/L89nd30GrxiwFpRIuukn2\r\n5378ypgdT3hZ2JDwbvNCeeBUNAV3ChLxJ6fdr/xp1aY9IYzvKA7KlzDqM9Hy\r\nDdeD/AGJYaEjp4MgXD/75eW/+eGfyu23wJzugWIcSHpDWIUnQ+0FWo8oaH9k\r\nf7BQggEMbZdAP1Cwm1/60u3dGzrbtPh9SgIQO4k2oP5Zwg3CLhzGMj9gkXWf\r\nsl9yRX4SDwMEFT8m3OiUoBBRfiJ4f8ExbeEii/QC5MgUssXw2+oPyoAKsrzI\r\nbAdBtoY7b8mlxY2/ukpc1E9u2Ok29H+ycIljBA7CGspiJ9JMvF+YUXTs4Dw+\r\nGOrAYcvKuic6Betqhkhlni2iEcX1zShs2n/1eT/MRsJhO5Q+cbGrVL2IKR0n\r\nxw6HGfh8iEdLrZhXJewJdce6dZiC5+alh7o=\r\n=h1uE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-18.x/balena-jellyfish-client-sdk-13.0.167.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-18.x/balena-jellyfish-client-sdk-13.0.167.tgz","_integrity":"sha512-SPO1shycgip11IGTfqLfMhSiHwBcku0PAjKT1LgShZnPomh5AMa1sjfoQS6OsgmEyh8IGlAnJTvECnWGEIt3cw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-05T00:22:27.528Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.167-renovate-jest-monorepo-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-1_1667607839818_0.8647103659108586","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.167":{"name":"@balena/jellyfish-client-sdk","version":"13.0.167","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.167","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c1d9cc3f8dea2f4bf5f7049108bd9cbe53db6ce0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.167.tgz","fileCount":30,"integrity":"sha512-L2a5/sANKvJpWUbo/lPMF6DZu3zGlIGqLyvf23ghoKNYyPZVoaUB219dJBgGFmKpxc8SB+sGeBbfe+CLnT3KtQ==","signatures":[{"sig":"MEYCIQDC5nHQXAnLg0XGYIx/f2P/fLVHR3B/PahbTGybjcEtJgIhAOrnyURgqAmp3UTAFQfuAZTTSoprPNb8dUjTCzmZA/Fv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZa2UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAzhAAinpAiRaH5yQB2pzLUqGX27hBHm9+nUnasda30hj4+RJKSe8x\r\n97YH2/ukCabsgLzYObbRMbYGgLbiPr2JEGXUkrqtTM8SI4P53UC7PIuu925s\r\nZcJtKCfGmPI7DUEAFOyXq9iZdcf+17tqBuKbMYfYud2odsvccn56F3n3NZy7\r\nANTAZ5WJODw4SXaXkW9SfoZBHYML0c+clCybiAPOz4tgyO9UkT9Vm9r3hA/n\r\nhp5E2wZM0xN3AAVpoGfp2M58WYkHuqqCqD/i9NaVZqW5YcOeoi25OMveBspu\r\na/aC1oU1NcrFXhl+7dT12RNmWPdushjR1DgaM1oKI1JzRrzjgajEThBhIpVd\r\nHCBM/kDEpT3iEqSAc6dlhqX1HTrUF2+0z7UdGv+Fqp9kmu0npeXxFnItvI5B\r\nj7cCn08N9Vxuf6DmHZ7n+2XVX2VtUG0YkaoazGn8V6dXxas7QLITpgDIIHcw\r\n5zcIaR+G3MxzhL7xa/tJVWUd0MG1oSuz+tg6QlclLdL/dPdDbgLMWhEOCkDl\r\nHdQWQG9zbRm0JNzZ7vCMwEug6nuwGickug3UIP4A1sK7/A/XQ8TDxoI0/gLq\r\nS1Le+ydZ8OQrZiDS/LXKYZKivPAqGXqTzij67XYgPSd7pvhiVswjD5vEpXTz\r\nvUxSpwYaWhPEqx3oMTz0mHlQoGKb1UGhOqk=\r\n=b8gm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-18.x/balena-jellyfish-client-sdk-13.0.167.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-18.x/balena-jellyfish-client-sdk-13.0.167.tgz","_integrity":"sha512-L2a5/sANKvJpWUbo/lPMF6DZu3zGlIGqLyvf23ghoKNYyPZVoaUB219dJBgGFmKpxc8SB+sGeBbfe+CLnT3KtQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-05T00:22:27.528Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.186","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.167_1667607956526_0.08694303135309545","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.168-renovate-lodash-4-x-aaa39a462327269abe0ed94588e8238ac84a97d3-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.168-renovate-lodash-4-x-aaa39a462327269abe0ed94588e8238ac84a97d3-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.168-renovate-lodash-4-x-aaa39a462327269abe0ed94588e8238ac84a97d3-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3c2dda6147483539b373bde860e6dc4d3767cb55","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.168-renovate-lodash-4-x-aaa39a462327269abe0ed94588e8238ac84a97d3-1.tgz","fileCount":32,"integrity":"sha512-c+9oMrDZHjjxkTC2BlTRxUDiRNih1GBz43DspfUgZzr31dDwShnXcdGFIWiGf+9cKcF0ow5JJ+k9fUdSHvMqCA==","signatures":[{"sig":"MEUCIQDLWVoiz2NyImQu/BctSjEKfJq2lTZQ372PN6l6v0R99AIgBlXBGf66Z2/k1fPWzLkuOmuV/K6R+FMXF4XApSEYI1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZa5lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmowEw//UvIO7gb5CfeRXFwaS0v6e+UpJSuXp4A/MVwMzlgEcAMAYMct\r\naVEmcyA2SCP3c4qt/VyjC3OxqOMV9Uhmc+Ebm01vwy2JzqVegjkd0LmpWH0J\r\ndMelehhGrgXX/vZY67sfkAXNz0hQmn8YuroU7rKKiTJhUDh4Sz4Xp31UK6Ln\r\nMAYpO4a4spXn9/veTeNL0Xl9aT0fnO05Hfw8JSBnHK6R7VMo/nlYp0mmEReu\r\nTz0i3ljnWUYt+Z5hIAf0sAo4MJ4UBR6HzlZ5W2ZXq4sSySJ+jwUsjo/M3KL2\r\nRBzeLN5wATVOs787LdnVm4a7WWlJ2a/wKUNQwCqOEa59qgOuyNLfD4YeEGUJ\r\nj254DNksVppNmkdCSh0X6GbhbqinLSm+PSxmVxnFhsK2/4tRD4SngCHfZuQQ\r\nsELRvYEbXGOtyaTnze6puSVA6nzvvXzQnJEB+nbGwRYf+/fyVz6OeZ3ikRTf\r\nQdNMBTd1vkbmfXKoQDvL2YpOReM507+DPSdBonBOuw+DkqxfzgXONmzJcR39\r\nqLe8hz3pquLYRqrdj/yLuK6BFLmSzQscq7A6D8gRlfo0E2sb9RxzCAfCs4LU\r\nGNKvR8nkr7cOLqUC/9PsYtu4EGbkxscJkI2Ixi6HUtwqOL82z22or4O76set\r\n6+TLL5mu/sb+vV15A8p1i7yA8k1LbGuD6X0=\r\n=X5xN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-aaa39a462327269abe0ed94588e8238ac84a97d3-18.x/balena-jellyfish-client-sdk-13.0.168.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-aaa39a462327269abe0ed94588e8238ac84a97d3-18.x/balena-jellyfish-client-sdk-13.0.168.tgz","_integrity":"sha512-c+9oMrDZHjjxkTC2BlTRxUDiRNih1GBz43DspfUgZzr31dDwShnXcdGFIWiGf+9cKcF0ow5JJ+k9fUdSHvMqCA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-05T00:27:22.409Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.168-renovate-lodash-4-x-aaa39a462327269abe0ed94588e8238ac84a97d3-1_1667608164860_0.8957985509831392","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.168":{"name":"@balena/jellyfish-client-sdk","version":"13.0.168","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.168","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9999e1a20a645e2913a7c527d11a6ac10745adee","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.168.tgz","fileCount":30,"integrity":"sha512-D6broNwkOaEis6tm4R/OMkoRiFGw+qfUYBCz/8dq4G5mwILD8PGHOy4mHxV/7qXqrnbiyfzdRD+edfG0w7lmTw==","signatures":[{"sig":"MEYCIQDF7Elx7RQMqIL6Co7Q/kn5eox9RCmrOKX2Pr/l4H3ExQIhAOl9u0dGGcOiEhaRAdtb6KoDMfDlFOOCBV5EuAtK2F24","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZa7yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkXA//fTZsocMm0mhtbUJg9kWQtlPN1S9iDYz23WLRVF5k5lydk143\r\nr5FfhIIu3WKZMBavAjLFNcTgxRr83NtjBkh52OEbYgFPXKpW/m6Mstu7D0CP\r\nFSC2nSpqoyPbGuA2k0A8fKSCGGbrLwA0H55m/Qay3+cjjhUK0+Xf+G0I0uWl\r\nHKr1GU21dFroiTbA93s+BgDVf5VAXL0Q64BWlPoL+TtCKvDQSAOYW6FlTbxo\r\n76cMH3D21GliyFqC8oLWyrDiEVKWZYw7/Vdw6INpw2yoe0RiFA41tH4xUjsb\r\nux7WwdeoxZpbKPyPceGFUb/s/KDxNoCqq2WBWKr3WlNXyTT3XApPSzSAteb7\r\n4s7FNFKFkzjmNVgOBFlaNByXvKkj2mD11zqF+qjBDU7+xMJl70ll5rHbWPIz\r\nJz9+/8RbIZjsI6iKq3hzmDV3T+aBKWfwBdGYxmwcHX2/UjiUx8J8jCpttGPd\r\nAqTMQXyCPdE6mbrN5hyShhzAUuYFmPvXGmawtoJW4zX9XotYkn+WGAHJJXNr\r\nSqGoMpk678v5TfQl7KIXQyTsWyETX5e7gM+BsTdWQO5dkQfXjOoGkDkh/Avb\r\nz2h98R0p9c646MjrFSdCNj4GPFrgU3kHo2AHYC6MqkqEtTFtlFSYd3AdYT00\r\nhp9KhmZymfVUtul4D3Fu8M8IFFJ7mYrvRew=\r\n=Zyy9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/tmp/npm-aaa39a462327269abe0ed94588e8238ac84a97d3-18.x/balena-jellyfish-client-sdk-13.0.168.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/tmp/npm-aaa39a462327269abe0ed94588e8238ac84a97d3-18.x/balena-jellyfish-client-sdk-13.0.168.tgz","_integrity":"sha512-D6broNwkOaEis6tm4R/OMkoRiFGw+qfUYBCz/8dq4G5mwILD8PGHOy4mHxV/7qXqrnbiyfzdRD+edfG0w7lmTw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-05T00:27:22.409Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.0","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.168_1667608306634_0.1235134012785557","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.169-renovate-balena-lint-6-x-0d79cb592272154420a4748c98177e8b837346d6-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.169-renovate-balena-lint-6-x-0d79cb592272154420a4748c98177e8b837346d6-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.169-renovate-balena-lint-6-x-0d79cb592272154420a4748c98177e8b837346d6-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0523e8004d9016516c5d30e2fe368b909a53b060","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.169-renovate-balena-lint-6-x-0d79cb592272154420a4748c98177e8b837346d6-1.tgz","fileCount":32,"integrity":"sha512-02LXhLSJV15GeEX/m7YHYteT4FF958kWKSDVoVcF+0hz+A/xC34XoaiKohz5yjVVcfBU2hYmlSXYQBbS1mWn4g==","signatures":[{"sig":"MEUCICfnm04cAyrq/lh/QRylNJIcpKnMCfQHVIOYFfPom6AAAiEA0lbBDE4hKC+H3Tttmp0fpx2cNnUnuZgy1jx9b909YMc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160169,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaSjCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp21g//dfOf+qOjJzqVItlPIJqgVQ8MwpE1t6XCrWpMn8/WKX6TbULy\r\n0FgDfEVwkVSeOidZ7GTsgUMxeLDXatiT0ATIzf9E9mP1vISvqtVXek4N2PGO\r\nCHYpT6tzgLE0g0WdcOlzHAsyN1WUBAI3xKZFGVQiho9tsAEg74sV1zOk9yEo\r\n8Sz58xLjH30ei8XXvqH+J+at8ZwpLBwDtMRuVs6fYgsh49tSOTJHm/xCCFLx\r\nbnJ01llOR9KtbdpoIjoouUP7Jeaik+f7o2pY65eUZknd/3kf28yHjWJRhA0u\r\nETm/IkTHBiWr/eedH1Hc6GZHfNDfjHPKmiUsmuEsYf7NL13N7Jhi3e3tNbWf\r\n+To9MN7D1HV+PLftRG9KpCvRsMdXH+N0zlRhG7d9q8xSWu/u06Jy+2WeP0z2\r\n/uXSDUB1Tv0MIhNDCSVj/cvLjn4/Ok6VlYeIzOrhFAYdr7xaUfrgjoQ0Zm3F\r\nMcHr5HpOpZisyiy2xGwuJgVaeEZU4kTOqz0g5EM+JuP9t6g5eQvuqxZ/atkv\r\nLTscMQCH5heLBVRXZ1yEvmBwcS1w1hVd2aRoJKMcoi9nkPtt4NgWT6qrFveF\r\ntYNq452cjYkuowH3sevWHPQaM1ot3n8pjC7N49BRP+dMdTyMAwFNFM7doV9l\r\nVBc37Ev+/EpbGJWfr2yh2QOwm28LajsyaV0=\r\n=PaBl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-0d79cb592272154420a4748c98177e8b837346d6-18.x/balena-jellyfish-client-sdk-13.0.169.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-0d79cb592272154420a4748c98177e8b837346d6-18.x/balena-jellyfish-client-sdk-13.0.169.tgz","_integrity":"sha512-02LXhLSJV15GeEX/m7YHYteT4FF958kWKSDVoVcF+0hz+A/xC34XoaiKohz5yjVVcfBU2hYmlSXYQBbS1mWn4g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-07T15:46:51.399Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.169-renovate-balena-lint-6-x-0d79cb592272154420a4748c98177e8b837346d6-1_1667836098396_0.38813921564334475","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.169":{"name":"@balena/jellyfish-client-sdk","version":"13.0.169","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.169","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9cdaa25f55755001c874704d824ec4b59b64e71e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.169.tgz","fileCount":30,"integrity":"sha512-AjcBfRcxnzegWolZhIgR2W7fz6nzxEy6eA+zkqkLl0epjti6Vr+Rae7oKe9+F1e7G3s/c8WwNrYQmu2W1wOyZg==","signatures":[{"sig":"MEYCIQDbbn8j23WopF1NSbny9A3yW+5CNNafC2Cmc97i71QiCgIhALrsXClWzOaLXsGVUdmW/fuOsH1+vGuBDHN8Y0qa3HUW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjaSlQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoi9A//ZSu73WPIDJnnycCQauoH+kkDx7PZU7k9nsjsZSU0W7ZbyGpY\r\nGhMTJsn1qczObRf7zDAGU9/MXqHUOLtFmB/r5hxFFgA5Ez44knJzKfyD4g97\r\nHPooIj6XI2XjWKoAF2Oe8lPHvCzlB/FhZ+EGJcgRYZ7pyXqQyfn/Ag57dYqB\r\nScIvpg8qslV0Rj5bCjD1zVaK5OyM16tioTD1dlCgHXRrHW3gd1lBaDhJYRpS\r\nbSBAkjPsv0+t+FNzKpYRZmzBF+Hd4E97m/u+BnejbMmC5A9CnJ52D89ygKdx\r\n1SXLWA613KmkQmnfCDyl7EzGeHq2qLEGvn8ycoTFx4rjtYoRMGsP1hAmlbaN\r\nkRiKBi7fg0Wo5GAACcAmGDGfvHuXe++pmoJILKjucO+NIaKMbsuKOqdZyf0g\r\ndQ+S7pfeV+zH+F+1ocC7VsYOFymzFwGveZ/9tlyS6SHbGkJkyYntLY5H5sd8\r\nKubi5WWPWvCqtl465TZVpU5bgOmHS94SG7AOX20u0iLH21jsrQ+WTN+CSqEa\r\nAPiK1csD5X5S8V8/4JiqcHd0zbmlrLept/dSit5kG6102mjLiZp5NteZO+xc\r\nnTt+nhyTsy+fZLTzBzp1oDIaGFdh4cbcwGr7p+5nPS9hr/hsM7i8kaUATq0L\r\n/f4o1RPsGkUtMKut41VBR7pGYfdY06Uzae4=\r\n=PSbk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-0d79cb592272154420a4748c98177e8b837346d6-18.x/balena-jellyfish-client-sdk-13.0.169.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-0d79cb592272154420a4748c98177e8b837346d6-18.x/balena-jellyfish-client-sdk-13.0.169.tgz","_integrity":"sha512-AjcBfRcxnzegWolZhIgR2W7fz6nzxEy6eA+zkqkLl0epjti6Vr+Rae7oKe9+F1e7G3s/c8WwNrYQmu2W1wOyZg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-07T15:46:51.399Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.1","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.169_1667836240274_0.10549887130639424","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.170-renovate-sinon-14-x-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.170-renovate-sinon-14-x-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.170-renovate-sinon-14-x-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"356761ede207daa71a407baff77b8c5f6e296b0f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.170-renovate-sinon-14-x-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-1.tgz","fileCount":32,"integrity":"sha512-xOjIHCShLSQUXfK0awGpQzlaLfEohHK9q9Z5Kp0Oadmism2N8WN06lQ+XJ4uU9s0HWo2GcNWQsyPdCUckEnpZw==","signatures":[{"sig":"MEUCIQDYa2s0R3VmqVbVuGOdv1lAgFljuvg1rY6KCDYkLfwCLwIgL6p/2UO0hYW/ZA/vUxt3trxODBBzRLLRDt1ak4jIeLI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbujjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmopWQ/7BJu6IWKGzphe7KAHecVeTG5D1o9jKFyfKVGH4I/27n9rKMd+\r\n3YlKLYRe0/jGHWGSW56P+zrEwGwLV0bKeU152uRYCj5K/DaZnkZG/xU81arR\r\ngN7+yxjyjgRPywCSN+xvzu/l3EBTk8nAFjbBUOVe3NzkQFl5taBPrV1gn1At\r\nddGCdj2M1xLbhUDgUqzw8Gj0MqE288H3UJV5yj6IAwcr0i2VmgszD1jEmg4K\r\nRlXFbc3WxnfTkSr6glq3PllgjzgyHOz9UK7Eh7s2xmehvrv1obeIYYGmVhTS\r\ngchjw64s7dr1jagTw9yKcdjQ0LruPBXLVVHXh74Epv0kDtghVyJO9c9yh4EA\r\nXkJm2ISKixgfQeEIr0HN0fStkHUGVZQlgsKv0CrG0xhYBBZ2S1qeWqs0ux4b\r\nsKqjcNCfpjD/VqI9V49CcBeMMBKrwmKbSfty68gc5xttvaLRMQIwtt7U/B0V\r\nsbTZhaK6wPhWFRYFwu+XCDSDN8xpp5kj3YYiGzxg434CuyOGDqk0duVmUvxO\r\nqs0FNQbo+1BaDPUpGNwVdxHwWI6aVgFruTyyR8D+KN+JvpXF/E8jpnAOhlts\r\nslXXrLAIH81deTw/ECG32o6TF1BaS9EJ7N4+PbWeReOZ2P4gCfpFfYqD6Iqb\r\ntEACNz1GjlXUQJC2bBux4yW0ywnSYsHu9mc=\r\n=73XY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-18.x/balena-jellyfish-client-sdk-13.0.170.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-18.x/balena-jellyfish-client-sdk-13.0.170.tgz","_integrity":"sha512-xOjIHCShLSQUXfK0awGpQzlaLfEohHK9q9Z5Kp0Oadmism2N8WN06lQ+XJ4uU9s0HWo2GcNWQsyPdCUckEnpZw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-12T00:27:48.404Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.170-renovate-sinon-14-x-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-1_1668212963634_0.19573161207829481","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.170":{"name":"@balena/jellyfish-client-sdk","version":"13.0.170","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.170","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0740d8b5551e7897ffa58ab05947f7fb8cee61ef","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.170.tgz","fileCount":30,"integrity":"sha512-h+ASZsHkpKtZcgTy95odF1oLpqItLprtSMirp2qwy8jmtbfUpOSuuli3u0lZCqjTSqyHL3y/WaNi0HllLy6WKQ==","signatures":[{"sig":"MEUCIHYXhwIqP7M0CUnzeOEq+AwcUOYMTOGDPqQeembnglNvAiEAuY+tMIgT6R7/1ka8ZLrQqGkVmfli6ALesMkFvFdxnxs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbultACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYBA//VpzZV4RqAiTL+nUjBshMclks/EFX5pKwbeYIBr4J/ZeNoGnn\r\nG4d1Lpf2gPMerA9ZbU8BKohXKh/94SSb9lTd3E8jgXEnOoWlltcUgOYtDUAJ\r\nUSkP/mBvglh2COuVPTrYv3mMdIQxZR2cR9jSRkUe8j4yNx2RdfL2yniCQC9W\r\nHKSQbgQqYm80oFKb+ZbUA6MqPk0qZujZWpj5Bv1EeISoXEeV1I1q5IaifcNl\r\npALZyLfw097P5ZmgIc8vEGiFgrjsP2gVuQykOSLbKmMvVbul9xNwB2zn8qGJ\r\n1o3Lpud05JXzeiKmcnuyqSfOpbzL4ON7cpv/c6aTPiTodyhyh/zBHxvpDgyr\r\nZq4RpJxau7OikNNBa51HbZ36z7byZXYs/or0N2xJOY7K9nCaAbj84L+7YXny\r\nF+Ygf/+nOGUX7VCiVhlJPy4coKbuzWMa5VhhpSRFApAaDU9m9XV0VCCo+JMh\r\nZUN690cXbO8DE7Mf6RuyOtz6s09RCnfGVHH//yNZcegrl8C9mwdxLDtJgO0q\r\n1JmekQhpY8B9oqb5psWDUWK4ILWDnP29BEg4zIccY1rMtVYyDkSxtTauUPeo\r\nqFd7FCCEl7skl1erTClNNDlKuGKHMZkFSSdlrbVYli5xAQKZWQ7qPW1Y0Za+\r\nppLcTUdoszg+0Dxx5Stl/niQlBXBU6V2fPM=\r\n=jqqD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-18.x/balena-jellyfish-client-sdk-13.0.170.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-18.x/balena-jellyfish-client-sdk-13.0.170.tgz","_integrity":"sha512-h+ASZsHkpKtZcgTy95odF1oLpqItLprtSMirp2qwy8jmtbfUpOSuuli3u0lZCqjTSqyHL3y/WaNi0HllLy6WKQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-12T00:27:48.404Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.2.2","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.170_1668213100747_0.20447035410748438","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.171-renovate-jest-monorepo-ba265a56ad711b5ae325946ce1b605258dccac07-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.171-renovate-jest-monorepo-ba265a56ad711b5ae325946ce1b605258dccac07-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.171-renovate-jest-monorepo-ba265a56ad711b5ae325946ce1b605258dccac07-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"dd726f17cbb93b133ffd1ac305e59b2212e80944","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.171-renovate-jest-monorepo-ba265a56ad711b5ae325946ce1b605258dccac07-1.tgz","fileCount":32,"integrity":"sha512-8FKCmF8QZVoFGQ+iHRk5Yzy9T2ipczpbN1RmDFp2RwebBe1Qv1L/fC88kV/IDNHOcYndIXqx6mS8XWgUA5ZYiQ==","signatures":[{"sig":"MEYCIQC/DXo4VpG5jRAqna9/KD7Wku7TLOgJF6qZdq+2/4BL9AIhAItfIHUTY0w0YKPF6dvbhcBXVwmc/cH4n20jQtCUTn40","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbuohACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmri+w/+If9cVvIuSKbYrqO0oKuaVciZcEGFClDB8OM+0mAUSKzatKbF\r\niwAfFX08N7+3dbbkwIePHnJfYXLmEavfhMZQF2C2GKej3KMbjGz1vrrjm1wS\r\nI+GKoRl9fR/stu+DkpbxW8445O8xOV5xQpFiOyGMAkaMQJEOYGpmSR9qp3jZ\r\n7F6Bwq/SnsKT2U29UX159A3xFwCOUK9TFL5caQ44CpaeRXSt0y0CLhKFx4hP\r\nSflW4v7GEtof92d/kSoByp0ko0fi1XLQjI3g6hU0mdZtSXt8qMN5oI5J2gbj\r\nty4Qqs+QLtAuBrvRa7u7VELeFF88z4CDdNrKp1TVC5diVJrcrJp9SpVB+uWw\r\n0Wx3VbkSy7ayERor2DxSlmByOt/fjnotpuQx2eaHgG8hd7/0rvN+dnl4ZZBY\r\ndPOtNrqfwtjKwsq2PmMJqJ6gz6IgUhyXNKs/mywbwSEsMZ4s1wBK+TPjW05w\r\nbnPjvhGFqgnRb9sixJDC8CTpKb1KJlVW5R5GjfzITxvfoeUO3s9yQRO23vvU\r\nRDoDIY7fwJH1LCfq3QIdeilMpewXJF8pni1IFt3eMFE75Bh0MDUly1w7yU5W\r\nFS9XbYgcdR88nmoXd5FP6w7eZUna9GywFlsbDrCaIVKBk8xB51Zhe7E19T/M\r\nyBqVZwlXr4KLJr74jImermq3xb5+kcvlg/c=\r\n=J/dF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-ba265a56ad711b5ae325946ce1b605258dccac07-18.x/balena-jellyfish-client-sdk-13.0.171.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-ba265a56ad711b5ae325946ce1b605258dccac07-18.x/balena-jellyfish-client-sdk-13.0.171.tgz","_integrity":"sha512-8FKCmF8QZVoFGQ+iHRk5Yzy9T2ipczpbN1RmDFp2RwebBe1Qv1L/fC88kV/IDNHOcYndIXqx6mS8XWgUA5ZYiQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-12T00:33:08.495Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.171-renovate-jest-monorepo-ba265a56ad711b5ae325946ce1b605258dccac07-1_1668213281730_0.7119934764671016","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.171":{"name":"@balena/jellyfish-client-sdk","version":"13.0.171","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.171","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9b668b11d92f57f9706a0b16e938b0641648bc7c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.171.tgz","fileCount":30,"integrity":"sha512-dBfOuZI3431R7FCHPuxhQAinxT9CYbvWgDswtYdb4FjQlBP1KiN7KfB8nthvZBKzO1ZU8mWXT8O9ssGDN7hzYw==","signatures":[{"sig":"MEUCIGX1WOH2PsZIA3oUg+jnWeZwbb59T7vxrVxnUIw4IKY0AiEA5BQqNhxOnDEBzPLd8/WgmqbQ1geY+/OftuLIqquBbmk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbuqhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpz9BAAjTqELnAqFRbSQsdM/F4UcQfKvpfvYQ5MHe2amLHoPhK35aB5\r\nHmLAk5eUpusLeAXsMc5gj1S8PwiquaZ7gHoZuCCt99f+QvxFEx5da+zjxKZQ\r\nVTsN2SuKIj6Q1wlkrKpoqjIUKLP61V9TWSFYMrT9EO4zPRnluyyUXpbR4Bev\r\nA2ZSAMu5DzS4H7+QtBqYt1C+VQaKuv/V0uOxLdjsfPJpNZN9KybFllq5EP4w\r\ns1Yd6RYgbPd2YoZlVHFkHWm2PQabyHUZU7NNIaRk9q65KQPjmlTTkdmu4kWX\r\nAZGdVEQzSN8rq/kSH3inx6sCKXiGi7BE2Zb1F9LWxcSVVbsoh+pywXZKXVER\r\ngEmK6Sm5iN9Rl0Mr1UllvAbFurBWqN2b+KK/ouprmI1UTDwmx91NiTGzbSHw\r\nGLWNDl+Y/fZceDpBVJGyJOfxXObrXXixu5YmLI2dtliHGzA9DsIc6dFzNvmP\r\nu+4daykuMuxKLKtkNPRha6jeWYvdHk9KI6YBGi0+Fw3pdAmxzxFaJx57EEQH\r\nWMx7dOmm+dpya2vlO69miRKDQj58fRCI1J8f3S8Zv134h5iyLSkiKncyLVa6\r\nPkCM7I2ZEROMLayAECPzPGxSbS9vEo2S4ZFoykmXuCckVd7sxb6AXjevofbH\r\nMkQAGb+GRglMXP1NqLnU+P274Q/i2PlrPFI=\r\n=IcBC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-ba265a56ad711b5ae325946ce1b605258dccac07-18.x/balena-jellyfish-client-sdk-13.0.171.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-ba265a56ad711b5ae325946ce1b605258dccac07-18.x/balena-jellyfish-client-sdk-13.0.171.tgz","_integrity":"sha512-dBfOuZI3431R7FCHPuxhQAinxT9CYbvWgDswtYdb4FjQlBP1KiN7KfB8nthvZBKzO1ZU8mWXT8O9ssGDN7hzYw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-12T00:33:08.495Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.20","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.171_1668213408763_0.45032946886028125","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.172-renovate-typedoc-0-x-b38dea4c22a8a88e17fd86982587b4940b93eb56-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.172-renovate-typedoc-0-x-b38dea4c22a8a88e17fd86982587b4940b93eb56-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.172-renovate-typedoc-0-x-b38dea4c22a8a88e17fd86982587b4940b93eb56-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e69a868ad9977c9ae8456d427b853d7baabace8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.172-renovate-typedoc-0-x-b38dea4c22a8a88e17fd86982587b4940b93eb56-1.tgz","fileCount":32,"integrity":"sha512-xf35Hr+SIAG6K6IpKFQSU+/4ZNJOdFjMJWWEQvxcZ/8OaHTL9o6svJwLoq+fl3Kqbj3FUhjdhVKVT1mvsO1Kpw==","signatures":[{"sig":"MEUCICDvfIkcjvbxXeNjolwaRRCBBu04a+bzP1Zzs4j9hPoqAiEApUKqsoZiqDDMU3uQZaNI87/9dHN9LzMOYuWe9LdxZuY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjca20ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrAZQ/+LkQmqg8gj2EToxafCAXjbwpI2YKqYCx+0K8U8kzn0UTLDIEr\r\nkRy4QuwmqkN1JK5Sef0yexDVz9AUUYnVGZhv/QjOXryyu8WkzsvHAExw397y\r\nqPlAWavoZ4kz0S9lTNKE+pEXLp4g4juNMv2VwXJ/8JQIlWnnNxlfVzqYFVQH\r\nB7kVRZznBKLhiq9PCEzBEgA9UJK05mI76q0swxsgcEh0TvQ1Ss8vpfi6Stg2\r\nwMrZlPcLHfmINUnf2qhX/QsdkWqqO+JEeMAn3tnVb0kCw7JEizhB56ZZDa5O\r\nzovKt/reo9ap4XfRmIXl2WortkXfyeQcK69ThkckYpEnMGxUQpcHVP9Z9UHh\r\nXk6s2y3Ra1P045bBME4U7Hr3N9GVfVcR6qUxVk+0jeakNtIaKNTxDXXftjkX\r\nswt7EGPSh8UgEAJOwUS5m15K0cHd0IflrVVBXWPwrX+ILxUL36jtf5D1Sbuq\r\neCoKWXuojL9QV2vLiXy4F8oUnFPuGjmSLypzqD7SrB80cFRW1U3SuY77HN0q\r\nRbb6GWg5wknYyjcPbsOudUl/Z/eZbVG4Ob1iMQ+ywCpBz+31aD8yIOFOnq8M\r\nZ3lvRKOgpgEPZN4mIBftfYVRaOt+nb1KcuiOWwocZG/so2YLp9hZvJ1z/+Xt\r\noaD11dM5ic9MLGVe3iuXZAOXP3cOhws8MRk=\r\n=55Ui\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-b38dea4c22a8a88e17fd86982587b4940b93eb56-18.x/balena-jellyfish-client-sdk-13.0.172.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-b38dea4c22a8a88e17fd86982587b4940b93eb56-18.x/balena-jellyfish-client-sdk-13.0.172.tgz","_integrity":"sha512-xf35Hr+SIAG6K6IpKFQSU+/4ZNJOdFjMJWWEQvxcZ/8OaHTL9o6svJwLoq+fl3Kqbj3FUhjdhVKVT1mvsO1Kpw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-14T02:51:05.697Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.172-renovate-typedoc-0-x-b38dea4c22a8a88e17fd86982587b4940b93eb56-1_1668394420551_0.9846446988541979","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.172":{"name":"@balena/jellyfish-client-sdk","version":"13.0.172","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.172","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f032ce49d939db5affaf1d9b5526466960df4f32","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.172.tgz","fileCount":30,"integrity":"sha512-mOR36/wUOr5tPwnnYesEQaCeDGcwSNSYse7nEjg1Uisx9JA8OKLH9AZj1Xu2KjLVPVn1xNCd4Ewtqn9GJSaG9w==","signatures":[{"sig":"MEQCIHSdnphr1R1E+h7MRVToRqV7doYfKsmcuN64hIyt19ndAiBJK9mQdv46qs8kRQBkjheSL3xNFxkW75d3h7sjfL9IUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjca4+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmra3A//T2aMPe9hTqMjwPL4gJD7WsoFaXsWNZRLQ1k9rZA5y9uD5nk3\r\nGJ8h3IjO/bXNARTQue3FcGpI1GICMKBmwqTySwN++kQrQpg+ZFIYUjea4kfP\r\nwsNBD/wWXPFA3KSF0etZnEAYErBEZOixHPIWTodAEJhvLhdsk9WW64XDMs2+\r\ntw5YvWjWzZEyoKqw6SHL8xy93NOoCO8Dl+tY6CmyuJ7GpwQCrEtS7P30EPTG\r\n+3HaNJNpiQTA50Qk2Yfz290U7N+6N14ZPrmVj95g3TQqgQyJ4BkLiUR+bCES\r\nVHFY0cRAivIdBBxapzApX21RlYyEJrqWhGQe0YfO4A26eJ/Kz4RCwcFGKvq6\r\nsLwevsgLZTgsabvep11X8GC++RqXBhH/UjXibSTGhviIYasQ7jSefUQJI0xB\r\nG6WW5LsSgAujGmUF8RvG/gbjtEJ/blohyHMHX5/k0NmS6ftBKoAfJUUmiz/v\r\nMTnQeplfOb01plH5ddDBOupoMoDj+Or4nXXBbkziQ1Mp2n6NDV7MwMcRsKQT\r\n+gT7BjmOVhsby/vEyGnmTagmwno/IdbNNEpBxH+pj8781+V3Bc2ltRNm7qGm\r\nFdHskIeXiz6vzRY3RH7zZRTDRtyZ4ur3XcmyMlcntx7IKWHOLl7kXDnoIT6Z\r\noGI6eq2WSIV5sEzWro2vAKpSxIvFW72QatU=\r\n=u1KS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-b38dea4c22a8a88e17fd86982587b4940b93eb56-18.x/balena-jellyfish-client-sdk-13.0.172.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-b38dea4c22a8a88e17fd86982587b4940b93eb56-18.x/balena-jellyfish-client-sdk-13.0.172.tgz","_integrity":"sha512-mOR36/wUOr5tPwnnYesEQaCeDGcwSNSYse7nEjg1Uisx9JA8OKLH9AZj1Xu2KjLVPVn1xNCd4Ewtqn9GJSaG9w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-14T02:51:05.697Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.2","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.172_1668394557800_0.5481415167952655","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.173-renovate-jest-monorepo-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.173-renovate-jest-monorepo-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.173-renovate-jest-monorepo-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9cf644852f9f072a3cb6d97adf93f207d2ef0ea4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.173-renovate-jest-monorepo-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-1.tgz","fileCount":32,"integrity":"sha512-8YnBFWIa8uAi5EXalIkZhR0xQ1T8U6TIoRJI0z3mV4nbUNc7wNopZollh5VUrojNpUtDkWpRUGGWBTGyrM0C4w==","signatures":[{"sig":"MEUCIQCsTolim93Fidns9Q17ggluBH20Wr21QkWOjgosTH9xNAIgOOOU+Wi1F8fUPN4ID56dgVfhCOJy047tFluygHrnKAY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeEe4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKqA/+LqNshKNRXJ4pv907WyMSab1OX83GHpS4GNI8iRidqklRwmVf\r\n9aVpO9Sy5I+ylZ9vSXTQLwF7iPHEkv8NybZ6X7Fopi9Bsj6gn0ESPZF8YZZl\r\ndxMfi192R/bDIA0lM4SrRQnCJLF1z8BUElerJmKkJz296I1/9Cc0kd0b5g0a\r\noYnUR00/GjluITacrzj26MMP3/lQe2IL1hbJnv5C1NF8xEIA2h+HDWQ5me3f\r\nAPM8YhKt5OG7ENxtO9k43TMh/wi0fPNsDgRpyfj7uwoV0ujThJHDcldwfmK4\r\noEFhq+nxmapizErDE7V4T0CB6VBG6djSaCnMONiHN0i49TC/Cr+2tIrRYnof\r\npPEeAj/nIWupcKuXL32WHpO6XqTGmivtGPiv9Po6geCZtqqSm1FCTeIvr0uw\r\n4lnYLj04llmSrxD/w050GzxXOgTMGZt8hMp7uscCG/PdGl3oBLiNW83E5NWs\r\nPmiP8KyIE1+QcPXWu/yJOr+LSsPKq/xbs5Wxx9pMSTyS3+dGUkf8hYEVV+1P\r\nMydiqFYHm/hYmzi26qVN+PW/jdLjznZzjojZaG/kiKLwxW1l3Jwh6i6/tvzz\r\nHiDQeN+FNcnhHuICV8ZXr5IF1LbscRt3Cz5x+YbKZ5QyLA9dhW6W1RZj5mVg\r\nYWDc/fyvE+SFv/KG+7aG34sRa+n0iCSU5C4=\r\n=Q+oC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-18.x/balena-jellyfish-client-sdk-13.0.173.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-18.x/balena-jellyfish-client-sdk-13.0.173.tgz","_integrity":"sha512-8YnBFWIa8uAi5EXalIkZhR0xQ1T8U6TIoRJI0z3mV4nbUNc7wNopZollh5VUrojNpUtDkWpRUGGWBTGyrM0C4w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-19T03:02:53.236Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.173-renovate-jest-monorepo-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-1_1668827064629_0.019739705114487416","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.173":{"name":"@balena/jellyfish-client-sdk","version":"13.0.173","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.173","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"432f481e6dd1d497fce416a54a1cdd2550967801","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.173.tgz","fileCount":30,"integrity":"sha512-j+hP2BRYfQcxK0nSHNJC4tZ1i8pBtG738znXQg3gbCewLNEF2CFUJs+zcRqrTk7pZ/4bBDRWEtoT11pa5j42eQ==","signatures":[{"sig":"MEQCIArugHN046+ugGNJJyhvqvVWE6A8PAZziUjrD/pV6QiYAiAm7G3EMjXDlGCNc5tx/SCElLfoPTgXTtlyX3Sh53Fhtg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeEhTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqeuA//Wz7EyWak/gYub3kMnLy5Ogie51gks0u5I1KeszqrWeh7Kn1z\r\nzBgo4szaoUwBOF/oCOWXvXkzjO89S4Y8a0qpc2vFNKSMX1PR7Q6xHejCfsVX\r\nRYMK00SFAQUHmjeVb+yeMTOgwTCK87Kb2zonaq+HzF8628Uuk6t2mN/qCfCR\r\nioR0YlD7CHycMlS4iT8FIkJecbXXastCZ1A8AZmfKprj7l6+Fzt79uC6nedL\r\nGvn19Bilxb0F2D5idUfadVICMjWF2Kqyh0k7GhrNSH+1mzNpOBb0IH/bwyHC\r\n3rXxtvzJbikgfJGeyg6PlD4KySwL9s8f5ZNbhzglYo5Eep0cRW4h8esNtpIA\r\nlwN0dT0kq2zYct0WcZsVlI1RjV742Z5w3MHJ4i+LkkQz0Tqe4MUfRqt/4nzn\r\n+ycDOxA3VrPbdXDCmnVXVT/1QUIHDLlKhV1MSqWlgdUvC3oFqkxadlFLLZe5\r\n4ia+q2QdrhB0v0kAg4P+OwWa6HRR2k5XGBwiWhWE8hkytnxYCBy+ks6x5tnf\r\nOGyhhfhHoDzfqY+nfqQhWFMTP2Qq9GQ7WG4nBPny2x/B0J2xt+LBlWU2g7u0\r\nD5lf1B7MgceLHIaokjAiIflLxBO8o7ki6sEUpLTIHIx1rLzYI4yq8qJyASdL\r\neyzsBJMFWmijkRjxApe3q/pM4PiIhHUjgys=\r\n=BUb2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-18.x/balena-jellyfish-client-sdk-13.0.173.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-18.x/balena-jellyfish-client-sdk-13.0.173.tgz","_integrity":"sha512-j+hP2BRYfQcxK0nSHNJC4tZ1i8pBtG738znXQg3gbCewLNEF2CFUJs+zcRqrTk7pZ/4bBDRWEtoT11pa5j42eQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-19T03:02:53.236Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.188","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.173_1668827219189_0.3547789954905589","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.174-renovate-lodash-4-x-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.174-renovate-lodash-4-x-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.174-renovate-lodash-4-x-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e16e932a43ac129c176154f6efc16a2db4b969c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.174-renovate-lodash-4-x-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-1.tgz","fileCount":32,"integrity":"sha512-rOtaAxuYrkLFc8laU11bSF6ge+ltBp0oe+RFyMghoipmv4Qbr5HL96UFz9z/3DDdcmsMO1fWB6gGVe55W1Rc5w==","signatures":[{"sig":"MEQCICSQc6w0Z9IljYjNDHbtr5Yb7B50brEYaStNngLKeR2sAiB3oad58aouNOkzpk7Ua0bca4pfuHOkTMZ28a0quu5HMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeEkaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRhA//QuC03XD4mJLEi2cc+V2yZ5rpYhNedVlHKA2fyFs9Pwe7R2mm\r\nJh10x6AkqKl/zIYrNHG11kkeCGGQH66yB93PV9VdgKEenbZkt9lSV0o3kLhf\r\nyIe6z/sjZMiokgs66NBKsDl1FmrxZYAT7Ogv9ePUMF6T9sBElurVcIJO4RSo\r\noARlLUObb0/Q9ZjR5JxpCjH1+iLveDpWq95PM9DRmI0N8v5m0QDN8I5aNKIi\r\nhQ9Pf7WpXozLHMJfsBOTtpnPKet5PyD7hn7JX9tXckXh+U3QWodkC0RWviME\r\nGZzvMPvxjR/RPFmJBnldmJL+3a1EootoFy38mmk5HBgkzBKstSn3q/2pAPPu\r\ndVzp8AYBcuesNJD3aO5XL0CIb4Lgix8sEhgFWPMk9s7mFcTVYYFapyvVn0Lo\r\n6JhkST9WILn6pC6ZoyafXX+8Z81Q1VS1leKeeXQyU0QSekL0omt250FhvWX8\r\nxX8gV5xFC/EMBfwWFTX2AL80CnXaLZex2JRcKSzse3rOBkE9VjC3k/BKyb78\r\nl6e+gyW/2ue0Ey2l5xCKg4edFO7OSJNsGsUEBEgXx//24W3Qe6f0uYbIOf/O\r\nFWPg/LXUAJQQCJ1OMUrR+hWscwVPlTaXiudXa3ezgUDqHC9GmGb9aquC91EO\r\nOE/ex1Zc4CP2cRcGNwNBOPLLkROwDig9pc0=\r\n=mi+R\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-18.x/balena-jellyfish-client-sdk-13.0.174.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-18.x/balena-jellyfish-client-sdk-13.0.174.tgz","_integrity":"sha512-rOtaAxuYrkLFc8laU11bSF6ge+ltBp0oe+RFyMghoipmv4Qbr5HL96UFz9z/3DDdcmsMO1fWB6gGVe55W1Rc5w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-19T03:08:54.565Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.174-renovate-lodash-4-x-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-1_1668827417892_0.9105727540281836","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.174":{"name":"@balena/jellyfish-client-sdk","version":"13.0.174","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.174","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"cc389c401ab46e05fa45a1696e9329730a1e294e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.174.tgz","fileCount":30,"integrity":"sha512-dI14rLoBYalSS1kvTAfwlIHhUDp5Y3ybo11EWJOXIKXEOIsPM5vpJo21dd11vwcTJ7EHflR2j3LvtDooe5WH0w==","signatures":[{"sig":"MEQCIE2hfOAukS3ZDtGvhNHwXjTegBNXCjrSz2XbNu/RzrLrAiBFb20iTw0Grbm5U0q5BIlnnWhv6SpYm7MdqKLlkWWc3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeEmsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjTg/9G6s5ZBcnySHX6oud/vveOTl68WjwtfoWQgUsSrgY3SknOP1d\r\nSfNVWKV7Lxn83iXc3bhlIgkc+SQnR4VBXEISI0RwrnYN+lLQd+diJV+pGE7R\r\niGWXKgf8wS2dsJfv0EvuZZZwMJcxv00NSm6xKQVL2I2nOEBX9TPWpMCa6GrZ\r\n0ydzBD1jVXQzHJO6T2PeSdhNVRpqcpU6YrJX/FXeJXFjhEdR6/5RMwk5qoHz\r\nF8XDtXoBe1lChGruutMNqJYFmyB1SQXI3seSDLnFXJcoy/9SOv8nqbaz+uIx\r\nrz3b3JUbzN8vGCDoDYBTYGWkTsLBvKGmj2xqEbq83A+e1usp3wuP5tEgCHot\r\n2QzPeDkTOY8S77qnwRCpFZN6PoJwZb7FaGajN6zS3LQfh24K08f8vLa16DtD\r\nE5XnME9wulJK53SEGzhHHu5NvjxhS5CxWyWoemOsO+TeYJJ4HNwT5UeM8+qP\r\n3W6E6V8AZqblqTVY7rPV9pRv+Kdw1ju02kW6yHd+llollgWI5VST1gMXQ1kY\r\nNb4zg0Ef8fT/TxV31BNSA/UF//xOrZxRLPmS19MokuW1/Av0Fcxuzb3fBizE\r\nJ79SrghILe3sQziBvvJOKiH16+Khotd7H3Lzg+0jhizeZMawGb3QPPlbyRXJ\r\nTiAObTg6moX/Owe/tkecUdBvqaMEEXRQluY=\r\n=X2X9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-18.x/balena-jellyfish-client-sdk-13.0.174.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-18.x/balena-jellyfish-client-sdk-13.0.174.tgz","_integrity":"sha512-dI14rLoBYalSS1kvTAfwlIHhUDp5Y3ybo11EWJOXIKXEOIsPM5vpJo21dd11vwcTJ7EHflR2j3LvtDooe5WH0w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-19T03:08:54.565Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.8.4","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.174_1668827563931_0.3669669288113786","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.175-renovate-typescript-4-x-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.175-renovate-typescript-4-x-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.175-renovate-typescript-4-x-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7e73035c173dc87bf8c37db7553e684a972e20c3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.175-renovate-typescript-4-x-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-1.tgz","fileCount":32,"integrity":"sha512-VaKBHscqau/+/pELn6sduWgOCf9MGCxLnDwT4Ov00h3XflbCxUE720keV80Y0Vqxe21LuY8oqdofVSN6hOFFSw==","signatures":[{"sig":"MEUCIEITBl7aLUh1oZbJDfYtsjOwnt5g2XI2T0HnQfV4j33rAiEAxhLJKYv4n8P62GJhsSh4w6pa4P0LCrefevi6nz31Ksw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeG3zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwQw//csFLWaKGFuD9pKDx4qix8NyYevYhhcMUO59BMoMO9nf+6Ptj\r\nTbSals4Yhd/i0QS1t32rycGY53I2dh0GTRLlW4QYbrSpBtJW0i7GjTba2eIh\r\nqdQlTODcl4qmzWCtThkKPQL8vp60Wt7YTTnS13FFxtJ5TN8ZH1/4+XX+a3M0\r\nSgsKT3u/DzVjVoT00+7bIo56Rm9w4L3U/uhCB8HSRMMNyJ6Vn+2PWboZ7miD\r\nJ5znazj6uJJxirVXxDQouTvlcdxGrA5/EbflZhctzRnI5UMdr5Z3VhHdaAG4\r\nQsrU18ZMPHr93wmFeTWKIAdiKU3DFphUQJoYLkfAD4htxXoxu12izYyi6wc6\r\nosOe0BynBBffhV3NOd5uB0+GuMeXcQG1wSRCoodWiR9OZir2FW1pn1F5bN+U\r\nmZFYtUUCiqtXrbrM3hmkoD666aJJ7WmM2ygfNqGozQNW4ExTUYgbLSn+3s+A\r\nkAgkIPwpfES2YDP5oUBCs36d830/CupOYqnV/3iFO9RZs4Qs3k/sdhQ5b/12\r\na2gQdTgGEreQcJZiC/X01bsbROD7enoTh+zvtVjv3NHhFpNjyYzucXTmTSYw\r\nTxSPKWOc0g0gfkslF0YujYXx+iYH+S0Td4bzKgjc+RAgATRdEF99gKqdBGfG\r\n4ZtXjbzJorYoXo7Sg3X5mHp42Y5fD/UZoOs=\r\n=y2G1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-18.x/balena-jellyfish-client-sdk-13.0.175.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-18.x/balena-jellyfish-client-sdk-13.0.175.tgz","_integrity":"sha512-VaKBHscqau/+/pELn6sduWgOCf9MGCxLnDwT4Ov00h3XflbCxUE720keV80Y0Vqxe21LuY8oqdofVSN6hOFFSw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-19T05:45:59.413Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.175-renovate-typescript-4-x-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-1_1668836851170_0.475924234222437","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.175":{"name":"@balena/jellyfish-client-sdk","version":"13.0.175","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.175","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"11f9d36cc26e493bccfbb8fb7304bb6e6b20d1fc","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.175.tgz","fileCount":30,"integrity":"sha512-4VOJcq55ftVBS7C2SLsZTl19BG6Kul2hrOAulZwXCYMioGmnKKJ8Nzpi83/2aJNPgPUXxIdtNlJJVOgMdbSCVw==","signatures":[{"sig":"MEUCIHY7cCk378na2iwgrtUFJO5dyLP1x76CU8f9xBjgqU2DAiEA1BYMyJE61ZTTst6KVscvwtTtJK83nQ75gMzmUycWxE4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjeG6IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq4Pg/+NYtVsPrh+nQj7r1o0/UlfVv2rKdksxvmUDbFtFoEqtK4LlZV\r\nbHBoYpJ+lgdG+LazO7WE4WGAoyyZubWJ/btSwZ2AM6xW9zWwfY+zOZWIuDJZ\r\nu4oWhBDtUSwvQKczGk554Psn/2acr/kVvrb9YLoZYdm5FcBfQvoS9kbAjD8J\r\nZ5a1JtojdKtd0eBJ42A/8lFWY+TLWLlKAWK5xd2+62nLYXUr/6u+sWesFNFy\r\nro7OkZF++jRWOyPDS+spyJYgacJtIYEtRJVp74rMHJteHkdz+zw/3GwUJlaI\r\nQFgat5SJCNkYVH+9DkF5WvODNQEwuRC3ne1cO4Wef2x2hJJdnD+DGA3vNvJy\r\nX5nBRMLIs5If6ItVVreU9u7FI05YXScoqbRAteb3j9AiEUtExmG/RP01O05W\r\nKZ4S+GOiv0wHviWER/hRHTLbp1SssCWuOi3q0/4PjrXFZu4ijviJX6tdorzY\r\nnuyb0RwLSRwvkawGHd8NVPHxMQ+VS1Q9Ba4cnbUz1tNDUmweya11iOAnDoVm\r\nbZKl2Sdrk4VmTCKdwpeng4Lj1D1ahlT7X4EfAr9ZK+K8N5YCqiKlwuII9Rkd\r\nE0A+9583YAuoDDV0yKqnbehY47Y7ArnSpaBjScUX1APDrV01YLjFt2fYMKMQ\r\nEXRECOgwqbJ0dLT9cUt3Vu6k1H727XreQKQ=\r\n=w2Jc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-18.x/balena-jellyfish-client-sdk-13.0.175.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-18.x/balena-jellyfish-client-sdk-13.0.175.tgz","_integrity":"sha512-4VOJcq55ftVBS7C2SLsZTl19BG6Kul2hrOAulZwXCYMioGmnKKJ8Nzpi83/2aJNPgPUXxIdtNlJJVOgMdbSCVw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-19T05:45:59.413Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.167","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.175_1668836999977_0.3755082158245977","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.176-renovate-autumndb-22-x-cbf5ff210c90f2365b76e7483a6bde3963db413b-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.176-renovate-autumndb-22-x-cbf5ff210c90f2365b76e7483a6bde3963db413b-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.176-renovate-autumndb-22-x-cbf5ff210c90f2365b76e7483a6bde3963db413b-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"96639272b1a293fad90502389d2fcd72bf6d1972","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.176-renovate-autumndb-22-x-cbf5ff210c90f2365b76e7483a6bde3963db413b-1.tgz","fileCount":32,"integrity":"sha512-zE7lu7TL9Sx7hyqWNFWK3Ff8XGRyV54akBVCWGjyShC+TP176YHSZ4iAS3YGyzfOC5QACM8RY5ASWh4h5o31CQ==","signatures":[{"sig":"MEUCIGGmPJX33zZ6qEluxyiBEqP6k/0Dwrd+PiHak8yOkgbcAiEAgJAtSpVV8kkYr8qHHC5Nd54JgXOKjUMRsfbqqYtYf7M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjft/wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCYA/+Ptd15YYCTBBhwPAimLwZHTrx8SojqnNOztvaCVDBnBVlrNbF\r\ntBquTJ7avpbVAloJ7E8tgaPFmSiwIMJ8PpHhTdQlhErCDyh9ROBftQyJ/8T0\r\n54xBvq7QX/dhjlgjkvrUlnS/z44948CcrzOOLR2pvb/SRc+7yl17YdUdeZGa\r\nBGrzXksEcWCp5dtW0BBlI3C/hlcHr6AUllWDklJq0hESzCt/SAfq15kwG6+z\r\nhmtuorw39WnYEncRpuVIm6t4BKZ9Sq68geVhbghG2m82r7hRpdQ5GLRHhtUp\r\nZgIWg4yyaIL5YBsLgc8DU1n83VwDgKx8z0H5T/pspsPWxl/nz4I4QeeFpOxA\r\nCl18nJ+4KPbBjDv2kedRlRg/GgnvawzSfTy8Ev6GkriGa3cEfgDlphZEJrHD\r\nrdlsmKOCnDLZlRygNPsiuq4LDtLIHeyKmVbGECPPvRBJb3ETP+Kxwq2Lo9wp\r\nl1XzU49as1of5TCD9KnZU5kV+MHj96YprGIMPyb25vVyDMxquM2OqCYAxhu9\r\nsQxWy8TT31mlB+gus2uC3hniP3UxbsT/HrYQZj7yXVdAB46fbzXuwbYteV+R\r\nPfvkZJtyNS7Ky8aV4yVtOgru2DPtEtQIpsEMJryKFKDheZ4Y9ac0U5kNLq8T\r\no3faNGnv4C0qVNGLzh07wwavwSJg95Uu9z8=\r\n=2dO6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-cbf5ff210c90f2365b76e7483a6bde3963db413b-18.x/balena-jellyfish-client-sdk-13.0.176.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-cbf5ff210c90f2365b76e7483a6bde3963db413b-18.x/balena-jellyfish-client-sdk-13.0.176.tgz","_integrity":"sha512-zE7lu7TL9Sx7hyqWNFWK3Ff8XGRyV54akBVCWGjyShC+TP176YHSZ4iAS3YGyzfOC5QACM8RY5ASWh4h5o31CQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-24T03:05:50.066Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.170","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.176-renovate-autumndb-22-x-cbf5ff210c90f2365b76e7483a6bde3963db413b-1_1669259248024_0.6586176023029817","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.176":{"name":"@balena/jellyfish-client-sdk","version":"13.0.176","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.176","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"252bc6ae2ef1885e95813044d55350ce2e6ef953","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.176.tgz","fileCount":30,"integrity":"sha512-FtIq2Stt9WTUKdt3Ny/kVt+bH2EAJAkw617JR0RRIkoTzFXUGfXYHutJEE7lqoggX9pyM39f0DlA0X7K6GVLiw==","signatures":[{"sig":"MEUCIDqmvFMEtnP7DpI9eDZrUD4wVbBb/vSdFSYGIFGujT7bAiEApYfthWvE2DN0Ht7NkxNs5gyywORH04Tz5gX3GWsmIDs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfuCFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTSg/+I0s5/RhEZ5UvScOV0JEK+UPpItQx/sdWgscZHMVqnduJnTUp\r\ntc1kZlCex0hxAM9KvIwy2Xl8VFSA4+LwHr5HwwOTSD6NDO/8U5M+qNqQFee6\r\npCGCw/fLOBsSTh+oEv5Pk8bY2oPYbZSTsYeQZloApn0jU/hmwyGuKAnF4Ose\r\nYCDmYvHNeuDrtRuzEseF2PUrzY0fsZWMwnn6z47GyXaI+caWntdwIME+zrcb\r\npDwFF9VEBjuMXUnhe2uthvB46k4vprgypMfh1CqlyzyIT0T7JqknVXNyoArp\r\nd0r0AHANpOaVPVRCtpQhyWPqdOx65q/7gp0G/RTFicCwiPvnZhTJw2umyeYW\r\nFUhSY5GzCTs/XEIl0r0VWdjbY6fsyh94xhYtK9vHKK5R+DvIS6PArkY+Xhn1\r\nvjS+2SMdxhBXqmTcoV4ePVk1xO8tmILSNsl02wiGcrKhyWQepdbPyB8YiY58\r\nGnm5JEOAn914XJIp9bFEK/Y1+PMyQ9g0aV582QRTmbndzxm4SdlNME8tBLUO\r\ngUNopXu06PP2W6esv2qrRv88iawVxdmq1ueuj9sRYdETZU+Ig54DGQsfsAZ+\r\n2WVg0ZNrNy3rrdN5RO8wklrqP8MZnlvit3RUBXlN+zn9gy4m0z/Q6rsUM1ct\r\nWrPza2syPdgm1MuMIad8IRk9E/fsx/JJs9M=\r\n=jUVD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-cbf5ff210c90f2365b76e7483a6bde3963db413b-18.x/balena-jellyfish-client-sdk-13.0.176.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-cbf5ff210c90f2365b76e7483a6bde3963db413b-18.x/balena-jellyfish-client-sdk-13.0.176.tgz","_integrity":"sha512-FtIq2Stt9WTUKdt3Ny/kVt+bH2EAJAkw617JR0RRIkoTzFXUGfXYHutJEE7lqoggX9pyM39f0DlA0X7K6GVLiw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-24T03:05:50.066Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.170","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.176_1669259397589_0.5140837804742944","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.177-renovate-autumndb-22-x-5b32b1bd81bc3a249a4c278b2440a157b2353d67-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.177-renovate-autumndb-22-x-5b32b1bd81bc3a249a4c278b2440a157b2353d67-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.177-renovate-autumndb-22-x-5b32b1bd81bc3a249a4c278b2440a157b2353d67-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"691f8f4ed20317760d618008d4487f7731ba9583","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.177-renovate-autumndb-22-x-5b32b1bd81bc3a249a4c278b2440a157b2353d67-1.tgz","fileCount":32,"integrity":"sha512-kGQasVLwuP7OM8qNDzRvM/7qdLKbL+INmFRJh5AjM/4lZERNjgQO6/lotrrxgllPgFNT3CWFryqAsYOcIk0HEQ==","signatures":[{"sig":"MEUCIBqwim1jn5OzPY7xezWKZMr1w0O3KTj7BYB/rG03MZltAiEA85AE85xjfPzvagEirouXPlDI5mjznF7unMShe9y8Q4o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfwODACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpzjw//Ut6pkhueaFAgzF1XdtqdEm8u4OgutcfkM9q0tJR2krdsRGLz\r\nqosmUL6Y4fGjPdEhQW2XA9sapHcc4+Tfr0crcvVuKPefGlShb6evdMoqfXcc\r\nE6mzL/K3uXR7VJYdmmqQpa7d+4yho6aMCpcXO6QxEmJ8Y/uyGXutxla2AvcQ\r\nziC+542IVAVRmx7p4SryuOJr7JgiDAYrWU7JatZXIxb94CDnr+p/N9Hly8S/\r\n20SNfK7S1bGkEGZyM2Tkt7b153hupcGariPGF7bNMfU1Gs5IHO7pknyN/8+v\r\niOOqMCfWCBJL3egIfcSdcjIZP+jbNbruJHgk3uNN7SLfwSApgoJwXrnDIZxU\r\nb0q2PRinjlaONms3ArVXLDNuZC2Z7vVdweKh/a5RIKm9ja0ViiW68vDIYNMp\r\nOHWI8YTlzEFjAVgxRBfEQhZ5JYZ0DZWfoO4XiGLsIfU7YL6QVpcBjqkTJGe6\r\nGllQ0HCPOwDxRw83QRB+mSsB8w5+CZY98IvUrihUm3kgB+ssYHWNjMlorbWq\r\nULHjWSORmRWI8O5IQWqtvm4sYOQdd69mnsL3DAyYT/+ATeNHHj0lPj51gock\r\ncV0mF+wPJ9uY32vtG0I+8mkZqj3x1TzrZoarri0DHSY2iVEn+x1ZK2IaCOlL\r\nyFTc0HqCCwJnM/ZydBulR4u/g42bDqwiSLU=\r\n=SyNK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-5b32b1bd81bc3a249a4c278b2440a157b2353d67-18.x/balena-jellyfish-client-sdk-13.0.177.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-5b32b1bd81bc3a249a4c278b2440a157b2353d67-18.x/balena-jellyfish-client-sdk-13.0.177.tgz","_integrity":"sha512-kGQasVLwuP7OM8qNDzRvM/7qdLKbL+INmFRJh5AjM/4lZERNjgQO6/lotrrxgllPgFNT3CWFryqAsYOcIk0HEQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-24T05:37:44.338Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.172","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.177-renovate-autumndb-22-x-5b32b1bd81bc3a249a4c278b2440a157b2353d67-1_1669268355113_0.0861494570236947","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.177":{"name":"@balena/jellyfish-client-sdk","version":"13.0.177","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.177","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0d54eb0c5191a089c20735c06c914508094c3262","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.177.tgz","fileCount":30,"integrity":"sha512-Or9ZnCV7CXl8EYwEc3TyXvkLJ0W3zWXf+bX4P/BeLBITZU0bPHgHyDQbqKlKbAMweEFWZwJCaObs04FVFGthhA==","signatures":[{"sig":"MEUCIQDLqso09GDCo+0S+gNaqfNHYDuU8edem+ip1tH3UXrDhwIgYUeuuHq3bmTlTD2RxCE3GddhA+ophdUedLEwhpN3v/Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfwQMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryUQ//cO3fAWFpNsiqfaq9cETO4zL8L44Z2If3GpiiaOYRm7gk6Rb6\r\nKrFwYKLEcEyGS/52ByNRlnq22tbDbx7qcURqfvZei540SHVJ0zowwmWitt0r\r\nRaxLbLIeOc9TbWy8vGboj/XnRKhUo0t7DtZKJO+aq6CP3s1/VSqQahvyWwSE\r\n9i+WR4esceAkyi8loN/e8bzaD6g05ZH8HeLm9DcEwUeqQgcLjPEbWIeceiJ3\r\n0p9FSp5IZDBy5aDTv9HHot2Zq870jZQP+fonqNsREGNhSHX9xNSr7bkax8N/\r\nEFE6SvV4GM2rlmnDx5pD+La237QPvbQI0b8VnBJO5YRPXec4QHud72vtVyp9\r\nYxb62ssvd6hEL4x67VgeHL9BtK3biWPCOu9XEuGTbfl15NLtnXERYjDcuHsy\r\nPzX8nhdsW/Kw/ofh2NlsuUbmYI3oZgB7hZ0hJkuXOYWcgDkjxVsXU8jJ/JMv\r\nQPC4Hq4KwsqK9BG02Ehjv2NQIHkyTE7iyISgLJv624bkk7RKnMx/2lIImlz7\r\n3zQ1v1DGYdtEfHLXwBfdiPS3Gs0CNBlAR3h4D54NcVQvYmmy7c0Rn0/NdVvo\r\nV25j7Gh/jMpTQE2e6xZF29gCEHJvzftJWmcB+q47YkKYgz7HjeDzBWaGyriS\r\ngT9Z6DVynGTwPZQGBwFRvNNPedbuB7KOrX8=\r\n=utzB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-5b32b1bd81bc3a249a4c278b2440a157b2353d67-18.x/balena-jellyfish-client-sdk-13.0.177.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-5b32b1bd81bc3a249a4c278b2440a157b2353d67-18.x/balena-jellyfish-client-sdk-13.0.177.tgz","_integrity":"sha512-Or9ZnCV7CXl8EYwEc3TyXvkLJ0W3zWXf+bX4P/BeLBITZU0bPHgHyDQbqKlKbAMweEFWZwJCaObs04FVFGthhA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-24T05:37:44.338Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.0","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.172","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.177_1669268492477_0.3688199180748264","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.178-renovate-autumndb-22-x-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.178-renovate-autumndb-22-x-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.178-renovate-autumndb-22-x-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"db1f0717af7b194235c6df727efb610dc74b9c8b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.178-renovate-autumndb-22-x-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-1.tgz","fileCount":32,"integrity":"sha512-V9Z08A3mJNChzUpZZKTjfYOz3NCoYI8tNLAQtYCYmZIGgCe2MJoD6jrUOXfioyqCdFXeM6vCie5CnXNC+ES3Bw==","signatures":[{"sig":"MEYCIQCenGAFQ2Hzniyd4KKsM6/kWgDw5Jj20YrvznqX8hRMvgIhAK6Soe+FnxKGQnTQg5/qTELfHi2mbUnV9ZucEBbQcTne","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgDu/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoang/+L/Qs3xP7kgcZXZMkt3z8ghh/Gk+PDIloGme8fsMZokxPdisx\r\nrz8/cQyup3ZEL2+O/ARuvYWSH6k5s367FaTQSUgsxr0TUDGPYpGwMgRZozMm\r\nMcZ+hKvLlsurBLiq8txUJkpMZO4TmATOj1PvMasq2oYXZN7kvpfK8ePyke2p\r\n9F0EHHQwAv2MxtdaJ1VFMz3dBH4N94YRWSVNKM7hZ/STmk8XS89kaQhtho+a\r\nIt6BuGgetRTR4KrpeQN6pDKwn27fjdUI73eRslwQbhTSdbxpV1cjzKgHWSbX\r\npnFz/JRg0cy9Sp1GGSdNyCojrZLOntOIi+BNjq8kAEgE03pHCyPlli+KSHqX\r\nQr2HyiRHaIBPS24SxjboLbHoveLL/Vd37OHZ5mWfDxn36C650J6t7SQcYn4q\r\nmHb2jnWxaJUPdW+7LYneREO99Roja/WvEi+0w2S7rxRUEuYq6vOOcvgVCeqX\r\nBoZEEIRNav0A+JdEZEteJXuDUbO3tApnDYGqsjQqM68l/QhHWjzg/hwLZqQM\r\nhuJUCLYlDC0MJD3B+cmDGUPrc7xRx7fviySh0zGHEIudf48PQ58Rd9be3eGx\r\n4J+QkOZh6vS5Wdib0Oi0+sG3qyaQflonqIZnhAH7dTQWzTJ6L2PBmOLDG8W6\r\nL+P1cIuRxmbsAV5n+s0nOJ0aFzlhAsKKkfQ=\r\n=lko0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-18.x/balena-jellyfish-client-sdk-13.0.178.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-18.x/balena-jellyfish-client-sdk-13.0.178.tgz","_integrity":"sha512-V9Z08A3mJNChzUpZZKTjfYOz3NCoYI8tNLAQtYCYmZIGgCe2MJoD6jrUOXfioyqCdFXeM6vCie5CnXNC+ES3Bw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-25T03:49:36.438Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.173","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.178-renovate-autumndb-22-x-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-1_1669348287082_0.6893848781320409","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.178":{"name":"@balena/jellyfish-client-sdk","version":"13.0.178","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.178","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24d98e767018b44d3a43855b4b3cfd1a11d8a0eb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.178.tgz","fileCount":30,"integrity":"sha512-MWF9b6lonTJuQSyRtv2mkwifpNYyIRu/u11X4Ed7Yehdme/F6isWh2T2o/JFsqZRYO5Ijt6Xd2b7rIsWhhjRtw==","signatures":[{"sig":"MEYCIQDO1j2zsbSviMnHBis5Dew2spRi2xm81NAvVuWqg20b8QIhAMb+5Jw7NnE6TadyaVaC3uyjxc0asVT5T8lYSeeuSAhU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgDxUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnIA//XZsz1ByqmHsneeBFbRNLxGdT9cLWRq6ZmwoJsqKI1hg/ONWg\r\nl9Ls49fW02XYi+Z8UvJSU1T7MiHfpLAPGs567zWhqqhK5ygq5Y8IryiRVwIw\r\nIGm4Qk/CNo/Xb75fgibja0Kxmlcin7Zjq+uKVqtqgsG1EGzyS7+spAjMzIMn\r\nWokkgsBRhaDqjtH45GkOflQ2BLaWd3fs0rDq8kwqDLLaFvAPazQC6rJh1AGR\r\nR94psyJVvx4g4T2u91Q6g/2oKfuEHu5geco75h4jZK1UL01OS/Cwjiyo4JcN\r\nW6XSE8p1GPndn0mboXSBK3/xSRdJt8uuyvb0VS0hShog5KUiPQrU4bq+EBKg\r\n5SaR3gGAkeReajhWDnlGBD5QQh0Y8OxVoK6OEki4XOLU2CSdMQRLm+x1tFgg\r\nBFeZf+BnQ+LEytWA7jlW0ebGgCPIANPKpbNw2ZcO+26NfdVay8snbo6t5f15\r\n++APbYlfKkjQfLnuBm4srFNNcMbwKX6mZe+01P4EVIA4qeDIsvKzGOhkGpva\r\n+8aeQuEXXiMQTvIaT2LZMoPSlHI1ym63On79w2RRIzrl3jYcaI39CbuQ6y7M\r\nFbhcdRwONPGU78bbKjf+LRa6C0G3nUCZXM94sMPMP43iX2hK4sIMUnnSSIWX\r\nisvP8b8fHdtzBYSGoGZMGY8nI4Rn/TpcN/U=\r\n=UCCd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-18.x/balena-jellyfish-client-sdk-13.0.178.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-18.x/balena-jellyfish-client-sdk-13.0.178.tgz","_integrity":"sha512-MWF9b6lonTJuQSyRtv2mkwifpNYyIRu/u11X4Ed7Yehdme/F6isWh2T2o/JFsqZRYO5Ijt6Xd2b7rIsWhhjRtw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-25T03:49:36.438Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.173","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.189","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.178_1669348435963_0.7254587868258431","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.179-build-renovate-lodash-4-x-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.179-build-renovate-lodash-4-x-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.179-build-renovate-lodash-4-x-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c55c4c2ac54a1b34d1eb7b2df5239e9e6702e7e8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.179-build-renovate-lodash-4-x-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-1.tgz","fileCount":32,"integrity":"sha512-0cfOzpqkVc5O3SbdU797/vNaW9/CXV3oFNdImlS9oM4CQDosoBQp7wUL4i7ebPrpthxn3amWeW/Iz3QtCJyScQ==","signatures":[{"sig":"MEYCIQDr9/Z8tc5jGIdYv3aFQjUMlIJViCPTomhtTRDSneMrDgIhALQ4xQSe4k3+UwR5BefAT9MOGsAcsjZMgCiAFrPbkZ9m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgWnlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoi6w//X8T63V8JNNYKbuyLMXZKZRLgwVmnLAxSIu/v951ZmZAXssv/\r\nBtyyEh7MHZmXmR18YFDLUnzQLHBYFAazHtIEHbCjyal9Wzj4uwmAELNcp26q\r\nZh02kN5dF8zxxlPa7ZzYOpw+pQ0kEnKvskTYdSWcpXHcTCrqhA7AtVCfzULL\r\ns3jPPdld6BtF7n0eIMmoA65mqdevT6z1gCUqv3HGdUyGZF3H/3+xXrHmJPqe\r\nk3pVvJlbRFWYLueJXQi2ezW/KpxnqvGabdKYnq6o8UsT1Yt2GfHSo3bI+G46\r\n0Kh78Mc4fxBH8IoGuKRd5NUgk2BfpU84eQKaHPbaFA1esWRBJjZjVT0PTxeL\r\n77SZ6uTbAnQTlUCALzbWDTkGFmq3NIlKIu57MAqsUrZlCOZcHiiC9uda92qw\r\nOCw42F8cc7RHyL3m3AHzubW0G7Vz24VfKSgcqMUSSo2UdXSIiDTyIDSshAj0\r\nCFcw6c+yS2l/ImwzPpeS22T+S4cVhLcxf7PsmxOgDU4mLzk0vd8ErAVSbwd2\r\nGEaPT0jXfLP6C8dMFkMljn617ig0Qh9cJV+dterBP4A/D/4KcX7kZUx2eHvC\r\nEjEIWsfmYfVsqkiFo4OGtowLMgVk1VVxheB1RmMgtxrANV0xKG1z2QXUwzjx\r\nobyWVYP8G7m4J60bqxlANtxK3ekZA7pyQ/k=\r\n=niOs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-18.x/balena-jellyfish-client-sdk-13.0.179.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-18.x/balena-jellyfish-client-sdk-13.0.179.tgz","_integrity":"sha512-0cfOzpqkVc5O3SbdU797/vNaW9/CXV3oFNdImlS9oM4CQDosoBQp7wUL4i7ebPrpthxn3amWeW/Iz3QtCJyScQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T01:18:53.440Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.173","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.179-build-renovate-lodash-4-x-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-1_1669425637201_0.5952544583845232","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.179":{"name":"@balena/jellyfish-client-sdk","version":"13.0.179","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.179","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ffaf4e7abcd6a355e5723e93a1ea70af829017b8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.179.tgz","fileCount":30,"integrity":"sha512-qwZ0t3qIoU9qnt5s2J25gGOVSC+ub1XnBvtrwxmnSUfuPw5YvWwVG+11VYmCW/mFwpoT7ktDayO81/edveJCew==","signatures":[{"sig":"MEUCIChjbb2Fgrc9NytH6ck9fMKwVBGLy9/3DmoEMZXVMvttAiEAqRzdQ1dh19hMSTDKyc2icvKM/PJJDLaX7E75eWPhfr8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgWprACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqIXA/+LjFB/aBZCThRQkIHBu5KQMnUa5ycsLOf4Ej6V4EOQtFxoMNj\r\n4zKGS/szj/MVpEnN2yF8Dpi+N7hVcrutAM+GWoFocJX9iigpGFHMKFOx6Hc+\r\n0F8rqLLoHI+zLSEHJ3f747rGJAMEJyR8/9JJDQg75GI193ITFNe5ISRMZ/88\r\n4XSAp7CMcCWvs1uaVQLQr5t6IJ6CK8tzyQ/4QeQfjd0PcbmLByKpZOG/M6/F\r\nPrDG487MZpDwqUbXVfYgc2YTI6du/p4ihvQunENOMscVuILEcz7GhcKR9P6q\r\n6cADiNozKAGNqEE+I/4D8wYrf4LEY5goBmNlEVJias5UTBwDsHuT/cJd32Z1\r\n0vfRRklHRnjuu6VC4e/t5GbZgVbmDLiQh3MRKQEbmkk75TCzn+57fgUO7Qzq\r\n7c5aR1jjT01Ly7/H0RL9mQxvxBh+7ZB1GoPpHikzv8Th7WPG1cIa608OoCs3\r\nBcMmWlJvefmF3sneGA7R4pcH4ja7HV42/wWJie1VEuIDWBPC/cGHnPcDLABG\r\n3V52bUaYf3qN3T7bvzmnvjHa7aYpp3atPBlaSWobaPuGdSe766KkRLtJCuZ0\r\n6xQdzayC4oxV4y081AFnswmMEBGyvL2z9uAoKzYirDmA51DxtSvK0kljZ72V\r\nZOI4PeQ6wJNBNGnkahN6vEjIosqYCG8loJU=\r\n=PFib\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-18.x/balena-jellyfish-client-sdk-13.0.179.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-18.x/balena-jellyfish-client-sdk-13.0.179.tgz","_integrity":"sha512-qwZ0t3qIoU9qnt5s2J25gGOVSC+ub1XnBvtrwxmnSUfuPw5YvWwVG+11VYmCW/mFwpoT7ktDayO81/edveJCew==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T01:18:53.440Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.173","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.179_1669425771146_0.03401978514913395","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.180-build-renovate-autumndb-22-x-13657ea2b22432d65469cda1912e28ea1baf8a7d-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.180-build-renovate-autumndb-22-x-13657ea2b22432d65469cda1912e28ea1baf8a7d-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.180-build-renovate-autumndb-22-x-13657ea2b22432d65469cda1912e28ea1baf8a7d-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0641ef4b7e476cd39df974c76cf34d28dc97e070","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.180-build-renovate-autumndb-22-x-13657ea2b22432d65469cda1912e28ea1baf8a7d-1.tgz","fileCount":32,"integrity":"sha512-kilSB6e1eoUbsOSblVlWIWuwDIICaihAj8mVH+t0V+NOMi00OjBJGQo98BC0b+eLapp/Y0/IeQr1Rj94WAJDfw==","signatures":[{"sig":"MEUCIFnWaSdDJrbZ/mlgDfaqOLCpc0rPNsYo7KumajjEls6SAiEApSImAErEh1tWlS8ORvPfgiszQUZrU9KwDlP4MIUgbGc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgWswACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvtQ/+NildaZceI0T0bEsF6XCm8Z4R83RfHKf5rCuuHjcQYoiBIXAF\r\n9fye691hsghG18j7AbRepILqFMOPS1EpAnMuNEL1riEyHKVn7e9Nv5P/kYBV\r\nj7IJpDPC05JOSJbDrgobHvEM/xq6oYverVdz035xpcQoS1FjlUeDk2dUHA3o\r\ner9VfaGitJHAD5OEOTrgxex1bbhDaDYbiHpeHlIeub+uih8+B+e+Bwf2Ucoq\r\nWx0PM2nyke3i72kiJpRL4wc8FCVQyjBGjSjoWl3Lyw6E842yU1xngXhaOXKF\r\nUcqXSUoay4DS04gYmVS/dbKwGp9GLjmGW6l8pTbLiEJgHcjMHaAlaE2MaUhx\r\n/xx2m8BDHBTtd0CQehUNTopJcAcdwR0ajOS87mj2Uzl4LVa7qIO9BeU+1yqB\r\nUg97spoztHpHsayOgNtVTh7qir93ahg1gO0fHsw7av8w2uWCo1gk9+mrq74f\r\n1v2nML19wnsvNO6dZOB70dKrQWDJl7EPMzRwNkUqK0YSU+0exPWtKkO3n21/\r\nB8pwjQexsiM/ZZJPkjPjCWIgJJ8mzI0k+HDz/xXUH5RjHDYNlu8HL9e8VwbO\r\n6cV45ZD3lk4cNEm558MZYmHimiYa90ougIWze7kv2E0W90WAmiLCeit9zZR1\r\nEz+2bRIFTrMhM6b9DdOAOVfbxMpNBPgY914=\r\n=OopM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-13657ea2b22432d65469cda1912e28ea1baf8a7d-18.x/balena-jellyfish-client-sdk-13.0.180.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-13657ea2b22432d65469cda1912e28ea1baf8a7d-18.x/balena-jellyfish-client-sdk-13.0.180.tgz","_integrity":"sha512-kilSB6e1eoUbsOSblVlWIWuwDIICaihAj8mVH+t0V+NOMi00OjBJGQo98BC0b+eLapp/Y0/IeQr1Rj94WAJDfw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T01:24:27.329Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.176","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.180-build-renovate-autumndb-22-x-13657ea2b22432d65469cda1912e28ea1baf8a7d-1_1669425968606_0.13099732879033255","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.180":{"name":"@balena/jellyfish-client-sdk","version":"13.0.180","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.180","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"92b022e59aa2b54fca83e64f665d12cf8879a952","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.180.tgz","fileCount":30,"integrity":"sha512-bIDecxo5KXEnvUDG/iBK6iYGnlU8HaeXETGI9JItZiG2hX9ndQwldE1+0Vqse5pMrinp7yfovzVTJEqkBOzVfg==","signatures":[{"sig":"MEQCIBpHGCx1OUvtlUmPa+eRyeP0oJaR4XlHsVId/ji6iFDUAiAcJb2UU2Op1EB1/16CudNr+aZlL4s2VtJw1g474KXJ6Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgWu+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo46g//QmwXAfxe4InD6wEwgJMGohczESLkV6y+Zlcv/UczI68H5AYM\r\nLCipvxk6FUxuSAjsn2NpIq01dNftNMtIoIsyOBbQH8nj/qd1B+2QAgKNn706\r\nMXAPkhDrB7dN3LeeicTAy1D7hX47JBl69WtCX1OxJnnKs6Wwa7+U77DK7K/n\r\nDD/o5pnuwiS9NtlPmO2o38fi1h2JZv1PeIjt30rNJOhd1eoE2lFDG5hGbF+N\r\nMlQvFiBZpe/KtCEkL1AFxsm142luJWos+XMhp7oCfI7SYYmdJ2DLwJRt20Vv\r\n0y0vLw+dsu/9BJJZaGSCGeBKnCaI/1wo2C6K5/agoOHSFi+kNtRose0nbUaa\r\njz3DCUQb4gL8NCtbrOaIi8KXm3lGTni+4zIAzgXWfAzjGGEeg9w2oLPimORJ\r\nEf1BfJaqnSAcU99a4BZ9jQcm3DZLhoCERp1YszXcwc/Qe1GN+Va5SS990ign\r\nh14yukryiEPxB91MNbFEnKkqAe66WyzWdlQmbiJ02nou1UNZgTFasa0xoNcT\r\n+BxvM+X3Au6C1cCmH3XKuJwT88/D7iZpgglQxKsIhQF6u5vH4qyayYc3piM/\r\nvuX4vrPbf2wrgPNUdNlr4GlAFfyhwLYoguObR+jSw77M+Osf9Llahu2b1t3q\r\nH0c5HSkgQRSuAKRvOTSlA/em0xKj5wMtVRI=\r\n=w8en\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-13657ea2b22432d65469cda1912e28ea1baf8a7d-18.x/balena-jellyfish-client-sdk-13.0.180.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-13657ea2b22432d65469cda1912e28ea1baf8a7d-18.x/balena-jellyfish-client-sdk-13.0.180.tgz","_integrity":"sha512-bIDecxo5KXEnvUDG/iBK6iYGnlU8HaeXETGI9JItZiG2hX9ndQwldE1+0Vqse5pMrinp7yfovzVTJEqkBOzVfg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T01:24:27.329Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.176","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.180_1669426110025_0.6905062111115885","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.181-build-renovate-autumndb-22-x-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.181-build-renovate-autumndb-22-x-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.181-build-renovate-autumndb-22-x-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e3c94e9f3d9a0262488fa5e28f746733c9e9e0a3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.181-build-renovate-autumndb-22-x-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-1.tgz","fileCount":32,"integrity":"sha512-aKaF07Zoeue66sKNYJUJp4qJKeZKy1Lsz5NiatRPLO+DFPy/3+LaU+UpK8U9uEv7I4NReaaOxmjecj+Tn81PoQ==","signatures":[{"sig":"MEUCIGtR5HAzBeb9zXgqUzFLDwU8LgMzbDzvKgRI9C4Rpc2DAiEAgl6YVXP2FfGojuIU42Mg1VwsQ7zoqwB/dBZRnuviF9E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgZToACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroEA//aK19O6JK6m7D2TBW9j5y6iLCbTq0/H+20Rc1vdadw0ya1zCY\r\nMqIjowaYU9LKFNPVADJxG+zMzvGQb+6JlQJ8nvRZAPS/ptgzrIZGM5mW7IRC\r\ncBYVeYUsK0qMB/E2bSIXaRz2RjhgJYir7vP3Cadaq7aNxctqDHP9SH60G39E\r\n0NKCvUo/LpaeEbAJ9e1FIs5Xv3eq/GiMKPDgQhIsy3t2hftovO+Ar2tg70Cp\r\nCPWGK/WvWJZAgP4XzKSoTszotSywkcp5ZhNTpYyzmaJL2bWF6eXfb+FYVKCa\r\nWQAq7RF5UnXmbGSpIz24ysBx8uR42dEJRcOKe80y0x9eMaJG2l6iw8v9t0DZ\r\ny9XrQrKJREexgofQ7ZGyZgxXbkEVn/IvTTwcynZ/2S7PZxOlPkw4hawmwFjH\r\nqEhscsyIzQ9U8QomI8d3NkVdlbxU0m4OZpiUQtzQKlB5ULSoTsiXPk55UMU8\r\nq05cJnWF9LmPYSr/nk+9bgvAEmpm9CXNPjQ1IkDRdl+G/sgMHuyovy1zlSd0\r\nqNsg9KVsqX106QlZSPBNsUNyqBB0qtG1oS4Pfir0f5e4zxuEurv+UZNEUFix\r\nk4wtDtYmrwosmF02XK5Zz7qdCibSCxctiaInmJutGnJmy35zoAHGDc7ddWXY\r\n6OI0xLLYdyQOEe+oR5Fyq2WS/9/DV3DsA9A=\r\n=F9r+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-18.x/balena-jellyfish-client-sdk-13.0.181.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-18.x/balena-jellyfish-client-sdk-13.0.181.tgz","_integrity":"sha512-aKaF07Zoeue66sKNYJUJp4qJKeZKy1Lsz5NiatRPLO+DFPy/3+LaU+UpK8U9uEv7I4NReaaOxmjecj+Tn81PoQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T04:22:32.362Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.178","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.181-build-renovate-autumndb-22-x-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-1_1669436648061_0.2837540472490687","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.181":{"name":"@balena/jellyfish-client-sdk","version":"13.0.181","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.181","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"464a11f01f9aec15a6665b7b73ac5bb006d19abb","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.181.tgz","fileCount":30,"integrity":"sha512-h2LV2ZeOkIByTDUypiE4y+YqKqcddLM38pqPwSd+QWQ3wBzU2h3vYElv2NEg7CwupA8FxIGx+gSRnWzAFh9QNQ==","signatures":[{"sig":"MEUCIQCutbL6+F2lCykGnZ6k93gXYlloNS8tw2dX98mGE9c9ggIgB7LZkA5qDQAWW67cU3qcNUhC5A+Y/DPjuxMfy8YrlR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgZV6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwLA//Sqkef7go+/CWshA/xCqIGYtGG1WTiThd6u3iV8UFfOyLAP09\r\n5ZeC1G6VQv6FD1YpaQrsaZzLcVQSHq5nw8KMlJpVwo3M0ceS4HpoyL50VqMr\r\nq0QQb/C9d7YPmCTsfj4XE6zIcPhSI9SY41n+jtdiap+oTcng1IpFtAVJGxIA\r\nRHQeoVjQLfr+VPDFQoDHqcS84jZ+fJkv04FPqHWQu/zDyIpwZKIBuvTyQmbJ\r\nAUmH8NRMv8iVXum+hDtUw2yD7/pJuYftqFZEIUYE31aafr6YruMFalef2DWO\r\nZBqMyaKAY0Vujc4xPvfoE4e+3Fq+7uYovLzI802ufiYuPceOaKQP4E2kwGy+\r\nbVsOQFlzkPgesOZzbaiaT8pG97E8ZyauKAKZNRJn+BcpPjcA5TDlik+AdFPq\r\nAXOg2em2+qYldmHNRHioUXjKcB9saNjLLhFdqftuBfe89+vt7EOhbI05oM3r\r\nPu+NIcH6ujIZmn/0HqqquCZCy5gzGpUm9HjhnPaEQ9MtBe+zW0jLZaeqx37x\r\nm6M2tBVAUO4qx+vOCQyFoS+iEVFhbfVWOT6W5dPeQGZCHaJsh+101v3gmeIz\r\nzW6Qt8ZYcEfcivYPN+c0rT7zTGXzivp1jx3bfj79EXceebLNnpBqIKOSG8BU\r\nxuLy5M+iCuRSE/6YumZtBM8iDWzzr0XAFUs=\r\n=vYFr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-18.x/balena-jellyfish-client-sdk-13.0.181.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-18.x/balena-jellyfish-client-sdk-13.0.181.tgz","_integrity":"sha512-h2LV2ZeOkIByTDUypiE4y+YqKqcddLM38pqPwSd+QWQ3wBzU2h3vYElv2NEg7CwupA8FxIGx+gSRnWzAFh9QNQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T04:22:32.362Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.178","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.3","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.181_1669436794015_0.618533219600528","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.182-build-renovate-lint-staged-13-x-794bde1f25c1e8502d423e6a887f0746583a355d-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.182-build-renovate-lint-staged-13-x-794bde1f25c1e8502d423e6a887f0746583a355d-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.182-build-renovate-lint-staged-13-x-794bde1f25c1e8502d423e6a887f0746583a355d-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"33b75d4b27d9768a188b15b83029ec0c5202c0ac","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.182-build-renovate-lint-staged-13-x-794bde1f25c1e8502d423e6a887f0746583a355d-1.tgz","fileCount":32,"integrity":"sha512-H+RucsSKVFjWH5Qa1QuFmyp7EknmJtqPfpVJjuN3z2yrF49ao44iebfQpIQ5iYzny7rEzcL7Izil5o4yELB7eQ==","signatures":[{"sig":"MEUCIQDT2KVN7E5su+ULhejtrTaAFElr5f8+ZO8Lp7+6vuq0eAIgPeB4eFZc51s8+kqLZhgL1fu8WPsyaZ4xabRAWY3Y0xo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgZY0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr88A/9G7/JyAQgeNVBuyWZPmizPEbxSBYVKSh+2S90adky24PJdS8o\r\nCHVUNykJQzsgzdceKF6W2owb/so9Fz+tuBYgguWpGOrQ/BlegiqH+SFdxYue\r\n9b26rSg67ynhKL4K8DtpDKIg7h3Rl7/ovrVuqZgOkZ/YyT/GS65i8WXJWIIU\r\n5YiLw/xLm4qzyh641/uJpDmuWkkPTlFhZL0KdSucNqjO3w2C/D7sSolfCcx9\r\nRq1F7aC+OGU/B0cbl9XuuZu1b+LENpSFkgS4p3ystpsl+LLzdcYoU50GlyPQ\r\nmD1m/PBa5B21AczTUUdSjc+p97vcBT2kL0UjN7et/ZSnFqqSXtsocaKUpOc1\r\nnobNmyxvyvvZoYaTLTNu/yAb2oVveUb7qfOpWZ5BMdVA9oHZ1kHjVD43OQRr\r\ngpOC5HSt1XKYrScQJdTCVW5DC7/tyMRLMiE/CrDEVtyYzWjMoDxcUzKv9MXL\r\nnHSa8iSGgOzuqhkn7Jg6eD8sWdOgmMv3zvAhpEItVrh4zbC+wtf50G0EjT25\r\nFKKdvxnz8FJyzIJAl3kn9RSKgnou1N+S2aAoUkBlt2vZru96c11nUtEyAI9l\r\nMIGVXexgOX9hUbDxCJkyXHQQpyGiY0o15bVEW3j/SeZokKJi29VYbaS3Bjlq\r\nfNPO9a/C8plsoREkdRJN8kRjOEKNPmg2q7Y=\r\n=FMps\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-794bde1f25c1e8502d423e6a887f0746583a355d-18.x/balena-jellyfish-client-sdk-13.0.182.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-794bde1f25c1e8502d423e6a887f0746583a355d-18.x/balena-jellyfish-client-sdk-13.0.182.tgz","_integrity":"sha512-H+RucsSKVFjWH5Qa1QuFmyp7EknmJtqPfpVJjuN3z2yrF49ao44iebfQpIQ5iYzny7rEzcL7Izil5o4yELB7eQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T04:28:00.642Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.178","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.182-build-renovate-lint-staged-13-x-794bde1f25c1e8502d423e6a887f0746583a355d-1_1669436980399_0.9188917752299388","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.182":{"name":"@balena/jellyfish-client-sdk","version":"13.0.182","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.182","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"df1b93415020a5f55e4d2a3ee8454a510cebc35a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.182.tgz","fileCount":30,"integrity":"sha512-5eSOFm7t1z3gmcGz+TQKYJOLb4qawcjCNVudd90l0Ol8eh+jeZSbY13paGVLIxt/tnOFg88DrbF+Ub3Nm1mI7w==","signatures":[{"sig":"MEUCIQDVPYfaWHroU+PopbwqeZQqURfTeP/4P7QbKeXfo2qdKwIgffSSppWZf+Pz4MpU8tlbKuDio+iO5DPneDDS3mrTgsc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgZbWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/zA//cst296gZGs72W96ndWTKT5qT0K0bgYCQTKZ1ARbuvOu2hgih\r\nI7Q7lNAuEzOGEJitQ6a3Z5AaL5s4mLRil6tQH6YBGZx5a7WybcxNLOMaJBiN\r\nz/TsyYM/gopPFa/u47M/hQ+4VXAY7rODQ1/Rx6tZbwF6BIH21nvqKXYptoVi\r\nkgrH20mvbQ6xM/BVdtYtKMDXTZOEiQhV8s+BYIUQr+tS+pGePeUAjscI5RYK\r\nFIcBKQhMSs9nvCzgx9F/UpKzLZBmZSjKyMPYsLHRIKP9KVaGi0ev25f4rXJl\r\nH1tHN3U3hl6lDNxVaiBQ7oVheFEWY3cP50Z+G4+XHan5NesRXbqXndNS1QkK\r\nC5lJ4z2WODwu+0vsE15jlSO5+y4IqJlP3d6nvJ/VefwQcE2JKuR//iT6tCFl\r\nUrrurmV8GbVOw86z51QXnTV54YzF7Hwq3YeIDm5Kg5VuXWdw5mXV/tWEflkp\r\nT29wuey/jIWUyv0+mNpaJulhaKpQrx4B+8XQqpPaQMqLfehPsZbFIvDwg/yL\r\nLWJtOOER2spwIHhsi+9Tg2Ffokbz2NGBpSnaJvv3y5Uth6VCLY+0BeelR8z3\r\nr9RR/PSghB9j9f8cFXEu+Yl6F9U11feYrOTPgiUB4plnPXBjfbvSDqHdvUmo\r\n1MlpwbTmxPfwSpYDxUyaROA+VIoI/oyoxtc=\r\n=jkrz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-794bde1f25c1e8502d423e6a887f0746583a355d-18.x/balena-jellyfish-client-sdk-13.0.182.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-794bde1f25c1e8502d423e6a887f0746583a355d-18.x/balena-jellyfish-client-sdk-13.0.182.tgz","_integrity":"sha512-5eSOFm7t1z3gmcGz+TQKYJOLb4qawcjCNVudd90l0Ol8eh+jeZSbY13paGVLIxt/tnOFg88DrbF+Ub3Nm1mI7w==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T04:28:00.642Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.178","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.182_1669437142598_0.893046368660011","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.183-build-renovate-autumndb-22-x-565136fdfa0be028811219d83c7cda2cb76d99e6-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.183-build-renovate-autumndb-22-x-565136fdfa0be028811219d83c7cda2cb76d99e6-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.183-build-renovate-autumndb-22-x-565136fdfa0be028811219d83c7cda2cb76d99e6-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f2b00cdbf3441c5c01fd8764349226d1de4f099b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.183-build-renovate-autumndb-22-x-565136fdfa0be028811219d83c7cda2cb76d99e6-1.tgz","fileCount":32,"integrity":"sha512-s0Y1C2QiTgTmapKuN0s6ed6w8mpgTky3D+6kExxiZciHaAqMBv4y/yXVmoyWobjvHZ9Wsbbsm5rQAD8zKDnJsg==","signatures":[{"sig":"MEUCIAjuNkNXrRiY7OweGd6VLhbGyEVn23tKZbj+5zoXSEkoAiEAqBznnibG2MQWvJN5k4qwnbrSF1W5+8Sfdi/jOYyYdwk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgcEDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBvA//WQ89sitCnrQvIsiEnJUZjIVBLvtxuqb4oSYYkBD8wOctzWF7\r\njHHeivq6siW/t/BMcfU+aLe0aN+fGDu4/aD75HAKeJ7e2V5oDubGl3qm4PCH\r\noVBQ3mUAp7f5JJQD59dbACb8JJIzlaxXGi7dfEnaXrEaiNnM2agNr+2IAfc3\r\n5SeOcDI92ucuaP0U+OFF/EdezSX0r2TK6Mdblh7570JgrwOMu0nVevNILpZp\r\ny8kVq4xoiRxaNbUN4UZZpJ5RCIK8IFu6yrb8/kYp51XfnUCa8s12XLBaspes\r\n9+piR3VvMlBWbIxkr9KOHiI8eFggLGl6a/slkmzAyzX8x/h/smJ1DdIhqav3\r\nvfkTz8HHc7U/7Vd9mHIJJCSzNxhhlZlue963YA41Nw/5YD3SOQYyhZeJhY5/\r\nkFPpN+/YplLnjshGrbRS3xlz2vta0SPE1c2HqDkqXq/cRGcVDp8Dvz+ANWia\r\nM6cYChq4ov4LonTTeGOZyihOyKzypLBd+0swnpaSF018RTj8ya4U4bX0p/gu\r\nhJP/0xKO2mZN7dk7c4jRvb6EClfK/RqvJkBRBQnb6VEV4tlTQAqQiHzhT/Wy\r\nH8a7VYrsDFLqmOnTkrDyWHCDTZebWcs8EhnqIBkFgJqNj2ixyqCgN0EQc3Yq\r\ntHN7+x8xulO8vNdd4SzniWaT0PWjtP+VXj4=\r\n=Jr5w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-565136fdfa0be028811219d83c7cda2cb76d99e6-18.x/balena-jellyfish-client-sdk-13.0.183.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-565136fdfa0be028811219d83c7cda2cb76d99e6-18.x/balena-jellyfish-client-sdk-13.0.183.tgz","_integrity":"sha512-s0Y1C2QiTgTmapKuN0s6ed6w8mpgTky3D+6kExxiZciHaAqMBv4y/yXVmoyWobjvHZ9Wsbbsm5rQAD8zKDnJsg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T07:30:42.484Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.180","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.183-build-renovate-autumndb-22-x-565136fdfa0be028811219d83c7cda2cb76d99e6-1_1669447939193_0.005260452050626974","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.183":{"name":"@balena/jellyfish-client-sdk","version":"13.0.183","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.183","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0352c9beb75394e7c3e6a863fd4feaebebdcad08","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.183.tgz","fileCount":30,"integrity":"sha512-BEDk/Q3TIJq1LVbieo+5gad7f0+ypKtnFpSCmk4+jXHdY71uCohHmxOGPIVdMorC3a+iaTdHwzk/Q1lfEwpvnA==","signatures":[{"sig":"MEQCIHa50ZiZYo0LW5JMqQUp+UHfTPbTX+ZJtfnw8wP1yZ9uAiARpkHq0mjGnFvFEe6fLQeUEbPinjK9p1m70b5zfeXzhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgcGPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoh9A/9FhNkAPtbJuLPsjMNRm5a04fqlb8J2D2uD0pIAy8wR7d0J05t\r\nbFCpHY3wgdeaULmrgTJKjdbFIG4oi0DVL6vIl47sS/iAOmtptjLkGOIcd9d8\r\n7YfOB4wohu+vHHy8QB2qiU2F+P+b3X/3HCZw3L7fBBFK9lgB96QskxMxzTIC\r\nF2miQAaRCkQx2rQ3BU8fzzue9FHChwaJCHCBdAB4m/AGUR9Zve7Xqfso2cQi\r\nuyjT7hlbrTz2WMi2KfsmVEOCw3hlD8oMWQOgencNh7s61afKuLfh7WB4CESx\r\nLKb2taqO5aTaEcgbzbfADr46CvJmM+nWHKSMOxlS/GJkQrP/nnrRH8Dnbqp3\r\nIRuYJl1k4Kx2dKUk5Thm2QclMw0lMWrPcYw77xe9cJipk8w3zHaV1x1aeI4Z\r\n0m24p9skqOEFRXvgYa2R33vwQSrVf5qRhd60xKN1s9Z6FI4hGavFiOAQTkyA\r\nXLI+bmL3xrA6TJwX6DNGSP3DF4eAtTLPo3oMcJn/BrprdrVk5CZa8w7koBUT\r\nhuGs4Fcso/UYuarhGW2YLr1d27TrJDcXbNtuh1J0vrB+H8Df2xH/681uyvVW\r\noYloWnG6e15thwyIC35ffnbfSqQ+WXgM5w4nIydA+JIOLSNrzPyc7Y5il4Cy\r\nApiUguJu9/E8H5bqxDOEMC/+5uxX2akA264=\r\n=ra4V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-565136fdfa0be028811219d83c7cda2cb76d99e6-18.x/balena-jellyfish-client-sdk-13.0.183.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-565136fdfa0be028811219d83c7cda2cb76d99e6-18.x/balena-jellyfish-client-sdk-13.0.183.tgz","_integrity":"sha512-BEDk/Q3TIJq1LVbieo+5gad7f0+ypKtnFpSCmk4+jXHdY71uCohHmxOGPIVdMorC3a+iaTdHwzk/Q1lfEwpvnA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T07:30:42.484Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.180","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.183_1669448078869_0.286565467408046","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.184-build-renovate-socket-io-packages-127c18942b2cde417cf1c28fd9f2433afe14f5ae-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.184-build-renovate-socket-io-packages-127c18942b2cde417cf1c28fd9f2433afe14f5ae-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.184-build-renovate-socket-io-packages-127c18942b2cde417cf1c28fd9f2433afe14f5ae-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"45b057e30ae73277ad73bebd93ed527639de9246","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.184-build-renovate-socket-io-packages-127c18942b2cde417cf1c28fd9f2433afe14f5ae-1.tgz","fileCount":32,"integrity":"sha512-XwQG7MdCZG7zB8KdFTixs5Vlck7B9pSf6PibqCiXDIOXBYyK/f9Z5DeBs/JWodlr3HRzulbMSCzExn4vsxFsxw==","signatures":[{"sig":"MEUCIAcw8SvvwOArSNiqDEnBjr0in+nSGKcrVzhS7+qyulUDAiEA7jCYtaOT5VG2J113GPy358gGW45l9lfJVA9Tax3LGkI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgcJhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoDcQ/+N/FVUpCxByMejuhiyuJNrfx3B2UyHB2rEh1jVHvExAF9vXNO\r\nxdzNVY/72sy292kWQcB3XmAdctILT45J+3GTkdwLg72eFZqmEMnLcF2BWYkg\r\nwHcup5APk9f8fI+pXaBMSQ9W25f5/2y50xD6RQ/IrK9ieQyowHH759qS6nQa\r\nOxuIBe8BSneO3z2iwkC9zRDB2iTP6gtk/+NxzQe4c4R/pcWI/KJqLdl0j8X/\r\niqSW091LenVYQoUhTCU7OVL9tBlzyBqy8xjo/E97ShxmvWWs+K7CHy+qIklR\r\n9Qb4v8RYxAJ9Dq0w7G4b1DpVKqpBnCW21lKFCZXqSXsULsboXzOD2lyPfBdK\r\nCkR3e+UstwKRmt9RTt8eJ0yUhshQREdzrmWohSoXwWZ8/6aeNGJlpd9EBWRf\r\nylteFHlAGBGZchb9I5G025L54j25Gm2glbUFVllL8pkhtYFD8pVAAk7gUi5v\r\nxHOwY5dH3388I/kvPNORxDnqjyca/qvxyOICxVGaw17hCs4UHae+vEYt202d\r\nmnRH1xwG1QME5YugCikQmCiwNweTqv1hY/MgFBNiJGPT0DJb4zcIWG6ODB9z\r\nUHV9bZqrA+47f0+d/MIrJeaIC2AGcc83N8y3BnNcxP8h2qz4UzTBuYcZ+wMH\r\nHS7pyLuut6wrXFiD4EzEhgPE/4erfWsm9QU=\r\n=CcAx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-127c18942b2cde417cf1c28fd9f2433afe14f5ae-18.x/balena-jellyfish-client-sdk-13.0.184.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-127c18942b2cde417cf1c28fd9f2433afe14f5ae-18.x/balena-jellyfish-client-sdk-13.0.184.tgz","_integrity":"sha512-XwQG7MdCZG7zB8KdFTixs5Vlck7B9pSf6PibqCiXDIOXBYyK/f9Z5DeBs/JWodlr3HRzulbMSCzExn4vsxFsxw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T07:36:25.913Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.180","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.184-build-renovate-socket-io-packages-127c18942b2cde417cf1c28fd9f2433afe14f5ae-1_1669448288830_0.5735300559928755","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.184":{"name":"@balena/jellyfish-client-sdk","version":"13.0.184","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.184","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6c7acd42f4591afac17fe940319b992f404b5c2a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.184.tgz","fileCount":30,"integrity":"sha512-nUSViFb1+JuMYOPqPd6C0LisS18zo+osc9kFWxrRMm5tFgb0HZ6OtYplzS4d6SEMasFmp1GVIPV+y61a5Y88RQ==","signatures":[{"sig":"MEYCIQCvPtQAgfzaVBPJ9Gq8Q+rxMQyTBOCMhDXcLxPM4iW4lQIhANgIpXjmvPFKmX04b/T9FUF6+4pP8cgvi+mNv0CEyeGG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgcMMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFSA//YIO+K5Ks37ao8zlHe2btUOlcIqmlJ55PrLYG68ZnQ00IhuMV\r\ncaXZUDNMjbnNlNxxprlwYUHbSMgUP/xggKV7pXlOkqTpYx7dEeNUQSl/W3YG\r\n3D04sQRVLTXTzaRdyT8v7p6DnmLzfV0q9McNkQ/YMajUixW/2/1acrQkunfI\r\nOgSM8xsYJFXU6vyDRPFsSmegPiZ6lT7HaYqgqkKNNmjSrWNqiv4FNHqx686X\r\nOjL43GWugT5o+lYexbxtwr13QxcD5J/njJqa0hcffBjb3b9CTqwGEU/LpOuq\r\nX1Gr26xJ7sMU9KyRDapWr5u2UlECkO0zHdI+kHLOeHeeLU/TFdp54U4TqGsD\r\n0hbZpU2TRUuFaRr7pLsak65P10UzFzsLn0DRXKWHA+H/k/1EDozx6uON3brZ\r\no27z19UIIdoB5eqiJOpY4y5XdLPbcicARrrJtOWkH3Kyk3hqXiGd8dgSTcjN\r\na7A7ji5JXAD5/2667GHnKy7Dah5abQeKs+0EHCu1Ei6FNyyKuJZPNuQ9i6Tk\r\nvbqMpPQtIUD2v3Ic7pxTbrMm84KAaNu8LqqxTr0+7i2+eOI91rUXB1QnmQSH\r\nxuWnnjjzMq4AhIWzy7RAF/BSP2AqFaQHDzJpoTFv+XsOsOaq1bFDBxgqkpJ+\r\nVUCOCCdr0AJtBLuT4Ll6KcBJHBm2sx/13Mc=\r\n=YBSd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-127c18942b2cde417cf1c28fd9f2433afe14f5ae-18.x/balena-jellyfish-client-sdk-13.0.184.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-127c18942b2cde417cf1c28fd9f2433afe14f5ae-18.x/balena-jellyfish-client-sdk-13.0.184.tgz","_integrity":"sha512-nUSViFb1+JuMYOPqPd6C0LisS18zo+osc9kFWxrRMm5tFgb0HZ6OtYplzS4d6SEMasFmp1GVIPV+y61a5Y88RQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T07:36:25.913Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.180","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.184_1669448459792_0.06767458600933551","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.185-build-renovate-autumndb-22-x-4c3f84507e7c444349a880debf3cf67fb622de18-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.185-build-renovate-autumndb-22-x-4c3f84507e7c444349a880debf3cf67fb622de18-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.185-build-renovate-autumndb-22-x-4c3f84507e7c444349a880debf3cf67fb622de18-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"61dac13ddb437d241599100612258f6ab6693f80","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.185-build-renovate-autumndb-22-x-4c3f84507e7c444349a880debf3cf67fb622de18-1.tgz","fileCount":32,"integrity":"sha512-g8nXhZO50UFmWre6n/5gyQY2ulBQOaN4B1GhhmHvrBvPY3xW2BzaP5Pg3+38bFwaRI8tY5TuSlEM2yIuZFBC2Q==","signatures":[{"sig":"MEQCIBPlGyeRd22Z6E1ywF14FsIf8osP1cAHBeulohHo4zE8AiAg9JWjUcwL43CqQUhxadFcME9IyQv/BcuPlRBTQzwiUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgesbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9ohAAgPAvK5D3TT9K/nSEHiYTavje9r9RPKqWP5cmhDl59Un0cIxb\r\nqiZzRugYM3GQh0xI8hljJR5LFWIkdXtcAWpVjHTWP2LUs4loE236yPZPyxsa\r\nZgkHWJZrrMR8tDJpe2rYFOPnRDdH7YUE5AKwwYg2lLQXmckDgknA5hyFlNZo\r\nHXS3PcXBSGneNWvEQxSFxx1omLdSoL1IXeULo1VYqvE/etiacGCVOKQbCKen\r\nx5lstONeJo17kdNJ95NP0+yJPmtEXv+2ILF9UqwcCHorQRA9NZsmN3MnNNyN\r\n26UsJBv88BrZ83JDG1MAzcofLKXjENzb37krwm1wP/C5CjUM6O5rWbSGioHd\r\nzCZjm550asHD4NwF9HIlaZIdElYIN+wrzshTzAaeS1fdCqugLqFanYIGqx44\r\n1GcrUXJhSAxori9abAjmwFlJd/UR56oOaAAQRz4iwobOLFMMY7gqD13eQgD1\r\neGTASEVw8qPZKUH3ppufLxPUFGffQxyX5kRdEMocwaRzcMjKaRicsVuejPNm\r\n4I7cLDxA3A6SLjN4N0Z9Bs4BH8KWVlQDCFchAixAXcP5nBMY1Y6ZhguirDlp\r\nn34T0sV7NEWId/3KAtgw6s5H2IvSMM0QHdujUmsPHE0HISr0mhLEC8pqQLFC\r\nSVMLWx/KxApERnknrBWc744SJSo+zPWExC8=\r\n=wcnE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-4c3f84507e7c444349a880debf3cf67fb622de18-18.x/balena-jellyfish-client-sdk-13.0.185.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-4c3f84507e7c444349a880debf3cf67fb622de18-18.x/balena-jellyfish-client-sdk-13.0.185.tgz","_integrity":"sha512-g8nXhZO50UFmWre6n/5gyQY2ulBQOaN4B1GhhmHvrBvPY3xW2BzaP5Pg3+38bFwaRI8tY5TuSlEM2yIuZFBC2Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T10:30:20.386Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.182","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.185-build-renovate-autumndb-22-x-4c3f84507e7c444349a880debf3cf67fb622de18-1_1669458715242_0.6570920619162688","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.185":{"name":"@balena/jellyfish-client-sdk","version":"13.0.185","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.185","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a918e0329cb273ebb0844d23ea389462e9edd560","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.185.tgz","fileCount":30,"integrity":"sha512-OFONnF4Jg5M2fHkanQ8uXMMLJt8F1d0XrN0hPzz5kWDmymgfNPnOzlNXbLSgTwZ3ZCUcOLaZrCpSsdayLB9X3A==","signatures":[{"sig":"MEUCIQDUaWk+E5HWX7EFySMweR5Sz3UP3jVlMPj/yLIjHU4/hAIgA9+j6bhbNZB/V7SEc2QEtW03vbQc92GEIAIU1Hta29o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgeuuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnZg//Tkd7dN3hvdz4GQrJgmPV0B4z8ohooYLf5gVTVFxfIvblXjV6\r\nRuYggM7RTZlSYR4iLsE56RnTgipME9EX2+iVgJ28B7rCT+iH5LX3Y9+z5QwU\r\n/ktH22YD8/BYR525ecay7c+SxnP5lfqgISFpdZLD0V7l9RxLuPPkdTM5JOJm\r\neDyLFuAj8g2QkRu9qALvxBAw+/yzfyh59lHdFHkWA6c8eiLvTLdbtLj0hLXp\r\nmZ5Ljks1Z6E4JQYamiS14asRELxQWacn40WrHUtD0Bm/OGVTT6bck9YC0Xob\r\nKuqcIXOkAZ1vcSf4VSIBmT7YpqgvHKH3u/S1+jiCrzjMydP0YuswV1RYytrt\r\ne9ByhUlaRdFG2QvnP9kMi1APddqeoBr4xesDkcKrsFYTvSASQRWD1pHKtNL3\r\nxk8r/gAoPOVs3Tok+icOybQzzFHgLJGuA53pbh0fSVBv6V6eUVNfOsrCSrGI\r\nVaLPvCSgwZAAoQWWt8Z8hwgz+sC9TtBV1yB1z+/ErEJc/9qrwVbmWWhF17kk\r\nEAl9xraajagpUlwm0grXSBayAK5lkn5Ks+kEHcy/u2qE/mPZGdTlzib1jpOS\r\nhtZ1mZGQQg+DS24upFUMZB09L8GVfjntFUjZWG+Ud6Lok+Ys94R4iss1eXjA\r\n8bBunhkYK5rmOsFLqWi+N8Ics1TOHkgjloE=\r\n=HbPC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-4c3f84507e7c444349a880debf3cf67fb622de18-18.x/balena-jellyfish-client-sdk-13.0.185.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-4c3f84507e7c444349a880debf3cf67fb622de18-18.x/balena-jellyfish-client-sdk-13.0.185.tgz","_integrity":"sha512-OFONnF4Jg5M2fHkanQ8uXMMLJt8F1d0XrN0hPzz5kWDmymgfNPnOzlNXbLSgTwZ3ZCUcOLaZrCpSsdayLB9X3A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T10:30:20.386Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.182","prettier":"^2.7.1","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.185_1669458862351_0.7398639387398422","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.186-build-renovate-prettier-2-x-6dfd75a7a485630758d827d8ced40ce537ba90eb-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.186-build-renovate-prettier-2-x-6dfd75a7a485630758d827d8ced40ce537ba90eb-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.186-build-renovate-prettier-2-x-6dfd75a7a485630758d827d8ced40ce537ba90eb-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e48f74b6d560063f4eda206ad2a512047e3bf731","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.186-build-renovate-prettier-2-x-6dfd75a7a485630758d827d8ced40ce537ba90eb-1.tgz","fileCount":32,"integrity":"sha512-ogRt77dcLuyfO00f01kPaS2Hdt1g+XfB8N0vBjOFyeJ1ZKW/kqWyxkvkq54nzur9/TeQrKKSGr11O0x8tKJpCg==","signatures":[{"sig":"MEYCIQDsNTOpsNvfYnRub50U4WW8swIFe5zWWifzDMkS3Z6eYgIhAJGRopEiK/nepbzDgCGiG9T6JXCn2go+R4L3ZrVo26zg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160156,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgexjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAQw/9FIx9Y7//Pu4wGUOZcu9ZZm3gXEK9Igo79XKo9x1tBYiJFcsX\r\nT2xehvO6oomxUgQ/qcR4PAIXBetFtjovvQ2loX6iawW2f06GcI0mUMmbncTg\r\nvwPqz80vrp8KbZbLGtFAvSDl6U5d5KPsVUqN/vLA1KHhmu0bDgndQBIoQ8/Y\r\n6FJyCqXrouwdiHZWraYnbCqQYrS78n0OPkJJNtpE+/HriYf0ZtjydfgfzD8M\r\n+m/U0Bp9b4oFiy2ekZGz0YXglt05XSbn+SJKAEJU3UiE+Daq+57Wb9pDAXTb\r\n1e6TShOlZdgIXkecnXzACqkEVe4MUGmYv1nYJzgui7uzfkYl/tFm6ZyLrLIF\r\n9AqxnjeOgoyf1onYa7VYWIi95ad1i1ca7R17idg1Wc6wpfjFrjuMWjesP7lK\r\nKqFQ6sEvu2Ww9xl5f8XHQIZiXv+m2RUtN+FIYHggJ+0vAPV+pXvsD0XXolW7\r\niL7kmveSjsUkyJNH7uvYUrodug+AQUkegAmCYQpmC25lrwVai1I6ovDk4ixk\r\nKRAA4MhtZFbUZMn3F+wvE7O9MEQ0T2gPXz7sjM1BbNHf4MrjjeIGYx1qs5/A\r\nmDprJi4uAAAw+63Zb1Q591hM2L3Gpq8JkFXl8Jaqa3HfjfGvFFv/hz9SMqYg\r\nh7j/M8eUroF8sdYXZ43uvMqvB5gxB9/cMi0=\r\n=u0OJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-6dfd75a7a485630758d827d8ced40ce537ba90eb-18.x/balena-jellyfish-client-sdk-13.0.186.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-6dfd75a7a485630758d827d8ced40ce537ba90eb-18.x/balena-jellyfish-client-sdk-13.0.186.tgz","_integrity":"sha512-ogRt77dcLuyfO00f01kPaS2Hdt1g+XfB8N0vBjOFyeJ1ZKW/kqWyxkvkq54nzur9/TeQrKKSGr11O0x8tKJpCg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T10:35:53.484Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.182","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.186-build-renovate-prettier-2-x-6dfd75a7a485630758d827d8ced40ce537ba90eb-1_1669459043154_0.3412989888929736","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.186":{"name":"@balena/jellyfish-client-sdk","version":"13.0.186","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.186","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0d663a5ca88b3c5514c45abf9300a9831ea32fbf","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.186.tgz","fileCount":30,"integrity":"sha512-Tjd0/5GoN/9KWU6JZ0gzMtP7hTL618108Ueo4l2gbrDIEMiM4VDt+qvGAl98OWvsT0fy8qS/LHxhXEuWmFzqlA==","signatures":[{"sig":"MEQCIARBvxfgcXRdvfknfoHV4zC6w59HI6bgZIuF14LQ51QUAiBpJIQxgnKEdsR4YZlFSf/XKmUKUaO7psCSnZHm0IVnKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgezmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWChAAjNmxanxAhB3Bu1H7vJufR3M9ubUHGWZ6ZwUAzm3MOnI4o51+\r\n7lSesdegf00UQ2sN19YvBzW+IbvGKoYg6Ij9TiOW7i2z2CV4MrDUYsyd1QDS\r\nceAEDz26fMW8TJcdpm3MD59LJcWTsrUhl1JRz2AaO85GsWep1VbG+ljg8Exs\r\nydTxtAwkAeVSkGwnfULKjewKyMrPC2JJjWCDZcw/x+096LnUMYMOagwwDSPL\r\nIRHRJ78+dIKnJJF/+K7zK7L67R9dD/EzVoEPCJvVkEnPiMmTG1tChNyVC0jf\r\nttNx/YyGMcAMKJt+QP/s60mdxtJ0wBhbcrtG5RP2OYPsYJAxMy84XvyHtn6X\r\n+gGURfjldWgfLqcZ9wf6AyHvlTPdEc3Qwp7+x5KNGbnww2xrFrXdZxfj9mFj\r\nHIc0TcY0Ei9NMJ/Ih6LKW3nReNthv9gVDDCHXb5/dMEpWjNjg1vC3rXoAC+8\r\nnG/AuIpYhP7Jev+90LDldBxALDNLDvTj66/p7FD1PeRLVoK69NCahAZOAF4V\r\n6dkhotonIwHFb3XOO1fElzso/I2sRA4XzPmwa8HHxw8L/Q2IdiwsYJLZvH67\r\nAG+AzeG1IQ4VmBTGITKpngvzhigrrJMj6F7cYHIwT8u8OyEgBDwL1CEv2LIs\r\nHbk/EVYRoaVGEX7gNHNXHMRY9zG5A3mr/yQ=\r\n=3Eci\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-6dfd75a7a485630758d827d8ced40ce537ba90eb-18.x/balena-jellyfish-client-sdk-13.0.186.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-6dfd75a7a485630758d827d8ced40ce537ba90eb-18.x/balena-jellyfish-client-sdk-13.0.186.tgz","_integrity":"sha512-Tjd0/5GoN/9KWU6JZ0gzMtP7hTL618108Ueo4l2gbrDIEMiM4VDt+qvGAl98OWvsT0fy8qS/LHxhXEuWmFzqlA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T10:35:53.484Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.182","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.186_1669459173854_0.26446912945550416","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.187-build-renovate-autumndb-22-x-d986638be9ced465fd41bada2af5d7523efb61bc-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.187-build-renovate-autumndb-22-x-d986638be9ced465fd41bada2af5d7523efb61bc-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.187-build-renovate-autumndb-22-x-d986638be9ced465fd41bada2af5d7523efb61bc-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c014f28f1aef7fa5ea5e116e359f08954a2b01e4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.187-build-renovate-autumndb-22-x-d986638be9ced465fd41bada2af5d7523efb61bc-1.tgz","fileCount":32,"integrity":"sha512-QaTWVG02FlLwmDftEXEWTcTqx30YuJ8SFzcRrZ3gYQeKrn+bopCCtO+fe3vDkp0Gjh3WUI3N/Gi/v6ejo9OYcA==","signatures":[{"sig":"MEUCIHsz6ZBrc8ZjmImlwFYCygsHQTl1x6YZlwVQz9m3VR7vAiEA7v1fuHxgbqkrXz75fBBELnzet6bgGjNr43BSqr3oqyw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgg9dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmql+g/+Mz6R+pJmCeo3xTzm3dFfXcETKbnT9CV0beADpZs9MEWlxAxM\r\nxqZxaYSvcaKCJM1p5n+4NZVb4Nvz1ByZWLTBuTRh734Yv5dDUpRMkfUDRBs4\r\nqCrsyK6l1SEMgNAoy9eTfkanVOSbHFggcIA+gBeu595FDQ+ipUGHvoFKCnJ+\r\nnA3J3eVgju7neu7oCcke0i7tD7mPFEyufUxKLQx6z75zoqUJN0VJUQOfxvd0\r\nBA79rbzkmIqBdl03CfJoRn8HZWNtM4vVFpIg2smVpxgqm0WZp+gPOEm70mnW\r\nR/5xNsNnsxzvUN+BXZhe0Lk1TIz9Y8zjdCtmlD5AjPiMwV4Tu52MsjbkzDkj\r\nl4M3R3eBKJHWGghfHOk2qNbjzpvr6IpLe1ZxnoBuG7Yl9C9GkLl/omXUb1CJ\r\nqilWuQ4AQEtzJkkIZ9prV8wHQrokF97rnQm8Yf0w0zAX0AgmlkVGz3AucNKn\r\noQQf8MnppoqtPb39w9sROvnA5VhHmI+wezkG9PFIxdkWQb44T74S/vHUbYVv\r\ngEMlk5oMb4NnCG9ux5z+WOzKsAm3o+HUD47yiq4ScdI5A/YQa8j21XJx1fb8\r\n4s+ETpA65KHvYfShyMFGtN3wKrn3wuQ8OoMM18f8+9S0kspVFBUCm+E4Mr7r\r\n5sfVDJwhyskhEfslQc5AgAqQ/kGHFfiG4tg=\r\n=vEa/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-d986638be9ced465fd41bada2af5d7523efb61bc-18.x/balena-jellyfish-client-sdk-13.0.187.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-d986638be9ced465fd41bada2af5d7523efb61bc-18.x/balena-jellyfish-client-sdk-13.0.187.tgz","_integrity":"sha512-QaTWVG02FlLwmDftEXEWTcTqx30YuJ8SFzcRrZ3gYQeKrn+bopCCtO+fe3vDkp0Gjh3WUI3N/Gi/v6ejo9OYcA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T13:04:53.434Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.184","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.187-build-renovate-autumndb-22-x-d986638be9ced465fd41bada2af5d7523efb61bc-1_1669467997633_0.9268980218992051","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.187":{"name":"@balena/jellyfish-client-sdk","version":"13.0.187","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.187","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"9fa2bfc03a01cf7569efbbef61d62f7fa5f04728","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.187.tgz","fileCount":30,"integrity":"sha512-f9im8D91nNnE87p+01xOmagrWO3HJeh5tbOwNy9BR6Q4atcWtgpwiYn1eFtRZnSV7dpV4gB44LX5l63DtST1TA==","signatures":[{"sig":"MEYCIQCDHWT6XaveisuFx1Taa8e5YZmB3IW/adX+AiuBFSddtwIhAKud0GBDoFyc+k65kCZlL/lPyUYoSzZCcpSEXMzQ+R6o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgg/yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovRQ//a54XbSFWb/syUgc/cQoatxNsUx/7GbyF/mqY3gQOSb19GuZf\r\nUFd6B8Pmdp7W83NjADbQtxpQzPUvou0rO5nAcmQVtzccTHX5I7BpMH2xc438\r\n5zEDLj9/PMy7A0YIINepVighhlbk5so4SZh7WeUZnKCoTqtRBoKuLVfLC5n2\r\nXgGvGjf+j8H1ifmI8axRlDFn6Z7OuQUnCXQ7vMGxcLVTjd/bU0XB7KDy7GrB\r\neEL/3S05OwTHLE4y/M/0QBg3O4RsyM81IwEbvMwCNtIuQD4LvHfLC9ulG//x\r\nRN8CTw8K6giu4H7HDmfOGZytjfihuTC0tO5Ky19Wm7gxxoTzuPXZj9nOXJR0\r\nHEweR06iRONrA2kkvXdvFR9Ageqzxp8rsnZivhDVl0fjmUUb/tDp7QUoedax\r\ngK+m+0OgvLthgCITY5eYWXLNOPWqgyTxBMitWJKILTsbuycl3Blw9XVZCKv2\r\nXgumI+72Hch9bXrIjXM1Rl7tdnFELVGFm9q+vT76vJ/d2goZaQr7cPAK3Cua\r\nGS7G0wKsmKXMllz4yTIdEuFH5iGtoCy6tBrL9nzilzLGwjj+nIC0LPXtUVQY\r\ngKeN5YPYDokJbP/zDBMn8GCF0ln2XkCsWdu/YUzKu40ZdcTdZc8OW7Wvf7io\r\nm4JJCVKkQsL/pzEwwYbh03emTQjP71ysZXU=\r\n=bK3o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-d986638be9ced465fd41bada2af5d7523efb61bc-18.x/balena-jellyfish-client-sdk-13.0.187.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-d986638be9ced465fd41bada2af5d7523efb61bc-18.x/balena-jellyfish-client-sdk-13.0.187.tgz","_integrity":"sha512-f9im8D91nNnE87p+01xOmagrWO3HJeh5tbOwNy9BR6Q4atcWtgpwiYn1eFtRZnSV7dpV4gB44LX5l63DtST1TA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T13:04:53.434Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.184","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.187_1669468146424_0.8470020357278354","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.188-build-renovate-autumndb-22-x-1761a229c7c07a67fb9248cf1a425bfacf6644c2-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.188-build-renovate-autumndb-22-x-1761a229c7c07a67fb9248cf1a425bfacf6644c2-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.188-build-renovate-autumndb-22-x-1761a229c7c07a67fb9248cf1a425bfacf6644c2-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d889acd984f16cfb3e999ca917b1a13278ba3730","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.188-build-renovate-autumndb-22-x-1761a229c7c07a67fb9248cf1a425bfacf6644c2-1.tgz","fileCount":32,"integrity":"sha512-4jTHsFDtBXFLZijR9wVq/HWma0dfXMtGl0bMXY/3hYF38/WZIVYd+nsVD+47vGYkj42mKMUT2hb+eFOJu9dabQ==","signatures":[{"sig":"MEYCIQCf5wwssDBecgqTrLSK9hO7WwlbBhHpYMuxKXnev1w8lQIhAPYEmr02oPvmkUAI0bzYUvIvUjvTZxS+cPIOJSOA9aHe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgi+ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaOQ//VJvO6QXHcpk+tnywcJMmKIJ1ybtYeU8HDr5nRaARwgYHxERT\r\nr7CQnoEcUnqh4ue0OQMwxDcXil6eigq78Nwa2mxNhHRPIYJsobBQTJKcvsSb\r\nQyZ00KMR0+Doo/0865o8GlYxpyyOF9n8Fo1xFkKQPJcUlxYaep/rcQusNmsv\r\nJN7a1h6seHI7Bu5lb8jFMVxZztv9tryMvdKTmc5xByoMoHQOozrhNtttoybj\r\nUqVoC77N/P9YfshtGhbnvZzKu74erzwHz5wVBVYtWdT4C9YG9lpHxLcyEYmC\r\nGYSLwUbVK3VXI03UHSxdyRRCjle1jexUb8HXTpFySo8SvwV8b3sU310sVbJs\r\nkCb5C97qHK51cMmFWOWNei8EEeyCRV1oA966AUKhcX9Uj/o3Rpf5xttA5NHb\r\nPFsQnaVNDGEFDxH4OSMrryCVqoavRcgh2957ThM5gZXSbDBrsCKQPG1Qn0bu\r\nH4eDg3eObUxwKhD7H1ScVkg6HS8GLFLR1rzvI3U1FxoaI6bxdwfhdUuvfWyd\r\nMw4p4at+XE6300YfX6ciXj1eYuq14k8E2unqc1vtMdFr+Id57kPQAZJinaUE\r\nsvDlob12oXfw/76Je4MYN16vXQXpPCqm40mtLMMtth0oTMswAZn9/bHyhdeA\r\nYYXAG0Gbzo4vrqh0IwsXMQMqNh9+1bu/Xpk=\r\n=ha/q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-1761a229c7c07a67fb9248cf1a425bfacf6644c2-18.x/balena-jellyfish-client-sdk-13.0.188.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-1761a229c7c07a67fb9248cf1a425bfacf6644c2-18.x/balena-jellyfish-client-sdk-13.0.188.tgz","_integrity":"sha512-4jTHsFDtBXFLZijR9wVq/HWma0dfXMtGl0bMXY/3hYF38/WZIVYd+nsVD+47vGYkj42mKMUT2hb+eFOJu9dabQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T15:22:41.080Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.185","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.188-build-renovate-autumndb-22-x-1761a229c7c07a67fb9248cf1a425bfacf6644c2-1_1669476248907_0.5947584818100518","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.188":{"name":"@balena/jellyfish-client-sdk","version":"13.0.188","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.188","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"1da3d625b28af36169511947515419fe6724d78e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.188.tgz","fileCount":30,"integrity":"sha512-Mw3IKkhZMoGGgmLB7C+cNg6QlhawZ1Jg3AupMQtWBMig0yasH3auyt4K+iCrieew4+sqFyclmHe7JtloDa3bsA==","signatures":[{"sig":"MEUCIQDdg1sX86mcfm2bq1QJlUZOOp0aILVPrcmNr/NjFRr73wIgbVJF1fpgST2TtvR8uMmbIzu9WYNqmHuqUPSJAaJ62Q8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgjAkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqx5g/+Mf7dO0uJWDmCeOGbBwUb05X1xusb9RTusnvSVgLxahcmeR9I\r\nUcpsyS404gyt32qUyZoRxjWqndSfNM2B/RPxvbEds0UUZTSJZHbtENSJYQG8\r\ngmxuLcgu7VpZ8gcO57RPZ/L2MxiKIkiTAaoncr02rFN4BQ7pq8uSoWvpph2J\r\nx4ByFNy6SDw9/3hcrVebbjgX8kBkHfqeirtyXl2JztzJjDvY9+QZuRJ4OZsC\r\nKyFO2D/H1IopImb1puE0YmceOvD8mDarIzDXB6lhSxLcY5oAyJkWeKYSCQ6V\r\nnDbennyBEzlhb7nLs2BH+iYjpOGbDoD+/EpG9GxPlYD0+ncV2gzVRDl8v/w3\r\nXqL4ZI8VoqdvjEg/4DXxNfqtM63ZcnRTCpCnhmasqMES9VK4hAgXUDkA2EUV\r\n5Jzz9OcXDH8HT/rx8yTok4rQxOCDA8Wft+/hJ6z49XfWAougz2QHNwNdnp3U\r\nbyrzjHZNJPpmfVN5sbur9gWhU3nP5pSyeHl/TACLXpL5C3d/KvC3ggDdOlvk\r\nRG0brvQ+C0CyNe68eOQnHWultN0ubfcWHavv+r5oxdlUhkVn4FxOCudXRvui\r\ntWgG7IcwgmYiEYxzfmV4uM+gkxx2AllG7K7iCEZ2vZiW0SC3pj7DbGKtGMhQ\r\nnGLEh2XnvhIgG9El/4kJSOzart9x3fMZ2YU=\r\n=qhC3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-1761a229c7c07a67fb9248cf1a425bfacf6644c2-18.x/balena-jellyfish-client-sdk-13.0.188.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-1761a229c7c07a67fb9248cf1a425bfacf6644c2-18.x/balena-jellyfish-client-sdk-13.0.188.tgz","_integrity":"sha512-Mw3IKkhZMoGGgmLB7C+cNg6QlhawZ1Jg3AupMQtWBMig0yasH3auyt4K+iCrieew4+sqFyclmHe7JtloDa3bsA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T15:22:41.080Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.185","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.188_1669476387951_0.495138026537562","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.189-build-renovate-autumndb-22-x-0cac137895f13d914f9347b4bce20ea9737855d2-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.189-build-renovate-autumndb-22-x-0cac137895f13d914f9347b4bce20ea9737855d2-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.189-build-renovate-autumndb-22-x-0cac137895f13d914f9347b4bce20ea9737855d2-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"73b884697fb5dca344ac3376cd27b5115efc1c97","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.189-build-renovate-autumndb-22-x-0cac137895f13d914f9347b4bce20ea9737855d2-1.tgz","fileCount":32,"integrity":"sha512-1Z7uRydD21/FPHh1+3Bf6jNFq4rPIFjSjhdVVQJROClTx2GAhE7lm/19HUmXUpq33W9zasDPSWxWi6QTvCv9NQ==","signatures":[{"sig":"MEYCIQDPZcmw8qAm8q26ZGJZll/6/10AKLBI9XA4o0sJ3XHJBgIhAOhxO2TT2RtCq/a9QbJbbxEj658s2lmf7GlnKTK6Rh/Y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjglX6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/iQ/+M9/c+yyFyZVUwVznDZbPGu6H8IKZI/fK+H/nvqGETpK6m4jC\r\nnRs8GTWRpaDoA7YlFbz/k5yOodxLBCxZq8sfw6ahpGQMQisl3HW8a92wMqvG\r\n8JJT2t/5gZvhJgt0jogskb4xaXF9DIwPyfUEGmlOw6UzYs9lTxhG1Vy0oxD4\r\nPlUsIgb5+mGFY+oqalci/R/sl7CnB1+sdCfn2ae9Rfq6Et86Q6XwPLN9t/4F\r\nD9jYEV9qHEi9/9USLBvopc7P2qzYFb8dNRZh5t/cMm7jwH1vJs8m/saQoEK2\r\nNAcHyD5luZqGqzVakI3JRLDwAYeRS3lcLSYmn3RgPZPIBQ949BCicohc8i3D\r\nC+u3v9RLbeuTsQbwpsjDaaBVoEbFgfwxJBQcx4oAy5nXRfXb8bmrP7Lqucng\r\n2dHbl+0jFJP1eBI4VbqzGl9brh6etU2q9UHw80Zf/K4rug9TW0iAXIGKHKrR\r\nXUgz/U9Hmxy6aEKKPbfdd/UNX8L8c+FARr8LpaJhMTn5YxUJ8x3LUtOluyBd\r\nRhMgvoJWENDWL5fR3b2b6pmAYN/SAu6Wirl2+O7mmoKmYM9v6BWEVVAqxHhg\r\n5l5+HnC5j0cR4Bjjh2s7+3QpHq7/O2TicNr2WBttizQv/dLa2fe6LlU61wO4\r\n+QxhBYJdjxc8XPLdyRuARVLu59ZwSrCU6J8=\r\n=XvoD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-0cac137895f13d914f9347b4bce20ea9737855d2-18.x/balena-jellyfish-client-sdk-13.0.189.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-0cac137895f13d914f9347b4bce20ea9737855d2-18.x/balena-jellyfish-client-sdk-13.0.189.tgz","_integrity":"sha512-1Z7uRydD21/FPHh1+3Bf6jNFq4rPIFjSjhdVVQJROClTx2GAhE7lm/19HUmXUpq33W9zasDPSWxWi6QTvCv9NQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T18:06:06.861Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.189-build-renovate-autumndb-22-x-0cac137895f13d914f9347b4bce20ea9737855d2-1_1669486074633_0.9463195667771183","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.189":{"name":"@balena/jellyfish-client-sdk","version":"13.0.189","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.189","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e2a3798f5e5590141a1bfcdd1dd0c7d7a44cce73","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.189.tgz","fileCount":30,"integrity":"sha512-ccKsF+PIzw7lqjtTg6P4j4EQc22prP69mg60W8rdCMcUmZOYp9wNR74QPuk2cvQeDwJF2TRdUG481MdN2bkRmw==","signatures":[{"sig":"MEYCIQCAvNDE6k7c2gx4lKZhGfa3Gt0teP7VDIQyihWazUchtQIhAIIz2T9nJOhoefhYHCmwiuwZF2q8EoUIf54rQ62JQCDr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjglagACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoDUA/7BRa7urAYsk0rocDPxa7Vq0ChazC4i6tlRKzW5Hw7hM6fWK0m\r\na9+PoAzgXiduqGPg/WYv5CmZrUp4KdUPSeu6DRgZoZ9CayKrDxV5RtrHhbYq\r\nm+R51opthk8NrGhhEukqe72bv4ha09sv+P6XPsTSEigbmnMdiiKt/81nONOE\r\nJCRpaPTqtSTbbjSEyzn5EF0UvssWOI+tThofQHwY12VpD/r6u3THezNcV1X6\r\ngVl7OpBA8K1uNyArYRcT2oyCI1q9w5alCGmndz1kGL9wFAmN1+6uG7asoYg6\r\nQj+v3i69BjynlYijv9dKX+9xmsh55XfoMQZTRLM48u/3JSX1N+VusiQG0aEI\r\n7zI9N2BYx8N+ebb4h3jcHfHkgjhvzeIlz9oLLUWI/HrCOZ+UpaQeuKNDuaTe\r\npn/qjCmDdQL9D9kVg2dr1wcvKQKAwqpgTiZHpb6T9zWxcb5uMlW9CCjh3Cdj\r\nbA6+szv13vsiXd95GmwHRCgVLS+NG6KWDu10eiuybPcuojCEuJgqmxyZKBdr\r\nmh9KFT65qjDVRp28Nc7v5dt/+R4kpL4pvVuRaOr49z1GDlGLEsHdvpZd6y7Y\r\n2LVrbgFA9iYB+pg0oQ9QO9crFY0G+9y8Mu1VYj2233uIXd02mDjs3nSs5DQW\r\ntUZeDsXu+tINbSzire5dmWXnb8qxPS29hv4=\r\n=t5By\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-0cac137895f13d914f9347b4bce20ea9737855d2-18.x/balena-jellyfish-client-sdk-13.0.189.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-0cac137895f13d914f9347b4bce20ea9737855d2-18.x/balena-jellyfish-client-sdk-13.0.189.tgz","_integrity":"sha512-ccKsF+PIzw7lqjtTg6P4j4EQc22prP69mg60W8rdCMcUmZOYp9wNR74QPuk2cvQeDwJF2TRdUG481MdN2bkRmw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-11-26T18:06:06.861Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.189_1669486239759_0.6764327473202041","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.190-build-renovate-autumndb-22-x-fff8e132703b2c1f70e210138548daf25ce81e78-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.190-build-renovate-autumndb-22-x-fff8e132703b2c1f70e210138548daf25ce81e78-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.190-build-renovate-autumndb-22-x-fff8e132703b2c1f70e210138548daf25ce81e78-1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7b02bdb85a0cb2036368ecbc463059ff28a52c3d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.190-build-renovate-autumndb-22-x-fff8e132703b2c1f70e210138548daf25ce81e78-1.tgz","fileCount":32,"integrity":"sha512-L41foLTemzsaNWdhl+0DmU/E0YA7J7MFPm4zE0f1VSppYhkjfjTX+bfVhrXh3ho+ODakBS6BCXop+yHQFuA71g==","signatures":[{"sig":"MEUCIQDP6n4sYhhqmDf/I1V/m/PRc5CDfypgink2eseEfhwzwAIgf+bRxqZbPlNH6+ABg4dk7F6lbnt6IcNU4sXLQZ2AfjM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160157,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiWTmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRPg/+ICONVZtSuX31U0QrBEwderfeDaETuYt5esFUWWGHkbklDYzE\r\nrh8mpHyrzwSExe9e7e1LrFIkAJnnja6P4v3cFQPdIIa93kSJmQauRFO+8uEU\r\ndOH567QMJG5JVA5QZOnA9bUduFyuI3R3tV6XkyekeJK/g9Thx27YQzzKVHdd\r\nF5cTD4m8IGG+o+Knzt0LB9jQSjJrkFd24dz3+fY2zxPy7AgsqmjCdl9G+KmD\r\nb+ohewaVDp12vRZ+Ipb1szNKtcs67x0yTT0g7F/hFsQ4exdKkWgSY5Cub6Vr\r\n69CEgN4UQgabaPyzMVyaCCgsO2LkUQLBuElKIkMX/BRoRRgsPET8wiTjOtUv\r\niWKPzO9nY5/xXTEo/kMRS8BBpwOpAxP+rghYBRJhzJ0YfpFSAq33+t6xxn1R\r\nfTBehIzV0mbedUPtRI/OXlTEAAgjQw2mZVKJ8INoro9eihwAmkCUj7a+NNxL\r\nAQ/hj9CcCtqRMtlLiRb95+T38GnsrUmIYL9e+xuYrNoxQmwuCksaL/n3uvQu\r\ndpkI+UgiJ6nOlhZNhiUDTmzLKb8jdCmPrh/O4sqicVK9Kw0VLPS6fZDPQC/U\r\nmLKAG7OcOAiqPIwN8195cROg4TSrSFr91zMbJaFzV0O0ZjHzfUQRc84CrS5M\r\nDUtkLPKLflvgHUp9AU3qj8rVHv3O5vj2eFQ=\r\n=5voz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-fff8e132703b2c1f70e210138548daf25ce81e78-18.x/balena-jellyfish-client-sdk-13.0.190.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-fff8e132703b2c1f70e210138548daf25ce81e78-18.x/balena-jellyfish-client-sdk-13.0.190.tgz","_integrity":"sha512-L41foLTemzsaNWdhl+0DmU/E0YA7J7MFPm4zE0f1VSppYhkjfjTX+bfVhrXh3ho+ODakBS6BCXop+yHQFuA71g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-02T02:35:54.655Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.187","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.190-build-renovate-autumndb-22-x-fff8e132703b2c1f70e210138548daf25ce81e78-1_1669948646804_0.9166536066216193","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.190-build-joshbwlng-renovate-3337ab023c0caa5433dd41b4c6a63907123a5c8c-1":{"name":"@balena/jellyfish-client-sdk","version":"13.0.190-build-joshbwlng-renovate-3337ab023c0caa5433dd41b4c6a63907123a5c8c-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.190-build-joshbwlng-renovate-3337ab023c0caa5433dd41b4c6a63907123a5c8c-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7229779a29c3a52e57624130702dc4cec92a74ff","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.190-build-joshbwlng-renovate-3337ab023c0caa5433dd41b4c6a63907123a5c8c-1.tgz","fileCount":32,"integrity":"sha512-W5fA8Bg2WJDGoQxW/YoX6kOdQLQI26qcpxZpIMyFLlA+qTOi3FHKkYGjxXQmtcsSdn0paCjzcd8TsR19NSSQ+A==","signatures":[{"sig":"MEQCIDU0GI942ccyw8d7ytr/IMMR+iw2VKLG1XOidhNcNpTcAiBjMc4o5eZiz4/0tNoL0aR52ueduXRi5v5lv3bEE1617w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl8ohACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFAhAAovk2Tl2VCAf71AeRma+8EaUOrmvLDGr0bDFVTGImC60HUEDP\r\n6DLMN8w/xhYcm9I9g9W1c6eg5GaPzOCRxj7bmQ0PFXT3W55934qNzE8jICai\r\nJquJPtGOK85TUABnppnI5WGIpfXxHrHo5hL8mv17mEvdkR/2PnuuE8yUiZ3G\r\n96avBQHdpBUVpUIzKe72/GGg3WKVuqFa9cvSTjeRFYD2g81pzOO5BXQcLGI8\r\nMV2dttTpD1aK5s5iEYxb1hc3TbyyHfA/50wM19qdy0NzFRMxkvU2ddA528Lr\r\n1LItqpzuSJeVCwVY86yaOdeOE4cPrPnREywAd3R0jq7ODF5TyblRfxOKWiRR\r\nHwrIqZBJDkQjY80F6dAsnfugvwn7t0Xih0YycpcP3sQcUQX8aIr5vT196JDV\r\nqvn2wijlfIhG7Si6jNUUtepojJZs3Ry1jELTUd4CHxgmsXQNthOw/+23ZH2+\r\n/SkqWXG8Byh57JBHZrQNm4Qscf2zNc/GzX3fFQ3uXiXAb1NCifPZSb0/25p4\r\n+yJrx5klSxqCGsmHQA8TL3T3X7uFBE3gtDrO+yKHdENQol48mW51Afe4SkSD\r\nSGws38/oeV936tvNl2RXHmoBzwIlqn1eXlV3pDfcBX3ntWnXb5Uu2yyiYVdL\r\nCuM2vJ7eFrYqMfjH9dKJa263HgJ6BbAaFFo=\r\n=369k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-3337ab023c0caa5433dd41b4c6a63907123a5c8c-18.x/balena-jellyfish-client-sdk-13.0.190.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-3337ab023c0caa5433dd41b4c6a63907123a5c8c-18.x/balena-jellyfish-client-sdk-13.0.190.tgz","_integrity":"sha512-W5fA8Bg2WJDGoQxW/YoX6kOdQLQI26qcpxZpIMyFLlA+qTOi3FHKkYGjxXQmtcsSdn0paCjzcd8TsR19NSSQ+A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-13T00:39:10.755Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.190-build-joshbwlng-renovate-3337ab023c0caa5433dd41b4c6a63907123a5c8c-1_1670892065529_0.07528236717123837","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.0.190":{"name":"@balena/jellyfish-client-sdk","version":"13.0.190","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.0.190","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ef204680ab674f5fd7daaf92ecb8ae90af9a2ade","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.0.190.tgz","fileCount":30,"integrity":"sha512-aQEwszUNLAwEDrmxXrkLZSOhnZLvwz52YhgSu5LWxlGNN4xMpUK84bpCzsbPVrml2iA5nqvXCDuu0ZcxNPVQVQ==","signatures":[{"sig":"MEQCIC3xQGLW4FYDLZgExR/gDdcsgidiP6oFWPR/PHPAHll0AiAB95p6PQxelYv/L/Ty6QEE8yQtsJvxFcA5jQxUaeYqDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl8q/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBSQ/+PTzODdfwr/krjDfVF4vcDPqeRSQaW0Zp/hQc+pg4Nhkd4Rnm\r\n9/Qg6Rpgo9QJrobyLOkr3u1CSMzjT5pENpEG31HrQSrPoZyIJZB04hod4LFJ\r\nBGFMogpAkN6kRuGwuDkow8UJVpjsHvJzB9gFFttmfNGc2mJmmTBypYjW2u2s\r\noebVM2lNkPnx2ajGTd5jIPUqXjbT6WjUXhJL5YbliskVx3DCKrORYKHV6zBL\r\nBf7S159OjP71GZSVWImH4FaLX6+N0vyGdR1P3LNXwvMakRK0lRm2nnmYu2tH\r\nQqW1U6NmwZX1Z/aNb+y5LdBZK5t3qPjbYaVPUB0qqz7hey34hTCr4d76Zsgh\r\nBSAfBrETLZ+0SegFpkZ2LAKoQEUpz1W6v12/Er4A31WHS8zUZ+oNHJprxNtQ\r\n71PtkDd+YQKsD/BJkEZigAm/oe767HV16DBG+wgQW39UNz7DC74SGL5Qq8rU\r\nkp/lUqxiYX1DZkzfMhao71yBEFuHuqIVtQKO3/lIZyyandNyCP1+L5BVJsB4\r\nqMb2895Q01qFIga3+ZSgLfYywYMI4vTQV4cdowH6LG7I3W16Jy0HN6azicye\r\nJh4SAoDR11jhzzK8GWSb4Y9tG0tVSR16cdP76K7mztKlLty52I6QtAX0bMAH\r\ntlA+V5okFP3xoFpT4OpdV3W8J3pCnCrc2+k=\r\n=zmmC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-3337ab023c0caa5433dd41b4c6a63907123a5c8c-18.x/balena-jellyfish-client-sdk-13.0.190.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-3337ab023c0caa5433dd41b4c6a63907123a5c8c-18.x/balena-jellyfish-client-sdk-13.0.190.tgz","_integrity":"sha512-aQEwszUNLAwEDrmxXrkLZSOhnZLvwz52YhgSu5LWxlGNN4xMpUK84bpCzsbPVrml2iA5nqvXCDuu0ZcxNPVQVQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-13T00:39:10.755Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.0.190_1670892223572_0.8447014553316501","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.1.0-build-renovate-node-16-x-efb2b33f2d822d0bb3aac5815e027f26f0677124-1":{"name":"@balena/jellyfish-client-sdk","version":"13.1.0-build-renovate-node-16-x-efb2b33f2d822d0bb3aac5815e027f26f0677124-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.1.0-build-renovate-node-16-x-efb2b33f2d822d0bb3aac5815e027f26f0677124-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b9fda0cf3ad954b138a5cd2a5be959359a3a72d6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.1.0-build-renovate-node-16-x-efb2b33f2d822d0bb3aac5815e027f26f0677124-1.tgz","fileCount":32,"integrity":"sha512-W4bXBexw8kDEWB1amj5XorVCXjZY1t1ciN8gAkgzkBpFrZZw3F03JfVwd1HITfTlXzgBZpjWDolGXlUl0T2fxQ==","signatures":[{"sig":"MEUCIBtzTSWJVFeFbDtaCyLQkyJ97zkW7a05L1+z3fSnReERAiEA/gsSyHrPS37igkTug0dDKsWi4mY1qGtRhb0Pe4gMTFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjl/Y9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLrg//W7+GW4Z0BqBXtEpsBBGMtiADR9zxt3993+97LTI8D8QYNqc7\r\nav4VBQPMRs6DWiw/vzHW43aC176D+ClXPU5oDQo00dekim6NaEvVuSR/2PCU\r\no8Bc2Gq6/exzgI5gSjdmPqiMBnGShhPqfDCooiWBI5rB6MTfaglaguj5x/k5\r\nZtrlZpocssiSPM672LLutftTMLUJOcRV4UeVQfIGwAwaC9DAA4FEfhBLcelz\r\nIBuh7RaHB7N+LjgenI8knp+aW3UlgyUHW/hhWfI/ZIQSLDFK22wJdXGosVKU\r\nX+MtY2v2ceERiOgL33VqRd/3aHCI/lLs5Ac416vp4v2NzmCxaA7nCCeS0oK8\r\nlmzEzVy4ONb2JR32tdEOYKJpBVYCSwTCjpJI8jMct8p2laNj5HJg/JxlxOh8\r\nrmWWxUmEdhWr0Bcqy8OeM4KIJTa1XzDPqKbnI8C9fVUAsvdaNGCnuaRmjTnA\r\nmP+9SBeoi6/oCi7v7Jln4prVXjq4J7vDP4WdvV9lgpsMi7MtPYS4Tb+QSOE2\r\n3We3yYuUip9QYh30IiItJWiLvoJt4Lg7yY4iT3NqpNfEUcTPkNXNlbj7zHle\r\nak3Ep6Z292om23Oi6siMiuRXjE6v6R40wB6ncT97jIki19rsRO2X3NxCs7R6\r\n4p1UgTu3nfqSFBh+2Decfh4/p3ey/CMUoo4=\r\n=NVji\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-efb2b33f2d822d0bb3aac5815e027f26f0677124-18.x/balena-jellyfish-client-sdk-13.1.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-efb2b33f2d822d0bb3aac5815e027f26f0677124-18.x/balena-jellyfish-client-sdk-13.1.0.tgz","_integrity":"sha512-W4bXBexw8kDEWB1amj5XorVCXjZY1t1ciN8gAkgzkBpFrZZw3F03JfVwd1HITfTlXzgBZpjWDolGXlUl0T2fxQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-13T03:47:40.397Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.1.0-build-renovate-node-16-x-efb2b33f2d822d0bb3aac5815e027f26f0677124-1_1670903356930_0.46747523219012854","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.1.0":{"name":"@balena/jellyfish-client-sdk","version":"13.1.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.1.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e1456f086db0c918e226c3a44c18ea8e876d73e1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.1.0.tgz","fileCount":30,"integrity":"sha512-RnRalry++VfMoHTmjyZUGghxWfhS04dxRIiEPnfLFrhynF6F66Wk+a+c21ieqX4kd3vZbMnBL88vTuO7uofPsA==","signatures":[{"sig":"MEUCIDvqB8e6fWRF0KdYSvRXKqtV+jk3SVE/NgeE6igq143rAiEAsxX+g6lUyLWmcgCFvY97KMq0efMkYQH0l2kGnOoGJA4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmAQSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqD8Q/8Dc2C1UM6Xl64BzHAh+QYe95//i01U2/CnmFVUysjRdEXPDB8\r\nYoRu5Aa/EURz3m7WjO4qKqyGP6K98ftUdygKR0usYHIib7zBInRVkeRmZ6UG\r\nAqNy3XuCM5VpBPUAJhBdkWkbQRLFFh/sYjo6zMoCCKO5O8TOKQ03UV3n5q5C\r\n4z/i4H83WPBvZ9Xoj+Gkdg3h5jfEniEfft27ram7UiV0oBZVZPfbDjosgj13\r\niIn/zSnawnRB9QxR0u5vuvYVZRKU2ZUrIcCTTB0Ql1eiWB12XsSuX4v8eNj2\r\ngu/sSRsUADNPoKenL/YZQQ9uDgpNMsxoBkY+gyv/evTCOtxbNFkoC2f2k8oC\r\nbiCSuON4V7oHLCRVhRWdwLlAnF6pWHxn9300IEKpJ/Typk1RngZnsVUGmyZj\r\nLzOpCikam/fq4Rv1BXZwYI9gmppl9aFHj3LtE7AgCNBPbfuAO1jEorrhV2A4\r\nrgX3dBXvROgMjMYBsbwmHpphY7s2eJo8wtt9niGvmrQ6T/O6SVjc8SeeAQsb\r\nPMk/vDNUSgitwkE2qTCOqHtU82BS6yOoft/A5BGhESbZJ+0kAu/BPGv2B+lL\r\nnTE0mDOV3te9ptXGH5lar3gCDvv1DUCRnCJorVtXLqHJetAHAU17iBXij9RK\r\nXxKxRbDyjWp9OC/+U+CZXHxwKFEFqAEjqNI=\r\n=LOwo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-efb2b33f2d822d0bb3aac5815e027f26f0677124-18.x/balena-jellyfish-client-sdk-13.1.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-efb2b33f2d822d0bb3aac5815e027f26f0677124-18.x/balena-jellyfish-client-sdk-13.1.0.tgz","_integrity":"sha512-RnRalry++VfMoHTmjyZUGghxWfhS04dxRIiEPnfLFrhynF6F66Wk+a+c21ieqX4kd3vZbMnBL88vTuO7uofPsA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-13T03:47:40.397Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.1.0_1670906897943_0.24772092170638893","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.2.0-build-renovate-actions-setup-node-3-x-00517517b9443991867307581fb52b1b586a4395-1":{"name":"@balena/jellyfish-client-sdk","version":"13.2.0-build-renovate-actions-setup-node-3-x-00517517b9443991867307581fb52b1b586a4395-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.2.0-build-renovate-actions-setup-node-3-x-00517517b9443991867307581fb52b1b586a4395-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f2e24d681dde50b2f501952e2ea76db9fb5906f8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.2.0-build-renovate-actions-setup-node-3-x-00517517b9443991867307581fb52b1b586a4395-1.tgz","fileCount":32,"integrity":"sha512-AYkxmtZ76hz2jYplkKTV9u4D6wdmNm3wN6MC3SICExfqLitXhJe8E9NVWACLSpcvw5MzJWhI2eiIx2lN2H6qog==","signatures":[{"sig":"MEUCIQD5BfEPyi0iNbbLTjIKA8z6/q+qXVXHUl26rt1qK/TRYgIgdhUi7tXmIekh1r/905c7T/ItXhci6MzJDrVkiVh4zj0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmBIrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmobbg/7BqCYVj2d2FrER1jb8RACcqbVHacHS6omt+k9p+VzYw2bQJwZ\r\n7c/HvvnrhIEusXWU9ksJNL6Kome8B5gxsfRg8M/3tWdGeN1jQ7sKrh70Tevd\r\n92AAAUXNmTJaffD87nzsANvwEVjhbNVhvsNtIii0LnVnLvNXlRQYpVcsO6CP\r\ngj2rzCLoeWTvQLAPi04Ic4yQBsAn4MxC8WKgGNSRUzKdorj7D2jfkbcsNJcU\r\nDTQBoGHCZ50KQuopRmkPMw4T/aHu7FU7kpsk1Q8vlvMtzHH4zzGgYSju+lVT\r\nmMyFOQxhRhC1L1SHbsSyzc2Vfb26jiyszghn3UwWJKfAJYXLuaOM3UHIvdcp\r\nVlDXU5nYMbJEX/CkujDUjnV2NNkcp23fF6yr00CGUqgGP3iqO8+atQOoQUhJ\r\nCHdjTV4EElZ3lkewdEAm6Enu3Kv9p3ZYruqsXKFwippSt0kqyxDaziQARxXs\r\nx88unBsS+wx3GEaZ12n3jDC0VfsedUhtcbC33Dhf6aAJazl/oHtl68lNUHVK\r\na2q9hEhBifKGsazUPmyUMsGrn0ai4NyXo4fWpkAoQPpO+6QUDDpcwXE/8cL1\r\nOIf6UDOkZDDm8slN5hwzyPrYh4+H60lKhkZex7b5JhPtUIXuV32rYEdgNAFr\r\nIIn18AJhxmSY9PQjrG64balpqp/rQXq04nI=\r\n=PdF1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-00517517b9443991867307581fb52b1b586a4395-18.x/balena-jellyfish-client-sdk-13.2.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-00517517b9443991867307581fb52b1b586a4395-18.x/balena-jellyfish-client-sdk-13.2.0.tgz","_integrity":"sha512-AYkxmtZ76hz2jYplkKTV9u4D6wdmNm3wN6MC3SICExfqLitXhJe8E9NVWACLSpcvw5MzJWhI2eiIx2lN2H6qog==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-13T05:46:50.650Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.2.0-build-renovate-actions-setup-node-3-x-00517517b9443991867307581fb52b1b586a4395-1_1670910507096_0.7473081674577295","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.2.0-build-renovate-actions-setup-node-3-x-6386fc9266f71670d96d0598d5c052230e733a05-1":{"name":"@balena/jellyfish-client-sdk","version":"13.2.0-build-renovate-actions-setup-node-3-x-6386fc9266f71670d96d0598d5c052230e733a05-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.2.0-build-renovate-actions-setup-node-3-x-6386fc9266f71670d96d0598d5c052230e733a05-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e9f5f272c73b2ac06bc58e6807c3ba4bcd433c7","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.2.0-build-renovate-actions-setup-node-3-x-6386fc9266f71670d96d0598d5c052230e733a05-1.tgz","fileCount":32,"integrity":"sha512-JFiv2iWrQOfFsPdJK+uUAY1V7BoKT8ptR8TOi0CYXW0BuPWICQSjSTrPgKE9z8NEBZhprdTDp6QOoVuRfFBZMw==","signatures":[{"sig":"MEYCIQCT5bMzm1W9NS25nqy6poNtszQfteWh4lp5dN7y7b1PJwIhAIzvEfkIDl++8GeaMs6PVSIeDLfTjrbrtP+A5bvPwXSD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmJ8KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqU1BAAhpxJgmrb0/OoiqWgSiwANf3RJGzERLO0xXxtgvF/qC3w8RcJ\r\nmK9kF2yVvxKPO1DhH3USVighBHxPOMacB+kDEzn3f4GLwI/y6bFzO9vf8WI+\r\nyzJhmhpmLKUo5/Iq87NNl5DzDa67fhTlFvgxdMjplODR0q7StjUBUvKk4MJZ\r\nuIgVro1EQcnoM+MQuc4b2+HyVdz5w1v6dT83v5Xvxiv2lIBFewRyy//s8U8J\r\nWYa0f2UOKOJrSTCI+qjzzwcWu8y/BK+K18OtEeBGgKrxRddk+LNOC+2q0bIt\r\nsItisKY/PJ3/pNM0P3FCk5rX4Za0VwIBBcY1Fs2YUDXJyQ2MUpRKmEsOmoAN\r\nrCc+HabqxO7yH0ZWnCv6zN617Efs/kbVHG6B6s53UCmKd/Gl39CoBDEHBLRl\r\n85eci/pmDgvI6DB7bmS/oIu4O+QzA1WPivSw5p8wCswqh+PQaqjwD67o8vck\r\nvzpALK9aYPHqjQ9L3YV/t/1XWVZoQX1scZ8GM0sADp5sTVoRXlNlQTg5JQVB\r\nMxEXP+Ng+3Y5NuP1te8QWunWDdt00Om9hfpnktBL23CWz0gjo5snCgrpc3bU\r\nZassZRHLTeEuhcqpPUe1Gi6ibNS5GVnBFUHPy0NcHUOmXHeLc58ErtoSUmrg\r\nnyRk69RVy8h0FC/Jj0vblnvyrtdx38acf+U=\r\n=HIdM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-6386fc9266f71670d96d0598d5c052230e733a05-18.x/balena-jellyfish-client-sdk-13.2.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-6386fc9266f71670d96d0598d5c052230e733a05-18.x/balena-jellyfish-client-sdk-13.2.0.tgz","_integrity":"sha512-JFiv2iWrQOfFsPdJK+uUAY1V7BoKT8ptR8TOi0CYXW0BuPWICQSjSTrPgKE9z8NEBZhprdTDp6QOoVuRfFBZMw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-13T15:47:07.964Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.2.0-build-renovate-actions-setup-node-3-x-6386fc9266f71670d96d0598d5c052230e733a05-1_1670946569937_0.475639002767106","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.2.0":{"name":"@balena/jellyfish-client-sdk","version":"13.2.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.2.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ff076e8e3a362f06c99ca3490a6694be38bad4e1","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.2.0.tgz","fileCount":30,"integrity":"sha512-ghT8vE59e3p3JLAvoEP9WH+030zViQQ+ok61PZ3UlpOyXYN88Yc259jfGzoEbOHgTeqgbO0vg8LLM2Q1w8AVPw==","signatures":[{"sig":"MEUCIQCDYHhKkPXWj25xbU4JyzkIUADwDV4nJwY4vd9W6MQUGQIgKkJx6vB8gkzBX1zImMbpr0+40e70ErxN9Wfjb1BbKRo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmRnRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoxEQ/+OHk8wMEYTG+i59NbH+IA3THyhDaGaS+kHvmcf7bzzKM2EIk4\r\n6HmrBq1SnthUKWi/2Kh/MlTF/Dz487dkJQAiBNG5uIz9PwtGUBBF1ix754qd\r\n6gvy3NZpXLED+57bdRTz1eNY5Uil98DZpIsyL+dioJZdL0KjISeBa2qI7+cN\r\nVOAqMNil9GokxQDztguEwecasnv8V742nya41i9VPse+HJtXCMHUFEa0cgrZ\r\nvaduzj3HbN4LrFKQzkR7iult9zXAgFIF166mpFwwcKoLkbD8ChgYOQHRZkmf\r\nCohct4RI5RyeWN+8pYgHo7WlYQRPktCr8v6LiiB0QkQW4+9E7tz99Bq5vjT5\r\nrBFep5hJ2EwQBVdBWtHTYBvliXRdxdHuCSd59mTcgy0GL7DBJpGPy5gdwbJz\r\nktVBsA8cvEqpQzZDObLUhX2HsQchGHF95LRJUOhWsQ0HsCR/Xctwfp5zMJIC\r\nFFDEpfCnoINJzbPQ1eGXNM8Q/bTmPH/5gCIroEfcwy5Qr2cKFVtfz9Q6V6Bf\r\nEoj2lJCAQ0nIMrR7ll6FO6yU1H1ePp1H3D1worxoWGcBVDZ4lYmoZJ6HbW2/\r\n2aweo9qpJ15Q1ws0z23N6ScZomOsL4YEEpfwS7RCjY+zVS9pyRoh4mq/pjJY\r\n6ohaWExnX//659hkeZ48BL0wU62Jj5v8zsE=\r\n=2nnp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-6386fc9266f71670d96d0598d5c052230e733a05-18.x/balena-jellyfish-client-sdk-13.2.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-6386fc9266f71670d96d0598d5c052230e733a05-18.x/balena-jellyfish-client-sdk-13.2.0.tgz","_integrity":"sha512-ghT8vE59e3p3JLAvoEP9WH+030zViQQ+ok61PZ3UlpOyXYN88Yc259jfGzoEbOHgTeqgbO0vg8LLM2Q1w8AVPw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-13T15:47:07.964Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.2.0_1670978001111_0.7781798556092738","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.3.0-build-renovate-node-18-x-fae28550ff594f7c792a8f7701af845293cdcde2-1":{"name":"@balena/jellyfish-client-sdk","version":"13.3.0-build-renovate-node-18-x-fae28550ff594f7c792a8f7701af845293cdcde2-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.3.0-build-renovate-node-18-x-fae28550ff594f7c792a8f7701af845293cdcde2-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e688929f0bd7df9c6b8754e2557da485e40e04a2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.3.0-build-renovate-node-18-x-fae28550ff594f7c792a8f7701af845293cdcde2-1.tgz","fileCount":32,"integrity":"sha512-yPxtsd2ukXNnrI7xih6c/1ReCJoy8Ori0tyTvJPva5ustsB29VtnvhMf0P53SQ0HPdJc0fNI398uS7JsCy1INg==","signatures":[{"sig":"MEQCIE2ddnBHypSDWN87FkkouqyUWaCDb9XOeTZdJQVbkE/tAiB3CUMiJxiCFwlcWt8MtVyLSDAnzCpoRfpPe+iCN6ehSQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmSKNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoq5A/8D3eCa9+eQP184YhVkR8XVWkZoZ19xWbdCf5ruknYsHXFmlm6\r\nVBZLBqveB4kaPAfWP9p4sNWAfUj64F7zbOVXwAHuAukXnVqSKvdEmXCtD1bQ\r\nQJU0djWT0nuNyHBJormlze4utEV55GzjCRrwe39ymU5/LfFzFbseKGd5wNaf\r\nT6JG69fFCN1IZ2nRU1CKEa9CBj/YFwxL7fo2PDQaXU4xUXgFl2YfEDQqAI3f\r\nlxpcNpKtlQ6Lvj7gUmbIUgZyd11wtKRTB2ZsSXiGaQjtoTF3Jjo1qHqhdw95\r\n0g5KkivsOt5u51H1Dcao1M63Xc4ABL8mNRG/P+WCAS1if3fdcN47bM0eyvLd\r\nu7EqKlcZBroknyQYiwT742VAGuJ2O4WCJwuvC9ctl1CrxgSOmT7rkwE+63Kl\r\nummReuxQyyCybuL4RyjXSoVb1XHp5vJ5F/pnREmtiWH1Xa5wCFKg0SMVMciu\r\nSlEJcqurfe9VP0PuOOFlHttHMgGJ2bq5G7NM2NI1IelRRYelo6QyDhhEsNaR\r\nru9BaVtX/YqEV7CHwa6Vg8upFcrieDjAahHYfxmsBXe7+vOjbC95XQbWCDwm\r\nGHI1iFmHogO9Br1tS239ZksqA26ZV6KgT5IWU1XBMtcRX04OKZaeU8K9SoWL\r\nG8fmui+eeKrEtHKKnOJy+x4yq4SIFdFRMhc=\r\n=Ad27\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-fae28550ff594f7c792a8f7701af845293cdcde2-18.x/balena-jellyfish-client-sdk-13.3.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-fae28550ff594f7c792a8f7701af845293cdcde2-18.x/balena-jellyfish-client-sdk-13.3.0.tgz","_integrity":"sha512-yPxtsd2ukXNnrI7xih6c/1ReCJoy8Ori0tyTvJPva5ustsB29VtnvhMf0P53SQ0HPdJc0fNI398uS7JsCy1INg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-14T01:09:02.516Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.3.0-build-renovate-node-18-x-fae28550ff594f7c792a8f7701af845293cdcde2-1_1670980236837_0.940419520780474","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.4.0-build-renovate-axios-1-x-ee9f7080b948c9754df79b77fc8e3d44c8942b20-1":{"name":"@balena/jellyfish-client-sdk","version":"13.4.0-build-renovate-axios-1-x-ee9f7080b948c9754df79b77fc8e3d44c8942b20-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.4.0-build-renovate-axios-1-x-ee9f7080b948c9754df79b77fc8e3d44c8942b20-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b059097eb42defd699ae546e9994e04e4fb8d3fe","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.4.0-build-renovate-axios-1-x-ee9f7080b948c9754df79b77fc8e3d44c8942b20-1.tgz","fileCount":32,"integrity":"sha512-fj+nk3NGejetpfv/mU7DneSJgIMF0UztxXBBMSG79RLXXg9dIxziVaTACI0DwLW1dfXK5MPnPWtvHoYLpUOdyw==","signatures":[{"sig":"MEYCIQC4kRRWEjw36pdMJdwBpefemetgAqxAd6gEpMymjaMwCwIhAL/FgLwVT1SF+4dk2GxK1FHsWichY5BIUkJIN/QLsKKX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjolyNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmogdw//Snn62FiSV/QjLP6lGeRuIxmyZNwRJ3MTDMQycXY6YHrzB3uh\r\nQGmwhfvbF9sUw1+RM+tjbmDT1zqgwA8h3PrnBlrsWCVsRo3d4LnF4F36DAef\r\nv1TXi3wjqBQG+GmbECkhDp4RCVw0llkGClNkOwklNrH37Nyk9223x0/LtS/1\r\na4qbkPY2CKldNsY7ljoUzgebQyVBh5NPVanAY8nEbcQyRnaBgkO3+KjhLNSz\r\nyIVGojudbr8Qjb6UBoeBcKjHf6DwE1U+T7isBerf+Af7nW4Xu1PSvn9bNbo7\r\neJnKTUOOso+4ncxfw/faTS50C10d1TibzWYBSAQH8DSaJlUn85UsnpV6xNqe\r\nBRKoEIlvMiAQ4c9dXxyVMz9hWOTbA93ZlcE12mUVxC7Yk6h7iQlkucTzQoiC\r\nJj6otqIpswK75Asj0uGBITYjVixQ7jI5fRORNcQf1DDdZcQzKf3f3/xZKnaS\r\n5eTb+s/5PcVHJT6SmGnoFOJYKiAC4HZsLpmR9KH/cFJ09PdGliCodegK8MWn\r\nFW8ym34t/fuceA0HH3sF73A3cy5yf4Snt2s0DaRC6BLy116tpZsMHtqDUVwc\r\n4+tZJL3xoJSDNmPA/GaRiDMOPhm5C/v5TDO0nPDx4Ab7uHDQbRAPfo50bS1K\r\nZ2gjfEn5cQbzeRcCEtmThpxq6HuQX6WBYn8=\r\n=lHtZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-ee9f7080b948c9754df79b77fc8e3d44c8942b20-18.x/balena-jellyfish-client-sdk-13.4.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-ee9f7080b948c9754df79b77fc8e3d44c8942b20-18.x/balena-jellyfish-client-sdk-13.4.0.tgz","_integrity":"sha512-fj+nk3NGejetpfv/mU7DneSJgIMF0UztxXBBMSG79RLXXg9dIxziVaTACI0DwLW1dfXK5MPnPWtvHoYLpUOdyw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-21T01:06:54.577Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.4.0-build-renovate-axios-1-x-ee9f7080b948c9754df79b77fc8e3d44c8942b20-1_1671584908702_0.7962225769984688","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.4.0-build-renovate-pin-dependencies-7731ed7b5febd1995786a142fb79249bd12de385-2":{"name":"@balena/jellyfish-client-sdk","version":"13.4.0-build-renovate-pin-dependencies-7731ed7b5febd1995786a142fb79249bd12de385-2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.4.0-build-renovate-pin-dependencies-7731ed7b5febd1995786a142fb79249bd12de385-2","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c7b3c23b72703439f1462916f5967669a8aeec25","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.4.0-build-renovate-pin-dependencies-7731ed7b5febd1995786a142fb79249bd12de385-2.tgz","fileCount":32,"integrity":"sha512-DOmSG9spo7LagY1d4rE1R6+luExIvay/7vrpEV+7h9sCIY3CzYmfdeo/FhuqnCj9p55uegL7EOPJd3YPLAHVNA==","signatures":[{"sig":"MEQCIDdyuH1DyNLCh8JDRuwOxUKqK7Gs7Ttzsz1IM93o8gWfAiAOTGV1amnnNZfVtH4Xr1BKw1c8BV/gK74O4rAMaYQUPA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq+Z2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqCjA//cUPrtZAHElIbkc3003y+fe4ZeFjS0a0wz6m4jIhYYcdK234v\r\nV8Tw4dybPvXWybTlsfyfah1SguxkdWlQUdtjBykItgyQQkZwisZBxDFfXY1u\r\nuWzE2TJy5xaBwGOzy+9IbAYYRIHbsu1V1/AAyb0yxTA0j4u8CYjW8DnRFVnD\r\n9t8krFd2wnL4xSNM2N/leWszZarNVlFO8pkMqLiNdRwVx7TQFTbcQw9Sd0Y1\r\nsapvNCzQ8Jek4K5EpIUMi9krQ5mKQCCDEtIDFgHYOd1ah1qiuXTvqp2xJBio\r\nNM5B0nszY1GqFV1QgwwkyBOTcxNLZ974Txfkq1LzSWrHkLk/EgLVbdRmskPi\r\nsUwxuJdO4R9FY9dtmPeq/lAVNcz3uUWicim/Zi+RVT8T0cPPLq8eI8hX0aVA\r\nPEE+EmMMeH2WBsz/pxP8xUQoh7qvqqn1yThRScCs4QT6E/HrYnXap+YJM3Y8\r\n1nMa1jP5w94YIDn9gbWAOr4fyyaQ0guu0/JJ3UBLK9lOiMWOInnPkjg/Wxdx\r\nuUbfDsQyCME/BWUCmhP8QV8Arbmwn76SVBJZfojtSRF6yn10tJzbC5AZb9sl\r\nhHsc6Jgwp2u+2lpmpGIQhl0z3vfDrxun9Wvg/8jIHTXoTZLPCbFMqRiL09/G\r\nfHMftEYdkipcdm8Br0VFJHDrh3Zck+sRaTk=\r\n=nEzf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-7731ed7b5febd1995786a142fb79249bd12de385-18.x/balena-jellyfish-client-sdk-13.4.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-7731ed7b5febd1995786a142fb79249bd12de385-18.x/balena-jellyfish-client-sdk-13.4.0.tgz","_integrity":"sha512-DOmSG9spo7LagY1d4rE1R6+luExIvay/7vrpEV+7h9sCIY3CzYmfdeo/FhuqnCj9p55uegL7EOPJd3YPLAHVNA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-21T01:06:53.887Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.4.0-build-renovate-pin-dependencies-7731ed7b5febd1995786a142fb79249bd12de385-2_1672210038521_0.4119857412002905","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.4.0":{"name":"@balena/jellyfish-client-sdk","version":"13.4.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.4.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"37b013135ddf514db8f27fb30be62a72d43e482c","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.4.0.tgz","fileCount":30,"integrity":"sha512-UF89l2aEYKyDFF/r9RY6q5DKhWDLtP+zOb+B6aAzQFHEaMXi4aEeM02DvvN+JGfGeo/xhnjqwRTt9RwqU9C5lw==","signatures":[{"sig":"MEYCIQCJ1YGDDMCvQsDnMnayuNJgkcYXM4P4EzXLnfkecaCdewIhALB/ScOowPBi5FK8npJRKs2P2G79q15p23KiXIhTZwkK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq+cBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6GxAAkUBUc7egvq/JBw19sjMpD1qyLAC1RTlytyxgasHXQICV//8e\r\nQDR0y5cekzzivUC2xVg6Z9XNAbRAQUNW+tJSLhtqthn7khLcQCBI+D3TWke8\r\nmf532A+RXzkfsNMl9Koa2/wVrTcMaaFQgPWhsdEUR+e+g+Yhq2XEQJKLzYnO\r\nkOujCa7x4M4H+/cOqmaerUFlup8njFjlDYyuswH0ZnPsFV3EtS99tm7FfssU\r\npZoeveT4W1jtBhstZu5OodNGMZoApEuyKWI4tB+L4yxdj+PdfDwe+UVAzDF2\r\nAbHnr+vvtq6aXML4NAlUpRf5E4mCPb5djfPtDQvNx6P3MNv4pY3w3jyWNT2w\r\nPu+pZmshXnOd8CSkVBS7UjL3K7E7331oLhY94U+MFXVSaUzWct7a6JOyMq/9\r\nyW9noW+m4m+RocRPxxUfwdFm8jlRmaMrRaHb656zrz4rL8iEsAlGQg4yqdc7\r\nvFFxt5nFFwglIsz3DWIbGPjujx1rQx4swXBcc1Lvw99iGhW5jtKOoQZFIWAy\r\nRG2rwf+Ma11SH94G7LOGB+MM+b8g4mCG2n7qSoULEArzoIHk6/pk0FW8+O/1\r\nY6gyedPW1AjuWcLi4dA2DYuaaOKX3gsdXnn/nFGSS5GOdz+TqCNiqWQKiMPm\r\nyT5tUo460IhJ4ktX9IXPyHi9pZ0+xOrRjDo=\r\n=d86t\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-7731ed7b5febd1995786a142fb79249bd12de385-18.x/balena-jellyfish-client-sdk-13.4.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-7731ed7b5febd1995786a142fb79249bd12de385-18.x/balena-jellyfish-client-sdk-13.4.0.tgz","_integrity":"sha512-UF89l2aEYKyDFF/r9RY6q5DKhWDLtP+zOb+B6aAzQFHEaMXi4aEeM02DvvN+JGfGeo/xhnjqwRTt9RwqU9C5lw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-21T01:06:53.887Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.4.0_1672210177566_0.6070811356232941","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.5.0-build-renovate-axios-1-x-b6d073354c4314a43b46ebbf67e86f24defdbed9-1":{"name":"@balena/jellyfish-client-sdk","version":"13.5.0-build-renovate-axios-1-x-b6d073354c4314a43b46ebbf67e86f24defdbed9-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.5.0-build-renovate-axios-1-x-b6d073354c4314a43b46ebbf67e86f24defdbed9-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"24d772fe70f9ed0b0c27281d0ce07911b1b8d3d0","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.5.0-build-renovate-axios-1-x-b6d073354c4314a43b46ebbf67e86f24defdbed9-1.tgz","fileCount":32,"integrity":"sha512-NMkZdNXXcPsoU3EaKrqA2xoXXbPIIWmuw4dSq3mSUFlelH3ccIp4+r23lTUEbgakZvz9pFP3UUaQ3igmBlRNhQ==","signatures":[{"sig":"MEYCIQDHo5jX/g+IcnRNUO0Td2aLgeMWxWR9jUST8YvRcLwieQIhAJRVGcjG8MVez4yoBWBGDFrHKy+lqcZx1E4EJGDN00YK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq+mZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpHKQ/+LMl20Mij4zb3sSvRC7uNoublwMrgHUw96FqpyYJB1xKvVSTW\r\nfmUA0FroGLHRe+Buxd4TLcMaRMBMj1DYh1rmZYW/Sll11NJZNk0d1eHmUDey\r\ns0VkHKTPhmN3T/BHvyiaQw+5lIKdbU6DXIaTjCkpufANW3H4r4N7FJ+bWEAS\r\nK7AEhysC7hCur+XXfyPoN+mdmGe5n+73L9S1YVgZ6tgN4kOtGoYSI+Vj5J9S\r\n0hytBc7gJcXbznEB6UVeVASGUKjS732ToLdbGrLA02JP/qm0D3wEgLcdD9XX\r\n+LlWEnnShChNoc8zN7TomM6YLlTWkoFhLS3nJDTazF34E8NT1vgW57jCpxb9\r\nw2Lt1NcEmQKGL0LjOURM+2GnvIX/YXHL1ZenKf5VbfMeEK3iyV/lajpkA8+7\r\n6GTAf9tIqanPPHCj/W+zb3MWEYtfpLlMOGyhErTy9XFigXdJveb4FlS7XzoY\r\nMHls3U+dNYWyNqZtFTww5FzbFGXU/Cim45ZZpnPANISjOr20TmBYDucRzRgm\r\nvvWRjqw4b/GLaqqFCSLUNNMEUYPDyVO8AiXhLzA3TVKLe0CpjjrYKmpgihxe\r\nJACSYKox9bvw0MW8umKPO/n5K3BO+noZb2/1F4il/xR+cR2gGRlC3I/TDrZ/\r\nsRoENbJSAoeW4tCwtNbuiEVeAI3wl6o/yXY=\r\n=J/XM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-b6d073354c4314a43b46ebbf67e86f24defdbed9-18.x/balena-jellyfish-client-sdk-13.5.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-b6d073354c4314a43b46ebbf67e86f24defdbed9-18.x/balena-jellyfish-client-sdk-13.5.0.tgz","_integrity":"sha512-NMkZdNXXcPsoU3EaKrqA2xoXXbPIIWmuw4dSq3mSUFlelH3ccIp4+r23lTUEbgakZvz9pFP3UUaQ3igmBlRNhQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-28T06:59:07.914Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.5.0-build-renovate-axios-1-x-b6d073354c4314a43b46ebbf67e86f24defdbed9-1_1672210841660_0.7194474552889036","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.5.0":{"name":"@balena/jellyfish-client-sdk","version":"13.5.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.5.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"be6309711cdf3a4fd08ecefadde07378ce799009","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.5.0.tgz","fileCount":30,"integrity":"sha512-BDnR059nXHEzLbguF5SelmE3OApGd1/1yCpUVgjIDRhdVIZenTCJVjCc+J4bVNeGbhl2hOZV++WfOu2zvqzE8Q==","signatures":[{"sig":"MEYCIQDhhxq4W01NBcyS0P4aHqgZKBHjD3Yai09TwjEZ/CmGKwIhAIIJwk7gL/hWw/P7U09Ia5DSativGtyrdMMXa82AvWWI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq+olACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXNA//ZX4JNuzokiMXP3E5zbzMI8AO0gM2d9+29M28HcHPleW0sCjN\r\nZuXlkzaeftaA4c/TadTrxw8IjVIWGl7ZVnPJiUgFvgyl7zZAk1eTwDcl2HtR\r\n3hKea6ZOLpFZ0FtFlUsCrVFuNlnScSXSxKXjIYz58osS58HG9ARv0zDUgcVJ\r\nzYV45FOR/j5GfqAbcnqH624eUW6E/8ecUsANiQIMO+ZzQnstwZ3pjccwq8jQ\r\nASk2qh1SBhU0Q2LC5WsthTnQdpME41Zf6ctxcjoPUePONwmRo5FwoB6Ar3Va\r\nKi7eq8KHbH4ZNew69uX6tKdm8IoKrZdjgT4LJqLS/v0MlRgsupwZXWdF9c6r\r\ncwSYfRa4Jc06zAsKingOiSyMs4HW4mC4Kw1FNmWWmSkAULpZ6kCq4tLweyWl\r\nW110vFfGRY8klKYOFwUxOpPKBypDX7W2Xw6dJqFAOKM9U3xogqY/XHCBxtEx\r\nCqN5PovKCV25ZjmKV839hLnhyUZ28in3pinQkRPSbKNfQkGf36xH3vvIfWh2\r\nj2236zi5GPinI+caXZyCORpm4axi+mYPlqQ003AdA3QFqm6BQ5Ebt4NK/FuI\r\npqhvfB8z7TqENTE8LjJUAopMpYwmofVBjOs23UrarxW3v7qHPebkai7AwjaB\r\nN24/4ogr3UmmmRXVZclxBag5D2UywA2KMTY=\r\n=mMFD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-b6d073354c4314a43b46ebbf67e86f24defdbed9-18.x/balena-jellyfish-client-sdk-13.5.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-b6d073354c4314a43b46ebbf67e86f24defdbed9-18.x/balena-jellyfish-client-sdk-13.5.0.tgz","_integrity":"sha512-BDnR059nXHEzLbguF5SelmE3OApGd1/1yCpUVgjIDRhdVIZenTCJVjCc+J4bVNeGbhl2hOZV++WfOu2zvqzE8Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-28T06:59:07.914Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.5.0_1672210980839_0.11109082191863795","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.5.1-build-renovate-sinon-15-x-80d7adf1e1e699d295700895fd5776e63e8d0fa5-1":{"name":"@balena/jellyfish-client-sdk","version":"13.5.1-build-renovate-sinon-15-x-80d7adf1e1e699d295700895fd5776e63e8d0fa5-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.5.1-build-renovate-sinon-15-x-80d7adf1e1e699d295700895fd5776e63e8d0fa5-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5b5127f3bea6a2e7a4f235ccf2409e214e005373","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.5.1-build-renovate-sinon-15-x-80d7adf1e1e699d295700895fd5776e63e8d0fa5-1.tgz","fileCount":32,"integrity":"sha512-RRyEAfKL+ZgyF1X+RvlqxXWorC6dg3yjwhKwD5wf6A3RYBMrOfLdSSN+Dj4DK8ZP8fCVVsbZmA1bZVKkBzivGw==","signatures":[{"sig":"MEUCIC3E5izTEWl6nhTZvRSG54mx/FHBK3pRVY44TQoQFtNFAiEAwjkd5B4ZV2UnHliO0RDsreEi+h2otGH0hhBShww6mV8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160151,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq/TXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqU4g//X6uTeDbNmor7eUoucNVc8qUtu7YA+LBMiPWaVDdAbLyCuKm2\r\nt0Z2fWEWF3b6b28teA9FDmkrRh1ict8PzZd/emEjPO6eh2dUz//sup0m2MlJ\r\nXtTJg3movLKqPYWoa+0ocTEH9iXcIBTpGV+BrVjRNKWlixtxMZmsmoM+ZpkF\r\nxwqHWyu+yeJZAJJm6mi9qgoe2Xite2bfGyUDj7jcQXp9KVWzSBFaP8ulMGDE\r\nJBf9Y3pD+4GY3t3oDeB4wejTFL/KwQVprpsZW1L3P+j9nhaDT4bX/nW0MEpo\r\nUajHCNGmLmbuqDTOSlhPDg32NihDF9Yltowgu58ETEpe0Y3ZRFo4HNahinYu\r\nHjjQ/meW9EDqcIDEkSGxk8agQlQXaiLtNTXJNGkQ+zjDmSHqxE8Awp3HZfmB\r\nOfzQThk8k92Q2MfqmU27sG4oZQQytK6IYeZD1CH3XKXZdnosPXthhHYwy/pI\r\nY24ZCMWVuTwadmY3qYMntNlj6BhFjmAsiBjVHDnm/AppKlSus0F/c9S0Qq2t\r\nlZABa9E5+N1/ueSJKmogvpmxLpmLZKZmR6zGsmcAXaY6PzBCevWw93fBCDdv\r\ng1cNm4tgF2skGb1sxS7C0SkLxKSCkXw5hZX0hmi5ucSy626IhUaPW2rt9Jlv\r\nMdRCjxwjH6Rs2WUeAIstwanlzdD+33SlPVM=\r\n=J7fu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-80d7adf1e1e699d295700895fd5776e63e8d0fa5-18.x/balena-jellyfish-client-sdk-13.5.1.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-80d7adf1e1e699d295700895fd5776e63e8d0fa5-18.x/balena-jellyfish-client-sdk-13.5.1.tgz","_integrity":"sha512-RRyEAfKL+ZgyF1X+RvlqxXWorC6dg3yjwhKwD5wf6A3RYBMrOfLdSSN+Dj4DK8ZP8fCVVsbZmA1bZVKkBzivGw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-28T07:47:06.674Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.5.1-build-renovate-sinon-15-x-80d7adf1e1e699d295700895fd5776e63e8d0fa5-1_1672213719635_0.6299952145916019","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.6.0-build-renovate-uuid-9-x-1791df0403a6afbc87046baa372361e1c880e4ad-1":{"name":"@balena/jellyfish-client-sdk","version":"13.6.0-build-renovate-uuid-9-x-1791df0403a6afbc87046baa372361e1c880e4ad-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.6.0-build-renovate-uuid-9-x-1791df0403a6afbc87046baa372361e1c880e4ad-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"28309e6bb17ffe87024bc8703aea56b963613f48","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.6.0-build-renovate-uuid-9-x-1791df0403a6afbc87046baa372361e1c880e4ad-1.tgz","fileCount":32,"integrity":"sha512-ZJWOEdYqpRQICvI3NvYBGINJUA9ZVpJowLU2jYR67fDxWq5zwnwGqxIPtL6jfssVJhS0OAt3HrpbONAtT3Y1vw==","signatures":[{"sig":"MEYCIQCipId3YHet5NasiN8zIbvOHaWfQ0ta77NT8EOF8lTdtAIhAOZXHAmlr/efOhIivEGyy2yeogg+xUL9Cbg4k8E10it0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq/TqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWfA/5AHYkXSscX2CxqIw/oMWWSoBWy3JdkxnVTZ9of+/46VTQuCIL\r\nZ6sJTR3ftEfuFGJU1CRrrCRteYFWY3RhXaMnw7H0OCLGkBtEPcwuw28RMjS1\r\nIu21Wxlp+pl9KPP9Vbb0GU0iTPdQ1cLw1BqfdnbNddJ8bmuN8J3y7jGDv+w/\r\nCWRFVez1q20UpgCrWlNS9gkKzee5cJVtcPAAOzG8WWf3Qj+lauNxMbP3dYos\r\nPxqWKPHdJ77iBsw3hbZEUWv+gtmQLmp3MRWw0tESU2vyk4JzUn917yHYAKUq\r\nudaXYbF/bvBwEmN+Gy7DF1Lpxou5k9kfEmtAMIVJ3fBeQqfmutoDuuU7uhI/\r\nf3rTcnk2bxTWmnLzmU/7G96ZvjXGWY/h4gDo+zEO6ni1PVkl0OKbrQ26qGzt\r\nZ+gPE5UZ5gUjew7741uwgQxqmbYJPUIDN9NrmdWIk9AFJPYJqV8eIyrFWb0c\r\n3eUUUjuTMOKIvLPm5vkwpOCCetKYv/i86kdRzXH2Rj6elu3Hg3ptWDizjXr3\r\n7lfp+wJkYCUBgj4jHtt/O/2M4o8uWTj783tfXnproxU6Y2XPx7Pzs7UdadsE\r\nnZAravYf8lHotf76B89yci+KB0P3pM1G6ckHMbHigvoHUdBbznBQWb4ZCAro\r\nWtYwIkuMxdEwWhanLk4cgKY53EdwutY6cTI=\r\n=7b4S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-1791df0403a6afbc87046baa372361e1c880e4ad-18.x/balena-jellyfish-client-sdk-13.6.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-1791df0403a6afbc87046baa372361e1c880e4ad-18.x/balena-jellyfish-client-sdk-13.6.0.tgz","_integrity":"sha512-ZJWOEdYqpRQICvI3NvYBGINJUA9ZVpJowLU2jYR67fDxWq5zwnwGqxIPtL6jfssVJhS0OAt3HrpbONAtT3Y1vw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-28T07:47:25.326Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^9.0.0","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^14.0.2","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^9.0.0","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.6.0-build-renovate-uuid-9-x-1791df0403a6afbc87046baa372361e1c880e4ad-1_1672213738362_0.9694651783920205","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.5.1":{"name":"@balena/jellyfish-client-sdk","version":"13.5.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.5.1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"57fd6df2c7bb22dbee40e77104412cbdf726da27","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.5.1.tgz","fileCount":30,"integrity":"sha512-qdPFFBfF+cFZzde2UQnwgB6Q68h3YkJcKL+Yq5eIzQ2YlcZawyntJug2TvUEWeepSe5k3YAUUUthCUKMHd5IMw==","signatures":[{"sig":"MEUCIHZgBoiaeRKgZWQSjUAOKD57uE4uXSDSmSaWK1hChW3yAiEAoeMTisiVn/767FQhuCglRjd81LM0xKPBpv9iRZ2BPZc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjrAKGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpD+A//W4cxxP/NESRpqpAQcGv9LH3WSzEMYpGtdC6ClaMpptHo0GE/\r\ns2gLh0f8dy2AACtGbPJl86m5HXkpctJIlcjDYj9Hbx3fTn+TwUO73bHPpfFN\r\ni6xu29/wxbINiWBavyeDTr3f6DhxefmyTohI4BqIgWZY7vUNrlaliTx7CeXs\r\nL6mz3YzEbnEJlIgyO8qbOCanirzEFHZHyGL1Wm9py0KXeJqCOrHDLEY3wyrE\r\nHX1TdcNc9edm1gLHgjmilJ+d+ynsermIXb22zPJla1reLtGJxQm8vhWuWFVa\r\nFYUEbGYEty1LkaK+nzEMPrrxULut2bq5KkRyJM9lctrlBkqXSGTQBlBqxM4T\r\nCitS02DMxOtJUua5kEXbInfJMpWlRqcQSCxxrRe/2kTWLzNv5y9Qb9ERRv+3\r\nbnnqInyCBjRtNyUXyHBpxkeMceb5GzpdLsnkDWRj7UKacIYjN3PVLc9psOrf\r\nHNnnGct7jV0p+e3rUIWlZyCX91ONGiLqRQUITDYaZf6QAoQjDUy6pHrfskWA\r\nxPH7pntqAVjLFhwELZt4BrLyIhn38VX6XOvfkNqIMd9VdBfGy13SQyB70PP5\r\nWmslrgkxch9uYBAMBUZDbNF4CxS0A7u5rQzER2ITv7I+T/+lkOElfzQIg7Yi\r\nCWL0PfiLlzBjihypez5BWMYexH/R00sqRRs=\r\n=G5XJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-80d7adf1e1e699d295700895fd5776e63e8d0fa5-18.x/balena-jellyfish-client-sdk-13.5.1.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-80d7adf1e1e699d295700895fd5776e63e8d0fa5-18.x/balena-jellyfish-client-sdk-13.5.1.tgz","_integrity":"sha512-qdPFFBfF+cFZzde2UQnwgB6Q68h3YkJcKL+Yq5eIzQ2YlcZawyntJug2TvUEWeepSe5k3YAUUUthCUKMHd5IMw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-28T07:47:06.674Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^8.3.2","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^8.3.4","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.5.1_1672217222134_0.4221839405147454","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.6.0-build-renovate-uuid-9-x-69027734ac8578f09bae0c4adef1e752fc3ac060-1":{"name":"@balena/jellyfish-client-sdk","version":"13.6.0-build-renovate-uuid-9-x-69027734ac8578f09bae0c4adef1e752fc3ac060-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.6.0-build-renovate-uuid-9-x-69027734ac8578f09bae0c4adef1e752fc3ac060-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f4b774e2a6795ee13eaecf013bd9a31f55bc2e95","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.6.0-build-renovate-uuid-9-x-69027734ac8578f09bae0c4adef1e752fc3ac060-1.tgz","fileCount":32,"integrity":"sha512-L0VQ7Tu6TAyyJIHrMGRuyzgoiQL9z6qUkwRDZ3yyrKcH4TLwWdvhss34Wgsooa6Zq2Y7CYue1qTghwNFxub0VA==","signatures":[{"sig":"MEUCIQCPNwARzzlg655nKgXm+eP/KOXlvRj4qtcevGlEsxF7sQIgU7G2JS8dfLq4TP57bwhXxnW9wNey1mqg8iysiA0WEOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjrBDYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqV0Q/+ILLMgdE6E8w/jj8ip6sGeEibzMS+4YcDnSRJDmnyML3fhkZD\r\nnN6jU7Msb5uPW+PnLM3BMZUNdU8arPlBWEFWgri0YRphvD8+5CDgRAYDk14l\r\nnAETrF+ffzMqyAzOEcKRG+i80RT8xsM3EAQS8d8PL5I7X4n0g1QYytFbhCoj\r\nwb6xLQHJep+F2iJ7hkCH4zQZzRgX9yVMyAkmmSgq0WfaT+mPVUQXuMLaMF6G\r\nHBB0ecu6B2m17BN0cQGlfkFqfoqzy5jZou+AgvlALRNXlRAt4Ualts1ecdPf\r\ngHc1wq7GE2VN0B07iLGluseOQAIZ3OsPjt9/DwaS2Fy6J3A3KLkGFCZryOXc\r\nP2yAWNz6R6ZPu+PaQgjZqO3ooRRvu+QnfOh9jMsN7RgaU8/oKHFo2jG3jD/+\r\nS1vqUozv6l/iG+RydBmAGRKJgryCGgfz/ifbI21HgqFsAXPmT8Rhij5W5Ftt\r\nA5JDWLWay0GDBffJcCvUusjB2Y6Ewq2rz0KciSZOHTCqKlF+STPwOupLHUIW\r\nUQNsse27g1JnI7A3AiOVwZL28NibFvep+HQeUm1p+3Vuy08XMwpehLDhCNfA\r\n1iKEbo2IhCprPpuW2YFbOc97VTvlDi8YWiJbrbDCRYGJ1FSc7cPCIjZykl2h\r\n9J6S5TKLo8kTvVRRA3WNiuA2DxaOGOpu5Rc=\r\n=ezgn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-69027734ac8578f09bae0c4adef1e752fc3ac060-18.x/balena-jellyfish-client-sdk-13.6.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-69027734ac8578f09bae0c4adef1e752fc3ac060-18.x/balena-jellyfish-client-sdk-13.6.0.tgz","_integrity":"sha512-L0VQ7Tu6TAyyJIHrMGRuyzgoiQL9z6qUkwRDZ3yyrKcH4TLwWdvhss34Wgsooa6Zq2Y7CYue1qTghwNFxub0VA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-28T09:46:38.586Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^9.0.0","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^9.0.0","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.6.0-build-renovate-uuid-9-x-69027734ac8578f09bae0c4adef1e752fc3ac060-1_1672220887983_0.4920595357795432","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.6.0":{"name":"@balena/jellyfish-client-sdk","version":"13.6.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.6.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6701032cbe634d005c1f4132f0711a9e2bfe7957","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.6.0.tgz","fileCount":30,"integrity":"sha512-JgfFhWxyJKnBLtKYjlYd9EFgXl090ou3h6Q6pTJvLTsQt5/otWRzmLp3OyEWERtbkqmG1fAHDSq0go8kN5GoSg==","signatures":[{"sig":"MEUCICuraEjYQDhydfdSXLscc5UKHAo2erRFbamE3YmmH0iYAiEAy3s7wOxr7bEPtkksAGZObnxwD7GlPOq18XI4lAbADZk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjrClXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRUQ/9FsEttq3j1sOPcNHsv8Kj1ITehi35llk8UXAn3gsjRbVTP/Yz\r\nlwJY/tYMY8KxBi7/qYcmoPkla5J8kjNFq2J54fAPdLKGnOR0EZ5JijAjVQiv\r\nTs6BYHsaCXfT1m7JvGlo9lI5rl7jW6hJVvBOu3z2PnzA5NN/3wHOAepmZRW/\r\nVIZAOy4W6Z3gjLjyh6R6E+yLAZrzEW0bpi7ySGoVMlnkavwvnPXKR2T+dRm1\r\nSltVarnNi1hU9gPWgGoEFCg7Cl6qp8fUxn1SigES+CajiQp0ITrSD1aouoTO\r\nW1Q9Wq6Gf69LjAgTdOHYu0F7MYganj0qo2dHfhlUu1xajraxOmCgsyXexRBr\r\n3xxqxu+wD9VzWCxwGRRSDuWHtPspWjPV7F1PHvjFrFmmjXBI/QdwqjQ4b16y\r\nE0dx9Yootqrnxs0USGxNyiUtgr7WPThJaEEaieDvSIlN0/njVneaCxI4kFOe\r\nK41VsWkOWqlNvvjCH6bg4iL6UDFSsehl2MzNe9UZqt1HKebkK3iFqomCj35y\r\nwoF1dIiTuIt9voMgBV6+gSSN/zNr0GRe5CPp18hBn/f0+CzhulPA0GA+Z1Ob\r\nuZERXFfKExV5xextE/vhbmxxp52/EM/eNQIFw50Ujc8haFvlwNsMDS+rn7rD\r\noWo+JuGVRdFCL8djtcm9MVW7ETsuso7ZKt4=\r\n=G2LL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-69027734ac8578f09bae0c4adef1e752fc3ac060-18.x/balena-jellyfish-client-sdk-13.6.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-69027734ac8578f09bae0c4adef1e752fc3ac060-18.x/balena-jellyfish-client-sdk-13.6.0.tgz","_integrity":"sha512-JgfFhWxyJKnBLtKYjlYd9EFgXl090ou3h6Q6pTJvLTsQt5/otWRzmLp3OyEWERtbkqmG1fAHDSq0go8kN5GoSg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-12-28T09:46:38.586Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"uuid":"^9.0.0","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/uuid":"^9.0.0","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.6.0_1672227158811_0.7033536534441092","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.6.1-build-joshbwlng-uuid-d875952f4a7d29c57165984695f6e9b401f4b6cc-1":{"name":"@balena/jellyfish-client-sdk","version":"13.6.1-build-joshbwlng-uuid-d875952f4a7d29c57165984695f6e9b401f4b6cc-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.6.1-build-joshbwlng-uuid-d875952f4a7d29c57165984695f6e9b401f4b6cc-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"0fa3f3385f113e0f423f8c9ff1df15e77a0a06f3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.6.1-build-joshbwlng-uuid-d875952f4a7d29c57165984695f6e9b401f4b6cc-1.tgz","fileCount":32,"integrity":"sha512-OEUKzxYUVXWFbzPL7gQRVFl0IGWruUaDlFLLcc+96yvlrmNgDNsvaPxkHotHWac1ASt3Ab7Dkt9Qh44DV5igNA==","signatures":[{"sig":"MEQCIFsVQlAUyl9R1dPwmWSPvoIW/Dna+on5ETa3UjN/0MP/AiAZecSS935qkA+Qi1TyA9MOkg5pXv8laK9bNwRuepCcFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsVbPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqpLg/9FktunM2b3llCl9j7dtkQXHAFC13RBD62uI/lAwKGruxy1f2K\r\nIS/JJysshL/0qZ+QVTUeHMflYtX3Ytar9KzJ3i6xAxkXBUVhpiZaXSsEUGa0\r\nf1wv3YImcNfGV6OuTWgpwRUlMWpFIbwurRolF0tj8xuGVh7XLttAik53CIXP\r\nISvCt9vqeA5Ngy9vQoxjFg84+2X4R5ij7BQDOgE3Gh/4P2IdCP1DFaDbuJw1\r\n9Q8M52e1kLAzhSvCBaNwhxsC0NhOV/MWXIOWebS2cto5dwWnhprk6w8THe0F\r\n5D1CdOnxNF+M781WbRkgT0uuvuCCmOyrFrwch21KXc2igFJYO3SE+yzAJmRX\r\no4bss7wzYLtqRWaFbh0sXU7lEFmCwGoWiqHHf2UONqLonM9WflVmkr41jMkd\r\n47jwN9JSjnx46YQZQfAEzZKenSMh+x1nIHvBJVTIYe3NSevVqqHIO4qXAdmQ\r\nPkOf3hi51Jj1edVOz+ce/MjwtOYiiNyMUAT/A2ZOMRKpVDrxdEh6Bh2bHZuy\r\nB8sH0mRV6XpMd3b2rY6Sx4qktk98aRCv5wh3uxVw0L8rZcpu7MeaXBrrD40W\r\nXgsacBtbc8xp58rS3rJWtcUJXbsq4VOQaBj/lm8UztldGHXFU5maJTvEDL7K\r\n6VIPXWQ1CmDJEIG+VwDJcJaAFOWbXWxLKew=\r\n=xtvM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-d875952f4a7d29c57165984695f6e9b401f4b6cc-18.x/balena-jellyfish-client-sdk-13.6.1.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-d875952f4a7d29c57165984695f6e9b401f4b6cc-18.x/balena-jellyfish-client-sdk-13.6.1.tgz","_integrity":"sha512-OEUKzxYUVXWFbzPL7gQRVFl0IGWruUaDlFLLcc+96yvlrmNgDNsvaPxkHotHWac1ASt3Ab7Dkt9Qh44DV5igNA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-01T09:46:22.331Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.6.1-build-joshbwlng-uuid-d875952f4a7d29c57165984695f6e9b401f4b6cc-1_1672566479307_0.11783392920506786","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.6.1":{"name":"@balena/jellyfish-client-sdk","version":"13.6.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.6.1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"8196c2e4f2f763ac70574d1602ec44d21ce9809f","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.6.1.tgz","fileCount":30,"integrity":"sha512-lBdp5ZG784KIL+KuIiaiFBaimWRqphVfKac0ZdtEobhHZYT8y4F69DsiSuIyas7F5rQXbm91PVaCHpvgo+iblA==","signatures":[{"sig":"MEUCIQDGzmBqjwafNm44sv45ucs4puD49vf9H4iK1tpd8ko9xwIgKh/7wZaTWRmU7ao7meDRAcDrblCYI/dyTec+i+gdfxw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsVdkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3CQ/+LMGhg+BI2+7v8TWFJPq97agO8it7bs2hYpmjISFLlE1xOxjq\r\nb3e5zC/RNqP1wJEh3pRYM4zXaqQl4j9bARDn8X0tY1VfB+e7WAraQDB0rU9h\r\nP4C4Py6/sM1z+jEIfIdePnTo4cYX4JwO8R4q88H/zFMMqr/5B/PC/0Tv69nb\r\nF5rsT5abHIaeJY3Pkj8mMi+1vmSa5s6ryUfsXgG++0H8iMDalXAXnPt8JGCr\r\nSdYkQdFjxXBtg8RPaqTHR6U6kCfi98F1equ70IvgYmHpYfMaduAOwkyiFZ5d\r\ncYSpMJS8jromWsPIpH41ZDmuSD5gYXLTdT3q8cu8TdoIzEwxYlrqoNxI3CBl\r\n7uN91pjU9daquErQnTbwNyQEgOA7eCTWH30fBp2yu5H4+Gt5FOQs4XHyLjhE\r\nMRgIVYI7+oZcbrwjkHY3PYWFj4FKQHrA0egL4BpDfR8Z1nyTBauSywn2ItSh\r\n/436EAiK8LGEa7o7Xgw0DWNhcw4J37lBCTH9E+blMbLAhveMw9DzD+jLzM6e\r\nSkR9bhuUoMgk6x+hgirOJ54Oo7lY/gxzxDR9snzx7FpvKHP7lGhFg/67EEvh\r\nz+K8glRQ5+KbrlEaLOb/1HCSTrC/xSUUWNp+Ffc+fyPYiUrBoflc09udEiMp\r\noaISHYKMqahuRLQgXhfaGfs64mMyAYQNJU8=\r\n=iR2q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-d875952f4a7d29c57165984695f6e9b401f4b6cc-18.x/balena-jellyfish-client-sdk-13.6.1.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-d875952f4a7d29c57165984695f6e9b401f4b6cc-18.x/balena-jellyfish-client-sdk-13.6.1.tgz","_integrity":"sha512-lBdp5ZG784KIL+KuIiaiFBaimWRqphVfKac0ZdtEobhHZYT8y4F69DsiSuIyas7F5rQXbm91PVaCHpvgo+iblA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-01T09:46:22.331Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.6.1_1672566627734_0.024081710301951498","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.7.0-build-renovate-peaceiris-actions-gh-pages-digest-4d45debc54935364c97f554bfd1c2378666ac97c-1":{"name":"@balena/jellyfish-client-sdk","version":"13.7.0-build-renovate-peaceiris-actions-gh-pages-digest-4d45debc54935364c97f554bfd1c2378666ac97c-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.7.0-build-renovate-peaceiris-actions-gh-pages-digest-4d45debc54935364c97f554bfd1c2378666ac97c-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d1932dced44beade9b80855eb0c700769aef6dad","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.7.0-build-renovate-peaceiris-actions-gh-pages-digest-4d45debc54935364c97f554bfd1c2378666ac97c-1.tgz","fileCount":32,"integrity":"sha512-BQblsGk6mqr/c2GZ11/7OAV3Ny6tDeRu3+NaJhNIDY5d+BfIkxUWz57LxC89dCBrhflNFBuDHh+koRVgPQb9RA==","signatures":[{"sig":"MEUCIQCnBU1u/QzKVh69p6flZFuKjchXEghS8QfHF7RIrPJm5QIgQo4S1Pjw0/3+5MN25jCSGxy3QV0h/iKdxnDecKZS5GU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjttVPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoelw/5AF23mjxEE8RECBJB3PV0TmmXRS8FVwAD8t7ntUrXs3LWTbaG\r\noMoFtQEnJJ4f6Kp9ahGVVroTCL5uccHrz75cB+brRVJf/XR9w0nlZaf0P9IS\r\n57Tg+bIIX8lz/Y0wvFiMW61HlZ/vQ7x9YKxEofR9Gi/iKQlwqKqRiEA6OTw4\r\nSwm43eFUbjivkjUTFWNv1KN6RIezx6x5cQapGt6HxEwWXAUmKPPrePgo833j\r\nedHlIuQ3/GEEIaY0hXGihqUHR5d92fiLTkRHtfscU0/7yDbvJal5lIoclA1E\r\nHM5EuJ0pGRdC+kb2B603b4O08/YfAy88omuphCVlKdWn3C5loW0O26n65Y02\r\na0pOtOTI50CntjRfMwQkyHjJ1nYOjlkN+lfnywp0daBSfK9XSGAyodqjhG3V\r\nn/NVgDgs9skoBjfUB7Pe7emYmqT7Y7WMnTWJN5GBoZvYgRVwsVocHgpd2nKH\r\nPrcjkXjI2c/PsBH5xfj0Q71ACpAw43cH/3C5ewP7T46bUM3p4eXJH8pMwiwR\r\n0+M6jQOQhh7oBA11rWjVG314HRFHVT1YUuFvELFrZ6XYiYmNjHpBcVx9RkgS\r\n2pQUYFo3hrg72wnpNfVQV3DhJR7skYvqSfeZ/CpVYNmBjJqBzxQU2m75eTgz\r\nZdRT1zsCe5F5L3zkjvVfO6jXsCePpC9lzOc=\r\n=Oui3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-4d45debc54935364c97f554bfd1c2378666ac97c-18.x/balena-jellyfish-client-sdk-13.7.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-4d45debc54935364c97f554bfd1c2378666ac97c-18.x/balena-jellyfish-client-sdk-13.7.0.tgz","_integrity":"sha512-BQblsGk6mqr/c2GZ11/7OAV3Ny6tDeRu3+NaJhNIDY5d+BfIkxUWz57LxC89dCBrhflNFBuDHh+koRVgPQb9RA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-05T13:47:34.733Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.7.0-build-renovate-peaceiris-actions-gh-pages-digest-4d45debc54935364c97f554bfd1c2378666ac97c-1_1672926542819_0.6291290373387202","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.7.0-build-renovate-actions-checkout-digest-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-1":{"name":"@balena/jellyfish-client-sdk","version":"13.7.0-build-renovate-actions-checkout-digest-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.7.0-build-renovate-actions-checkout-digest-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"a352e954c093056726af645baaa31c0f18cea305","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.7.0-build-renovate-actions-checkout-digest-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-1.tgz","fileCount":32,"integrity":"sha512-uHrE93Naox8yYqBc+l9Dt9ePPZfTsvzaZqGu35QbgPfHev6NjwcoLRCP2WI3Sm0tTPQGtUDKrhG8LDmz4Vf9iA==","signatures":[{"sig":"MEUCICrIkpOAMOzawAdH2fikE9Hkkguy8B7wYfRtk4RnJ2tTAiEAi3lBdLbHHfstPl02T/YHDVogH0fIBSuRdDMDxTKWtng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtuOsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+aQ/+N7AGxctjMyiZsYK3WXa3rgmQ+QLDV2I1ZXQBIqsEuuwfNJKs\r\nCrA+6rfpV/3nQjuEDVoXyiIIlfJi+35UA0+n7/NWPxu/XmeJX3Hzmex6HMPk\r\n5Oh4weHOqFTugYDto7f2ZDzS3cTTFtwXy9pLP3p/ZD5yIzDRDu5gRmd0fHhf\r\nk563KNAZKeXjiqf0ZXFm5h8TC3NbxI8W5wvAO+iS6rCQQCVbMzJgiAUjbD7n\r\nHzTvlk2aQd93sgVCrEqoBxX18TTb6CBc8J6MZgWDeGwRFDv/3dFGMUDxrgMJ\r\nUFN10Y1GkgdBd+tRjnuM4EDCYEAmYLT5YfBtjRy6HPlLWoK62NouRWoB5NyW\r\nz3oWzJl0nKy74gL6KErA7E+q3bApa/9PLCZjgtchsVM1I0Mqxf/+xfDQ2crk\r\nn2VEvbjL/SokyTTYcFY8ITjv9gmhRm+vF0InE9B3PwT07jjjX8HcZbUYu4Qr\r\nkR+wPPDKqSzKb4GSnXolwvNc0NdTEDiYOz/D6x53u6nyOwnvYjmmcI/qYU6o\r\nVOps4toF6FahG5FhMaoy8xBBRxKeV+lrpqW466w7AfvNLkja3rCQW/J1tj8Z\r\nXEV5FgieHoKswAiuFTh1ElmSUIiovHbLNvaMFYuxVKCY/6oXLcWUUD2qQaOn\r\njsol6S8AQChWinOMbfu/veWzBD/GJ3H/93k=\r\n=qQtg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-18.x/balena-jellyfish-client-sdk-13.7.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-18.x/balena-jellyfish-client-sdk-13.7.0.tgz","_integrity":"sha512-uHrE93Naox8yYqBc+l9Dt9ePPZfTsvzaZqGu35QbgPfHev6NjwcoLRCP2WI3Sm0tTPQGtUDKrhG8LDmz4Vf9iA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-05T14:48:40.502Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.7.0-build-renovate-actions-checkout-digest-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-1_1672930219798_0.31562078619274714","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.7.0":{"name":"@balena/jellyfish-client-sdk","version":"13.7.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.7.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"3947264f88cf515c4f9396de844d0c374ccda21a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.7.0.tgz","fileCount":30,"integrity":"sha512-v9zBIi7vPRlcCpSTt7msfqZh1j6+5WCjIQtRKSv8dUdnbT1KySbhSfequ6+BuAsUKoty6tcGnDtt0TGpm9DXBw==","signatures":[{"sig":"MEYCIQC2LqGKVViXkBnTWVVmLvunBkXF6HbXhVVc0pHTPYO+FgIhAKHghT3XSRQQJs83rDIF0QkY+Npg7mTVgbSSOIJNpzrD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtuX6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6uRAAnIYZhp7QDnitruKoEF0VvybAO0hQn3w7h8GgO8boKBbmMpdx\r\nyE4LhOF6AMAEgyzb1qXun0aymKE2coWty4VlALbSN5DXUhJztFdqrRqOIIG9\r\nIqGfvfWtOZUW63HpdyjdQTqBKgNPNus7y4ypj2XQcPxZZ79MC99nZVDJWktL\r\na1vRhuWC8apTlW7sRiEMLEIgvO+23eAO3S6b/1tFOlUdD/UlhOUJ1f7SryBw\r\n2FC85nQyTHKJ8ya6iIomC4P3Mhg+oK6lSQcdpISM5JhxXO88kCH4xjgrWCbO\r\ngkvGFQy682AhEo8AS92jsxcVqiQNHyqukxAtUL0sLt1aPUc//wCqL3rVRsiE\r\nJ6S3Hd7p1A/FuRkeYR5KcDYU1oCEZEDSseSISUfKnrg3VNzvZTHwDAdr/JLy\r\nJkizbcIhomnkIeihQyHsOBh4B9qVH5o/kvt2w73hgwbCZfApn8Zcr1eIjZFp\r\n1wLfVXvA9Icw19p2eyQZElt0C79eMWQkbEp2DIdoWiKldbVEAoXGwiakeXvr\r\nU9ytHVTCup22EKMxIhZWl0YK5Nzh8eWkkSFIpmUcjBN3mv4KqXL5RwGiFjW5\r\nOwgK6OIxDvUSNNR466CIZFpxpfE2P25ndHn7RqrKssImortfdoz+6Kj6ZO98\r\nISbgnkxBQyTXlesVo594QyfumnfgTtj09Zo=\r\n=v35b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-18.x/balena-jellyfish-client-sdk-13.7.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-18.x/balena-jellyfish-client-sdk-13.7.0.tgz","_integrity":"sha512-v9zBIi7vPRlcCpSTt7msfqZh1j6+5WCjIQtRKSv8dUdnbT1KySbhSfequ6+BuAsUKoty6tcGnDtt0TGpm9DXBw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-05T14:48:40.502Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.7.0_1672930810395_0.5572159609376393","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.8.0-build-renovate-actions-setup-node-digest-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-1":{"name":"@balena/jellyfish-client-sdk","version":"13.8.0-build-renovate-actions-setup-node-digest-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.8.0-build-renovate-actions-setup-node-digest-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7314270cc94a90ca3de676910a7a1767ad9a7622","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.8.0-build-renovate-actions-setup-node-digest-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-1.tgz","fileCount":32,"integrity":"sha512-tNCFEaSftCUXA3KCh6TREZ31L+E7y/Q6etmnHeO3IOAMkiyUJBV+yymI9EPwUiAOBD5kiLFqaJvV/hLuFLX5Wg==","signatures":[{"sig":"MEUCIDJzXrdiRyakb5x63BfJOBq+VsBFMtVfazCGFP57RVcKAiEAsi7rV+OyE3KBd2uKcDzSHmBbdEsR1+HNpoPNTa2sU5U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtvGCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmtRAAiyJCjyfKw/5oS70LYJw9dcfwVhaUgo3x+DNL5OobvFY48baK\r\nH5Mj2Rhg2113ysy6kEDhMkYeOzeT1w+S+iJnDm0YrFapDPrbzb+pr8s9YROV\r\ngumKBBSEt64kEFN0jbHrap+LqJ/HqVMHDdkRSjNctvR5U11dgzNEmr9CX4SG\r\n3NWfgJMjNomjm1rG3hfNGn12lBzf0GR+Wu588ogo2wvfgTnjPgUO8eM/q+cv\r\nxmlXHpIUyFAHnqA1uCyNoD78vBZTkpf4VSAhIGYyCRmM7eFuuVWWyMQtOqWE\r\nPRqpvXInj6KxC57agkdJ6AdHsmACAml4HLn5RckTYPSqvBwbkWps7kM1/yfa\r\nLTiYmqitNhGU+U1L5lwORCY8zF7plO6XoufsaZjVSqSfw3XV+krpBzaZdFfb\r\nwExNXxQIBMya3BRnkdKhySLwBneRYIaxfIK8jvpdJ1pJRU7NGAMy5BM6a8gK\r\nL8EAQQGB+O1aVLZ2cCh/ToUGIN2dioos+HzYMC6/yF5d1ziF/3P4ANZTovuV\r\nQTXVm2XVv1h8fpuwk7Xbh6DJcAjt6To23Vb+qybiYqcgrcqF4BqsfQ3i3x2Y\r\nLb60n0T3tmt1DsRIiWXB3erM6lGBYSn/rqBXw0ojy3JeKunU9uMupm6KURH3\r\nEj5HXwOEvkOZLk54vg74SrV8HEmqmTftRXU=\r\n=esja\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-18.x/balena-jellyfish-client-sdk-13.8.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-18.x/balena-jellyfish-client-sdk-13.8.0.tgz","_integrity":"sha512-tNCFEaSftCUXA3KCh6TREZ31L+E7y/Q6etmnHeO3IOAMkiyUJBV+yymI9EPwUiAOBD5kiLFqaJvV/hLuFLX5Wg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-05T15:47:51.517Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.8.0-build-renovate-actions-setup-node-digest-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-1_1672933761860_0.646709875589512","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.8.0":{"name":"@balena/jellyfish-client-sdk","version":"13.8.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.8.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ba992448f29ac49ac714cfce2caecf6e2bb65c72","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.8.0.tgz","fileCount":30,"integrity":"sha512-0w/TSQyBko3Hfxt/5R2iVEXQUC6//DVfG1FX6RLAVGF73PuNmatxS1Ky8gKiNxmux4ZtNpNt1Vj466hKh5GE1g==","signatures":[{"sig":"MEUCIQCeKoVXlU98sXp/S8520IxjFzT4E07urvGdIh65yvoguAIgSO5KAWEP3Uq6msbWIWz/hb8RFmRcLcoPP7Yx9HHzqzs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjt3NGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocAA//Zsla/BYDDxtCDTnnMSjxrneOF+UNjLLqh0/HVDs5xtC7aKPy\r\n+IDsfCES9l2wSo+ShYN+y3bN4yBaXzYUJWj8x2FLQXLhE9AZNcT0GxnLp/fy\r\nys4pQg8nFLthRRFXhKg6RNmCYCoR/T4Ft/hQjNaufD6zsNRb9UYfpifChsaV\r\nzJcsmpOgLLYikbyR9KXNC/MEdbJn7t8GlBMLl6vW6oHhXWNPb6GKsY3iOBER\r\ni6USVM1KFMGy15pSI9ezryHMPZLVagMaXlmKzwDQSk4yjQqwOMjfHOx37BU+\r\nTJiqnXVXRLH9Z89dxm7SNfJ93cA6+MQBC2CCfGq47crshMLFU0svLkv5Opjj\r\nBPxhXFGwc9mN0hIbrIU01RCQVTwgXbIPhM73h7YdZ09W659xpD99mb4odyqK\r\n/IQ5hsCsJJAF3A5gQJzWfeXKlrQgXovBdzbFLzenjZHJeWu+w477wsUj4UAD\r\npCHZvwaSK7ChDysfT8y3HbK2YmoepJnkhp0C1mWFJta9Bw0cM5xgjqTqKbeo\r\ndps1vDxD0OlmiWbITacaYvd7a7VddCbC7G68TwmWg15MDRqrvJJUAQNS6P2A\r\n1S7sxsNQWwweh+pCXfRTqAMqFWz3btDDdUmKBLqzgxpgn4w5oSMzp5LYsEYv\r\n3s0dv6Ap9LJKPsVPER7PuXEaNwbV/rGiP38=\r\n=dEs8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-18.x/balena-jellyfish-client-sdk-13.8.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-18.x/balena-jellyfish-client-sdk-13.8.0.tgz","_integrity":"sha512-0w/TSQyBko3Hfxt/5R2iVEXQUC6//DVfG1FX6RLAVGF73PuNmatxS1Ky8gKiNxmux4ZtNpNt1Vj466hKh5GE1g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-05T15:47:51.517Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.8.0_1672966982181_0.06618178211812653","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.9.0-build-renovate-node-18-x-449ebc4cd09d5e3a5917c118b96b795505fdf366-1":{"name":"@balena/jellyfish-client-sdk","version":"13.9.0-build-renovate-node-18-x-449ebc4cd09d5e3a5917c118b96b795505fdf366-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.9.0-build-renovate-node-18-x-449ebc4cd09d5e3a5917c118b96b795505fdf366-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e2395e63896017aa100e0c6fb414cba2b17684b6","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.9.0-build-renovate-node-18-x-449ebc4cd09d5e3a5917c118b96b795505fdf366-1.tgz","fileCount":32,"integrity":"sha512-GLmeLjwjSGwVxDIcp7YHcCWzu7xlKf0hGE60angW8cZQGu0yY5o16YJSPPu7fSY+d+o57xY9T8iKpnc2kP6+GA==","signatures":[{"sig":"MEUCIFrNEi8SSUdWaMg6nwkx3mE9QzuFn9iPFfdXqeNrUqFHAiEA+pI3OY1BXTimqtqEgzgUD/57y4SM1CCNV8EkMPumHoM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjt3SdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrV0A//fVpbLwKQhTBNk05f5yKjs33cCk7LQnnaZ5PvqeSiJTzZ1BYt\r\nU+Q08UAfiu4EVg1l80dwDfX2T7rT+jZyGfayPMyIm7XAbIHjAd/ZTn8HwueI\r\nX0+wQu4VWjRzBgwqySKvgj0u9Zm6UqHRKDAHNeS1Inno2KnLoNSr4ktgUUyK\r\noHtjKeoJwBNzNBwLhPAT4qDAiD8FyX23C9QJEOZtqZwqW+oc7W7MCwIbxj80\r\nRBbFKUcapQapUh6Kd5YjoxBGU/LCJpf95NyLkXQG9B+mgmSvX8+NFmTXNtVu\r\ne+cNvjtlkRD6bI5h2jKdS4cmyQIklr7BIUBFSHkic2MdYE01QLr5swsH7z4+\r\nZxzi8NMTS6a66RFpWUcwhxa6ne9EFHzrKGC1YCmiW2yHlKFTwnXVrMpDcKsz\r\nj8MutgJ2oPrEs/9o/W/caPwYruFVeXThTwRNK0Ue6f5QGHIJMNLRTp0MLOpX\r\neKwZzS1sN+ligD+hZ3gGTnvNMncUQQ3NOIeOl5caAs9jK2wfAMucEiDkx0n4\r\nn3HN4nzlkqv6n58H6C8t3zj6z5Hc698TdD2a77lpGAZw37NqMLV97/cFfOEI\r\nfrt4J0/Nqg2B/OeIPh+tykO4W1MgRtIdfWD/m4Z7TC7ujMA9NSyQz4rx5U24\r\n3eT6PrNzej28OkNpFqKyazJEWtRDe9RnRUI=\r\n=fN0W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-449ebc4cd09d5e3a5917c118b96b795505fdf366-18.x/balena-jellyfish-client-sdk-13.9.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-449ebc4cd09d5e3a5917c118b96b795505fdf366-18.x/balena-jellyfish-client-sdk-13.9.0.tgz","_integrity":"sha512-GLmeLjwjSGwVxDIcp7YHcCWzu7xlKf0hGE60angW8cZQGu0yY5o16YJSPPu7fSY+d+o57xY9T8iKpnc2kP6+GA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-06T01:06:57.586Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.9.0-build-renovate-node-18-x-449ebc4cd09d5e3a5917c118b96b795505fdf366-1_1672967325214_0.06164358031540251","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.9.0":{"name":"@balena/jellyfish-client-sdk","version":"13.9.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.9.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"d168d55ca47fa28cf85c0591314fb4d0ba63c2db","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.9.0.tgz","fileCount":30,"integrity":"sha512-DnbtZF8es9JYsOK0uJ5YdcnwrByq/6Rav65Bst4QbLyO6C93z9lCJQRLIYv2hAQT6+9RDAkfvr+BDot1MZXJvw==","signatures":[{"sig":"MEUCIGBE5Q1H6MQMZzylc+csBDH6S8KCNsPg8dnzFnDwHGdOAiEAj7FZmBU/bra1dxu4fdSwC1ueNYNMiTmRn3P1421ZAj0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjt4Q2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMSg/+OBevcq8MeLf+hjLH23+3HO+wanMRl+oGkJ2w4p52Tiw7ZyVA\r\n2nwXojFfv4tX9pQpwx/DajHg96OWY1qJgwx1AZFKuTHd6WfD4KG0HHAEUoMn\r\nSs6CZPusJa9EPDW7KXQSWhUy5e1rHwWNFBWQwNTQMCSYfPQ9Tn64zNw3z6Xd\r\nT0+m10SME6JZivwzbjp6CprWZ8yotT9Jmeihk6DsJ9ORCeYzQSgObCMbMIqc\r\nvFPIlchQBkDl2YUxPADxCW8lmGuD0JWx3yqAVpy32ESkjKdli46wYvx4ntzK\r\nHO/zGxVbtwywWfGjzHJrUdM5op+tH0hg4vcCh0I7YOEa6/yUSEJsXXL87kpe\r\nXrkUpKXzB937l7khrxpy9SRsB5o8CJM1bG73x/2JmC/UgkXnXFAuUI6t5UIO\r\nRfCFyi57ezVTTFUWH6zwC0gl0jilq5PQmMHpQQOtarfFRxXIEnINxOaTCyc6\r\n9pSiC87dMmzYq1l3SsrgL0WrdW9mjxQwhwXOu3cLuiTdCDxTrMN3t/Px1BmN\r\nmssGU7ExWUdQVqrOD6W9Ff1+OxRJqbWGSNOq09GFbNZkBblj2950qT2njTnB\r\nieh3235/CB3yPiQ3YtnVz+vOf+qxI7d2IbsFZXd4xk/+XoW5sRKLBtvUiLIx\r\ncafu396mR7KbdI9VRJSh4Jh6l33Be8YCsYI=\r\n=oyBu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-449ebc4cd09d5e3a5917c118b96b795505fdf366-18.x/balena-jellyfish-client-sdk-13.9.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-449ebc4cd09d5e3a5917c118b96b795505fdf366-18.x/balena-jellyfish-client-sdk-13.9.0.tgz","_integrity":"sha512-DnbtZF8es9JYsOK0uJ5YdcnwrByq/6Rav65Bst4QbLyO6C93z9lCJQRLIYv2hAQT6+9RDAkfvr+BDot1MZXJvw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-06T01:06:57.586Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.9.0_1672971318222_0.19178975141166776","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.10.0-build-renovate-peaceiris-actions-gh-pages-digest-9c89fff0958d884b234c5289726cc2a52f1e0598-1":{"name":"@balena/jellyfish-client-sdk","version":"13.10.0-build-renovate-peaceiris-actions-gh-pages-digest-9c89fff0958d884b234c5289726cc2a52f1e0598-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.10.0-build-renovate-peaceiris-actions-gh-pages-digest-9c89fff0958d884b234c5289726cc2a52f1e0598-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6e3f9fff0a83a1eb97d0465c8776d062c7d2bed4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.10.0-build-renovate-peaceiris-actions-gh-pages-digest-9c89fff0958d884b234c5289726cc2a52f1e0598-1.tgz","fileCount":32,"integrity":"sha512-tciQumQkSCD/UxhucH+Hn4/PUL5hejKvtmXnC6bPzx0+zmSIhF0Hu1X3uJ169T0UvJWIIPcTEEyu0/5gUSGhdw==","signatures":[{"sig":"MEUCIQDnc0IKAOkqbIzJiZ12L45qiOyt+MjUv/ldlip/c+OPfAIgGbUUPjO3QoEvIQY7Nrg8Vx/kn3mDlvTVNxGLhetGxWM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjt46fACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXNQ//VDFvG9Hs/iAkepHfLGA6VNsfi5CT21LMyPAGrIYKVLqQotLc\r\nbW3OscXk/foLgmbJhsBEmHoNjjtS3K+WqBpXhOkw0s1LpVHLy77FGZvb+Dim\r\nz1IzB3aRcM1NrQ6cNtcQ79D2Y2Cxtt5D5hcflTQ6NxZxCogW4BqubC4w8qzG\r\n9ATjoMB/hToZWxKqi1sFKL+/a2+5ncr6/L+6ab8z/erRyKN07/MrAynlfDG0\r\nD/P4YYivcDtIYRM7za8VamiTpe04NYr2XhFZsTnFj/30FABHIbM6U+O6xcYZ\r\nPudcCXYmxLEt0U0lKaf5E5iwWPQZ4xVE95VC1oPId7oypxPUqJoOI71/oFFd\r\nFF/bjU+fk3S6cSWWv93xxCMzTWM7S1ILslu4ijJ6lZg46Y7aYWWeHO5Eiglp\r\nb6On3m0qSz9BZWhcaiidN+cXhFOFetvzdrkCjM1i/ImUMmZ9Xl/Em6n2Bo6b\r\nRd0DZd4mbXcO2fYrV/qMUz1I9eA9b/uVvFxdTq11BknDLurv+8wV44WMa2/f\r\nJrjkiOrZkvoPi33Gt2VJPSKyo9UeqNCCn8HK7XDHo4O7Ms/cUaBRUhYht/hn\r\njZGLqR02f8K3x0x0sbq7Pugh9tkUw9zFu8t/i0QXyYVcWFQb/TxTFJLg1Lz6\r\n4BZLIJP8cJy99j8fhsYP7um68spu/qW6qos=\r\n=YNyf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-9c89fff0958d884b234c5289726cc2a52f1e0598-18.x/balena-jellyfish-client-sdk-13.10.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-9c89fff0958d884b234c5289726cc2a52f1e0598-18.x/balena-jellyfish-client-sdk-13.10.0.tgz","_integrity":"sha512-tciQumQkSCD/UxhucH+Hn4/PUL5hejKvtmXnC6bPzx0+zmSIhF0Hu1X3uJ169T0UvJWIIPcTEEyu0/5gUSGhdw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-06T02:57:52.207Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.10.0-build-renovate-peaceiris-actions-gh-pages-digest-9c89fff0958d884b234c5289726cc2a52f1e0598-1_1672973983561_0.5381987433433242","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.10.0":{"name":"@balena/jellyfish-client-sdk","version":"13.10.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.10.0","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b1c9de1aea131e2ba28b8ccbd9ebafe04ccc4320","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.10.0.tgz","fileCount":30,"integrity":"sha512-QSGqalt8sskOM42Cx7LhbYM6GCkff4Fwfn6om/s8diYJny7I3xN9XDK3kWkHaLtFlzhpTgpSZeX/qOXLcJD5xw==","signatures":[{"sig":"MEUCIEtYmiAijVXNovrNEN/yIX+JMnHrEWuo9XVqtNmW+MBrAiEAnyRb8H12J8Iek89ByGfVpkczuCDvAvqEQ+sKFarwFd4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuLwrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3hg//WsE/tOowHnI3AhwY63jgFTFDuBp5xZ7TmV9PAt3HzkeKPIul\r\n/W5xD6qUbo9iE7aqIIaZhFiBaSamWbnXLQG2/Fv6NeY11+0mQ+sPvo9+j5/D\r\nHQWz2slP1UU5p+Rt+teG90WoWRkgazclOyFSSDgHTHk0lhhVTA6Yjt0g6THh\r\nflZmiyfZDUT44PFarAwm62d7J2gleFq4oHHQV9pTlcxD2HRUKmGtbFrpb3QO\r\n7NnngIZ5uv9ENJXCw6FBb26IsxbsNukCNlFLYaQT9mXC3wzAnmyRqTaV5i67\r\nOzEuQjSHmJ5LvNYOEdsNGMYpF9Hw5hZkjxOrFrMI3HmMqYpWHVJY/g9CHXwu\r\nta3OMrFBkdySXDX8Tr7M0p+KTjA2Lxk0KoMxwDO7GElGj9OgIKPbCv0/4UC+\r\nT7nEdSJMvrlX5XOnM//5a3xU/zH55Zl56MgOnlqbT6/DmnqlUhcxpB4ngRsa\r\nJgAxJuCkJUv61s8zMwhZ3WRrxZxqilhmMpINgxDmzQi5Vv9lTCa804dAqn7D\r\n88lecssEgCy1GVEP35qOqItoQEVd1B2UW9JhMZOk35aJYUUgz49a76aOBhvK\r\n0sC4A2Y+ipJ5XxtI7uSJnFdaOR1kl7e52bYxwK/hKfw5eIE8Ga3z7bMQSXQb\r\n+ojLoMuiZQOkWxZkuAlK6BBt6MRO2zRkQt8=\r\n=6VB/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-9c89fff0958d884b234c5289726cc2a52f1e0598-18.x/balena-jellyfish-client-sdk-13.10.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-9c89fff0958d884b234c5289726cc2a52f1e0598-18.x/balena-jellyfish-client-sdk-13.10.0.tgz","_integrity":"sha512-QSGqalt8sskOM42Cx7LhbYM6GCkff4Fwfn6om/s8diYJny7I3xN9XDK3kWkHaLtFlzhpTgpSZeX/qOXLcJD5xw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-06T02:57:52.207Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.10.0_1673051179194_0.3282110908836109","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.0-build-renovate-github-codeql-action-digest-0b773db0d8c618a54512baeff7a91174eb85c1ac-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.0-build-renovate-github-codeql-action-digest-0b773db0d8c618a54512baeff7a91174eb85c1ac-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.0-build-renovate-github-codeql-action-digest-0b773db0d8c618a54512baeff7a91174eb85c1ac-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"85f7278ff31ea2ff38a36a6f63eb7b59c86fc8f4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.0-build-renovate-github-codeql-action-digest-0b773db0d8c618a54512baeff7a91174eb85c1ac-1.tgz","fileCount":32,"integrity":"sha512-YmPTw7LekiKWwzGFfqRfIp3mzfNyYhx7eett7jlRblIg6SbXtNJZaahfw3DRWEIl3s4AVwd1rI6kyeKvlborWg==","signatures":[{"sig":"MEQCIBeoMYRuU7mNEyZKwZT6Jfp55w15kfbPOPXFPbEQiP3bAiBMVQY5ZUTiXHrSot94qnR/5FVkYBoqAlg3kzalO3nCLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjv+XsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3lw//WIwk+15bQZbjB6qgKsCrFk9DDTf/rCZiBwfwQY69n6SwB4zS\r\nYi4ueDHALVrUCkAcsinoWEAUdznPemv/EjIyIj6HsOxlkGzhlYa+k7a8WZWh\r\nQ0rdMfz34mxAawIOhbQQ+PFKjB51BSfy/V7i/1JRNrfIqbTkH/wwVSSPNU3X\r\nXzPQnZWg0LcCt4rQfctkrcf8lChkGa1/1JOcq5iXoGtbx/nkazEOylzXF1re\r\nX/EBoxId0BUsSAtE++CzjtlJh6SUZ+KUn/GpxyrJhdRfy9CFBAh+qrmgnbzE\r\n5QVybgvu3gU5DM21SRtZQffAkPnuUa6Tl/fbhJUpoiZaigXjqasYYu8iXO7f\r\nMXBIru82BJ9bt5atl/SlInjaNL76XBNIIdAUlMPb4HYiCuv+LwG7rlF2xuAK\r\n2LL/61EpwsML994rcvCP1zRRgXOefMTXe//5kVgL+onnaBBROxwHeZCs6TDg\r\nXaw6cHtGj2T6IBSst1WuXxwf9eCGpiONO1IUOEl6bYhuZHYsxlsXAqeNoZXT\r\n4VruPUvWmNhFfrQLhaIPcXHqyPGgEjuNm3qbZF3THMt4/2OHv+7guBux/9GU\r\nthR5cLgtKgNL+PXPPcPxtcXWvZeT/a7N6le+5l7E2PdItW5DkP/zY/U7mrgC\r\nL96l2r2GM8z4RcF8yNW1AKvw3gYeZiCST8k=\r\n=QwFw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-0b773db0d8c618a54512baeff7a91174eb85c1ac-18.x/balena-jellyfish-client-sdk-13.11.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-0b773db0d8c618a54512baeff7a91174eb85c1ac-18.x/balena-jellyfish-client-sdk-13.11.0.tgz","_integrity":"sha512-YmPTw7LekiKWwzGFfqRfIp3mzfNyYhx7eett7jlRblIg6SbXtNJZaahfw3DRWEIl3s4AVwd1rI6kyeKvlborWg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-12T10:48:48.686Z"},"_npmVersion":"8.19.2","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.18.1","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.0-build-renovate-github-codeql-action-digest-0b773db0d8c618a54512baeff7a91174eb85c1ac-1_1673520619943_0.46352818890442804","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.10.1-build-renovate-rimraf-4-x-0e1d21dc2d4c2e392c28393167201fe65e7395da-1":{"name":"@balena/jellyfish-client-sdk","version":"13.10.1-build-renovate-rimraf-4-x-0e1d21dc2d4c2e392c28393167201fe65e7395da-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.10.1-build-renovate-rimraf-4-x-0e1d21dc2d4c2e392c28393167201fe65e7395da-1","maintainers":[{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"84a8b0ea654f88cb8847f5370ab6d46ec7a26d4e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.10.1-build-renovate-rimraf-4-x-0e1d21dc2d4c2e392c28393167201fe65e7395da-1.tgz","fileCount":32,"integrity":"sha512-04NbGJ7G7st/9K9ykCIRAxfNN5ESQo4kW2T1k8VxaRNAjwstKFCvWoJ6iga6XM2NEH0TxVxTMGQOZKkWP+FODA==","signatures":[{"sig":"MEQCIB74EmuyZVPxdyqNKxt35P98rZKbO4IJSoaPvGtHYBogAiBtyRAYWAMZFddun91dk9H3oSzv53R2ypV0hKiBgzYWig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwK+dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnRw//fEq4XE2lVOps9y70M0T+aavVgCxxI8KLU9MIAGjfVvHu8QSJ\r\nqKx0gz+1fcYkNkTEEnK8RbigRM5rzeNwsEu0blqOon2MjgB+J0b+NlEvakIs\r\nDZ0S75C+khTZ3W9kws1g5QRgrI3KQ0QluVifGAc9Fjr8iZv2u3oIyZyG6q1A\r\nNx1aEQWtv07Bc8C4IvgQBYFf+4G0Zxj04jr2RWkmrBHYbPmNvTHKhUIAWfES\r\nEgyzrR1Iw+PuIlsG8BgXkvyPyuUiQ3rLMtBGR1MSoXxGpM3fBtOeSsIBEjLu\r\nvD/5gnB82E3rFMN5lPR8XsOACGT8ga1NABq7zCCbN6GHHDl3W2C8H1h7jl74\r\neSb9VRPs2nLW/mD+4SNfQH5H8AiHTCn6fHuAOkMzbGUONiKrQS2NzDTSefGI\r\nu9TNqEOBi8aS+ung071TXD9vr922mBunS+HXNV/CAQ6az6abbWs/tH8QBM3q\r\nea8/T08HrE7BYWjlcw7qWggQ5oUZ4v+92MHzlRz4yWQZFIIO5shlRevbID9i\r\nZXHis6z7Cq0rjKbFgtx+OhJq2K6riWQyssFWlXZP5pMcBlF+NO9sBHsDtu2F\r\nwSp6ccNJI5UORFJTwXNZwJOpI1lMkdeuMbo233leObgb18TivVjJFb69mvWA\r\nO5AdvTr8KT9WQ2SNRBtQBT9saj9qwrGBY+c=\r\n=6j1y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/npm-0e1d21dc2d4c2e392c28393167201fe65e7395da-18.x/balena-jellyfish-client-sdk-13.10.1.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/npm-0e1d21dc2d4c2e392c28393167201fe65e7395da-18.x/balena-jellyfish-client-sdk-13.10.1.tgz","_integrity":"sha512-04NbGJ7G7st/9K9ykCIRAxfNN5ESQo4kW2T1k8VxaRNAjwstKFCvWoJ6iga6XM2NEH0TxVxTMGQOZKkWP+FODA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-13T01:09:06.784Z"},"_npmVersion":"8.19.3","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.19.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^4.0.0","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.10.1-build-renovate-rimraf-4-x-0e1d21dc2d4c2e392c28393167201fe65e7395da-1_1673572252777_0.5542567273475374","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.0-build-renovate-github-codeql-action-digest-8db82c79f92e74fca9f12b30591a2b4b0f397bf4-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.0-build-renovate-github-codeql-action-digest-8db82c79f92e74fca9f12b30591a2b4b0f397bf4-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.0-build-renovate-github-codeql-action-digest-8db82c79f92e74fca9f12b30591a2b4b0f397bf4-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"2ab2d66c714f21b56dafb00bafb302670652bc55","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.0-build-renovate-github-codeql-action-digest-8db82c79f92e74fca9f12b30591a2b4b0f397bf4-1.tgz","fileCount":32,"integrity":"sha512-20WGFNfh3Q2uaIyeVyvpn8cC0fwkuIFWf6X6dsTuB2ZoRjSRWkSm+i1KH/Ne/J4/3D+VhWPXn8yZfPKV8f6JRA==","signatures":[{"sig":"MEUCIEwJSSDqf0x9G9KidpypVO4KTFADwNA718jfEv4SrPMIAiEAmpQr3EjdHJQeSs2EhUt2f4tAi8BWtElDZS9z6OIqMSE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0q/YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqw+w//WCfg9+pCmGRnKUurgblAMg5PYmlqG9PtZKjWo+rzKdgYo7/o\r\ncDRU2QtZn6VCPg5jiA2oziSgn3CpRGKyQ6+KoePiOlFCIc8TRE/bO/Xoyax/\r\neAD/UTJ/fCNgN8dYg7XduGWKf+OTqfb6c7XfENf4J4zpThqIo1wGOSr/jAxr\r\nFrBqPrG4MNkZ+Ck2g0xPnpuVU7jc6Q0B0HJz8/vjNMK5AaR002nog8atvnJQ\r\n+UaM44DdZDxqDm5/UPSKF1vn/FxiS6EXxEIfmqEb/+CHbwDfwkkoNKpr5++Z\r\nddtyY03nVt0/rXLFo7L9M8nKDeZ2RHRwfcQBL2ogzzL5nn1ptbcGABDpJ5O6\r\n9BFzTD7UC9gLu+2Uz49GRivZ9LbS38k2RhPOTRK+rugEP8IUX75bB9OEODBs\r\nj5+1aIaYQE/VDcEahgQIxuXkdyhbMYOm0a5ow4B6VM/QtiYUhLWyT/doGhq9\r\nbzPcLTvNURebims5tq9e6rom95gBGZoZ1/Hsb8YOWW2D8ZR1E/un2rXIR7Co\r\nWg/rAdQmKEAdVFUQEG4NZj1OJV3ms5wBEo337SAbalfa85Rq3sC+y8bCjW62\r\n2tiHZsItWpd0N59crSp2cDxj5GpHfw94ysXoiyRC+BywpmOdSOeSes7gYd0J\r\n5p64Vx4q5EpteSHQJJlkETn60oZasFYwTjw=\r\n=1nOS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","_integrity":"sha512-20WGFNfh3Q2uaIyeVyvpn8cC0fwkuIFWf6X6dsTuB2ZoRjSRWkSm+i1KH/Ne/J4/3D+VhWPXn8yZfPKV8f6JRA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-26T16:51:09.669Z"},"_npmVersion":"8.19.3","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.19.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.0-build-renovate-github-codeql-action-digest-8db82c79f92e74fca9f12b30591a2b4b0f397bf4-1_1674751959723_0.3968150800901895","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.0-build-renovate-github-codeql-action-digest-21b5b00bad7937be1678daf265c502083e7716ea-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.0-build-renovate-github-codeql-action-digest-21b5b00bad7937be1678daf265c502083e7716ea-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.0-build-renovate-github-codeql-action-digest-21b5b00bad7937be1678daf265c502083e7716ea-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"6cd1d13aafd8b2bf8bd0192cf35f3bf797fce224","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.0-build-renovate-github-codeql-action-digest-21b5b00bad7937be1678daf265c502083e7716ea-1.tgz","fileCount":32,"integrity":"sha512-XR2rSCvDjWHFIemVYQ92gHZf6CKITM+ozAdLt+hnz8LFI7Dc4HfvQykb+979xUfK8zs0P1bTquDvcQMWyRpx9Q==","signatures":[{"sig":"MEUCIBSxHaLZVArSYSF+8bFKiQysWsXTEGIUiPjvQ3OXq0Z7AiEA5uxLRU0fVqbaqfH/uDVLwibxwlol3V6y/eDJoV4WOTc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj054uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbJw/9Gqhj/viIUyx32QLZmVME88QJxpdQQPoJoxtJgjug3Oo1KWKL\r\nQA90G6yDBBm5QN5h+hlWlAxKPXS3F+KvfD1WFGKXKNYXJPKUwk951Lw0J6o5\r\ntOsVscOP9uKbN6tjj1QntJe93dht3Rf4/ho3fBhf373Go4gBlVArYYMf1LSz\r\nU7F+sQ6CSOIgwcuCkACpRVfVx0QGcyr4tQ+JwSFk/6Q1ZFOjvM5Oyd3HDuvh\r\nJpxVyk0uKTXt94FTl3zRZNtgeIlfkt9nuySMXJ8LFDmjkxJYZtWE5Be7Iwgn\r\nicmE2HngYt8EvX/GT+9SvCCUh00fFvC8D4xZaNNxSbYMSleZ7GL/58I6nz8m\r\n97PyaHqmAhfcUKKI8PX+y2m+oxw7v/0O1xkf7f5dFKEQaDc3N3pQardIBweM\r\nmaY6IvlRfK2SCDUJ3NKzgszPniG7E0B5O6YFGq5rJzbSId0/7okXUPi+ghqx\r\nOirwh1EfZMcBXhyenxHKM8cGZbD9MR0YZyHkxIphWYml0HOe9SXrsZ0Z6beN\r\nm8HL4CUhp5vMbfGa9h+oO6f4jGaK1ZKBbKs3C5D77MjuMME7BDDnSQ+4ucVf\r\nnbHHXBsMy7GBUcRyrEb3uttrA00wQ0d96Qae17grrSKt4hnDz+pzRCyw9WBG\r\nanmiZafvaZrhUvMDSmLMw+W1uIwplzXALnQ=\r\n=r1/3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","_integrity":"sha512-XR2rSCvDjWHFIemVYQ92gHZf6CKITM+ozAdLt+hnz8LFI7Dc4HfvQykb+979xUfK8zs0P1bTquDvcQMWyRpx9Q==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-01-27T09:48:07.827Z"},"_npmVersion":"8.19.3","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.19.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.0-build-renovate-github-codeql-action-digest-21b5b00bad7937be1678daf265c502083e7716ea-1_1674812974656_0.9664723489663547","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.0-build-renovate-github-codeql-action-digest-3e0f8a9b4d4bb8156d5f9ba062f52807040189e5-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.0-build-renovate-github-codeql-action-digest-3e0f8a9b4d4bb8156d5f9ba062f52807040189e5-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.0-build-renovate-github-codeql-action-digest-3e0f8a9b4d4bb8156d5f9ba062f52807040189e5-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c9b89d12c1b6b664aa004c1ca021e53c1ae2e129","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.0-build-renovate-github-codeql-action-digest-3e0f8a9b4d4bb8156d5f9ba062f52807040189e5-1.tgz","fileCount":32,"integrity":"sha512-4wUta26e8BYL0LipIxE7vbjdmO8gO9RYw901AvvWT7vTvCH+9VDV9n7z0D2bNeatdsyQpdKESx6ccVBlbxUhgg==","signatures":[{"sig":"MEQCIGai4pVoBP0byBANSOAdffXahmpFWbgFLe5jkf97TSu4AiA2kkOg2xpQgvcRzTdZBQZiSLdIHHcfIGXGQ6tIvGSl8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4WgMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqXdw/5AeQd2LPKUHv+GSJc2A0X5HPCBw0g8AfPP9uqvSGwKS6NVDkC\r\nmBKTEjABviY0uTPEbvUknmIzJuMsNMmjYJ0cWSoNUC5Hv6J60bqqTfU4Z79W\r\nsz4bvPWTN1xPFdEWdY0lb19cRHWopWlUveIWCM8M9IiBFBxlwy026uSrk1Nv\r\nJK8DYY6nFP38thXFB/IQpUvYyPdShriZdLA/Rc7JyWcdFWxaRUVEAd/xp8lL\r\nmsJ5LHlBPivQmcbcC4B4CM4ny7tgEAuRaZ3LLX0qxnzdE+UbGWUsxcCuUPYo\r\nUmRRuzbCJZVho1egnaGGrI00tL2nyFVuIyWgJgAexPQblinB4lXMhbHsXUp5\r\nN8GtQGqT4XOvzoopEuI/lCgnx7EeW1rJt40XmALx93+VJ5arRXzl1Cny/IvI\r\neHx6T1xQekVK/Tfc1hSpMVGdIn+LXCmzaZ34nbEp/vl+pHeIjWJqdoXvQSxd\r\nKlN+VT/WXipPz56OuQliKrPuJ+ikIOaIiaiaACFW4p7+psiV0nlDG4xPfa/M\r\nqCwV21tIEKJC4fib+JzrP25mxPZrNNvnwyPcxJqpgGG1IiLSyFMs4sPlw/q/\r\n17iQoxdhfyunBy7veRFSjUayeeEzHiwy1yftBriVi1ONLAZzjHuJMKLAJWnA\r\nwKuUhg9kS4XE09MTjDlgiXztnocWeBP9Luk=\r\n=BUtM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","_integrity":"sha512-4wUta26e8BYL0LipIxE7vbjdmO8gO9RYw901AvvWT7vTvCH+9VDV9n7z0D2bNeatdsyQpdKESx6ccVBlbxUhgg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-02-06T20:48:22.827Z"},"_npmVersion":"8.19.3","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"16.19.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.3.1","nock":"^13.2.9","sinon":"^15.0.0","rimraf":"^3.0.2","deplint":"^1.1.3","ts-jest":"^29.0.3","typedoc":"^0.23.21","autumndb":"^22.2.186","prettier":"^2.8.0","typescript":"^4.9.3","@types/jest":"^29.2.3","@types/node":"^18.11.18","lint-staged":"^13.0.4","@balena/lint":"^6.2.1","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.0-build-renovate-github-codeql-action-digest-3e0f8a9b4d4bb8156d5f9ba062f52807040189e5-1_1675716620438_0.6183193724005456","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.10.1-build-joshbwlng-bump-dev-deps-33f92b95b6f3f6fbdc6b5c9e3ffb384636004347-1":{"name":"@balena/jellyfish-client-sdk","version":"13.10.1-build-joshbwlng-bump-dev-deps-33f92b95b6f3f6fbdc6b5c9e3ffb384636004347-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.10.1-build-joshbwlng-bump-dev-deps-33f92b95b6f3f6fbdc6b5c9e3ffb384636004347-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"bb44789f46b40ebc8448c36d68d899d828a48e1b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.10.1-build-joshbwlng-bump-dev-deps-33f92b95b6f3f6fbdc6b5c9e3ffb384636004347-1.tgz","fileCount":32,"integrity":"sha512-8X5aKUahwwdnWcEctvgRK8QBIR9UsvHhQQuNIRyv/SaaBbiRR+7x+ZzUCxvqM74RuKaoeDhc3fSWBvAORP+pFA==","signatures":[{"sig":"MEQCIHyfv/NpED8Wxwe8I2Y6aN5/QxvRVzS4YztUEzKoQU87AiAaQTk8ZHY5DkE7eVxiCanuVkg7v3toNtUUpcRIwwJDIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJ12wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLSg/+KHWINCCDRUi6xTkerDGSaStGNGDnbVpw1H3UTJlajXUuYKPf\r\nK2365Z0COy2P8Ne5iuDSXXI1n3kJwI9H6ev9ZJsaDrAzc+Ba1SRVj1Nb3i04\r\nkBuqvSIPxHIiZNVb0HJ7yoJfoyBn0V8yPDcJs1FOTUZAICOH10EX0tj9hSVL\r\n1wpoInMvxOPCZNIB7tBx4WDU/P/DgjS/KN1x3wDPQhOLKHEHIQ9NUPvxinpp\r\nRCypyXTUocTm/1GXzhtib1AmY+sdHkLat7ZpBrDEf/qs8wFsJcjQxX3Jl392\r\njUUgxmyWrs4zjljvCTted0YjKmj4ofPbcFjW5XTsfG8z0gA2WuABuxapqk2d\r\nJghfISogYLcq8TCZ4/FvNEQChQWvGP47UzQDibmuKEV3ShL6kgxfxn64+vCx\r\nUEoKzK0760Nr1QTz+QnIh17+fLSDKbHFZCCUxZu2X4CG+K0iwr7tCem5TT+H\r\nmBL9JySzYjRfcb6aJO2LOjz/y0hRAbIOa/6m24GFZivEQUE6EJBL9Uoe+vU1\r\nyGx3hSEDbI1xKomgxLT6gmmvnE26r95ecV63OeHxUoMe3RvOVqZUYMoZeDwI\r\nM/NQ7xuRVSB3cVV4exWlEd49aDWvmWoMuoB6cX7gUnlFO8qFsMSkCrebTp6n\r\n+CDqjs2XDL7UvuTIwtDa/HLKslyGm3eIPXM=\r\n=t6ga\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.10.1.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.10.1.tgz","_integrity":"sha512-8X5aKUahwwdnWcEctvgRK8QBIR9UsvHhQQuNIRyv/SaaBbiRR+7x+ZzUCxvqM74RuKaoeDhc3fSWBvAORP+pFA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-03-31T22:22:34.646Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.10.1-build-joshbwlng-bump-dev-deps-33f92b95b6f3f6fbdc6b5c9e3ffb384636004347-1_1680301488158_0.711289067759119","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.10.1":{"name":"@balena/jellyfish-client-sdk","version":"13.10.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.10.1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"5af37ddb6a04d8618d76ec460c92f9c29f8b27e2","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.10.1.tgz","fileCount":30,"integrity":"sha512-FrisKQN5WsUaeqwWPGGI6+Mnqd5GVvbxAz4j3revNyRsUlBYFaSX0jDiI9TwGT/e5+CFf39YguTiQOxLL9Tylg==","signatures":[{"sig":"MEYCIQC2JVB/Dle+vukBxjQc+L1h6U0ggt+7gnaFE6YuSWtjeAIhAMo+FkN+OGJviPkhtKMooEy9+gJ3NeG4k6fWqEhUDWGD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJ2B1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpv5A//d4nQZqeRg3aN9+OfGbTmmxhxDcUsJnXzM/CTSE/oQ6LtXXzK\r\nKqZQw223lkxvvZ903O9P8Mjew5XF5AR60mgUwzpWQvSoYdyCIOvigswE107m\r\nhjC8bZta6rm7bM++r3JfeVGTqP0HfbKHfbjpMNyL7db8Hmy2+TeXryi5tzye\r\n0j1zVThZme8BWpu4VxA2s487DQMoH2CKxHwuq/2Wvo3db9gFK+fdwE8WjRk9\r\nJV6bgI1vHJmkeoW5ldhTj85FtvWGNCWwxj0DJAqg8LErrDeSu6Na4EUruXMh\r\nZ9Iu23bTOYkv+1Xf20+m8NW1hfVqNJMDpeT26DK21bMHKdi1IYHOJ1jc2AH1\r\ntIICNtArQNDsfvQ8bAusny6MADQOK0k3qPyGzmd8MMP0540g2Gn0vieghgZE\r\nE1AsGdyjKCIDayjIhARrzkvj8fBjLkwdmYtiAoT6SPitd5TUwiAzR2dHC0Qo\r\nge/4vLy7IgZFGUD4QgUPzwvmjD/77DFKCbrfZ5lHajkQvUV1atfwT/4IFRW9\r\ncLUVcklrb4Epx2NCp5mX5Bqi9o0JUTWcaXperDQCYan3jahsnM58Mtgy6917\r\n5mKuSW8XoFzF8s3/GqcW8j4oJuAnK7XkXiQgOKa2pPEnWMNXjs0PB+XG7vvP\r\nwXRR3YO91siB0nS2PTeX6hEAr368F6dHXh8=\r\n=VB0K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.10.1.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.10.1.tgz","_integrity":"sha512-FrisKQN5WsUaeqwWPGGI6+Mnqd5GVvbxAz4j3revNyRsUlBYFaSX0jDiI9TwGT/e5+CFf39YguTiQOxLL9Tylg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-03-31T22:22:34.646Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.10.1_1680302197087_0.13189627871481546","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.0-build-renovate-github-codeql-action-digest-a7bd694ece66c8cfbb19297fa922257d4ce3e01f-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.0-build-renovate-github-codeql-action-digest-a7bd694ece66c8cfbb19297fa922257d4ce3e01f-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.0-build-renovate-github-codeql-action-digest-a7bd694ece66c8cfbb19297fa922257d4ce3e01f-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"7bc024f353b0e46d69e89a884eeb424e515ad8c5","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.0-build-renovate-github-codeql-action-digest-a7bd694ece66c8cfbb19297fa922257d4ce3e01f-1.tgz","fileCount":32,"integrity":"sha512-xILRx7VXRTrgbh77wCAOyStgoAeU49UoorAlgDl4V0rfYTRlcoxh/AThEpkkPEDdGMp+YDKn32jfLNklpPrruQ==","signatures":[{"sig":"MEUCIEK/QGjLVImVlXpdQtOilu/P23H/wElk1JdMF+Bo4uFNAiEA/4imCLvJkNUv+108mepUJ+1osnKTtbc+rddWytgrcko=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJ2WsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpITA/9GkVFozFn1COJ1+7E0A+z/ohqlQJzBOp/yCcnqolLhXq90G1b\r\nSwMkB3D28noJgAJ3G98qiYxV9IS/bMmC5yypJqga1MUhmHkLBMXltT/9HbIK\r\nn8GJknAwPeuV2BzHcnB05qvwHRjsM35VwH3+kdsFMcA2gicxJsQnEyaSujNO\r\neRXsWcZLy+uzXKfpCbeeT0jamQwerdoc8hS0sQEtv7XbSGB5I6mHEpVMClsB\r\nUxiI6oVMqrMGf/zvUhtGbFsr3F5o5xwCAPCCYyZ+VdpZzD6+BvMKu1lkl89f\r\ny0XCQ1tdEuQWIMSxi9VXY2++QKKgJLBmX1z7/aZieiWJlAw5R3Xa2dNIJWMe\r\na87lJoEtxtssCtMYAPSk/LEnVZ+42R31AFuTSXn5kUp/EAGdBttgY4pTj6CG\r\nDKwIATEJA8P7XVjFHoQUkJjc3qJrRrcIdvDJwzocQZ2GiDGH5R93W4RyczAB\r\nQNYWjR0ZjUc/c7VKNs8zeMV06Y+HrRLqAT7TCM60AJ7xR87gNyMSjAURJ0ah\r\ndjtv6CBU+WdEg//wcoP6tSy1j38ymokwAeEO2poLybFaEEVqd2IYCd1GGeDO\r\no/cHFve93wtbJrVIhcvgUuEiuDyyuX7T9uKMFSOWqtlE/eRNGjXZTydOR3G3\r\n4Jwsx+6j6C0w7qIpZshnXMO1DkYa7Kz6Df8=\r\n=GQw5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use JellyFish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","_integrity":"sha512-xILRx7VXRTrgbh77wCAOyStgoAeU49UoorAlgDl4V0rfYTRlcoxh/AThEpkkPEDdGMp+YDKn32jfLNklpPrruQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-03-31T22:56:40.354Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.0-build-renovate-github-codeql-action-digest-a7bd694ece66c8cfbb19297fa922257d4ce3e01f-1_1680303532726_0.8441834412223701","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.0":{"name":"@balena/jellyfish-client-sdk","version":"13.11.0","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.0","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"4a9317c7bf8565fd82e8ddef825caa5c13aed318","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.0.tgz","fileCount":30,"integrity":"sha512-V1Bx9n8ghuhVPZLJgFjdi23l/uDmapvF7/KktOnbiWK8je6KhF0vfoBsRFwDgd6ZZPEi7GfAisYzqXDv0qiCyQ==","signatures":[{"sig":"MEYCIQC4GF3Kz7SFRyBUxE3i5h7eKB1SRmvz+WOzAuilWqaqZAIhAIT/WzCar8PrjlSemKr+g8phHQSOxXd1RxZhLSCpqG43","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJ2ZIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpd8A/9GVDv3r7+j2rE4bnNZZksPbeMl98w1np1sW+efCpGol1kibPl\r\nMJv0ElveEVMYrVJ5LaxISnAdvObLZm5zjURjTCsRgSsFKfKtxP5IQJb1qHRj\r\nlJmXCv0iZlkvqh0Z/p7pZ0OI+4qPnXk5bGE+bCPsWW/OMuvKF36UykKndlus\r\nuy38mQ6HWaS8gLPMf09p3SmfgyoyIW04Spt0kJNnQnBSbodczX9U8hEmZdkg\r\nlCMn4OWuugC4jT20KFD4CqW4TjfrCHONSNn3jsmcQqHXkLyyL9Duv7YXxdjb\r\napXqd1j3eNf9wMhc3VoyQ/bdjZcVJrpngovJixCTYSEIONs7ZG2bBOS8y7cX\r\nh1O3WGMp3HFXXLpYeRkHbCh/Je2z2cuhoyZtzrt36dKMPQd/LWgT4Z/+oLDz\r\neA+4voPy0lO7Z84SQuJmbYZxMWpph2bRhqTxJOS0eCTxPWuYGG3wIaI3LCXe\r\n3JRvbwYtYFzeI/9F1kGKloUJC7nSFzEMcYnO89+OrmkUg6MdBKumBRqE+3dk\r\n1752d0B7XzO5f/jGZFPch3Zlp4YnVTMfcQEpSWa0C7NtqdU3eepKjMvIBwrc\r\n1R6tHYjR2wXGzXKyRYZkBhOEh44wdAXq1Fy60+iyTP0P4ijZcJIQWrcd2Dsp\r\n6tWRcBf6MhNsb0LK1NCmLn2kzRnDFakr1i0=\r\n=J8hK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.0.tgz","_integrity":"sha512-V1Bx9n8ghuhVPZLJgFjdi23l/uDmapvF7/KktOnbiWK8je6KhF0vfoBsRFwDgd6ZZPEi7GfAisYzqXDv0qiCyQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-03-31T22:56:40.354Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.0_1680303687848_0.22177424079068575","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.1-build-joshbwlng-fix-readme-b640e44708cf7055f23a07724473408f7654e279-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.1-build-joshbwlng-fix-readme-b640e44708cf7055f23a07724473408f7654e279-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.1-build-joshbwlng-fix-readme-b640e44708cf7055f23a07724473408f7654e279-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"65046ae6151216ebf5a1c4e52734db92cce5f5e9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.1-build-joshbwlng-fix-readme-b640e44708cf7055f23a07724473408f7654e279-1.tgz","fileCount":32,"integrity":"sha512-z6aV54jfUYcA9xDdRrUj6EzMKVRTZvtOATq2Z/G0DADS8D4N5z6TlB2HabLQ+6w0z3riJDELRmRPogtNMTr9bA==","signatures":[{"sig":"MEUCIQCFj5C4QVKIHJDjyZMx7E9dPB/jdqrHXw97TgL58YkN6gIgPOv86sKiBem1l3pNAxOjGkfMzslL6AX6fZT2eT4DdMs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160222,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJ2gkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZ5xAAoJze7kLd6nt3cc8MXK2y56eW0qZlAIAGdYpPPPMltp4Vxbvr\r\n4QgcNQcu+i/ZJXkNILHKXT+m7GS2abZGEd8RuErz+ji4uuF0cOw2M6LxC4Qt\r\nBsJ8b+SysIlIajuzdGIOuvnm+tBHsCvdn55Z/8QLv/MsKaZ72ZJqbxnwbBG0\r\n/xhhRu7YSPLJnTBN3yJRf7r89grXuI/GRju9xX7GFziGU/pZz4g4Hb2Bptxf\r\n5AIhn0eeRFIPCH3gSbGMqXjynOAL1atesBpgfzV16oG3KjvyPiCjjIU2DhvQ\r\nqFSdC5Kl8oEF9I+OTyyP4NQs5DM/fOxv0LWO+63/33KPrAp1WqZhTAu59jNd\r\nWbsHeTipPq1rhama3hyKPckphYKHUs+AURi1FADoIrDWmmobW2VbH3dL1hES\r\n18rDs1HfMYQtXOngA/vuO2wg7bMrg4X6TAVFUKyGCjUPOEq/PVvHJbGSECIy\r\nvc+73LryO4gV06qMN1dSs6H8X2cE+fX9oEsCgtiBJDKYJGpSG22paCZWSFvA\r\nsAJowvGsEwUR88yh8cq6l+DCuA5x576aa0H9O72r+JnHn4tASzFlyi80yLIW\r\nJK2S7S4mygF5g0k/Y3X8VPSd7uLCTxkVzI+pz8TUbyr4ogCwYZDCl8Sw+t58\r\nhd/OcjteuzudNkvbfYQuY51bB9JnMv0Cblo=\r\n=nxRM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.1.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.1.tgz","_integrity":"sha512-z6aV54jfUYcA9xDdRrUj6EzMKVRTZvtOATq2Z/G0DADS8D4N5z6TlB2HabLQ+6w0z3riJDELRmRPogtNMTr9bA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-03-31T23:06:54.033Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.1-build-joshbwlng-fix-readme-b640e44708cf7055f23a07724473408f7654e279-1_1680304163814_0.8522480569128323","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c352702ecf24b9fbac1ad4da0ecfb4ba8e4a363d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.1.tgz","fileCount":30,"integrity":"sha512-IRQQTxtvPOyGvVaZFhnIoV+cP3JwzZgQXmgeGG0+1bK8xPCWbTfv96UW8xqE/T6/sHeHFtKy7qy86pCg618XrQ==","signatures":[{"sig":"MEQCIDe5aj7iIsUnPbT2GjS2mo9jkNd0L3SAbY91FN4tNQuiAiANN23MLQ4b2wUzV8D75ag2alRmbGw1BrQ7y6vTgTKwlg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJ2jLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhmA//QXAESYeYYllJ75NACwYuAlS2LmWDdgF5mkaH2IPcbfYZl2gz\r\nUf67FZUJszwTi3HYMZG04VPQAgInEYkxdRBkfBy8nRs45d29us2+Tjn8uYkb\r\nsHKpQvGJCWsCE/CrJJiMWo2k5D7PmhluqiwxrWvkjKyJJqq+Ng0ERFUOFRPN\r\noI4iNFTgaWIqaOdt8VGIzJhott/s0E4yIYKisu8iBsYabdvIlpB8I+UseNpm\r\nDTL9p4ll1C3S8KrJZeZoyburFwCBMFgDbK41kB85JxVLomdi13KGl/9kjEc/\r\nmh8Tm/wYEitVVXy282XkxGp1hqrbfFGuSEOlYV6kBj/EtruiYfaNCGSVPJxk\r\nDU0HNDycO1je6T8jHQHtHPQOmBEMq/YJn4HtaApUd6vnlrb9o23naqoYNf5D\r\nDKut+XZZvPX+gjd9Ga3tx69Jrd06t8wn4SyxsLVtYvJ5mgsCSqR/cmYQEFjV\r\nJIEis8/DR7kU+NbRP53ZImtgcra8aV4mo7VeUISRTTPAHJRm1E8Vw9GVTk+W\r\nL7utYfbFRZ1PNwn05v6GMtmMlYKfWDnKnr2+hVjj1rkx0bugqZrb4VeuJXSr\r\n07ES2U2k5j8UxP4r4wXOkim1TmO5gcgN66p9zW12BSp1z27rilEunnxw1XyA\r\nFN8o2/U7spCOMYwICa0dGm0Upqdqpu1toVA=\r\n=xQEL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.1.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.1.tgz","_integrity":"sha512-IRQQTxtvPOyGvVaZFhnIoV+cP3JwzZgQXmgeGG0+1bK8xPCWbTfv96UW8xqE/T6/sHeHFtKy7qy86pCg618XrQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-03-31T23:06:54.033Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.5.4"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.1_1680304331054_0.2382433304933702","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.2-build-joshbwlng-update-socket-io-client-2bbba1976cfe2fa47733de691c84c68515dd523f-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.2-build-joshbwlng-update-socket-io-client-2bbba1976cfe2fa47733de691c84c68515dd523f-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.2-build-joshbwlng-update-socket-io-client-2bbba1976cfe2fa47733de691c84c68515dd523f-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"b41a5b3f76caec0ab3311187d16d1cde988e2c64","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.2-build-joshbwlng-update-socket-io-client-2bbba1976cfe2fa47733de691c84c68515dd523f-1.tgz","fileCount":32,"integrity":"sha512-M4ELVdb0ZKmM00wW4nA6hYDE4NHuExqZrXSG14zN1k57bBB3htc0lhBd9/lUVd35dMWs1Kncgcp+sPDqslJaZw==","signatures":[{"sig":"MEUCIQDcl/XOO3GsfUo7hlQ87ukWtQ9Z8Bl0kYLIuJM49mHu0wIgGOMt/uX5++mCt1X489K3UnCkhonlAbG5hM2SMS9FWN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJ2mnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqkpg/7B2vTsroqSXnEnkwYUaGfodcZac4oAAEnkqUnpfAe78Q2JD/T\r\n6E+hxQ6EuBmg4I8TgXvUSjh49FU1y9qhnj7Wht6U4TkBoq9Xf9LUxP3llRqz\r\nt1FVX5Ak1PNmd27YDsifHYBAhMZ0pfdph9ZwMExNSxaDzYtjWiTz9GAJ8lDR\r\n/hotLzqmCGEkoigXqEiAe/06sf0g7zznHTxLJ+PPsJwt2nZZfkLuRp7rMZi3\r\no9obmrx+tWZ/k7wGvSbCjZ7GpAaD+MzuoM5cq1eFoP8MXIFZM4wNT9SXYBgq\r\n5R/BfIJ18A/Gs0pbTj/DchjCiuBXNyjXhvZsbJMTPYtinnQM937NCHkRCvaW\r\nwRo9rE4LBxsfnbeK4Y7QTTDS1pGfb/s38OCCSqvdzDUMQK2ow/zi/6cEPEOd\r\nkNjbOwshcOGY8n/xzii8jN2xbP3jyoVkTAELdBjXMHnnweLiEm9vlQ+yzYAl\r\n0YZF0tbwhz/ynl4dB/t56Z00CLmjAc/HpdyRVIVhTEaFCr6r3upWkJ3pISiS\r\nJT15mAJ5BuFYC3r4b/eW/PYmCZUYnvEvYoulwp74sdxjlHTwyYqNrS9Uje/O\r\n4LjTJj8vPcV2HxwBsZLF3a4fkLAc1giAW27dTdIyRQWHgey6Fbt123lx0OGG\r\nhxNrHa9g45nfV+0lNJjX0KRSrweXDZRR+BU=\r\n=fmSR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.2.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.2.tgz","_integrity":"sha512-M4ELVdb0ZKmM00wW4nA6hYDE4NHuExqZrXSG14zN1k57bBB3htc0lhBd9/lUVd35dMWs1Kncgcp+sPDqslJaZw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-03-31T23:13:41.206Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.2-build-joshbwlng-update-socket-io-client-2bbba1976cfe2fa47733de691c84c68515dd523f-1_1680304551162_0.9156936368961421","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.2":{"name":"@balena/jellyfish-client-sdk","version":"13.11.2","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.2","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"379554e6d0c9a2b95333f1129b6ff5dece5da918","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.2.tgz","fileCount":30,"integrity":"sha512-t0JKnDtyJtJgnFikYsubFHjaGbsZSJ4rtIwSNHBlCvwhQ/PVZTv9pk9H4V+FnNoymvV+8Kw5qf3+WrVBD/H/uw==","signatures":[{"sig":"MEYCIQC0Z2sO24Dgcg2sum3zxePqXXqKj9CM1fh7D/KpkRtIQwIhAIZuyX/yMA4B4pvhWdkWeJANBOcszsfAA4+LNzhMxWza","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJ2pxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDUA/+Jeqmrx2acvecCnPai3Nm3PM3t9ue8pFxur8W8pN9Ujd8DRqR\r\nuTqtQRzDWKcmgv7R0+wM7h00zVgd5egX3kXWcS8orR2pXGJb4rDaTTcrlZJQ\r\nSVJBx8yCIm4I71VHX4JtYQNf72vADXjC2LHKgaUP3348SCBVDPhioxbx5pV/\r\nJbwLG1KhZIm9032huFP3jdlrATeU4K+mnx4gIDjHEOGgOJ1n1Wbdb/9R9O44\r\nrSudr2QlLFVGb1eWVVj3RFQYcSawjhlR6aJf8k+u50+majIxF0JbFdM8k+3+\r\nOny904pn6Jvm6iSwfLIWqopORFsAhHmFKP3B3rzWbqluGr+j3uwIn/dyDIo8\r\nbH7BGme93MjVTzrBiqHEphFxmfPD8zvYxUXNukDpY/qv0aZ6DQKBycaStIwx\r\nu1emQPDqEw/Cex1eBkI/SJgEEt3SV0Ud6+vXIQZcNGkWB5gDva82tGe7um4i\r\nJMhHRvvownQLLpWIyeHrQsvpcatODK+kizwUFHsiMFXgtdhC9R++aBp7HhHN\r\no9pnfUqr9ZdPPOxrros9+h/dy9kOC8BTMZSMqMIEj+0A2K8Qj/gPxy4j7Y/n\r\n9789/eZ3PJMrIdDOvbiWafza3GFAnDmhWKY9eElTLvb1YBed0Lb1uSJTQSAe\r\nxfqRrWenCFYfctkU9X/R1B8nV3hgLJGfXQQ=\r\n=DVrF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.2.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.2.tgz","_integrity":"sha512-t0JKnDtyJtJgnFikYsubFHjaGbsZSJ4rtIwSNHBlCvwhQ/PVZTv9pk9H4V+FnNoymvV+8Kw5qf3+WrVBD/H/uw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-03-31T23:13:41.206Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.2_1680304753611_0.8934748326637965","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.3-build-joshbwlng-use-uuid-adca59e2db18ace8e5d196fc4dc5e493f20d0301-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.3-build-joshbwlng-use-uuid-adca59e2db18ace8e5d196fc4dc5e493f20d0301-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.3-build-joshbwlng-use-uuid-adca59e2db18ace8e5d196fc4dc5e493f20d0301-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ea3ae7d010575b8bfb185d25e2673fcfa6d5c5e8","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.3-build-joshbwlng-use-uuid-adca59e2db18ace8e5d196fc4dc5e493f20d0301-1.tgz","fileCount":32,"integrity":"sha512-dGiy3lB4ZWN945+Qu2zwzW9hGGKZo1WXaiXuFTobBFHl8F7YJiITO+lpVmWUPaMRYsb/1u//s6weFGa8//NWxA==","signatures":[{"sig":"MEUCIC+VB1Is+trdIx8jyZS1Tqkzu1wheEtg2173Mj590hs7AiEAw/1ygSYJybMZb3hkkrlhWaZyJN59LCUdK6NugA7aygc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKZipACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqfOA/9H6yjGRZgPz8qj3+UtWX7RdqRcPY8QgaKNji4OTepLV8nL/4+\r\n1AvQhZnrNkJn1jaN0V4MMBYv5ssfaZFBGA1XZ4qg8NpnROC3Hc4zroVpKfBn\r\nRl0286KIc1ND5y1bwNdd7vUtPZmrA21ERtsZ+XtQR1my2CKKzgqhZc59S1C3\r\nlwD1Z19i3IT6O2ggj6TVjFrSNX8PWlyej4/1ncQ//08JpvTNiT6absLwms2T\r\n/RbVukVc7wxXUInJJ8x2Xff7bJSHUvl2Y5FyNYB/c4D1WKFdPvvZhOv5CEfB\r\nBoiGqMRyBZNfwVugcVIXnAY4sxJwmZ7xqh3RcKMfUHs3y6tcJ6hfSBSBJtH1\r\nedFIGbrbmA9XHmuLViFazM0qJxymJ97rzzPpJ/KFT2d/sfNcGQMJYR0II4oc\r\nLRHkL7PuvJ87FC4dA7PpjECRAAda/fZHBH1oH3Ttj2StgfDvATWSrLxxM/fD\r\noRgYmXipSKesxRCDAoqMem0LsI/pW4kQZjUw5WgEyHZiA9TBW98FkARJ+HLF\r\n1QzBJif/zofefEHwhW68skm07C/M8NRFYjikPXp8P2ToSU0ds9fe/hiQLkp+\r\n8CKomP9wfA6rOcjtZkt54agdqnUebuuFRRX/Uy8eRHLrdlY2+7wCfGnH/noh\r\nLUEzbleUQrK/wXmu9TBMGtU1Mbas2jJC5dQ=\r\n=HSpP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThe SDK is a client side library to interact with the Jellyfish infrastructure\nthrough its public interfaces (i.e. HTTP). It's meant to provide high level\nuseful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","_integrity":"sha512-dGiy3lB4ZWN945+Qu2zwzW9hGGKZo1WXaiXuFTobBFHl8F7YJiITO+lpVmWUPaMRYsb/1u//s6weFGa8//NWxA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-04-02T14:58:34.540Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"uuid":"^9.0.0","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.1","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.3-build-joshbwlng-use-uuid-adca59e2db18ace8e5d196fc4dc5e493f20d0301-1_1680447657389_0.5434909297853499","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.3-build-joshbwlng-update-readme-aebb344324fda53af19897094c8ad10b18c0dd65-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.3-build-joshbwlng-update-readme-aebb344324fda53af19897094c8ad10b18c0dd65-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.3-build-joshbwlng-update-readme-aebb344324fda53af19897094c8ad10b18c0dd65-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"77c44becdc3b4c0eda699626bd9545f74db7d0d4","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.3-build-joshbwlng-update-readme-aebb344324fda53af19897094c8ad10b18c0dd65-1.tgz","fileCount":32,"integrity":"sha512-DqOz9hf06fawPVtIWTn3vq27ni4lPWkKTIQKnTulGmSpmQGwO4UuRROqtaM/nosTXofMCChZ6rGhYqBbLcelbQ==","signatures":[{"sig":"MEQCIAbmrVYuI4LW7EnSbb76mVP5Hi7IsdsFJibHTJVF3z/cAiB3wv5nmfklMY27sICgCRZQ89wRNtHF8Re0s60EXYTvTg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKjRPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDSg//WzakhpqrRmvx1nraiOxPYDL/sQfnalmEGohhixhCOiRfzWmK\r\nReCQ7hfZOjtElUi1Sujg0IIEir1liWLR49720p4qxBrMQTamhmWhmzAr7pz3\r\ntroBP0uVI28HDtcRiPqE6VRzmKhh7HkrJgJ6mkNet+VSN6en4nWhPyj0Fh61\r\n6S0UtLbDbR0m4Kt5lCVVTgqar0AukbkYsoDziBTB9DTaCh6tClZqvZ4oyAGK\r\niPLVLHL0C0pRdiRbqg1Ij4abftDmbZKpnDFLuW7rbnGRKVBifzZhRx8OECTs\r\nRVwdlbJtijisV1iDLj84eoWJHR6tLyb3ySK53RoP6epmcuypjne9zYph4+ZT\r\nXRkkn2edhy7oZqk5PKF/wFIJPby8H8RuAQGm0E2kEI/8ShSFzsKT6anavyjP\r\n+dOmS5Rm9ANPVL2nVFitiFEQamyxK8vFy7NXYYniBhY5XO+cSROvpYdsIfn9\r\no98sTsrXf1l+pSWYKBy3xrBDuGwJEIdJPe9in8AQc3fNXJcBNUnqHOTi3GmH\r\n63N78fF6/94Kb7hRRh4wlCAmSlMFZ3Z1xLl11IW0ZuBYkvafDl9ICordiWxq\r\nLAkbuNBMHxdXB4c4zgK1HuxnRJeLmtdDjHmuryaS2o4qlnkvkIRRy+qJgtYF\r\nqZKxtLRv37oqvNiExfyQ/0AbHXjIjK8TcHs=\r\n=ZDuF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.  \nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","_integrity":"sha512-DqOz9hf06fawPVtIWTn3vq27ni4lPWkKTIQKnTulGmSpmQGwO4UuRROqtaM/nosTXofMCChZ6rGhYqBbLcelbQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-04-03T02:02:47.977Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"uuid":"^9.0.0","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^23.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.1","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.3-build-joshbwlng-update-readme-aebb344324fda53af19897094c8ad10b18c0dd65-1_1680487503144_0.8088715542384717","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.3-build-joshbwlng-bump-autumndb-525f11b49b7569d8f074407d2e16feea52f72ed6-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.3-build-joshbwlng-bump-autumndb-525f11b49b7569d8f074407d2e16feea52f72ed6-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.3-build-joshbwlng-bump-autumndb-525f11b49b7569d8f074407d2e16feea52f72ed6-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"62c4b2d93bdeb7dc555bf2bfeea5e69f89b9c755","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.3-build-joshbwlng-bump-autumndb-525f11b49b7569d8f074407d2e16feea52f72ed6-1.tgz","fileCount":32,"integrity":"sha512-Mw2+ES3zewA5ipTzKt1HMStcLBy1sWLzadNAq6E6p/QV/3/2OgP7KX6CY3ew8LSD5rQUsLPZVDeRy2uxDqR6Dw==","signatures":[{"sig":"MEYCIQDgw+PUsnUFl4ViBg9PdP26QB5nJaDiEtaIAXEM4N9bWQIhANjuNWZ/OBCYMrZ/H/kyWiuIWL3JqikqJRqwNsg6DcV0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKo3QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroERAAg0UIqF09DmuBPSN7OlN4sIjxpU+2cy0BsXZNGEDy64/7T8XE\r\njCPaobT3ps1uW+UN37fc9NggCdFmoxoJFQbBcUtRfrg6dnlsg4eWGTEY1Bw2\r\n0C68EEKNiJ1aT+1a3DfGuL/QYW8wQfGwjqofiGbWo6DxJP83X/wwF4oy1jPX\r\n5KYtEQ105zpLGwvMgsZoCVKkI55+CI17QMFZWtYspuCGCklhEtq5mV1YMsBO\r\nEOtCMlwDwwXFVjr2mxV74Z3slDzrPlAVQQc2R1SsZQfJ0GgYUwgdYmqQWjvv\r\neOfqsQZ+MCnVwUok0bCIr67A6t2JIfQ7NnYHFwL7gDFMRhqaqtGIoG10j2gM\r\nLC/XpcwbjZBvUC/7KyBLTNtyg1KbRB8rKpnU/bnPkNSLghr8GNWtfdTnkWL0\r\nLYn6gcSv7S5p56fIIQKRoYIVmnLOuOtIOWnEyLvmM8LL31ibRkzlpQ5PEwea\r\nfSSTtIusr+VW6BEHgXtzGmcCJmPML7q+PFM0iwgP6ReXcdA4aot3Y0tCOUD1\r\nMqyizCalQoqj/eKOcN2HTM5NKEyLoe6+def2mZ7moldt6qtpdwdWPo7Md51p\r\ndpMIuwMUXHfWIiE2IVjEqTxNbER//86z28y0Ck1txbQbrOugCLc/Nf/N3sIe\r\nrhBKaQJWeFr9MhJH7AEEw65VwxgkvyRTzL8=\r\n=CQQ2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.  \nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","_integrity":"sha512-Mw2+ES3zewA5ipTzKt1HMStcLBy1sWLzadNAq6E6p/QV/3/2OgP7KX6CY3ew8LSD5rQUsLPZVDeRy2uxDqR6Dw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-04-03T08:24:17.979Z"},"_npmVersion":"9.5.0","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.15.0","dependencies":{"uuid":"^9.0.0","axios":"^1.0.0","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^26.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.1","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.3-build-joshbwlng-bump-autumndb-525f11b49b7569d8f074407d2e16feea52f72ed6-1_1680510415931_0.8023060462257983","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.3-build-joshbwlng-downgrade-axios-ec20936c8236f8bf780806bc2961c66068169168-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.3-build-joshbwlng-downgrade-axios-ec20936c8236f8bf780806bc2961c66068169168-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.3-build-joshbwlng-downgrade-axios-ec20936c8236f8bf780806bc2961c66068169168-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"54db8ca7ae539271684aa7f6baa39d1e5e14ffe9","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.3-build-joshbwlng-downgrade-axios-ec20936c8236f8bf780806bc2961c66068169168-1.tgz","fileCount":32,"integrity":"sha512-Yf9DbAdPdfV+AUHRbjswJPT/kVIFSChiSgQrlVoSQ1Ak1R0El3QCHbHfGe9QN+dFFdD9fzsJzdSMFRnTODJk6A==","signatures":[{"sig":"MEYCIQCuZHIfxE6kdbaErXs94gwM3/MpfR3v10noTaXNRKPzSQIhAMo68CgcMbm8G7inpq8rF95qNaPBrRK6+BgYYcfrsnPt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160135},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.  \nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n\n# Documentation\n\nVisit the website for complete documentation: https://product-os.github.io/jellyfish-client-sdk\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","_integrity":"sha512-Yf9DbAdPdfV+AUHRbjswJPT/kVIFSChiSgQrlVoSQ1Ak1R0El3QCHbHfGe9QN+dFFdD9fzsJzdSMFRnTODJk6A==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-12T23:23:23.385Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.0","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^26.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.1","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.3-build-joshbwlng-downgrade-axios-ec20936c8236f8bf780806bc2961c66068169168-1_1691882738967_0.8029878983486183","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.3":{"name":"@balena/jellyfish-client-sdk","version":"13.11.3","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.3","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"af8a9bb29df61be301aebb7b77e36c2a78a54195","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.3.tgz","fileCount":30,"integrity":"sha512-bPYSFJdQYTChwRkk4Gki6Vp+uxWBLl/EygA+lKW8kp9aYZaUpGlL/F4V2NdgWXu1gi9wPqIOTJDD5CuFCEUofw==","signatures":[{"sig":"MEQCIDcFYPeNoXhe65T2L8/hW+74H1Hyhu0KikXFNS3WW2lcAiB/8uAuiJ+N3IyLXzAn/cGmfs+t8mZntVxXsetjADyTDQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160060},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"doc":"typedoc lib/ && touch docs/.nojekyll","lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.3.tgz","_integrity":"sha512-bPYSFJdQYTChwRkk4Gki6Vp+uxWBLl/EygA+lKW8kp9aYZaUpGlL/F4V2NdgWXu1gi9wPqIOTJDD5CuFCEUofw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-12T23:23:23.385Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.0","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","typedoc":"^0.23.28","autumndb":"^26.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.1","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.3_1691890127129_0.3150370717789015","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.4-build-joshbwlng-remove-typedoc-17838ed6b08bc0de6b54b3d1090c928edd537c7e-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.4-build-joshbwlng-remove-typedoc-17838ed6b08bc0de6b54b3d1090c928edd537c7e-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.4-build-joshbwlng-remove-typedoc-17838ed6b08bc0de6b54b3d1090c928edd537c7e-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"69b1a0c767d295cfda0d8893851670e30dff6eba","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.4-build-joshbwlng-remove-typedoc-17838ed6b08bc0de6b54b3d1090c928edd537c7e-1.tgz","fileCount":32,"integrity":"sha512-YvVZoNk1+S5ULCWd65rCPfN4hlplnu0Yb9nQ0IsxG7/TpHw0aj4Rt2C+fDWjWOzk4/fNU1DshMlivFLYcTN6og==","signatures":[{"sig":"MEYCIQCmRp+0m0fcLyzeHW5JN5+7ctUC+5tEAcWkQ5qQrcXVWwIhAJ9uldGmnnqghK42bEgsisVz1GACtFpqoitG8rfb8Dzw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159940},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.4.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.\nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.4.tgz","_integrity":"sha512-YvVZoNk1+S5ULCWd65rCPfN4hlplnu0Yb9nQ0IsxG7/TpHw0aj4Rt2C+fDWjWOzk4/fNU1DshMlivFLYcTN6og==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-28T08:08:53.699Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","autumndb":"^26.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.1","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.4-build-joshbwlng-remove-typedoc-17838ed6b08bc0de6b54b3d1090c928edd537c7e-1_1693210302876_0.14689195584017223","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.4":{"name":"@balena/jellyfish-client-sdk","version":"13.11.4","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.4","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"ab9d57a45f0dc56a789f6d8dbcd29ab7e3e7e5db","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.4.tgz","fileCount":30,"integrity":"sha512-BEH3Rjjxl60qHOI784MC1i0aRdcyzFXlnKCUHZjKh2cfcQR+3gXcWt6gm5wQKEtgJHZ7xjL9YepNDxKdkxUWyQ==","signatures":[{"sig":"MEYCIQDmouhawK6OaY7nQmwoZUIG3GftQ5MrGgG4FVHWWwQoBQIhALr2nquso9lsq7WVdEPSJPfyNO72ILGhCfF/uHRb9WO4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159866},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.4.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.4.tgz","_integrity":"sha512-BEH3Rjjxl60qHOI784MC1i0aRdcyzFXlnKCUHZjKh2cfcQR+3gXcWt6gm5wQKEtgJHZ7xjL9YepNDxKdkxUWyQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-28T08:08:53.699Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","nock":"^13.3.0","sinon":"^15.0.3","rimraf":"^4.4.1","deplint":"^1.1.3","ts-jest":"^29.0.5","autumndb":"^26.0.2","prettier":"^2.8.7","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.1","lint-staged":"^13.2.0","@balena/lint":"^6.2.2","@types/sinon":"^10.0.13","@types/lodash":"^4.14.190","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.8.1","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.4_1693210470377_0.15091685016099965","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.5-build-joshbwlng-bump-dev-deps-2adb71d8e1119856b04db2704995239029497759-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.5-build-joshbwlng-bump-dev-deps-2adb71d8e1119856b04db2704995239029497759-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.5-build-joshbwlng-bump-dev-deps-2adb71d8e1119856b04db2704995239029497759-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"03d57eadb09c09c74bd2b650f6c69e361f3c191a","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.5-build-joshbwlng-bump-dev-deps-2adb71d8e1119856b04db2704995239029497759-1.tgz","fileCount":32,"integrity":"sha512-soIiN6V114DlQtiePc++G+IVkL2ZJ9hh3b2OtyGe3ueleuYqajmznLLGPksR1g6emnyeqJ6AYMFwZC7e9quoxQ==","signatures":[{"sig":"MEQCIEi/jHC+waJpImYXMXv5CnOJlJJeIOeFkGfk7pXf3zLLAiAzO0djaz40Vr5HOr35mnwTCa3S3WYq5YThHnYQRr+Udw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159939},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.5.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.\nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.5.tgz","_integrity":"sha512-soIiN6V114DlQtiePc++G+IVkL2ZJ9hh3b2OtyGe3ueleuYqajmznLLGPksR1g6emnyeqJ6AYMFwZC7e9quoxQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-28T08:26:56.232Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.3","sinon":"^15.2.0","rimraf":"^5.0.1","deplint":"^1.1.3","ts-jest":"^29.0.5","autumndb":"^26.0.2","prettier":"^3.0.2","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.2","lint-staged":"^14.0.1","@balena/lint":"^6.2.2","@types/sinon":"^10.0.16","@types/lodash":"^4.14.197","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.9.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.5-build-joshbwlng-bump-dev-deps-2adb71d8e1119856b04db2704995239029497759-1_1693211323437_0.12964605878995328","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.5":{"name":"@balena/jellyfish-client-sdk","version":"13.11.5","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.5","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"c702bf835b805fdea6e73c3f9ec524dc54c488e3","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.5.tgz","fileCount":30,"integrity":"sha512-mih4Ad0eoc8jw6iEI74INehhp6LPxuPRxRRtPB3/a5vZBGG2VvozNn8op11mQelro93PyNmjzD+zGgRM4O7iPg==","signatures":[{"sig":"MEUCIApqQHfd3jfhUD3FCTaMe78V9t7VYUXMlmoftUraAtNMAiEAgm3tILNj2RDfqbvDknL26dUl7i1fHzg5AlPZOgdC/eY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159866},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.5.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.5.tgz","_integrity":"sha512-mih4Ad0eoc8jw6iEI74INehhp6LPxuPRxRRtPB3/a5vZBGG2VvozNn8op11mQelro93PyNmjzD+zGgRM4O7iPg==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-28T08:26:56.232Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.6.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","nock":"^13.3.3","sinon":"^15.2.0","rimraf":"^5.0.1","deplint":"^1.1.3","ts-jest":"^29.0.5","autumndb":"^26.0.2","prettier":"^3.0.2","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.2","lint-staged":"^14.0.1","@balena/lint":"^6.2.2","@types/sinon":"^10.0.16","@types/lodash":"^4.14.197","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.9.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.5_1693211658092_0.5488515885874485","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.6-build-joshbwlng-update-socket-io-client-10941a51c5435293fd61907cdb96ba6ec809d99e-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.6-build-joshbwlng-update-socket-io-client-10941a51c5435293fd61907cdb96ba6ec809d99e-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.6-build-joshbwlng-update-socket-io-client-10941a51c5435293fd61907cdb96ba6ec809d99e-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"f0c00f18e21feb1a91c3943969c3905892746b9e","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.6-build-joshbwlng-update-socket-io-client-10941a51c5435293fd61907cdb96ba6ec809d99e-1.tgz","fileCount":32,"integrity":"sha512-tNgrdQlKSkwRENx2CVP8jExg6XlYIplG1Mz4YmSOYA8ar3Y/zLBPAd0/6kXUpp4jMTgZe8fLBtaoN3WqeBmqPQ==","signatures":[{"sig":"MEQCIFWxfjnnzKWH2+LLiKcXbLEjl5MJJb1kKDW4L8hSYgbKAiA01xK98rmIict4VYmoT0Jw5ENWS89yN+MELmCs0NPocA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159949},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.6.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.\nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.6.tgz","_integrity":"sha512-tNgrdQlKSkwRENx2CVP8jExg6XlYIplG1Mz4YmSOYA8ar3Y/zLBPAd0/6kXUpp4jMTgZe8fLBtaoN3WqeBmqPQ==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-28T08:35:39.499Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.7.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.5.0","nock":"^13.3.3","sinon":"^15.2.0","rimraf":"^5.0.1","deplint":"^1.1.3","ts-jest":"^29.0.5","autumndb":"^26.0.2","prettier":"^3.0.2","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.2","lint-staged":"^14.0.1","@balena/lint":"^6.2.2","@types/sinon":"^10.0.16","@types/lodash":"^4.14.197","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.9.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.6-build-joshbwlng-update-socket-io-client-10941a51c5435293fd61907cdb96ba6ec809d99e-1_1693211856928_0.9092674816360646","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.6":{"name":"@balena/jellyfish-client-sdk","version":"13.11.6","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.6","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"08c2fb1aa30c056a3237a1dad7579d676362e01d","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.6.tgz","fileCount":30,"integrity":"sha512-ZvJ3mXRRCehtaV5N8QCXDHcV+41r6xHgnB947d7298UI+q3AWv0nU1S5yLHYqNocT3rXmZpfYF1ZBxywAcD6SA==","signatures":[{"sig":"MEUCIQDIDQpgdAWxuislSEodCRgq+Ce6KWxI4sPTdZggQdzqmwIgJZtFYOt3G1AQk6xAoOLJwRN4df8oA00LPp+/wGBNJQY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159866},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.6.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.6.tgz","_integrity":"sha512-ZvJ3mXRRCehtaV5N8QCXDHcV+41r6xHgnB947d7298UI+q3AWv0nU1S5yLHYqNocT3rXmZpfYF1ZBxywAcD6SA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-28T08:35:39.499Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.7.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","nock":"^13.3.3","sinon":"^15.2.0","rimraf":"^5.0.1","deplint":"^1.1.3","ts-jest":"^29.0.5","autumndb":"^26.0.2","prettier":"^3.0.2","typescript":"^5.0.3","@types/jest":"^29.5.0","@types/node":"^18.15.11","@types/uuid":"^9.0.2","lint-staged":"^14.0.1","@balena/lint":"^6.2.2","@types/sinon":"^10.0.16","@types/lodash":"^4.14.197","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.9.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.6_1693212012511_0.5832772580126155","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.7-build-joshbwlng-update-typescript-4ecb80c071c6869888e93b0a1132ac5db2e8a638-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.7-build-joshbwlng-update-typescript-4ecb80c071c6869888e93b0a1132ac5db2e8a638-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.7-build-joshbwlng-update-typescript-4ecb80c071c6869888e93b0a1132ac5db2e8a638-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"e9a46b0ccb673c877cb435627d09f5421198503b","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.7-build-joshbwlng-update-typescript-4ecb80c071c6869888e93b0a1132ac5db2e8a638-1.tgz","fileCount":32,"integrity":"sha512-d4/mnHlDksftJsVIlhe5yPMFP0byoxe6jHfLay3+nlzeX2uW+LKMF/MQRxy6ScAlaZhXjbzykQK2/9RSMp3kFw==","signatures":[{"sig":"MEUCIQDSlIsjlqAdb6ChKL4Jqsn9msjlbAQVgrVxWGjWmvtkzQIgZtYykJKB73tK0FPqx334ErJXCASYUfjFHO9+vMqTJ0I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159943},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.7.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.\nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.7.tgz","_integrity":"sha512-d4/mnHlDksftJsVIlhe5yPMFP0byoxe6jHfLay3+nlzeX2uW+LKMF/MQRxy6ScAlaZhXjbzykQK2/9RSMp3kFw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-28T08:44:28.651Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.7.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.6.4","nock":"^13.3.3","sinon":"^15.2.0","rimraf":"^5.0.1","deplint":"^1.1.3","ts-jest":"^29.1.1","autumndb":"^26.0.2","prettier":"^3.0.2","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^18.15.11","@types/uuid":"^9.0.2","lint-staged":"^14.0.1","@balena/lint":"^7.0.2","@types/sinon":"^10.0.16","@types/lodash":"^4.14.197","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.9.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.7-build-joshbwlng-update-typescript-4ecb80c071c6869888e93b0a1132ac5db2e8a638-1_1693212391118_0.1718178933009955","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.7":{"name":"@balena/jellyfish-client-sdk","version":"13.11.7","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.7","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"53ea899b4c0e15a6fd37d4125f933612f409f288","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.7.tgz","fileCount":30,"integrity":"sha512-ZkIsEKZT+lotft0KoQ4MSqtMuqClheCGTyRrnZ7ZH269CbkkhSle+6kq4Z5eE49Mt46g0SSQrzrxRw85xo6I7g==","signatures":[{"sig":"MEYCIQCRtJxwgZ42leEShyTYto8uWmrihKsakqA+wA8A4CuxAAIhAMVGx07aclCvAjfg5/B8GBfjEu+gFu6WzO+cLDwl7yV4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159866},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.7.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.7.tgz","_integrity":"sha512-ZkIsEKZT+lotft0KoQ4MSqtMuqClheCGTyRrnZ7ZH269CbkkhSle+6kq4Z5eE49Mt46g0SSQrzrxRw85xo6I7g==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-08-28T08:44:28.651Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.7.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.4","nock":"^13.3.3","sinon":"^15.2.0","rimraf":"^5.0.1","deplint":"^1.1.3","ts-jest":"^29.1.1","autumndb":"^26.0.2","prettier":"^3.0.2","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^18.15.11","@types/uuid":"^9.0.2","lint-staged":"^14.0.1","@balena/lint":"^7.0.2","@types/sinon":"^10.0.16","@types/lodash":"^4.14.197","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.9.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.7_1693212541583_0.39256723487820877","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.8-build-joshbwlng-update-autumndb-e93ad4794cdeedd821f2d7ad89d07065a7472332-1":{"name":"@balena/jellyfish-client-sdk","version":"13.11.8-build-joshbwlng-update-autumndb-e93ad4794cdeedd821f2d7ad89d07065a7472332-1","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.8-build-joshbwlng-update-autumndb-e93ad4794cdeedd821f2d7ad89d07065a7472332-1","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"fd465cd8055b6879f9dd10e144b983d3273b48ce","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.8-build-joshbwlng-update-autumndb-e93ad4794cdeedd821f2d7ad89d07065a7472332-1.tgz","fileCount":32,"integrity":"sha512-vBVpdVaOEDYxwKLvhESh/i6oaH9jGIhIratZ8WTAEfHF2WgUprzG5U5NAfFDtSYdzRck9gr1/WsoBLs4IQZScA==","signatures":[{"sig":"MEUCIArq6B/YUTh71iPgXoj8TkUFQX9lMq7g5XMAhGoKsJ17AiEAuJZ3XV72Wt3AE8K9Kpqf37Y2XN7V9art15z5GBwKKWI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159942},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.8.tgz","types":"build/index.d.ts","readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.\nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.8.tgz","_integrity":"sha512-vBVpdVaOEDYxwKLvhESh/i6oaH9jGIhIratZ8WTAEfHF2WgUprzG5U5NAfFDtSYdzRck9gr1/WsoBLs4IQZScA==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-09-03T00:05:44.072Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.7.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.6.4","nock":"^13.3.3","sinon":"^15.2.0","rimraf":"^5.0.1","deplint":"^1.1.3","ts-jest":"^29.1.1","autumndb":"^29.0.18","prettier":"^3.0.2","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^18.15.11","@types/uuid":"^9.0.2","lint-staged":"^14.0.1","@balena/lint":"^7.0.2","@types/sinon":"^10.0.16","@types/lodash":"^4.14.197","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.9.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.8-build-joshbwlng-update-autumndb-e93ad4794cdeedd821f2d7ad89d07065a7472332-1_1693699712310_0.39845060979591107","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"13.11.8":{"name":"@balena/jellyfish-client-sdk","version":"13.11.8","author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","_id":"@balena/jellyfish-client-sdk@13.11.8","maintainers":[{"name":"dfunckt","email":"akiskesoglou@gmail.com"},{"name":"page","email":"page@balena.io"},{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"dist":{"shasum":"218cb2bc17ed6b0507ebd89aca33ff6f0c818d26","tarball":"https://registry.npmjs.org/@balena/jellyfish-client-sdk/-/jellyfish-client-sdk-13.11.8.tgz","fileCount":30,"integrity":"sha512-v+zmh0at52fVa3nNYBlBFfzRqLhbFHpOZ8NF7e85SgUHvYLNjGOEGSPYF+BeiQBnGyVvvngfystEGcMAMEELcw==","signatures":[{"sig":"MEUCIEfCQb2K03eMkr4Lo3eT/bBG4GdvHyMjcwvU7RFSp6k0AiEAonjGkJz5eFwq5VtN7Xq8k0YACe0yImISYKRtLiyopiQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":159867},"main":"build/index.js","_from":"file:/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.8.tgz","types":"build/index.d.ts","deplint":{"files":["lib/**/*.{ts}"],"modules":["lib"]},"engines":{"node":">=16.0.0"},"scripts":{"lint":"balena-lint lib test && deplint && prettier --check **/*.json **/*.yml","test":"npm run lint && npm run test:unit","build":"npm run clean && tsc -p tsconfig.build.json","clean":"rimraf build","prepack":"npm run build","lint:fix":"balena-lint --fix lib test && prettier -w **/*.json **/*.yml","test:unit":"jest test"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"_resolved":"/home/runner/work/_temp/balena-jellyfish-client-sdk-13.11.8.tgz","_integrity":"sha512-v+zmh0at52fVa3nNYBlBFfzRqLhbFHpOZ8NF7e85SgUHvYLNjGOEGSPYF+BeiQBnGyVvvngfystEGcMAMEELcw==","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"versionist":{"publishedAt":"2023-09-03T00:05:44.072Z"},"_npmVersion":"9.6.7","description":"HTTP client SDK for Jellyfish","directories":{"lib":"lib"},"lint-staged":{"*.ts":["balena-lint --fix"],"*.{json,yml}":["prettier -w"]},"_nodeVersion":"18.17.1","dependencies":{"uuid":"^9.0.0","axios":"^0.27.2","lodash":"^4.17.21","is-uuid":"^1.0.2","deep-copy":"^1.4.2","common-tags":"^1.8.2","fast-json-patch":"^3.1.1","socket.io-client":"^4.7.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.6.4","nock":"^13.3.3","sinon":"^15.2.0","rimraf":"^5.0.1","deplint":"^1.1.3","ts-jest":"^29.1.1","autumndb":"^29.0.18","prettier":"^3.0.2","typescript":"^5.2.2","@types/jest":"^29.5.4","@types/node":"^18.15.11","@types/uuid":"^9.0.2","lint-staged":"^14.0.1","@balena/lint":"^7.0.2","@types/sinon":"^10.0.16","@types/lodash":"^4.14.197","@types/is-uuid":"^1.0.0","simple-git-hooks":"^2.9.0","@types/common-tags":"^1.8.1"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/jellyfish-client-sdk_13.11.8_1693707220134_0.672321946258281","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."}},"time":{"created":"2020-03-24T10:50:27.308Z","modified":"2026-01-29T09:00:20.030Z","0.0.3-publish-package-3e91814755cf14f501f5584c2f7b8c23452aaaf9":"2020-03-24T10:50:27.619Z","0.0.3":"2020-03-24T12:02:45.045Z","0.1.0-update-link-constraints-1135b82dd56b8ad052f1e49af849a1f57264bae1":"2020-03-27T09:34:38.048Z","0.1.0":"2020-03-27T09:46:22.130Z","0.2.0-update-to-latest-eaee3de7e1948a2803c0a87bc3f76ec70bdc23fc":"2020-04-03T10:00:59.064Z","0.2.0":"2020-04-03T10:07:49.432Z","0.2.1-lucianbuzzo-expose-link-constraints-7-b7fd4e8f051a2018613f643ad1a9be0db40b8299":"2020-04-17T10:37:48.464Z","0.2.1":"2020-04-17T10:46:28.473Z","0.2.2-lucianbuzzo-remove-unnecessary-9-db62c0d836bf23fae7cf4d49cd163bab792526a9":"2020-05-01T08:15:37.209Z","0.2.2":"2020-05-01T09:25:09.315Z","0.2.3-lucianbuzzo-add-required-keyword-11-59b975eab54c4029fcfd3ab67ff409fb60180b27":"2020-05-05T09:40:10.715Z","0.2.3":"2020-05-05T09:51:08.687Z","0.2.4-grahammcculloch-uuid-v4-02d8f3eea943df4956d39acff39c785a6cc7d0f1":"2020-05-07T03:25:15.731Z","0.3.0-grahammcculloch-sales-thread-ownership-bb03406994bf7d572cc38cda8af8f206140ee0be":"2020-05-07T03:38:47.198Z","0.2.4":"2020-05-07T09:50:25.006Z","0.3.0-grahammcculloch-sales-thread-ownership-34437fac279b8d7135fc68929d26342ad2b5deac":"2020-05-07T11:17:10.022Z","0.3.0":"2020-05-07T11:20:14.556Z","0.4.0-lucianbuzzo-define-a-relationship-15-63841847e271c495d7afb4fb515a3ea80fb996e4":"2020-05-11T12:00:35.483Z","0.4.0":"2020-05-11T12:04:44.439Z","0.4.0-group-members-relationship-b1f5853b9a0aab4423b2cfe8c3971859ba5d5c8f":"2020-05-28T07:19:21.891Z","0.5.0-group-members-relationship-aa85982ae6eace98eba4abea6e02ce9e67448b16":"2020-05-28T09:17:23.377Z","0.5.0":"2020-06-01T01:17:14.575Z","0.6.0-web-push-relationship-4fa5657cbb9f6a7a39d38a001397e8bf2d88639e":"2020-06-03T03:22:26.693Z","0.6.0":"2020-06-03T03:59:29.894Z","0.7.0-summary-mark-read-70af36cb319cabc7ac3f874624ac9f551eac1238":"2020-06-16T07:04:12.346Z","0.7.0-summary-mark-read-0cd645d27ef22665d6e1ec97324ae8ad4542e590":"2020-06-16T07:16:43.559Z","0.6.1-fix-minor-readme-issue-8d6834e8c50b335351c501e8c19edf2253a564d1":"2020-06-17T00:26:49.355Z","0.6.1":"2020-06-17T00:51:31.984Z","0.7.0-summary-mark-read-912eb7976319e1781476c5716b6ce096eed07e43":"2020-06-17T08:45:24.543Z","0.7.0":"2020-06-17T13:12:51.827Z","0.7.1-getWithTimeline-query-options-9874bcd46f42aa72df4b72c97af75c10eeff7a53":"2020-06-17T22:34:59.684Z","0.7.1-getWithTimeline-query-options-3f60dc12b35577e407f2973a9d639a2c5a9e8fc3":"2020-06-17T22:47:56.417Z","0.7.1-getWithTimeline-query-options-5ee3620dbf6523793e3b84eab2de1306141dbe63":"2020-06-17T22:54:41.778Z","0.7.1-getWithTimeline-query-options-a04d68b365490274df330450a9c3bc4f9339201e":"2020-06-17T23:01:30.807Z","0.7.1-getWithTimeline-query-options-19336c2cccd553a691c879303b05764432cd7cda":"2020-06-17T23:24:45.381Z","0.7.1-getWithTimeline-query-options-130d3468a5ed6e7492fc6c0a4bfd17d1b7710335":"2020-06-17T23:30:05.965Z","0.7.1-getWithTimeline-query-options-edaa075f293cb28016caad83f30b29e92b418ad5":"2020-06-17T23:38:16.846Z","1.0.0-getWithTimeline-query-options-3df2f424a73695730ed365625795e635321374a3":"2020-06-18T03:09:02.434Z","1.0.0-getWithTimeline-query-options-e96eb09b31ddee60354f6a3804c748a986050ea9":"2020-06-18T03:16:59.402Z","1.0.0-getWithTimeline-query-options-3b3bf7ed50e44cc06f64ead436512b7fadeebf20":"2020-06-18T03:17:19.428Z","1.0.0-getWithTimeline-query-options-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba":"2020-06-18T03:22:29.240Z","1.0.0-getWithTimeline-update-88beadcba64fc86a14f5c6b49cce3fa60e2c5cba":"2020-06-18T03:31:06.587Z","1.0.0-getWithTimeline-update-8029d85dd226a1ea9518d4c422ca8a9d17b19074":"2020-06-18T03:34:18.844Z","1.0.0-getWithTimeline-update-d0840bf182638b26b4a307f5bf5027da57aa28b2":"2020-06-18T04:12:01.017Z","1.0.0":"2020-06-18T04:14:58.207Z","1.1.0-markAsRead-mentionsGroup-a2344b8c385cc6e1a0b85e35eedfbe6c1d11e69f":"2020-06-18T16:53:20.575Z","1.1.0-markAsRead-mentionsGroup-647d8041988dd6b7c5e19341f2e754e02927ccb4":"2020-06-19T02:35:13.195Z","1.1.0":"2020-06-19T05:01:30.235Z","1.1.1-form-response-links-1dec8273905dcd1f9c3f057629b2450aeccd487b":"2020-06-22T18:55:32.631Z","1.1.1-form-response-links-25d0b3f8f701f09cb14ae109a412dcdf562a77fa":"2020-06-23T12:52:26.084Z","1.1.1":"2020-06-23T21:49:46.316Z","2.0.0-rename-support-issue-has-attached-support-thread-association-e26fcf978bdcbee115de21c7b5cb1c3454c49d31":"2020-06-23T23:13:37.459Z","1.2.0-mark-as-read-1-to-1-b80ad2bcb736f6a75ba6dab62b7d3a300313baaf":"2020-07-20T02:37:16.732Z","1.2.0":"2020-07-20T07:28:42.753Z","1.3.0-link-support-thread-to-pattern-e664179c5ae87702f0f7f5e18f45cdf51b41bcb3":"2020-07-22T06:48:18.250Z","1.3.0-link-support-thread-to-pattern-4ecf0a042b3d74091a131337ba73e43ff0524030":"2020-07-22T07:25:59.933Z","1.3.0":"2020-07-22T07:36:18.955Z","1.4.0-streams-options-fb3a9f5185b722a5c9117b9a40ee7da324ce5448":"2020-07-24T07:00:06.041Z","1.4.0":"2020-07-24T07:05:07.873Z","1.5.0-pattern-has-pi-c218f8a494c341fcefb031a7972eadb252642644":"2020-07-24T10:18:57.196Z","1.5.0":"2020-07-24T10:22:58.737Z","1.5.1-form-response-gh-and-pattern-links-e2f177714147b541c12a2840cee2b244bbd4c558":"2020-07-30T08:38:15.993Z","1.5.1":"2020-07-30T11:40:58.151Z","2.0.0-remove-stream-options-342a7ed63037367b1e0fad9a91e3f945fa6cc4ef":"2020-07-30T12:49:23.549Z","2.0.0":"2020-07-30T12:52:34.534Z","1.6.0-loopmvp-link-milestone-to-pi-89421f2d8573d052d85a85b626266ee519482290":"2020-07-30T13:15:35.294Z","2.1.0-loopmvp-link-milestone-to-pi-1b6d16287061d19fa071069ae79f3badd03539ae":"2020-07-31T10:18:21.479Z","2.1.0":"2020-08-03T01:12:23.295Z","2.1.1-lucianbuzzo-markasread-function-33-52dd7b886f65e7a583dec20c4e859cb51c02ffd4":"2020-08-14T14:46:00.940Z","2.1.1-lucianbuzzo-markasread-function-33-80b229c77a492a039b8f6e14a5d20d4241bf8316":"2020-08-14T14:52:19.253Z","2.1.1-lucianbuzzo-markasread-function-33-a5e6c805e0b1e7327f14902524fdb4b63f7b1e92":"2020-08-14T15:08:18.357Z","2.1.1-lucianbuzzo-markasread-function-33-581ace32365d1a4ca0211a5e88d137b37d67e7a0":"2020-08-14T15:20:34.216Z","2.1.1-lucianbuzzo-markasread-function-33-2b9aa67e40e2efac8220a959a55981331c3fdbd1":"2020-08-14T15:46:06.470Z","2.1.1":"2020-08-14T16:05:27.811Z","2.1.2-add-renovate-config-cc55cc7b77c76b043bd8be8504777790cdc36127":"2020-08-16T12:45:09.429Z","2.1.2":"2020-08-17T01:06:51.937Z","2.1.3-remove-dev-major-5affea240a212e8750a771038709a52082b90063":"2020-08-18T01:44:41.038Z","2.1.3":"2020-08-18T01:49:59.637Z","2.1.4-remove-debug-call-3e93e73e46de944ca8b0019bb77f7741ff001008":"2020-08-20T01:07:57.486Z","2.1.4":"2020-08-20T03:41:42.712Z","2.1.5-renovate-eslint-7-x-decf8bfab409ece7b283e643a425749f08e4ebc4":"2020-09-01T08:22:08.754Z","2.1.5-renovate-eslint-plugin-lodash-7-x-069266b286404040597fb30d8634f4f7e3dd0533":"2020-09-01T08:23:10.974Z","2.1.5-renovate-eslint-7-x-abdfff83a1332d8802c7345565e390fc8463264f":"2020-09-01T20:52:31.762Z","2.1.5-renovate-eslint-plugin-jsdoc-30-x-4b873dd7849cc976e74f6072d3d26f0952a3985e":"2020-09-02T04:28:17.606Z","2.1.5":"2020-09-02T08:48:55.383Z","2.1.5-renovate-eslint-7-x-b52e51b8286e31a8a10058b27c96066d5c480f96":"2020-09-02T08:52:52.845Z","2.1.5-renovate-non-major-b733d073854207a8797cebbe634c1d95b9960d10":"2020-09-02T08:52:59.187Z","2.1.5-renovate-eslint-plugin-jsdoc-30-x-ac5d31f33be306a154ab59836aa246ad782d8277":"2020-09-02T08:54:04.152Z","2.1.5-renovate-jsdoc-to-markdown-6-x-7d3b6995d61f1414a417053c51c297aa3e7ffea4":"2020-09-02T08:54:18.843Z","2.1.5-renovate-nock-13-x-b54c76e792b82d055d50cf6a019e0076393629cf":"2020-09-02T08:54:58.745Z","2.1.5-renovate-uuid-8-x-4f1feaf16e4d3ad949845c5fbd01f34967bb1c96":"2020-09-02T08:55:16.232Z","2.1.6-renovate-non-major-2bb04a2d43ef0b61b7dc1fe434cb57acd34fd2b4":"2020-09-02T08:57:00.011Z","2.1.6-renovate-eslint-7-x-f6c14bdeac09e1a68dcf86066d2e48d32371de83":"2020-09-02T08:57:15.538Z","2.1.6-renovate-eslint-plugin-jsdoc-30-x-78e5fe656451e3d16b43f5f0d33f5499188c3b66":"2020-09-02T08:58:11.224Z","2.1.6-renovate-jsdoc-to-markdown-6-x-d2f7dbc7daf21c4f0a3b73047d105b2480a9c3d3":"2020-09-02T08:59:17.546Z","2.1.6-renovate-nock-13-x-f99513479de9d9f9d7dcd674746345822acbdbe7":"2020-09-02T08:59:27.660Z","2.1.6-renovate-uuid-8-x-669020239e091c264ad6936f83acaa470a1435d3":"2020-09-02T09:00:45.407Z","2.1.6-renovate-non-major-02c46d9cd879d4166253042be8e0eb06535cc0df":"2020-09-03T00:20:43.318Z","2.1.6-renovate-eslint-plugin-jsdoc-30-x-0bcf16265f571f31a007ae20c344bd7604aa7781":"2020-09-03T00:21:42.502Z","2.1.6":"2020-09-03T00:25:15.368Z","2.1.7-renovate-non-major-b2548cf5fd03be49c0b7022c14d7f19352c76084":"2020-09-03T00:30:44.956Z","2.1.7-renovate-eslint-7-x-319bcc8a18047204b2142751d49218c90062bbd6":"2020-09-03T00:31:42.824Z","2.1.7-renovate-jsdoc-to-markdown-6-x-b85908aae4f6ec0d0c2c7cd848ffa969aa7316f8":"2020-09-03T00:32:45.825Z","2.1.7-renovate-nock-13-x-c8703bc5f8a80f9a12755b57e19699f18fb73df3":"2020-09-03T00:33:03.317Z","2.1.7":"2020-09-03T00:38:15.045Z","2.1.7-renovate-non-major-28ba8a7d66d7dfdb9e1e4b8181cd6cd2ec59ca63":"2020-09-03T00:40:43.406Z","2.1.7-renovate-eslint-7-x-dd093dde3779e2f116cf89a6c8dc5f446e7f3126":"2020-09-03T00:41:53.186Z","2.1.7-renovate-eslint-plugin-jsdoc-30-x-29cf8f4a3e1a7f13f717a20e15e074758ca3c39c":"2020-09-03T00:42:40.645Z","2.1.7-renovate-jsdoc-to-markdown-6-x-6c3a3a0d18e2f27d38161b81df49a9bf5cec568f":"2020-09-03T00:43:02.170Z","2.1.8-renovate-non-major-5f942f83f0caeb9799592537a55ff68a399bbb06":"2020-09-03T00:45:01.188Z","2.1.8-renovate-eslint-7-x-c13e8efcce66e6eb601fd379e9a63af777b6ed6c":"2020-09-03T00:46:05.036Z","2.1.8-renovate-jsdoc-to-markdown-6-x-85e4df6c7203b80184c5663c3d777dc8090684a3":"2020-09-03T00:47:12.106Z","2.1.8":"2020-09-03T00:56:44.979Z","2.1.8-renovate-non-major-b6358aa8f8edd5eb9bdabdbfcd4d9604c7de984a":"2020-09-03T01:00:09.231Z","2.1.9-renovate-eslint-plugin-jsdoc-30-x-ed4d34d14395dae8bfefbd30f9ea81d2e3d9ae93":"2020-09-03T01:01:49.619Z","2.1.9-renovate-non-major-51ce5c4723fd0182a1078531651a4142f8eef959":"2020-09-03T01:02:50.084Z","2.1.9-renovate-jsdoc-to-markdown-6-x-663b22ec06781464d12881cd91621bbfde3efa8c":"2020-09-03T01:03:57.048Z","2.1.9":"2020-09-03T01:09:11.654Z","2.1.9-renovate-eslint-plugin-jsdoc-30-x-6ccd75ed0f42abdd21aaf06cd8ffc2aad497274d":"2020-09-03T01:09:42.076Z","2.1.9-renovate-jsdoc-to-markdown-6-x-bfe26d2eb019a495ec8f0fa6d258c36c58f69c35":"2020-09-03T01:10:36.566Z","2.1.10-renovate-jsdoc-to-markdown-6-x-5558f66d60f8474e834a74e31b93de9a40e6eb8a":"2020-09-03T01:13:32.104Z","2.1.10-renovate-eslint-plugin-jsdoc-30-x-bb0ff8da87c32488343c9a70177f2360a2f2aae1":"2020-09-03T01:40:22.029Z","2.1.10":"2020-09-03T01:43:52.622Z","2.1.11-renovate-jsdoc-to-markdown-6-x-b451e791362e4f220b3d51da9dfc61fd4ebee2cf":"2020-09-03T01:46:17.679Z","2.1.11-brainstorm-call-brainstorm-topic-a86df90a60da81a7c5ad02088a149374e295f0a7":"2020-09-03T10:47:09.649Z","2.1.11":"2020-09-04T12:37:41.586Z","2.1.12-renovate-jsdoc-to-markdown-6-x-f09e437a5ce1ff6753ab81f5d0a4d577a12736c3":"2020-09-04T12:42:17.931Z","2.1.12-renovate-non-major-04b70337e98368cd034f0b934207d2ce0045e712":"2020-09-06T02:37:42.808Z","2.1.12":"2020-09-06T02:41:25.360Z","2.1.13-renovate-jsdoc-to-markdown-6-x-460ea3ba6b06881647bd21d7e4e220c6ce36c26f":"2020-09-06T02:43:26.989Z","2.1.13-renovate-jsdoc-to-markdown-6-x-f4353a763b4d8b779329e821010b5f23fa84c6a2":"2020-09-06T02:46:37.852Z","2.1.13-renovate-non-major-c6e4320ebf214220f95ca24138c12d44f344df35":"2020-09-07T11:46:15.994Z","2.1.13-renovate-jsdoc-to-markdown-6-x-7df1c1ed4812467bfd2935eeda4f0f39db780bbe":"2020-09-07T11:52:37.185Z","2.1.13":"2020-09-07T11:53:06.329Z","2.1.14-renovate-jsdoc-to-markdown-6-x-26cdfc22450f2f958e5155367e3b6627f411bbab":"2020-09-07T11:59:32.270Z","2.1.14-renovate-non-major-6120c4ecfbfe33411a07c15e3c4cce63bccccb7c":"2020-09-09T00:50:45.851Z","2.1.14":"2020-09-09T00:55:24.796Z","2.1.14-renovate-jsdoc-to-markdown-6-x-98cb8ffa43ae79f9f2333ddaf2c1d0a7ab0d5255":"2020-09-09T00:56:34.058Z","2.1.15-renovate-jsdoc-to-markdown-6-x-87ec73baa4eaa7e85865e89420c42425571bcc69":"2020-09-09T01:00:12.207Z","2.1.15-renovate-non-major-d4ecf802d21bc524a3f539425bb1279500dc7318":"2020-09-11T18:35:20.479Z","2.1.15":"2020-09-11T18:39:37.345Z","2.1.15-renovate-jsdoc-to-markdown-6-x-39468b22a0c44d6f901633bef3db64c59dde8b8e":"2020-09-11T18:41:08.244Z","2.1.16-renovate-jsdoc-to-markdown-6-x-22663d748eb8afedaa36b10c6739d0fa7e7ce893":"2020-09-11T18:44:46.126Z","2.1.16-renovate-non-major-3c918321074767e89526a1f22ccf3165e74b837b":"2020-09-12T11:25:28.648Z","2.1.16-renovate-jsdoc-to-markdown-6-x-3690198e7e82ba015774e467e49d78974fb04c3e":"2020-09-12T11:30:53.312Z","2.1.16":"2020-09-12T11:30:58.954Z","2.1.17-renovate-jsdoc-to-markdown-6-x-f15a3ba45fc59e181cf0243c8d29f0f2884633ab":"2020-09-12T11:35:38.272Z","2.1.17-renovate-non-major-b48120f1150697b486cfe03980d5d1666f497fe8":"2020-09-12T19:10:26.918Z","2.1.17":"2020-09-12T19:13:08.904Z","2.1.18-renovate-jsdoc-to-markdown-6-x-292c9a4ba2b7f618bbe04d9f6429ca3ed8d1499c":"2020-09-12T19:16:20.002Z","2.1.18-renovate-non-major-9adf1c92fc8400112a74d39d4d1ee5c211a4e5f2":"2020-09-14T08:11:23.723Z","2.1.18":"2020-09-14T08:16:38.808Z","2.1.18-renovate-jsdoc-to-markdown-6-x-07859aa5683d8351281f35fbc111632dcf0afb2f":"2020-09-14T08:17:19.050Z","2.1.19-renovate-jsdoc-to-markdown-6-x-ad2d984d68c164233cb9e74e0e72823bda582b2c":"2020-09-14T08:21:43.990Z","2.1.19-user-feedback-links-bb81af97431ceeafc6a2eb8ae493e0574e3a72f9":"2020-09-15T13:04:44.520Z","2.1.19-renovate-non-major-9bbbbaeae4b0de7bde2597e24cd0c8d290fb36c4":"2020-09-16T00:32:53.862Z","2.1.19":"2020-09-16T00:36:38.389Z","2.1.19-renovate-jsdoc-to-markdown-6-x-4c06c0f5cb442f9b23eafe4505650d6d28ed5e6f":"2020-09-16T00:39:20.296Z","2.1.20-renovate-jsdoc-to-markdown-6-x-8f461f98e6a4856afe007d59abafbebbf6f1da97":"2020-09-16T00:41:35.313Z","2.1.20-user-feedback-links-147d0f55b910aec06a5f1042e54048200e8a443e":"2020-09-16T01:00:22.953Z","2.1.20":"2020-09-16T01:03:01.538Z","2.1.21-renovate-jsdoc-to-markdown-6-x-1f9f5180a602dadac7f0b605e477cd9b97f2d0b3":"2020-09-16T01:07:54.411Z","2.1.21":"2020-09-19T08:23:31.455Z","2.2.0-ui-theme-relationships-e50bc6366910741a3328b325be705645e9014aa1":"2020-09-24T01:42:31.902Z","2.2.0":"2020-09-24T01:57:47.278Z","2.2.1-renovate-non-major-2cde5528383f25c356bb696b465e620051aedeaa":"2020-09-25T11:57:30.197Z","2.2.1":"2020-09-25T12:03:41.108Z","2.2.2-renovate-non-major-0a0536926764c9c026e448dffe7d1a6c9732080c":"2020-09-26T22:15:28.466Z","2.2.2":"2020-09-26T22:19:49.045Z","2.2.3-renovate-non-major-c3e3976badc4300e31d79bb50e93605a5030c262":"2020-09-27T15:44:48.633Z","2.2.3":"2020-09-27T15:49:51.289Z","2.2.4-renovate-non-major-b654643ebe6ba6543138ec6485fc1d3eccae5107":"2020-09-28T01:47:31.489Z","2.2.4":"2020-09-28T01:50:39.286Z","2.2.5-renovate-non-major-4e139a261cd530b1d29b199a9f6d6432624f72c2":"2020-09-28T13:07:46.275Z","2.2.5":"2020-09-28T13:12:07.259Z","2.2.6-renovate-non-major-21c804bb721487976781c5dc63a4faaf73c0553d":"2020-09-29T15:55:23.544Z","2.2.6":"2020-09-29T15:58:07.572Z","2.2.7-renovate-non-major-534d4b914b81aa3b63c067e38f83d11d32889278":"2020-09-29T20:44:36.571Z","2.2.7":"2020-09-29T20:47:34.408Z","2.2.8-renovate-non-major-bea65f17ac0ff4737bad80be615566bd14a54461":"2020-09-30T16:41:34.320Z","2.2.8":"2020-09-30T16:44:49.298Z","2.2.9-renovate-non-major-f52aa3d872a08d236b903f54f69175fbaca912bb":"2020-10-02T17:14:48.562Z","2.2.9":"2020-10-02T17:19:19.115Z","2.2.10-renovate-non-major-334bf05560609bd50e83ed4ab6107152502a9e9c":"2020-10-04T15:55:16.947Z","2.2.10":"2020-10-04T15:58:15.538Z","2.2.11-renovate-non-major-e1b3ebbc44db3e7ad4707152b00e08fe8f1fd338":"2020-10-06T19:19:02.560Z","2.2.11":"2020-10-06T19:22:17.793Z","2.2.12-renovate-non-major-fb04f850ebcd01e4f94d9e06b084176739b38c9e":"2020-10-09T02:57:56.835Z","2.2.12":"2020-10-09T03:01:13.247Z","2.2.13-renovate-non-major-54f65514ea9c64e37f57dbdc93eedd64cf406996":"2020-10-09T20:31:36.076Z","2.2.13":"2020-10-09T20:35:27.601Z","2.2.14-renovate-non-major-0b9705be102c2918e1ea6d4942d6a76bc9c701c5":"2020-10-16T22:51:16.728Z","2.2.14-renovate-non-major-ec1fa9d85a70ca364f35054fbf8e98469f47984d":"2020-10-19T14:45:18.542Z","2.2.14-renovate-non-major-21bd58ef41efce6ac0cbe0afe0fea62f59bb68af":"2020-10-19T15:09:02.326Z","2.2.14-renovate-non-major-d99f255f81ed781f8ecd8b0f124fcfc5316c5927":"2020-10-19T16:09:52.243Z","2.2.14-fix-socket-drop-0ecc816991660348cbbf147bfb2ccc35bf29138a":"2020-10-20T09:41:26.680Z","2.3.0-link-support-threads-to-prs-d881bdf8c4c07bc60747d28f3256d3ce6bb6b3a7":"2020-10-22T08:24:11.008Z","2.3.0":"2020-10-22T08:54:58.490Z","2.3.1-renovate-non-major-e4243441ed040e6b503033fc74b7ae3252cd2405":"2020-10-22T09:01:16.310Z","2.3.1-renovate-eslint-config-standard-15-x-5d455e353daf29ac2363dda8b999d8ec4d1049ae":"2020-10-22T09:01:51.250Z","2.3.1-renovate-eslint-config-standard-15-x-893a22401e4e3dd2e4985ea3421df2cd77b04ddf":"2020-10-22T09:08:21.212Z","2.3.1-renovate-non-major-5d266fc52712af952dc2c9631c1ee9d11d9e7a60":"2020-10-23T18:12:35.538Z","2.3.1-renovate-non-major-3cf40e7de50b06418678e6597f4a78956335e40a":"2020-10-24T03:19:05.853Z","2.4.0-create-link-constraint-support-contribution-score-is-for-user-4da9bf2bc7f90a16459924d9d93ae6c23c764227":"2020-10-26T11:58:43.193Z","2.4.0-create-link-constraint-support-contribution-score-is-for-user-0829172f31829af4a9915adf74960c4330923631":"2020-10-27T01:42:06.849Z","2.4.0":"2020-10-27T01:44:56.578Z","2.4.1-renovate-non-major-3411a34b0fc445510e83d8ac6b0b33a0e894950e":"2020-10-27T05:04:54.780Z","2.4.1-renovate-non-major-4e11b2af13ea16182fa74e0d29818c0554e57e67":"2020-10-28T04:40:32.165Z","2.4.1-renovate-non-major-ce09c7588500916932eaeacf5742e0d1e16f9ecf":"2020-10-28T09:12:55.272Z","2.4.1-update-readme-1a3281504c4fccb5c3948162f35b057c199023fc":"2020-10-28T09:20:46.907Z","2.4.1":"2020-10-28T09:30:02.427Z","2.4.2-renovate-pruneStaleBranches-d6b3620225e06996afae26cca373bf7b3c21bc8d":"2020-10-28T11:58:08.352Z","2.4.2":"2020-10-28T12:07:24.655Z","2.4.3-renovate-eslint-config-standard-16-x-bf02a8d17dfa0a11c43ad7ec7b98a0fb3d0aab17":"2020-10-29T06:16:53.178Z","2.4.3-renovate-non-major-e80df537b31e6d9a468f55a3fdecd34b2e8d3876":"2020-10-31T07:53:32.988Z","2.4.3":"2020-10-31T07:57:05.934Z","2.4.4-renovate-eslint-config-standard-16-x-a4a66e85ad66918a12c42a2527e3d9097a6006ce":"2020-10-31T08:00:25.502Z","2.4.4-renovate-non-major-fc1cf4cedc7099cb47e11fe1510d4e9c3ef6ce6b":"2020-11-01T05:31:12.041Z","2.4.4":"2020-11-01T05:37:09.018Z","2.4.5-renovate-eslint-config-standard-16-x-13f4c8eb5bb95039ac8018013b98b28f4dd73374":"2020-11-01T05:44:39.025Z","2.4.5":"2020-11-01T13:02:04.094Z","2.4.6-renovate-non-major-8a8e5d5620d68429521c5b34055e9a4015eb74a3":"2020-11-05T04:12:42.114Z","2.4.6":"2020-11-05T04:18:46.154Z","2.4.7-renovate-major-socket-io-packages-1c80cfcb07266803b30c473a37f6d634b0d3adf8":"2020-11-05T22:59:55.740Z","2.4.7-force-renovate-node-version-e748c584fc9b2482027cb7898106d1b62f63dd80":"2020-11-06T04:58:50.838Z","2.4.7":"2020-11-06T05:55:10.057Z","2.4.8-renovate-major-socket-io-packages-8505d733c8d319fe1b66282d933437cc9e9c7728":"2020-11-06T05:59:38.003Z","2.4.8-update-link-creation-to-include-card-slug-999d61b66cdf16d612b95c1cc8b93750bb36458e":"2020-11-06T18:04:53.695Z","2.4.8-renovate-non-major-c4859f094e4b67d3de21739c15419cbd02d9cae9":"2020-11-07T02:30:08.784Z","2.4.8":"2020-11-07T02:33:35.868Z","2.4.9-renovate-major-socket-io-packages-8775a074232a9358c0588db6cf972f846bcb692c":"2020-11-07T02:36:07.376Z","2.4.9-add-repository-details-18a44484081b8549ed83cd952bfd4a0e7b990109":"2020-11-08T02:49:36.248Z","2.4.9":"2020-11-08T03:03:21.863Z","2.4.10-renovate-major-socket-io-packages-8e1e82ced1db7a5ecc5c7f784a864b4ae4b26f8e":"2020-11-08T03:07:14.032Z","2.4.10-renovate-major-socket-io-packages-1c5b6a2bf8ea6b3614d2f5fe6e1728eb44082dd1":"2020-11-09T09:36:35.120Z","2.4.10-update-link-creation-to-include-card-slug-f88bcf446d3862f472143a19f1a06c38ba942074":"2020-11-09T10:21:45.145Z","2.4.10-renovate-non-major-d60375a71230ab962f76ed463dbe8e0d859c8870":"2020-11-10T04:27:53.759Z","2.4.10":"2020-11-10T04:31:05.608Z","2.4.11-renovate-major-socket-io-packages-e712e04e1c0cad21464ddaec68b03532923deb35":"2020-11-10T04:34:54.768Z","2.4.11-use-node-14-efe496607b747db1639b812711f4562cee3c391b":"2020-11-12T03:25:31.862Z","2.4.11":"2020-11-12T04:44:33.757Z","2.4.11-renovate-major-socket-io-packages-74603aa199969f45eb6a0b96854c9c1c051b1605":"2020-11-12T04:47:28.005Z","2.4.12-renovate-non-major-49c4055b495dfbad95c89356a8dd8a5b1d916812":"2020-11-12T04:49:22.854Z","2.4.12-renovate-major-socket-io-packages-bedd3d32187ed3a3bf49917883aa9691bccdfdbf":"2020-11-12T04:49:45.302Z","2.4.12":"2020-11-12T04:52:37.910Z","2.4.12-renovate-major-socket-io-packages-55cfdfd3bf8f9154933c1dbdc83363110a9a5b04":"2020-11-12T04:55:08.033Z","2.4.13-renovate-major-socket-io-packages-a4ce978b42a6889ca170877dc94b8d6a836160ae":"2020-11-12T04:57:34.591Z","2.4.13-renovate-major-socket-io-packages-939917d014e32edfd62afa68a6562fff884671d2":"2020-11-13T04:26:34.114Z","2.4.13-renovate-non-major-299d6c9cab9020c81ad1b1b818a7d85b28977a99":"2020-11-14T12:03:26.564Z","2.4.13":"2020-11-14T12:06:45.062Z","2.4.14-renovate-major-socket-io-packages-43e27d1fa92a5c9e0f7339b73dff998abf821f72":"2020-11-14T12:10:27.944Z","2.5.0-notifications-ecf9da107ada5cab7f415eec6e4f81f4132ad3b2":"2020-11-17T15:32:46.048Z","2.4.14-renovate-major-socket-io-packages-4a08847dd416fca41debd107ac53f1536ffd70b4":"2020-11-17T23:00:37.844Z","2.5.0":"2020-11-18T14:09:06.394Z","2.5.1-renovate-non-major-eb4932889b8811c6fb9bc1729a793573c1372bde":"2020-11-18T14:14:13.401Z","2.5.1-renovate-major-socket-io-packages-23621ba1520bd6b1c7f9b1d7b93a4bd6f7f35cd9":"2020-11-18T14:15:30.589Z","2.5.1-renovate-major-socket-io-packages-1b474274419123e6a538ea9f47ce6976329e266e":"2020-11-18T14:20:31.322Z","2.5.1-renovate-non-major-30bfd2dde36ecf96c5e45be9a3377827a0cd6346":"2020-11-20T23:10:43.137Z","2.5.1":"2020-11-20T23:14:24.195Z","2.5.2-renovate-major-socket-io-packages-f53c5b1aaa78881d50768dfb19b915ea6880036f":"2020-11-20T23:16:48.249Z","2.5.2-renovate-eslint-plugin-standard-5-x-3569e538d631bb3918d21f7178c447500de31851":"2020-11-23T01:17:32.621Z","2.5.2":"2020-11-25T02:48:20.644Z","2.5.3-renovate-major-socket-io-packages-f202776405fe3d8ded536ef35293d707efd255a2":"2020-11-25T02:52:01.830Z","2.6.0-support-rating-8ef8f37f44e9be43ead09deebaa2e16622188597":"2020-11-26T12:49:50.190Z","2.6.0-support-rating-d97264bce94bb8ab33a15435c9ec3fa09be62444":"2020-12-03T09:16:03.084Z","2.6.0":"2020-12-03T11:02:10.964Z","2.6.1-renovate-major-socket-io-packages-0cfca18a7863fbb5b013697bd192ef86faff0fc2":"2020-12-03T11:06:45.958Z","2.6.1-renovate-non-major-b979ec2fa5f756f9f33b80bbf2ed8c24fef4dbb2":"2020-12-05T08:36:51.336Z","2.6.1":"2020-12-05T08:39:59.127Z","2.6.2-renovate-major-socket-io-packages-655130051e4d4af9d6f32ba12a1af89261356e39":"2020-12-05T08:43:05.151Z","2.6.2-renovate-non-major-627999f3228059417652462b95cb1c7bc04a3c47":"2020-12-07T09:17:56.813Z","2.6.2-renovate-major-socket-io-packages-4198a78e252fc910ebb5f19fb1ce8b32e83dfc14":"2020-12-07T09:24:01.856Z","2.6.2-renovate-major-socket-io-packages-9b30c1dc625585ad3cb94e4b4362dc011d262046":"2020-12-07T10:53:33.984Z","2.6.2":"2020-12-07T16:42:49.925Z","2.6.3-renovate-non-major-b1e204e25e4bd4e4dffeadb95f5ba4e752c7c369":"2020-12-08T22:14:15.025Z","2.6.3":"2020-12-08T22:17:04.886Z","2.6.4-renovate-major-socket-io-packages-62b66da0b5b755324f5c7c9812d82fdd204dd913":"2020-12-08T22:20:23.581Z","2.6.4-eslintrc-root-true-4842d9d76495004d71b56d58cbce72f5677dd870":"2020-12-11T09:04:08.345Z","2.6.4":"2020-12-11T09:07:41.619Z","2.6.5-renovate-major-socket-io-packages-4fc3ee0b29bdbd40cd71839fc3f90f71fd1061b1":"2020-12-11T09:14:41.439Z","2.7.0-transformer-constraints-fbc637c0d5ce40c2f9127ec5ab7fc50e0b04c2fb":"2020-12-11T10:15:40.257Z","2.6.5-renovate-non-major-20d42539b326a93460fc4018dac08d6fdcf0d5ad":"2020-12-11T10:22:55.748Z","2.6.5-renovate-non-major-25a8e06be9d2351b58e15f9a2cfa54145ae7b0b4":"2020-12-11T12:44:46.253Z","2.7.0":"2020-12-11T15:08:01.596Z","2.7.1-renovate-major-socket-io-packages-0c7fc886d02522f9a08565526bb88a945747a52f":"2020-12-11T15:14:58.894Z","2.7.1-renovate-non-major-8710c95502206d22e45e70a7fb1b84ee379d4ed0":"2020-12-11T15:15:30.750Z","2.7.1-renovate-ignore-node-aadeb7e8b358614d08aa345db7a79b13cf30e780":"2020-12-12T09:42:07.650Z","2.7.1":"2020-12-12T09:45:26.102Z","2.7.2-renovate-non-major-e6c7b9f825b1c77afc160af1b991b293c97dd84f":"2020-12-12T09:48:00.393Z","2.7.2-renovate-major-socket-io-packages-7a6e2fc45b2af746daa8dfab8608ec051056bded":"2020-12-12T09:48:30.466Z","2.7.2":"2020-12-12T09:53:14.232Z","2.7.3-renovate-major-socket-io-packages-f8feb763260d18854a8890f268698d6fb45edbd9":"2020-12-12T09:56:20.185Z","2.7.3-renovate-non-major-6098a5a45931e084f9c67a01da36f1aa82a3b19e":"2020-12-19T00:40:30.354Z","2.7.3":"2020-12-19T00:44:44.040Z","2.7.4-renovate-major-socket-io-packages-3ba6320e77d209aea7dfe8f05ef344f1ffe9abeb":"2020-12-19T00:49:11.829Z","2.7.4-renovate-non-major-b35bf4e48dd58e760139e02dc62f4156d6c7d2d1":"2020-12-19T08:41:17.309Z","2.7.4":"2020-12-19T08:51:58.752Z","2.7.5-renovate-major-socket-io-packages-c7aaef3906772fcd115f5ff5b165e23fbf0fd25a":"2020-12-19T08:58:20.669Z","2.7.5-renovate-non-major-bd6e12bcbb76482c86161ec21c7e55a2526555fc":"2021-01-04T23:25:59.859Z","2.7.5":"2021-01-04T23:28:52.025Z","2.7.6-renovate-major-socket-io-packages-9a43b84b11dbf70f29a9e79aead87d230015c3fe":"2021-01-04T23:31:14.337Z","2.7.6-renovate-major-socket-io-packages-b413d5a86c970e26abadd4d002d75e79b5533ab8":"2021-01-05T12:11:41.089Z","2.7.6-renovate-non-major-2d63d8e7322620c4f7b795421b1b08b68861c51b":"2021-01-06T15:12:08.484Z","2.7.6":"2021-01-06T15:14:56.344Z","2.7.7-renovate-major-socket-io-packages-89f4c7ca08f0b41131f76ae145822d333febf785":"2021-01-06T15:17:48.490Z","2.7.7-unlink-reverse-links-a9876a30b838166512391596af1153bccafe3e3f":"2021-01-11T07:38:51.777Z","2.7.7-unlink-reverse-links-99134519e2ba3fa37ea4868f43dc4211489db050":"2021-01-11T07:58:58.754Z","2.7.7-unlink-reverse-links-9a3f8722e9dce633d269adf585811728bcdeac8d":"2021-01-11T08:09:28.104Z","2.7.7-use-company-token-a9aa98cbd2b8df686b4c1f68840c013a33347f69":"2021-01-11T08:24:01.876Z","2.7.7":"2021-01-11T08:27:22.630Z","2.8.0-sales-thread-linked-to-issue-19bbd685298589850caab36d0f596a27e4891dd6":"2021-01-11T08:28:06.644Z","2.7.8-renovate-major-socket-io-packages-b20c041177e8b4f643491d448d57d2d653bfaf0f":"2021-01-11T08:29:59.407Z","2.8.0-sales-thread-linked-to-issue-77c8d700536a8f32c1961d182800f533eb64515b":"2021-01-11T08:32:41.635Z","2.8.0":"2021-01-11T08:54:23.443Z","2.8.1-renovate-major-socket-io-packages-709a06744a72f09d7f5a32fd073616a2d6fd8fda":"2021-01-11T08:59:19.924Z","2.8.1-unlink-reverse-links-431ec965ad00e44d1f9bb7e0b972f9d045e592f5":"2021-01-11T09:42:41.878Z","2.8.1":"2021-01-11T09:45:55.814Z","2.8.2-renovate-major-socket-io-packages-879147c8eceb7aaf7d9d88819154b4a7cce01643":"2021-01-11T09:51:18.499Z","2.8.2-renovate-eslint-plugin-jsdoc-31-x-29a71d3c4d25f1be42a51677892853286a567418":"2021-01-11T13:36:41.211Z","2.8.2-renovate-eslint-plugin-jsdoc-31-x-aab2c53f7c97420ea48aeeba5e2419d10c0267a8":"2021-01-11T17:36:55.100Z","2.9.0-link-patterns-and-threads-83c29f891661d1963f4ce37dcdf8a89854c3d886":"2021-01-13T03:10:46.475Z","2.9.0":"2021-01-14T01:26:33.536Z","2.9.1-renovate-eslint-plugin-jsdoc-31-x-c935a247ef5e059be673be4f49e6491da48d3996":"2021-01-14T01:31:37.620Z","2.9.1-renovate-major-socket-io-packages-66c35d88eeca43c841603c7ea104a2225bc646ce":"2021-01-14T01:32:15.879Z","2.9.1":"2021-01-14T02:24:33.799Z","2.9.2-renovate-major-socket-io-packages-33c410fe2d7228e5864eac5b20fc869cfec1da64":"2021-01-14T02:27:05.516Z","2.10.0-link-brainstorm-topics-to-threads-a49255a1e01d16f3f4ae0cee3e6eb99256166b4d":"2021-01-14T09:28:20.232Z","2.10.0":"2021-01-14T09:31:11.989Z","2.10.1-renovate-major-socket-io-packages-485a581213110513797b6b84c31a907f5b218de8":"2021-01-14T09:35:24.393Z","2.10.1-renovate-non-major-63484d1ba2facbc15f367785ccd0419c8656dde7":"2021-01-14T15:47:53.513Z","2.10.1":"2021-01-14T15:50:50.995Z","2.10.2-renovate-major-socket-io-packages-dce923cf04baccbc1de24180c31d8f3dd8ef9238":"2021-01-14T15:53:29.901Z","2.10.2-renovate-non-major-197505d003da2d7a97856b08733dca4b746d0739":"2021-01-15T00:29:54.959Z","2.10.2":"2021-01-15T00:33:03.106Z","2.10.3-renovate-major-socket-io-packages-149ff4506e15998e89ad8d4e1834ac0dfd8a6096":"2021-01-15T00:35:56.609Z","2.11.0-brainstorm-topic-thread-6e8a31782cd28ff4c279c61093fc32894dfea115":"2021-01-15T01:30:32.046Z","2.11.0":"2021-01-15T01:33:45.856Z","2.11.1-renovate-major-socket-io-packages-8f127b2a171fde2528a7f60db12f1510f8ed479e":"2021-01-15T01:38:23.838Z","2.11.1-renovate-non-major-a0d24f38c8a6c9504e4f29a31065882acb53887a":"2021-01-16T01:51:07.763Z","2.11.1":"2021-01-16T01:54:13.462Z","2.11.2-renovate-major-socket-io-packages-0d2b9e97a6114619b0a7e3cd664c8f1e8a72f0ce":"2021-01-16T01:56:48.353Z","2.11.2-renovate-non-major-61219897d2858e82de133dea8aaa677bb941042a":"2021-01-17T12:16:29.288Z","2.11.2":"2021-01-17T13:51:23.972Z","2.11.3-renovate-major-socket-io-packages-6da9aa9c16631d728bee330b0eddf89afd8b61f9":"2021-01-17T13:54:00.117Z","2.11.3-renovate-non-major-af5d21c08e35fb9d9bfc361f362df0973378072a":"2021-01-18T08:38:24.374Z","2.11.3":"2021-01-18T09:39:40.696Z","2.11.4-renovate-major-socket-io-packages-f1ee9ec824fe1b55775c22e4b337eb855ec4d3bf":"2021-01-18T09:43:29.776Z","2.11.4-renovate-non-major-96e9dcfc25aba984eb5fdb77b6090d17621ce0d4":"2021-01-20T05:43:22.889Z","2.11.4":"2021-01-20T05:47:00.918Z","2.11.5-renovate-major-socket-io-packages-c89e6002dac75aeba7ed836e564c5d37c511a6ab":"2021-01-20T05:49:58.249Z","2.11.5-renovate-non-major-4914f0651e0b354d013d95e1cc8b156e102fcb3e":"2021-01-20T20:30:22.939Z","2.11.5":"2021-01-20T20:33:16.424Z","2.11.6-renovate-major-socket-io-packages-fdcd6fc6020366f2089aeff72e17ccb17a8e8ea6":"2021-01-20T20:36:09.600Z","2.11.6-renovate-non-major-fe44688501975abb8c7f38cde23d5a748b976ca5":"2021-01-23T04:47:50.980Z","2.11.6":"2021-01-23T04:51:08.047Z","2.11.7-renovate-major-socket-io-packages-3248e34368d1bf99cd0d46ac13f6ffc9d4b1964f":"2021-01-23T04:53:55.072Z","2.11.7-renovate-non-major-ca182ad4b57749cd680a6f7e1561becc8bddf63c":"2021-01-23T05:52:56.152Z","2.11.7":"2021-01-23T05:55:53.065Z","2.11.8-renovate-major-socket-io-packages-b94a9b8f026783574c5d6f00538af99a5fef8ae9":"2021-01-23T05:59:22.184Z","2.11.8-renovate-non-major-a87bd11512041828dde4158b4874dbb9f48e2e3b":"2021-01-23T07:31:12.738Z","2.11.8":"2021-01-23T07:33:54.648Z","2.11.9-renovate-major-socket-io-packages-dfc154fb7a2e39a3d6baa29f7d805eea772186ad":"2021-01-23T07:36:51.379Z","2.11.9-renovate-non-major-ff4e4465344372422cebf971b6ea2b44d6c64f1b":"2021-01-23T11:27:35.322Z","2.11.9":"2021-01-23T11:31:03.686Z","2.11.10-renovate-major-socket-io-packages-455f2e436b3c2e4163555831bbbaafe69061c367":"2021-01-23T11:34:07.405Z","2.11.10-renovate-non-major-a560787c680e10eb85552f7746fcf39a873f68c3":"2021-01-23T15:59:03.021Z","2.11.10":"2021-01-23T16:02:10.974Z","2.11.11-renovate-major-socket-io-packages-36eb28c68a4b48bec986fe36764a8ad1f02958fa":"2021-01-23T16:04:47.305Z","2.11.11-renovate-non-major-5e1f05147a4e1ff696aa5e6e43acda0522cda1c3":"2021-01-24T14:54:19.474Z","2.11.11":"2021-01-24T14:57:25.432Z","2.11.11-renovate-major-socket-io-packages-d4887b465a524e4b9a45f0cd3112f56c0eda3a8c":"2021-01-24T14:59:54.617Z","2.11.12-renovate-major-socket-io-packages-5c5708790bec7bdcb8b4a44888bee8eae7bb19a1":"2021-01-24T15:02:08.372Z","2.11.12-renovate-non-major-c4428ab429a409ca9b448cbce8dfeac33d13a997":"2021-01-24T16:37:26.358Z","2.11.12":"2021-01-24T16:40:33.457Z","2.11.13-renovate-major-socket-io-packages-3ef20a14db39a1fe6b02840f106c05dbe4c9366e":"2021-01-24T16:43:42.078Z","2.12.0-pattern-sales-thread-b5aaac0293560a62b6d1270018d7e4b7a2265dd1":"2021-01-25T00:34:43.385Z","2.12.0":"2021-01-25T00:37:48.575Z","2.12.1-renovate-major-socket-io-packages-9f29fba8d40b71d1113b7f74f831c82d5b9d1f3e":"2021-01-25T00:42:43.178Z","2.12.1-renovate-non-major-e3e5cde78f2c57e508787fabd3dab4b6f5da50e2":"2021-01-25T08:50:39.737Z","2.12.1":"2021-01-25T08:54:03.631Z","2.12.2-renovate-major-socket-io-packages-58ec37fd8d5da331edeaa61394ff33f57eea7ee4":"2021-01-25T08:56:23.707Z","2.12.2-typo-fix-h32-b2cbe9146ffa990237dd99b7eb48915b09e3a166":"2021-01-25T10:27:56.250Z","2.12.2-typo-fix-h32-687182b83456f5d253d3c208dbdfa8c325b2dc00":"2021-01-25T10:47:23.819Z","2.12.2-typo-fix-h32-970670f8a716470090797919cd4a82d0fbfbd332":"2021-01-25T11:04:39.935Z","2.12.2-typo-fix-h32-2748f6810a2d563e63bb24e9a2918bcfc3558460":"2021-01-26T02:07:24.309Z","2.12.2":"2021-01-26T02:10:30.615Z","2.12.3-renovate-major-socket-io-packages-b01701beb9a62138f5a3814e8e34447a7ea7cc34":"2021-01-26T02:15:05.519Z","2.12.3-renovate-non-major-bd35b68207e4a3b9559eb0b713ef4530e6960b29":"2021-01-27T10:48:21.432Z","2.12.3":"2021-01-27T10:51:26.894Z","2.12.4-renovate-major-socket-io-packages-c53e8585c0606f417ee8886c59f2da8227af8550":"2021-01-27T10:54:12.071Z","2.12.4-add-limit-to-links-query-4613f177f475768bd68f5468fa920f101d61ecff":"2021-01-29T03:22:48.729Z","2.12.4-add-limit-to-links-query-895e91dcc881ce33c6c0042dbe8690e0b110018a":"2021-01-29T03:36:14.719Z","2.12.4":"2021-01-29T06:14:59.793Z","2.12.5-renovate-major-socket-io-packages-0bf5bc1f4766c65a4ee044dcd0fe87e2de14f90c":"2021-01-29T06:20:33.648Z","2.12.5-renovate-non-major-15410b9ba234e1c890633145ff743a566e1c9ab5":"2021-01-30T04:47:12.238Z","2.12.5":"2021-01-30T04:49:51.132Z","2.12.6-renovate-major-socket-io-packages-4119a02af7ac6ab86040cd200f0fa49abcb4e664":"2021-01-30T04:52:48.722Z","2.12.6-renovate-non-major-45cbf576109874f54bb6186c35489e1a4a36cf4d":"2021-01-31T05:40:12.298Z","2.12.6":"2021-01-31T05:43:12.314Z","2.12.7-renovate-major-socket-io-packages-9df460e0904a6839655c4ff02354037aa4187a79":"2021-01-31T05:45:39.925Z","2.12.7-renovate-non-major-9166666d08c66d042408d9745dbeb96f96f9dc34":"2021-01-31T11:40:23.484Z","2.12.7":"2021-01-31T11:43:45.282Z","2.12.8-renovate-major-socket-io-packages-051f7ec8fc00fb9491f0c3501a5e5b20216ca564":"2021-01-31T11:47:18.994Z","2.12.8-renovate-non-major-c58493fa3102b19a59c9bc0d6043c0ca3d56518a":"2021-01-31T16:59:16.612Z","2.12.8":"2021-01-31T17:02:22.784Z","2.12.9-renovate-major-socket-io-packages-ff544ab9b4a0eb98cb1ae019965fee41277f354c":"2021-01-31T17:05:03.437Z","2.13.0-add-options-query-stream-40cb76ebb7b5da5e96752b94ccd215ce80c6f7e6":"2021-02-01T11:23:43.061Z","2.12.9-fix-link-query-option-1c9d84d151ab1f23dc8a6c32abc5ec028671df6e":"2021-02-02T01:40:19.475Z","2.12.9":"2021-02-02T01:43:28.917Z","2.12.10-renovate-major-socket-io-packages-fe5b80433e06ed67dd295f0f33732ed8c31e337e":"2021-02-02T01:48:19.453Z","2.12.10-whitesource-configure-d1d8be5f25b1905eebdbe3c4a48889e1d2075d8b":"2021-02-02T02:14:38.830Z","2.12.10":"2021-02-02T02:17:52.106Z","2.12.11-renovate-major-socket-io-packages-4064ba1baa96d4cc2e51b4ed96d5876dfa1c341e":"2021-02-02T02:23:06.499Z","2.12.11-bump-axios-b2d79b09d800abfeab4a2f943c2a7a49f6b4dcfc":"2021-02-03T04:19:54.228Z","2.12.11":"2021-02-03T04:26:25.372Z","2.12.12-renovate-major-socket-io-packages-8b75945045ea5a063f493747a958965eea4170da":"2021-02-03T04:29:28.637Z","2.12.12-socket-errors-a889f3c29fb92768a1978613c8d3ed52e62c7cfa":"2021-02-03T09:23:56.544Z","2.13.0-add-options-query-stream-7312cb242ca93793a315e17dba676e9d29593581":"2021-02-04T06:27:17.458Z","2.13.0":"2021-02-04T06:30:31.154Z","2.13.1-renovate-major-socket-io-packages-e04ca0ca61cf782137606264bda7921bfc7febb5":"2021-02-04T07:36:46.325Z","2.13.1-renovate-npm-version-82159e162ae24faa858ff5551c77cd6ee7a81cd0":"2021-02-05T05:43:11.292Z","2.13.1":"2021-02-05T05:46:40.309Z","2.13.2-renovate-major-socket-io-packages-d380cef4ec1873d3dd9ddf0c0aac33f82e48f838":"2021-02-05T05:55:11.416Z","2.13.2-use-shared-renovate-config-ee152db8fa4e189d682212c7c824624d0365d4d2":"2021-02-06T12:12:30.260Z","2.13.2":"2021-02-06T12:15:17.036Z","2.13.3-renovate-major-socket-io-packages-c1e22afc5a0c88220dfb13269b379ef1587d9dbb":"2021-02-06T12:18:23.390Z","2.13.3-renovate-non-major-f964ef8f23647467ef658b0ad440458697968a95":"2021-02-07T11:33:41.680Z","2.13.3":"2021-02-07T11:36:45.587Z","2.13.4-renovate-major-socket-io-packages-5b14c2397968c01c16eb9da81119b8898d8990ea":"2021-02-07T11:39:50.724Z","2.13.4-renovate-non-major-a6302ed9b650618055e9426be25c3ae35ec0aebb":"2021-02-11T02:56:13.173Z","2.13.4":"2021-02-11T02:59:23.450Z","2.13.5-renovate-major-socket-io-packages-d78fdbdb10cea20cf98ca15d9e6c2338f01c5636":"2021-02-11T03:02:19.429Z","2.13.5-renovate-non-major-b6160c9258253d3aff9fd0602de0e584592e4336":"2021-02-13T00:42:14.891Z","2.13.5":"2021-02-13T00:45:03.093Z","2.13.6-renovate-major-socket-io-packages-7c7a9da18b02baf616c1756e01c678237c6fb147":"2021-02-13T00:48:20.825Z","2.13.6-renovate-eslint-plugin-jsdoc-32-x-b53bd54b6668f0fd44a1ab36fed65add44dc4fb9":"2021-02-15T06:28:35.861Z","2.13.6-fix-name-bb94aa42d7aefca10e5ea25d6cd5427046a2c564":"2021-02-15T12:01:38.743Z","2.13.6-fix-name-04f5da81e3db9b552509e8b00d88ae15e1f3a906":"2021-02-15T14:52:27.517Z","2.13.6":"2021-02-15T14:55:33.578Z","2.13.7-renovate-eslint-plugin-jsdoc-32-x-5c389d174e01736e73cfce21ec5985829a3e5a1c":"2021-02-15T15:00:27.133Z","2.13.7-renovate-major-socket-io-packages-6558e735279ab1d95fe29845d563faef21354cab":"2021-02-15T15:00:38.979Z","2.13.7-renovate-eslint-plugin-jsdoc-32-x-2f6d3973cc7eba36ddec85610236564727621cfd":"2021-02-16T05:32:57.647Z","2.13.7-renovate-eslint-plugin-jsdoc-32-x-996eb947474c9a8e938d844a895452c621cc03b6":"2021-02-16T23:35:55.194Z","2.13.7":"2021-02-17T00:12:51.175Z","2.13.8-renovate-major-socket-io-packages-77d77e6414756133262da273ddef174560fa1ea7":"2021-02-17T00:15:52.419Z","2.14.0-link-user-feedback-to-owner-ab200cbc8f530a212e1d54bac9e0d6bd753cadb8":"2021-02-18T07:32:58.241Z","2.14.0":"2021-02-18T07:36:01.164Z","2.14.1-renovate-major-socket-io-packages-f0970d1ed3e13269fe829a0fdd8bb72218d6ccd1":"2021-02-18T07:40:51.630Z","2.14.1-add-changelog-yml-fb9ad23d6ae5716830435e59f7cbeb1b44a1ea3f":"2021-02-20T09:31:55.948Z","2.14.1":"2021-02-20T09:34:40.965Z","2.14.2-renovate-major-socket-io-packages-9612f5d03cf5b8b5eb7e7f678faac27a92c5359c":"2021-02-20T09:39:46.293Z","2.14.2-renovate-non-major-4b5ab77805d72269773c1c1cd39593686e5b6bd6":"2021-02-20T17:26:24.694Z","2.14.2":"2021-02-20T17:29:22.479Z","2.14.3-renovate-major-socket-io-packages-11916ade32f1d53e57de609733adcb560d0f4205":"2021-02-20T17:32:42.955Z","2.14.3-renovate-non-major-363acd09a3576e687634099de9bf5409183a07e3":"2021-02-21T04:40:16.939Z","2.14.3":"2021-02-21T04:43:10.520Z","2.14.4-renovate-major-socket-io-packages-e2067392a583bb3be85d928293a758ee092119d1":"2021-02-21T04:45:56.728Z","2.15.0-generic-oauth-64327bea2d0398edfa214960a713fe1a58c2f5d4":"2021-02-22T17:58:17.944Z","2.14.4-renovate-non-major-c24452fc9ac466a42bc7e7ac7132421ce89e4a9f":"2021-02-23T02:59:01.103Z","2.14.4":"2021-02-23T03:02:19.690Z","2.14.5-renovate-major-socket-io-packages-c955004655bfddd68123d3511f0608464f27d73d":"2021-02-23T03:06:29.525Z","2.14.5-renovate-non-major-7dc84a50639576e4759086b88236546d399d628f":"2021-02-23T10:30:42.841Z","2.14.5":"2021-02-23T10:33:55.705Z","2.14.6-renovate-major-socket-io-packages-b4c06236de97161d595172b5fb1a794156efe4d8":"2021-02-23T10:37:21.472Z","2.14.6-renovate-non-major-b16f39082359ddc47635c2b8940b3790b0943acf":"2021-02-25T05:24:59.608Z","2.14.6":"2021-02-25T05:27:59.500Z","2.14.7-renovate-major-socket-io-packages-925157c66c5a799cd285e86a43fc424a469d6f0c":"2021-02-25T05:30:56.189Z","2.14.7-renovate-major-socket-io-packages-82b59a72f6bc3e0c860857b16785d7e0f93db754":"2021-02-26T00:53:56.193Z","2.15.0-typings-e425afab2689eddf800f3fd0e3c523c3935b28b9":"2021-02-26T15:24:45.653Z","2.15.0-typings-86cefcc24b9ae8586d12131d904bca5ed1b9bbf5":"2021-02-26T16:27:01.103Z","2.14.7-renovate-jsdoc-to-markdown-7-x-1a4c93371849fbad54157fc78abac66c9cc93ff0":"2021-02-27T00:58:34.663Z","2.14.7-renovate-non-major-fba38fdd12a7728567425368535d70ec2b74c655":"2021-02-27T04:13:58.193Z","2.14.7":"2021-02-27T04:16:49.078Z","2.14.8-renovate-jsdoc-to-markdown-7-x-eea6390eb038de2fcf30b3ea1bb6cb25e7b4d352":"2021-02-27T04:19:56.611Z","2.14.8-renovate-major-socket-io-packages-53a97bb631375062fe489aa5d846c714e5eb5b15":"2021-02-27T04:20:55.973Z","2.15.0-typings-1f096dda20b64889e7dc10e8ad17e3d20008ae84":"2021-02-27T09:30:43.942Z","2.15.0-typings-c9300ee0de0c40f5fad1bf849ed7314d3bf7d8b6":"2021-02-27T11:25:38.286Z","2.14.8-renovate-non-major-322f73d15aba0327b204df331626ceb6914c554e":"2021-02-28T14:04:31.100Z","2.14.8":"2021-02-28T14:07:48.678Z","2.14.9-renovate-major-socket-io-packages-9b68f247bf8edb4b4b90f8f07760c12e21074bdb":"2021-02-28T14:12:30.656Z","2.14.9-renovate-jsdoc-to-markdown-7-x-3fc6ebefb298ba6d9dea5fd34bb8480f5d669ecd":"2021-02-28T14:13:15.252Z","2.14.9":"2021-03-01T00:11:14.901Z","2.14.10-renovate-major-socket-io-packages-5a84cac26529f6452e3578371d7ca7967bf6d079":"2021-03-01T00:14:11.139Z","2.15.0-add-chart-config-constraints-745b1e6fe04b1a500542ff186f4168998de297fd":"2021-03-01T08:51:56.065Z","2.15.0":"2021-03-01T08:55:26.352Z","2.15.1-renovate-major-socket-io-packages-2bab094cbd77b487ae6f9c3569cdbd6c0a1b747b":"2021-03-01T09:01:06.058Z","2.16.0-link-brainstorm-topic-to-pattern-3dac95ed8d738662cf4015b6cd3a9b9a92ae6ef6":"2021-03-01T09:50:04.125Z","2.16.0":"2021-03-01T09:53:14.755Z","2.16.1-renovate-major-socket-io-packages-2cfdfa932d587d24ba7520e703735686eaf2b84a":"2021-03-01T09:57:52.114Z","2.16.1-remove-form-response-constraints-491fbc6406c9cd6e8a83216b2d14470eeaa2a839":"2021-03-01T10:17:12.877Z","2.16.1":"2021-03-01T10:21:02.522Z","2.16.2-renovate-major-socket-io-packages-6f5cd89acebd11884ca34b79aaa8e0af7cf661c3":"2021-03-01T10:25:15.598Z","2.16.2-renovate-non-major-808c4c8fe93498bb984c0e5d88aec80a3020b87e":"2021-03-02T22:46:16.905Z","2.16.2":"2021-03-02T22:50:11.694Z","2.16.3-renovate-major-socket-io-packages-faf9509815a065a5fbc09c95d9464f4f03648013":"2021-03-02T22:52:06.487Z","2.17.0-generic-oauth-895387a1ae7993ee4a466eef65158db6d3741192":"2021-03-03T23:04:28.391Z","2.17.0":"2021-03-04T01:59:00.207Z","2.17.1-renovate-major-socket-io-packages-5341a219b8074c0fc20237e4f12d3c4c0733771a":"2021-03-04T02:04:01.503Z","2.17.1-renovate-non-major-3f5e15bc253e6d158e84c432ed100fade5885ca4":"2021-03-07T21:40:19.870Z","2.17.1":"2021-03-07T21:43:11.603Z","2.17.2-renovate-major-socket-io-packages-e26c9fb347fe4d2ead470764caa5320e9b49b6b2":"2021-03-07T21:45:34.644Z","2.18.0-task2any-ef53ad64d9767f24d2805b4f1ea8df9c613db045":"2021-03-08T15:02:42.511Z","2.18.0-task2any-6bdf16172ec9acbc7ac9ce5399c24409180dcbed":"2021-03-08T16:22:30.877Z","2.18.0":"2021-03-09T12:52:06.622Z","2.18.1-renovate-major-socket-io-packages-667d12c95313959c179d5e1d77363e9ec26d62b2":"2021-03-09T12:57:07.641Z","2.18.1-renovate-non-major-422a31e359d41665f238a5848c188c1dbe9837c4":"2021-03-10T08:29:31.183Z","2.18.1":"2021-03-10T08:32:27.954Z","2.18.2-renovate-major-socket-io-packages-80bfe0d6e2a8cb2d2cd3233ff92ad26fa36db2e8":"2021-03-10T08:37:26.304Z","2.18.2-renovate-major-socket-io-packages-f4397f1d7151c9a5ac50501a1beb4787bc1863c6":"2021-03-10T12:39:17.826Z","2.18.2-contract-repo-be10b1f4dcab6911225fdf5d89ce972fdc58e55c":"2021-03-11T12:07:32.725Z","2.18.2":"2021-03-11T12:10:59.827Z","2.18.3-renovate-major-socket-io-packages-7ebbcc6f37250293912ab3dbcb35a2f0bf967fa5":"2021-03-11T12:17:15.489Z","2.18.3-use-is-uuid-6286de013b572d7aa0d50ff0aac23a3965f8d32c":"2021-03-12T03:08:47.106Z","2.18.3":"2021-03-12T03:12:06.600Z","2.18.4-renovate-major-socket-io-packages-99dc20f18dbc620b400eb5c263419b3deb231c99":"2021-03-12T03:15:08.843Z","2.18.4-loop-owns-repo-23913e1c7673d70e7fdf1b1e63701ce1275d03cb":"2021-03-12T10:58:56.817Z","2.18.4":"2021-03-12T11:02:22.033Z","2.18.5-renovate-major-socket-io-packages-9fce58699fd402cd379e3fc0479b1875134a72b7":"2021-03-12T11:07:32.049Z","2.18.5-renovate-non-major-f4e0e47d7276bba3432d9a4f1131c3d462720f26":"2021-03-13T00:12:27.691Z","2.18.5":"2021-03-13T00:15:31.323Z","2.18.6-renovate-major-socket-io-packages-0c336d3edd30db5b17a6e2c37e45f7e5c3e52f22":"2021-03-13T00:20:15.432Z","2.18.6-renovate-non-major-78106af6a5736dc4711de495b54a20c8451e2fbb":"2021-03-15T12:31:30.920Z","2.18.6":"2021-03-15T12:34:58.175Z","2.18.6-renovate-major-socket-io-packages-292465464d9e173b28cf5b89acefe24bc130a721":"2021-03-15T12:40:20.862Z","2.18.7-renovate-major-socket-io-packages-54d57fc3811555c4696f2fd1b835baf59463b636":"2021-03-15T12:42:56.086Z","2.18.7-renovate-sinon-10-x-9543a6a25e341edcda960b15a4a4ac340ce95cf7":"2021-03-22T17:38:06.055Z","2.19.0-to-ts-b5a3791692dd55dc022e0ac382a022fc5ee19760":"2021-03-22T20:10:57.922Z","2.19.0-LucianBuzzo-patch-1-84580bd186540e4cc4a0e7c8fe717d11b14f9298":"2021-03-23T08:36:18.079Z","2.19.0":"2021-03-23T11:07:08.238Z","2.19.1-renovate-sinon-10-x-460aff8af4cce9fbfff7b8e4d6f294bc916df18a":"2021-03-23T11:12:28.201Z","2.19.1-renovate-major-socket-io-packages-5d69d0d3f65e6b81154bf91d2492c04fcba00988":"2021-03-23T11:13:08.271Z","2.19.0-to-ts-637d12bc835afe94e07c16d76e8eae4c83adea50":"2021-03-24T15:27:28.329Z","2.19.0-to-ts-7aec679af245c8358704e6a09bab065e780fd952":"2021-03-24T18:15:59.210Z","2.19.0-to-ts-fe6160400b18e05ac61dca7a874252b1f5e4ea91":"2021-03-24T19:05:40.106Z","2.19.0-to-ts-24203f0e272894d77e968e46315d5a8ff81c300f":"2021-03-25T10:08:02.023Z","2.19.0-to-ts-5c98dce4d79027258098f7b770994c9680180992":"2021-03-25T10:23:05.374Z","2.19.0-to-ts-be0ee89c4662348944809c9441a57cf0a5ba0357":"2021-03-25T10:56:27.517Z","2.19.1-renovate-non-major-c409dd8564bb34cddd9207323fc6b266e2f5be5a":"2021-03-25T11:48:22.347Z","2.19.1":"2021-03-25T11:53:21.183Z","2.19.1-renovate-sinon-10-x-c544d95d4aa0ab6a9f0206ed8c78fb08da78dd52":"2021-03-25T11:56:05.661Z","2.19.1-renovate-major-socket-io-packages-b77b2b30203515b53e93c03172d19c6fdee2d843":"2021-03-25T11:56:38.390Z","2.19.2-renovate-sinon-10-x-3106de3d054bb31f4e4ecf997a4c4c268c6b4982":"2021-03-25T11:58:41.785Z","2.19.0-to-ts-f80a99fb067cff1540d693dd8a8ee2ae4a320cf8":"2021-03-25T12:31:33.604Z","2.19.0-to-ts-5809fa840ed707fa5e28457ff3cf9a6d52a5f291":"2021-03-25T13:00:49.698Z","3.0.0-to-ts-76a6e8c1479c55db45a85cb83e312b8b92426d51":"2021-03-26T08:21:38.779Z","3.0.0-to-ts-91f233d870f7b9765a91198f60b10f2ae649d710":"2021-03-26T08:29:34.529Z","3.0.0-to-ts-74b79166de3397ab31c0907b3a4192bd5d66fd28":"2021-03-26T08:37:56.708Z","3.0.0-to-ts-61ff3ee0d89a0eb8a2389d5d7be4a5ea854faee0":"2021-03-26T08:43:37.342Z","3.0.0-to-ts-8d86285be48aff12a56bbaa30a16405f774d7f02":"2021-03-26T08:50:46.403Z","3.0.0-to-ts-398f170062f5378d02f142fe8969a1cd96f72f3c":"2021-03-26T09:45:03.550Z","3.0.0":"2021-03-26T12:00:36.070Z","3.0.1-renovate-non-major-54cb0cfc49d9518978df75b3a9fd47811a9dc1a9":"2021-03-26T12:04:28.221Z","3.0.1-renovate-sinon-10-x-88d4a40f16902c115eceb7d34a46cc6967db25dc":"2021-03-26T12:04:40.963Z","3.0.1-renovate-major-socket-io-packages-800c02848e50222bf03f87d8d68d4a68c2a8107a":"2021-03-26T12:05:32.974Z","3.0.1-renovate-non-major-ce9574caf4c02362714089dd33bbb0f4fcf92543":"2021-03-26T12:06:16.397Z","3.0.1":"2021-03-26T12:09:34.298Z","3.0.2-renovate-sinon-10-x-d7c590f242ce10387fb56b1efb29c96d86b42b1a":"2021-03-26T12:14:25.873Z","3.0.2-renovate-major-socket-io-packages-ed52df6c6976f61933e4e2b70b4dbbb9a60fb247":"2021-03-26T12:16:40.206Z","3.0.2-renovate-non-major-97f0b883c9c15a4700f38def3497495ec859eb0d":"2021-03-26T12:19:44.877Z","3.0.2":"2021-03-26T12:23:22.920Z","3.0.3-renovate-major-socket-io-packages-3e2b8f4143402e14efd701a9c33faa42c7c9ca0e":"2021-03-26T12:27:10.065Z","3.0.3-renovate-sinon-10-x-3c7070d7c5091fe1df049ee9a90dbbd85bcb76b0":"2021-03-26T12:29:00.383Z","3.1.0-import-json-schema-e5fb565c6f334f9c0fb85fc29600c22e5abd3e3d":"2021-03-26T12:46:47.100Z","3.1.0-import-json-schema-fae6f832903b0b87c454c1dd62f73a11d41bbb52":"2021-03-26T12:57:16.775Z","3.1.0":"2021-03-26T13:00:52.168Z","3.1.1-renovate-major-socket-io-packages-24c45b9b6762f9c0347240b50c0c190ad825fe89":"2021-03-26T13:07:26.824Z","3.1.1-renovate-sinon-10-x-21c78ab29234eead213e25baa8a61083bf65bf6b":"2021-03-26T13:07:48.750Z","3.1.1-renovate-non-major-bcfbc843e4a677fc61eff022f1b36a8cf2564349":"2021-03-29T15:53:06.174Z","3.1.1":"2021-03-29T15:56:12.395Z","3.1.2-renovate-sinon-10-x-2bbf4f6caee672ded1569c15952e97b98e278392":"2021-03-29T15:59:43.433Z","3.1.2-renovate-major-socket-io-packages-733aa37e08bc50962243db005b200f35a437bbb8":"2021-03-29T16:01:10.409Z","3.1.2-renovate-non-major-4c29fedd97c418ff7abcffcf3d7f423334894cdd":"2021-03-29T22:58:44.742Z","3.1.2":"2021-03-29T23:01:45.378Z","3.1.3-renovate-sinon-10-x-ec128f7f965780c3f6f98ba4d39711bd1ac20199":"2021-03-29T23:05:23.984Z","3.1.3-renovate-major-socket-io-packages-e3d554cb74190435d5314d9544e870d8ccd89c35":"2021-03-29T23:06:31.969Z","3.1.3":"2021-04-01T00:44:53.913Z","3.1.4-renovate-major-socket-io-packages-1f6e0d2b31c4f1dd58203155c633449742222f42":"2021-04-01T00:48:32.801Z","3.1.4-renovate-non-major-daa068573659ed52e9d4b5fbc4f775cead58b110":"2021-04-01T00:54:58.943Z","3.1.4":"2021-04-01T00:59:20.727Z","3.1.4-renovate-major-socket-io-packages-36f6b8966271b0e282a7433be90c25566801cedb":"2021-04-01T01:02:28.048Z","3.1.5-renovate-major-socket-io-packages-7caa67bd06a282fb12368dccca34809bb522a117":"2021-04-01T01:04:52.791Z","3.1.5-fix-getfile-f2b506cc81613d86b40325c6da20defa2efe4907":"2021-04-01T21:47:45.397Z","3.1.5-fix-getfile-304199977e1e3c7b657fa6cbd61b4bacc5c2c675":"2021-04-01T21:56:02.576Z","3.1.5":"2021-04-01T22:02:12.109Z","3.1.6-renovate-major-socket-io-packages-d8259ecf2f5e98f0393c7cb8e5c7410d34a4336c":"2021-04-01T22:06:41.366Z","3.1.6-renovate-non-major-bd5da268009925238972d6976c3a9dc7c12de460":"2021-04-01T23:27:13.753Z","3.1.6":"2021-04-01T23:32:08.690Z","3.1.7-renovate-major-socket-io-packages-6dd57f4e20a6ba3f14326747d8a8745f77c3637b":"2021-04-01T23:38:29.085Z","3.1.7-renovate-non-major-7d6a5e99cec5d5e400826a23d4c9cf6c8c2c99ed":"2021-04-02T16:37:19.190Z","3.1.7-renovate-non-major-3e561304944176d95cb789865ff194c095e1983b":"2021-04-02T16:42:27.438Z","3.1.7":"2021-04-02T16:45:41.664Z","3.1.8-renovate-major-socket-io-packages-3040df47ca3135bf6ae2cbe398ecce47a3f12fd5":"2021-04-02T16:49:10.251Z","3.1.8-renovate-non-major-5553afb8c680cdf64178f407fa0b067695114979":"2021-04-02T18:36:21.045Z","3.1.8":"2021-04-02T18:39:00.643Z","3.1.9-renovate-major-socket-io-packages-d39b99c3f83274820d45530ed29748d61d575988":"2021-04-02T18:43:32.881Z","3.1.9-renovate-non-major-623fd1aedc58bf59240dfba73df225db9a36c774":"2021-04-02T20:16:19.127Z","3.1.9":"2021-04-02T20:19:39.532Z","3.1.10-renovate-major-socket-io-packages-ceb2fb3edbd37b150567a95006f536aa0f287ec9":"2021-04-02T20:23:29.237Z","3.1.10-renovate-non-major-1f88cb38ad3d047f1253e2065994a7b071cda63b":"2021-04-02T22:02:42.242Z","3.1.10":"2021-04-02T22:05:44.405Z","3.1.11-renovate-major-socket-io-packages-e6bc2e6a1d78b3ec3d8b3004d79956eaf0ee15c0":"2021-04-02T22:09:28.744Z","3.1.11-renovate-non-major-371d39b39c47a02fcdd7674d2b522f21f27f8d74":"2021-04-02T23:53:13.325Z","3.1.11":"2021-04-02T23:56:53.891Z","3.1.12-renovate-major-socket-io-packages-99c0be885c624956f640c8673a6b9f0682dbcf0e":"2021-04-03T00:00:30.245Z","3.1.12-renovate-non-major-e1f968301953ae6d4c41169b831fc351cb28f729":"2021-04-03T00:47:08.013Z","3.1.12":"2021-04-03T00:50:48.517Z","3.1.13-renovate-major-socket-io-packages-a77eb635ee75949138a4d6cf9f2b18a468827ea9":"2021-04-03T00:54:12.439Z","3.1.13-renovate-non-major-68357d07d6a34f3ca796a7de88ea1092c6b803aa":"2021-04-03T21:07:50.407Z","3.1.13":"2021-04-03T21:11:13.930Z","3.1.14-renovate-major-socket-io-packages-76568210268c337c44cd3c8a88162486b8a89a22":"2021-04-03T21:14:23.724Z","3.1.14-renovate-non-major-823d19c843228a9f80431216d956ece6e08c57f3":"2021-04-03T23:18:49.667Z","3.1.14":"2021-04-03T23:22:05.554Z","3.1.15-renovate-non-major-74ce41e13ab10cad9db8a76125c8d674bf1f0cbd":"2021-04-04T05:23:22.013Z","3.1.15":"2021-04-04T05:26:46.591Z","3.1.16-renovate-major-socket-io-packages-1f919936fe1597f160adaa0d621d179accccf939":"2021-04-04T05:30:27.175Z","3.1.16-renovate-non-major-44821d85e436508149cf87488936118eed14f8cd":"2021-04-04T08:20:19.104Z","3.1.16":"2021-04-04T08:23:41.492Z","3.1.17-renovate-major-socket-io-packages-52b112fd6e36f8146c45565f7c29e911a184d470":"2021-04-04T08:28:51.012Z","3.1.17-renovate-non-major-d63965786840c8d49f3cc04e30d3f532ce2c5121":"2021-04-04T10:16:25.570Z","3.1.17":"2021-04-04T10:20:58.328Z","3.1.18-renovate-major-socket-io-packages-ca66966429f0366d55cbc5e81d1a3edd27299645":"2021-04-04T10:24:08.516Z","3.1.18-renovate-non-major-6a53279c270ed823ddfe5a9a00e179a9db01d330":"2021-04-04T23:42:27.193Z","3.1.18":"2021-04-04T23:45:34.698Z","3.1.19-renovate-major-socket-io-packages-a5968d570bb4e1502abc57ada09c9f5230831f69":"2021-04-04T23:49:40.309Z","3.2.0-export-links-f7fb01bb2c31d094fbc1ee114eb568382efb3690":"2021-04-06T11:31:44.444Z","3.2.0-export-links-03907424283e334b495cea95239b1b50d371c165":"2021-04-06T11:36:24.726Z","3.2.0":"2021-04-06T11:39:35.015Z","3.2.1-renovate-major-socket-io-packages-5755e49926aea51388977b47565222f4fa1e1109":"2021-04-06T11:46:20.369Z","3.2.1-renovate-non-major-bae62bebe85f337abc11a8b6f439c984b0e91929":"2021-04-06T12:34:59.319Z","3.2.1":"2021-04-06T12:38:59.157Z","3.2.2-renovate-major-socket-io-packages-74409b4b79b3428f089340cf2168a45523cdd10e":"2021-04-06T12:42:11.666Z","3.2.2-renovate-non-major-77c4a6d692abfd4b016799eb20d2e45bab584b1a":"2021-04-06T15:10:33.835Z","3.2.2":"2021-04-06T15:14:18.309Z","3.2.3-renovate-major-socket-io-packages-ea47c380364475f74a3eabf98226865df9247fdb":"2021-04-06T15:18:31.415Z","3.2.3-renovate-non-major-0bae3f267b635e6b32a8627d4f220e88000ccd51":"2021-04-06T18:14:42.551Z","3.2.3":"2021-04-06T18:20:09.069Z","3.2.3-renovate-major-socket-io-packages-4f064611a40ca33ddfa8aac7e26ce230013534f2":"2021-04-06T18:23:43.153Z","3.2.4-renovate-major-socket-io-packages-84f9c56ba0b7062453aaac14410f0f6b22888c3a":"2021-04-06T18:26:54.025Z","3.2.4-renovate-non-major-9ae3a5cd811ced3fce94e0973d13fdd491e744e8":"2021-04-06T20:08:32.958Z","3.2.4":"2021-04-06T20:11:27.517Z","3.2.5-renovate-major-socket-io-packages-0132391375282b0aec0e5569bf00e42ae106022e":"2021-04-06T20:15:35.581Z","3.2.5-renovate-non-major-bfcb407e107e044bce82080aa551aed8250b5a1f":"2021-04-06T21:38:38.112Z","3.2.5":"2021-04-06T21:42:56.227Z","3.2.6-renovate-major-socket-io-packages-c0c15da4f414815f15ab3e7df48a0983f9fb80f5":"2021-04-06T21:46:53.793Z","3.2.6-renovate-non-major-c03860c7346c949c4145a8b9a98a463378d44795":"2021-04-06T22:51:00.678Z","3.2.6":"2021-04-06T22:54:21.149Z","3.2.7-renovate-major-socket-io-packages-ad5be83f46c33b36042a30729bb6a5b565e45fa7":"2021-04-06T22:58:14.400Z","3.2.7-renovate-non-major-e33d33141c233cf2e2fae2066d4416b79c0aaaae":"2021-04-07T00:44:57.022Z","3.2.7":"2021-04-07T00:48:29.108Z","3.2.8-renovate-major-socket-io-packages-f5d3efd8c9f03a9f7216d0bffacfb5f60b4840d6":"2021-04-07T00:51:48.286Z","3.2.8-renovate-non-major-c4267f8712d2aa9b96c0317bd0e3d7990c417c50":"2021-04-10T04:06:41.388Z","3.2.8":"2021-04-10T04:10:48.872Z","3.2.9-renovate-major-socket-io-packages-30402cef877a62e14e91f48d4c1afdaef0b2199f":"2021-04-10T04:16:42.146Z","3.2.9-renovate-non-major-41c3d472560d7e4057d35ab3bd2b9acc0dc1a971":"2021-04-10T08:00:05.251Z","3.2.9":"2021-04-10T08:03:28.383Z","3.2.10-renovate-major-socket-io-packages-bccb5ff85f437b37c35213d412d9a36600a020bd":"2021-04-10T08:08:03.830Z","3.2.10-renovate-non-major-140c587a359bebe58ed2e2650fbff64c8e93d23a":"2021-04-10T09:33:10.508Z","3.2.10":"2021-04-10T09:37:04.622Z","3.2.10-renovate-major-socket-io-packages-62f19613671f847638638712ed7581d722925a34":"2021-04-10T09:40:08.308Z","3.2.11-renovate-major-socket-io-packages-3e57050d639a6e448e2d9ab704e59b4179aa489a":"2021-04-10T09:44:35.064Z","3.2.11-renovate-non-major-64ca2b44802a1248dd6fef170499e75c4d5309fd":"2021-04-10T12:08:20.897Z","3.2.11":"2021-04-10T12:11:57.432Z","3.2.12-renovate-major-socket-io-packages-7b769af08aa321388516d645bedb8ee12c56a91a":"2021-04-10T12:15:49.026Z","3.2.12-renovate-non-major-8ee8e8e07a1fc9ce7908eb1d9cc28bb5bf3118a4":"2021-04-10T14:40:39.035Z","3.2.12":"2021-04-10T14:45:50.919Z","3.2.12-renovate-major-socket-io-packages-2c0e0ddf7aa2d0696c612e914806c30d006957b2":"2021-04-10T14:47:29.784Z","3.2.13-renovate-major-socket-io-packages-be71e90d1bde49aadcad51ab4408e31ffee6febe":"2021-04-10T14:50:57.627Z","3.2.13-renovate-non-major-cfd85ff9a0758cce8a474163939031959f7ba0e7":"2021-04-10T15:56:10.871Z","3.2.13":"2021-04-10T15:59:52.449Z","3.2.14-renovate-major-socket-io-packages-6ade49ff8a79b6e53ed63cfa50d58e0b3d650789":"2021-04-10T16:03:15.575Z","3.2.14-renovate-non-major-d75024f5f2dc11c821757f585e64b4a4ff2ea39a":"2021-04-10T17:14:18.719Z","3.2.14":"2021-04-10T17:18:19.651Z","3.2.15-renovate-major-socket-io-packages-efbfcb0f3b260bd8bc1fd25aad7307f02232b332":"2021-04-10T17:20:58.062Z","3.2.15-renovate-non-major-2ec14944d108d22ebbd8e9405166a3879ffb7eb4":"2021-04-10T18:46:22.980Z","3.2.15":"2021-04-10T18:50:17.972Z","3.2.15-renovate-major-socket-io-packages-2e8f0834aa5e4036e917cb44af92737cf0ec9aa0":"2021-04-10T18:53:18.208Z","3.2.16-renovate-major-socket-io-packages-0e1f07a5410dc64aaffae34069a39229df1318fa":"2021-04-10T18:56:57.637Z","3.2.16-renovate-non-major-37d0545b73f5fc59e66e46c5f5960aa299f54fb6":"2021-04-10T20:30:21.964Z","3.2.16":"2021-04-10T20:33:54.349Z","3.2.17-renovate-major-socket-io-packages-8783963b44492c1f7558c6cd8e2019cfc6ec9da6":"2021-04-10T20:39:28.462Z","3.2.17-renovate-non-major-077cb490161d78db41822b567d1a0fc63ff02db8":"2021-04-10T22:13:39.569Z","3.2.17":"2021-04-10T22:18:15.702Z","3.2.18-renovate-major-socket-io-packages-166d8586402f3e9f6177736f5fb78f0cc1d32da7":"2021-04-10T22:21:12.092Z","3.2.18-renovate-non-major-74f47096177fd935ad67d2ab67ec33d56e266ae0":"2021-04-11T00:38:57.049Z","3.2.18":"2021-04-11T00:42:27.622Z","3.2.19-renovate-major-socket-io-packages-6e1f22806cc18919097f79296a1d32a2dba60972":"2021-04-11T00:45:23.943Z","3.2.19-renovate-non-major-0a39fa22bdaa245ad38e13776d767b7dd048423f":"2021-04-11T02:32:15.066Z","3.2.19":"2021-04-11T02:35:44.969Z","3.2.20-renovate-major-socket-io-packages-2ed2ddbefdf5310c91e90bbc2c2ebd7579705ae8":"2021-04-11T02:42:20.546Z","3.2.20-renovate-non-major-1423e410c17d27abfbd97ddf8d6d069dd666d4e0":"2021-04-11T04:40:32.534Z","3.2.20":"2021-04-11T04:43:41.820Z","3.2.21-renovate-major-socket-io-packages-8f41ee2fcf066ff7bc0c92f3070e1e5a90a64950":"2021-04-11T04:49:46.271Z","3.2.21-renovate-non-major-02bbe0b96ac1c7c3bed44051fdc14f02ea541a9b":"2021-04-11T08:22:35.001Z","3.2.21":"2021-04-11T08:26:24.413Z","3.2.22-renovate-major-socket-io-packages-8b865bc29a72f8b3d76ed42a60f2ec4a25c0aa01":"2021-04-11T08:29:54.613Z","3.2.22-renovate-non-major-e65cf0337476dfa85eabe9964cad45207e6e7ff7":"2021-04-11T10:34:51.711Z","3.2.22":"2021-04-11T10:38:15.283Z","3.2.23-renovate-major-socket-io-packages-ec80154af95745c33df0a97437b8d7969bc1f64d":"2021-04-11T10:41:37.824Z","3.2.23-renovate-non-major-bbfda0a45e077522fa022e2c44b5aaafded918c3":"2021-04-11T13:44:49.832Z","3.2.23":"2021-04-11T13:49:15.119Z","3.2.23-renovate-major-socket-io-packages-735f448c89b00830ad2704e335e92066e8d74ecf":"2021-04-11T13:52:28.158Z","3.2.24-renovate-major-socket-io-packages-786a532fb72f50ab2c9754de3cf6a56343397995":"2021-04-11T13:58:35.093Z","3.2.24-renovate-non-major-8c5f6052a3bd22018071a6e032725c52dc8906fe":"2021-04-11T16:08:37.689Z","3.2.24":"2021-04-11T16:12:05.561Z","3.2.25-renovate-major-socket-io-packages-d89ebd256cdee0979675e7c94da88aaec5eeaa84":"2021-04-11T16:15:07.161Z","3.2.25-renovate-non-major-0c66b67998c43d73a012816405e3633c99f1deb4":"2021-04-11T17:51:21.320Z","3.2.25":"2021-04-11T17:55:54.220Z","3.2.26-renovate-major-socket-io-packages-3601fde9baa75cf6146341c39551e01a6ec0c163":"2021-04-11T18:01:31.501Z","3.2.26-renovate-non-major-a44182e23c3d15767d28bf4909c9a73508d3789f":"2021-04-11T19:50:51.513Z","3.2.26":"2021-04-11T19:54:18.578Z","3.2.27-renovate-major-socket-io-packages-b0b12f0c1402ed1e6b98b2c72c446280aa778a53":"2021-04-11T19:58:02.418Z","3.2.27-renovate-non-major-9f5361a09ca99842b3e25050d7796ba0f3bdf8c1":"2021-04-11T21:05:31.605Z","3.2.27":"2021-04-11T21:08:59.241Z","3.2.28-renovate-major-socket-io-packages-941a8ede6e5e4229b004d234f412d633cf17b18f":"2021-04-11T21:16:13.203Z","3.2.28-renovate-non-major-a8efade9004d291589e45ef252390160392eda39":"2021-04-12T01:30:02.577Z","3.2.28":"2021-04-12T01:34:33.529Z","3.2.29-renovate-major-socket-io-packages-d31094215ba3cf327d5c6b808bb08ca8eac2ecb2":"2021-04-12T01:40:21.506Z","3.2.29-renovate-non-major-aafe999a15753a0e8cf6ec8ba3b25bc634802b23":"2021-04-12T03:53:24.683Z","3.2.29":"2021-04-12T03:57:01.560Z","3.2.30-renovate-major-socket-io-packages-45afd95f546a8b3d80156671b7066308bfb2282a":"2021-04-12T04:03:15.518Z","3.2.30-renovate-non-major-80605ab9dbed78b253a52b2a60f6b659de88c60f":"2021-04-12T05:25:53.888Z","3.2.30":"2021-04-12T05:30:26.436Z","3.2.31-renovate-major-socket-io-packages-cbac1acca3adbc3feebeba5f00b68b815b5d6331":"2021-04-12T05:34:45.962Z","3.2.31-renovate-non-major-2a769f070aee0598187c8f0c3a87135bcc565b53":"2021-04-12T09:16:17.162Z","3.2.31":"2021-04-12T09:20:33.693Z","3.2.32-renovate-major-socket-io-packages-f3311a9da1f0a5bacd433055840d0a8c17116841":"2021-04-12T09:23:05.712Z","3.2.32-renovate-non-major-38a03a1769f3d82e0ae50b8db3003246df295764":"2021-04-12T10:51:56.793Z","3.2.32":"2021-04-12T10:55:44.029Z","3.2.33-renovate-major-socket-io-packages-547dbca75a6ede06a180e641f25bb09829228ecc":"2021-04-12T10:58:46.705Z","3.2.33-renovate-non-major-1540fe8275a2ec912e2740743796e76e227f5953":"2021-04-12T13:40:05.229Z","3.2.33":"2021-04-12T13:44:10.189Z","3.2.34-renovate-major-socket-io-packages-42f5f3dceaf51b9baaa6d31651ff75053aacb30a":"2021-04-12T13:47:19.411Z","3.2.34-renovate-non-major-140c4e20f048fd4ecc47cb17bb5292fa9b0cbe18":"2021-04-12T15:27:30.028Z","3.2.34":"2021-04-12T15:31:08.034Z","3.2.35-renovate-major-socket-io-packages-b81592409ed9f7e35e52fc38f3c5a5728d787fe6":"2021-04-12T15:35:28.431Z","3.2.35-renovate-non-major-21aae4d188754df6116ea731949ea0ac7be8cc33":"2021-04-12T19:34:25.353Z","3.2.35":"2021-04-12T19:38:06.381Z","3.2.36-renovate-major-socket-io-packages-3006f66a7c2fe666ebd4ca2bc83dddf4f61d9ab1":"2021-04-12T19:45:19.861Z","3.2.36-renovate-non-major-2898840ff68ad82a222d6f1eef18330300f73784":"2021-04-12T21:53:51.371Z","3.2.36":"2021-04-12T21:58:43.754Z","3.2.37-renovate-major-socket-io-packages-e134811eca40fd55a44968f182b0dfc60e80a1de":"2021-04-12T22:04:34.931Z","3.2.37-renovate-non-major-569b54b373af8f16bd1bdbd05d7bb1caabab421f":"2021-04-12T23:27:20.512Z","3.2.37":"2021-04-12T23:31:17.814Z","3.2.38-renovate-major-socket-io-packages-fd2048102309a34243f909e0bb5c23df45d88f6c":"2021-04-12T23:34:15.204Z","3.2.38-renovate-non-major-0e17d7a8a6d7886c495aa73093bf6e0934d91dac":"2021-04-13T03:55:04.281Z","3.2.38":"2021-04-13T03:59:17.797Z","3.2.39-renovate-major-socket-io-packages-75f807988d782f0ace9028a72d12fe22d5eb786f":"2021-04-13T04:01:56.117Z","3.2.39-renovate-non-major-4b198682f4a767f4764cf68f26e8998a0ff62b28":"2021-04-13T05:48:54.476Z","3.2.39":"2021-04-13T05:52:06.302Z","3.2.40-renovate-major-socket-io-packages-b64319c0d3690891a6ad5870435589e2b9ccc82c":"2021-04-13T05:56:51.557Z","3.2.40-renovate-non-major-df1778b49d11a768c2f508d65cfd02888d3c835d":"2021-04-14T01:16:32.739Z","3.2.40":"2021-04-14T01:20:21.671Z","3.2.41-renovate-major-socket-io-packages-603adb5289339ba3b0b8395ff59147677410ef2c":"2021-04-14T01:26:18.958Z","3.2.41-renovate-non-major-50c37450ae9c62ac9a3ade09253cd8c30e9f5c66":"2021-04-14T02:54:34.093Z","3.2.41":"2021-04-14T02:58:04.090Z","3.2.42-renovate-major-socket-io-packages-d613caa174102e1173fecf74606701fdd665873c":"2021-04-14T03:01:45.337Z","3.2.42-renovate-non-major-23796c2da703ee93ce3ad8a8032abe6f64571026":"2021-04-14T04:28:03.992Z","3.2.42":"2021-04-14T04:31:55.554Z","3.2.43-renovate-major-socket-io-packages-5d5c82511da958fa8c9502e2cb7ea5656270a63a":"2021-04-14T04:35:30.331Z","3.2.43-renovate-non-major-7d81246c3dfd41cb95f1d2ef85928a12cd7af400":"2021-04-14T09:32:24.447Z","3.2.43":"2021-04-14T09:36:36.825Z","3.2.44-renovate-major-socket-io-packages-b35b15fad1d8a9ef1e572efce9a5f6250e2d89b6":"2021-04-14T09:55:48.331Z","3.2.44-renovate-non-major-3662addae3fb0ba834d962d8c6bbe89a4de7faf3":"2021-04-14T11:04:34.406Z","3.2.44":"2021-04-14T11:07:20.925Z","3.2.45-renovate-sinon-10-x-c4a5be4960b58326d2aa5eadb43c07e97e146409":"2021-04-14T11:11:27.511Z","3.2.45-renovate-major-socket-io-packages-9b21bc26a7c1beb3bbac2976c365301167e52f51":"2021-04-14T11:12:04.295Z","3.2.45-renovate-non-major-37c266085f7496a6d2f786dde8bdcbb1cf5b0ff7":"2021-04-14T12:42:53.906Z","3.2.45":"2021-04-14T12:46:27.928Z","3.2.46-renovate-major-socket-io-packages-d7b350438f25ed90d55581b3c461275e759e150d":"2021-04-14T12:51:05.352Z","3.2.46-renovate-sinon-10-x-7e8c4cccc139de49456bb1a518e75e81d7ebfb8a":"2021-04-14T12:53:30.787Z","3.2.46-renovate-non-major-3a3616d15524075049868418a61633494be316cc":"2021-04-14T15:47:18.997Z","3.2.46":"2021-04-14T15:51:10.335Z","3.2.47-renovate-major-socket-io-packages-8e374cabba30536d940e2134b94b7cf1704671e1":"2021-04-14T15:57:50.673Z","3.2.47-renovate-non-major-fd27c11a865d18f81f276f36bc5979b55c924dfe":"2021-04-14T17:03:10.146Z","3.2.47":"2021-04-14T17:08:15.181Z","3.2.48-renovate-major-socket-io-packages-6c7b997b381dd07377b7e0a7e807e2e0374ca790":"2021-04-14T17:14:30.192Z","3.2.48-renovate-sinon-10-x-f51d4e777c5c63fd4bcf9d366ae9e75eb013180c":"2021-04-14T17:14:56.774Z","3.2.48-renovate-non-major-59870acf69acebb21d805c398090569c44d2dca1":"2021-04-14T18:54:32.671Z","3.2.48":"2021-04-14T18:59:21.130Z","3.2.48-renovate-sinon-10-x-32ba458d35354cf179e7db715afd4feebeb092d0":"2021-04-14T19:02:04.828Z","3.2.49-renovate-major-socket-io-packages-c10e84551eeab844ef2e46e9e2111ab778c564c3":"2021-04-14T19:06:08.460Z","3.2.49-renovate-non-major-f37008496503ce8a0a9d9081360f9a65a5c0f036":"2021-04-14T20:52:18.837Z","3.2.49":"2021-04-14T20:57:32.389Z","3.2.50-renovate-sinon-10-x-d248dd13eccc63da2664cd463df9caef97a3aafa":"2021-04-14T21:00:55.434Z","3.2.50-renovate-major-socket-io-packages-0bbd723472abbde8b753254d7ac4b3d630db2b86":"2021-04-14T21:02:32.612Z","3.2.50":"2021-04-15T00:11:56.787Z","3.2.50-renovate-non-major-89ac2f3e3e106d3f908c5055f1b5c48b6f7fa45c":"2021-04-15T00:15:10.492Z","3.2.51-renovate-non-major-75e9133ec9ffce02a58c9ecf35f196875f1214b9":"2021-04-15T00:19:03.276Z","3.2.51":"2021-04-15T00:22:58.346Z","3.2.51-renovate-major-socket-io-packages-9455aeb81b2b3e923ad1d0f90565b6089268fd09":"2021-04-15T00:26:49.465Z","3.2.52-renovate-major-socket-io-packages-64902342c44cbea0a0e9b436ab20f3d47686e0c4":"2021-04-15T00:30:33.499Z","3.2.52-renovate-non-major-0784e12dd1af01040d44589f0aaae3ff95ae0df5":"2021-04-15T00:36:49.786Z","3.2.52":"2021-04-15T00:43:23.037Z","3.2.53-renovate-major-socket-io-packages-a3bc74f2da26b9da12a5573a67be2398b9533f35":"2021-04-15T00:47:12.799Z","3.2.53-renovate-non-major-6f1eca1cce2129d0696f893bf822affd6c5aa09b":"2021-04-15T04:29:54.977Z","3.2.53":"2021-04-15T04:33:31.083Z","3.2.54-renovate-major-socket-io-packages-d96fa4456cc2bd77f9cacc4668f264abefc93f60":"2021-04-15T04:38:02.237Z","3.2.54-renovate-non-major-428458eaf5948bdd48c385ba6b33e9172978660b":"2021-04-15T09:00:45.182Z","3.2.54":"2021-04-15T09:03:52.044Z","3.2.55-renovate-major-socket-io-packages-5a1c16860d53df469a7f678cd3d83bd22a7689bf":"2021-04-15T09:07:50.487Z","3.2.55-renovate-non-major-f24adbbbced65cf49121f8cd63094767a30c367c":"2021-04-15T10:24:51.592Z","3.2.55":"2021-04-15T10:41:45.529Z","3.2.55-renovate-major-socket-io-packages-58962317d73a5e7d99b04e134c98e164ebe85a56":"2021-04-15T10:42:05.855Z","3.2.56-renovate-non-major-b42733d3897dbf2f6004d4c33bd73ca61ee4fdf4":"2021-04-15T10:46:38.838Z","3.2.56":"2021-04-15T10:50:40.317Z","3.2.57-renovate-major-socket-io-packages-3563d08c02b448f4c453f7d786cedd9805fb01a8":"2021-04-15T10:56:31.497Z","3.2.57-renovate-non-major-daf5dc0293edfb538a6ccb89b9d21d05b55f98e6":"2021-04-15T14:20:17.290Z","3.2.57":"2021-04-15T14:24:05.698Z","3.2.58-renovate-major-socket-io-packages-f6a1690622b62e7578cc3e9d08132524f5ac8c6e":"2021-04-15T14:27:32.487Z","3.2.58-renovate-non-major-bd7d22ce60f1c508cf801616f1bcbecfd28811c4":"2021-04-15T17:35:45.279Z","3.2.58":"2021-04-15T17:39:29.255Z","3.2.59-renovate-major-socket-io-packages-cf5b5558690633f7e5fc00bb0fa259ef1c692694":"2021-04-15T17:43:16.359Z","3.2.59-renovate-non-major-c36825430182e01f274ae033e519a54bd5fa1a4b":"2021-04-15T19:30:11.528Z","3.2.59":"2021-04-15T19:33:25.936Z","3.2.60-renovate-major-socket-io-packages-21e03c608316001acbc69c615539cd34772e01e0":"2021-04-15T19:37:59.174Z","3.2.60-renovate-non-major-97238814bf25e01f5941b874fbd5f33d7a3176d0":"2021-04-15T23:01:13.780Z","3.2.60":"2021-04-15T23:05:16.636Z","3.2.61-renovate-major-socket-io-packages-9eddb30e3fb6941b16e6db94e6b24a2d0cd9f534":"2021-04-15T23:11:50.808Z","3.2.61-renovate-non-major-a23fb148d3e5efc9c15cd740fa16057817a812ee":"2021-04-16T01:05:40.126Z","3.2.61":"2021-04-16T01:10:30.074Z","3.2.62-renovate-major-socket-io-packages-bcb655defbfaf0205cb724b1a0c4a5ea14b9444d":"2021-04-16T01:16:19.308Z","3.2.62-renovate-non-major-29785595fda9997a25d226bbccfe766123801abf":"2021-04-16T03:51:48.079Z","3.2.62":"2021-04-16T03:55:12.628Z","3.2.63-renovate-major-socket-io-packages-1134fda06ca22e5ac78bb8b176aa7cdedc7adb76":"2021-04-16T04:02:06.022Z","3.2.63-renovate-non-major-aa69a6d8013d7cbb4ab982ba56c046f51d68b686":"2021-04-16T05:42:26.752Z","3.2.63":"2021-04-16T05:46:31.415Z","3.2.64-renovate-major-socket-io-packages-e560ebb1c9a478cc2a54eaf1980a00ce1756ab1e":"2021-04-16T05:51:42.097Z","3.2.64-renovate-non-major-706a4c5ab29e16e467e7a4c5a66b80a74878ade3":"2021-04-16T09:49:26.673Z","3.2.64":"2021-04-16T09:53:13.069Z","3.2.65-renovate-major-socket-io-packages-aa4bc9d37f347078fb00bf5e6a1110efa7fb9aef":"2021-04-16T09:57:25.267Z","3.2.65-renovate-non-major-5a6ed3d1c2920ba7ce237f7ea314a111c50a1da4":"2021-04-16T13:36:36.612Z","3.2.65":"2021-04-16T13:40:27.335Z","3.2.66-renovate-major-socket-io-packages-1fcb4ed9108a10781e4c2b89c9f6ccd19ecc7d69":"2021-04-16T13:44:38.375Z","3.3.0-rmorillo24-minor-relatedpatterns-74c3722d9074b72a44619981a02c936f8b9e2570":"2021-04-16T13:51:29.347Z","3.2.66-renovate-non-major-83bf5b9a3f695cc54541520aed35bb0e7f40cbed":"2021-04-16T15:57:25.257Z","3.2.66":"2021-04-16T16:00:24.017Z","3.2.67-renovate-major-socket-io-packages-aab30aeb656b9d604d103227363a0a359555eefa":"2021-04-16T16:04:32.878Z","3.2.67-renovate-non-major-97713b40592047a58e7e274e2a7a2016382b8df4":"2021-04-16T18:43:41.446Z","3.2.67":"2021-04-16T18:46:54.095Z","3.2.68-renovate-major-socket-io-packages-00be5f94bf8d902ac292da4dd7a13a944921eac4":"2021-04-16T18:50:34.059Z","3.2.68-renovate-non-major-10fdf9a145e5a949bda7f203c82a9c4b58e83ce6":"2021-04-16T23:05:31.455Z","3.2.68":"2021-04-16T23:09:08.565Z","3.2.69-renovate-major-socket-io-packages-f23c443e24014cb70eaee5934bce2432ad4ccea7":"2021-04-16T23:11:40.103Z","3.2.69-renovate-non-major-0cb5240885a1e0f7f6988ef2cf8a9830c69e5390":"2021-04-17T02:15:12.820Z","3.2.69":"2021-04-17T02:18:49.448Z","3.2.70-renovate-major-socket-io-packages-45b19dbf020e29e8e3cfa3182dad5ad6cfbb6cb7":"2021-04-17T02:22:18.651Z","3.2.70-renovate-non-major-36ed4265adddc2ba159144c7050114c90350f8e4":"2021-04-17T05:02:16.499Z","3.2.70":"2021-04-17T05:06:40.167Z","3.2.71-renovate-major-socket-io-packages-847491160fd88584e78152af856e55417d30ed4d":"2021-04-17T05:13:49.630Z","3.2.71-renovate-non-major-e82d28e696ad21e44bf0e80481c68d0be8661da7":"2021-04-17T09:19:34.377Z","3.2.71":"2021-04-17T09:22:56.381Z","3.2.72-renovate-major-socket-io-packages-09532aaf555be894c0fc8ab176865a1f5f2b03ae":"2021-04-17T09:26:47.703Z","3.2.72-renovate-non-major-1717ceaf4907d81bdeb01ec3556ca8768977d408":"2021-04-17T10:58:43.371Z","3.2.72":"2021-04-17T11:01:57.726Z","3.2.73-renovate-major-socket-io-packages-67b61ddee4e6dfd4ebdad407b6a02d8bbce5cd0d":"2021-04-17T11:04:58.124Z","3.2.73-renovate-non-major-7bb4217561353d01b9d7f4dc363d22804008b4f7":"2021-04-17T13:05:47.185Z","3.2.73":"2021-04-17T13:09:44.287Z","3.2.74-renovate-major-socket-io-packages-03957877784ce5913e188bac027250b6dc746f59":"2021-04-17T13:12:45.128Z","3.2.74-renovate-non-major-fc5fb30c0db9f162f02e5e2003785e23004250ac":"2021-04-17T15:20:52.598Z","3.2.74":"2021-04-17T15:24:21.114Z","3.2.75-renovate-major-socket-io-packages-a41a4d5e4cbef67c1521af1be1c8a92913eb09b1":"2021-04-17T15:27:27.514Z","3.2.75-renovate-non-major-587e43b1f16b8b9e5bcceda8304673a6427b7f55":"2021-04-17T17:09:58.460Z","3.2.75":"2021-04-17T17:13:39.895Z","3.2.76-renovate-major-socket-io-packages-58886eb47661f39d36cd257d7daa55b47788cd53":"2021-04-17T17:17:34.321Z","3.2.76-renovate-non-major-b477a89c88c08d9d23b342624d4644dcc3c8f972":"2021-04-17T19:53:23.610Z","3.2.76":"2021-04-17T19:57:04.378Z","3.2.76-renovate-major-socket-io-packages-a8a535c2e30a27ff9480db9f23578a854df48758":"2021-04-17T19:59:56.904Z","3.2.77-renovate-major-socket-io-packages-48cd8e24b5755e4d5d63088938aa820586d91a39":"2021-04-17T20:03:11.017Z","3.2.77-renovate-non-major-57948913626416b49af5b72fa69452f8cc2bee72":"2021-04-17T21:23:26.636Z","3.2.77":"2021-04-17T21:26:39.130Z","3.2.78-renovate-major-socket-io-packages-165d78b3bd6564c0508bc3649d4f28aba6e87947":"2021-04-17T21:30:38.077Z","3.2.78-renovate-non-major-657ad0ee9ae47a1c36c801126b2fbcfa065eb3cb":"2021-04-18T00:08:03.341Z","3.2.78":"2021-04-18T00:11:10.093Z","3.2.79-renovate-major-socket-io-packages-beecf7344498c0b1129aebf26357afa7d2c41063":"2021-04-18T00:16:49.538Z","3.2.79-renovate-non-major-4a444af4cd70013a0fb03b0f9782603bd758b1d8":"2021-04-18T10:56:31.536Z","3.2.79":"2021-04-18T11:00:10.697Z","3.2.80-renovate-major-socket-io-packages-6c7e6c8f44f5d4a4508fdcbdfff47d8c95e6c36a":"2021-04-18T11:03:28.277Z","3.2.80-renovate-non-major-54800d0d3b0ea656b3bedc553391fcd1777d94fe":"2021-04-18T12:54:49.046Z","3.2.80":"2021-04-18T12:58:40.207Z","3.2.81-renovate-major-socket-io-packages-9e9e8554330aca25f74ec3e5c6d7f836c1b11687":"2021-04-18T13:05:08.067Z","3.2.81-renovate-non-major-c9a89bac581da14eed6a461a7d427671dd04444b":"2021-04-18T17:32:22.317Z","3.2.81":"2021-04-18T17:36:01.083Z","3.2.82-renovate-major-socket-io-packages-0dd1f7a307974e0e71693ce794b4e9cc9cdd5726":"2021-04-18T17:39:22.149Z","3.2.82-renovate-non-major-96d48f20e44bc4e325154f1947b016a5cac25ac0":"2021-04-18T20:27:58.685Z","3.2.82":"2021-04-18T20:31:12.493Z","3.2.83-renovate-major-socket-io-packages-2603569c9ccacfb8ee75c581e68287213724689e":"2021-04-18T20:35:13.190Z","3.2.83-renovate-non-major-cd4ef0e26386fb4fc98036e16f0e5c0cd446c768":"2021-04-18T23:36:08.217Z","3.2.83":"2021-04-18T23:39:33.923Z","3.2.84-renovate-major-socket-io-packages-cd7e229a0212a18299cbf8cab28067545ee13a57":"2021-04-18T23:43:14.868Z","3.2.84-renovate-non-major-ebb6bb714167f27bcd59af69fecf417161953046":"2021-04-19T03:34:52.278Z","3.2.84":"2021-04-19T03:38:11.468Z","3.2.85-renovate-major-socket-io-packages-225f0c17bb7c26babcab274c14f9dc0d91fd1959":"2021-04-19T03:42:15.469Z","3.2.85-renovate-non-major-389fcaa3c3cb77c2bb2916113efe113c7adebd49":"2021-04-19T13:47:23.880Z","3.2.85":"2021-04-19T23:11:07.595Z","3.2.86-renovate-major-socket-io-packages-f8632b9b092a5fca5213acdd6b2fa1ff1af6c914":"2021-04-19T23:15:54.562Z","3.2.86-renovate-non-major-ea7f62d822ba821e52c5f10a2473edd736b46d8f":"2021-04-20T02:05:03.666Z","3.2.86":"2021-04-20T02:09:41.100Z","3.2.87-renovate-major-socket-io-packages-90a2dd9f46501c2eaf706ffcc14f88b3af4a6dfa":"2021-04-20T02:15:10.066Z","3.2.87-renovate-non-major-84cb1db02c0874b95d78d908d86f60990b8205e5":"2021-04-20T04:17:44.146Z","3.2.87":"2021-04-20T04:21:57.757Z","3.2.88-renovate-major-socket-io-packages-2a1b4a73568f74893cf64b72b772595dd95b6761":"2021-04-20T04:26:18.900Z","3.2.88-renovate-non-major-bae3f3644f4bb99aafa38ca6ef914351ec811369":"2021-04-20T10:33:49.993Z","3.2.88":"2021-04-20T10:44:51.076Z","3.2.89-renovate-major-socket-io-packages-85aa0dd56b0c9e8c6775b263939308650c39e498":"2021-04-20T11:08:20.032Z","3.2.89-renovate-non-major-d675ffed8474acad976331ed97882bb7b9f81813":"2021-04-21T09:40:57.732Z","3.2.89":"2021-04-21T09:46:49.565Z","3.2.90-renovate-major-socket-io-packages-89d306ad3bd126025fee7be2945a4689f28511d1":"2021-04-21T09:53:40.163Z","3.2.90-renovate-non-major-80834472b5928980e7c1c986365ac28cc78d2b64":"2021-04-21T11:11:51.071Z","3.2.90":"2021-04-21T11:15:10.789Z","3.2.91-renovate-major-socket-io-packages-1ef15e62c0ee5c9bbb365c8bea8297909a52445f":"2021-04-21T11:19:13.096Z","3.2.91-renovate-non-major-b3c0739ab36106aa2aafe178e0f336cd888eb260":"2021-04-21T13:28:54.458Z","3.2.91":"2021-04-21T13:33:08.683Z","3.2.92-renovate-major-socket-io-packages-f7984e10a8c96672ab0fff4fefc39a7e1c34caa8":"2021-04-21T13:39:09.361Z","3.2.92-renovate-non-major-c2cc39dc548fa22e9f5e46400bac288ee6edf9f3":"2021-04-21T15:59:37.438Z","3.2.92":"2021-04-21T16:03:32.580Z","3.2.93-renovate-major-socket-io-packages-5e7e7720f2580529276a058ea0634bf9a02621df":"2021-04-21T16:08:54.090Z","3.2.93-renovate-non-major-5f6f6bb1c2a089fdf4c88fcf830c7833f98cd821":"2021-04-21T17:20:38.453Z","3.2.93":"2021-04-21T17:25:59.125Z","3.2.94-renovate-major-socket-io-packages-3a5e7f0575361b41b6c56649073de2fde1174ffd":"2021-04-21T17:29:16.690Z","3.2.94-renovate-non-major-9db1bc64b660203fad97be422bd4c28fff4351de":"2021-04-21T19:39:43.998Z","3.2.94":"2021-04-21T19:46:11.790Z","3.2.95-renovate-major-socket-io-packages-3587bbe8ecafacb90d6f3b9d40f0b389aa8768cc":"2021-04-21T19:53:28.102Z","3.2.95-renovate-non-major-49d9178f7d8c22bf6b8cf2a9c8991b3efb4e477d":"2021-04-21T21:25:04.740Z","3.2.95":"2021-04-21T21:29:30.343Z","3.2.96-renovate-major-socket-io-packages-4ad6528ec38411abc6cc0398e0535219a44e0444":"2021-04-21T21:35:09.635Z","3.2.96-renovate-non-major-71d6e6bba3aea8f8b2598745108c6c3f74c0f85f":"2021-04-23T03:50:27.532Z","3.2.96":"2021-04-23T03:58:36.597Z","3.2.97-renovate-major-socket-io-packages-eb0e304086af2fde3843d2a9fb2ec0f55ab5705c":"2021-04-23T04:10:18.430Z","3.2.97-renovate-non-major-7cb6a3577ebabfa7e6f10fa78936f5dc343c2c0c":"2021-04-23T06:26:23.277Z","3.2.97":"2021-04-23T06:31:37.698Z","3.2.98-renovate-major-socket-io-packages-b028080ba86d3980d82fc62e5b212904efd6bdde":"2021-04-23T06:38:22.536Z","3.2.98-renovate-non-major-fd0644d7c497076ab2055e736baf48c7c2621756":"2021-04-23T11:30:56.642Z","3.2.98":"2021-04-23T11:34:23.251Z","3.2.99-renovate-major-socket-io-packages-cc1b5e4c7bdce5dcd2456186c82a38395dc12903":"2021-04-23T11:38:21.481Z","3.2.99-renovate-non-major-9585ec65cd71ef68b17da3562c48d969abf20eb3":"2021-04-23T14:30:46.241Z","3.2.99":"2021-04-23T14:34:47.363Z","3.2.100-renovate-major-socket-io-packages-1d8ff9466f068fc928412234f98dba8d81c67a05":"2021-04-23T14:39:03.576Z","3.2.100-renovate-non-major-849145e695a6ea6b1e8703952fe4660ef832b7ce":"2021-04-23T20:27:52.470Z","3.2.100":"2021-04-23T20:31:39.982Z","3.2.101-renovate-major-socket-io-packages-6a7890e82a7abb1a74448f5e287227d30506af13":"2021-04-23T20:35:35.607Z","3.2.101-renovate-non-major-70b3ecb02130e3a4061a4a51e455c84702597c71":"2021-04-24T00:07:27.926Z","3.2.101":"2021-04-24T00:11:34.537Z","3.2.102-renovate-non-major-e675aff0b4d9f6ff3a2fe470316655cd97ce5c19":"2021-04-24T04:19:05.559Z","3.2.102":"2021-04-24T04:24:27.383Z","3.2.103-renovate-major-socket-io-packages-fdf1bc864777769df1fad8a601422620f0a5c9f8":"2021-04-24T04:27:43.861Z","3.2.103-renovate-non-major-52478dee3d8d46ba53d60b561b319a4e7ff209c5":"2021-04-24T11:43:37.243Z","3.2.103":"2021-04-24T11:47:30.931Z","3.2.104-renovate-major-socket-io-packages-e816fbf3a4c86116ac58d03b91a0a8ff98450886":"2021-04-24T11:52:01.613Z","3.2.104-renovate-non-major-dff94a4d909c66b28af27071d5e073546c702d8f":"2021-04-24T15:07:25.481Z","3.2.104":"2021-04-24T15:11:17.109Z","3.2.105-renovate-major-socket-io-packages-91ca4c968ea13798104b84fe87368d4436b48f79":"2021-04-24T15:15:59.073Z","3.2.105-renovate-non-major-7497ecba4d300253f7935a00082b4b9470c813bb":"2021-04-24T19:56:42.445Z","3.2.105":"2021-04-24T20:00:07.638Z","3.2.106-renovate-major-socket-io-packages-85d821b77403adc9dfd2f8e5d3661580ce49d0df":"2021-04-24T20:07:08.652Z","3.2.106-renovate-non-major-0498a0b89a6891e96923ba479a7a3cf1631330fc":"2021-04-25T00:24:44.609Z","3.2.106":"2021-04-25T00:28:31.554Z","3.2.107-renovate-major-socket-io-packages-efd9ccdadc4fa954ec6c0e1c1a45ae62e020ced2":"2021-04-25T00:32:03.439Z","3.2.107-renovate-non-major-549c5665e51be5c348ddb8f1c500c069de09cdcb":"2021-04-25T23:04:53.614Z","3.2.107":"2021-04-25T23:08:28.815Z","3.2.108-renovate-major-socket-io-packages-4bc41c40df75904179f1a787e34267e8e4c4e3e4":"2021-04-25T23:11:47.181Z","3.2.108-renovate-non-major-d839b83b36558d22adb475b3225659ec03e9e4a6":"2021-04-26T01:17:27.756Z","3.2.108":"2021-04-26T01:21:09.866Z","3.2.109-renovate-major-socket-io-packages-e2bda115e4876e3ccdafa922162956cd2e7d75c0":"2021-04-26T01:24:34.594Z","3.2.109-renovate-non-major-5e3c8be9bfc1ce8035ee26275f74be605968fbb4":"2021-04-26T03:10:32.631Z","3.2.109":"2021-04-26T03:13:57.151Z","3.2.110-renovate-major-socket-io-packages-4d24a13fbbbbcf4ae17c8c9ecf7c65c2ad178abe":"2021-04-26T03:17:48.639Z","3.2.110-renovate-non-major-b8a7c7cc3df10dc20f817ba90b61db30688f017d":"2021-04-26T12:00:33.435Z","3.2.110":"2021-04-26T12:05:24.784Z","3.2.111-renovate-major-socket-io-packages-a8ada14a9ac4b3c2acfbe10306a5e0f762344278":"2021-04-26T12:11:03.561Z","3.2.111-renovate-non-major-98f214fb00d01d371fe99cd961e172ecc0ee97dd":"2021-04-26T19:13:15.700Z","3.2.111":"2021-04-26T19:17:07.267Z","3.2.112-renovate-major-socket-io-packages-73c003c834402ad506ea0f78c11b5466db646dcd":"2021-04-26T19:21:21.419Z","3.2.112-renovate-non-major-bcbf0aac0ff75c36043299cd2800d0a0801b7448":"2021-04-27T00:12:21.434Z","3.2.112":"2021-04-27T00:15:50.397Z","3.2.113-renovate-major-socket-io-packages-d6d38112ddaf0128c149c9d26c632fb29849bb9e":"2021-04-27T00:20:57.799Z","3.2.113-renovate-non-major-939e1faa196fdea00287a1252ce717e6d391b276":"2021-04-28T23:31:26.426Z","3.2.113":"2021-04-28T23:34:53.696Z","3.2.114-renovate-major-socket-io-packages-5b72ead215e5c4cc818f0a1d8367b510f782aaca":"2021-04-28T23:38:52.447Z","3.2.114-renovate-non-major-2299c5ec9a493bdbae62b39569b4e7f5878b285b":"2021-04-29T01:28:29.553Z","3.2.114":"2021-04-29T01:31:38.628Z","3.2.115-renovate-major-socket-io-packages-d4f4b26e7857b5fb04bf32fac36ff45893faf616":"2021-04-29T01:35:47.419Z","3.2.115-renovate-non-major-e22cfbb9570723ac74881180ef9971a8549fc9c2":"2021-04-29T02:56:18.407Z","3.2.115":"2021-04-29T03:01:02.506Z","3.2.116-renovate-major-socket-io-packages-1cb83b20b96be6d7f19691058bdfaa4ef79a41cc":"2021-04-29T03:05:11.876Z","3.2.116-renovate-non-major-12505d13e7b76ab201fa3a1dc28a37ea8d276b4e":"2021-04-29T05:12:50.887Z","3.2.116":"2021-04-29T05:16:40.125Z","3.2.117-renovate-major-socket-io-packages-a9698f72abce3fee1a389c12e6cf49c27c051618":"2021-04-29T05:20:49.200Z","3.2.117-renovate-non-major-994390b76af0346abd93b992712c464c8bcbf0da":"2021-04-29T08:08:25.793Z","3.2.117":"2021-04-29T08:13:05.736Z","3.2.117-renovate-major-socket-io-packages-c9b6867eff5317a55dece2da69731f2d7678a10b":"2021-04-29T08:15:24.575Z","3.2.118-renovate-major-socket-io-packages-b91095e2236d7345eb91ef1f2717df1fa3266f07":"2021-04-29T08:21:31.648Z","3.2.118-renovate-non-major-c129d0e780181d6d19d784cbd3f35fd34b1e9bcd":"2021-04-29T10:30:26.098Z","3.2.118":"2021-04-29T10:33:42.847Z","3.2.119-renovate-major-socket-io-packages-0eb4043c0625cd1f7ff6176b88790941b5f9cc6d":"2021-04-29T10:38:53.959Z","3.3.0-rmorillo24-minor-relatedpatterns-a3f3824d38d052d87501491d2c966d0a4309832d":"2021-04-29T13:50:53.646Z","3.2.119-renovate-non-major-a94f71d19238f4fa9ab537d88504120616e788b2":"2021-04-29T15:04:54.757Z","3.2.119":"2021-04-29T15:08:29.030Z","3.2.120-renovate-major-socket-io-packages-bb4268f49c9c5dbab1ae9fab982b403fb82e7065":"2021-04-29T15:12:17.359Z","3.2.120-renovate-non-major-05dffce485b3d6024f358f018ea611e76922f21d":"2021-04-29T17:22:36.992Z","3.2.120":"2021-04-29T17:26:01.617Z","3.2.121-renovate-major-socket-io-packages-f13f20d8afcca244f4263e2729eb1868b278770d":"2021-04-29T17:31:27.823Z","3.2.121-renovate-non-major-2d40fcff86468dc92ba94b448e27b45379bb2ccd":"2021-04-29T19:03:38.843Z","3.2.121":"2021-04-29T19:06:48.639Z","3.2.122-renovate-major-socket-io-packages-46fa1274b9bded17128b85c9257ac4c6185a2511":"2021-04-29T19:12:34.621Z","3.2.122-renovate-non-major-26baae25e64c2721a935d33479d655a1fd31ce2d":"2021-04-29T22:50:48.701Z","3.2.122":"2021-04-29T22:55:22.858Z","3.2.123-renovate-major-socket-io-packages-95b2ce95899c138276c1635338608fcdcb6aaa31":"2021-04-29T22:58:58.436Z","3.2.123-renovate-non-major-2676ad3b6f3c98e33ff0f61c4ecd1ffaf7d734bb":"2021-04-30T00:22:35.676Z","3.2.123":"2021-04-30T00:27:19.182Z","3.2.124-renovate-major-socket-io-packages-112f501b78422d0d011c69ee3066763e725cedc1":"2021-04-30T00:32:17.966Z","3.2.124-renovate-non-major-c48873d54c8a83eb14735ac4dced7ed9d2cbdc9f":"2021-04-30T02:18:05.401Z","3.2.124":"2021-04-30T02:22:14.599Z","3.2.125-renovate-major-socket-io-packages-f11d00a346c7f309e5a6719796a3d975800b27a3":"2021-04-30T02:28:57.478Z","3.2.125-renovate-non-major-4c55657665252e24cab920e23356bfaa6be70379":"2021-04-30T04:28:13.903Z","3.2.125":"2021-04-30T04:31:58.320Z","3.2.126-renovate-major-socket-io-packages-cc5256f066a3ab9a802377cd40878652ed14e19f":"2021-04-30T04:34:57.535Z","3.2.126-renovate-non-major-c3dcad0b064a2a7ecf84434621a7cdb05e436851":"2021-04-30T08:51:06.711Z","3.2.126":"2021-04-30T08:55:10.048Z","3.2.127-renovate-major-socket-io-packages-04e711d3e4afc20fcb65824ded53cc237a2175fd":"2021-04-30T08:59:41.305Z","3.2.127-fix-link-method-types-a8120276615e97e67379bf55a1d37aa6a6320ebe":"2021-04-30T09:04:23.688Z","3.2.127-fix-create-returns-null-a280706fff7c57dbcc88542da80fe4485c2d3faa":"2021-04-30T09:22:18.399Z","3.2.127":"2021-04-30T23:42:57.220Z","3.2.128-renovate-non-major-d28b458bcaafe37fd0edacdba4267b075c77b9d4":"2021-04-30T23:49:03.428Z","3.2.128-renovate-major-socket-io-packages-ac49177e854f7a503ee8d216bc460735477163d3":"2021-04-30T23:49:45.804Z","3.2.128":"2021-04-30T23:52:52.951Z","3.2.129-renovate-major-socket-io-packages-15ed0877ec3730db47735611ba604da33a3b9850":"2021-04-30T23:56:44.849Z","3.2.129-renovate-non-major-e1bf3b776017678a355e00b00a5f780f488a5909":"2021-05-01T03:31:50.326Z","3.2.129":"2021-05-01T03:34:55.512Z","3.2.130-renovate-major-socket-io-packages-dd534ae25c486a2cca6b6fd5775f44020dc6f8a5":"2021-05-01T03:38:52.993Z","3.2.130-renovate-non-major-9db66a76c368b077faa80fe63ffd2f30a730d48f":"2021-05-01T08:59:25.403Z","3.2.130":"2021-05-01T09:03:17.094Z","3.2.131-renovate-major-socket-io-packages-eb289c04fe440fb915d03cc66b1010bf5c6f397a":"2021-05-01T09:06:20.223Z","3.2.131-renovate-non-major-1ca3bb3736aa471bf8a8c575a7be1d4edfc40ef8":"2021-05-01T11:34:52.525Z","3.2.131":"2021-05-01T11:38:24.642Z","3.2.132-renovate-major-socket-io-packages-c3358945df1f8f0fc68cf2dfca7d739945616b65":"2021-05-01T11:41:47.303Z","3.2.132-renovate-non-major-90b55afdf6852b026d524eaf432aaa6a04373f21":"2021-05-01T13:14:34.630Z","3.2.132":"2021-05-01T13:18:09.558Z","3.2.133-renovate-major-socket-io-packages-5fcb46b5385583b922ee071997873df3f5a8de85":"2021-05-01T13:24:06.872Z","3.2.133-renovate-non-major-4a4475f0ea26d439a9e5aa49d7625113bea0d931":"2021-05-01T15:44:03.915Z","3.2.133":"2021-05-01T15:47:48.088Z","3.2.134-renovate-major-socket-io-packages-584be0c56591a5cde2fd691a8d93ba428fe2dbdc":"2021-05-01T15:52:29.811Z","3.2.134-renovate-non-major-b4b7606cfbc7c77a09633822c8baf6d61dce28f1":"2021-05-02T00:11:17.089Z","3.2.134":"2021-05-02T00:14:30.766Z","3.2.135-renovate-major-socket-io-packages-ffeb0cffe440f1ec4a17017126da1c3bb519da68":"2021-05-02T00:18:48.156Z","3.2.135-renovate-non-major-7eaa961b9a2a2bbbbcc887cbc54a3f279235c646":"2021-05-02T01:46:21.405Z","3.2.135":"2021-05-02T01:49:42.609Z","3.2.136-renovate-major-socket-io-packages-03fcda7fa7ebddc8f2251a09b8bcaba73ef186fb":"2021-05-02T01:53:34.826Z","3.2.136-renovate-non-major-df645afa770f051a7a647d7952c310f00d4ae0f2":"2021-05-02T02:34:39.613Z","3.2.136":"2021-05-02T02:38:21.812Z","3.2.137-renovate-major-socket-io-packages-2bf9c3e15ff0d2ef918e168e9ad407b87ded3718":"2021-05-02T02:42:25.303Z","3.2.137-renovate-non-major-f7d89ea98cdcd2387ea590eab89d1eb2f322c1ab":"2021-05-02T04:03:27.723Z","3.2.137":"2021-05-02T04:07:10.283Z","3.2.138-renovate-major-socket-io-packages-24d391446a4e1d78086644f9c506dbd191ff0e10":"2021-05-02T04:11:06.274Z","3.2.138-renovate-non-major-f7d975541a10bf3a61bcf984bc4e60928e46754e":"2021-05-02T07:24:28.505Z","3.2.138":"2021-05-02T07:29:52.135Z","3.2.139-renovate-major-socket-io-packages-e07a87211964139aa8355b4aebd5d860ec40fbd1":"2021-05-02T07:33:59.840Z","3.2.139-renovate-non-major-35723c0741945c1b92ab38ad9fddda5f9e399815":"2021-05-03T00:02:40.758Z","3.2.139":"2021-05-03T00:06:04.178Z","3.2.140-renovate-major-socket-io-packages-77c04d24e2580180867e0b672833c752d5739dbb":"2021-05-03T00:12:11.284Z","3.2.140-fix-link-method-types-9bd87e292fd38b448d95c8249882c4679e53c59b":"2021-05-03T00:19:45.455Z","3.2.140":"2021-05-03T00:23:31.235Z","3.2.141-renovate-major-socket-io-packages-3325d60fc7c28e9a7f9105ac510f9ba1f44fb1ca":"2021-05-03T00:28:56.950Z","3.2.141-renovate-non-major-918ca712076046dbba97b556e6991c2bf5a28215":"2021-05-03T02:49:42.826Z","3.2.141":"2021-05-03T02:53:27.646Z","3.2.142-renovate-major-socket-io-packages-f9c626500dc8cbc8173fe46be0da1efd367a17cf":"2021-05-03T02:58:31.171Z","3.2.142-renovate-non-major-d52a546774edd32c5aa8d499a44e49d6cc492659":"2021-05-03T04:51:28.593Z","3.2.142":"2021-05-03T04:55:18.905Z","3.2.143-renovate-major-socket-io-packages-3a6734faf742c8ca5840d56620c99d0867288635":"2021-05-03T04:59:29.232Z","3.2.143-renovate-non-major-0c5958dd503befe0f42cb5face06280c6303c5cb":"2021-05-03T09:52:03.199Z","3.2.143":"2021-05-03T09:57:30.228Z","3.2.144-renovate-major-socket-io-packages-c8b97500b9667be0ed31397b6fe1c14fa8b9e7fe":"2021-05-03T10:00:03.009Z","3.2.144-renovate-non-major-20a48bb677863f8240462250bb27759fc381f6d7":"2021-05-03T10:37:46.118Z","3.2.144":"2021-05-03T10:42:24.767Z","3.2.145-renovate-major-socket-io-packages-f46a3a35afb326d11432d938ada5dda2353fb0d0":"2021-05-03T10:48:54.252Z","3.2.145-renovate-non-major-b846ecd11e529b8f1b6018b737830b1ec546cc3f":"2021-05-03T12:09:38.521Z","3.2.145":"2021-05-03T12:13:46.790Z","3.2.146-renovate-major-socket-io-packages-af9cd2c3b8cdc506f41b42a6a0c3dae0cb3ee44b":"2021-05-03T12:20:45.112Z","3.2.146-renovate-non-major-3da1888cf1e62fa2afa9fd67bebefb66166af934":"2021-05-03T14:15:36.768Z","3.2.146":"2021-05-03T14:19:32.409Z","3.2.147-renovate-major-socket-io-packages-22ead715376aa60ea1c9d06752313b409baced6c":"2021-05-03T14:23:21.590Z","3.2.147-renovate-non-major-d4fc8e239e88d521548f32b9bacb0917af2b2b32":"2021-05-03T15:51:10.084Z","3.2.147":"2021-05-03T15:55:42.894Z","3.2.148-renovate-major-socket-io-packages-bf4f0be6b4777331ab1ab19266700324849c412d":"2021-05-03T16:04:32.059Z","3.2.148-renovate-non-major-db6e99d5eb691bb096eed76df6f165d560da1a36":"2021-05-03T17:51:33.178Z","3.2.148":"2021-05-03T17:57:25.888Z","3.2.149-renovate-major-socket-io-packages-0bd8aa5e48eedcbb7f33f312858fcdc1a07084f4":"2021-05-03T17:59:13.022Z","3.2.149-renovate-non-major-d2a2ee65a8713edc754f230575f2b440032215b2":"2021-05-03T20:01:27.681Z","3.2.149":"2021-05-03T20:05:57.621Z","3.2.150-renovate-major-socket-io-packages-3cf0db20e1ce68682ef4d36b31b092786679d080":"2021-05-03T20:09:50.376Z","3.2.150-renovate-non-major-34591fa613d1aa9c489199a4d0619af9ae8cb469":"2021-05-03T22:17:03.770Z","3.2.150":"2021-05-03T22:21:05.959Z","3.2.151-renovate-major-socket-io-packages-b0d80579e5faaafe3ec8f98edbd4430e0f0efa5c":"2021-05-03T22:28:41.084Z","3.2.151-renovate-non-major-f49912788790201f85ad518195547a83b774fd31":"2021-05-03T23:58:31.078Z","3.2.151":"2021-05-04T00:04:17.068Z","3.2.152-renovate-major-socket-io-packages-26e3a50a810df5f6238fe51c73a0884771743372":"2021-05-04T00:07:49.004Z","3.2.152-renovate-non-major-8f33a0694b58f70effbcec832fbabca55d899e5c":"2021-05-04T03:11:06.602Z","3.2.152":"2021-05-04T03:15:57.371Z","3.2.152-renovate-major-socket-io-packages-b282a72e3fb158bc1716ef1f970219ac6b2b6a52":"2021-05-04T03:19:30.537Z","3.2.153-renovate-major-socket-io-packages-a46f4b30c5c47c06bb2ece76bb8484acff31a2ea":"2021-05-04T03:25:00.557Z","3.2.153-renovate-non-major-8dc4f8fecb6308a8ad37ccbe31baba045ff6ed42":"2021-05-04T04:53:31.081Z","3.2.153":"2021-05-04T04:57:04.368Z","3.2.154-renovate-non-major-c15a0d39dd7202bbf933cffbf66286bcc005fb8a":"2021-05-04T07:25:17.963Z","3.2.154":"2021-05-04T07:28:36.322Z","3.2.155-renovate-non-major-78e39c4fcefc195dcf91abda379d619aaa5571cc":"2021-05-04T08:21:59.013Z","3.2.155":"2021-05-04T08:26:06.717Z","3.2.156-renovate-non-major-525a9e614db68db133a607586d617367bb659266":"2021-05-04T09:23:27.247Z","3.2.156":"2021-05-04T09:26:48.930Z","3.2.157-renovate-non-major-632c1d273b5e5324eab1b3b0a33d0d8fe5924ba4":"2021-05-04T10:20:06.481Z","3.2.157":"2021-05-04T10:23:45.517Z","3.2.158-renovate-non-major-af1fe29722401926cf5db29775edbf7cc7e3d9cb":"2021-05-04T11:33:19.466Z","3.2.158":"2021-05-04T11:36:48.640Z","3.2.159-renovate-non-major-2272f4a81555a37962c15ec0b5ce9f4425039e20":"2021-05-04T13:04:37.679Z","3.2.159":"2021-05-04T13:08:53.739Z","3.2.160-renovate-non-major-84f00cb6e808d9ed0424c9729970388e276c58dc":"2021-05-04T15:02:37.192Z","3.2.160":"2021-05-04T15:06:41.846Z","3.2.161-renovate-non-major-bb5a7ed92107f3f2dc1e3b0c4a6744e72164bbb3":"2021-05-04T17:27:26.450Z","3.2.161-renovate-major-socket-io-packages-b9146bda837757bc3cb7e26dc06a61b6cb6e7d44":"2021-05-04T17:28:36.694Z","3.2.161":"2021-05-04T17:31:35.577Z","3.2.162-renovate-major-socket-io-packages-bc692ec8298962e536d08cfec75a4f57e23be740":"2021-05-04T17:35:42.107Z","3.2.162-renovate-non-major-59ba2bc56675314a049f7163451786317ea23aac":"2021-05-04T19:16:55.663Z","3.2.162":"2021-05-04T19:20:58.231Z","3.2.163-renovate-major-socket-io-packages-bb9141bf51859859edcda938cf000e4a5bc9d92f":"2021-05-04T19:24:23.591Z","3.2.163-renovate-non-major-c99f607025ce89fdc6153fea4238f4c1052a3d97":"2021-05-04T20:37:31.956Z","3.2.163":"2021-05-04T20:41:32.340Z","3.2.164-renovate-major-socket-io-packages-77f3f088a6926bd363613d934be09f51d5901445":"2021-05-04T20:45:33.853Z","3.2.164-renovate-non-major-015f0519aff78d7981ae02dda83ecb991c6c910c":"2021-05-04T22:14:57.734Z","3.2.164":"2021-05-04T22:19:03.242Z","3.2.165-renovate-major-socket-io-packages-84ec206847b3f2480c6eb9767c9045439d838086":"2021-05-04T22:23:32.106Z","3.2.165-renovate-non-major-1284222f95045a05fb58f3763bc4c3a96facd657":"2021-05-05T00:12:43.101Z","3.2.165":"2021-05-05T00:16:41.651Z","3.2.166-renovate-major-socket-io-packages-792a1bed355def430bdb8582b1087ffae9b49a14":"2021-05-05T00:19:32.199Z","3.2.166-renovate-non-major-a00a99e51cf569afb8e992207b7ef643c967cc1e":"2021-05-05T08:33:51.535Z","3.2.166":"2021-05-05T08:38:10.037Z","3.2.167-renovate-major-socket-io-packages-bebf22e33e44aa309ac64eb2071ad47e5e2b6bc5":"2021-05-05T08:41:54.146Z","3.2.167-renovate-non-major-311c9983844544a83c5f94ab99c79e58f9be1c96":"2021-05-05T14:49:49.200Z","3.2.167":"2021-05-05T14:53:59.976Z","3.2.168-renovate-major-socket-io-packages-554c69d8b51617d292395b8c3383b47e5b348bed":"2021-05-05T14:58:19.723Z","3.2.168-renovate-catch-uncommitted-2-x-127bad1e34798049b50a1e332138defa41df4d8b":"2021-05-05T23:09:33.857Z","3.2.168-renovate-non-major-bc2fcdc10f38bae754adfa808fbc6052cc885afc":"2021-05-06T00:34:28.506Z","3.2.168":"2021-05-06T00:37:57.240Z","3.2.169-renovate-catch-uncommitted-2-x-232691cb1fab7aa32b2759f55530109a0a406912":"2021-05-06T00:41:32.733Z","3.2.169-renovate-major-socket-io-packages-1d30887a06cb4f20239dbf93da9f1040db3a7729":"2021-05-06T00:42:41.314Z","3.2.169-renovate-major-socket-io-packages-ca8d3dc23c4b12cde3233cf5023307d94d4c4b7d":"2021-05-06T12:57:13.734Z","3.2.169":"2021-05-06T23:53:26.408Z","3.2.170-renovate-major-socket-io-packages-ad72156efe99e83b88efa7224984d1f50e036101":"2021-05-06T23:57:49.864Z","3.2.170-renovate-lint-staged-11-x-3f6a8628d8b5ce78334e2cab9098a4b2801d9aeb":"2021-05-07T17:17:53.499Z","3.2.170":"2021-05-08T00:12:28.383Z","3.2.171-renovate-major-socket-io-packages-e8563fa8d0b14945473a62609534bae530acb03f":"2021-05-08T00:22:56.439Z","3.2.171-renovate-non-major-683f2e59b396813b7973e232e7a8c8267492c8a8":"2021-05-08T03:13:45.235Z","3.2.171":"2021-05-08T03:18:01.258Z","3.2.172-renovate-major-socket-io-packages-5bac170eae6161f3895292f4aa90419510372485":"2021-05-08T03:25:50.063Z","3.2.172-renovate-non-major-e25fa782f8a05d2d0c978bbb841b9e46c9c516e0":"2021-05-08T05:14:10.769Z","3.2.172":"2021-05-08T05:17:49.970Z","3.2.173-renovate-major-socket-io-packages-0c53b269d76015d939a9364cc71df499c46139cd":"2021-05-08T05:22:02.188Z","3.2.173-renovate-non-major-6aa6b34b0a22fa73a9d6724f1dd2d5d0170dd9bf":"2021-05-10T07:23:58.728Z","3.2.173":"2021-05-10T07:29:57.720Z","3.2.174-renovate-major-socket-io-packages-99586b8ab506288e4d9fa2a6622cb5384f81e886":"2021-05-10T07:33:24.283Z","3.2.174-renovate-major-socket-io-packages-471e649d72f755c3618e37949da3adec1fd55fb2":"2021-05-11T09:13:30.330Z","3.2.174-renovate-non-major-a8312f080a442559b77ce71aa74fb5d8dd9f6937":"2021-05-11T09:20:51.556Z","3.2.174":"2021-05-11T09:24:45.201Z","3.2.175-renovate-major-socket-io-packages-564a28943068ddcdd5a126e1a9d1f9bd18a9b520":"2021-05-11T09:31:10.748Z","3.2.175-renovate-major-socket-io-packages-b5b0bfab6f63165e39533357056785b010e20ae0":"2021-05-11T22:57:43.066Z","3.3.0-pilot-rope-link-constraints-1-757b98c1b3a4c6ac5613f10257d7cbec862bf301":"2021-05-12T06:17:33.015Z","3.3.0":"2021-05-12T06:20:32.701Z","3.3.1-renovate-major-socket-io-packages-8a7e6a3215cb510ff80bba6797170801d9cf411f":"2021-05-12T06:26:17.460Z","3.4.0-pilot-rope-link-constraints-2-c8ab042c5ed8ddb04db3930ad09d134dd4b48d8b":"2021-05-12T06:45:07.182Z","3.4.0":"2021-05-12T06:48:15.426Z","3.4.1-renovate-major-socket-io-packages-ea37f430ef3d1db726086d60f728b6a628f223e9":"2021-05-12T06:56:24.685Z","3.4.1-renovate-non-major-def4b4b0f77a5c8bc9d5cb4f35932fdf95d72147":"2021-05-12T23:59:57.071Z","3.4.1":"2021-05-13T00:04:06.586Z","3.4.1-renovate-major-socket-io-packages-c76e6f9ca4e69a8ef7be12ba862f258672897b49":"2021-05-13T00:08:27.136Z","3.4.2-renovate-major-socket-io-packages-ae8a3589744ebbe9dc35144ab911c4d05cd8db46":"2021-05-13T00:13:05.462Z","3.4.2-renovate-major-socket-io-packages-750fd9b9eaa03c2d81fab8c5e8f60ce18fcf8744":"2021-05-17T21:55:06.554Z","3.5.0-setGlobalQuerySchema-1767571b52d38105c6043666bcfd01940b15836d":"2021-05-18T03:15:59.998Z","4.0.0-remove-loop-constraints-eb769cfa878a274fea49681e3fa35c35734490b9":"2021-05-18T03:30:01.610Z","3.5.0-setGlobalQuerySchema-be8cfdd440b903165ed6bfc91802469e7ca42acd":"2021-05-18T09:29:49.486Z","3.4.2-renovate-non-major-e685d6d54ad9f5a6d19917a5165fa9b471b0124b":"2021-05-18T18:27:30.946Z","3.4.2":"2021-05-18T18:30:53.120Z","3.4.3-renovate-major-socket-io-packages-87f6e2717bf912a6819e585426e449a1da6d80bb":"2021-05-18T18:36:20.092Z","4.0.0-remove-loop-constraints-d6a012e749a2ee82c5d6ed61d1456e46849560e7":"2021-05-18T23:34:33.876Z","4.0.0":"2021-05-18T23:38:05.152Z","4.0.1-renovate-major-socket-io-packages-cc26c4da75551dc305e0b31a38d75b1e43d70da3":"2021-05-18T23:44:05.928Z","4.1.0-add-more-link-constraints-360ec164caa926fde09c6d28006725ffd2c56e2c":"2021-05-20T04:34:46.667Z","4.1.0":"2021-05-20T04:47:38.377Z","4.2.0-add-user-improvement-roles-88cbc5863a59bc2ad5d0a71a2849c1525a1f51be":"2021-05-20T07:01:57.183Z","4.2.0-add-user-improvement-roles-c8b2f3350de17c5902f5d10886388ed3feea80ca":"2021-05-20T07:24:56.229Z","4.2.0-remove-outdated-link-3ff55d4b3674305dda6f18c493e8424876e28584":"2021-05-20T07:39:32.745Z","4.2.0":"2021-05-20T07:41:40.223Z","4.3.0-remove-outdated-link-657577f27c32f5f2124e5374b32c4ac07be84aaa":"2021-05-20T07:48:22.044Z","4.3.0-rmorillo24-minor-relatedpatterns-d4f3e6f1d3c99ae6c0cad9d0e2bcbcc0034f70ef":"2021-05-20T07:49:48.514Z","4.3.0":"2021-05-20T07:51:45.047Z","4.4.0-rmorillo24-minor-relatedpatterns-12efe92e4ab182c6b1ce58d97866b278fbe8418e":"2021-05-20T07:57:49.074Z","4.4.0":"2021-05-20T08:00:53.476Z","4.4.1-renovate-balena-lint-6-x-1850d36c863071e5ca236526659cb1c0fb8d8197":"2021-05-21T18:10:44.049Z","4.4.1-renovate-external-non-major-78152e2cfd4be2964b311a2eae30094745972a4f":"2021-05-22T01:20:52.710Z","4.4.1-renovate-major-external-major-5f6358587a22130b409ce588f46b6f661a08c03a":"2021-05-22T01:21:30.106Z","4.4.1":"2021-05-22T01:24:51.749Z","4.4.2-renovate-balena-lint-6-x-d431ef7643233c83e7ccb3d9f6ae8849de7ebe17":"2021-05-22T01:29:50.765Z","4.4.2-renovate-major-external-major-6a50ec225b240c2623449245ce13d9a09ba7fbd6":"2021-05-22T01:30:02.682Z","4.4.2-renovate-internal-patch-94409e7ed7cf0b8eafd6540598d567822a8dff00":"2021-05-24T02:46:22.865Z","4.4.2":"2021-05-24T02:49:49.643Z","4.4.3-renovate-balena-lint-6-x-5728a882f34f35dc25df1285320a2942e9923079":"2021-05-24T02:56:28.799Z","4.5.0-setGlobalQuerySchema-cfb40179565d755accea2e5db3fa7c86a801a226":"2021-05-24T03:16:52.981Z","4.4.3-renovate-internal-patch-d97b0bda1fd39e6a1ceacbc6693dfb195431dbbb":"2021-05-24T04:48:46.905Z","4.4.3":"2021-05-24T04:52:17.037Z","4.4.4-renovate-major-external-major-9248950a55371f46e519ab4374e12442db15fdd5":"2021-05-24T04:57:19.505Z","4.4.4-renovate-balena-lint-6-x-65063dff593a24b394263d0f6773e5b508cbf37e":"2021-05-24T04:57:29.107Z","4.4.4-renovate-internal-patch-23074dc7379f7c94cc12c6bf0cc60b61e39e8a49":"2021-05-24T07:34:50.621Z","4.4.4":"2021-05-24T07:38:40.208Z","4.4.5-renovate-balena-lint-6-x-9717837a5ef5f6a1ea1cb35742caaca7bd1e2a8f":"2021-05-24T07:43:12.964Z","4.4.5-renovate-major-external-major-29b018626b2ceca455314502e19dbab6e46ca7fb":"2021-05-24T07:43:42.063Z","5.0.0-rename-product-improvement-0bf102e276c3d1eb33483df7af3bf6e260e11260":"2021-05-24T08:32:48.573Z","4.4.5-renovate-balena-lint-6-x-cec20a04687316c99d5b3d04e347fad7f629b0d4":"2021-05-24T08:58:55.762Z","4.4.5-renovate-balena-lint-6-x-4ffcbf881a3b74d27a413e6257a5abaf50856293":"2021-05-24T11:30:36.472Z","4.4.5-renovate-major-external-major-62b1b9d30d76491c7060be54a50d2c7ebf4d5e88":"2021-05-24T23:00:30.757Z","4.4.5":"2021-05-25T00:05:07.192Z","4.4.6-renovate-major-external-major-c9d6b5ec75f674e7f13b0fb1eb37f6e58ee6ab7c":"2021-05-25T00:16:59.090Z","4.4.6-renovate-internal-patch-ad38507d61785795af757b2270f77bae9f4ecdcf":"2021-05-25T02:20:57.022Z","4.4.6":"2021-05-25T02:24:58.107Z","4.4.7-renovate-major-external-major-7f24c58783c013444fda51a403523342ecfea19d":"2021-05-25T02:31:11.369Z","4.4.7-renovate-major-external-major-1b0a0fde3ae188b91d969b1850930109f90110ed":"2021-05-25T09:39:55.769Z","4.4.7-renovate-major-external-major-74b28df643e7135db980a325348a85296e5a62e4":"2021-05-25T11:38:53.373Z","4.4.7-renovate-major-external-major-491faca3edfab7c28c9bae77d06bb3990b753153":"2021-05-25T14:03:27.045Z","4.4.7-renovate-major-external-major-e373e4323c558e405d23ba430892b3795667ec29":"2021-05-25T23:20:56.533Z","4.4.7-renovate-major-external-major-949549905ddedf888747e2d8f989c4bba7962928":"2021-05-26T15:28:18.223Z","4.4.7-renovate-major-external-major-4566b46dd3684529afe2b2a4dacc749027eb8314":"2021-05-27T00:12:18.387Z","4.4.7-repo-sync-jellyfish-config-default-e8ae90bb8f43c5bab6d369452ee0e0f38d77f47c":"2021-05-27T01:21:43.930Z","4.4.7-repo-sync-jellyfish-config-default-cefee681942c2f47010d0bcbe99ef7d3985f0921":"2021-05-27T03:26:00.872Z","4.4.7-renovate-internal-patch-4f85e23119a2d78cf9785ee59af89913682d92e8":"2021-05-27T03:31:03.696Z","4.4.7":"2021-05-27T03:34:30.075Z","4.4.8-renovate-major-external-major-2c9db5253a7d0be94a381e215398334943fa5b3c":"2021-05-27T03:38:15.726Z","4.4.8-repo-sync-jellyfish-config-default-831ff2751bbdbdf9f2b968a6122300d0071d7502":"2021-05-27T04:18:08.828Z","4.4.8-renovate-internal-patch-42aee5ec93fad57bcd953329b1fdf334cff7fa8e":"2021-05-27T05:31:32.143Z","4.4.8":"2021-05-27T05:35:54.615Z","4.4.9-repo-sync-jellyfish-config-default-322982922f0af4dc8eb9f43c585c485a2f1e62f3":"2021-05-27T06:53:22.074Z","4.4.9":"2021-05-27T08:31:34.505Z","4.4.10-renovate-internal-patch-2978e9e5f94d0c2c071b4100cf5b62d877b2ffb5":"2021-05-27T08:42:33.120Z","4.4.10-renovate-major-external-major-b9e56679bcca591fb46bdd2482540b712b201268":"2021-05-27T08:44:29.866Z","4.4.10":"2021-05-27T08:50:53.988Z","4.4.11-renovate-major-external-major-175a40f556364599b3021ba578fce8d92312c332":"2021-05-27T09:00:09.519Z","4.4.11-renovate-internal-patch-acb21c1cb66b793e646334ae8478ee0b4c28bdd8":"2021-05-27T11:13:40.720Z","4.4.11":"2021-05-27T11:17:10.556Z","4.4.12-renovate-major-external-major-b9e9ce1bcd65fcabbd2f7f96862783996af68548":"2021-05-27T11:20:43.996Z","4.4.12-renovate-internal-patch-cdb234392721486b4cc71b6eab3bc184ca052e1b":"2021-05-29T01:53:02.864Z","4.4.12":"2021-05-29T01:56:48.655Z","4.4.13-renovate-external-non-major-a73dc8117969dd0f428322670199c365f1a456ae":"2021-05-29T02:01:21.854Z","4.4.13":"2021-05-29T02:09:27.481Z","4.4.14-renovate-major-external-major-a9f1c312761bebba6e8fb404b57e4bb03b1d4e58":"2021-05-29T02:14:03.592Z","4.4.14-renovate-internal-patch-e14ee8297de51cc96df7a16b91f2ba0571bdfb5b":"2021-05-29T07:20:32.874Z","4.4.14-renovate-internal-patch-2ebeb3da887aa3922bb6e95c64ee529c72dc7f17":"2021-05-29T09:31:35.531Z","4.4.14":"2021-05-29T09:34:23.957Z","4.4.15-renovate-major-external-major-162f21cf00dffa79906c7e7829813ac69e66c950":"2021-05-29T09:38:11.230Z","4.4.15-renovate-major-external-major-5f4f52f7ad31fc732792568b0c0220d47d7d34f9":"2021-05-29T13:15:29.689Z","4.4.15-renovate-major-external-major-9b2590ff9af16eb6d757655956d1bdf80c941511":"2021-05-29T18:36:59.824Z","4.4.15-renovate-internal-patch-2e00aaab6df1d64345e781289ef7781989df64bc":"2021-05-29T20:24:17.371Z","4.4.15":"2021-05-29T20:28:24.240Z","4.4.16-renovate-major-external-major-0d7b411135e7ac413b8896e4df70fc2d0c481ed4":"2021-05-29T20:32:55.924Z","4.4.16-renovate-internal-patch-3bb6f0991b6fb5f2867d50f13eb8e92b225371ca":"2021-05-31T04:00:58.224Z","4.4.16":"2021-05-31T04:05:01.877Z","4.4.17-renovate-major-external-major-7b1b518b14ae29f264888fecd331a207e0e6f483":"2021-05-31T04:09:58.161Z","4.4.17-renovate-major-external-major-3df2e1cb4d96cbd011e8473b00ce7c18142a06b2":"2021-05-31T08:27:10.038Z","4.4.17-renovate-internal-patch-7302aadd4c556993e345c37a50bd5c23c64c88db":"2021-05-31T10:00:02.508Z","4.4.17":"2021-05-31T10:03:40.381Z","4.4.18-renovate-major-external-major-8add9089f57d5c87fba6b43cf0960a21531c96bf":"2021-05-31T10:07:25.958Z","5.0.0-setGlobalQuerySchema-cbc78996d17a8f143cce3f0a74fa8d54df2d7266":"2021-05-31T11:17:19.504Z","4.5.0-globalMask-055f6a12190759377051d9b678e01aab85041070":"2021-06-01T10:18:49.382Z","4.5.0-globalMask-c70a3b7f48b33f34ab9b2d0b078eb9965dcc5e59":"2021-06-02T06:35:28.715Z","4.4.18-remove-catch-uncommitted-d56b0d2c83e2f958cf0372cb6abe4e30b5892e6e":"2021-06-02T23:22:52.784Z","4.4.18":"2021-06-02T23:26:15.605Z","4.4.19-improve-lint-staged-f48446f52f25c28a2f113b5bf585bb98cb20081a":"2021-06-03T23:33:20.076Z","4.4.19-improve-lint-staged-4ddc490949fac5c8c9a0680df9aed5e1168dec4d":"2021-06-04T00:15:17.037Z","4.4.19":"2021-06-04T00:18:11.311Z","4.4.20-renovate-balena-jellyfish-types-0-x-b43b4dc3704421ef97873a60e87c5737593a5a78":"2021-06-05T08:34:09.748Z","4.4.20-renovate-major-external-major-a150369abf45751b6368387537bce57fe45312f4":"2021-06-05T08:35:10.180Z","4.4.20":"2021-06-05T15:14:49.535Z","4.4.21-renovate-external-non-major-b45c978393b7e9113c530256d97f35059f6fead0":"2021-06-05T15:19:28.075Z","4.4.21-renovate-major-external-major-0a881cec5b14bbda1498f684d62f2056db9d76a4":"2021-06-05T15:22:53.228Z","4.4.21":"2021-06-05T15:25:20.765Z","4.4.22-renovate-major-external-major-723e597a76a9eaa218e81e7e88bb5c40b93fd226":"2021-06-05T15:29:18.027Z","4.4.22-bump-sinon-f6645958e658e286720e77ffcf9f138665f4acab":"2021-06-06T00:01:14.489Z","4.4.22":"2021-06-06T00:11:20.310Z","4.4.23-renovate-major-external-major-5ef58f0189594ed9d8976136b0d553a0a58ffe66":"2021-06-06T00:15:57.747Z","4.4.23-bump-jest-6d5ae48b0d37dfbb7a29f70a35ebd4983e04d6be":"2021-06-06T06:47:44.812Z","4.4.23":"2021-06-06T06:50:37.143Z","4.4.24-renovate-major-external-major-5485c099ef3aba28d189a3d83c2a18ac2ce0e232":"2021-06-06T06:55:43.093Z","4.4.24-renovate-external-non-major-944f6ec2c0b58d091e7d9c8ddb06b7ebd281294a":"2021-06-06T17:35:53.092Z","4.4.24":"2021-06-06T17:38:43.315Z","4.4.25-renovate-major-external-major-51f8dd7d72d65cef3aaefe452e2b1a1baa2afbca":"2021-06-06T17:43:53.491Z","4.4.25-renovate-internal-patch-ccd0b3f4730ba311156033cb2a9ac5e74acebf9b":"2021-06-07T02:43:44.894Z","4.4.25":"2021-06-07T02:47:18.918Z","4.4.26-renovate-major-external-major-61dc059785e2035f0e73522c24114cb1ca8efe3c":"2021-06-07T02:51:45.880Z","4.5.0-fixup-link-constraints-91f5c23b13aa6fe3ffe27034b996ba68c063398a":"2021-06-07T08:53:10.430Z","4.5.0-fixup-link-constraints-d9f9fc92280e26ae8a0beb8797b2428985bc7d93":"2021-06-07T08:59:23.942Z","4.4.26-renovate-internal-patch-6ebba6c8f9e59d1dd414cee6e79859e6c36b1086":"2021-06-08T03:45:37.440Z","4.4.26":"2021-06-08T03:49:05.180Z","4.4.27-renovate-internal-patch-413efc083c1c6878e5ee868aff848fa668ab9186":"2021-06-08T03:52:41.207Z","4.4.27-renovate-major-external-major-d3faa881f70a05c0d0d127c8408fce3f21ef0107":"2021-06-08T03:57:18.997Z","4.4.27":"2021-06-08T03:59:40.513Z","4.4.28-renovate-major-external-major-eb3b49cd44305146b044eb8dbd48c3421debf916":"2021-06-08T04:04:11.542Z","4.5.0-globalMask-b2a5896a251fb76e0c74ae427979de5d430afe9c":"2021-06-08T04:18:17.253Z","4.4.28-renovate-internal-patch-7dffadb76f3ab61a75d6afcfd068ed5610691cfa":"2021-06-08T07:33:10.584Z","4.4.28":"2021-06-08T07:37:53.810Z","4.4.29-renovate-major-external-major-575602f7b0e64187029f580df68c2e11d242d236":"2021-06-08T07:41:01.965Z","4.5.0-notify-b19e413c47993aba466a72bccbadd8e2c428c34b":"2021-06-08T09:07:44.229Z","4.5.0-globalMask-64ca96035d05bead47f15925021d93c626b34284":"2021-06-08T09:13:13.821Z","4.5.0":"2021-06-08T09:25:33.394Z","4.5.1-renovate-major-external-major-c7620d36e7468546feb22484095e3841995945b1":"2021-06-08T09:32:45.864Z","4.6.0-notify-a1e48a4550ae33045a786e3194adcf6068d34629":"2021-06-08T09:50:05.204Z","4.6.0":"2021-06-08T09:53:39.362Z","4.6.1-renovate-major-external-major-fa23711c1a7edff35a7a78e8c494a9ca416c4206":"2021-06-08T09:59:42.405Z","4.7.0-fixup-link-constraints-fd95c4c9d53378bc233ca847075584f28652ae97":"2021-06-09T11:09:06.994Z","4.7.0-fixup-link-constraints-7a27fe3ab8fb09eafba568cdca4a2ee4ab0f3df9":"2021-06-10T01:30:21.434Z","4.7.0":"2021-06-10T04:58:59.111Z","4.7.1-renovate-major-external-major-2e6b78e0f063d110247ad5dadcac8bd06b6cb9df":"2021-06-10T05:05:42.287Z","4.7.1-repo-sync-jellyfish-config-default-91bbd25627b796ae4a079b96113ef74fabc9bf2a":"2021-06-11T05:05:29.409Z","4.7.1-renovate-internal-patch-e85e31f4e87af0f7eb86e29dfb6d69c19c0fb2fc":"2021-06-11T07:40:29.021Z","4.7.1":"2021-06-11T07:44:03.190Z","4.7.2-renovate-major-external-major-cf89b7d5680b6efa4ff72d008fc1b00d4ee006b7":"2021-06-11T07:50:15.115Z","5.0.0-rename-product-improvement-5236a74fcf1df77f69dbe578ca69fb4e4d858cd6":"2021-06-12T02:02:23.084Z","5.0.0":"2021-06-12T02:10:07.240Z","5.0.1-renovate-major-external-major-5cb14da028fa6b6a03279298c5f74ff036ecd71f":"2021-06-12T02:16:40.840Z","5.0.1-renovate-internal-patch-e92ed8c85d5d89b4eda71daff3ca68c27b5e366f":"2021-06-12T03:48:03.198Z","5.0.1":"2021-06-12T03:51:49.739Z","5.0.2-renovate-major-external-major-439053f160aa80f2afad2a54c5f82a56a07b9ffd":"2021-06-12T03:55:13.135Z","5.0.2-repo-sync-jellyfish-config-default-62f294a1b5ab2d77bc1bc2ccbc30033eea85bcff":"2021-06-15T01:31:47.801Z","5.0.2-renovate-internal-patch-f935db24a77cbcbf7126e14e6b4d042e3770c304":"2021-06-15T02:39:39.166Z","5.0.2":"2021-06-15T02:43:38.645Z","5.0.3-renovate-major-external-major-7f97ac12897ba5f3d6c565d08506881c8eaf2e22":"2021-06-15T02:48:21.209Z","5.0.3-repo-sync-jellyfish-config-default-fd634d817afdf4790314ac88dce4067f0363fc15":"2021-06-15T03:25:42.684Z","5.0.3":"2021-06-15T03:31:50.264Z","5.0.4-renovate-major-external-major-b2990da63d1559d8464e269e3215338a902a9d04":"2021-06-15T03:37:55.910Z","5.0.4-renovate-internal-patch-78eaff1e960690a157f4e0ca696ba5857c8c9128":"2021-06-19T02:47:57.666Z","5.0.4":"2021-06-19T02:51:21.683Z","5.0.5-renovate-major-external-major-1f7abe18ca9ace47712e1b6932799186e40ead62":"2021-06-19T02:57:58.391Z","5.0.5-bump-typescript-410af9d7a7dff1531027dacb19ccdfe9b0d27b9a":"2021-06-19T13:15:59.022Z","5.0.5":"2021-06-19T13:19:29.581Z","5.0.6-renovate-major-external-major-32d5d8bc99184be31ce6cab48ed3e794a6271e89":"2021-06-19T13:22:15.581Z","5.0.6-renovate-internal-patch-b6a6fe12caae1b8d58aba27adb25f856de6fd099":"2021-06-22T08:21:29.832Z","5.0.6":"2021-06-22T08:27:25.588Z","5.0.7-renovate-major-external-major-81b92882d3e085b257a71fac0d599e9f3922f1a7":"2021-06-22T08:29:25.035Z","5.0.7-renovate-balena-jellyfish-types-0-x-f42a9ff3e7adbd74d3de1af08361894222ff0577":"2021-06-22T12:03:30.883Z","5.0.7":"2021-06-22T23:29:44.097Z","5.0.8-renovate-major-external-major-613df0fedcf1e39a5ee96eed8313db63ad9a8026":"2021-06-22T23:35:57.634Z","5.0.8-bump-jest-2-ba66be5548e0f72adc6946dcd7ccb5109fa60f2d":"2021-06-23T23:42:33.582Z","5.0.8":"2021-06-23T23:46:42.701Z","5.0.9-renovate-major-external-major-3a669b30a10fc59bec455bb90ae67f4e20ca5615":"2021-06-23T23:54:00.129Z","5.0.9-notifications-v2-01a7e27ac3f6d844a18bd6952acc6253aabd97a0":"2021-06-24T10:27:00.512Z","5.0.9":"2021-06-24T15:03:49.330Z","5.0.10-renovate-major-external-major-d9d31fdf84308e4cd13534a7bef48f4e3d59d99b":"2021-06-24T15:10:11.105Z","5.1.0-saga-relationships-f7699da63d55631283945a52d437bfbd4333ff85":"2021-06-25T04:20:53.383Z","5.1.0":"2021-06-25T04:24:04.361Z","5.1.1-renovate-major-external-major-6e0c04f03b0dd8197cdbe9cbd28463cb6d7a45e0":"2021-06-25T04:30:55.940Z","5.1.1-bump-depcheck-2911fa10f6fd4e13a0853f414e552a13e0263eea":"2021-06-25T22:49:37.907Z","5.1.1":"2021-06-25T22:54:01.001Z","5.2.0-project-link-constraints-5a3942b6552207f29cb2110683f1d61091c8acb8":"2021-06-29T04:45:32.309Z","5.2.0-renovate-external-non-major-77798a2cb375bd5c5809a216862354380fd87f09":"2021-06-29T08:07:29.794Z","5.2.1-renovate-major-external-major-3ac86ed97773b952ec86574fb1ba063efd2e25f5":"2021-06-29T08:10:34.921Z","5.2.1-renovate-external-non-major-a6b6dc3462b8a32b6999eb75da398eb97b43fe1e":"2021-06-29T08:10:59.860Z","5.2.2-renovate-major-external-major-95b053a927067ee022cc3ee138e263d3f9d7dc24":"2021-06-29T08:17:40.112Z","5.2.2-renovate-internal-patch-922f6de6481ed4ce5b7507d8a91f8dceeab18838":"2021-06-29T11:56:40.385Z","5.2.2":"2021-06-29T12:00:36.220Z","5.2.3-renovate-major-external-major-dc4ba64290baab4bfe64d5a093dc7c72b8aa662e":"2021-06-29T12:04:11.381Z","5.2.3-repo-sync-jellyfish-config-default-1cccb61a7d5c0cf017a1cd4075e69e3e3d5b4366":"2021-06-30T01:34:36.399Z","5.2.3":"2021-06-30T01:38:14.340Z","5.2.4-renovate-balena-jellyfish-types-0-x-26ebd395ce0f1343784584d5409221341a7cef2c":"2021-07-02T06:21:19.512Z","5.2.4-renovate-balena-jellyfish-types-0-x-a2446595e3fc9808d9cea531ac0da43bbf1b8721":"2021-07-02T07:50:31.005Z","5.2.4":"2021-07-02T22:28:31.437Z","5.2.5-renovate-major-external-major-325b65774a8f1275c2ad5a9c2eb0312c06445956":"2021-07-02T22:32:16.916Z","5.2.5-renovate-internal-patch-e9b026a9edcaec6a55b799fd9a643b3de6f06f8d":"2021-07-02T23:41:44.973Z","5.2.5":"2021-07-02T23:45:31.138Z","5.2.6-renovate-major-external-major-71f87e141aa97f242354bbf975d3cd0af9b40c9c":"2021-07-02T23:49:16.486Z","5.2.6-renovate-internal-patch-91001970889d47210f5f7f8a588b4ce2d8534a81":"2021-07-03T01:06:58.136Z","5.2.6":"2021-07-03T01:11:47.341Z","5.2.7-renovate-external-non-major-acf7ea18189f20401430d591da7d6d6ebe929578":"2021-07-03T01:16:33.068Z","5.2.7-renovate-major-external-major-a3006a0fec146b7ed8ba4e7aa12eb284925bd581":"2021-07-03T01:16:58.566Z","5.2.7-renovate-internal-patch-011bf94a41484cf3911704f93fe4ad49a8b9ddb0":"2021-07-03T03:03:16.931Z","5.2.7":"2021-07-03T03:06:33.818Z","5.2.8-renovate-external-non-major-9bf35f348acb46406dd77b167a0ce37a086c66b8":"2021-07-03T03:09:58.042Z","5.2.8-renovate-major-external-major-a91ba8e473b0ec0dc76a5f22e3a571d67f260d16":"2021-07-03T03:10:49.609Z","5.2.8":"2021-07-03T03:15:57.295Z","5.2.9-renovate-major-external-major-7be7c5a8e23bba5546947c9f001d87e5927e4c83":"2021-07-03T03:19:20.519Z","5.2.9-renovate-external-non-major-db6ec9408448928054f4fe3d871a1c50eb3015d5":"2021-07-04T20:09:39.558Z","5.2.9":"2021-07-04T20:12:50.504Z","5.2.10-renovate-major-external-major-a1797988d927c91eabb0a814eee3bc832f28344c":"2021-07-04T20:15:53.279Z","5.2.10-renovate-internal-patch-efca3a3a7cd55301d3424948d2710b78c056c398":"2021-07-05T02:25:30.259Z","5.2.10":"2021-07-05T02:30:17.978Z","5.2.11-renovate-major-external-major-82cfa9f10e9ace6c154b9c6761ea8f0af77133fc":"2021-07-05T02:34:33.760Z","5.3.0-notify-any-link-fd368388817d4d4fa79be2f5db18a31b0164e084":"2021-07-06T16:21:33.156Z","5.3.0":"2021-07-06T16:25:02.637Z","5.3.1-renovate-major-external-major-d66bb9e0e21819b46df42ec6a64e4fe182bbdf46":"2021-07-06T16:30:13.919Z","5.3.1-renovate-internal-patch-527124b23c833c0bbe24a52344f859b949028adc":"2021-07-09T02:06:16.438Z","5.3.1":"2021-07-09T02:10:24.786Z","5.3.2-renovate-major-external-major-5bab93a2330a34a2441a91aa34d79572dfe7f024":"2021-07-09T02:15:50.394Z","5.3.2-renovate-external-non-major-c28237419f2d28df040d9ba24dcb75e731838b9b":"2021-07-10T00:28:54.506Z","5.3.2":"2021-07-10T00:34:12.248Z","5.3.3-renovate-major-external-major-860be4a7e2063b4f3645ba7f35edfd1f314256a8":"2021-07-10T00:40:41.464Z","5.3.3-use-jellyfish-config-081dafa2d95e8117554aedbb0224f73c7c6d0087":"2021-07-14T07:42:15.704Z","5.3.3":"2021-07-14T07:46:19.563Z","5.3.4-ecmascript-downgrade-ea0b2e63930bb39f06e16377fbf8bd0de792fe56":"2021-07-15T15:55:10.960Z","5.3.4":"2021-07-15T15:58:54.168Z","5.3.5-remove-whitesource-0079f090867ef9c4b083a8290bf04e4b7956b6a6":"2021-07-17T00:13:45.575Z","5.3.5":"2021-07-17T00:17:59.754Z","5.4.0-h32-pr-commit-cr-links-cccf7ee82b8f134736141f875060ff7d8d3ccc18":"2021-07-19T10:24:09.461Z","5.4.0":"2021-07-19T10:27:19.474Z","5.4.1-remove-contribution-score-refs-e0467542779dc71bb000a523fa20e9b967b76b5d":"2021-07-22T14:23:11.693Z","5.4.1":"2021-07-22T14:26:33.070Z","5.4.2-renovate-major-external-major-58bb334190f2e09667edec0ada48cb91a3b88957":"2021-08-03T00:27:21.198Z","5.4.2":"2021-08-04T00:31:50.875Z","5.4.3-h32-unify-script-names-f6f61f8595ae7fabc86b236825b9d61b862a8851":"2021-08-04T23:24:33.353Z","5.4.3":"2021-08-04T23:28:11.234Z","5.5.0-add-bookmarked-constraint-9effe005981db7571681d7c9e40f66bc03877558":"2021-08-05T06:44:08.921Z","5.5.0":"2021-08-05T10:00:20.069Z","5.6.0-was-created-by-6f733a0c0b1eb4be287da920321be8d3aa5fc1ed":"2021-08-06T04:21:01.954Z","5.5.1-h32-merged-links-da36a7ec9ace18298a63738d169af2190ebfe8c9":"2021-08-06T16:23:25.988Z","5.5.1":"2021-08-06T16:26:40.764Z","5.5.2-h32-contract-repo-names-5c30113feb2dc5f4202456042df2b01795a81f33":"2021-08-16T14:56:58.835Z","5.5.2":"2021-08-16T15:00:30.968Z","6.0.0-remove-support-issue-26680ba81ccca59590087802d032c88053fe4105":"2021-08-24T08:01:25.536Z","6.0.0":"2021-08-24T11:30:32.718Z","6.0.1-repo-sync-jellyfish-config-default-6a604d2086908c1971541b46340c10bf265aacc5":"2021-10-04T03:33:06.141Z","6.0.1-repo-sync-jellyfish-config-default-20f56c0bd0ffcd947391049717b4c2597fa4b880":"2021-10-04T05:16:27.390Z","6.0.1":"2021-10-05T00:02:23.768Z","6.0.2":"2021-10-28T08:45:57.052Z","6.0.3-lucianbuzzo-simplify-login-with-token-7cdb2d7e212a7d17b4d4dc998bb20b6aab3ec5ed":"2021-10-29T14:10:43.255Z","6.0.3":"2021-10-29T14:16:54.184Z","7.0.0-sync-stream-4a9ad308d855448c3de9be66e659b9600a99096b":"2021-10-30T13:40:28.787Z","7.0.0-sync-stream-c74ece642fbc2ba0779f79255c97bcd048a93f40":"2021-10-30T20:19:39.101Z","7.0.0-sync-stream-180bc7dd3cf431deb0937fe18a4b620dd0e52aac":"2021-10-30T20:41:37.106Z","7.0.0":"2021-10-31T13:30:03.741Z","7.0.1-joshbwlng-set-license-45bd20987afb7ab83ae7e8d676ff3bc116dea772":"2021-11-15T03:53:03.651Z","7.0.1":"2021-11-15T03:56:42.010Z","7.0.2-joshbwlng-bump-jest-types-f38a525730c782153e9a393ead71c1ec80cf561a":"2021-11-15T07:15:32.204Z","7.0.2":"2021-11-15T07:18:40.626Z","7.0.3-repo-sync-jellyfish-config-default-b450718a63376fb63825d51bffe6e3199662f54e":"2021-11-16T02:00:57.981Z","7.0.3":"2021-11-16T03:59:55.278Z","7.0.4-joshbwlng-renovate-config-92cff2821fdf130fc196a02e1d0c6a3cbbe3cd0e":"2021-11-20T05:56:25.079Z","7.0.4-renovate-balena-jellyfish-types-0-x-dc49d0570060478c30441152ea37792111263958":"2021-11-20T06:02:59.661Z","7.0.4":"2021-11-20T06:05:29.602Z","7.0.5-renovate-balena-jellyfish-config-1-x-9fbe0a8d50ce11dffa9d43254a732a29a3f0e37f":"2021-11-20T06:10:11.336Z","7.0.5-renovate-major-external-major-5cf44f9183fb4e3989ac185d23162b058eb89cff":"2021-11-20T06:11:20.459Z","7.0.5":"2021-11-20T06:12:49.105Z","7.0.6-renovate-major-external-major-f39c28692b05f6881e942d137df2f3e7ba84d0b4":"2021-11-20T06:15:50.582Z","7.0.6-renovate-external-non-major-23ea00bd1bc5b9ec0527d6edcc9d94c25f8c62d0":"2021-11-20T06:16:43.598Z","7.0.6-renovate-balena-jellyfish-types-1-x-be64c9cb8e1407bc3de189c798331c0258bf1416":"2021-11-20T09:59:09.508Z","7.0.6":"2021-11-20T23:58:53.501Z","7.0.7-joshbwlng-remove-license-headers-5f2f5e517ccb8bc16e4f8bb7c9c218c9eb9d8599":"2021-11-21T01:32:24.838Z","7.0.7-renovate-balena-jellycheck-1-x-5f19229f4b2b59d1fc902ecc665bfaf9f3089adb":"2021-11-21T04:30:23.030Z","7.0.7-renovate-external-non-major-7f7c242eabb0c8be57ba379b50c59de8d3bcd028":"2021-11-21T05:30:16.578Z","7.0.7-renovate-external-non-major-20b7677d2a170fa72e066ccbf819923e91d2b6db":"2021-11-21T07:25:19.575Z","7.0.7":"2021-11-21T14:32:40.092Z","7.0.8-renovate-external-non-major-be735b5ead65fd47f5a229dbb88b3d27a45f61d4":"2021-11-21T14:36:37.795Z","7.0.8-joshbwlng-remove-license-headers-b6107e77c7ad2f3bb37164bbb590ac6dadd33d84":"2021-11-21T15:23:43.582Z","7.0.8-renovate-external-non-major-587f8613f4db8a91558213368079cf51e328d12e":"2021-11-21T17:27:08.219Z","7.0.8":"2021-11-21T22:52:50.797Z","7.0.9-renovate-external-non-major-c45a17bb392309daeb13ca0cefec03f91426092e":"2021-11-21T22:56:58.249Z","7.0.9-joshbwlng-bump-deps-1-8fb51521032afc40ab29acb45348b41c390aeb72":"2021-11-22T04:17:32.999Z","7.0.9":"2021-11-22T04:21:19.557Z","7.0.10-renovate-external-non-major-73f7cef9811665d6906fdf54297cbf00e154d88f":"2021-11-22T04:25:31.499Z","7.0.10-joshbwlng-bump-axios-ea7250591ce3186bcc8e664d5c27904b4a319b96":"2021-11-22T04:42:32.386Z","7.0.10":"2021-11-22T04:45:53.774Z","7.0.11-renovate-external-non-major-ec0b3e906dd98ca2ca6e789bb7594c764900880a":"2021-11-22T04:50:52.483Z","7.0.11-joshbwlng-bump-nock-051684f83e9d674103c260bbbf433cdac893cc0d":"2021-11-22T04:52:12.491Z","7.0.11":"2021-11-22T04:55:48.365Z","7.0.12-renovate-external-non-major-c07301d1593fd7e58f492453eb3c90f2184a5d0f":"2021-11-22T05:00:18.784Z","7.0.12-joshbwlng-bump-deps-2-f02c92908047a05f6addc2a32ae8b0f149104c9e":"2021-11-22T05:03:40.843Z","7.0.12-joshbwlng-bump-deps-2-6d98d8d5f12dba753727eaa2afcb79668b4e9799":"2021-11-22T05:09:17.084Z","7.0.12-renovate-external-non-major-06d4a6af88e9293395c2de6a2287392abfb54a9f":"2021-11-22T05:16:10.674Z","7.0.12-renovate-external-non-major-079955a27f8def4f74c3627aec5adb5b820343ff":"2021-11-22T10:10:21.784Z","7.0.12":"2021-11-23T02:02:09.813Z","7.0.13-renovate-typescript-4-x-085c43b34df8e75fe9bfabffad18cab25085db56":"2021-11-23T02:07:28.437Z","7.0.13-joshbwlng-bump-lint-staged-7341be06beef993f818f3488d5af148917faf51b":"2021-11-23T02:09:24.423Z","7.0.13":"2021-11-23T02:12:26.621Z","7.0.14-renovate-external-non-major-40a4f47cb75412726240c05de29cf7a20f324ea9":"2021-11-23T02:18:51.631Z","7.0.14-joshbwlng-bump-ts-jest-0d78665d66f7ca25f6c907a9caef3628064342e2":"2021-11-23T02:20:24.074Z","7.0.14":"2021-11-23T02:22:34.233Z","7.0.15-renovate-typescript-4-x-03493716bbc7d45cec44899f9e867323f19bcf58":"2021-11-23T02:24:15.411Z","7.0.15-joshbwlng-bump-ts-jest-4bf9d8d14271b2567dad8ca722465338934318e2":"2021-11-23T02:28:18.750Z","7.0.15":"2021-11-23T02:31:57.396Z","7.0.16-renovate-typescript-4-x-3e6401aeeff845c85dabaee086727bac9edc556e":"2021-11-23T02:36:44.980Z","7.0.16-repo-sync-jellyfish-config-default-2e2b3826637dfd44ba462e03bf4e8e46a4381d90":"2021-11-24T06:48:05.354Z","7.0.16":"2021-11-24T12:56:01.751Z","7.0.17-renovate-typescript-4-x-35173c9224ba65f496f550c52c8eb07201a5c756":"2021-11-24T13:01:45.365Z","7.0.17-joshbwlng-remove-jellycheck-42eed20ae61e8e123a6963afba31f8ee21f5ae39":"2021-11-25T02:13:25.545Z","7.0.17":"2021-11-25T02:17:07.000Z","7.0.18-renovate-typescript-4-x-0bedd14c9cdb4360c011298395b83e67c376e1da":"2021-11-25T08:21:33.167Z","7.0.18":"2021-11-26T01:11:21.387Z","7.0.19-joshbwlng-use-renovate-config-a1eaba76a0c2e5750be103b6267379c5c8c7eb89":"2021-11-26T04:53:15.679Z","7.0.19":"2021-11-26T04:56:18.373Z","7.0.20-renovate-balena-jellyfish-config-2-x-eab4089b6aa97c87467b650ef6c96bdf003cea07":"2021-11-26T11:12:03.600Z","7.0.20-renovate-balena-lint-6-x-2ef6f04056b6a123cf7e878c3e8863b1a7efeda8":"2021-11-26T18:13:29.296Z","7.0.20":"2021-11-26T18:17:24.527Z","7.0.21-renovate-balena-jellyfish-config-2-x-02e1ca88e56859350e56e18bc29d580f3822fb87":"2021-11-26T18:22:45.371Z","7.0.21-renovate-balena-jellyfish-config-2-x-9474a06f41972a5c4a701347b1f2e3743974924e":"2021-11-27T00:40:25.908Z","7.0.21-renovate-external-non-major-5cd252b2fc5e33b8b78f776808a798d6c70b76f3":"2021-11-28T13:26:03.024Z","7.0.21":"2021-11-28T13:28:52.349Z","7.0.22-renovate-external-non-major-af533ebdb98f4b8743b4f6887cde5223a77db174":"2021-12-04T00:11:31.412Z","7.0.22":"2021-12-04T00:16:05.651Z","7.0.23-renovate-external-non-major-898a5f55b788614a83ba11215bd056108ae15513":"2021-12-05T10:42:21.076Z","7.0.23":"2021-12-05T10:46:22.777Z","8.0.0-edufschmidt-authentication-tokens-fe5956dd45cc013f385c882fc19731634b4b31ad":"2021-12-07T19:20:38.453Z","7.0.24-renovate-typescript-4-x-bd6d77da04f091557658e0895361cb19711fbdb1":"2021-12-09T23:00:14.062Z","7.0.24":"2021-12-11T04:36:58.815Z","7.0.25-renovate-external-non-major-77988e21e7c21af93bb88ccc4710beb1cb22c542":"2021-12-11T09:33:07.425Z","7.0.25":"2021-12-11T09:37:18.685Z","7.0.26-joshbwlng-drop-depcheck-a2333d99c138c7d2ee243718cc4380d723dc03e3":"2021-12-14T02:44:49.230Z","7.0.26":"2021-12-14T02:48:05.196Z","8.0.0-edufschmidt-authentication-tokens-883f3120c508bbc1d7a1e32fcfaf43fd663b4c18":"2021-12-14T13:22:36.878Z","7.0.27-renovate-external-non-major-013d5b38ccd4f24c36198a889d04622c476eb79a":"2021-12-18T00:48:47.114Z","7.0.27":"2021-12-18T00:52:55.564Z","7.0.28-renovate-external-non-major-ee48ad571189fe8156080bdf297225f5f9351fae":"2021-12-19T02:11:14.318Z","7.0.28":"2021-12-19T02:15:18.689Z","8.0.0-setGlobalQuerySchema-bc665ba6b853052f53902fb5fd896a7c2b244883":"2021-12-22T11:21:36.632Z","8.0.0-setGlobalQuerySchema-9ed62a47f36b64e56731b951c59d9315dc7ad0e7":"2021-12-22T12:19:12.400Z","7.0.29-edufschmidt-replace-deep-imports-1f0234d4b8b6ef7294430b8721540191d59a9601":"2021-12-24T16:33:00.550Z","7.0.29":"2021-12-24T16:36:14.309Z","7.0.30-renovate-external-non-major-26e17b9e8d484a166621e49220dd7405ae615858":"2021-12-25T01:30:33.580Z","7.0.30":"2021-12-25T01:35:01.127Z","7.0.31-renovate-external-non-major-ba80607b2fbc87dd7b4745548bdb6e116a69631f":"2022-01-01T01:03:50.477Z","7.0.31":"2022-01-01T01:08:14.946Z","7.0.32-renovate-external-non-major-6fc4a6ac7e3988606792af8f10867577027c40b1":"2022-01-02T22:29:40.065Z","7.0.32":"2022-01-02T22:34:26.920Z","7.1.0-edufschmidt-authentication-tokens-2ccf33450464e08334386ac63b4103776d9c0125":"2022-01-05T18:10:38.542Z","7.1.0-edufschmidt-authentication-tokens-69a0d49b333c288c08e6157658a8780c1e13102d":"2022-01-05T19:22:18.303Z","7.0.33-h32-axios-retry-76dba9a7d8bd34be42560e5dff3f7ce6dd2239d0":"2022-01-07T12:38:35.352Z","7.0.33-h32-blue-7d7535df95595c990b2716402f9d6ef55bfaba2b":"2022-01-07T12:40:01.300Z","7.0.33-h32-blue-e60fffc8802d8223f0a40098692209fc25028c30":"2022-01-07T12:57:56.753Z","7.0.33-renovate-external-non-major-0d6639ea859f50a322ea39ab7a708722911952cd":"2022-01-08T01:51:29.905Z","7.0.33":"2022-01-08T01:55:57.841Z","7.0.34-h32-blue-bd22eaf089acbb73083f1d431c23e297c7874fac":"2022-01-08T11:16:35.648Z","7.0.34":"2022-01-10T15:50:29.657Z","7.0.35-h32-axios-retry-548794fce836c2f6e471019ecd7488dcd8da12c4":"2022-01-10T15:57:58.527Z","7.0.35":"2022-01-12T11:17:05.467Z","7.0.34-client-sdk-example-get-contracts-bbb769a57f50f4daafaba4dc62000d72ef0e2ed1":"2022-01-13T15:54:34.621Z","7.0.36-client-sdk-example-get-contracts-f2709073c48bdca567ce5f53fa98bff5a1c90bfe":"2022-01-13T15:58:25.521Z","7.0.36":"2022-01-13T16:01:40.113Z","7.0.37-renovate-external-non-major-1eafa1839087ddd8e83aff5c32e5bddcfdb359a2":"2022-01-15T01:15:27.639Z","7.0.37":"2022-01-15T01:19:54.412Z","7.0.38-lucianbuzzo-new-login-endpoint-09d08c433f201cf1b25518baf7ca0ccce1e1e243":"2022-01-17T12:47:13.679Z","7.1.0-lucianbuzzo-new-login-endpoint-2b334b3d41bece203ecacacc0a2f4c7b51d1c60c":"2022-01-17T15:53:37.937Z","7.0.38-renovate-axios-0-x-fe817873df2bb40c65721210e00fa638a83b81ca":"2022-01-18T10:06:50.086Z","7.0.38":"2022-01-19T05:38:50.349Z","7.0.39-renovate-typedoc-0-x-f2f58f8c3135e14c28ca9b6eed557a0ccee8be07":"2022-01-19T05:44:54.373Z","7.0.39":"2022-01-19T06:32:19.434Z","8.0.0-lucianbuzzo-new-login-endpoint-fa51fe694663a74d823de3f814272cb93360a326":"2022-01-19T12:24:57.653Z","8.0.0":"2022-01-21T17:30:25.642Z","8.0.1-renovate-external-non-major-5f7b944cc4d220e6ff782bdb0435028d9007a257":"2022-01-22T02:02:54.575Z","8.0.1":"2022-01-22T02:06:42.104Z","8.0.2-renovate-external-non-major-ca6d364201913279f04faf23d064be9f5600308e":"2022-01-23T11:49:23.915Z","8.0.2":"2022-01-23T11:52:34.477Z","8.0.3-renovate-external-non-major-e52c8dda52ded322c7a3886ebdbc99c32ea8e960":"2022-01-23T15:22:26.770Z","8.0.3":"2022-01-23T15:26:02.667Z","8.1.0-cursors-9c3c80262dd877b06c4f4fc29890249944ba7f84":"2022-01-24T16:17:38.660Z","8.1.0-cursors-869ded43e74ea9289adc5d8b8d39012f4aa3f4ff":"2022-01-24T16:20:23.626Z","8.1.0-cursors-d4450f1b44cee0e5e0ceb765b82d3d9c16a55430":"2022-01-25T10:26:18.609Z","8.1.0":"2022-01-25T10:36:50.260Z","7.1.0-edufschmidt-authentication-tokens-c4cb250250c5dcc2e9cd32b47d24184d4ae44ab8":"2022-01-28T13:25:22.715Z","8.1.1-renovate-major-external-major-14c1967fc2f95a37f7ac5e226d42b60a305077bc":"2022-01-29T01:47:57.487Z","8.1.1":"2022-01-29T05:48:14.182Z","8.1.2-renovate-external-non-major-7772f7fb1893c12392856db93330c7049f5037eb":"2022-01-29T05:53:08.338Z","8.1.2":"2022-01-30T05:55:28.184Z","8.1.3-update-deps-a78608971de02ffb72599fe7dcb64eb8c1208f58":"2022-02-02T12:38:55.163Z","8.2.0-lucianbuzzo-add-issue-ownership-7354752a3cb8c2475ae02d0f880ea44da27d3619":"2022-02-03T17:02:18.471Z","8.2.0-lucianbuzzo-add-issue-ownership-2031d70e026df2e8b45a4009ddb212991fe2ea86":"2022-02-03T17:08:13.409Z","8.2.0":"2022-02-03T17:23:31.398Z","8.2.1-update-deps-4a5d9843234381e618d484109fd2de8620d5f312":"2022-02-03T19:55:42.694Z","8.3.0-export-linkconstraint-e9a1332dc9524d6ac169828de2d436e538569632":"2022-02-03T20:01:42.443Z","8.3.0":"2022-02-03T20:04:52.025Z","8.3.1-update-deps-ab9a551511fd333db51e247086d60d18803592e8":"2022-02-04T18:13:19.607Z","8.3.1":"2022-02-04T18:16:41.346Z","8.3.2-renovate-external-non-major-d0f073ba6649f0d422560887e32f9368e7d215ba":"2022-02-05T00:18:16.550Z","8.3.2":"2022-02-05T00:21:21.182Z","8.3.3-renovate-external-non-major-dd3243baf3ee4f470820a264d8344ce3a4c2d165":"2022-02-05T11:40:38.944Z","8.3.3":"2022-02-05T11:44:34.332Z","8.3.4-lucianbuzzo-fix-streams-bug-b044456c2e6716af463681d5ca060cfc4326f981":"2022-02-07T14:42:07.078Z","8.3.4":"2022-02-07T14:51:29.985Z","8.4.0-edufschmidt-authentication-tokens-67bd52cf01f157c916a623568dcf287b65cf8c09":"2022-02-08T22:19:24.487Z","8.3.5-renovate-balena-jellyfish-core-14-x-2e0aaa79be13f5bdbf6c22bff13ef6b32fe49dfe":"2022-02-09T11:01:54.271Z","8.3.5":"2022-02-09T11:11:07.461Z","8.3.6-renovate-external-non-major-4ce93124cb39ccb109a54b333371640f5b5bd157":"2022-02-12T01:55:06.855Z","8.3.6":"2022-02-12T01:58:24.395Z","8.3.7-renovate-external-zero-minor-b66a69582342b61ae23557197a7faf2bb2ed9803":"2022-02-13T14:59:50.354Z","8.3.7":"2022-02-15T01:02:37.695Z","8.3.8-lucianbuzzo-trim-cursor-excess-8a6f39b710b2e7e70ff0a023527576d23218543a":"2022-02-15T16:11:32.835Z","8.3.8":"2022-02-15T16:21:58.687Z","8.4.0-edufschmidt-authentication-tokens-5dc3f76c0a39ba0079b1e2a82a1b1f3a7bafd48e":"2022-02-15T19:05:45.179Z","8.3.9-lucianbuzzo-fix-cursor-overscan-check-57547bccd756c5e98a5f09547d56544d2802c890":"2022-02-17T16:35:01.974Z","8.4.0-edufschmidt-authentication-tokens-2f34da2c0a94cc118f30a58ab944ae2058e0ef7f":"2022-02-17T19:12:11.484Z","8.3.9-renovate-balena-jellyfish-core-14-x-bd0be2c4db9526195838b9923f6850952ea89d6c":"2022-02-17T19:15:33.273Z","9.0.0-sdk-post-a996e28b8a9ecc32d5d514e9de8b644b23db18ee":"2022-02-17T19:42:30.795Z","8.3.9":"2022-02-18T00:27:34.790Z","9.0.0-sdk-post-93daff432a78c604ff98b55a479eed2b500580d2":"2022-02-18T14:09:15.845Z","9.0.0-sdk-post-6ab76e85c6a8ce43a2560f62661509dd90c79d14":"2022-02-18T15:57:41.244Z","9.0.0":"2022-02-18T22:13:59.283Z","10.0.0-request-simplify-e6e4e3c5222410150976b5654cf0f0eef4ba8083":"2022-02-18T23:02:35.978Z","10.0.0":"2022-02-18T23:07:13.293Z","10.0.1-renovate-typedoc-0-x-b30cdfcd26a402ca3b8d28d740b293d4a5d06b73":"2022-02-20T05:03:36.027Z","10.1.0-lucianbuzzo-milestone-requires-milestone-a73c3538363c4cc224848ccebffbc3f8dd343c89":"2022-02-22T15:43:30.286Z","10.1.0":"2022-02-22T15:46:38.900Z","10.1.1-renovate-balena-jellyfish-core-15-x-28134f149c64838f07ffdc0b886a9e42b0fa12fb":"2022-02-23T23:06:13.877Z","10.1.1-lucianbuzzo-pattern-ownership-060c97bffae16c553e237a8184433a8154d39971":"2022-02-24T11:31:11.551Z","10.1.1":"2022-02-24T11:35:21.657Z","10.1.2-core-hard-dep-8a374d715c6a804dde612289b6032f3ea39c7177":"2022-02-24T12:06:35.650Z","10.1.2":"2022-02-24T12:10:15.073Z","10.1.3-renovate-internal-patch-1cd770d4ff7ed90296f103ac1ceed7918bbfc527":"2022-02-25T04:36:27.373Z","10.1.3":"2022-02-25T04:39:28.041Z","10.1.4-renovate-external-non-major-dcc791dc0ecab0459c6fb87c5a94264c1b007f4b":"2022-02-26T02:07:38.670Z","10.1.4":"2022-02-26T02:11:35.415Z","10.1.5-renovate-balena-jellyfish-core-15-x-ed0ec3d66bc61a8e7497848dedd64ed3d42c4f84":"2022-03-01T09:19:17.842Z","10.1.5-renovate-balena-jellyfish-core-16-x-1958ed34b4faf7f76282cb89744e54e6a80e4369":"2022-03-01T15:43:12.861Z","10.1.5":"2022-03-01T23:39:56.269Z","10.1.6-renovate-external-non-major-aff36324ddb0005418e774f0ed1020ef9a7bc37b":"2022-03-05T12:35:32.257Z","10.1.6-renovate-typescript-4-x-01930bed58c7b7fe3e275b29eed9d83c6b89ed07":"2022-03-06T01:14:14.562Z","10.1.6-joshbwlng-bump-lint-staged-da1cb4a416e8be73d568e2ba0ae990ea53288318":"2022-03-06T02:54:52.047Z","10.1.6":"2022-03-06T02:59:34.873Z","10.1.6-renovate-typescript-4-x-8d2370a00f001485f36f21d0bc1eef460bd8c943":"2022-03-06T03:02:15.996Z","10.1.7-renovate-typescript-4-x-d5589edf566f704aa8b6643d8861bf925ca90d51":"2022-03-06T03:05:55.736Z","10.1.7-renovate-typedoc-0-x-654fb796f20223e22e0b8c97edf259c2599f2030":"2022-03-07T02:17:07.476Z","10.1.7-renovate-typescript-4-x-dfd2bd21bff886826c641576059b5873c04f2d64":"2022-03-07T05:58:09.354Z","10.1.7":"2022-03-07T06:02:19.875Z","10.1.8-supplement-query-documentation-cab253ef72203fadaafb7b39dc388001a4bcb495":"2022-03-07T10:43:00.418Z","10.1.8":"2022-03-07T10:52:10.235Z","10.1.9-document-query-interface-briefly-996871f0945141c851c0f742185c8b63197b8bac":"2022-03-08T10:30:03.637Z","10.1.9-document-query-interface-briefly-f237a2dbbe1e79363faf3455add2919fc818660e":"2022-03-08T10:39:29.775Z","10.1.9-document-query-interface-briefly-0c0750c29ce5f1b3468ba696bbe952ca437aba77":"2022-03-08T15:02:00.310Z","10.1.9-renovate-axios-0-x-4523c1eff83af5fb46161f4bd668e4c8eb69ef7d":"2022-03-09T18:34:27.119Z","10.1.9":"2022-03-09T23:16:44.629Z","10.1.10-lucianbuzzo-todo-ownership-51e626bd87d04a557b144a35cacac824191a9c19":"2022-03-10T12:28:10.939Z","10.1.10":"2022-03-10T12:47:31.624Z","10.1.11-lucianbuzzo-autumndb-a03630fa2f6eb8f56fb8aaa0f0db3f18d69b0333":"2022-03-16T11:19:58.894Z","10.1.11":"2022-03-16T11:41:20.828Z","10.1.12-joshbwlng-bump-autumndb-36556a9325d97fca80f8839e0f645c811f25b5c7":"2022-03-18T04:43:04.824Z","10.1.12":"2022-03-18T04:46:21.875Z","10.1.13-renovate-external-non-major-259a51aeade87e36729eec5e041ec88914dac012":"2022-03-19T04:28:16.927Z","10.1.13":"2022-03-19T04:32:22.166Z","10.2.0-joshbwlng-incident-post-mortem-6bb43a56f4047a1244b28256af9bddc6198867c2":"2022-03-22T03:22:33.196Z","10.1.14-joshbwlng-update-repo-yml-4214684f2d2b2dbdc28565616df614fda5e36b2a":"2022-03-22T04:38:15.632Z","10.1.14":"2022-03-22T04:42:43.766Z","10.2.0-lucianbuzzo-product-relationship-bc36df545b85dadb08d2d60026dc0a5fd5f70e9b":"2022-03-26T08:02:14.065Z","10.2.0":"2022-03-26T08:05:18.645Z","10.2.1-renovate-typescript-4-x-90ca16b9f7ad1ea4da6913d9e942a680c3f59aa6":"2022-03-26T08:09:49.172Z","10.2.1-renovate-autumndb-19-x-85455e0034454c5970c8b136cf8fdd4ac19934ea":"2022-03-26T08:10:05.532Z","10.2.1":"2022-03-26T08:45:40.231Z","10.2.2-renovate-external-non-major-c2e4c38ff25396b5a66953035d7166ac4cdef994":"2022-03-26T08:48:54.988Z","10.2.2-renovate-typescript-4-x-bfe7e324c33c2041615a70d47329403901729a3e":"2022-03-26T08:49:10.152Z","10.2.2":"2022-03-26T08:53:54.920Z","10.2.2-renovate-typescript-4-x-9dc43f381891aa4fec9e5e906d5fff178b9dd1b5":"2022-03-26T08:56:10.229Z","10.2.3-renovate-typescript-4-x-108f8c9f1f0f7d1a09a5f5dfe2b15cb6b7945ae2":"2022-03-26T08:59:19.983Z","10.2.3":"2022-03-26T09:20:45.019Z","10.3.0-lucianbuzzo-loop-product-link-877c6bd31a20e7e6de1c69ad8e06278d94245f52":"2022-03-30T12:48:36.923Z","10.3.0-lucianbuzzo-loop-product-link-4123fdda35707c643b233a9b46a1bcc1e03e96c7":"2022-03-30T12:56:30.134Z","10.3.0":"2022-03-30T13:00:59.915Z","10.4.0-joshbwlng-user-preference-links-ed3c90a9609bb9f997b548c658398abf8414ebfe":"2022-03-31T08:25:10.169Z","10.4.0-joshbwlng-user-preference-links-666c79a2cd0a2072663c8b7e6681c6bdf48243b3":"2022-03-31T09:06:41.303Z","10.4.0-joshbwlng-user-preference-links-32b68f28ce72317e726cb37bfd8ddb51003a87e1":"2022-03-31T09:15:17.854Z","10.3.1-renovate-typedoc-0-x-14ecd89ef8fbeab39bf2900c66943b90b59db43d":"2022-04-07T04:05:33.810Z","10.3.1":"2022-04-07T04:37:57.042Z","10.4.0-joshbwlng-user-preference-links-53c62abd0a397107c21de6199f298e2568a725bf":"2022-04-07T04:42:32.054Z","10.3.2-renovate-typedoc-0-x-1f461d46b798c82de887bf34b6c06d3c24b6f4d6":"2022-04-12T13:39:59.007Z","10.3.2":"2022-04-12T13:46:14.784Z","10.3.3-repo-sync-jellyfish-config-default-3ce8cb0d4f2867edc177ff94c9ce0a2498363e5d":"2022-04-15T03:34:50.833Z","10.3.3":"2022-04-15T03:38:25.564Z","10.3.4-renovate-external-non-major-4e19a8a3e88af38c9a06701c84b68510a1fac70f":"2022-04-16T01:27:06.858Z","10.3.4":"2022-04-16T01:30:14.255Z","10.3.5-renovate-external-non-major-2eb761e69037b36f89a49238e8d531b6c630273e":"2022-04-23T01:37:35.637Z","10.3.5":"2022-04-23T01:40:41.184Z","10.3.6-lucianbuzzo-no-retry-d948e052702bd76cdc7210bd300c2b9d4cb869d5":"2022-04-25T12:46:26.809Z","10.3.6":"2022-04-25T13:35:08.948Z","10.4.0-joshbwlng-user-preference-links-a9549d729b16522f8083faf526228c22731608f4":"2022-04-28T07:10:31.756Z","10.3.7-joshbwlng-bump-typescript-1ab32484b86e6a1c98de164ea6ad42ee1b98ce76":"2022-04-28T23:35:39.759Z","10.3.7":"2022-04-28T23:39:19.678Z","10.3.8-renovate-external-non-major-fc65f7d5e0db2de935153cf98f6a33b0c2d7eb1d":"2022-04-30T01:40:08.759Z","10.3.8":"2022-04-30T01:44:16.598Z","10.3.9-renovate-major-external-major-aacfa68e773fa442bdac3d7319bc7b918d559733":"2022-05-07T00:52:06.181Z","10.3.9":"2022-05-07T03:38:44.329Z","10.3.10-renovate-external-non-major-61846772a591f853adb2abaec80ecc95c297a05a":"2022-05-08T09:42:23.174Z","10.3.10":"2022-05-08T09:46:19.192Z","10.4.0-joshbwlng-user-preference-links-8ea5d5b4586a65a1ee030d4a65dc3a82381b86f0":"2022-05-09T04:35:55.098Z","10.4.0-joshbwlng-user-preference-links-4e4976d5f282356d45feb90c48e1067f6ae0df84":"2022-05-09T04:39:10.858Z","10.4.0-joshbwlng-user-preference-links-86d68f85e54f97d950c2e2c67c8b21f1fed2f517":"2022-05-09T04:48:20.649Z","10.4.0-joshbwlng-user-preference-links-be854622d184701e5e4a4ba3f14827b95cff66e9":"2022-05-09T05:14:23.940Z","10.4.0-joshbwlng-user-preference-links-f4340d3c22c836fe4de89c3509343c68cc2e0e09":"2022-05-10T03:49:01.922Z","10.4.0":"2022-05-11T00:46:07.207Z","10.4.1-renovate-autumndb-20-x-d7fe2ff4899879fd7996c70d102306ec0741f2aa":"2022-05-12T17:48:20.729Z","10.4.1-renovate-external-non-major-0a569a45bcf4f5b75a6a5789ee47069cec3edbbd":"2022-05-21T02:47:47.128Z","10.4.1":"2022-05-21T02:50:44.870Z","10.4.2-renovate-typescript-4-x-e974823d224f16e1e656adb3d210c6f1941d0b35":"2022-05-24T21:33:47.635Z","10.4.2-renovate-external-non-major-85a70fe0a47e17277263985c37c63213a5ecf422":"2022-05-28T01:06:02.447Z","10.4.2":"2022-05-28T01:11:24.041Z","10.4.3-renovate-typescript-4-x-30c633db6a5a839fefa7450766b9bd5a42b36607":"2022-05-28T01:21:10.737Z","10.4.3-renovate-typedoc-0-x-f80f8b9ef385a94227bc44944f912be510172582":"2022-05-30T20:14:16.780Z","10.4.3-renovate-typescript-4-x-1e8019e53bd7cfa206f27410a971c1f08eeaabfd":"2022-05-31T01:43:02.331Z","10.4.3":"2022-05-31T09:44:32.037Z","10.4.4-renovate-autumndb-20-x-886beb74c0353fd72dfb0095f1ddadbbf15caeb0":"2022-05-31T10:17:43.273Z","10.4.4":"2022-05-31T23:54:44.381Z","10.3.1-add-message-reaction-contract-add-link-contraints-48a8deb141d905d46fbec1636a27499855c46270":"2022-06-01T01:24:52.729Z","10.3.1-add-message-reaction-contract-add-link-contraints-31bea617a7d8b801c97b0cdba817a37bb0b11c5a":"2022-06-01T02:02:22.072Z","10.4.5-renovate-typedoc-0-x-1d21998af8abb9286976ada2e1c23bf3f9bc73d1":"2022-06-01T05:00:20.438Z","10.4.5":"2022-06-01T08:04:11.596Z","10.4.6-add-message-reaction-contract-add-link-contraints-f8fbc01c849f22d1be29bedb067226fb46d3c6f7":"2022-06-01T14:42:19.647Z","10.4.6-add-message-reaction-contract-add-link-contraints-23f057ed2d3e739f2b7e352152218f4c8d34727d":"2022-06-02T01:43:52.775Z","10.4.6-add-message-reaction-contract-add-link-contraints-454d5833860c021fcd30130dc79f8bfa794c1f06":"2022-06-02T02:12:01.312Z","10.4.6-add-message-reaction-contract-add-link-contraints-638302f4149eec49c9833b2061ab61c29d0cb351":"2022-06-02T14:58:18.255Z","10.4.6-add-message-reaction-contract-add-link-contraints-d32148ee314e9049c30d3619330d39c7bf787a21":"2022-06-03T15:03:00.380Z","10.4.6-renovate-major-external-major-122e4bfca1ca477376c8e6b8d791fd325aead7c1":"2022-06-04T00:49:18.548Z","10.4.6-renovate-typescript-4-x-b8c039f9450af6ceff70b713cc52b59612c656f9":"2022-06-04T00:54:07.294Z","10.4.6":"2022-06-04T00:58:06.224Z","10.4.7-joshbwlng-update-link-constraint-24d0e101512ec63252e38ac58a11cb0d905578d7":"2022-06-04T03:33:04.473Z","10.4.7":"2022-06-04T03:36:46.681Z","10.4.8-renovate-major-external-major-2c5c88018dcbb40a93a1069bc01ad59e9a5cd101":"2022-06-05T08:03:22.305Z","10.4.8":"2022-06-05T08:06:07.539Z","10.4.6-add-message-reaction-contract-add-link-contraints-79a0354f3883d2e56f97adf83914d29283dd1502":"2022-06-06T07:40:58.137Z","10.4.9-add-message-reaction-contract-add-link-contraints-0a59467e268abad5325c2968d8e08eab371aa63f":"2022-06-06T14:56:19.679Z","10.4.9":"2022-06-06T15:04:16.666Z","11.0.0-joshbwlng-update-link-constraints-a20a8c044b99cdbc1c7c12ba130a22a62f849783":"2022-06-07T01:05:47.677Z","11.0.0":"2022-06-07T02:35:46.586Z","11.0.1-renovate-typescript-4-x-1c55b1ca4b5575bdda61673422f1bfe60442d3b5":"2022-06-17T19:34:35.274Z","11.0.1":"2022-06-19T08:44:14.647Z","11.0.2-joshbwlng-drop-jellyfish-config-6cb1b584d69062bb4c63f5eb4338035c9f388a40":"2022-06-19T09:04:59.526Z","11.0.2":"2022-06-19T09:09:09.628Z","11.0.3-joshbwlng-drop-makefile-a7fa6ece41fca930ed2c76113195aa3f3c350b2f":"2022-06-20T04:58:54.611Z","11.0.3":"2022-06-20T05:03:15.483Z","11.0.4-joshbwlng-working-hours-5900f820558770b5241222ae51f61a92d5d73821":"2022-06-23T04:57:49.874Z","12.0.0-joshbwlng-relationships-cac4b3f829fb4b02e6c7753f67396771df93b98f":"2022-06-24T08:13:06.433Z","12.0.0-joshbwlng-relationships-26ea62ed046b2cc4865ec56426fb611c89cd534a":"2022-06-24T08:19:09.117Z","12.0.0-joshbwlng-relationships-17cb4c84e3bf24aac1cccf91d619a5a04e27b5b6":"2022-06-24T08:22:44.546Z","12.0.0-joshbwlng-relationships-0f3e916050183223c9ff9043c062dbc09ca985cd":"2022-06-24T08:29:54.140Z","11.0.4-renovate-typedoc-0-x-f1350682f814d89bd46ebf229edbd57704a27753":"2022-06-25T02:53:34.741Z","11.0.4":"2022-06-26T23:18:35.733Z","11.0.5-renovate-external-zero-minor-5851708d22e2c02ca46750b53743c626235fddf4":"2022-06-26T23:26:26.888Z","11.0.5-joshbwlng-update-typedoc-63b64489ced019696aab7806a2fc89cb5c866176":"2022-06-27T01:47:08.316Z","11.0.5":"2022-06-27T01:51:06.281Z","11.0.6-renovate-external-zero-minor-c3227c51c6af36044c3150915d2af0857b57371e":"2022-06-27T01:56:19.118Z","11.0.6":"2022-06-27T02:15:42.238Z","12.0.0-joshbwlng-relationships-beb0c85975631169d587eddd4f3b962d3f00b34a":"2022-06-27T02:43:22.785Z","12.0.0-joshbwlng-relationships-55636d4e45f8d5bbbc78d8da48981ed553a4c55b":"2022-06-27T03:11:37.539Z","12.0.0-joshbwlng-relationships-0c63371523b6b78c641b77956ab07e490cffd6ac":"2022-06-27T04:30:13.000Z","12.0.0-joshbwlng-relationships-60f92d0fc62c8d9f2bf1be0380ff6fdfc6c316f7":"2022-06-27T05:09:01.229Z","11.0.7-renovate-internal-patch-d5d1f9c7f7d58fc3d3cf25d5737d82967937e5f2":"2022-06-27T05:44:39.690Z","11.0.7":"2022-06-27T05:49:07.176Z","12.0.0-joshbwlng-relationships-3dc33cc48c363dcc6301e998ac7601f759e0325f":"2022-06-27T06:30:52.136Z","11.0.8-joshbwlng-message-links-5851e730abfe172342f507d981220256cd95e27a":"2022-06-28T06:08:03.723Z","11.0.8":"2022-06-28T06:12:30.693Z","11.0.9-renovate-autumndb-20-x-ec2898f2bcaece3b15cc29204865f5418293469f":"2022-06-28T23:27:06.079Z","11.0.9-renovate-typedoc-0-x-6a74fd3bc7d5b258180f13ac0d73d9f7c01ac953":"2022-06-29T01:03:48.330Z","11.0.9":"2022-06-29T01:08:03.258Z","11.0.10-renovate-autumndb-20-x-610887f2009f43c20e6c7c517d38f1752f278f7d":"2022-06-29T01:13:35.631Z","11.0.10":"2022-06-29T01:18:06.681Z","12.0.0-joshbwlng-relationships-66093732b50f46c4daecd97d22a4a4589193e71f":"2022-06-29T05:41:05.827Z","12.0.0-joshbwlng-drop-link-constraints-6101d1dc3963c3c2112e9279e2ed7f8976b05c66":"2022-06-30T00:53:56.826Z","11.0.11-renovate-typedoc-0-x-620c6230412280249439ca0fcce6d525bf088a6d":"2022-07-01T21:44:43.326Z","11.0.11":"2022-07-01T23:50:22.118Z","11.0.12-renovate-typedoc-0-x-76989652ffaf6ee3a1770155ddabbe4759f86e31":"2022-07-02T18:23:23.184Z","12.0.0-joshbwlng-drop-link-constraints-c98164c2012823e2493fdeab47dc02142db79259":"2022-07-05T06:56:56.175Z","11.0.12-renovate-autumndb-20-x-f402b04b662d7522a5b9b87cf2fc65848308abd7":"2022-07-05T10:10:28.351Z","12.0.0-joshbwlng-drop-link-constraints-243ffae0e9e655ba00e48884ae9b244c6c00d42a":"2022-07-05T21:27:31.272Z","11.0.12":"2022-07-06T01:20:33.170Z","11.0.13-joshbwlng-drop-jellyfish-types-7ce7522bb14c26e505a4016b2210a2e8b07aaf7f":"2022-07-06T09:06:15.061Z","11.0.13":"2022-07-06T09:10:03.836Z","12.0.0-joshbwlng-drop-link-constraints-2de31fe34a5779479b1d41b7babf90c99850809b":"2022-07-07T08:35:42.925Z","11.0.14-renovate-typedoc-0-x-937cf295c0c2d9c68d648c47e3ebd3c2b2af709e":"2022-07-08T03:21:44.765Z","11.0.14":"2022-07-08T03:26:03.756Z","12.0.0-joshbwlng-drop-link-constraints-d7fb6b7cc86ef87de5b15d27b1c0a01e20a8cfc4":"2022-07-08T05:34:02.881Z","12.0.0-joshbwlng-drop-link-constraints-09fcf24b0b5004ceb2564b6d5c40faeac9cad8f5":"2022-07-08T06:14:40.759Z","12.0.0-joshbwlng-drop-link-constraints-aed040631a35540321299c8ce4464b96cb48cc43":"2022-07-08T08:53:38.839Z","11.0.15-renovate-typedoc-0-x-369cc72c3ba34c1d56024d9413c0b01576b94253":"2022-07-09T22:55:56.350Z","11.0.15":"2022-07-09T23:00:21.403Z","12.0.0-joshbwlng-drop-link-constraints-20b7c08457607863f5c3daad5f3a5ee8b38946cf":"2022-07-11T03:40:35.408Z","12.0.0":"2022-07-13T01:56:15.580Z","12.0.1-renovate-typedoc-0-x-1c0e2584b332af4307f1e63e772f4a12cdfb96d2":"2022-07-17T23:58:21.070Z","12.0.1":"2022-07-18T00:02:18.196Z","12.0.2-renovate-autumndb-21-x-0cc634f4b3be0e6e6f0eb9da2e9bc0eb3577c6bb":"2022-07-19T11:55:26.425Z","13.0.0-lucianbuzzo-upgrade-autumndb-23-x-431c340211a9d4244210702024d7936db657add7":"2022-07-19T17:45:56.004Z","13.0.0":"2022-07-20T09:25:29.603Z","13.0.1-renovate-autumndb-21-x-bdf1c189bcf7936c98cfbc2a63405cf63d1613cb":"2022-07-20T22:21:07.413Z","13.0.1-renovate-autumndb-21-x-de9322e89f2d2d90ed4e8b07f8369e00af01cb43":"2022-07-21T13:16:21.407Z","13.0.1-renovate-autumndb-21-x-385e6d32f1430ceb1de9b310fd615dcc0e9248ef":"2022-07-21T17:28:27.053Z","13.0.1":"2022-07-24T02:42:20.418Z","13.0.2-joshbwlng-move-autumndb-d71b9d6acfe0d0c165345c03fe016d0d138653de":"2022-07-24T02:51:11.658Z","13.0.2":"2022-07-24T02:55:13.631Z","13.0.3-renovate-typedoc-0-x-b463326ae784123c96dd312b5202f14d419f64fd":"2022-07-24T21:43:36.073Z","13.0.3":"2022-07-24T21:48:14.098Z","13.0.4-renovate-autumndb-21-x-ead3d6a4ce437ec9fb3f55d7cbf871a1288a1a69":"2022-07-25T19:15:16.907Z","13.0.4":"2022-07-25T19:19:05.827Z","13.0.5-renovate-sinon-10-x-938172b0b6e023739571956455a61f487c7ecdf4":"2022-07-31T10:33:47.967Z","13.0.5-renovate-jest-monorepo-8ce39e61a5afa3ad03e5b404543e90e87c80a493":"2022-07-31T10:34:05.985Z","13.0.5":"2022-07-31T10:38:20.305Z","13.0.6-renovate-sinon-10-x-807ba787c884738a705ecce11435e20a9147a740":"2022-07-31T10:43:10.421Z","13.0.6":"2022-07-31T10:49:12.078Z","13.0.7-renovate-nock-13-x-1dcb2602348320c490e664c7ca30e558f6c71c05":"2022-07-31T12:59:47.041Z","13.0.7-renovate-lint-staged-13-x-e809a112d071282d66bc9ecb20973bc51b5949d1":"2022-07-31T13:17:32.840Z","13.0.7":"2022-07-31T13:21:53.223Z","13.0.8-renovate-ts-jest-28-x-9783f67afbd2e0fea916e384062dc0d79ba0b053":"2022-07-31T13:27:45.363Z","13.0.8":"2022-07-31T13:33:49.293Z","13.0.9-renovate-autumndb-21-x-ad4b85c4fd9a99747b9dcfa66319550a009a9b8c":"2022-07-31T13:38:37.415Z","13.0.9":"2022-07-31T13:58:49.886Z","13.0.10-renovate-autumndb-21-x-0a77c7c012d9a0d63099b50657fdd8a58b746350":"2022-07-31T16:26:16.042Z","13.0.10":"2022-07-31T18:01:54.345Z","13.0.10-renovate-autumndb-21-x-bffac0b4ea0359df248645950c89343831af694c":"2022-07-31T18:04:59.466Z","13.0.11-renovate-autumndb-21-x-e8f7163785bd6175818f20b6f767c91cf6b70a05":"2022-07-31T18:07:51.724Z","13.0.11":"2022-07-31T18:12:04.263Z","13.0.12-renovate-typedoc-0-x-86abf98cc69cdfdfc4195064273ed3de1312b326":"2022-07-31T18:18:32.350Z","13.0.12":"2022-07-31T20:57:15.391Z","13.0.13-renovate-autumndb-21-x-d2a5ac03e599829c16c613aaf20b2ffcb046729a":"2022-07-31T21:00:35.027Z","13.0.13":"2022-07-31T21:05:34.395Z","13.0.14-renovate-autumndb-21-x-78e79c68c19e09aa38223350980f936abe9fd732":"2022-07-31T21:08:11.743Z","13.0.14":"2022-07-31T21:13:56.321Z","13.0.15-renovate-simple-git-hooks-2-x-d24ba6cde82ddfaf6aca23c75c250b420714b666":"2022-07-31T21:16:09.562Z","13.0.15":"2022-07-31T21:22:44.745Z","13.0.16-renovate-autumndb-21-x-d7984bc0b6c78f0d22f872c19495eccb85881735":"2022-07-31T23:37:33.072Z","13.0.16":"2022-08-01T00:09:09.141Z","13.0.17-renovate-autumndb-21-x-60aa57334da5fc12284b8322df6d222fdefb0c90":"2022-08-01T02:26:30.328Z","13.0.17":"2022-08-01T02:36:19.057Z","13.0.18-renovate-autumndb-21-x-c199a2912f15dcddd09783993374479e16ea3e77":"2022-08-01T05:49:54.175Z","13.0.18":"2022-08-01T05:54:17.013Z","13.0.19-renovate-autumndb-21-x-c9048a92374213d787cc463771a8d4714c5950b1":"2022-08-04T15:04:57.922Z","13.0.19":"2022-08-04T15:08:38.367Z","13.0.20-renovate-autumndb-22-x-e5791a4d5b13fa1a3ff698b28aae7d3568fd2232":"2022-08-04T20:32:08.509Z","13.0.20":"2022-08-04T20:36:23.138Z","13.0.21-renovate-autumndb-22-x-7f1011d7d34e5b19f048fa9acce4f80c71273f5b":"2022-08-06T02:46:22.453Z","13.0.21":"2022-08-06T02:49:37.531Z","13.0.22-renovate-autumndb-22-x-237dd74d049d2687d546097e540fd0b0549565c3":"2022-08-06T05:25:17.199Z","13.0.22":"2022-08-06T05:29:14.207Z","13.0.23-renovate-autumndb-22-x-a8c39492493bca11071d7f8030fad2fa668200b8":"2022-08-06T11:38:08.851Z","13.0.23":"2022-08-06T11:42:19.407Z","13.0.24-renovate-autumndb-22-x-e97ba24129bbfd9b4e0e6da222ecbf195140a266":"2022-08-06T13:47:16.102Z","13.0.24":"2022-08-06T13:50:29.239Z","13.0.25-renovate-autumndb-22-x-590df16a2e9b6fd393e86c9f322d2b653fe87f72":"2022-08-08T11:46:42.428Z","13.0.25":"2022-08-08T11:51:26.681Z","13.0.26-renovate-autumndb-22-x-ee3015499e9279ecc83145844ebb9f7db4a9ebc0":"2022-08-08T15:01:03.272Z","13.0.26":"2022-08-08T15:05:36.411Z","13.0.27-renovate-autumndb-22-x-44755d18c2f64a1cd2162ceb204f941c32136156":"2022-08-10T14:11:18.693Z","13.0.27":"2022-08-10T14:14:48.274Z","13.0.28-renovate-autumndb-22-x-fe2319c2214c1cb6fe970fcd478df0e8ba2e2595":"2022-08-13T03:20:19.486Z","13.0.28":"2022-08-13T03:24:26.325Z","13.0.29-renovate-autumndb-22-x-8be0a9372f4e384a551128d462c19d9781a70b96":"2022-08-13T06:11:10.916Z","13.0.29-renovate-autumndb-22-x-8a09d110f5d76213a7636aa81219906d92e88d54":"2022-08-13T10:35:09.877Z","13.0.29-renovate-autumndb-22-x-862b6294ce31e5c26a88822baf27c70cc9fde777":"2022-08-13T10:38:44.694Z","13.0.29":"2022-08-13T10:42:47.064Z","13.0.30-joshbwlng-update-gitignore-5a0b85d862c8164b6857115c0ead26d80388e774":"2022-08-16T05:44:26.997Z","13.0.30":"2022-08-16T08:38:45.984Z","13.0.31-renovate-autumndb-22-x-8e8e485d27716c5bb5e94d8b88b3bbc5548460e5":"2022-08-16T12:05:56.017Z","13.0.31":"2022-08-16T12:10:34.762Z","13.0.31-renovate-autumndb-22-x-8aee2d440be99a18346f3acb001f01618b5984c6":"2022-08-16T12:12:42.535Z","13.0.32-renovate-autumndb-22-x-a99f514b02efb02c8e40351c1a42a593cbf470e3":"2022-08-16T15:35:53.440Z","13.0.32":"2022-08-16T15:39:20.141Z","13.0.32-lucianbuzzo-stream-typing-1bae82cb91a8b1b453233c271fa8caa3ccde033b":"2022-08-16T15:44:00.671Z","13.0.33-lucianbuzzo-stream-typing-946e8c569d5b75035bed82ab220868194c05c2c9":"2022-08-16T15:47:53.509Z","13.0.33":"2022-08-16T15:52:36.389Z","13.0.34-renovate-autumndb-22-x-f879ee8559c574ebecbd7588cf560ba405ace2f1":"2022-08-17T14:31:58.157Z","13.0.34":"2022-08-17T14:36:03.684Z","13.0.35-renovate-autumndb-22-x-de4611c04fe4f832882440bb0090acdbdbc61bad":"2022-08-18T22:45:16.881Z","13.0.35":"2022-08-18T22:49:25.653Z","13.0.36-renovate-jest-monorepo-65c168af4474f0c9ea008ec724808169e273a878":"2022-08-20T01:09:40.145Z","13.0.36":"2022-08-20T01:13:45.976Z","13.0.36-renovate-lodash-4-x-560f34f2a31dbbcb87399cf5a66fcf8a9d4a0d60":"2022-08-20T01:16:48.322Z","13.0.37-renovate-lodash-4-x-4d3bb3b9b535836df8e6b9c15aabf0434cd79d28":"2022-08-20T01:18:41.851Z","13.0.37":"2022-08-20T01:23:12.732Z","13.0.38-renovate-ts-jest-28-x-42380aa617a50bf51e0e5a6a3ee3cb493327e71c":"2022-08-20T03:54:46.719Z","13.0.38":"2022-08-20T03:58:04.418Z","13.0.39-renovate-autumndb-22-x-2a276a60c132a4f970a389f45cc533042ab35a11":"2022-08-20T05:46:23.466Z","13.0.39":"2022-08-20T05:49:54.910Z","13.0.40-renovate-autumndb-22-x-b98f9837af362e26abbf7f1a55679e2b68c5b1dc":"2022-08-20T10:20:06.715Z","13.0.40":"2022-08-20T10:23:20.058Z","13.0.41-renovate-autumndb-22-x-9975febf0db735e9120f31de6b1585b71f313651":"2022-08-20T13:17:51.207Z","13.0.41":"2022-08-20T13:21:42.892Z","13.0.42-renovate-autumndb-22-x-4706dc5c7f834c11affb86575bbc209025efa4e8":"2022-08-20T16:15:24.081Z","13.0.42":"2022-08-20T16:19:51.754Z","13.0.43-renovate-autumndb-22-x-c5ec6bff4f2ac4ec0d1d2225dfaef586e627f02b":"2022-08-21T03:59:01.714Z","13.0.43":"2022-08-21T04:02:38.436Z","13.0.44-renovate-autumndb-22-x-8d98ddbb0b1a737dcec1b535874e0d628a8657cf":"2022-08-22T01:25:37.036Z","13.0.44":"2022-08-22T01:31:06.546Z","13.0.45-renovate-autumndb-22-x-1ab93a391d8b1c3ea646f1148fb24e1b1784ebdd":"2022-08-22T12:47:12.048Z","13.0.45":"2022-08-22T12:51:42.952Z","13.0.46-renovate-autumndb-22-x-8821910dadcb945f9e90eed589e13aca10cb871f":"2022-08-23T07:00:20.282Z","13.0.46":"2022-08-23T07:04:30.944Z","13.0.47-renovate-jest-monorepo-68c56c2a24af86384914b508a9b44104cc36a062":"2022-08-28T03:16:01.720Z","13.0.47":"2022-08-28T03:21:07.809Z","13.0.48-renovate-typedoc-0-x-6963569b62f87d3f753f7958b67a75ca8d0f174c":"2022-08-28T03:27:11.382Z","13.0.48":"2022-08-28T03:31:03.580Z","13.0.49-renovate-typescript-4-x-cf2de1abf3966e5765a7a1afa66a9115b4a0de9e":"2022-08-28T06:01:22.427Z","13.0.49":"2022-08-28T06:05:16.839Z","13.0.50-renovate-typedoc-0-x-c5aba885622673f28902fddea5fea036a4c69558":"2022-08-31T07:23:44.904Z","13.0.50":"2022-08-31T07:26:33.240Z","13.0.51-renovate-typedoc-0-x-d2765175e3788ae2528cb38d6c21effcf3df04cb":"2022-09-01T02:24:41.900Z","13.0.51":"2022-09-01T02:28:15.588Z","13.0.52-renovate-socket-io-packages-4e3f71997f09a49b622d5a7e74abd48c000ead0f":"2022-09-03T03:04:29.424Z","13.0.52":"2022-09-03T03:08:17.811Z","13.0.53-renovate-typedoc-0-x-82aa301e2c81e0e2dc075ba350aa8bc8c4c48a0b":"2022-09-03T15:56:09.751Z","13.0.53":"2022-09-03T15:59:28.077Z","13.0.54-renovate-autumndb-22-x-dbf1a4886e1008c0eb822dfd420af4923d51414a":"2022-09-07T12:45:43.880Z","13.0.54":"2022-09-07T12:49:05.840Z","13.0.55-renovate-autumndb-22-x-a1054e0375e60f08b47cf5801e127b73b80f6008":"2022-09-09T14:41:31.397Z","13.0.55":"2022-09-09T14:44:19.256Z","13.0.56-renovate-typescript-4-x-abc5647f9fc2ce2fc595c8e764a0b17c071032f5":"2022-09-10T00:21:51.466Z","13.0.56":"2022-09-10T00:25:47.166Z","13.0.57-joshbwlng-update-jest-2fcc4ca4d11b08df186272a48da683f72593a067":"2022-09-10T02:33:22.907Z","13.0.57":"2022-09-10T02:37:29.117Z","13.0.58-renovate-autumndb-22-x-de6bc5c9bab3670827fbf2163b27ac1cc4f0b0bb":"2022-09-10T02:41:57.807Z","13.0.58":"2022-09-10T02:47:45.306Z","13.0.59-renovate-autumndb-22-x-afba4c0a6da48430007d91f52102842797c0551f":"2022-09-10T06:05:02.113Z","13.0.59":"2022-09-10T06:08:45.093Z","13.0.60-renovate-autumndb-22-x-f5886f7109e8f2d4db1990e5386ca752c48c7eda":"2022-09-10T11:16:57.664Z","13.0.60":"2022-09-10T11:20:40.739Z","13.0.61-renovate-autumndb-22-x-e982da114dab58239128c2e04eda87ca0c90fefa":"2022-09-10T18:12:55.779Z","13.0.61":"2022-09-10T18:16:53.895Z","13.0.61-renovate-jest-monorepo-a493f5442c0036a4e7540ee02d436494a39cdb74":"2022-09-10T18:18:50.788Z","13.0.62-renovate-jest-monorepo-f27a2e08f222c5ae1ccd80798d3f07c943cfc5bb":"2022-09-10T18:21:19.800Z","13.0.62":"2022-09-10T18:25:16.580Z","13.0.63-renovate-autumndb-22-x-d9637627fd8c01162841d2199aaba93718d288f2":"2022-09-10T21:33:40.417Z","13.0.63":"2022-09-10T21:37:40.311Z","13.0.64-renovate-autumndb-22-x-ed45168a0f34d78ffbe0617c24242bf18c664b59":"2022-09-11T03:19:48.107Z","13.0.64":"2022-09-11T03:26:08.748Z","13.0.64-renovate-autumndb-22-x-013ce55c9ee87a6d2a93861cdff27bfbe0d62442":"2022-09-11T03:29:26.097Z","13.0.65-renovate-autumndb-22-x-b6ee2264a99434aaa2db7ca8534b904446f484f5":"2022-09-11T03:31:23.720Z","13.0.65":"2022-09-11T03:35:17.412Z","13.0.66-renovate-autumndb-22-x-6b23ac3f570fc99ae096113903ac8e2b6faa04f0":"2022-09-11T06:22:06.640Z","13.0.66":"2022-09-11T06:25:32.495Z","13.0.67-renovate-jest-monorepo-3167e2b430449da1740b75c84144a73ed0653ac1":"2022-09-11T11:48:50.447Z","13.0.67":"2022-09-11T11:52:36.610Z","13.0.68-renovate-lodash-4-x-8df31529e0e1f0cf99c75cc4e55ffac6af61d1da":"2022-09-11T11:55:32.432Z","13.0.68-renovate-autumndb-22-x-beb87e8a3d0285b4fa952232fcd60a9f22526371":"2022-09-11T23:17:45.651Z","13.0.68":"2022-09-11T23:22:02.761Z","13.0.69-renovate-autumndb-22-x-7a84d405bc942a9f48e6fe6a585a29b236a55c76":"2022-09-12T03:37:16.930Z","13.0.69":"2022-09-12T03:42:33.659Z","13.0.70-renovate-autumndb-22-x-b5b292bce318c9a65a390b34dfad55e3f004ed42":"2022-09-12T07:40:19.537Z","13.0.70":"2022-09-12T07:43:37.442Z","13.0.71-renovate-autumndb-22-x-daf973423e73db3d556ee6eb4cefee99c550063f":"2022-09-12T20:43:03.663Z","13.0.71":"2022-09-12T20:47:13.935Z","13.0.72-joshbwlng-flowzone-1f26eec5baaad3f7803138cff123931102f837e9":"2022-09-13T03:02:25.806Z","13.0.72":"2022-09-13T03:05:17.214Z","13.0.73-renovate-autumndb-22-x-0f8c2dba01e3952d6becd972e3a6df8e1393cc25":"2022-09-13T14:38:15.810Z","13.0.73":"2022-09-13T14:40:39.082Z","13.0.74-renovate-autumndb-22-x-765e5de29577c426e4bba47cc63449aabf17414c":"2022-09-13T18:35:43.735Z","13.0.74":"2022-09-13T18:38:27.354Z","13.0.75-renovate-autumndb-22-x-6dc2830a8829c6b1d9e97b50aacb822b48ea59d7":"2022-09-16T04:16:25.730Z","13.0.75":"2022-09-16T04:18:38.327Z","13.0.76-renovate-jest-monorepo-75cf1c9fe24ff7dcc8851f23b878d5b21817fa08":"2022-09-17T01:24:41.499Z","13.0.76":"2022-09-17T01:26:40.475Z","13.0.77-renovate-ts-jest-29-x-1b61bcbc4ea23c6ac65175f8dcdd0372ed003845":"2022-09-17T01:29:49.920Z","13.0.77":"2022-09-17T01:32:10.124Z","13.0.78-renovate-autumndb-22-x-5a2f0e456f81874c018be43337d4607d45cc0bae":"2022-09-17T10:32:32.091Z","13.0.78":"2022-09-17T10:34:34.319Z","13.0.79-renovate-autumndb-22-x-2a7d5910fc1b2921283079966db50287dfd43124":"2022-09-17T12:58:31.372Z","13.0.79":"2022-09-17T13:00:48.519Z","13.0.80-renovate-autumndb-22-x-0ec77badcb951fc1dd72856d1d7269c2df3fb4a5":"2022-09-17T15:18:49.942Z","13.0.80":"2022-09-17T15:21:06.496Z","13.0.81-joshbwlng-query-example-70325a729f668111168d773bcec44cb77c0474bc":"2022-09-18T01:12:21.400Z","13.0.81":"2022-09-18T01:14:20.119Z","13.0.82-renovate-autumndb-22-x-94e78dea9219e43e5987eda4ef4d4fee70d1dc03":"2022-09-18T17:11:15.559Z","13.0.82":"2022-09-18T17:13:14.638Z","13.0.83-renovate-typedoc-0-x-296fdec5991fb3d0832442339cd8acc39e0505e9":"2022-09-18T20:36:23.086Z","13.0.83":"2022-09-18T20:38:42.688Z","13.0.84-renovate-autumndb-22-x-addabfc96c7f7fb2aac033bca8716c1739bbafa5":"2022-09-18T23:11:11.422Z","13.0.84":"2022-09-18T23:13:18.980Z","13.0.85-renovate-autumndb-22-x-002d0a957f75392c7b54d54b525f1b8cdd226e1d":"2022-09-19T02:22:06.187Z","13.0.85":"2022-09-19T02:24:14.205Z","13.0.86-joshbwlng-nvmrc-f67ee66328120ab07c2d4558bb97fe313be84407":"2022-09-19T04:26:33.716Z","13.0.86":"2022-09-19T04:28:37.733Z","13.0.87-renovate-autumndb-22-x-7f8122d627824d6de26beb96634083c9a4d51007":"2022-09-19T04:31:14.868Z","13.0.87":"2022-09-19T04:33:26.569Z","13.0.88-joshbwlng-codeql-e821b4fcfecc5e4d9ab4cd7d0c888ce4a23421d0":"2022-09-19T07:08:38.935Z","13.0.88":"2022-09-19T07:11:03.782Z","13.0.89-renovate-autumndb-22-x-8adb8b2068385684869b00af8d09768a1d2eefa7":"2022-09-19T07:13:46.332Z","13.0.89":"2022-09-19T07:15:52.148Z","13.0.90-joshbwlng-move-codeql-04f8015d3407afc961889e607b24ac4620ad5eb3":"2022-09-19T08:14:41.091Z","13.0.90":"2022-09-19T08:17:03.830Z","13.0.91-renovate-autumndb-22-x-76797850b5dad2ac080acb7f27aec33219384177":"2022-09-19T08:19:22.964Z","13.0.91":"2022-09-19T08:22:11.015Z","13.0.92-renovate-autumndb-22-x-dacbe4d75f44fd199fb61d2fd9c65c4a0f4050b1":"2022-09-19T13:02:30.637Z","13.0.92":"2022-09-19T13:04:39.884Z","13.0.93-renovate-autumndb-22-x-10c9975c3e7694913e9ff82f201cb5364c38a576":"2022-09-19T16:32:04.110Z","13.0.93":"2022-09-19T16:34:21.522Z","13.0.94-renovate-autumndb-22-x-4250313dbea42dbc7a633aa9e520ffddba1d1d90":"2022-09-20T13:18:59.237Z","13.0.94":"2022-09-20T13:21:26.784Z","13.0.95-renovate-autumndb-22-x-a3c787312705e14ffbb7196ff64161981c6c6ddf":"2022-09-23T14:03:42.050Z","13.0.95":"2022-09-23T14:06:03.040Z","13.0.96-renovate-autumndb-22-x-7a3a33f0eb06b0ddabfe6b48ca2f37b21232c767":"2022-09-23T17:07:02.247Z","13.0.96":"2022-09-23T17:09:23.373Z","13.0.97-renovate-autumndb-22-x-37be2b3378f80d1e4c8ba8fb9d94a0a957c70daf":"2022-09-24T05:44:07.678Z","13.0.97":"2022-09-24T05:46:24.912Z","13.0.98-renovate-ts-jest-29-x-9346f8b1361869f444c495da1b05ec5edfe70107":"2022-09-24T11:15:44.430Z","13.0.98":"2022-09-24T11:17:43.056Z","13.0.99-renovate-autumndb-22-x-1acd3f2303df9a8465a0ef8a0075a364f7b4c447":"2022-09-24T14:53:48.913Z","13.0.99":"2022-09-24T14:56:02.610Z","13.0.100-renovate-autumndb-22-x-c405278b01ec0601e856f89b2231f96d47dc87dc":"2022-09-24T17:08:46.401Z","13.0.100":"2022-09-24T17:11:09.616Z","13.0.101-renovate-autumndb-22-x-dcc9a3f905e21e32beeb1e79ce0722777d17ea92":"2022-09-24T20:42:38.596Z","13.0.101":"2022-09-24T20:44:42.469Z","13.0.102-flowzone-docs-f14dbf6c4acd864673ae182002a2abed23773377":"2022-09-27T10:59:16.229Z","13.0.102-flowzone-docs-e100295bcaa0261ce5a886b519eafa641f651697":"2022-09-27T11:04:00.720Z","13.0.102-flowzone-docs-05bb81e547cb1992fef9631dd423040b98fc2280":"2022-09-27T11:09:17.408Z","13.0.102":"2022-09-27T11:11:51.767Z","13.0.103-renovate-autumndb-22-x-6aad02e7070318ac602c1abee45d8bee5d0f8642":"2022-09-27T14:31:05.643Z","13.0.103":"2022-09-27T14:35:09.274Z","13.0.104-renovate-autumndb-22-x-88ea5af313af3b7ecc7e12b7fd71656df72c694f":"2022-09-27T18:42:52.676Z","13.0.104":"2022-09-27T18:45:14.615Z","13.0.105-renovate-autumndb-22-x-19aae73f4d257bfc2fd118592184ae594466b387":"2022-09-27T22:35:02.554Z","13.0.105":"2022-09-27T22:37:24.134Z","13.0.106-renovate-autumndb-22-x-bacc32515d00b7f4247c055463f9f09fcfd39584":"2022-09-28T02:57:15.023Z","13.0.106":"2022-09-28T02:59:19.141Z","13.0.107-node-18-e27ee8d3ac78dc87c6cd16f5127df8140cd49b63":"2022-09-28T08:43:49.988Z","13.0.107":"2022-09-28T08:46:13.004Z","13.0.108-renovate-autumndb-22-x-e3f0938aef3e69f6fe2ff8fbb55469bd8c377f5e":"2022-09-28T12:16:58.630Z","13.0.108":"2022-09-28T12:19:28.702Z","13.0.109-renovate-autumndb-22-x-534696cac9146ed7bc00ae79e874582715532167":"2022-09-28T16:47:19.622Z","13.0.109":"2022-09-28T16:49:29.268Z","13.0.110-renovate-lodash-4-x-012985a1c16b2a4c314f89ee605e1ab8e33110ec":"2022-10-01T00:10:03.916Z","13.0.110":"2022-10-01T02:25:23.690Z","13.0.111-renovate-ts-jest-29-x-383a26ed69bbaea5630308661e0b4bc96fe92fd8":"2022-10-01T02:28:28.156Z","13.0.112-renovate-typescript-4-x-e831f4caf0460c065d37d95457a01554c71024a0":"2022-10-01T02:33:52.965Z","13.0.112":"2022-10-01T02:35:52.960Z","13.0.113-renovate-autumndb-22-x-4adaee79ac5add726cdaeebb34dea7a4e79ff637":"2022-10-01T06:10:13.755Z","13.0.113":"2022-10-01T06:12:37.794Z","13.0.114-renovate-jest-monorepo-4e553addef5733205ab4d39e9362cbeaf8df450c":"2022-10-01T06:15:53.840Z","13.0.114":"2022-10-01T06:18:06.579Z","13.0.115-renovate-autumndb-22-x-52f7eeee8e5f0bfd3086777ba82b9b9ff3e5aee1":"2022-10-01T09:53:41.018Z","13.0.115":"2022-10-01T09:55:51.264Z","13.0.116-renovate-autumndb-22-x-fb3b077dd462e026aa7b19a21ea23a2f8e7c1f3e":"2022-10-01T09:58:29.276Z","13.0.116":"2022-10-01T10:00:39.592Z","13.0.117-renovate-autumndb-22-x-b5fe0541a2f28aed0e533885c47df2e7dabc9a50":"2022-10-01T15:57:43.720Z","13.0.117":"2022-10-01T15:59:44.268Z","13.0.118-renovate-autumndb-22-x-356ff02425e5bcbae92b5b9b9cf96b243b94a6f8":"2022-10-01T18:39:29.302Z","13.0.118":"2022-10-01T18:41:40.603Z","13.0.119-renovate-autumndb-22-x-827ce02944b1a5a3e57aa4e6af645bd233a980da":"2022-10-01T21:18:12.194Z","13.0.119":"2022-10-01T21:20:25.114Z","13.0.120-renovate-autumndb-22-x-0d0ee4023a411f5455700f4fbab5da18a2e58ffc":"2022-10-02T00:14:57.151Z","13.0.120":"2022-10-02T00:17:32.033Z","13.0.121-renovate-autumndb-22-x-e61875274f0898d25c459c728ea2e3343b4c7200":"2022-10-02T23:06:44.006Z","13.0.121":"2022-10-02T23:09:03.432Z","13.0.122-joshbwlng-move-tests-edd0183db8517a958f3c7f482f7d6404e8428dfc":"2022-10-03T14:11:24.398Z","13.0.122":"2022-10-03T14:14:00.909Z","13.0.123-renovate-autumndb-22-x-857cf250883e9fa349f02d2b2cbdd8e6e5d6ab2f":"2022-10-03T14:17:03.678Z","13.0.123":"2022-10-03T14:19:44.327Z","13.0.124-renovate-autumndb-22-x-6c022a9f5f2c7394da475ce67bbf4af3cf789c84":"2022-10-03T18:50:36.054Z","13.0.124":"2022-10-03T18:52:52.757Z","13.0.125-renovate-autumndb-22-x-83eeee1b7307ebaf1a3720bc5bcf387ab6e4a15d":"2022-10-04T05:49:33.510Z","13.0.125":"2022-10-04T05:51:54.686Z","13.0.126-renovate-autumndb-22-x-8e96fde18dbf28d1ce23e6d3f56510117cb31b7d":"2022-10-04T09:24:32.629Z","13.0.126":"2022-10-04T09:26:47.644Z","13.0.127-renovate-autumndb-22-x-39f52293feb5c39218edd4cbcd616c50bafbfa33":"2022-10-06T05:19:57.300Z","13.0.127":"2022-10-06T05:22:32.758Z","13.0.128-renovate-autumndb-22-x-fe2ed943fb5ea0d2c4ced7c1be69e4dfda842162":"2022-10-07T06:38:47.149Z","13.0.128":"2022-10-07T06:41:32.162Z","13.0.129-renovate-jest-monorepo-59d94eaca8a99e90cebfb1c35ff8fb483949d0b0":"2022-10-08T02:49:09.253Z","13.0.129":"2022-10-08T02:51:36.727Z","13.0.130-renovate-sinon-14-x-368029300d1a9cbbc542ecbe67975d5ff2ec76fa":"2022-10-08T02:55:18.224Z","13.0.130":"2022-10-08T02:57:55.853Z","13.0.131-joshbwlng-prettier-fc6b38d89c6a40d143ef8d10402928ab13372cec":"2022-10-08T10:42:49.765Z","13.0.131":"2022-10-08T10:44:50.478Z","13.0.132-joshbwlng-update-lint-staged-9556dd6f7d7df046c8972d1e010d7662db334f25":"2022-10-08T13:26:19.586Z","13.0.132":"2022-10-08T13:29:07.513Z","13.0.133-renovate-autumndb-22-x-5e24c93740be69b362e61cc18f583bea9ef53ad7":"2022-10-09T03:00:08.892Z","13.0.133":"2022-10-09T03:02:31.343Z","13.0.134-renovate-autumndb-22-x-8446507e56f4c67a460b3eed439d0efb200d1cd8":"2022-10-09T04:35:03.374Z","13.0.134":"2022-10-09T04:37:17.287Z","13.0.135-renovate-autumndb-22-x-df4c989691c4e4e11db18a431f8652e08d33fe37":"2022-10-09T13:20:51.718Z","13.0.135":"2022-10-09T13:23:15.451Z","13.0.136-renovate-autumndb-22-x-460571af96324bb6c7a065f9081a3f479d0c7ad5":"2022-10-09T16:04:52.983Z","13.0.136":"2022-10-09T16:07:17.192Z","13.0.137-renovate-autumndb-22-x-c4775dd2d152c09842f85c5be6f497407a230691":"2022-10-09T19:50:39.357Z","13.0.137":"2022-10-09T19:52:45.870Z","13.0.138-renovate-autumndb-22-x-e8d1269222234f413edbf2fe29cfc8108853429c":"2022-10-09T22:11:09.532Z","13.0.138":"2022-10-09T22:13:25.129Z","13.0.139-renovate-autumndb-22-x-b8fe01f053fbd17f10478fbeb1ff53cd2c596375":"2022-10-10T04:25:25.226Z","13.0.139":"2022-10-10T04:27:41.011Z","13.0.140-renovate-autumndb-22-x-c95b569a412e4b54ae41a2172c290fa00cecee23":"2022-10-10T07:25:39.639Z","13.0.140":"2022-10-10T07:27:49.941Z","13.0.141-joshbwlng-jest-config-2dcd04d377d82efbed4811fe32ab40b1f40e034d":"2022-10-10T09:06:13.644Z","13.0.141":"2022-10-10T09:08:23.521Z","13.0.142-renovate-autumndb-22-x-17f3cf4e0a2690cf71f3d150b2789622c7ee97c4":"2022-10-10T12:06:23.169Z","13.0.142":"2022-10-10T12:08:32.820Z","13.0.143-renovate-autumndb-22-x-1ff248a45be4513de607a8ca37d1de8b02f95c9f":"2022-10-10T23:32:34.614Z","13.0.143":"2022-10-10T23:34:41.711Z","13.0.144-renovate-typedoc-0-x-e2f8c44b449faf335cc4986a513eab63b6279734":"2022-10-10T23:38:01.944Z","13.0.144":"2022-10-10T23:40:31.616Z","13.0.145-renovate-autumndb-22-x-2d19af5479b5d22c0f28868e21694e561e8abee1":"2022-10-11T02:31:57.660Z","13.0.145":"2022-10-11T02:34:28.839Z","13.0.146-renovate-autumndb-22-x-87808cabc1b091235b4770f6585f56d2a3072cb9":"2022-10-11T05:44:23.035Z","13.0.146":"2022-10-11T05:46:52.360Z","13.0.147-renovate-autumndb-22-x-77abe569d05ba16837228dd6e756bcf013d7b87a":"2022-10-11T08:09:24.436Z","13.0.147":"2022-10-11T08:11:34.507Z","13.0.148-renovate-jest-monorepo-f4aff236bd3f9cb479b199a0be8a27b26c6b0fcc":"2022-10-15T01:12:48.344Z","13.0.148":"2022-10-15T01:14:59.736Z","13.0.149-renovate-socket-io-packages-364416a85c06c7fde0abf202dcd3319c33eef37f":"2022-10-15T07:27:46.895Z","13.0.149":"2022-10-15T07:29:39.562Z","13.0.150-renovate-typedoc-0-x-5cb62f9b47eb6f19932eb865ea4d6d2026faaef0":"2022-10-18T04:10:40.468Z","13.0.150":"2022-10-18T04:12:41.326Z","13.0.151-renovate-autumndb-22-x-dbf3f8017a0ab84d92e27dbc64ff66c5e79b27a1":"2022-10-18T07:39:47.357Z","13.0.151":"2022-10-18T07:42:10.402Z","13.0.152-renovate-autumndb-22-x-fe472d5366bec8c2c463efdf8cd717e064c69a00":"2022-10-18T11:09:53.965Z","13.0.152":"2022-10-18T11:12:10.010Z","13.0.153-renovate-autumndb-22-x-6adf891abfb631431de7448600e858ef1789fb8c":"2022-10-18T14:46:14.063Z","13.0.153":"2022-10-18T14:48:33.992Z","13.0.154-renovate-autumndb-22-x-a5d48f3eb27d8427e8734a4e482594cc9d539a60":"2022-10-22T03:10:42.175Z","13.0.154":"2022-10-22T03:12:48.933Z","13.0.155-renovate-simple-git-hooks-2-x-ab9a504c21043fe3527fa7af5a47e2bf39bf4b94":"2022-10-22T03:15:26.768Z","13.0.155":"2022-10-22T03:17:28.317Z","13.0.156-renovate-jest-monorepo-7d7d56779d48733341cd09741d92afe50f046cf9":"2022-10-22T06:39:45.124Z","13.0.156":"2022-10-22T06:41:46.008Z","13.0.157-renovate-typedoc-0-x-80f781883d5a068b88c852df967601da04e5b88d":"2022-10-23T22:11:51.576Z","13.0.157":"2022-10-23T22:13:55.350Z","13.0.158-joshbwlng-readme-c80ae307103d0f2b6e953ef4605cfc33c1340842":"2022-10-24T01:49:19.736Z","13.0.158":"2022-10-24T01:51:31.267Z","13.0.159-renovate-autumndb-22-x-0484b7c603240fcb9d89aaf3f8bad98a0434b8af":"2022-10-24T01:54:36.518Z","13.0.159":"2022-10-24T01:56:28.554Z","13.0.160-renovate-autumndb-22-x-07d74a39c8b4479d93746c1a593b18bb2413d0ad":"2022-10-24T04:46:35.934Z","13.0.160":"2022-10-24T04:48:50.218Z","13.0.161-renovate-autumndb-22-x-0b21d1b209f860e8e4d6ab3e4dcd6eaa47474da0":"2022-10-24T04:51:30.587Z","13.0.161":"2022-10-24T04:53:50.899Z","13.0.162-renovate-autumndb-22-x-c5b1c9d61417bb909d0683bf826eff124d0ec546":"2022-10-24T11:18:13.364Z","13.0.162":"2022-10-24T11:20:19.842Z","13.0.163-renovate-autumndb-22-x-d15b58705aadaf117c3eb58622358e8d93b6f8ef":"2022-10-25T05:16:10.581Z","13.0.163":"2022-10-25T05:18:31.090Z","13.0.164-renovate-typedoc-0-x-bdb827a29fcee6e75a059e8a623d11f643e3751c-1":"2022-10-28T04:06:18.462Z","13.0.164":"2022-10-28T04:08:30.050Z","13.0.165-renovate-jest-monorepo-91f25f47598744d1db7da89c6e8c45ba3be84006-1":"2022-10-29T00:07:58.537Z","13.0.165":"2022-10-29T00:10:15.262Z","13.0.166-renovate-typedoc-0-x-9eac8fbdb8aab17b68dc703726af3b1cece8b689-1":"2022-11-03T05:06:40.698Z","13.0.166":"2022-11-03T05:08:53.181Z","13.0.167-renovate-jest-monorepo-b668b560bcc0fdc16ada7111eb71e0e05ebec8f0-1":"2022-11-05T00:24:00.065Z","13.0.167":"2022-11-05T00:25:56.794Z","13.0.168-renovate-lodash-4-x-aaa39a462327269abe0ed94588e8238ac84a97d3-1":"2022-11-05T00:29:24.996Z","13.0.168":"2022-11-05T00:31:46.841Z","13.0.169-renovate-balena-lint-6-x-0d79cb592272154420a4748c98177e8b837346d6-1":"2022-11-07T15:48:18.521Z","13.0.169":"2022-11-07T15:50:40.436Z","13.0.170-renovate-sinon-14-x-a3d3f3c2c0ae6741e86ac93daea65ddbcbadf122-1":"2022-11-12T00:29:23.849Z","13.0.170":"2022-11-12T00:31:40.990Z","13.0.171-renovate-jest-monorepo-ba265a56ad711b5ae325946ce1b605258dccac07-1":"2022-11-12T00:34:41.922Z","13.0.171":"2022-11-12T00:36:48.966Z","13.0.172-renovate-typedoc-0-x-b38dea4c22a8a88e17fd86982587b4940b93eb56-1":"2022-11-14T02:53:40.775Z","13.0.172":"2022-11-14T02:55:57.968Z","13.0.173-renovate-jest-monorepo-d3be2218e63d7b87043f2ce9c069fe2c7b2d2631-1":"2022-11-19T03:04:24.806Z","13.0.173":"2022-11-19T03:06:59.410Z","13.0.174-renovate-lodash-4-x-4ba3d7e98b3d7c54f6cfbe55db1ca8d415a67e0d-1":"2022-11-19T03:10:18.039Z","13.0.174":"2022-11-19T03:12:44.125Z","13.0.175-renovate-typescript-4-x-f4ddc9b481a0b61ff58cb82235e53e0fab3dcd20-1":"2022-11-19T05:47:31.336Z","13.0.175":"2022-11-19T05:50:00.211Z","13.0.176-renovate-autumndb-22-x-cbf5ff210c90f2365b76e7483a6bde3963db413b-1":"2022-11-24T03:07:28.283Z","13.0.176":"2022-11-24T03:09:57.769Z","13.0.177-renovate-autumndb-22-x-5b32b1bd81bc3a249a4c278b2440a157b2353d67-1":"2022-11-24T05:39:15.313Z","13.0.177":"2022-11-24T05:41:32.645Z","13.0.178-renovate-autumndb-22-x-8d58e6a68e70edafc017abd4cbfa7f1bfb2a4684-1":"2022-11-25T03:51:27.286Z","13.0.178":"2022-11-25T03:53:56.174Z","13.0.179-build-renovate-lodash-4-x-cc9bb8b921db5ea190d734a7f7fe24f2167ff985-1":"2022-11-26T01:20:37.380Z","13.0.179":"2022-11-26T01:22:51.359Z","13.0.180-build-renovate-autumndb-22-x-13657ea2b22432d65469cda1912e28ea1baf8a7d-1":"2022-11-26T01:26:08.812Z","13.0.180":"2022-11-26T01:28:30.211Z","13.0.181-build-renovate-autumndb-22-x-f883432b4cac0b9e97b5dadcec7d7676d6e2f741-1":"2022-11-26T04:24:08.227Z","13.0.181":"2022-11-26T04:26:34.170Z","13.0.182-build-renovate-lint-staged-13-x-794bde1f25c1e8502d423e6a887f0746583a355d-1":"2022-11-26T04:29:40.696Z","13.0.182":"2022-11-26T04:32:22.838Z","13.0.183-build-renovate-autumndb-22-x-565136fdfa0be028811219d83c7cda2cb76d99e6-1":"2022-11-26T07:32:19.363Z","13.0.183":"2022-11-26T07:34:39.118Z","13.0.184-build-renovate-socket-io-packages-127c18942b2cde417cf1c28fd9f2433afe14f5ae-1":"2022-11-26T07:38:08.991Z","13.0.184":"2022-11-26T07:40:59.993Z","13.0.185-build-renovate-autumndb-22-x-4c3f84507e7c444349a880debf3cf67fb622de18-1":"2022-11-26T10:31:55.587Z","13.0.185":"2022-11-26T10:34:22.518Z","13.0.186-build-renovate-prettier-2-x-6dfd75a7a485630758d827d8ced40ce537ba90eb-1":"2022-11-26T10:37:23.414Z","13.0.186":"2022-11-26T10:39:34.036Z","13.0.187-build-renovate-autumndb-22-x-d986638be9ced465fd41bada2af5d7523efb61bc-1":"2022-11-26T13:06:37.853Z","13.0.187":"2022-11-26T13:09:06.613Z","13.0.188-build-renovate-autumndb-22-x-1761a229c7c07a67fb9248cf1a425bfacf6644c2-1":"2022-11-26T15:24:09.125Z","13.0.188":"2022-11-26T15:26:28.132Z","13.0.189-build-renovate-autumndb-22-x-0cac137895f13d914f9347b4bce20ea9737855d2-1":"2022-11-26T18:07:54.846Z","13.0.189":"2022-11-26T18:10:39.985Z","13.0.190-build-renovate-autumndb-22-x-fff8e132703b2c1f70e210138548daf25ce81e78-1":"2022-12-02T02:37:26.958Z","13.0.190-build-joshbwlng-renovate-3337ab023c0caa5433dd41b4c6a63907123a5c8c-1":"2022-12-13T00:41:05.728Z","13.0.190":"2022-12-13T00:43:43.732Z","13.1.0-build-renovate-node-16-x-efb2b33f2d822d0bb3aac5815e027f26f0677124-1":"2022-12-13T03:49:17.132Z","13.1.0":"2022-12-13T04:48:18.132Z","13.2.0-build-renovate-actions-setup-node-3-x-00517517b9443991867307581fb52b1b586a4395-1":"2022-12-13T05:48:27.278Z","13.2.0-build-renovate-actions-setup-node-3-x-6386fc9266f71670d96d0598d5c052230e733a05-1":"2022-12-13T15:49:30.100Z","13.2.0":"2022-12-14T00:33:21.479Z","13.3.0-build-renovate-node-18-x-fae28550ff594f7c792a8f7701af845293cdcde2-1":"2022-12-14T01:10:37.088Z","13.4.0-build-renovate-axios-1-x-ee9f7080b948c9754df79b77fc8e3d44c8942b20-1":"2022-12-21T01:08:28.977Z","13.4.0-build-renovate-pin-dependencies-7731ed7b5febd1995786a142fb79249bd12de385-2":"2022-12-28T06:47:18.698Z","13.4.0":"2022-12-28T06:49:37.779Z","13.5.0-build-renovate-axios-1-x-b6d073354c4314a43b46ebbf67e86f24defdbed9-1":"2022-12-28T07:00:41.925Z","13.5.0":"2022-12-28T07:03:01.044Z","13.5.1-build-renovate-sinon-15-x-80d7adf1e1e699d295700895fd5776e63e8d0fa5-1":"2022-12-28T07:48:39.816Z","13.6.0-build-renovate-uuid-9-x-1791df0403a6afbc87046baa372361e1c880e4ad-1":"2022-12-28T07:48:58.565Z","13.5.1":"2022-12-28T08:47:02.329Z","13.6.0-build-renovate-uuid-9-x-69027734ac8578f09bae0c4adef1e752fc3ac060-1":"2022-12-28T09:48:08.144Z","13.6.0":"2022-12-28T11:32:38.998Z","13.6.1-build-joshbwlng-uuid-d875952f4a7d29c57165984695f6e9b401f4b6cc-1":"2023-01-01T09:47:59.477Z","13.6.1":"2023-01-01T09:50:27.958Z","13.7.0-build-renovate-peaceiris-actions-gh-pages-digest-4d45debc54935364c97f554bfd1c2378666ac97c-1":"2023-01-05T13:49:02.999Z","13.7.0-build-renovate-actions-checkout-digest-4a9edc8bd9e3b847ad462002c3ffda405c927f1f-1":"2023-01-05T14:50:19.963Z","13.7.0":"2023-01-05T15:00:10.604Z","13.8.0-build-renovate-actions-setup-node-digest-77315ec83a33e803013a78ddbfd306b8f6d1c4d1-1":"2023-01-05T15:49:22.094Z","13.8.0":"2023-01-06T01:03:02.373Z","13.9.0-build-renovate-node-18-x-449ebc4cd09d5e3a5917c118b96b795505fdf366-1":"2023-01-06T01:08:45.389Z","13.9.0":"2023-01-06T02:15:18.438Z","13.10.0-build-renovate-peaceiris-actions-gh-pages-digest-9c89fff0958d884b234c5289726cc2a52f1e0598-1":"2023-01-06T02:59:43.717Z","13.10.0":"2023-01-07T00:26:19.378Z","13.11.0-build-renovate-github-codeql-action-digest-0b773db0d8c618a54512baeff7a91174eb85c1ac-1":"2023-01-12T10:50:20.212Z","13.10.1-build-renovate-rimraf-4-x-0e1d21dc2d4c2e392c28393167201fe65e7395da-1":"2023-01-13T01:10:53.052Z","13.11.0-build-renovate-github-codeql-action-digest-8db82c79f92e74fca9f12b30591a2b4b0f397bf4-1":"2023-01-26T16:52:39.971Z","13.11.0-build-renovate-github-codeql-action-digest-21b5b00bad7937be1678daf265c502083e7716ea-1":"2023-01-27T09:49:34.809Z","13.11.0-build-renovate-github-codeql-action-digest-3e0f8a9b4d4bb8156d5f9ba062f52807040189e5-1":"2023-02-06T20:50:20.619Z","13.10.1-build-joshbwlng-bump-dev-deps-33f92b95b6f3f6fbdc6b5c9e3ffb384636004347-1":"2023-03-31T22:24:48.320Z","13.10.1":"2023-03-31T22:36:37.291Z","13.11.0-build-renovate-github-codeql-action-digest-a7bd694ece66c8cfbb19297fa922257d4ce3e01f-1":"2023-03-31T22:58:52.945Z","13.11.0":"2023-03-31T23:01:27.995Z","13.11.1-build-joshbwlng-fix-readme-b640e44708cf7055f23a07724473408f7654e279-1":"2023-03-31T23:09:23.994Z","13.11.1":"2023-03-31T23:12:11.279Z","13.11.2-build-joshbwlng-update-socket-io-client-2bbba1976cfe2fa47733de691c84c68515dd523f-1":"2023-03-31T23:15:51.454Z","13.11.2":"2023-03-31T23:19:13.814Z","13.11.3-build-joshbwlng-use-uuid-adca59e2db18ace8e5d196fc4dc5e493f20d0301-1":"2023-04-02T15:00:57.561Z","13.11.3-build-joshbwlng-update-readme-aebb344324fda53af19897094c8ad10b18c0dd65-1":"2023-04-03T02:05:03.387Z","13.11.3-build-joshbwlng-bump-autumndb-525f11b49b7569d8f074407d2e16feea52f72ed6-1":"2023-04-03T08:26:56.146Z","13.11.3-build-joshbwlng-downgrade-axios-ec20936c8236f8bf780806bc2961c66068169168-1":"2023-08-12T23:25:39.208Z","13.11.3":"2023-08-13T01:28:47.356Z","13.11.4-build-joshbwlng-remove-typedoc-17838ed6b08bc0de6b54b3d1090c928edd537c7e-1":"2023-08-28T08:11:43.045Z","13.11.4":"2023-08-28T08:14:30.577Z","13.11.5-build-joshbwlng-bump-dev-deps-2adb71d8e1119856b04db2704995239029497759-1":"2023-08-28T08:28:43.658Z","13.11.5":"2023-08-28T08:34:18.289Z","13.11.6-build-joshbwlng-update-socket-io-client-10941a51c5435293fd61907cdb96ba6ec809d99e-1":"2023-08-28T08:37:37.163Z","13.11.6":"2023-08-28T08:40:12.749Z","13.11.7-build-joshbwlng-update-typescript-4ecb80c071c6869888e93b0a1132ac5db2e8a638-1":"2023-08-28T08:46:31.400Z","13.11.7":"2023-08-28T08:49:01.741Z","13.11.8-build-joshbwlng-update-autumndb-e93ad4794cdeedd821f2d7ad89d07065a7472332-1":"2023-09-03T00:08:32.480Z","13.11.8":"2023-09-03T02:13:40.378Z"},"bugs":{"url":"https://github.com/product-os/jellyfish-client-sdk/issues"},"author":{"name":"Balena.io.","email":"hello@balena.io"},"license":"Apache-2.0","homepage":"https://github.com/product-os/jellyfish-client-sdk#readme","repository":{"url":"git+https://github.com/product-os/jellyfish-client-sdk.git","type":"git"},"description":"HTTP client SDK for Jellyfish","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"page","email":"page@balena.io"}],"readme":"# Jellyfish Client SDK\n\nThis is a client side library to interact with the Jellyfish API.\nIt's meant to provide high level useful functionality to the web UI and any other clients.\n\n# Usage\n\nBelow is an example how to use Jellyfish:\n\n```typescript\nimport { getSdk } from \"@balena/jellyfish-client-sdk\";\n\n// Create a new SDK instance, providing the API url and prefix\nconst sdk = getSdk({\n    apiUrl: \"https://api.ly.fish\",\n    apiPrefix: \"api/v2/\",\n});\n\n(async () => {\n    const sessionContract = await sdk.auth.login({\n        username: \"jellyfish\",\n        password: \"jellyfish\",\n    });\n\n    if (sessionContract) {\n        // Authorise the SDK\n        sdk.setAuthToken(sessionContract.id);\n\n        // Get and output a list of all channel contracts\n        const channelContracts = await sdk.card.getAllByType('channel@1.0.0');\n        console.log('channelContracts:', JSON.stringify(channelContracts, null, 2));\n\n        // Query for a specific user and output results\n        const userContract = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n        });\n        console.log('userContract:', JSON.stringify(userContract, null, 2));\n\n        // Query for a specific user with links and output results\n        const userContractWithLinks = await window.sdk.query({\n            type: 'object',\n            properties: {\n                type: {\n                    const: 'user@1.0.0',\n                },\n                slug: {\n                    const: 'user-foobar',\n                },\n            },\n            $$links: {\n                'is member of': {\n                    type: 'object',\n                },\n            },\n        });\n        console.log('userContractWithLinks:', JSON.stringify(userContractWithLinks, null, 2));\n    }\n})();\n```\n","readmeFilename":"README.md"}